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: problems with -autoload -go64 #269

Open smf- opened 3 years ago

smf- commented 3 years ago

If you use -autoload & -go64 together then it fails as some of the keys are ignored when switching to c64 mode. I have been testing with this change & it appears to work with both xmega65 & xc65

 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/xemu/c64_kbd_mapping.c b/xemu/c64_kbd_mapping.c
index 5fb2845..20d85d8 100644
--- a/xemu/c64_kbd_mapping.c
+++ b/xemu/c64_kbd_mapping.c
@@ -169,14 +169,8 @@ const Uint8 fake_typing_for_go64[] = {
 };
 const Uint8 fake_typing_for_load64[] = {
    0x32,0x46,0x23,0x13,0x01,0x31,0x01,         // GO64 <RETURN> Y <RETURN>
-#ifdef MEGA65
-   0x51,0xFE,0x46,0xFE,0x43,0x57,0x23,0x20,0x01,0x01,  // P <TOGGLE_SHIFT> O <TOGGGLE_SHIFT> 0,65 <RETURN>
-#endif
-   0x52,0xFE,0x46,0x73,0xFE,0x61,0xFE,0x73,0xFE,0x01,  // L <TOGGLE_SHIFT> O 2 <TOGGLE_SHIFT> * <TOGGLE_SHIFT> 2 <RETURN>
-#ifdef MEGA65
-   0x51,0xFE,0x46,0xFE,0x43,0x57,0x23,0x13,0x01,0x01,  // P <TOGGLE_SHIFT> O <TOGGGLE_SHIFT> 0,64 <RETURN>
-#endif
-   0x21,0x36,0x47,0x01,                    // RUN <RETURN>
+   0xFD,0xFD,0xFD,0xFD,0xFD,                   // pause
+   0xFE,0x77,0xFE,                             // SHIFT+RUN/STOP
    0xFF                            // <END_MARKER>
 };
 const Uint8 fake_typing_for_load65[] = {
lgblgblgb commented 3 years ago

Thanks. I've edited your post a bit to have more visual syntax, if you don't mind. I do not use this feature too much any more. The POKE stuff is intended for faster load by switching into ~40.5MHz mode during the loading and then back for MEGA65 (works in both of C64 and C65 mode). But it's fine for me, if it goes away. Sooner or later (seeing the amount of works, probably "later") this function will be re-implemented with the READY-trigger feature, but till that I'll do that modification since as you stated it works for you this way, then let it be, till that.