Page 1 of 1

Remap "Restore" Key or Cartridge Button Key?

Posted: Tue Dec 22, 2020 5:01 pm
by mbalmer

I've been getting into programming in assembly language on the C64, and I've run into one issue when doing so: if I'm using a cartridge like an Action Replay for its machine-language monitor functions, I lose access to the RESTORE key because the key and the button on the cartridge are mapped to the same physical key on the keyboard.

Has anyone given any thought to remapping either one of these functions so that RUN/STOP + RESTORE is available with a cartridge that has a button inserted?


Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Mon Dec 28, 2020 5:13 pm
by Hackshed_Carl
F11 for the freeze button with the Action Replay cart

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Mon Dec 28, 2020 5:15 pm
by Hackshed_Carl
Sorry, just checked the documentation and yes, restore is also mapped to F11 :(

I'll set mine up later and have a play around

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Sat Jan 02, 2021 1:56 pm
by Hackshed_Carl
After testing this out today and being unable to find a solution, I have raised a git issue.
https://github.com/MiSTer-devel/C64_MiSTer/issues/53

Not sure if there'll be any traction on this but at least the devs are now aware and can decide if it's something they want to look at

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Sat Jan 02, 2021 3:07 pm
by Sorgelig
I don't see what can be done there. Action Replay intercepts NMI vector (RESTORE key) if i remember right, so how it's supposed to work except executing Action Replay freeze function?

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Sat Jan 02, 2021 3:19 pm
by Hackshed_Carl
I think from memory, on real hardware, pressing "RESTORE" didn't bring up the AR menu as it had its own physical button on the cart itself.

I only raised the issue in git on behalf of the OP just in case it could be fixed.
Understandably, it's only an edge case issue so if it can't be done then that's fine

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Sun Jan 03, 2021 7:32 pm
by mbalmer
There *is* a way around it, I've found, and that's to go into the AR's monitor and just type G8000 (for Turbo Macro Pro, for example) and it goes back into the assembler. So if there's no fix, there is at least a workaround. But I have seen multiple videos of others using physical hardware (albeit with a Super Snapshot cartridge, not an AR) where the RESTORE key and the cartridge button are working independently of one another.

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Sun Jan 03, 2021 8:11 pm
by Juri
i've just tested an ar clone cartridge (on a real hw) and i confirm, pressing runstop+restore do not bring up the action replay freeze menu, only the freeze button on the cartridge bring it up.
i had a look at a couple of schematics of an action replay ( http://www.zimmers.net/anonftp/pub/cbm/ ... tion73.gif and https://rr.pokefinder.org/rrwiki/images ... _MK5_6.gif )
the freeze button is not directly connected to the nmi line, so i think it act in a different way.

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Tue Jan 12, 2021 3:33 pm
by yellperil

Update:
This should now work exactly the same as the current C64 release, but with the restore key and freeze key being separate across all carts.
I'll leave it for a few days before I submit the changes.

  • [run/stop] [restore] works normally and doesn't activate the freeze.

  • Freeze is on [Control] [F1] this was chosen as it doesn't clash with any other c64 key combinations.


Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Sun Jan 17, 2021 9:22 pm
by Hackshed_Carl
Sorgelig has updated the core today to add the option to use Win+F11 as the restore key.

Thanks for the update Sorgelig!!!

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Mon Jan 18, 2021 5:29 am
by mbalmer
Awesome!! Thanks, yellperil and Sorg!

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Mon Jan 18, 2021 11:31 am
by yellperil
I wouldn't thank me I did not get a chance to upload my code.

Sorgelig, I've tried the core and it does not appear to fix the issue (I think it's a little more broken).
Would you mind if I send you my changes for reference or are you happy doing your thing?

Re: Remap "Restore" Key or Cartridge Button Key?

Posted: Tue Jan 19, 2021 12:13 pm
by yellperil