The Commodore 128 hardware allowed two things that weren't possible on the C64: Moving the 6502 zero page and 6502 stack to another place in RAM besides pages 0 and 1, and switching the CPU and/or the VIC-IIe to access a second block of VIC-II color RAM. As far as I know, moving the zero page would not affect the fact that addresses $0000 and $0001 were mapped to the CPU's built-in I/O port rather than RAM.

Do you know of any software that actually made use of those features? Second question, were they (or either of them) used by the built-in firmware or the included CP/M system in any way?

3 Answers 3


According to COMPUTE!'s, Mapping the Commodore 128, the C128 BASIC firmware makes use of the two color RAM banks to support the "split-screen" graphics modes.

Normally,the 128 uses one block (insert: of color RAM) for character color and the other for multicolor bitmapped mode. This is why GRAPHIC 4 mode (split multicolor bitmapped and text) doesn't cause the conflicts you might otherwise expect. That is, printing on the textscreen doesn't disturb colors on the multicolor bitmapped screen, and drawing on the multicolor bitmapped screen doesn't disturb the colors on the text screen, even though both appear to use the same color RAM.

The same chapter of the book also includes sample code in BASIC 7.0 to demonstrate the use of both blocks of color RAM.

The actual firmware source that implements this is available in the repository mist64/cbmsrc on Github. From the file BASIC_C128/graphic8.src:

lda _6510_data_reg
and #%11111110      ;point cpu at correct nybble bank
sta _6510_data_reg
lda multicolor_2
sta (grapnt),y
sta _6510_data_reg
  • Until now, I hadn't realized that the C128 replaced the 1Kx4 color SRAM with a 2Kx8 SRAM with only half of the data bits wired. I wonder how the price of that SRAM compared with a 16Kx4 DRAM? I think they were pretty similar, and using a 16Kx4 DRAM would have made it possible for the VIC-II chip to support a mixed-res six-color mode by having the VIC-II chip grab four bits from the DRAM with each "shape" byte and use them to select, on a per-pixel-pair basis, whether the two bits of shape data represent two hi-res bits, or a one-of-four color selection.
    – supercat
    Mar 31, 2020 at 16:54
  • DRAM would require refresh circuitry, no? Or is there a guarantee that the entire color ram is accessed frequently enough in all modes? (Standard bitmap Mode?)
    – TLW
    Oct 21, 2022 at 2:25

LUnix uses hardware stack swapping.


  • This answer's a bit short, but it's a valid answer.
    – wizzwizz4
    Apr 2, 2020 at 10:57

C128 MMU default maps page 0 to bank 0, page 0 and page 1 to bank 0, page 1. Access to page 0 and 1 therefore ends up in bank0, even when bank1 is switched in. CPM expects Bank1 for page 0 and 1 therefore during CPM, page0 and 1 are mapped to bank1. You could say it would not matter but in bank0, the MMU maps in the Z80-bootrom when Z80 does a read. So: page remapping is used as standard (in CPM mode)

  • Now that's a surprisingly valid answer.
    – Raffzahn
    Mar 15, 2021 at 21:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .