n---Granny Applebee's Cookie Factory--- A 4am crack 2016-10-17 --------------------------------------- Name: Granny Applebee's Cookie Factory Genre: educational Year: 1993 Publisher: Micrograms Platform: Apple //e or later (128K) Media: single-sided 5.25-inch floppy OS: custom Previous cracks: none Similar cracks: #797 Marty's Family Reader #796 Marty's Reading Workout ~ Chapter 0 In Which Various Automated Tools Fail In Interesting Ways COPYA immediate disk read error Locksmith Fast Disk Backup can't read track $00, sector $0C; copy loads title screen then breaks to text page with "ERROR D51" EDD 4 bit copy (no sync, no count) works Copy ][+ nibble editor T00,S0C exists (I searched for the raw nibble sequence "AA AB AE", which matches the second half of the track ("AA AA" -> $00) and the sector ("AB AE" -> $06 = logical sector $0C) in the address field Disk Fixer setting "CHECKSUM ENABLED" to "NO" allows me to read T00,S0C Why didn't COPYA work? intentionally corrupted sector on T00 Why didn't Locksmith FDB work? probably a run-time check to ensure that sector on T00 is corrupted, which it isn't, on my copy, because Locksmith Fast Disk Backup will just write out a standard sector of zeroes instead of reproducing the corruption EDD worked. What does that tell us? Probably just a bad block check: unreadable sector = original, readable sector = unauthorized copy Next steps: 1. Use a sector editor to search for the error message and look nearby for obvious signs of sector reads 2. If that fails, trace the boot 3. I don't know, go feed the ducks or something? ~ Chapter 1 It's Only Metadata The disk appears to boot directly to the program, without loading any known operating system first. But while I was poking around the corrupted track 0, I noticed a normal ProDOS catalog. And in fact, I can boot from my ProDOS hard drive and catalog this disk! --v-- ]PR#7 ... ]CAT,S6,D1 /BOOT6 NAME TYPE BLOCKS MODIFIED PRODOS SYS 6 TITLE BIN 33 LOWDOS BIN 6 FONT1.DHR BIN 6 UTL BIN 8 CR.COOKIE1 BIN 24 CR.COOKIE2 BIN 9 CR.COOKIE3 BIN 8 CR.COOKIE4 BIN 45 CR.COOKIE5 BIN 20 CR.COOKIE6 BIN 13 CR.COOKIE7 BIN 15 CR.COOKIE8 BIN 3 DISK BIN 4 FACTORY BIN 51 BLOCKS FREE: 22 BLOCKS USED: 258 ]CATALOG,S6,D1 [truncated here to show the final column, which is the load address of each file] ]CATALOG /BOOT6 NAME TYPE BLOCKS ...SUBTYPE PRODOS SYS 6 TITLE BIN 33 ...A=$2000 LOWDOS BIN 6 ...A=$0800 FONT1.DHR BIN 6 ...A=$F000 UTL BIN 8 ...A=$E000 CR.COOKIE1 BIN 24 ...A=$4000 CR.COOKIE2 BIN 9 ...A=$4000 CR.COOKIE3 BIN 8 ...A=$4000 CR.COOKIE4 BIN 45 ...A=$4000 CR.COOKIE5 BIN 20 ...A=$4000 CR.COOKIE6 BIN 13 ...A=$4000 CR.COOKIE7 BIN 15 ...A=$4000 CR.COOKIE8 BIN 3 ...A=$4000 DISK BIN 4 ...A=$DA00 FACTORY BIN 51 ...A=$4000 BLOCKS FREE: 22 ...TOTAL BLOCKS: 280 --^-- Anyway, might prove useful, especially being able to cross-reference sectors to files and finding out where they're loaded in memory. The SUBTYPE metadata seems too non-random to be completely unused. Onward! My non-working copy prints an error message. Let's see if we can find it. Turning to my trusty Disk Fixer sector editor, I search for the ASCII string "ERROR D51" and find it in T1F,S09! Copy II Plus recognizes this disk as ProDOS, and the "disk map" says that T1F,S09 is part of the file "FACTORY". --v-- DISK MAP SLOT 6 DRIVE 1 /BOOT6/FACTORY TRACK 1 2 0123456789ABCDEF0123456789ABCDEF012 S0 ..........................*******.. EE ..........................*******.. CD ..........................*******.. TC ..........................*******.. OB ..........................******... RA ..........................******... 9 ..........................******... 8 ..........................******... 7 ..........................******... 6 ..........................******... 5 ..........................******... 4 ..........................******... 3 ..........................******... 2 ..........................******... 1 .........................*******... F .........................*******... USE ARROW KEYS TO MAP OTHER FILES --^-- Booting my ProDOS hard drive, I can BLOAD that file into memory and start tracing. According to the full CATALOG, "FACTORY" is loaded at address $4000. ~ Chapter 1 Enter The Factory ]PR#7 ... ]PREFIX /BOOT6 ]BLOAD FACTORY NO BUFFERS AVAILABLE Hmm, the file is too big to load from the prompt because BASIC.SYSTEM is in memory. However... ]BLOAD FACTORY,A$1000 works. So everything will just be off by $3000. ]CALL -151 *1000L 1000- 4C 76 96 JMP $9676 *6676L ; could be anything, but given the ; current program counter, I'm guessing ; this is the address $96BF, which is ; directly below 6676- A9 BF LDA #$BF 6678- 8D 07 D0 STA $D007 667B- A9 96 LDA #$96 667D- 8D 08 D0 STA $D008 6680- A9 01 LDA #$01 6682- 8D 25 D3 STA $D325 6685- 20 0D D3 JSR $D30D <-- ? 6688- 2C E8 C0 BIT $C0E8 OK, this is not going to work. I don't know which file is loaded at $D000, but $D30D is not a standard ProDOS entry point and none of the files in the disk catalog look promising. ~ Chapter 3 Re-enter The Factory Attempt #2: hack the binary to break to the monitor. (Hey, it's a non-working copy already; it can't get any worse.) Turning to my trusty Disk Fixer sector editor, I press "O" for Input/Output Control, change "DOS TYPE" to "PRODOS", then press "D" for a directory listing and select "FACTORY", which brings me to the first sector on the file on T19,S0E. T19,S0E,$00: 4C7696 -> 4C59FF ]PR#6 ...breaks (actually crashes, since I guess a RAM bank is active and $FF59 isn't currently a valid entry point, but I'll take what I can get... ; copy F8 ROM to language card so we ; can inspect the rest of it without ; crashing *C089 C089 N F800 BF ]PR#6 ...works... Quod erat liberandum. --------------------------------------- A 4am crack No. 882 ------------------EOF------------------