<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 15 Sep 2008 09:12:03 +0100
From   : info@... (Sprow)
Subject: What CPU is in the second processor?

In article <080915025504@...>,
   Jonathan Graham Harston <jgh@...> wrote:
> Which processor, ie, is it a Z80, 6502, ARM, 80x86, 32016, etc?
> see http://mdfs.net/Software/BBCBasic/Z80Basic/Z80TAIL
>
> However, this is failing when the ARM CoPro is plugged in, it's
> hanging when it tries to talk to the CoPro to read a byte from
> &0000FFF4.

At a cursory glance it's because you're violating the timing requirements
for accessing the Tube for reason code 0. You have

  JSR Delay12us
  :
  .Delay12us
  RTS

Which is 6 cycles for JSR and 6 cycles for RTS, on a 2MHz processor this is
only 6us total. You need to sprinkle some NOPs in 

  JSR Delay12us
  :
  .Delay12us
  NOP:NOP:NOP:NOP:NOP:NOP:RTS

which at 2 cycles each gives (6+(6*2)+6)/2 = 12us as required,
Sprow.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>