[Coco] "Reading" non-readable bytes with PEEK vs ZBUG

Darren A. darccml at hotmail.com
Thu Jan 24 19:34:44 EST 2008


 Robert Gault wrote:

> Roger Taylor wrote:
>> 
>> I agree it's normally silly, except for a much needed LOADM approach to 
>> loading stuff into the extended RAM.  Since LOADM always sees 01xxxxxx 
>> for 128k/512k CoCo 3's until someone reports otherwise, the bits are 
>> readable and useable and assumed '01'.  I can't think of any other 
>> reason someone would want to use the bits.  However, there's no danger 
>> if the programmer knows what they're doing and has fully tested what 
>> they're doing.  This is how Sock has given so many impossible demos, by 
>> doing things to the GIME and video registers that some people would say 
>> is "not legal".
>> 
>> 
> 
> Roger, regardless of whether a Coco3 has 128K, 512K, or more memory, 
> when you send $38-$3F to a GIME MMU register you get the same result. If 
> you have only 128 or 512K memory, it does not matter what values you 
> give to the two most significant bits because it won't change anything 
> regardless what you send to these bits on a Store! Those bits are only 
> important with more than 512K RAM when you write to them. They are 
> meaningless on a Read regardless of memory present.
> 
> That means it does not matter in your program what you are doing during 
> a LOADM as long as you don't store a value less than $38 or higher than 
> $3F in an MMU register. Depending on the code in your program, it may 
> not matter whether you only use MMU values of $00-$0F because the net 
> result will can still be the same as long as you don't need the full 
> address of the bytes those MMUs control.
> 
> If you would post the code you are using during the LOADM (or send it by 
> private e-mail) I could show why the results of the survey don't matter. 
> In terms of LOADM, the survey of what can or can't be read from an MMU 
> register has been pointless except for the interesting results caused by 
> "floating" bits in a Coco3 system. By the way, you get the same 
> "incorrect" values with a Paul Barton 8Meg RAM board installed. Just 
> tested that.
> 

--

Robert, I think Roger's point is that the LOADM code in ROM verifies each byte loaded by reading it back from memory after storing it. If the verify fails, LOADM aborts with an I/O error. In the case of the MMU register, if the data loaded from the bin file is $38, it can read back as $78, and the load fails.

This is why I earlier posted the self-patching code that can be inserted at the front of a bin file to modify the operation of LOADM while it is executing.

Darren


_________________________________________________________________
Climb to the top of the charts! Play the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan


More information about the Coco mailing list