<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 14 Aug 2000 09:29:12 +0100
From   : "Rich Talbot-Watkins" <Richard_Watkins@...>
Subject: Re: More tape to disc transfer fun: Alien 8

James Fidell <james@...> wrote:

> A couple of mods to get it to work under Linux and the result is below.
> Obviously the way I broke the decoding process was to write duplicate code,
> emulating the way the VIA clocks ran down, doing the self-modification on
> my code and the real code concurrently.  The only particularly awkward issue
> is handling the cycle-stretching that happens when the cpu reads/writes page
> &FE.  These days it all looks unbelievably straightforward, which is a bit
> disappointing given the amount of time I put into this.  Oh well :)
>
> I haven't a clue which of the different versions of the protection
> mechanism this was for, but the principle was the same for all of them.
> I have disk versions of both Knight's Lore and Alien8 that I converted
> from tape sitting here in my copies of my Beeb disks, so it could have been
> one of those or something else entirely.
>
> [code snipped]

Thanks for that, you *do* make it look remarkably straightforward, but having
attempted it myself, I know that it's definitely anything but - particularly
without any documentation on the cycle stretching.  I tried to tackle the
problem the same way, but could never get the instruction timings right for
the complicated stuff like ROL&FE68.  There are still certain things I don't
quite get: why is ROL&FE68 ten cycles in total, while DEC&FE69 is only
apparently four (ROL and DEC have the same timings?) or is it that there are
six cycles between the load and the store for the DEC&FE69 which are
effectively invisible as the updated timer values will work on what was
fetched six cycles previously?  Of course ROL&FE68 doesn't write back to the
timer.  Ahhhh, maybe makes sense...

With this little code fragment, I should be able to get it to run on a Master
at long last....

(On a different note, does anyone know if pcBBC emulates instruction timings
accurately now, in order for code like this to work?  If not, I'm sure Stuart
McConnachie may well find this code very useful too!)

Cheers,
Rich :)
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>