[Coco] Cartridge memory - mapping in and out
jdaggett at gate.net
jdaggett at gate.net
Thu Nov 1 17:11:44 EDT 2007
On 31 Oct 2007 at 20:54, Roger Taylor wrote:
> >Also when accessing DOS I presume that it would switch to using the
> >DOS ROM on the DOS cart for that or did the extra SECB code reside in
> >the $E000-$FEFF area where it would not normally interfere with a
> >copy of the DOS rom in the $C000-$DFFF area ?
> No switching back and forth between ROM and All-RAM mode is done on
> the CoCo 3, as far as I know. I assume on startup that the entire ROM
> space from 32768 to the top of memory is copied into RAM. You should
> be able to patch the disk ROM the same as you can for any of the other
> BASIC ROMs.
The contents of the internal 32K rom are copied to ram on power up or a cold reset.
This is my understand of how the Coco3 reacts when reset is encountered.
When the reset button is pressed or when the Coco3 is turned on the code eventually works
it way to $8C18 of the Extended COlor Basic protion of the ROM. That is the location of the
old DLOAD command code. There the Coco3 is placed in non-Coco compatible mode the
MMU is turned off and the Internal 32K ROM is mapped in.
A brief reminder of the Coco3 memory map and MMU function. When the MMU is disabled
then the MMU task0 registers default to $38 to $3F for registers $FFA0 to $FFA7. This
forces the upper 64Kof the 512/128K map to be in effect. Thus the internal ROM actuall
appears at $78000 to $7FFFF. The Coco3 memory at this time is limited to $70000 to
After the MMU is disabled and Coco compatible mode is disabled the code jumps to
$7C000. There is a few bytes to prepare for copying the ROM to RAM. These include
whether to do a warm restart or a cold restart. If a cold restart then the Color Basic ROM is
coppied to its correspnding RAM from ROM. Then the Extended Color Basic ROM is copied
to its corresponding RAM. This is done 8 bytes at a time by switching the ROM on and off.
Then the internal ROM from $7C03F to $7C36B is copied to $64000 in RAM and execution
goes to there. There the two Basic ROMS are patched. Then the code seeks to see if the
Disk ROM is present. If so it is copied to RAM at $7C000 to $7DFFF. Then that ROM code
is patched. Finally the Super Extended Basic Code is copied to $7E000 to $7FDFF.
Once the ROMs are copied then all execution is from RAM. The internal ROM is no longer
needed expect for the upper 16 bytes where the vectors are located.
One can use the external 32K ROM function but you have to remember that the interanl
RAM which contains the basic code is no longer switched in. Your program in extrernal
ROM will have to jump back an forth to access Coco Basic routines. One method would be
to copy the external 32K rom code to another 32K portion of RAM.
just my thoughts
More information about the Coco