<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 19 Apr 2001 12:51:36 +0100
From   : "Rich Talbot-Watkins" <rich@...>
Subject: Re: Copying BBC games naughty naughty

"Gray, David" <David.Gray@...> wrote:

> so really my *save
>
> should be *save chuckie <load>+<length> <exec>
>
> thus saving from the load adress for a set length of chuckie filled memory
> with a exec adress stuck in on the end.
>
> does that make sense?  i *load a game which loads it at its load adress but
> doesn't execute it  but the *opt1,2 that i typed before loading causes the
> hex information to be displayed
>
> i then save as above thus saving the correct lump of memory with the
correct
> load address and exec address

OK, here's a clarity induced response. :)

What you say is basically fine, but I'd be inclined to override the load
address when you *LOAD the code, just in case it loads into a
Basic-unfriendly place, e.g. the input buffer.

So, force the code to load at (say) &1100:

*OPT1,2
*LOAD Chuckie 1100

This'll bring up information of the form:-

Chuckie    4D  aaaa  bbbb  cccc
   ^       ^
  name   final block

It should be fairly easy to identify which of these fields is which.

The field which we'll call <len> will have a value related to the final block
number.  For a final block of 4D (in this example), the length will be about
4D00, give or take 256 bytes.  Try loading a really small file, and you
should be able to tell fairly easily which field is <len> (it'll be the
smallest one).

That leaves the other two fields which we'll call <load> and <exec>.  In
general, <load> will be the LOWER of these two values, as the execution start
point is quite often somewhere in the middle of the code.

And finally, once you've identified which one is which, you can save the file
back with:

*Save Chuckie 1100 +<len> <exec> <load>

Hope that's of some reasonable help... good luck!
Rich :)
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>