rampa069 / ZX-ESPectrum

A ZX spectrum 48K/128K emulator running on ESP32 with bitluni ESP32 VGA Board (also in TTG VGA32)
153 stars 46 forks source link

Wiimote support coexisting with PS2/Keyboard (untested) #9

Closed dcrespo3d closed 4 years ago

dcrespo3d commented 4 years ago

Hello, and thanks for your patience ;-)

This time I have prepared a version in a different branch. I have added Wiimote input support, with per-game key assignments. The assignments are made through a .txt file, with the same name as the .sna file, in the same directory. The Wiimote has 11 keys which can be mapped to any of the 40 speccy keys, so a manual assignment must be done. Syntax for the .txt file is explained in the README.md, and examples for fantasy.sna and sppong.sna are provided.

I have tried not to break PS2 keyboard support but I have been able to test it as I won't have access to one until next week. I think it SHOULD work, but I can´t be sure. I have left all original PS2 code, and I'm using two sets of "states" for the speccy keys, one from the PS2 keyb and other from the Wiimote. Then I logically AND them (as they are active low) in z80main.cpp.

I have been adding games and correspondences in my local work copy, and it's a delight to play with the wiimote, it works really well, with low lag, it´s a delight to play Manic Miner with it.

Regards, David Crespo

jorgefuertes commented 4 years ago

Good work, we can stay in Wiimote branch until we have all tested with a ps2 keyboard.

jorgefuertes commented 4 years ago

Course you can commit the other fixes to the master branch.