lgblgblgb / xemu

Emulations (running on Linux/Unix/Windows/macOS, utilizing SDL2) of some - mainly - 8 bit machines, including the Commodore LCD, Commodore 65, and the MEGA65 as well.
https://github.com/lgblgblgb/xemu/wiki
GNU General Public License v2.0
201 stars 31 forks source link

MEGA65+C65: mouse emulation/usage problems #321

Open lgblgblgb opened 2 years ago

lgblgblgb commented 2 years ago

Mouse emulation problems in MEGA65 and C65 emulators:

  1. ~[NOT HERE, DONE] In V400 mode (GEOS, Solitaire), the mouse pointer cannot be moved beyond about the second half of the screen vertically. This is actually not a mouse emulation bug, but a sprite issue, see #320 Should be checked for C65 emulation as well~
  2. Mouse movement is just too fast compared to real MEGA65 (no info on a real C65 unfortunately). With a simple BASIC10 command (MOUSE ON) it seems to be OK, however the problem that on real MEGA65 it must be "too slow". At least all recent programs for MEGA65 using mouse (with own routines, by M3wP - thanks! - not by using the ROM's mouse routine!) seems to work fine on MEGA65 but waaay too fast in Xemu (virtually unusable, so fast).
  3. ~[DONE] Mouse clicking does not work by default. Actually this is a problem that mouse emulation uses the actual selected joystick port for emulation, which is port-2 by default, but for real, mouse should (?) use port-1. Workaround: switch to port-1 on mouse grab mode (and restore the setting on leaving mouse grab mode).~
  4. Expose mouse POT regs via $D62n (n=0,1,2,3) registers as well?
lgblgblgb commented 2 years ago

M3wP suggested mouse change is in commit 551109183aa7dbc7b6e2d39e1d637f60697ce300

lgblgblgb commented 2 years ago

It seems mouse problems started to show up for the real MEGA65 as well, at least for the ROM routines. I would rather wait for that to be sorted out to see, how then we can compare various mouse user software including the most prominent possibility (and it seems people are really into this ...): BASIC itself.

lgblgblgb commented 2 years ago

As discussed in https://github.com/MEGA65/mega65-rom-public/issues/8 it would be also a great opportunity to check the "behaviour match" between MEGA65 and Xemu in terms of hardware level mouse "behaviour". I think, there are differences still, in Xemu is still not the same mouse speed, etc.