home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 2
/
CDPD_II_2352.bin
/
scope
/
101-125
/
scopedisk108
/
dedit
/
dedit.man
< prev
next >
Wrap
Text File
|
1992-10-27
|
14KB
|
578 lines
**********************************************************************
* *
* DEdit by Mike Ruble *
* *
**********************************************************************
v2.01 DEdit documentation 02/06/90
PROGRAM
DEdit is a Disk Editor that will edit sectors on any disk device
that uses 512 byte sectors I've used it with my Floppy drives, RAD:,
and my hard drive using the FastFileSystem. I've written and run
DEdit on an Amiga 1000 with Kickstart 1.2+, 2.5megs, 2 floppies, and
an 80 meg hard drive. To use the program you will need the
following...
FILE DIR
string.library LIBS: (supplied by me)
DEdit.font FONTS: (supplied by me)
8 FONTS:DEdit/ (supplied by me)
An insallation script is supplied (DEdInstall) that will copy these
files for you.
----------------------------------------------------------------------
OPERATION
DEdit is invoked from CLI with the command DEdit [drive] where
drive is DF0: DH0: RAD: etc. if no drive is specified then DEdit will
start up using DF0: you can choose a different drive later using the
DRIVE menu.
To start DEdit from Workbench just double-click its icon it will
start up using DF0:
When DEdit starts it will check the AmigaDOS device list for a
disk device with a name that matches the one you supplied, open it
and show you what it thinks should be the ROOT block.
1
v2.01 DEdit documentation 02/06/90
GADGETS
Across the top of the display are 6 string gadgets which are...
BLOCK
Display/Change current block number there are really two gadgets
here, the top is a decimal display and the bottom one is a hex
display.
TRACK
Display/Change current track number.
SECTOR
Display/Change current sector within track.
CYLINDER
Display/Change current cylinder number.
SURFACE
Display/Change current surface number.
To use theese gadgets just select it type the value you want and
hit enter. The program will make the adjustments and display the new
current block. If you enter a value less than 0 you will get 0, if
you enter a value greater than the maximum value for the drive you
will get the last item. For example the last block on a floppy is
1759 so if you enter 1800 you will get 1759.
At the top-right of the display there are 9 gadgets which
are...
NEXT BLOCK
Show the next block. This will wrap to 0 if you are on the last
block.
PREV BLOCK
Go back 1 block. This will wrap to the last block on the disk
if you are on block 0.
LINK BLOCK
If you are looking at a file header or data block this will
display the next block in the chain. If the link is 0 then
nothing will happen. (on FFS data blocks this is useless)
ROOT BLOCK
This will go directly to the ROOT block.
JUMP
This gadget will cause the program to jump to the block number
indicated by the currently selected (RED) long-word on the
display. If none are selected or the long-word is out of the
range of available blocks then nothing will happen. You can
select a long-word in several ways, you can select the COMPUTE
HASH menu item (later), press 'S' and use the cursor keys, or
use the mouse pointer and click on the long-word you want. A
2
v2.01 DEdit documentation 02/06/90
double-click will select and jump at the same time.
EDIT HEX
Begin editing on the hex display at the selected long-word. If
no long-word has been selected then start at top. See EDITING
below.
EDIT ASCII
Begin editing on the ascii display at the selected long-word.
If no long-word has been selected then start at top. See
EDITING below.
CHECKSUM
Re-calculate the checksum on the current block. Don't forget to
WRITE the block back to disk.
WRITE
Re-write the current block to disk.
UNDO
Undo all changes to the current block. Really all this does is
read the current block back from the disk. In edit mode this
will undo all changes made during the edit.
These gadgets have keyboard equivalents which are as follows...
GADGET KEY
-----------------
NEXT BLOCK N
PREV BLOCK P
LINK BLOCK L
ROOT BLOCK R
JUMP J
EDIT HEX H
EDIT ASCII A
CHECKSUM C
UNDO U
Across the bottom of the display are 6 gadgets which are...
HEADER
Points to current blocks file header.
EXTENSION
Points to file headers extension (file list) block.
NEXT DATA
Points to next data block in chain.
PARENT
Points to directory parent.
NEXT HASH
Points to next file header in hash chain.
3
v2.01 DEdit documentation 02/06/90
CHECKSUM
Checksum for current block.
Selecting one of theese gadgets (except CHECKSUM) will make the
displayed block number the current block and display it. If the
number is 0 then nothing will happen. The CHECKSUM gadget works the
same as the CHECKSUM gadget at the top-right.
Near the bottom-right of the display under the heading HISTORY
are 20 gadgets which are a history of the blocks that you have
visited. You can select one of theese to go back to that block.
4
v2.01 DEdit documentation 02/06/90
MENUS
The DRIVE menu is used to select the drive you wish the editor
to use. This is set up by reading the AmigaDOS device list and
should have all disk devices that you have in your system. Just
select a drive to use and the program will find the driver, name, and
size paramaters that it needs and start using that drive.
The MODE menu is used to switch between FILE and DISK mode.
When a FileHeader block is displayed you can select FILE MODE from
the menu and your movement on the disk will be limited to the blocks
in that file. When you select the NEXT BLOCK gadget the next block
in the file will be displayed not the next block on the disk. If the
last block of the file is displayed then NEXT BLOCK will display the
FileHeader. The string gadgets at the top of the display will not
function in file mode.
The SPECIAL menu has several functions that I thought were
usefull.
SAVE BLOCK
Copies the current block to a save area.
COPY SAVED BLOCK
Copies the saved block over the current block. These two items
could be used to copy a block from one drive to another for safe
keeping.
OPEN SAVE FILE
Brings up a requester for You to type a file name into and opens
the specified file for BLOCK TO SAVE and FILE TO SAVE
operations.
CLOSE SAVE FILE
Closes the save file.
BLOCK TO SAVE
Copies the DATA portion of the current data block to the save
file. If the current block is not a data block nothing will
happen. If the drive is using the FastFileSystem the whole
block will be copied to the save file since DEdit can't tell
data blocks from free blocks on FFS.
FILE TO SAVE
Copies an entire file to the save file. If the current block is
a data block the save will follow the NEXT DATA link to the end
of the file (unless You're using FFS). If the current block is
a file header then the save will follow the list of blocks in
the file header and extensions. This item is great for
recovering a file from a trashed disk (works on deleted files
also). If You're using FFS then FILE TO SAVE will only work
from a file header block.
5
v2.01 DEdit documentation 02/06/90
COMPUTE HASH
Requests a string computes its hash value and highlights the
apropriate long-word in the display. If the current block is a
directory block use this item to find an entry for a file or
directory and then select JUMP (or press 'J').
The SEARCH menu is used to search for strings, files, or
directories. each item has two subitems, FROM CURRENT will search
from the current position on the disk and FROM START will search from
block 0.
FOR STRING
Will search all data and unused blocks for the specified
string. If successfull the block the string was found in will
be displayed. If not the screen will blink.
FOR FILE
Will search all file header and unused blocks for the specified
name. If successfull the file header block will be diplayed.
If not the screen will blink.
FOR DIRECTORY
Will search all directory and unused blocks for the specified
name. If successfull the directory block will be diplayed. If
not the screen will blink.
The reason SEARCH looks at unused blocks is that if You delete a
file or directory the file header or directory block may not be
identified as such.
6
v2.01 DEdit documentation 02/06/90
EDITING
There are two methods for editing displayed data, HEX mode in
which the left part of the display is used, and ASCII mode in which
the right part of the display is used. In both modes the cursor keys
are active and can be used to move the cursor around the display.
Pressing <return> or <enter> will end the editing session. In both
modes the UNDO gadget at top- right will restore the block as it was
before you started editing.
To start editing in hex mode select EDIT HEX gadget or press
'H'. Only hexadecimal keys (1-9 A-F) will be accepted any others
will beep the screen.
To start editing in ascii mode select EDIT ASCII gadget or press
'A'. All keys except function keys will be accepted including ALTed,
SHIFTed, CNTRLed, or whatever combination.
When you are finished editing don't forget to write the block back to
disk or it will be lost.
----------------------------------------------------------------------
Send questions or comments to...
Mike Ruble CompuServe ID: 71310,1237
7
Table of Contents
PROGRAM......................................................... 1
OPERATION....................................................... 1
GADGETS......................................................... 2
BLOCK........................................................ 2
TRACK........................................................ 2
SECTOR....................................................... 2
CYLINDER..................................................... 2
SURFACE...................................................... 2
NEXT BLOCK................................................... 2
PREV BLOCK................................................... 2
LINK BLOCK................................................... 2
ROOT BLOCK................................................... 2
JUMP......................................................... 2
EDIT HEX..................................................... 3
EDIT ASCII................................................... 3
CHECKSUM..................................................... 3
UNDO......................................................... 3
HEADER....................................................... 3
EXTENSION.................................................... 3
NEXT DATA.................................................... 3
PARENT....................................................... 3
NEXT HASH.................................................... 3
CHECKSUM..................................................... 3
HISTORY...................................................... 4
MENUS........................................................... 5
DRIVE........................................................ 5
MODE......................................................... 5
SPECIAL...................................................... 5
SEARCH....................................................... 6
EDITING......................................................... 7
HEX.......................................................... 7
ASCII........................................................ 7
I