Next: C500 data module, Previous: PET memory module, Up: Module formats [Contents][Index]

#### 9.2.2.19 CBM-II memory module

The CBM-II memory module actually consists of two modules. The "CBM2MEM" module is mandatory and contains the RAM dump. The "CBM2ROM" module is optional and contains a dump of the ROM images.

The size of the CBM-II memory modules differs with each different memory configuration. The RAM configuration is saved in the snapshot, and restored when the snapshot is loaded.

Version numbers: Major 1, Minor 0

The CBM2MEM module

Type | Name | Description
UBYTE | MEMSIZE | Memory size in 128KiB blocks (1=128KiB, 2=256KiB, 4=512KiB, 8=1024KiB)
UBYTE | CONFIG | Bit 0 = $f0800-$f0fff RAM, Bit 1 = $f1000-$f1fff RAM, Bit 2 = $f2000-$f3fff RAM, Bit 3 = $f4000-$f5fff RAM, Bit 4 = $f6000-$f7fff RAM, Bit 5 = $fc000-$fcfff RAM, Bit 6 = is a C500
UBYTE | HWCONFIG | Bit 0/1: model line configuration
UBYTE | EXECBANK | CPUs execution bank register
UBYTE | INDBANK | CPUs indirection bank register
ARRAY | SYSRAM | 2KiB system RAM $f0000-$f07ff
ARRAY | VIDEO | 2KiB video RAM $fd000-$fd7ff
ARRAY | RAM | RAM dump, size according to MEMSIZE
ARRAY | RAM08 | if memsize < 1MiB and CONFIG & 1 : 2KiB RAM $f0800-$f0fff
ARRAY | RAM1 | if memsize < 1MiB and CONFIG & 2 : 4KiB RAM $f1000-$f1fff
ARRAY | RAM2 | if memsize < 1MiB and CONFIG & 4 : 8KiB RAM $f2000-$f3fff
ARRAY | RAM4 | if memsize < 1MiB and CONFIG & 8 : 8KiB RAM $f4000-$f5fff
ARRAY | RAM6 | if memsize < 1MiB and CONFIG & 16 : 8KiB RAM $f6000-$f7fff
ARRAY | RAMC | if memsize < 1MiB and CONFIG & 32 : 4KiB RAM $fc000-$fcfff

The RAM* arrays are only saved if the RAM itself is less than 1MiB. If the memory size is 1MiB then those areas are taken from the bank 15 area of the normal RAM.

The memory array starts at $10000 if the memory size is less than 512KiB, or at $00000 if 512KiB or more. In case of a C510, then the memory array also always starts at $00000.

The CBM2ROM module

Type | Name | Description
UBYTE | CONFIG | Bit 1: 1= $1*** ROM image included. Bit 2: 1= $2000-$3fff ROM image included. Bit 3: 1= $4000-$5fff ROM image included. Bit 4: 1= $6000-$7fff ROM image included. Bit 5: 1= chargen ROM is VIC-II chargen, 0= CRTC chargen.
ARRAY | KERNAL | 8 KERNAL ROM image ($e000-$efff)
ARRAY | BASIC | BASIC ROM image ($8000-$bfff)
ARRAY | CHARGEN | 4KiB CHARGEN ROM image
ARRAY | ROM1 | 4KiB cartridge ROM image for $1*** (if CONFIG & 2)
ARRAY | ROM2 | 8KiB cartridge ROM image for $2000-$3fff (if CONFIG & 4)
ARRAY | ROM4 | 8KiB cartridge ROM image for $4000-$5fff (if CONFIG & 8)
ARRAY | ROM6 | 8KiB cartridge ROM image for $6000-$7fff (if CONFIG & 16)

Next: C500 data module, Previous: PET memory module, Up: Module formats [Contents][Index]