mamedev / mame

MAME
https://www.mamedev.org/
Other
8.05k stars 2.01k forks source link

apple2gs/macadb mouse update frequency #10790

Closed ksherlock closed 1 year ago

ksherlock commented 1 year ago
5 a:49191:b=49188
10 m=peek(a) : on m<128 goto 10
20 print m,peek(b),peek(b)
30 goto 10

On a real apple IIgs, (rom 1, ADB apple mouse) the above only prints a line when there is mouse activity. On MAME with macadb it prints a continuous stream even when there is no mouse activity.

The autopolling section in HW 1 says:

Your device should only respond with data when sent a talk register 0 command if it has new data. If the status of the device has not changed since the last talk register 0, then it should not respond at all, allowing the bus to time out.

rb6502 commented 1 year ago

ADB service requests don't work 100% properly right now - it's good enough for MacOS in every case except the PowerBook's M50753 microcontroller, but the IIgs microcontroller doesn't like it at all. I was hoping to short-circuit that by having a real emulated ADB keyboard and mouse, but that's taking longer than expected and macadb may need to be fixed.

rb6502 commented 1 year ago

This is fixed with 802fd7f as far as your program doing the right thing and no observed ill effects on either A2DeskTop or System 6.0.1's Teach. There is almost certainly an M740 opcode emulation bug or bugs causing us to still need to suppress mouse SRQs for the GS and preventing the PowerBooks from working. The PIC, Egret, and Cuda MCUs on the Mac side all work flawlessly now and they're a bit happier to be doing less work since devices with no data no longer respond.