• October 22, 2024

Notes: Addressing 27C512 EPROM for C64

This tries to explain how to use newer 27C512 EPROMs used with the Commodore 64.

The EPROM chips are programmed with at various memory locations. The one for this post holds up to 512 Kilobits of information (arranged in 64K x 8). The memory location are called out by using a 16 digit binary number. Your typical programming software will show these locations as convenient and short HEX values from 0x0000 to 0xFFFF. Otherwise, the labels on the programming software would be too large… For example, convert the HEX value into binary: 0x2000 = 0010000000000000

The 27C512 EPROM chips have 28 pins. 16 of the pins provide address input (A##) that corresponds to the memory address location – in binary. For example, memory location 0x2000 (HEX) = 0010000000000000 (in binary) -> each 0 or 1 is sent to the pins {A15, A14, A13, A12, … A4, A3, A2, A1, A0}. Align the binary 1’s and 0’s with the address input pin starting from the left to the right – 16 digits for 16 in put pins. The 1’s get high (Vcc) voltage applied to the pin and 0’s get low (Gnd) applied to the pin. The corresponding data is returned on the 8 digital outputs.

The Commodore 64 addresses 13 digits of the binary number (A0 to A12) on Kernel and Basic rom chips. On the cartridges, there is also a Rom High and Rom Low output that is tied to pin A13. That allows for an additional 8K program or higher area to be called. Rom low decodes addresses $8000 – $9FFF and Rom High is for addresses $E000 – $FFFF (or over the memory space that would have been the Kernel). This still leaves A14 and A15 to be manually set on the 27C512.

Also, lower sized EPROMS don’t have the A13, A14 and/or A15 inputs. As they don’t have the higher memory locations physically there to call out. For example the 27C256 does not have the A15 pin input. The 27C128 doesn’t have the A15 or A14 input pins. And, the 27C64 only has 13 inputs (from A0 to A12).

In the case of the cartridges (versaCart and various clones), there are switches or jumpers to select the input state for pin A15 and A14. This is accomplished by pulling the pin high to Vcc or low to Gnd. Since the Commodore 64 is only addressing the first 12 digits is is calling out an 8 K rom area. Then, it uses the Rom High and Rom Low to switch to the second 8 K rom area. This allows the computer to address the first 16 K of EPROM space. It can’t natively manipulate the any address space after 0x6000.

The addition of a digit before a number shifts the read location on the EPROM. It moves the start location by adding a “shift” to the inputs. 27C512 has 4 – 16K locations OR 8 – 8K locations. This is useful for Kernel and Basic rom files – as you can load and select 8 different programs (since these are only 8K) by manipulating A13, A14, and A15. For a cartridge, you can install 8 – 8K programs, or 4 – 16K programs.

When programming the EPROM, simply shift the start address of the file to the corresponding start location. Start location for the first program would be 0x0000, the second would be 16K added to that or 0x8000, and so on…

Hex -> Binary = Input Pins A15, A14, A13, A12 …. A0
0x0000 = 0000 0000 0000 0000
0x4000 = 0100 0000 0000 0000
0x8000 = 1000 0000 0000 0000
0xE000 = 1110 0000 0000 0000

J1
J2
RomH/L
Installed EPROM Rom NumberStart Address
A15
A13
A13
A12
1
1
1
0
Rom 4E000
1
1
0
0
C000
1
0
1
0
Rom 3A000
1
0
0
0
8000
0
1
1
0
Rom 26000
0
1
0
0
4000
0
0
1
0
Rom 12000
0
0
0
0
0000

Side Note on bytes and file sizes:
The C64 rom files / programs are 8192 bytes. When converted to HEX that is 0x2000 bytes. A program would start at 0 and go to 8191 or HEX 0 to 1FFF (remember to start at zero – not one). Since the cartridges are using 16,384 bytes in a program, they run all the way to 0x3FFF.


We have 512 kilobit EPROM. And… things get murky. A kilobit would seem to indicate 1,000 bits in standard kilo notation. Where a byte is then 8 of these bits. Should take 512,000 / 8 = 64,000 bytes. However, the actual amount of data is 8,192 bytes * 8 = 65,536 bytes total. It turns out that in the base 2 system, with 2^10 power is 1024 bits. The 512 is multiplied by 1024 = 524,288 bits / 8 = 65,536 bytes of space. Which matches the sum total file sizes.