VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've worked on various things in my emulator (x86EMU). The last build (2015/08/31 10:23) still has a working mouse, but my most recent build (2015/09/06 13:52) doesn't have a working mouse anymore. Anyone can see where it went wrong?

My project code:
https://bitbucket.org/superfury/x86emu/src/

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 4 of 4, by superfury

User metadata
Rank l33t++
Rank
l33t++

Found the error in my ATA-1 controller (Using the Sourcetree Checkout option). The ATA-1 control port address was listening to BAR1+2 and BAR1+3(BAR1=0, so it's base port 3F6). The controller was thus listening to port 3F8&3F9(which are also used by the UART data port and Interrupt Enable register). This causes the input from the UART data port (COM1 has a serial mouse attached) to be combined with data read from the ATA-1 alternate status port address(which reads/writes to the same address), causing the software to read mingled data (OR'ed data of the mouse and IDE ATA-1 controller).When the UART data port is read, it actually reads the mouse data (any input data from the mouse) OR'ed with the data in the IDE ATA-1 controller (0x10). When the mouse is returning byte 0x80 and the ATA-1 status got 0x10 in it's register, the software reads 0x90 (0x80 from the mouse OR'ed with 0x10 from the ATA-1 alternate status register). This was causing the problem. It's fixed now.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io