<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 05 May 2000 03:50:48 -0700 (PDT)
From   : Alex De Vries <alexdevries@...>
Subject: Re: Is there a gap between header & data on tapes?

Hi,

I don't believe that there is a gap between the header
and the data.

I don't know what causes the error in your emulator.

Aur you calculating the CRC correctly? The CRC that
follows after the header covers only the header
(without the synchronisation
byte) and not the data that follows.
So there could be an error in your CRC routine or
maybe in your header handling. The data block has
it's own crc that comes after the data. The tape
format is explained in the BBC advanced
user guide that you can find at the BBC documentation
project. I'm not sure if it's also
in the Electron AUG.

I myself have a rather simple cassette emulation in my
own Electron emulator that I'm
developing. When in address &fe07 the motor is on, and
cassette input mode is selected,
the high tone interrupt will signal.

Then, the emulator will start reading from &fe04
(cassette shift register). The first
time it does that, I enable the receive interrupt. I
leave it on until the end
of the block is reached. When the last byte of the
block is read (low byte of the crc)
I clear the receive interrupt.

This probably isn't very accurate, but it works very
well. But even if you want accurate
emulation, this could be a way to start.

Regards,

Alex de Vries.


--- Thomas Harte <t.harte@...> wrote:
> The subject more or less says it all!
> 
> I only ask because my Electron emulator now loads
> tapes as far as reading
> until the end of the header, but then switches off
> the related tape data
> detection interrupts for the equivalent of one byte
> of data (approx 16ms),
> before enabling them again and displaying the
> 'data?' error having missed a
> byte. Presumably it is taking a moment to calculate
> and check the CRC, but
> I'm at a loss as to why it then misses a byte of
> data, and how it can be so
> sure that it did almost instantly.
> 
> My assumption is that either there is a gap, or else
> I am still handling
> interrupts not quite correctly, can anyone confirm
> or deny the first option?
> 
> -Thomas
> 
> 
> 
> 
> 
>
_______________________________________________________
> Get 100% FREE Internet Access powered by Excite
> Visit http://freelane.excite.com/freeisp
> 
> 

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>