[Coco] CoCo 3 MMU test for all

Roger Taylor operator at coco3.com
Mon Jan 21 15:52:57 EST 2008


At 09:01 AM 1/21/2008, you wrote:
>Roger Taylor wrote:
>><snip>
>>I wanted to avoid patching the LOADM command to handle hardware 
>>port poking since there's so many types of Disk ROMs in use.  LOADM 
>>could be in another location depending on the maker or 
>>version/revision of the ROM.  It's much safer to first see if all 
>>128k/512k CoCo 3's add a %01000000 to MMU reads so I that can 
>>include that value and expect LOADM to verify it back.
>
>This reads like you should first LOADM in a test program to 
>correctly test the amount of RAM present and if adequate then auto 
>LOADM the target program.
>
>You can't determine the amount of memory by reading the MMU 
>registers. You give them values and test memory at the block the MMU 
>register alters.



It's already working as intended without doing any of that, 
actually.   Now that I know that bit #6 of the MMU registers in a 
128k/512k CoCo is always set high (Whether or not it's legal to read 
or use the bit or not, it's there)... I make LOADM store the desired 
block # there + %01000000 and LOADM naturally sees that (extra bit) 
when it verifies the write.  My desired blocks are in the $30-$3F 
range which makes it safe for both 128k/512k.  I don't touch anything 
out of that range if my game is 128k.  :)  Now, if it's a 512k game, 
512k will be *required*.  An automatic VDG title screen would also 
appear telling the user what type of CoCo is required if the game 
uses more than 128k.

I may or may not have to assemble a separate file for 1- and 2-meg 
systems.  Whatever the upper 2 bits are when those people do a 
PEEK(65441) may hold the answer I need.





More information about the Coco mailing list