[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
While it would be better to dust off Merlin and create some tools in assemb=
ly, I=92ll admit that I=92ve not yet resurrected that skill set (hey, it=92=
s on the list!). And these seemed like such small tasks, that it seemed li=
ke it would just be faster to write them directly as I went. So instead I =
just sketched pseudo-code outlines, and wrote them in machine language (yes=
, machine language =96 not even the built in mini-assembler). It builds ch=
aracter. Anyway, on my work disk are a couple raw routines to accomplish w=
hat I needed to do, but not what I=92d point to as the best way to go. Eve=
n in machine language though, these didn=92t take very long to whip out (fo=
r some reason, I seem to recall 6502 op codes and can write strings of this=
stuff out).
That aside, here=92s what I planned for getting the sector map:
zpage stuff:
$05: map_lo
$06: map_hi
$20: slot num
$22: drive num
$24: current track
$2C: desired track
$2E: desired sector
$34: buff_lo
$35: buff_hi
want to grab:
$30: next track
$32: next sector
$3A: byte count
Routines:
$ACB: enable drive for read
$B6A: seekabs
$9BE: read sector
$AB0: init next track and sector
Plan of Attack:
Init
Init slot num
Init drive num
Init current track to 0 (be sure to locate arm to track 0!)
Init track num to 2 (half tracks - is track 1)
Init sector num to 80 (sector 0)
Init buff_lo (use $C00)
Init buff_hi
Init map_lo (use $2000)
Init map_hi
Enable drive for read
Gather map
For disk =20
Seek track
For each track
Read sector
store next track at map+0 (use $2000 as base)
store next sector at map+1
store byte count at map+2
increment sector
if sector <#$8A, repeat
increment track (X2 for half track)
if track <#$46, repeat
Turn off drive
exit
Then I coded it up in machine language and ran it. It produced output like=
this:
2000- 02 00 FF 00 02 00 FF 00
2008- 02 00 FF 00 02 00 FF 00
2010- 02 85 00 00 02 86 00 00
2018- 02 87 00 00 02 88 00 00
2020- 02 89 00 00 04 00 5E 00
=85 [etc]
Which I then cleaned up to be like:
02 00 FF=09
02 00 FF
02 00 FF=09
02 00 FF
02 85 00=09
02 86 00
02 87 00=09
02 88 00
02 89 00=09
04 00 5E
And then that I tossed into a word processor and converted into a full blow=
n table. This table I then converted into regular track sector notation, s=
o for each track and sector, the =91next=92 track and sector is listed, the=
byte count, and then a comment field as to what the sector contained.
This now gave me a complete view of what was on the disk, and what it was. =
And this was how I figured out that the track sector load table contained =
track/sector lists that didn=92t match the Box Score disk. And that the Bo=
x Score disk contains stuff from the MLB Game disk (but is never accessed).=
And where all the teams are, etc. Good stuff.
]HR