[Coco] Coco3 warm start...

Robert Gault robert.gault at worldnet.att.net
Fri Nov 16 18:31:06 EST 2007


William Astle wrote:
><snip>
> Okay, replying to myself. Tacky I know, but I figured out where I went
> wrong with my analysis.
> 
> After tracing the code in mess, I realized that because the system is in
> ROM mode, when it checks the ordinary Basic reset vectors, it finds
> invalid data there (Disk basic is not present and the Extended Basic ROM
> is set to have $FF at the reset point rather than $12 which gets set
> back by the patching code). Then, after it has finished copying and
> patching the ROM code, it jumps into Basic which then determines that it
> really is a warm start.
 ><snip>

What you have said is true but not relevant for a Coco Disk system.

The first code a Coco3 will run after a reset is at $8C1B. That will 
force 32k internal ROM mode and jump to $C000. That is the Coco3 
initialization routine not the Disk ROM. That code runs until $C0C7 
(actually at $4088) where tests are made for cold or warm start.

The first test is
  lda $feed
  cmpa #$55
which will pass if there is no "run away code" and you just pushed the 
Reset button. The second test at $C0CE (actually at $408F) is
  lda $71
  cmpa #$55
which will also pass if the MMU blocks have not been swapped around. The 
third test at $C0E7 (actually $4095) is
  ldx $72
  lda ,x
  cmpa #$12  or NOP
which will also pass if the MMU blocks have not been changed. The fourth 
test at $C0F1 (actually $409F) is
  clr $ffa0
  lda $71
  cmpa #$55
which will fail unless OS-9 is running or some program that uses MMU 
block-0 and sets the reset flag.

Now the default MMU block $38 is restored, ROM copied to RAM, memory is 
left in RAM mode, and the code jumps to the normal reset vector at $72. 
The code has not yet seen the Extended Basic patch which "is set to have 
$FF at the reset point rather than $12".

If you want, I can send you a trace (generated in MESS) of the code that 
gets run starting at $8C1B.



More information about the Coco mailing list