Remap "Restore" key or cartridge button key?

mbalmer
Posts: 15
Joined: Wed May 27, 2020 3:08 pm
Has thanked: 3 times

Remap "Restore" key or cartridge button key?

Unread post 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?
Hackshed_Carl
Posts: 29
Joined: Mon May 25, 2020 3:22 pm
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post by Hackshed_Carl »

F11 for the freeze button with the Action Replay cart
Hackshed_Carl
Posts: 29
Joined: Mon May 25, 2020 3:22 pm
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post 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
Hackshed_Carl
Posts: 29
Joined: Mon May 25, 2020 3:22 pm
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post 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
User avatar
Sorgelig
Site Admin
Posts: 511
Joined: Thu May 21, 2020 9:49 pm
Been thanked: 38 times

Re: Remap "Restore" key or cartridge button key?

Unread post 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?
Hackshed_Carl
Posts: 29
Joined: Mon May 25, 2020 3:22 pm
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post 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
mbalmer
Posts: 15
Joined: Wed May 27, 2020 3:08 pm
Has thanked: 3 times

Re: Remap "Restore" key or cartridge button key?

Unread post 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.
User avatar
Juri
Posts: 17
Joined: Sun May 24, 2020 6:49 pm
Has thanked: 8 times
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post 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.
JF
User avatar
yellperil
Posts: 9
Joined: Mon May 25, 2020 2:08 am
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post 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.

https://www.dropbox.com/s/xdr9brpeh1qv0 ... 1.rbf?dl=0
  • [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.
Hackshed_Carl
Posts: 29
Joined: Mon May 25, 2020 3:22 pm
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post 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!!!
mbalmer
Posts: 15
Joined: Wed May 27, 2020 3:08 pm
Has thanked: 3 times

Re: Remap "Restore" key or cartridge button key?

Unread post by mbalmer »

Awesome!! Thanks, yellperil and Sorg!
User avatar
yellperil
Posts: 9
Joined: Mon May 25, 2020 2:08 am
Been thanked: 1 time

Re: Remap "Restore" key or cartridge button key?

Unread post 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?
Post Reply