12

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?

8

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:

sei
lda _6510_data_reg
pha
and #%11111110      ;point cpu at correct nybble bank
sta _6510_data_reg
lda multicolor_2
sta (grapnt),y
pla
sta _6510_data_reg
cli
| improve this answer | |
  • 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 at 16:54
0

LUnix uses hardware stack swapping.

http://lng.sourceforge.net

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.