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

MLB Crack: Enter - Black Bag



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

Enter – Black Bag

I suppose this would be a great spot to include some backstory on Black Bag and the like, but I’m not.  Maybe another time – this is already way too long.  :)

Now, for some reason I had assumed that any normal crack would have kept the stuff the way it was, and just spliced in a 16-sector RWTS with as minimal intrusion as possible (far less work that way).  But, I didn’t take into account that the cracks from which I wanted to borrow were done back in the 80’s, by The Cloak/Black Bag, when disks cost money, space was at a premium, and there was a certain point to be made about making things as space efficient and usable as possible.  Several BB cracks from the period allow additional files to be stored on freed up disk space, co-resident with cracked programs needing full disk copiers to be used.  And the series of MLB cracks were no exception.  Ugh.

So at this point I had to make a decision. I could either forge ahead and make the Box Score crack compatible with the other Black Bag cracks, create a singular crack of the Box Score disk with minimal change/effort, or re-crack the rest of the series to build a new set compatible with a minimal change/effort crack of the Box Score disk.  Double ugh.  Creating a singular crack of the Box Score disk made no sense, because it wouldn’t be able to work with any of the other disks, and the Play game option wouldn’t be able to work either.  I considered re-cracking the whole series (game disk, GM disk, Team disks), but I didn’t have .nib images of the Team disks to work from, and to do the whole series I really would have to write a re-usable conversion tool instead of the one-time manual conversion I did.

And since I’d been in Black Bag, it seemed kind of weird that things had come full circle back to this point, so I thought maybe I’d better round out the MLB set with one more BB crack.  And that’s the path I picked.

The only problem that presented was now I had to reverse engineer The Cloak’s cracks, not only to lift the RWTS and loader, but to make the Box Score disk compatible with the others (since the other disks were already compatible among themselves).

The Cloak of course had taken advantage of having 16-sector tracks, and so had done some fairly significant re-arranging of the data layout as a result.  And had re-wired the original program code to make use of the replacement RWTS.  So I had to sort all that out and adapt the Box Score disk to it.  But, not horribly complicated, and after studying it a bit, I could see the way forward.

Here’s an overview of/notes on The Cloak’s take on the MLB cracks (based on the GM disk; game disk is similar).

For boot:
T0S0 loads to $800
T0S5 loads to $900 [new RTS]
T0S6 loads to $A00 [new RTS]
T0S7 loads to $B00 (copies to $300)
T0S8 loads to $C00 (next four sectors are the text title page and get copied to $400-$7FF) 
T0S9 loads to $D00
T0sA loads to $E00
T0SB loads to $F00
T0SC loads to $1000 [these are the disk write routines]
T0SD loads to $1100 
T0SE loads to $1200 
T0SF is empty (BB)

$801 boot0 loads track $00, sectors $05 to $0E into $900 through $12FF (descending). Uses the ROM routine to do this.

$860 copies $B00-$FFF to $300-$7FF
then copies $1000-$12FF to $2100-$23FF [this is where the disk write routines land for the GM disk]
then continues at $A50

$A50 sets up a 6+2 translate table at $856 (routine copied from ROM routine)
$A6F calls $913 with index 0, then calls with index 1, then jumps to program.
$A48 contains the track/sector/buffer load table

$AD1 has routine to spread "Black Bag" on text screen and then reboot.

$AF0 has routine to store #$BB at $3B00-$3BDA. This is called from within program as a replacement routine to clear buffer.

$913 takes A-reg as input, x4, then loads track into $2C, sector into $2E, target buffer_hi into $34 and sector/page count into $35.  Uses descending buffer addresses. Assumes 16-sector format.

$974 had call to ROM WAIT routine at $FCA8, but since Box Score needs to load into AUX RAM, need ROM switched out. Copied ROM code to $AF0 and redirected call instead (Box Score only).

Routine at $A2E in BB RWTS has a check for value #$BB that will skip copying into target buffer.  The intent of this is to skip #$BB pad bytes at end of sectors. [What was really spooky about finding this is that before discovering this, when I had converted the Box Score disk, I initialized the buffer memory to #$BB. This resulted in the new 16-sector disk having #$BB as pad bytes already.  It was our custom to use #$BB a lot, and I guess that old habit stuck.  But wow.]

Teams roster is on Track $1E, sectors 0 and 1

Team Reserve List pointer is on Track $1E, sector 2; this points to track $00, sector $04; list is track $00, sectors $01-$04

Track $1E, sector $03 to track $22, sector $0F is empty.

Teams are on Track $16, sector $00 through Track $1D, sector $0F.  Teams occupy four sectors each, 32 teams total.

Armed with this info, I now could start the process of converting the conversion to “BB style”. 

]HR