Commodore 128D User Manual Page 26

  • Download
  • Add to my manuals
  • Print
  • Page
    / 31
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 25
RAM Configuration Register
Bits Function
7–6 Video RAM bank (03)
5–4 RAM block (03)
3–2 Common RAM selection
00 Common RAM block disabled
01 Common RAM block at bottom of memory
10 Common RAM block at top of memory
11 Common RAM block at both top and bottom
1–0 Size of Common RAM block
00 1 kB
01 4 kB
10 8 kB
11 16 kB
Table 10: The MOS 8722 MMU RAM Configuration Register ($D506)
System Version Register
Bits Description
7–4 Bank version (amount of 64 kB banks)
3–0 MMU chip version
Table 11: The MOS 8722 MMU System Version Register ($D50B)
access all of the memory through two 16-kilobyte windows at $4000 and $8000. However, keep in mind that the page
relocation cannot be used outside bank 0 when the low common memory block has been selected.
If you are working with graphics, switch the character generator ROM off, and you have one restriction less. The
three lowmost bits of the processor’s built-in I/O register (at addresses 0 and 1) have totally different function in the
C128 mode. The lowmost bit, LORAM, selects one of the two color memory banks for the processor. The second bit
from right, HIRAM, selects the color memory bank for the video chip. The CHAREN bit, bit 2, dictates whether the
character generator ROM is mapped to the video chip addresses $1000$1FFF or not.
3.8 Programming in C128 mode BASIC
Due to the complexity of the C128’s operating system, it is very difficult, if not impossible, to utilize the PIA expansion
memory in BASIC 7.0. You have to leave the segments 0 and 3 alone, as they contain system variables, routines to
access different RAM banks, and interrupt vectors. The other segments are not safe either, as the BASIC interpreter
uses all of the RAM bank 1 for BASIC variables. If you switch other RAM blocks to a segment, you will have to
ensure that no BASIC program data or variables occupy any of the address range used by that segment.
For this reason, I did not even try to find out how you could utilize the PIA expansion in the BASIC 7.0. But
you can use the MMU expansion RAM very easily with the built-in BANK command. The new RAM banks have the
numbers 2 and 3.
If you really want to utilize the PIA expanded memory in BASIC 7.0 programs, it is possible by using machine
language subroutines to access the extra memory. Remember to disable the interrupts in your subroutine, as the BASIC
interpreter uses raster interrupts.
4 Programming the expansion in C64 mode BASIC
With BASIC 2.0 the use of the extra memory is a bit limited. In the upmost segment (segment 3) there is operating
system ROM, under which you can place different memory blocks, but reading them with BASIC is naturally impossi-
ble. However, in some cases writing data to this segment partially under Kernal ROM and I/O area may be a working
26
Page view 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31

Comments to this Manuals

No comments