Back to Projects or Publications

A Small Memory Expansion

September 1990, TwinCities 128, #28
Widen C128 Color Memory from 4 bits to 8 (Hardware -- does not increase colors)

The C64 text screen was 40 columns wide by 25 rows, requiring 1000 bytes. Each character 'cell' needed half a byte -- a 4-bit nybble -- to hold the color information. The C64 used a 1Kx4 Static RAM for color memory. The C128 used a 2016 2Kx8 Static RAM (with the 4 upper bits unused,) for 40-column Color Memory and it became possible to have two color "banks": one for text and one for multi-color bit-mapping. It was also possible to alternate banks in either mode for visual effects. I made the 4 unused bits of color RAM available.

cleaned up scanIn the C128 (as well as the C64,) a CD4066 quad analog switch was used as a bi-directional buffer between the lower 4 bits of color RAM and the CPU buss. The 40-column Video Interface Controller had a separate 4-bit color buss always connected for reading Color memory. Since the 4066 was four analog switches, data could flow in either direction and the state of R/W didn't matter to it, it only had to be enabled -- that is, the switches closed -- when the CPU had control of the address and data busses. (AEC=1) I piggy-backed another 4066 not to the original 4066, but to U27, where data buss bits 4-7 were available at nearby feed-throughs. This made 40-column color memory a full 8 bits wide but did not increase the number of colors.

So why do it?

If only 40-column text or only bit-map was in use, then the "other" 1K was available for very out-of-the-way storage, for short ML routines or data. If the 80-column display was being used, it had its own memory for color and so the full 2K (in 1K banks,) of 40-column color memory was available. Although this seems trivial when compared to the nearly 128K available on the C128, it was a relatively "safe" area -- especially when 80-columns was exclusively in use.

I considered this article a sort of prelude to Expanding the C128.

scan was too messy to clean up

(Not completely redrawn, but C&P'ed from an online C128 schematic then edited in Windows Paint.)

Back to Projects or Publications