<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 12 Feb 1996 19:48:55 +0000 (GMT)
From   : John Sullivan <js10039@...>
Subject: Re: Decoding BBC tapes... 

On Mon, 12 Feb 1996, iain (i.) barker wrote:
> In message "Decoding BBC tapes...", you write:
> > If you *then* want to process the byte stream to get at the file
directly,
> > you could just emulate the beeb's UART with the recovered byte stream
as a
> > data source, and use the OS to decode for you. If you want to do this by
> 
> ... but be aware that many of the protection schemes used on commercial
> software do wierd things such as invert the data bytes, XOR them with some
> other value etc. to ensure that a stardard *load etc. will FAIL with
> CRC errors.  The program loaders hook an event (sorry, I'm trying to
remember
> this but have no docs to hand) so that they can invert the bitstream when
> loading (in a manner similar to a DOS TSR IIRC).

That's interesting - I've never seen *that* before, but it sounds
plausible. A lot of GP's games did away with the OS loader completely, and
just wrote a fairly minimal byte stream to the tape (using a timing
critical encryption/decryption method)

> Elite, FRAK!, Zalaga etc. spring to mind (but you knew that anyway!)
> There are various other ways to compensate for the protection mechanisms,

Are you sure you're not thinking of the OS's built in 'Locked' function? 
If a certain bit is set in the block-header when you save the file, any 
attempt to load the file except by using *RUN would fail with the 
'Locked' error and terminate immediately. The way round this was to hook 
the VSYNC event with a small routine that just cleared the bit in the 
OS's block buffer. Since the header is loaded as the first part of the 
block, but only checked after a full block has been read which takes 
about a second, this was guaranteed to work.

> one example being to intercept the BEEP event so that a BRK is sent
> when the final 'BEEP' occurs after a program successfully loads. That
> way you can use the standard program loader and get control back to
> do a *save etc. (I might still have my asm source to do this somewhere...)

I always preferred to get back to a prompt and do the save by hand. Not
that this is always possible, if the file is 28K and *really* wants to be
loaded at page 3 (by a really nasty zero page loader). Such programs were
usually a real pain to get working off disk anyway, even if you had
perfect copies of the files. 

John

-- 
Go away cat, you make me smile too much.
<a href="http://callisto.girton.cam.ac.uk/users/js10039/">Me!</a>



<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>