---------Escape from Rungistan--------- A 4am crack 2017-08-26 --------------------------------------- Name: Escape from Rungistan Genre: adventure Year: 1982 Credits: Bob Blauschild Publisher: Sirius Software Platform: Apple ][+ or later Media: single-sided 5.25-inch floppy OS: DOS 3.3 ~ Chapter 0 In Which Various Automated Tools Fail In Interesting Ways COPYA read error on first pass Locksmith Fast Disk Backup unable to read track $03-$22 EDD 4 bit copy (no sync, no count) no errors, but copy loads DOS, swings to high track, then honks and reboots (seriously, it's not a standard beep, it's a custom noise that sounds like a mildly annoyed goose) Copy ][+ nibble editor T00-T02 standard T03-T21 modified address prologue $D5 $AA $F7 T22 is weird, no structure, $F6 and $DE nibbles and not much else --v-- COPY ][ PLUS BIT COPY PROGRAM 8.4 (C) 1982-9 CENTRAL POINT SOFTWARE, INC. --------------------------------------- TRACK: 22 START: 1800 LENGTH: 3DFF 29B8: F6 F6 F6 F6 F6 F6 F6 F6 VIEW 29C0: F6 F6 F6 F6 F6 F6 F6 F6 29C8: F6 F6 F6 F6 F6 F6 F6 F6 29D0: F6 F6 F6 F6 F6 F6 F6 F6 29D8: F6 F6 F6 F6 F6 F6 F6 AA 29E0: D5 D5 BD BD F6 AA D5 D5 29E8: F7 EF DE DE DE DE DE DE 29F0: DE DE DE DE DE DE DE DE 29F8: DE DE DE DE DE DE DE DE --^-- Disk Fixer T00-T02 looks like standard DOS 3.3 T01,S09 -> startup program is "START" ["O" -> "Input/Output Control"] set Address Epilogue to "D5 AA F7" Success! T03-T21 readable! T11 has a DOS 3.3 disk catalog "D" gets me a directory listing: --v-- ------------ DIRECTORY MODE ----------- $03:$0F START $14:$0F LEG2 $15:$0F NNN $16:$0F VOC1 $17:$0F FIRSTF $18:$0F MID8 $19:$0F SECHALF $1A:$0F LATE $1B:$0F PAIN5 $1C:$0F COMPP2 $1D:$0F HINTS $1E:$0F IND1 $1F:$0F INDM $20:$0F IND2 $10:$0F HT $0F:$03 ST $12:$0F HOLD $15:$0C HS $16:$05 HG $1E:$0C SG $1F:$0D HR $20:$0C SR $0F:$01 FPBASIC $1F:$01 APPLESOFT --^-- Why didn't COPYA work? modified address prologue on T03+ Why didn't Locksmith FDB work? ditto Why didn't my EDD copy work? probably a runtime check in late boot Next steps: 1. Convert disk to standard format 2. Patch RWTS to read standard format 3. Disable runtime protection check 4. Declare victory (*) (*) go to the gym ~ Chapter 1 You Can Hear A Lot By Listening Listening to my non-working copy, it sounds like it's loading DOS 3.3 from tracks 2, 1, and 0, then it swings to a high track (maybe that unreadable track $22), then it reboots. It never gets as far as displaying the standard "]" prompt. The original disk does display that prompt eventually; my working theory is that there is a runtime protection check embedded in the bootloader itself. i.e. It never gets as far as running the startup program. A quick inspection in my trusty sector editor confirms that the bootloader is indistinguishable from an unprotected DOS 3.3 disk, up to the point where it jumps to $9D84 to initialize DOS and run the startup program. Thus, a trace program to capture all of DOS in memory: [S6,D1=original disk] [S5,D1=my work disk] ]PR#5 ... ]CALL -151 *9600S6,D2 --^-- And here we go... --v-- ADVANCED DEMUFFIN 1.5 (C) 1983, 2014 ORIGINAL BY THE STACK UPDATES BY 4AM =======PRESS ANY KEY TO CONTINUE======= TRK: ............................... +.5: 0123456789ABCDEF0123456789ABCDEF012 SC0: ............................... SC1: ............................... SC2: ............................... SC3: ............................... SC4: ............................... SC5: ............................... SC6: ............................... SC7: ............................... SC8: ............................... SC9: ............................... SCA: ............................... SCB: ............................... SCC: ............................... SCD: ............................... SCE: ............................... SCF: ............................... ======================================= 16SC $03,$00-$21,$0F BY1.0 S6,D1->S6,D2 --^-- Since tracks 0-2 are unprotected, I used Copy II Plus manual sector copy to copy them. (Not shown; it's under "bit copy" if you're looking for it. Start on track 0, end on track 2.) Now I have a disk that boots but can't read itself (above track 2), because it still thinks that track 3 and above use address prologue $D5 $AA $F7. They don't; that's what I normalized with Advanced Demuffin. On to step 2: patching the RWTS to coerce the disk into reading itself, now that all tracks are in a standard format. I will change the "STA $B96A" to "BIT", which does nothing harmful (but still uses 3 bytes to do it). T00,S0C,$86: 8D -> 2C On to step 3: disable the protection routine. Since there is some required code at $BA69 (replicated from the code at $9D84 that was overwritten), I will put an "RTS" at $BA79 -- which is what the original disk does anyway after the protection check succeeds. T00,S04,$79: 20 -> 60 ]PR#6 ...works... On to step 4... ;-) Quod erat liberandum. --------------------------------------- A 4am crack No. 1386 ------------------EOF------------------