Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,933 of 4,255    |
|    Robert Pengelly to wolfgang kern    |
|    Re: Does a PS/2 mouse get detected if pl    |
|    16 Nov 23 05:39:34    |
      From: robertapengelly@gmail.com              On Thursday, 16 November 2023 at 06:35:59 UTC, wolfgang kern wrote:       > On 15/11/2023 09:27, Robert Pengelly wrote:       > ...       > > Right, I rewrite all the IRQ12 related stuff and it seems to work as I get       an A printed in the handler when I capture the mouse with qemu, how do I tell       the controller that I've got the data? I've tried:       > >       > > in al, 0x20       > > out 0x20, al       > >       > > in al, 0x60       > > out 0x60, al       > >       > > and       > >       > > in al 0x64       > > out 0x64, al       > >       > > and nothing happens as I only get the A printed once       > END of INTERRUPT(IRQ12):       > MOV AL, 0xA0       > OUT 0xA0,AL ;release IRQ 12       > OUT 0x20,AL ;and the cascaded IRQ0..7       >       > END OF INTERRUPT(IRQ4):       > MOV AL,0x20       > OUT 0x20,AL       >       > but if the mouse is out of sync it may need a reset       > __       > wolfgang       Right, I have:              ps2_handler:               push ax        in al, HEX (60)               mov al, 'A'        call writechr               mov al, HEX (A0)        out HEX (A0), al               mov al, HEX (20)        out HEX (20), al               pop ax        iret              and I get three A's printed every time I move the mouse so that's a good       sign. Looking at the PS/2 packets on https://roborooter.com/post/serial-mice/       it has:               D7 D6 D5 D4 D3 D2 D1 D0       Byte 1 XV XV YS XS 1 M R L       Byte 2 X7 X6 X5 X4 X3 X2 X1 X0       Byte 3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0              L Left button state (1 = pressed down)       M Middle button state (1 = pressed down)       R Right button state (1 = pressed down)       X0-X7 Movement in X direction       Y0-Y7 Movement in Y direction       XS,YS Movement data sign bits (1 = negative)       XV,YV Movement data overflow bits (1 = overflow has occurred)              Is the D3 the status bit? Also, what is the XV/YV for? It says overflow bit       but I'm a little confused as to what I do with it.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca