[Coco] "Reading" non-readable bytes with PEEK vs ZBUG
Roger Taylor
operator at coco3.com
Fri Jan 25 22:17:55 EST 2008
At 07:38 AM 1/25/2008, you wrote:
>There is another approach which will be independent of memory but
>not relocated DOS code. Write a Basic program as a LOADM routine for
>your binary program.
>10 A=PEEK(&HC003)
>20 IF A=8 THEN POKE&HD008,&H21 ELSE POKE&HCF2C,&H21
>30 LOADM"ROGER.BIN"
>
>The only sure method would be to LOADM a routine to load the rest of
>your binary without byte verification.
That was my 2nd idea, but I'd let LOADM do that poking. If the BASIC
program assumes those ROM addresses are the same on *all* CoCo 3's,
them LOADM'ing those bytes into the RAM'ed ROM would work just as
well and is the simplest idea.
I'm not sure what approach I'll use but I'm definately for the idea
of self-contained games without requiring other files being readin at
run-time. Since CCASM allows for includebin "file.ext" to include
anything on earth into the codestream, and include "file.asm",
there's potential for power when coupled with writing to the MMU
registers beforehand to stash away those includes before the game code starts.
I like the LOADM patch above probably more than anything else,
assuming that it's compatible with all Disk BASIC variations. If I
have to require DIsk BASIC and a few people are left out, and they
want to play the game bad enough, I'm sure they'll figure something
out, but I'm aiming for across the board compatibility with my scheme
and so far the no-patch/no-hack %01xxxxxx MMU trick seems to be ideal
regardless of how many people seem to be worried about there being
random noise in those bits for certain CoCo's. Testing and time will
tell, I guess.
More information about the Coco
mailing list