
A CPU for the Commodore16
26 July 2024
Aselec C64 cartridge
5 September 2024Who could forget the legendary C64 and its countless games that brightened our days back then? If you remember, to load a new game you had to switch the computer off and on again: there was no button to restart without powering the machine down.
In this article we look at three ways to add a reset button to the C64.
USER PORT
| Pin | Name | Description |
|---|---|---|
| 1 | GND | ground |
| 2 | + 5V | +5 VDC (100 mA max) |
| 3 | /RESET | Reset, will force a cold start. Also a reset output for devices. |
| 4 | CNT1 | Counter 1, from CIA #1 |
| 5 | SP1 | Serial Port 1, from CIA #1 |
| 6 | CNT2 | Counter 2, from CIA #2 |
| 7 | SP2 | Serial port 2, from CIA #2 |
| 8 | /PC2 | Handshaking line, from CIA #2 |
| 9 | AT extension | Serial attention in |
| 10 | 9VAC | 9 VAC (+ phase) (100 mA max) |
| 11 | 9VAC | 9 VAC (- phase) (100 mA max) |
| 12 | GND | ground |
| TO | GND | ground |
| b | /FLAG2 | Flags 2 |
| c | PB0 | Date 0 |
| D. | PB1 | Date 1 |
| And | PB2 | Date 2 |
| F. | PB3 | Date 3 |
| H. | PB4 | Date 4 |
| j | PB5 | Date 5 |
| k | PB6 | Date 6 |
| L | PB7 | Date 7 |
| m | PA2 | PA2 |
| No | GND | ground |
For an external connection you need a 24-pin (12+12) edge connector with a 3.96mm pitch
Now all that’s left is to connect a button between pin 1 (GND) and pin 3 (RESET)
As I said, it can be done inside the computer, but to fit the button you either drill the case or come up with an innovative solution, perhaps with the help of a 3D printer.
SERIAL PORT
Another way to reset the C64 is via the IEC port used by the disk drive or printer.
If we connect a 1541 drive or a printer, it will have a second DIN connector for daisy-chaining other peripherals, and the reset can be added to these ports too.
If you’re using a serial peripheral that has no reset button or pass-through connector, this solution can’t be used.
The pinout of the serial port is as follows.
| Pin | Description | Signal direction | Remark |
|---|---|---|---|
| 1 | SERIAL SRQ | IN | Serial Service Request In, at the C128 “Fast Serial Clock” |
| 2 | GND | – | Ground, signal ground (0V) |
| 3 | SERIAL ATN | OUT | Attention, for the selection of a device at beginning/end of a transmission |
| 4 | SERIAL CLK | IN/OUT | Clock (for data transmission) |
| 5 | SERIAL DATA | IN/OUT | Date |
| 6 | SERIAL RESET | OUT(/IN) | Reset, in older VIC-20 unused |
The reset signal is on pin 6 (centre) and GND is on pin 2 (bottom right)
EXPANSION PORT
And here we are at the last solution, via the expansion port, the one used for cartridges, to be clear.
These numerous pins also carry the reset signal, and diagnostic cartridges, crackers or fastloaders often have a button for resetting the machine.
| Pin | signal | Direction (From C64) | Meaning | Remark |
|---|---|---|---|---|
| 1 | GND | PWR extension | ground | Potential is 0V on ground, signal levels are measured relative this, can also be called “common ground”. |
| 2 | +5V DC | PWR extension |
Supply voltage +5V DC |
The maximum load for extensions is 450mA. |
| 3 | ||||
| 4 | _IRQ | In/Out | InterruptRequest | see IRQ . As an output, reflects the status of the IRQ line |
| 5 | R/_W | In/Out | Read or _Write signal | High-level during read cycle, Low-level during write cycle |
| 6 | DOT Clk | Out | Dot clock frequency | 7.881984 MHz for PAL-systems ; 8.181816 MHz for NTSC-systems |
| 7 | _IO1 | Out | Input/Output area 1 indicator | Signal is low if address bus is within $DE00-$DEFF. |
| 8 | _GAME | In | Game configuration | Used for memory re-configuration |
| 9 | _EXROM | In | External ROM | Similar to _GAME. During low the internal RAM in the range of $8000-$9FFF will be switched off and _ROML will be set low, if one of these addresses occur. |
| 10 | _IO2 | Out | Input/Output area 2 indicators | Signal is low if address bus is within $DF00-$DFFF. |
| 11 | _ROML | Out | ROM Low | Low signal if the address range is $8000-$9FFF is switched off with _EXROM and one of these addresses occur on the bus. |
| 12 | B.A | Out | Bus Available | Signal from the video controller, which indicates if the bus is available during high phase of PHI2. BA=0 means VIC needs the bus during both phases of PHI2 and no other unit can use it. |
| 13 | _DMA | In | Direct Memory Access | if _DMA=Low the CPU can be requested to release the bus. It will stop after the next read cycle and all bus lines will go to high resistance state. So other units can use the computer hardware. At _DMA=High the CPU continues to work. |
| 14 | Q7 | In/Out | Data lines 7 | Bit 7 of data bus, value=128 |
| 15 | Q6 | In/Out | Data lines 6 | Bit 6 of data bus, value=64 |
| 16 | Q5 | In/Out | Data lines 5 | Bit 5 of data bus, value=32 |
| 17 | Q4 | In/Out | Datalines 4 | Bit 4 of data bus, value=16 |
| 18 | Q3 | In/Out | Data lines 3 | Bit 3 of data bus, value=8 |
| 19 | Q2 | In/Out | Data lines 2 | Bit 2 of data bus, value=4 |
| 20 | Q1 | In/Out | Data line 1 | Bit 1 of data bus, value=2 |
| 21 | D0 | In/Out | Dataline 0 | Bit 0 of data bus, value=1 |
| 22 | GND | PWR extension |
ground |
(See above) |
| TO | ||||
| b | _ROMH | Out | ROM High | Depending on the status of _GAME and _EXROM this line gets low during access to the address space between $A000-$BFFF respectively $E000-$FFFF. Condition: the internal ram area is faded out. |
| c | _RESET | In | Reset | If this line is pulled to low, all chips will be re-initialized. The program counter of the CPU will be loaded with the reset vector $FFFC and $FFFD (normally $FCE2). |
| D. | _NMI | In | Non-maskable interrupts | see NMI |
| And | PHI2 | Out | Phase 2 clock | System clock (0.98524861 MHz for PAL, 1.02272714 MHz for NTSC) |
| F. | A15 | In/Out | Address line 15 | Bit 15 of address bus value=32768 |
| H. | A14 | In/Out | Address line 14 | Bit 14 of address bus value=16384 |
| j | A13 | In/Out | Address line 13 | Bit 13 of address bus value=8192 |
| k | A12 | In/Out | Address line 12 | Bit 12 of address bus value=4096 |
| L | A11 | In/Out | Address line 11 | Bit 11 of address bus value=2048 |
| m | A10 | In/Out | Address line 10 | Bit 10 of address bus value=1024 |
| No | A9 | In/Out | Address line 9 | Bit 9 of address bus value=512 |
| P. | A8 | In/Out | Address line 8 | Bit 8 of address bus value=256 |
| R | A7 | In/Out | Address line 7 | Bit 7 of address bus value=128 |
| S. | A6 | In/Out | Address line 6 | Bit 6 of address bus value=64 |
| T | A5 | In/Out | Address line 5 | Bit 5 of address bus value=32 |
| u | A4 | In/Out | Address line 4 | Bit 4 of address bus value=16 |
| v | A3 | In/Out | Address line 3 | Bit 3 of address bus value=8 |
| w | A2 | In/Out | Address line 2 | Bit 2 of address bus value=4 |
| x | A1 | In/Out | Address line 1 | Bit 1 of address bus value=2 |
| Y | A0 | In/Out | Address line 0 | Bit 0 of address bus value=1 |
| Z | GND | PWR extension | ground | (See above) |
With the connector seen from the back, we can identify pin C (RESET) and pin A (GND) as the first and third of the bottom row on the right.
Connecting a button between these two pins gives us the usual computer reset.
Unfortunately this connector is female and you need to make a PCB to connect to it without problems. In this case we either make it ourselves the old-fashioned way (pen or photo-etching print and etching), buy a ready-made one, or have it made by our trusted PCB manufacturers. If you like, you can use a PCB from cartridges such as the Magic Desk or similar ones that have a reset button: just solder on the button alone, without the other components, and job done.
*Images and tables taken from Wikipedia
similar posts




