--------------Microzine 2-------------- A 4am crack 2015-10-25 --------------------------------------- Name: Microzine vol. 1, no. 2 Genre: educational Year: 1983 Publisher: Scholastic, Inc. Media: double-sided 5.25-inch floppy OS: DOS 3.3 with custom bootloader Previous cracks: none Similar cracks: #464 Microzine 4 #409 Microzine 5 #332 Microzine 3 #331 Jumble Jet Both sides are bootable to the main menu. I'll start with side A. ~ Chapter 0 In Which Various Automated Tools Fail In Interesting Ways What does the boot look and sound like? 1. immediate blank screen 2. several sequential track reads 3. track seek (maybe to T11?) 4. HGR-style screen clear 5. more disk activity (back and forth like file access) 6. title screen Does it access the disk after boot? Yes, repeatedly. Does it have an option to read, write, or format user-supplied data disks? Yes. COPYA immediate disk read error Locksmith Fast Disk Backup errors on tracks $00-$04, but $05-$22 copy OK (of course the copy does not boot) EDD 4 bit copy (no sync, no count) no read errors, but copy hangs after reading one track Copy ][+ nibble editor T00 -> standard prologues, modified epilogues (FF FF EB) T01 -> corrupted address fields that claim to be track $00 T02..T03 -> not full tracks? looks like they have some standard-ish sectors, but not 16 per track (also corrupted address fields) T04..T22 -> standard prologues, modified epilogues (FF FF EB), standard address fields --v-- COPY ][ PLUS BIT COPY PROGRAM 8.4 (C) 1982-9 CENTRAL POINT SOFTWARE, INC. --------------------------------------- TRACK: 01 START: 2735 LENGTH: 185A ^^ 2710: FF FF FF FF FF FF FF FF VIEW 2718: FF FF FF FF FF FF FF FF 2720: FF FF FF FF FF FF FF FF 2728: FF FF FF FF FF FF FF FF 2730: FF FF FF FF FF D5 AA 96 <-2735 ^^^^^^^^ address prologue 2738: AA AA AA AA AA AA AA AA ^^^^^ ^^^^^ ^^^^^ ^^^^^ V000 T00 S00 chksm 2740: FF FF FF FF FC FF FF FF ^^^^^^^^ address epilogue 2748: FF D5 AA AD F2 FA D7 D7 ^^^^^^^^ data prologue 2750: A6 BE FE F7 FB EC 97 B9 --------------------------------------- A TO ANALYZE DATA ESC TO QUIT ? FOR HELP SCREEN / CHANGE PARMS Q FOR NEXT TRACK SPACE TO RE-READ --^-- The disk is lying to me. The address field claims to be track $00, but it's really track $01. Bad disk! Stop lying! Disk Fixer ["O" -> "Input/Output Control"] set Address Epilogue to "FF FF EB" set Data Epilogue to "FF FF EB" T00 readable T01..T04 unreadable (no option to ignore the corrupted address field) T05..T22 readable T11 looks like DOS 3.3 catalog Copy ][+ sector editor ["P" -> "Sector Editor Patcher"] set type to "CUSTOM" set Address Epilogue to "FF FF" set Data Epilogue to "FF FF EB" T00 readable ["P" -> "Sector Editor Patcher"] set CHECK TRACK to "NO" T01 readable! only parts of T03 and T04 readable: T03: S03,04,05,06,07,0A,0B,0C,0D,0E T04: S01,02,04,08,09,0C,0F Why didn't COPYA work? modified epilogue bytes on track $00 Why didn't Locksmith FDB work? ditto Why didn't my EDD copy work? I don't know. Lots of weirdness going on in tracks $01-$04, though. Next steps: 1. Trace the boot 2. ??? ~ Chapter 1 Boot Trace and Chill [S6,D1=original disk] [S5,D1=my work disk] ]PR#5 CAPTURING BOOT0 ...reboots slot 6... ...reboots slot 5... SAVING BOOT0 ]CALL -151 *800<2800.28FFM *801L ; set reset vector 0801- 8A TXA 0802- 4A LSR 0803- 4A LSR 0804- 4A LSR 0805- 4A LSR 0806- 09 C0 ORA #$C0 0808- 85 3F STA $3F 080A- 8D F3 03 STA $03F3 080D- 49 A5 EOR #$A5 080F- 8D F4 03 STA $03F4 0812- A9 00 LDA #$00 0814- 8D F2 03 STA $03F2 ; hmm 0817- A9 04 LDA #$04 0819- 48 PHA ; machine initialization (memory banks, ; TEXT, IN#0, PR#0, &c.) 081A- 8D 81 C0 STA $C081 081D- 20 2F FB JSR $FB2F 0820- 8D 52 C0 STA $C052 0823- 20 89 FE JSR $FE89 0826- 20 93 FE JSR $FE93 ; clear hi-res screen 1 0829- A2 20 LDX #$20 082B- A0 00 LDY #$00 082D- 84 06 STY $06 082F- A9 20 LDA #$20 0831- 85 07 STA $07 0833- 98 TYA 0834- 91 06 STA ($06),Y 0836- C8 INY 0837- D0 FB BNE $0834 0839- E6 07 INC $07 083B- CA DEX 083C- D0 F6 BNE $0834 ; switch to hi-res screen 1 (blank) 083E- 8D 57 C0 STA $C057 0841- 8D 50 C0 STA $C050 0844- 8D 54 C0 STA $C054 0847- 8D 52 C0 STA $C052 ; set up ($3E) vector to point to the ; sector read routine in the disk ; controller ROM 084A- A9 5C LDA #$5C 084C- 85 3E STA $3E ; the disk controller ROM always exits ; via $0801, so set that to an RTS so ; we can JSR and not have to set up a ; loop 084E- A9 60 LDA #$60 0850- 8D 01 08 STA $0801 ; hmm 0853- A9 72 LDA #$72 0855- 48 PHA OK, we've now pushed $04/$72 on the stack. That's probably important. ; multi-sector read ; Y = start logical sector ($01) ; X = end logical sector ($03) ; A = start address high byte ($1D) 0856- A0 00 LDY #$00 0858- 84 FC STY $FC 085A- C8 INY 085B- A9 9D LDA #$1D 085D- A2 05 LDX #$03 ; multi-sector read routine 085F- 20 6C 08 JSR $086C ; another sector read, 3 more sectors ; ($04..$06) into $9D00..$9DFF 0862- A9 9D LDA #$9D 0864- A2 06 LDX #$06 0866- 20 6C 08 JSR $086C ; another sector read, this time just ; one sector, into $0400 (X is already ; less than Y on entry, so loop will ; exit after one read) 0869- A9 04 LDA #$04 086B- AA TAX ; falls through to multi-sector read ; entry point (was also called earlier ; from $085F and $0866) 086C- 85 27 STA $27 086E- E8 INX 086F- 86 49 STX $49 0871- 84 F9 STY $F9 ; map logical into physical sector and ; store it in zero page where the disk ; controller ROM will look for it 0873- B9 8A 08 LDA $088A,Y 0876- 85 3D STA $3D ; read sector via disk controller ROM 0878- 20 85 08 JSR $0885 ; loop until done 087B- A4 F9 LDY $F9 087D- C8 INY 087E- C4 49 CPY $49 0880- 90 EF BCC $0871 0882- A5 27 LDA $27 0884- 60 RTS 0885- A6 2B LDX $2B 0887- 6C 3E 00 JMP ($003E) 088A- [00 03 05 07 09 0B 0D 0F] 0892- [02 04 06 08 0A 0C 0E 01] That's it. Flexible but compact. It's a weird combination of reads, though. 3 pages at $1D00. 3 pages at $9D00. 1 page at $0400 (part of the text page, but it's hidden during boot because we cleared the entire hi-res graphics page and showed that instead). Of course, we manually pushed $04/$72 on the stack earlier, so once we fall through to the sector read routine and it hits the RTS at $088F, it will "return" to $0472 + 1 = $0473. Let's interrupt the boot before it gets there. ~ Chapter 2 In Which Things Get Brilliantly Weird *9600physical sectors is at ; $0263) or a physical sector 241D- 24 4A BIT $4A 241F- 30 03 BMI $2424 2421- B9 63 04 LDA $0463,Y ; store physical sector in $3D (again, ; used by the disk controller ROM) 2424- 85 3D STA $3D ; read sector by jumping to ($003E), ; which points to $Cx5C (e.g. $C65C if ; booting from slot 6) and exit via ; $0801, which is an RTS by now, so ; this just continues to the next line 2426- 20 00 04 JSR $0400 ; increment sector index 2429- A4 F9 LDY $F9 242B- C8 INY ; are there more sectors to read? 242C- C4 49 CPY $49 ; yes, branch back and repeat 242E- 90 EA BCC $241A ; no, exit with last page (+1) in A ; (disk controller ROM increments this ; after storing sector data, so on exit ; this will be the first page that was ; NOT filled with data in this loop) 2430- A5 27 LDA $27 2432- 60 RTS To sum up: These two lines of code... || 24C3- A9 A0 LDA #$A0 || || 24C5- 4C 0B 04 JMP $040B || advanced the drive head from track $00 to track $01, read the entire track into $A000..$AFFF (despite the fact that every sector's address field was corrupted and claimed to be track $00), then fall through from $040B to $040E and do it all over again, but moving to track $02 and reading into $B000..$BFFF instead. Beautiful. ~ Chapter 3 Every Byte Is Sacred, Every Byte Is Great, If A Byte Gets Wasted, Woz Gets Quite Irate Continuing from $0478... 2478- 20 00 BB JSR $BB00 *9600 *BB00L ; this checks whether Applesoft is in ; ROM and displays an error message if ; it's not BB00- AD 81 C0 LDA $C081 BB03- AD B3 FB LDA $FBB3 BB06- C9 06 CMP #$06 BB08- D0 03 BNE $BB0D BB0A- A9 03 LDA #$03 BB0C- 60 RTS BB0D- AD 83 C0 LDA $C083 BB10- AD 83 C0 LDA $C083 BB13- 8D 00 E0 STA $E000 BB16- CD 00 E0 CMP $E000 BB19- D0 19 BNE $BB34 BB1B- 2A ROL BB1C- 8D 00 E0 STA $E000 BB1F- CD 00 E0 CMP $E000 BB22- D0 10 BNE $BB34 . . &c. . Unrelated to copy protection. But while I'm here, I should save these two tracks worth of data, because they appear to be most of a full copy of DOS 3.3. *2000 *2E00