I finally managed to finish my switchless kernal, function rom and memory mod.
I build several mods and wanted to be able to switch them on and off.
But I don’t want to drill any holes for switches.
In the Commodore 64 you have a restore key that you can use to switch the kernal on boot/reset, but the Commodore 16 doesn’t have a restore key, so that’s no option.
To solve this problem I used an Arduino Nano.
The Arduino is watching the reset line, when a normal press happens, the Arduino doesn’t do anything, but when there is a double press or the button is held for 2 or 5 seconds the Arduino selects an other kernal, switches between 16kb and 64kb or selects a other function rom.
First we need to disconnect the following chip pins from the mainboard:
Pin14 of U8
Pin2 of U7
These pins are part of the multiplexer that selects the memory address.
In the Commodore 16 they are connected to the 5 volt line, and to select the whole 64K we need to feed the A14 and A15 to these.
In schematics you can see that these address lines are feed through an or port (EU1A and EU1B) the other pin of the or ports are controlled by the Arduino.
When the Arduino drives this line low, the systems has 64k memory, when the line is driven high, the system only sees 16k memory.
Now we take two 27c512 eproms and burn them. The first eprom we fill with the following roms: original basic, original kernal, original basic and jiffydos kernal.
Please keep in mind that there is a difference between PAL and NTSC kernal roms.
the second eprom I fill with 2 function roms (I took the 3in1 function rom and the maverick copy tool function rom).
First add the low part of the function rom, then add the high part of the function rom.
To combine the basic and kernal select lines I use an and gate (EU2B), and feed the basic select signal to the A14 pin of the eprom.
The eprom pins 1,22 and 27 are disconnected from the mainboard and are connected to the and gate and the Arduino.
For the function rom I do the same, but the output of the and gate goes through an or gate (EU1D), this way we can disable the function roms.
The A15 pin (pin 1) of both eproms are connected to the Arduino so we can switch between the rom banks.
The Arduino is also connected to pin 2 of U10, this is the reset line of the Commodore 16.
I use this line to monitor the state of the reset line and to reset the Commodore 16 after a change is made to the configuration.
Last I added a jumper in the 5 volt line connecting the Arduino to the Commodore 16.
When connecting the USB, I remove the jumper so I don’t power the Commodore 16 from the USB port.
Last thing needed is a little program to control the Arduino.
The program still need some tweaking, but should work.
The program listen to the reset line, when it’s pressed normal the C16 is reset.
When it’s hold for 2 seconds, the function rom is changed.
When it’s hold for 5 seconds, memory expansion is turned on or off.
When the button is double pressed, the kernel is changed.