[Coco] Nitros9 wd1773 boot code

Gene Heskett gheskett at wdtv.com
Sat Jul 13 23:06:22 EDT 2013


On Saturday 13 July 2013 22:59:31 Robert Gault did opine:

> Matthew D Stock wrote:
> > I'm making a lot of progress on my wd1773 emulation, but I'm still
> > having problems with the nitros9 boot disks.  After looking at the
> > source code in boot_1773.asm, I have a question I'm hoping someone
> > can answer.
> > 
> > The issue is how the sector reads synchronize.  In the DECB ROM, there
> > is a tight loop that waits for the DRQ bit in the status register to
> > be high, and then it goes into the tight loop (with halt enabled)
> > that we all know and love. My code works fine there.
> > 
> > In the Nitros9 sector read code however, it looks like it relies on
> > some inherent timing and dispenses with the first status bit check
> > entirely. In fact, it looks like the code was there and someone
> > commented it out (see below).  My questions are: why was this sync
> > eliminated, and is there some known delay or (better) way to
> > synchronize that I haven't seen?
> > 
> > The code in question is pasted below.  Any help would be greatly
> > appreciated. Thanks,
> > 
> >    -Matt
> > 
> > L0107     stb   CONTROL,y
> > 
> >                  lbsr  Delay2        delay 54~
> >                  orb   #HALTENA        HALT enable ($80)
> > 
> > *              lda   #%00000010    RESTORE cmd ($02)
> > *L0111   bita  >DPort+STATREG
> > *              bne   L0123
> > *              leay  -$01,y
> > *              bne   L0111
> > *              lda   drvsel,u
> > *              sta   >DPort+CONTROL
> > *              puls  y
> > *              bra   L0138
> > 
> >                  stb   CONTROL,y
> >                  nop
> >                  nop
> > 
> > *              bra   L0123
> > 
> >                  ldx   ,s            get X saved earlier
> > 
> > * Sector READ Loop
> > L0123     lda   DATAREG,y    read from WD DATA register
> > 
> >                  sta   ,x+
> > 
> > *              stb   >DPort+CONTROL
> > 
> >                  nop
> >                  bra   L0123
> 
> If you look at the rb1773.asm code in the level1/modules directory you
> will find comments about this section. There had been a problem (BLOB)
> with booting named the Boot List Order Bug. You ought to be able to
> read about it somewhere on RTSI. People used to think that you had to
> rearrange the module order but someone found that the code above was
> bad. The is no need to continuously send code to the controller in loop
> L123. The code around L0111 is not needed.
 
The BLOB?  AFAIK This code has zero to do with that Robert, it was a one 
command fix in the all the clock modules (which contains the IRQ detection 
and service discovery routines) to properly re-enable the GIME's response 
to an IRQ after servicing a previous one.  You can read the rational about 
that in the blobstop files, should be on rtsi, and in the texts of 
BlobStop.lzh on my site, link in sig.
 
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco


Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
My views 
<http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml>
BOFH excuse #337:

the butane lighter causes the pincushioning
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.



More information about the Coco mailing list