PS2 Mouse init problems

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: PS2 Mouse init problems

Post by bewing »

@proxy: I am not able to duplicate your problem precisely yet -- however I have several things I have to say:

Sorry, you were right. This seems to be a "feature" (ie. bug) in newer versions of bochs -- and maybe an old one in qemu. (I am not sure if it still exists in bochs 2.4.)
My code, which was running perfectly on a slightly older version of bochs, and on real hardware -- gets the same keyboard lockup that you describe. What happens is that IRQ1 and IRQ12 (and ONLY those two IRQs!) stop firing. On real hardware, this is impossible.

If I rearrange the 0xA8 command to precede the compaq status byte command (with the proper waits), the keyboard works again. This is also impossible.
purage
On Probation
Posts: 119
Joined: Wed Feb 11, 2009 1:04 am

Re: PS2 Mouse init problems

Post by purage »

Send a message to the developers. Might save you tons of time guessing.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: PS2 Mouse init problems

Post by bewing »

I may indeed do that. But with Stanislav and Volker, it works better if you can pinpoint the bad code for them.
johnsa
Member
Member
Posts: 296
Joined: Mon Oct 15, 2007 3:04 pm

Re: PS2 Mouse init problems

Post by johnsa »

I've all but given up on this ps2 stuff... if i fiddle for long enough it works under bochs, but then not qemu.. and then not on real h/w and so it keeps going.. i haven't found a single combination of things that make it work under all conditions, a8 first or after, various different types of delays, checking for all ack's... its really bizarre... i think one combination may work on real h/w .. which would be the ideal one, but having bochs and qemu react so differently makes this almost impossible to test or get right. Has anyone tried running linux under bochs and qemu? if it's ps2 stuff works under all options then we'd know its us.. and clearly the linux ps2 coder is way smarter than me ;)
User avatar
proxy
Member
Member
Posts: 108
Joined: Wed Jan 19, 2005 12:00 am
Contact:

Re: PS2 Mouse init problems

Post by proxy »

I actually recently got it to almost always work. (occasionally it will lock up in qemu, but not nearly are often). When I'm back on my dev box, i'll post my code (which is of course very similar to the original code I had).

Basically, what I did was I looked at the source to bochs's PS2 stuff so I could see which things it sends ACKs for and which it doesn't, in addition to being able to look at how bochs expects things to work.
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Re: PS2 Mouse init problems

Post by kmtdk »

well
Just for a little news .
soon ( when im finish with the atapi , or close to) i will start working on mouse again, and then i will write some more stuff of it.
so im gona need some help with testing and sutch things, if somebody wants to :P

KMT dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
purage
On Probation
Posts: 119
Joined: Wed Feb 11, 2009 1:04 am

Re: PS2 Mouse init problems

Post by purage »

I agree. Coding for the mouse is the most annoying part as you have to constantly reboot the system to test results. I have a working mouse driver that work both in VPC and real hardware, but I do get the occasional craziness on real hardware which i think is more of a memory issue than a mouse driver issue. Needless to say, I'm saving the perfecting of the mouse driver for dead last.
Post Reply