flat assembler
Message board for the users of flat assembler.

Index > OS Construction > OS Mouse Trouble

Author
Thread Post new topic Reply to topic
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 30 Dec 2010, 02:19
so I'm working on some code and I can't get the mouse data seperated from the keyboard data. if you run the provided code in VirtualBox, it spews out a bunch of data when moving the mouse (click in the window first) and pressing keys at the same time. the rate is vastly higher than just typing keys, so I know the mouse is being interfaced. anyone know how to get it out?


Edit: oh yeah, I forgot to mention. I highly recommend using RadAsm -- with the provided ini files -- as I use Macros and multiple files heavily. the files in question are setup_mouse.asm and irq_meces.asm . root.asm is where the files are "rooted".



Edit: sorry, I found some issues with the code and have corrected them.

For the purposes of debugging, I put in a function to display the bits of RSP during the timer interrupt. It's the first yellow number of the three. The second yellow number is the Difference between each interrupts' RDTSC. the third is RDTSC at the interrupt.

The second line in the window is a debugging line. messages are printed at checkpoints and such..

The third line ( ">> " ) is updated everytime someone enters a key. I put rand back in, so if you press the Enter key it'll show you a random number at the bottom left of the screen (it's in yellow and shouldn't be there when first starting up).

The PCI Enumeration code is renabled. I was recently hunting down a bug before working on the mouse code.. that's what is displaying in the largest section of the window.

The 2 numbers on the bottom right are the response from the Mouse, in decimal form.


Description: this one has a number of corrections.
Download
Filename: MDec30.zip
Filesize: 51.96 KB
Downloaded: 310 Time(s)



Last edited by StarKnightD on 30 Dec 2010, 12:02; edited 1 time in total
Post 30 Dec 2010, 02:19
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 30 Dec 2010, 07:34
What is the interface to the mouse and keyboard? PS/2?
Post 30 Dec 2010, 07:34
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 30 Dec 2010, 08:23
it could be usb, but my code is only currently considering the ps/2.
Post 30 Dec 2010, 08:23
View user's profile Send private message Reply with quote
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 30 Dec 2010, 19:38
The first image has most of the screen occupied by the raw Hex output of the PCI Enumaration Data ... after that I commented out the function call that made it to get the next image..
Image


Since I still haven't been able to get the mouse to fire an interrupt on Int 12 (Ch) I commented out the code which is involved while I work on these other sections.. The image below represents all the Bus0 Devices the PCI Enumeration Code found.
Image


These images are from booting a real machine by the way ..

I'm uploading the version that resulted in that last image here. to get the first one simply remove the comment on line 64 of "pcif_storage.asm" ..

As you can see from the image, the keyboard doesn't work. The keys are flashing near the top left corner (the "g" in Verifying is replaced with each character and color sequentially).


By the way, John, I don't know anything about programming USB atm. I more or less rammed into a wall as you can see with the PCI IDE code. it's so close yet so far.


Description:
Download
Filename: MDec30b.zip
Filesize: 52.67 KB
Downloaded: 326 Time(s)

Post 30 Dec 2010, 19:38
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.