Saturday, 9 September 2017

Commodore 64 Cartridge Cases and PCBs

You may have seen there are some new Commodore 64 cartridges cases appearing from The Future was 8 bit.
These are shorter than the traditional Commodore 64 cartridge, so these new cases are referred to as 'Stumpy'.
The boards inside many of the Commodore cartridges did not make use of the larger size case anyway, as the PCB only contained a single ROM chip.
The first use of these was replacing the case for the Epyx Fastload Reloaded cartridges.
You can see the smaller case is still large enough to read the label and to grip onto to remove it from the C64.
But you can now buy an empty cases with a PCB to make your own cartridges. The photos in here show a few revisions of the PCB, but all are effectively the same.
The ROM or EPROM chip used can be anything from a 27C64 with a single 8K ROM image, up to a 27C512 with 8 different images on that can be selected using links on the PCB.
In most cases, just copy the 8K ROM image into the top 8K of whatever ROM chip you are using and leave the links in their default configuration of all wired to 5V (see the thin PCB tracks making that connection). If you want a bit more information, see below.
There is not quite space in the cartridge to install an IC socket, due to the dimensions of the Commodore 64 cartridge slot, so EPROMs need to be soldered directly to the board.
If you are planning to make several of these, I found it useful to get an extra PCB (these are available separately) and fit a socket and some jumpers to test things out before committing to soldering.
As a side note, we did try an option of using extra large holes, to allow a turned pin socket to partly sink into the board. This did work, you can see the socket in the top is now sitting flush with the board, with more of the pins sticking through. The production boards have normal sized holes, so the ROM chips will need to be soldered in place.
There is space on the left to fit a 100nF through hole axial ceramic decoupling capacitor, on the latest PCB, you can alternatively fit a surface mount 1206 capacitor if you prefer.
The other jumpers on the board set when and where the ROM image will appear in the Commodore 64 memory map. As with the address jumpers, these are pre-wired. If you want to change these, or fit jumpers, you need to carefully scratch the existing connections between the pins, and solder a wire link between the pins you want to connect.
The latest PCB design moves these jumpers to the top right, and separates Game and ExROM, but the function is the same.
Game and ExROM both set flags that the Commodore 64 reads to determine how to deal with the cartridge. Normally one or the other is set. The CS jumper selects if the ROM will use the ROM_L or the ROM_H select line. The table below shows the memory map of the Commodore 64, and where the ROM chips live. The entries in brackets indicate where an optional second 8K ROM could go.

Address range
Normal Mode
Game
Ultimax
C128
F000-FFFF
Kernal ROM
Kernal ROM
ROM_H
Kernal ROM
E000-EFFF
D000-DFFF
IO / Char ROM
IO / Char ROM
IO / Char ROM
IO / Char ROM
C000-CFFF
-
-
-
-
B000-BFFF
BASIC ROM
(ROM_H)
-
ROM_L
A000-AFFF
-
9000-9FFF
-
ROM_L
(ROM_L)
8000-8FFF
-
7000-7FFF
-
-
-
-
6000-6FFF
-
-
-
-
5000-5FFF
-
-
-
-
4000-4FFF
-
-
-
-
3000-3FFF
-
-
-
2000-2FFF
-
-
-
-
1000-1FFF
-
-
-
-
0000-0FFF
-
-
-
-

Here are some example configurations.

Normal 8K Cartridge 

This is mode is used for many games, and the Commodore 64 Diagnostic cartridge. Here the link to Game needs to be cut and the link connected to ExROM. The CS link is on ROM_L, so the ROM is located in the address range 8000-9FFF.

UltiMax 8K Cartridge

This is used for older games designed for the Commodore Max console and for low level utilities such as the Dead Test cartridge. Here Game is linked and ExROM is open. The CS link is changed to ROM_H, so the ROM is located in the address range F000-FFFF, where it replaces the Kernal ROM.

Commodore 128 Cartridges

The Commodore 128 has a mode where both GAME and ExROM are open, and CS uses ROM_L. The ROM is mapped into a 16K block (although this cartridge will present the 8K ROM image at 8000-9FFF, mirrored at A000-BFFF).

ROM Address Selection

Normally, just write the 8K ROM image to the top 8K of the ROM chip. If you are using a .crt file, remember to remove the header to just leave the 8K of raw binary data. If you are using a 4K ROM image, either double it up to fill 8K, or place it in the first half of the 8K block.
All the supported EPROM types have 25 pins wired identically and 3 pins with some differences. It is these three pins which are wired to the jumpers. They are labelled using the designations from a 27C512 EPROM.

Jumper
Pin
27C64
28C64
27C128
27C256
28C256
27C512
A15
1
VPP
NC
VPP
VPP
A14
A15
A14
27
PGM
WE
PGM
A14
WE
A14
A13
26
NC
NC
A13
A13
A13
A13

If you use a chip larger than a 27C64, you can place multiple 8K ROM images in there, and select the appropriate one using the jumpers. This table shows the jumper settings which should be used to select the ROM image. Entries in brackets indicate duplicates due to not connected pins. '-' indicates do not use.

A15
A14
A13
27C64
28C64
27C128
27C256
28C256
27C512
0
0
0
-
-
-
-
-
ROM 1
0
0
1
-
-
-
-
-
ROM 2
0
1
0
-
(ROM 1)
-
-
ROM 1
ROM 3
0
1
1
-
(ROM 1)
-
-
ROM 2
ROM 4
1
0
0
-
-
-
ROM 1
-
ROM 5
1
0
1
-
-
-
ROM 2
-
ROM 6
1
1
0
(ROM 1)
(ROM 1)
ROM 1
ROM 3
ROM 3
ROM 7
1
1
1
ROM 1
ROM 1
ROM 2
ROM 4
ROM 4
ROM 8


If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.