-------------Feed The Frog------------- A 4am crack 2015-06-02 --------------------------------------- Name: Feed The Frog Genre: educational Year: 1983 Publisher: McCarthy-McCormack, Inc. Media: single-sided 5.25-inch floppy OS: DOS 3.3 Other versions: none (preserved here for the first time) Similar cracks: Basic Vocabulary Builder Demo (no. 206) PsychDisk (no. 204) Terrapin Logo 1.2 (no. 172) ~ Chapter 0 In Which Various Automated Tools Fail In Interesting Ways COPYA immediate disk read error Locksmith Fast Disk Backup can't read anything beyond T00,S09 EDD 4 bit copy (no sync, no count) no disk errors, but copy just grinds Copy ][+ nibble editor modified address and epilogues "EB AA FF" and "EB AA EB" Disk Fixer can read T00,S00-S09 (looks like a DOS 3.3 RWTS) ["O" -> "Input/Output Control"] set Address Epilogue to "EB AA FF" set Data Epilogue to "EB AA EB" No luck set CHECKSUM ENABLED = NO Higher sectors and tracks readable but seem encrypted/garbled Why didn't COPYA work? modified epilogue bytes Why didn't Locksmith FDB work? ditto Why can't Disk Fixer read the sectors? I don't know. It's possible I misread the raw nibble output in Copy ][+ and got the epilogue bytes wrong. As for the "encrypted" data with checksum turned off, that could be a modified nibble-to-byte translation table or a decryption loop within the RWTS. Or something else altogether. Why didn't my EDD copy work? I don't know. Next steps: 1. capture RWTS with AUTOTRACE 2. convert disk to standard format with Advanced Demuffin 3. patch RWTS to read standard format (if necessary) ~ Chapter 1 In Which We Attempt To Use The Original Disk As A Weapon Against Itself [S6,D1=original disk] [S6,D2=blank disk] [S5,D1=my work disk] ]PR#5 CAPTURING BOOT0 ...reboots slot 6... ...reboots slot 5... SAVING BOOT0 CAPTURING BOOT1 ...reboots slot 6... ...reboots slot 5... SAVING BOOT1 SAVING RWTS ]BRUN ADVANCED DEMUFFIN 1.5 ["5" to switch to slot 5] ["R" to load a new RWTS module] --> At $B8, load "RWTS" from drive 1 ["6" to switch to slot 6] ["C" to convert disk] --v-- ADVANCED DEMUFFIN 1.5 (C) 1983, 2014 ORIGINAL BY THE STACK UPDATES BY 4AM =======PRESS ANY KEY TO CONTINUE======= TRK:R.................................. +.5: 0123456789ABCDEF0123456789ABCDEF012 SC0:R.................................. SC1:R.................................. SC2:R.................................. SC3:R.................................. SC4:R.................................. SC5:R.................................. SC6:R.................................. SC7:R.................................. SC8:R.................................. SC9:R.................................. SCA:................................... SCB:................................... SCC:................................... SCD:................................... SCE:................................... SCF:................................... ======================================= 16SC $00,$00-$22,$0F BY1.0 S6,D1->S6,D2 --^-- Hmm. The disk's own RWTS can't most of track 0, specifically the part loaded during boot that contains the RWTS. I can write that manually to my copy if I need to. ]PR#5 ]CATALOG,S6,D2 C1983 DSR^C#254 001 FREE A 005 HELLO B 009 S11 B 009 S12 B 010 S14 B 011 S13 B 009 S21 B 010 S22 B 009 S23 B 003 S24 B 006 S31 B 004 S32 B 007 S33 B 003 S34 B 006 S41 B 006 S42 B 008 S43 B 007 S44 B 007 S51 B 008 S52 B 006 S53 B 007 S54 B 007 S61 B 012 S63 B 009 S62 B 009 S64 B 009 S71 B 012 S72 B 008 S73 B 007 S74 B 009 S81 B 009 S82 B 010 S83 B 006 S84 B 009 S91 B 009 S92 B 009 S93 B 007 S94 B 010 S101 B 008 S102 B 009 S103 B 005 S104 *B 004 QB *B 002 PUL1 B 002 TS B 016 T B 013 FTF B 017 E B 011 A B 015 I B 015 O B 014 U B 003 CLR B 002 S6 B 002 S7 B 002 S8 B 002 S9 B 002 S10 B 002 S1 B 002 S2 B 002 S3 B 002 S4 B 002 S5 T 002 RANDOM NUMBER B 000 C A 016 TRY B 011 FF B 012 FT *B 002 FLY ]RUN HELLO ...works... ~ Chapter 2 In Which Life Is A Grind And Then You Die Let's write the missing sectors from track 0 to my demuffin'd copy and see if it can boot. ]PR#5 ]CALL -151 ; straightforward multi-sector write ; loop, via the RWTS vector at $03D9 08C0- A9 08 LDA #$08 08C2- A0 E8 LDY #$E8 08C4- 20 D9 03 JSR $03D9 08C7- AC ED 08 LDY $08ED 08CA- 88 DEY 08CB- 10 05 BPL $08D2 08CD- A0 0F LDY #$0F 08CF- CE EC 08 DEC $08EC 08D2- 8C ED 08 STY $08ED 08D5- CE F1 08 DEC $08F1 08D8- CE E1 08 DEC $08E1 08DB- D0 E3 BNE $08C0 08DD- 60 RTS +-- sector count v 08E0- 00 0A 00 00 00 00 00 00 08E8- 01 60 01 00 00 09 FB 08 ^ ^ track --+ +-- sector 08F0- 00 2F 00 00 02 00 FE 60 ^ +-- starting address 08F8- 01 00 00 00 01 EF D8 00 *BSAVE WRITE BOOT1,A$8C0,L$40 *BLOAD BOOT1,A$2600 *8C0G *C600G ...grind grind grind... Hmm. ]PR#5 ]BLOAD RWTS,A$2800 ]CALL -151 *FE89G FE93G ; disconnect DOS *B800<2800.2FFFM ; move RWTS into place *B800L . . nothing unusual, until... . B8DC- A0 20 LDY #$20 B8DE- 88 DEY B8DF- F0 61 BEQ $B942 ; normal "D5" B8E1- BD 8C C0 LDA $C08C,X B8E4- 10 FB BPL $B8E1 B8E6- 49 D5 EOR #$D5 B8E8- D0 F4 BNE $B8DE B8EA- EA NOP ; normal "AA" B8EB- BD 8C C0 LDA $C08C,X B8EE- 10 FB BPL $B8EB B8F0- C9 AA CMP #$AA B8F2- D0 F2 BNE $B8E6 B8F4- EA NOP ; normal "AD" B8F5- BD 8C C0 LDA $C08C,X B8F8- 10 FB BPL $B8F5 B8FA- C9 AD CMP #$AD B8FC- D0 E8 BNE $B8E6 ; wait, what? B8FE- 4C CA BE JMP $BECA There is not supposed to be a jump there. That usually continues into the $BFxx page and ends at $B943. *BECAL ; read another nibble BECA- BD 8C C0 LDA $C08C,X BECD- 10 FB BPL $BECA ; kill some time to get out of sync ; with the "proper" start of nibbles) BECF- BD 8D C0 LDA $C08D,X BED2- EA NOP ; skip over bits that are set (note the ; branch instruction -- it's BMI, not ; the usual BPL) BED3- BD 8C C0 LDA $C08C,X BED6- 30 FB BMI $BED3 ; read another nibble BED8- BD 8C C0 LDA $C08C,X BEDB- 10 FB BPL $BED8 ; this is the usual code at $B8FE BEDD- A9 00 LDA #$00 BEDF- A0 56 LDY #$56 ; continue with RWTS BEE1- 4C 01 B9 JMP $B901 This RWTS expects (but ignores) some extra nibbles after the data field prologue. This explains why my sector editor couldn't read these sectors. But not just that. There need to be timing bits in the right places between the nibbles, otherwise the loop at $BED3 won't skip over the right number of bits, and the disk will be out of phase when the RWTS goes to try to read the sector data. This explains why my EDD bit copy would just grind trying to read itself. It doesn't copy those extra timing bits between the nibbles. Of course, my demuffin'd disk can't make heads of tails of itself, because Advanced Demuffin successfully captured the real sector data from each sector and wrote it out in a standard format. But wait, there's more! If you order right now, you ALSO get... a custom write routine as well! That's right, this RWTS is a true read/write RWTS. In the place where it would normally write out the data field prologue ("D5 AA AD"), I see this instead: *B848L B848- A0 03 LDY #$03 B84A- 48 PHA B84B- 68 PLA B84C- 20 B9 B8 JSR $B8B9 B84F- 88 DEY B850- D0 F8 BNE $B84A B852- 4C B1 BE JMP $BEB1 <-- ! B855- EA NOP B856- EA NOP B857- A9 AA LDA #$AA B859- 20 B8 B8 JSR $B8B8 B85C- A9 AD LDA #$AD B85E- 20 BB B8 JSR $B8BB *BEB1L ; write a custom sequence of bits that ; the routine at $BECA can read BEB1- A0 06 LDY #$06 BEB3- EA NOP BEB4- EA NOP BEB5- B9 DF BC LDA $BCDF,Y BEB8- 9D 8D C0 STA $C08D,X BEBB- 1D 8C C0 ORA $C08C,X BEBE- EA NOP BEBF- EA NOP BEC0- EA NOP BEC1- EA NOP BEC2- A9 FC LDA #$FC BEC4- 88 DEY BEC5- D0 EC BNE $BEB3 ; continue with RWTS BEC7- 4C 5E B8 JMP $B85E Again, this is completely useless now that Advanced Demuffin has converted the disk to a standard format. ~ Chapter 3 In Which We Remove All Traces Of Copy Protection Using An Automated Tool That I Wrote For Just Such An Occasion [S6,D1=demuffin'd copy] [S5,D1=my work disk] ]PR#5 ]BRUN PDP ; remove the JMP instructions and ; restore the original code for reading ; and writing the data field prologue T00,S02,$49 change 03 to 04 T00,S02,$52 change 4CB1BEEAEA to A9D520 B8B8 T00,S02,$5F change BB to B8 T00,S02,$F4 change EABD8CC010FBC9ADD0E8 4CCABE to A056BD8CC010FBC9ADD0E7A900 ; restore original epilogue byte checks T00,S03,$91 change EB to DE T00,S03,$35 change EB to DE T00,S02,$9E change EB to DE Quod erat liberandum. --------------------------------------- A 4am crack No. 327 ------------------EOF------------------