Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEGA65+C65: problems with -autoload -go64 #269

Open
smf- opened this issue Jun 5, 2021 · 1 comment
Open

MEGA65+C65: problems with -autoload -go64 #269

smf- opened this issue Jun 5, 2021 · 1 comment

Comments

@smf-
Copy link

smf- commented Jun 5, 2021

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
Copy link
Owner

lgblgblgb commented Jun 5, 2021

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.

@lgblgblgb lgblgblgb self-assigned this Jun 5, 2021
@lgblgblgb lgblgblgb added the WIP label Jun 5, 2021
@lgblgblgb lgblgblgb changed the title MEGA65/C65 -autoload -go64 MEGA65+C65: problems with -autoload -go64 Jun 6, 2021
lgblgblgb added a commit that referenced this issue May 15, 2023
Previously these functionalities used the "fake typing" subsystem which
is very picky, and often misses "faked keypresses". It would be nice to
try that sorting out (eg also for "pasting any text via fake
keypresses"), but it's actually easier to migrate these over the
"inject" framework, used also by the PRG direct run (+inject)
functionality.

Other then -autoload, -go64 alone (to boot into "C64" mode) is much
better this way, using only the virtual "Commodore" key without the need
to give the "GO64" command.
lgblgblgb added a commit that referenced this issue May 15, 2023
Drop using the two-phase ?"@" trick to release RETURN, and use a
timeout instead. For C64 LOAD, let's use two normal phase though,
we can save the ugly keyboard buffer trick (just introduced in the
previous commit btw ...), and we can use "turbo mode" for loading
too, to speed of LOADing (no need in MEGA65 mode, as it's usually
40.5MHz mode already). Also several clean-ups here and there.
@lgblgblgb lgblgblgb added Committed and removed WIP labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants