WDe Copyright(C)2004 Ben Cadieux
User Manual

  Initial Screen
    When WDe loads, a "Drive: " prompt comes up.

    A physical drive number can be entered (0/1/2...etc) which will
    bring up the "Floppy/Hard Disk [F/H]" prompt.  Press "F" to load
    the matching floppy disk and "H" will load the matching hard disk,
    respectively. (80h is added to the drive number to get hard disks)

    A logical drive letter can also be entered (A/B/C...etc) which will
    load the respective drive DOS (or a variation thereof) is providing.

    If TAB is pressed; the "Filename:" prompt will replace the drive
    prompt and a full file/path name can be entered to load it into
    the editor and treat it as a physical drive.  The sector restriction
    function can then be used to set its type.

  Editing
    All hex and ascii editing must be saved with 'F1' before changing
    sectors or quitting the program as changes will be lost.

    Page Down/Page Up changes the current sector being edited.
    Holding CTRL while pressing pgdn/pgup will jump by 100
    sectors at a time.

    Ctrl+Home & Ctrl+End jump to the beginning and end of the drive,
    respectively.

    The current sector, offset, area and cluster/fat-entry is
    displayed along the top for convenience.

    When in the fat area, Ctrl+Right will jump to the next entry
    in the fat chain and Ctrl+Left will attempt to recurse to the previous
    entry in the fat.  Hitting enter will jump directly to the first
    sector in that cluster in the data area.

    When in the data area, Ctrl+Enter will jump to the corresponding
    fat entry.  Hitting Ctrl+Right will jump directly to the
    next cluster.

    Hitting Ctrl+Enter in sector 0 of a logical drive will cause WDe
    to edit the physical drive that partition belongs to.

    Hitting TAB will switch between hex & ascii editing.

    If you hit the SHIFT+TAB key combination, you'll switch between
    hex and binary editing.  In this mode, you can use 0 and 1 to set
    bits or use the space bar to invert them.

  Supported drives:

    Physical disks (0, 1, 2, etc)
      WDe supports physical disks using int13h's ah=42h for reads and
      ah=43h for writes.  If these are not supported, WDe will default
      to 02h/03h.  Drive information is obtained with ah=48h and ah=08h
      respectively.  Note that the 'CHS:' information rolls over to 0
      when a high enough sector is reached if the drive is big enough.

    Logical drives (A:, C:, etc)
      WDe uses int21h/ax=7305h to do logical drive reading/writing,
      (DOS 7.x functions) and int 25h/26h (cx=0FFFFh) for non-fat32
      partitions/drives.  All drive information is obtained from
      the bootsector.

    CD-Rom drives
      For CD-Rom drives, WDe uses int2Fh's ax=1508h to read, though
      drives cannot be written to as it is not supported by any known
      CD-RW drives although WDe should write correctly if a drive were
      to support it.  Drive parameters are obtained from the first
      sector.  Due to CD-Rom sector size (2048 bytes, cooked), WDe addresses
      them in 4 sections.

  Saving/Restoring sectors to/from file

    Input
      Sectors are saved or restored from the current position
      on the current drive being edited.

    MBR/Boot Sector
      The MBR/Boot Sector can be saved/restored from/to file.
      These are always considered to be at sector 0.

    Partition 1/2/3/4
      These functions will save/restore the entire partition
      selected to a file.  Note that files larger than 2gb's are
      not supported by WDe.

    Fat1/Fat2
      The first and second fat may be saved/restored.
      Fat parameters are calculated from the bootsector.

    Root
      Saves or restores either the root or the first cluster of
      it for FAT32 to/from file.

    Entire drive
      Saves/restores the entire current partition to/from file.

    Chain
      This option will appear when you're currently in the FAT table or
      in the 32 bytes belonging to a file.  Using this option can save the
      data in a fat or file chain to a specified file.

  Goto
    This feature jumps to a particular sector, cluster or area
    for your editing convenience.

  View
    The view feature fills in the blank space below the hex editing
    area with extra details for boot sectors, mbrs, fats and
    directories when chosen.

    Directory view also adds some functionality for logical drives:
      If your view is set to 'directory', hitting enter in any of the
      32 bytes belonging to a directory entry will cause WDe to jump
      to the first sector of the first cluster of that file or
      directory.

  Find
    Search functions may be used to find strings, hex, fats,
    boot sectors, mbrs, and directories.  This is convenient for data
    recovery if backups are stored, or the originals are lost in a
    disaster.

  Functions

    Fill
      The fill functions allow the filling of sectors with a
      repeated string or byte.  It also has an invert function
      which takes each byte and reverses each bit; this is
      ideal for securely overwriting data when used in conjunction
      with the random fill function (which fills with random data).

      The incremental function is ideal for rebuilding FAT tables
      in a very quick and dirty manner.  The decremental function
      was added because it mostly reuses the same code as the incremental
      functions although has no obvious purpose.

      Note that filling starts from the current sector.

    Restrict
      This function was designed to set a range of sectors as a
      different type of drive.  For example, if DOS was not mounting
      Drive C (typing "C:" gives "invalid drive specification"), then
      we could load the physical drive it belongs on ("0"), locate
      the bootsector to that partition and then restrict it as a
      fat drive.  This would allow us to jump along the fat chain,
      jump to the root, etc, to verify drive integrity.

      Restrict gives an "Above/Below" prompt.  If Above is chosen,
      the current sector will now be considered Sector 0 and any
      sectors "above" (logically less than the current sector) are
      innaccessible.  "Below" will merely make all sectors below
      (logically greater than) the current sector innaccessible.

      When "Above" is chosen, an option to set the drive type is also
      provided; FAT or Physical.  FAT reads the new "Sector 0" as a
      bootsector and sets all variables accordingly; Physical treats
      the drive as a hard drive with a master boot record.

    UnFormat - Currently disabled
      This function is only in the menu when editing a FAT partition.
      It will detect whether or not the FAT and Root are blank before
      continuing with an UnFormat.  Note that if the partition has been
      labelled after it was formatted, the 32-byte label entry must be
      removed by deleting it from the root before using this function or
      the root will not be considered to be blank.

      UnFormat only writes to the FAT and Root; so if an unformat
      is unsuccessful, reformatting the drive will restore it to the
      state it was in before it was unformatted.

    UnDelete
      This function only appears when the sector being edited is
      detected as being a directory and the cursor is blinking
      somewhere within the 32 bytes belonging to a deleted file.

      It is recommended that multi-clustered directories be
      undeleted manually; locating their clusters cannot
      be accurately (or easily) done by a peice of software.

  Disk
    Simply allows changing the drive being edited.
    See "initial screen" for more details.

