C64 keyboard - reading the Restore key?

Caution: Non registered users only see threads and messages in the currently selected language, which is determined by their browser. Please create an account and log in to see all content by default. This is a limitation of the forum software.


Also users that are not logged in can not create new threads. This is a, unfortunately needed, counter measure against spam. Please create an account and log in to start new threads.

Don't Panic. Please wash hands.
  • I have the MinimigAGA core to the point where it can read the C64 keyboard and emit suitable Amiga rawkey codes to the Minimig. The chameleon_c64_joykeyb entity doesn't make any attempt to read the Restore key on the C64. What would I need to do to read this key? Or is it just more trouble than it's worth?

  • The RESTORE key is directly connected to the NMI pin of the 6510 in a C64... it can't be "read" in the classic sense. The only way would be checking the NMI line. No idea how practical that is for other cores :)

  • The RESTORE key is directly connected to the NMI pin of the 6510 in a C64... it can't be "read" in the classic sense. The only way would be checking the NMI line. No idea how practical that is for other cores :)

    Well the Chameleon V2 toplevel entity has an nmi_in signal, but watching it using signaltap on my C64C, it seems to remain high whatever the state of the restore key.

    Looking at schematics, it looks like the restore key was "directly" connected to the NMI signal in the breadbin machines (with a 555 timer and buffer in between) - but on the C64C the Restore key is connected to the 251715 / 252535 which then emits the NMI signal. So I guess for some reason that's not happening?


    (Run stop - Restore works fine within the Chameleon core.)

  • The 251715 / 252535 probably just has a similar delay logic, so that doesnt matter.


    (Now the following is just guessing)


    The NMI is edge triggered (rather than level triggered like IRQ), and can be inhibited by not acknowledging it - eg after CIA2 triggered an NMI. In that case pressing RESTORE "does nothing". I dont know how that io entity does it, but since it needs to read and write the CIA1 (to read the joystick and keyboard), perhaps this is what happens? You could try doing a "read access" on the C64 bus to $dd0d, that will acknowledge the NMI.


    @pwsoft is on vacation atm unfortunately, he should be able to tell :)

  • Did somebody rub my lamp?


    The restore key is on the chameleon_io entity and is available in docking-station mode, the signal is called "restore_key_n". In cartridge mode you indeed need to observe the NMI signal (and hope the user hits the key rather hard ;-).

  • Did somebody rub my lamp?


    The restore key is on the chameleon_io entity and is available in docking-station mode, the signal is called "restore_key_n". In cartridge mode you indeed need to observe the NMI signal (and hope the user hits the key rather hard ;-).

    Thanks for the confirmation.

    Anyhow, I've just figured out the source of my confusion: the real C64's restore key creates a rather brief pulse (presumably that's what the 555 timer is for), so you can only detect key down events, not key up events.

  • The last reply was more than 365 days ago, this thread is most likely obsolete. It is recommended to create a new thread instead.