[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MLB Crack: The Conversion
On Thursday, October 18, 2012 6:56:07 PM UTC-5, Hot Rod wrote:
> Hi,
>
> I'm going to be adding a series of posts here describing my most recent retro computing project - a crack of the Micro League Baseball Box Score/Stat Compiler disk.
>
>
>
> ]HR
The Conversion
Getting the sector map was a bit of a warm up to converting the disk. It allowed me to try out the native RWTS and make sure I knew how to run it. The next step was to convert all the 4+4 encoded data sectors into 6+2 encoded sectors and get out to regular disk.
Normally this would be point of using Advanced Demuffin. This is exactly what it’s made to do. The only downside is that in some cases, you have to create a special IOB that avoids colliding with memory Advanced Demuffin uses, which is rare. But, this was one of those rare cases. MLB’s RWTS uses both zero page addresses, as well as sits in the same memory space as Advanced Demuffin. So, I had to decide if I wanted to create a special ‘adapter’ IOB that swapped stuff in and out (plus tweak Adv. Dem. to use ten sectors), or use something else. After weighing the amount of time/work involved with either approach, I opted to not use Advanced Demuffin, but instead just do it semi-manually. Since I already had code to ‘drive’ the RWTS through a sequence of track sectors, all I needed to do was keep the data buffered, and then write it back out to a regular disk. So I chose to modify my first routine, and pair it up with The Inspector for writing the data out to regular disk.
I sketched out the plan as follows:
zpage stuff:
$20: slot num
$22: drive num
$24: current track
$2C: desired track
$2E: desired sector
$34: buff_lo
$35: buff_hi
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 1, 9, 17, 25, 33 ($2, $12, $22, $32, $42 for half tracks)
Init sector num to 80 (sector 0)
Init buff_lo
Init buff_hi (start at $1000)
Enable drive for read
Read track data into $1000-$19FF through $8000-$89FF (so eight tracks)
For disk
Seek track
For each track
Read sector
increment buff_hi
increment sector
if sector <#$8A, repeat
reset sector to #$80
advance buff_hi +6 (to take to next page)
increment track (X2 for half tracks)
if track <#$end_track, repeat ;end_track is next start range
Turn off drive
exit
Use The Inspector to write buffer of sectors out to 16-sector disk
Yes, this is pretty crude. Yes, it could be made much better. But it worked, and the disk data got converted.
At this point I figured great – I’ve got the data, it’s intact as laid out, now I can just ‘wrap’ the engine from the other Black Bag cracks around this and be done. Ah, not so fast…
]HR