-------Stickybear Parts of Speech------ A 4am crack 2016-01-20 --------------------------------------- Name: Stickybear Parts of Speech Genre: educational Year: 1986 Authors: Richard Hefter, Susan Dubicki, Dave Cunningham Publisher: Optimum Resource, Inc. Media: single-sided 5.25-inch floppy OS: custom Previous cracks: none Similar cracks: #585 Map Skills #336 Car Builder ~ Chapter 0 In Which Various Automated Tools Fail In Interesting Ways COPYA read error on first pass Locksmith Fast Disk Backup fails to read T01,S0F; copy displays title screen then hangs EDD 4 bit copy (no sync, no count) no read errors, but copy once again hangs at the title screen Disk Fixer unable to read T01,S0F by any obvious combination of parameters Why didn't COPYA work? intentionally bad sector on track $01 Why didn't Locksmith FDB work? probably a nibble check during boot that centers around the bad sector Why didn't my EDD copy work? ditto Next steps: 1. Trace the boot 2. Find the nibble check and skip it 3. There is no step 3 (I hope) ~ Chapter 1 In Which All That Stinks Is Not Garbage [S6,D1=original 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 ]BLOAD BOOT1,A$2600 ]CALL -151 *B600<2600.2EFFM ; move RWTS into place ; (but don't overwrite ; Diversi-DOS @ $BF00) *B700L ; clear hi-res graphics screen 1 B700- A9 00 LDA #$00 B702- A8 TAY B703- 85 10 STA $10 B705- A2 20 LDX #$20 B707- 86 11 STX $11 B709- 91 10 STA ($10),Y B70B- C8 INY B70C- D0 FB BNE $B709 B70E- E6 11 INC $11 B710- CA DEX B711- D0 F6 BNE $B709 ; hmm, a JSR followed by garbage code B713- 20 5D B6 JSR $B65D B716- 01 0E ORA ($0E,X) B718- 00 BRK B719- 08 PHP B71A- 18 CLC B71B- 4C 00 08 JMP $0800 *B65DL ; Ah! This subroutine uses the stack to ; pass in multiple arguments and store ; them in zero page B65D- 68 PLA B65E- 85 F0 STA $F0 B660- 68 PLA B661- 85 F1 STA $F1 B663- A0 01 LDY #$01 B665- B1 F0 LDA ($F0),Y B667- 85 54 STA $54 B669- C8 INY B66A- B1 F0 LDA ($F0),Y B66C- 85 55 STA $55 B66E- C8 INY B66F- B1 F0 LDA ($F0),Y B671- 85 58 STA $58 B673- C8 INY B674- B1 F0 LDA ($F0),Y B676- 85 59 STA $59 B678- C8 INY B679- B1 F0 LDA ($F0),Y B67B- 85 67 STA $67 B67D- 18 CLC B67E- A5 F0 LDA $F0 B680- 69 05 ADC #$05 B682- A8 TAY B683- A5 F1 LDA $F1 B685- 69 00 ADC #$00 ; then munges the stack pointer to ; "return" to the next real instruction ; after the parameters B687- 48 PHA B688- 98 TYA B689- 48 PHA B68A- A9 00 LDA #$00 B68C- 85 5A STA $5A B68E- 85 5B STA $5B B690- 85 5E STA $5E B692- 85 53 STA $53 B694- A9 01 LDA #$01 B696- 85 50 STA $50 B698- 85 52 STA $52 B69A- 85 60 STA $60 B69C- 85 62 STA $62 B69E- A9 60 LDA #$60 B6A0- 85 51 STA $51 B6A2- 85 5F STA $5F B6A4- A9 00 LDA #$00 B6A6- 85 57 STA $57 B6A8- A9 61 LDA #$61 B6AA- 85 56 STA $56 B6AC- A9 EF LDA #$EF B6AE- 85 63 STA $63 B6B0- A9 D8 LDA #$D8 B6B2- 85 64 STA $64 B6B4- A5 67 LDA $67 B6B6- D0 01 BNE $B6B9 B6B8- 60 RTS B6B9- A9 01 LDA #$01 B6BB- 85 5C STA $5C B6BD- A9 00 LDA #$00 B6BF- A0 50 LDY #$50 B6C1- 20 B5 B7 JSR $B7B5 B6C4- E6 59 INC $59 B6C6- C6 67 DEC $67 B6C8- C6 55 DEC $55 B6CA- 10 E8 BPL $B6B4 B6CC- A9 0F LDA #$0F B6CE- 85 55 STA $55 B6D0- E6 54 INC $54 B6D2- D0 E0 BNE $B6B4 This is a multi-sector read loop. It calls the regular $B7B5 entry point to read sectors (at $B6C1). Interestingly, the RWTS parameter table is actually on zero page, starting at $50. That would mean that the parameters passed in (on the stack, after the JSR $B65D) are 1. start track ($54) 2. start sector ($55) 3. start address - low ($58) 4. start address - high ($59) 5. sector count ($67) It uses logical sectors (via the RWTS). Sectors count down from $0F to $00, and tracks are decremented once the sector wraps around to $0F. The target address is incremented monotonically, and the sector count is decremented until it hits 0. Revisiting the caller with this new understanding... ; read $18 sectors into $0800 starting ; from T01,S0E B713- 20 5D B6 JSR $B65D B716- [01 0E 00 08 18] ; continue in the code we just read B71B- 4C 00 08 JMP $0800 That's where I'll interrupt the boot. ~ Chapter 2 In Which Everything Comes Up Aces *9600 *800L 0800- 4C 0F 11 JMP $110F Woohoo! It worked. *2800<800.1FFFM *C500G ... ]CALL -151 *BSAVE BOOT2 0800,A$2800,L$1800 *800<2800.3FFFM *800L ; slow to 1 MHz (IIgs) 0800- AD 36 C0 LDA $C036 0803- 29 7F AND #$7F 0805- 8D 36 C0 STA $C036 ; black screen border (IIgs) 0808- AD 34 C0 LDA $C034 080B- 29 F0 AND #$F0 080D- 8D 34 C0 STA $C034 ; A quick investigation reveals that ; this is also a multi-sector read loop ; that takes parameters on the stack, ; just like the one at $B65D. So this ; reads T18,S03 into $8001. 0810- 20 CE 0A JSR $0ACE 0813- [18 03 01 80 01] ; and call it 0818- 20 01 80 JSR $8001 Once again, time to interrupt the boot. ~ Chapter 3 In Which We Grow Suspicious *9600