[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mr. Do?



On Tue, 6 Nov 2012, Hot Rod wrote:

So this is using a variation of The Cloak's Black Bag RWTS (aka BBRWTS; I think I have the source code for this, as we used it for various things.). Yes, $200 is the entry. The part you're likely most interested in though starts at $2AE. This loads the Track, Sector, buffer_hi and sector count values from a small list (in that order) and stores them in the zero page prior to calling the RWTS (whose entry is at $274; the SEEK_ABS is at $3A6).

There are seven sets in the list. The table is a little different, in that all the tracks are listed first, then the sectors, then buffer_hi, and then the counts (rather than in groups of four).

Track $20, sector $0C, buffer $BF00, count #$60
Track $1A, sector $0C, buffer $A500, count #$26
Track $18, sector $06, buffer $A200, count #$03
Track $16, sector $0E, buffer $B400, count #$35
Track $22, sector $0F, buffer $1900, count #$0A
Track $22, sector $05, buffer $1F00, count #$19
Track $18, sector $03, buffer $B400, count #$15

Everything is read in descending order from the starting track/sector/buffer.

$200 is called with the X-reg loaded with which of the seven to load (one-based; it's decremented before use as zero-based with the table). $263 is the prep code for checking which from the list to load.

So if say 20/C BF00 60, then 20/C at BF00, then 20/B at BE00, then 20/A at BD00, then 20/9 at BC00, then 20/8 at BB00, then 20/7 at BA00, then 20/6 at B900, then 20/5 at B800, then 20/4 at B700, then 20/3 at B600, then 20/2 at B500, then 20/1 at B400, then 20/0 at B300, then 19/F at B200, etc., until it has read 96 sectors - and the data is stored in X?

Given this table, I could probably convert the data to files, then write a new loader. (I hope there's enough room to set up a 1K buffer above $0800, as ProDOS needs it...)

-uso.