Why CHARROM in SRAM?

By Thomas Lövskog
2 min read

Table of Contents

In a recent post, I mentioned that the CHARROM is placed in SRAM in this design. That might sound a bit strange and a risk for a incompatibility.

First reason

I have a non-volatile memory for BLK6/7 where the Kernal ands BASIC resides. In an ordinary VIC 20 this is 2x 8 KByte. In the VIC NX it is 512kByte. Why is that? It is one of the cheaper alternatives. The really small is today quite expensive.

This is broken down into 2 main parts. FLASH memory for the configuration firmware and for Kernal and BASIC. This is driven by a global signal called CMODE (for configuration mode). This in turn comes from the GreenPAK housekeeping circuit. You enter configuration mode by pressing the reset button for more than one second before releasing it. More on that later.

The 256kByte for Kernal and BASIC can then also be divided into a number of 8k banks. These are selected in configuration mode. This is to have different types of BASICS and Kernals.

If I wanted CHARROM in FLASH or EPROM I would need another non-volatile chip. I would still need SRAM for the VIC chip and the decoding logic would be slightly more complicated. By using 16k SRAM (which is what the VIC can address) in one chip, it makes the design somewhat less complicated.

HOWEVER

We need to fill this during power cycle. So when the GreenPAK chip notices a cold start it would shift the system to configuration mode. Where the software loads the CHARROM and performs a ordinary reset. This only happens during power on.

💡
To be accurate. The SRAM for the VIC chip (where BLK0 also resides) is actually a 32kByte SRAM chip. For the same reason as the FLASH memory. 32kBYTE is one of the cheapest available. This also means that the configuration mode has it's own memory totally isolated from the normal mode.

Second reason


By doiung this we can load any font we want into the system, and it will behave just like any other ROM based font. We could actually also make it read/writable and modify it as we go makeing all memory available for program.

We can even put the screen matrix here as well since the CHARROM i 4k in size, but we only need 2k for all 256 characters.

As a design consequence the IO#2/3 can also have SRAM and it is available for the VIC chip as well.

Tagged in:

VIC NX

Last Update: May 11, 2025

About the Author