CiderPress II

Editing Blocks and Sectors

Disk images and partitions can be edited as 256-byte sectors or 512-byte blocks.

Sector editing is available when the disk geometry can be expressed as a collection of tracks, with a fixed number of sectors per track. Block editing is available when the disk can be viewed as a series of 512-byte blocks. This means that an image of an Apple II 13-sector 5.25" disk can only be edited as sectors, and a 32MB hard drive can only be edited as blocks. Apple II 16-sector 5.25" disks can go either way.

Apple II operating systems that access 16-sector disks apply a translation table to the sector number. Reading and writing sectors sequentially is inefficient because, between the time the software finished reading sector 0 and was ready to start on sector 1, the disk will rotate past the start of sector 1. The software skew allows the operating system to interleave the sectors in a fashion that is optimized for its performance goals.

DOS uses one scheme, ProDOS and Apple Pascal another, and CP/M uses a third. When reading sectors from a nibble image, it's important to select the correct translation table. Usually the filesystem installed on the disk makes it easy to identify, but some systems use different schemes on different tracks.

Block images are generally much simpler, storing blocks in sequential order.

You can open the block/sector editor by selecting the disk image or partition you wish to edit, and then clicking one of the buttons in the center panel or using the corresponding item in the Actions menu. There are three options:

  1. Edit Sectors - opens the editor with track/sector addressing, a 256-byte data area, and DOS 3.3 sector skew.
  2. Edit Blocks - opens the editor with block addressing, a 512-byte data area, and ProDOS sector skew.
  3. Edit Blocks (CP/M) - opens the editor with block addressing, a 512-byte data area, and CP/M sector skew. Also displays the CP/M allocation block number at the top of the window.

Navigation

Track, sector, and block numbers may be entered in decimal or hexadecimal (precede it with "$" or "0x" for hex). The range of valid values is shown. Enter the desired values and click Read to read the block, or Write to write it. (You're allowed to write a block somewhere other than where you read it, though you will be asked for confirmation if you try.)

Use the Prev and Next buttons to move forward or backward by one block or sector.

To edit sector data, click in the hex data area on the byte you wish to change, and enter two hex digits (0-9, a-f). Editing the text area directly is not currently supported.

For 16-sector 5.25" disk images, the sector skew can be changed with the Sector Order pop-up menu.

For nibble images, the sector format is displayed.

The character conversion mode used for the text portion of the hex dump can be altered with the Text Conversion buttons.

If you want to share the sector contents, use the Copy to Clipboard to generate a text copy of the hex dump.

Filesystem Updates

Editing a disk with a filesystem could change the filesystem, or render it unrecognizable. When you start making changes, the filesystem or partitions stored in the disk image will be removed from the Archive Contents tree (top-left panel). When you exit the sector editor, the disk will be re-scanned, and the filesystem re-added to the archive tree if possible.