<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 14 May 2001 16:08:04 
From   : "C Davies" <davies_@...>
Subject: Re: Loading locked files

You definitely had to unlock whilst loading, as the lock bit was checked on 
every block.  I remember various protection systems changing the load 
address in the information section of every block whilst loading, and other 
similar funky stuff.  This is as close as I can remember for just disabling 
the lock bit -

A little asm routine like this sitting somewhere in memory (page 9 sounds 
familiar) -

  PHP:PHA:LDA&3CA:AND#&FE:STA&3CA:PLA:PLP:RTS

And something like this to get the timer event going -

  !&220=&900
  *FX14,4

I'm sure someone who's played with a BBC more recently will be able to 
correct the exact details....


>From: "Richard Gellman" <r.gellman@...>
>To: <bbc-micro@...>
>Subject: RE: [BBC-Micro] Loading locked files
>Date: Mon, 14 May 2001 16:46:42 +0100
>
> >
> >Quoting Thomas Harte (t.harte@...):
> >
> >> I noticed that some games (Millionaire from Incentive, Karate Combat 
>from
> >> Superior) use an OSFILE command to load a locked file. How come this is
> >> allowed?
> >
> >I don't specifically remember how those two games did it, but I seem to
> >recall that this was usually achieved by installing an interrupt-driven
> >routine which over-wrote the locked bit when the header was read into
> >memory, so the OS would see the file as locked if the loader program 
>wasn't
> >run first.
> >
> >James
>
>I think it's far simpler than that.
>
>According to my BBC Master 128 Reference Manual part 1 (Page H.3-7 if 
>any1's
>interested), OSFILE only has two functions with the tape filing system
>anyway, *SAVE (A=0) and *LOAD (A=255). I would think *LOAD just checks on
>the locked bit after loading, and denies any further action if set.
>
>-- Richard Gellman
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>