VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

I notice something odd: UniPCemu generates serial mouse packets, but the MOUSE.SYS(from Windows 3.0) only seems to go up and down? The packets themselves seem 'OK'?

			//Translate our movement to valid values if needed!
xmove = signed2unsigned8(MAX(MIN(packet->xmove,0x7F),-0x80)); //Limit!
ymove = signed2unsigned8(MAX(MIN(packet->ymove,0x7F),-0x80)); //Limit!

if (SERMouse.movement==0) //Not gotten movement masked?
{
xmove = ymove = 0; //No movement!
}
//Bits 0-1 are X6&X7. Bits 2-3 are Y6&Y7. They're signed values.
highbits = ((xmove >> 6) & 0x3); //X6&X7 to bits 0-1!
highbits |= ((ymove >> 4) & 0xC); //Y6&7 to bits 2-3!

byte p[3];
p[0] = 0x40 | (buttons << 4) | highbits; //First packet byte!
p[1] = (xmove&0x3F);
p[2] = (ymove&0x3F);

signed2unsigned simply executes a typecast by union{sbyte s; byte u;}.

Are those resulting packets correct?

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

Reply 1 of 3, by superfury

User metadata
Rank l33t++
Rank
l33t++

Just tried using the ctmouse(CuteMouse) driver. When running, it detects the serial mouse correctly as a Microsoft Mouse, then proceeds to somehow hang the CPU using a IF=0,HLT state? So there's a serious CPU problem in that driver alone? Maybe also something that's at the cause of the mouse problem itself?

This is a common emulator log of the driver running:

Filename
UniPCemu_running_ctmouse.zip
File size
2.97 MiB
Downloads
57 downloads
File comment
CuteMouse running in UniPCemu
File license
Fair use/fair dealing exception

Anyone can see what's going wrong?

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

Reply 2 of 3, by superfury

User metadata
Rank l33t++
Rank
l33t++

Just tried running the cutemouse driver on the 80186 emulation. I then tried running edit.com. The mouse was working fine.
Then I tried firing up the Windows 3.0 setup. Once it entered graphical mode(640x480x16), the mouse was behaving strange again. Does that mean it's actually a CPU problem and not a hardware one?

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

Reply 3 of 3, by superfury

User metadata
Rank l33t++
Rank
l33t++

Oddly enough, except for Windows 3.0's mouse, the mouse functions properly using CuteMouse with the serial mouse, running both edit.com as well as with Microsoft Flight Simulator 5.1(running in 640x400 mode)? So it's a Windows 3.0/MOUSE.SYS-only problem?

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