From DaphneWiki

Jump to: navigation, search

The Black Cauldron (Apple //e)

  • The nibble count for this disk is well documented in several computist magazines. My goal is to document how it works.
  • To get started on finding the copy protection routine, set a breakpoint at $4b10 and if it has a JSR to $ff00, you've found the right spot.


$ffb7 sets up an IOB and calls RWTS. The IOB is stored at $b7e8 (standard place). To learn about IOB and RWTS, see the book "Beneath Apple DOS" which is how I learned about it.

The IOB looks like this:

b7e8: 01 60 01 01 00 00 fb b7   .`....{7
b7f0: 00 02 00 01 00 00 01 60 01   .......`.
  • b7e8: table type (must be 1)
  • b7e9: slot * 16 (0x60)
  • b7ea: drive number (1 in this case)
  • b7eb: volume number expected (1 in this case)
  • b7ec: track number (0 in this case)
  • b7ed: sector number (0 in this case)
  • b7ee: pointer to device characteristics table (DCT), $b7fb in this case
  • b7f0: pointer to buffer to read/write ($2000 in this case)
  • b7f2: unused
  • b7f3: byte count for partial sector ($1 in this case)
  • b7f4: command code (0 in this case, which means SEEK)
  • b7f5-b7f8 are return codes (from what I can tell)

So in other words, this function performs a seek to track $0, sector $0. (unless I've read it wrong)

The Device Characteristics Table (DBT) referenced contains standard DOS 3.3 values, so it doesn't demand attention.

Personal tools