Dec 132017
 
A good disk editor.
File DISKEDIT.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
A good disk editor.
File Name File Size Zip Size Zip Type
DISKED.COM 32000 19541 deflated
DISKED.DOC 25600 7241 deflated

Download File DISKEDIT.ZIP Here

Contents of the DISKED.DOC file








DISKETTE EDITOR
(Release 1)

Diskette Editor is a program that I wrote because I needed, or

actually wanted. It basically is a sector editing program but

could be used as just a "snooping" device. Unlike many others, it

can read the "special" sectors that various programs use in their

copy protection schemes. Diskette Editor is more of a tool, than a

utility, for example, using it you can undelete files like many

utilities, except it is not automatic; but this gives you more

power.

STARTING UP THE PROGRAM

Diskette Editor is started by typing DISKED at the DOS

prompt. No command line arguments are used. The screen that

comes up after loading, is Diskette Editor's only screen. The

screen has a great deal of information on it. (Note: All the

numbers displayed and inputted in Diskette Editor, and the

numbers in this manual, are in hexadecimal unless otherwise

specified).

GENERAL INFORMATION ON THE SECTOR EDITING SCREEN

Diskette Editor's main screen has a lot of information on

it, but it is organized in an efficient way. The screen is

comprised of two colors. The colors vary according to the type of

monitor you have, but one of the colors is bright and the other

is dim. The brighter color is the highlight color. The highlight

shows what key to press for what function. For instance, the

command "Verify" has the "V" in the highlight color which signifies

that it is executed by pressing the "V" key. Also, "Mask" has the

"k" in highlight which shows "k" is pressed. From now on, the


(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 1








highlighted key will be written in between "[" and "]", so in the

above examples, the verify command would be [V]erify, and

the mask command would be Mas[k].

To execute the commands the depression of the shift key is not

necessary, but allowed. For most of the cases this will seem

natural to you, but in others it is different from what you might

expect. An illustration of one of these cases would be pressing

the period key for the [>] command. This was done as a

convenience.

OVERVIEW OF THE SECTOR EDITING SCREEN

The most noticeable part of the screen are the two windows.

When the program first starts they are both blank except for a

copyright notice in the left window. When a sector is read in from

a diskette, its data is displayed in these two windows. The one on

the left side of the screen (labeled "[H]exadecimal") displays the

data in hexadecimal bytes. The window on the right (labeled "[A]SC

II") is the same data in its corresponding ASC II (text) form.

Exotic characters (not alphabetic, numerical, or punctuation

marks) are displayed as periods. (To change this, see the Mas[k]

command in COMMANDS OVERVIEW).

The bottom-most line contains information on the current drive,

side, track number, sector number, and sector size (in decimal).

The two lines above the bottom-most line, contain a list of

available commands in the highlighted form. For a description of

the use of these commands, see the COMMANDS OVERVIEW section. The

line above those is the status line. Most of the messages to you

from Diskette Editor are displayed here.



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 2








EDITING SECTOR DATA

Before you can edit a sector, you must first read the data in

from a diskette. The [R]ead command does this. It reads one

sector from the current drive, side, and track. The windows are

then filled with the data read from the diskette. When you first

run Diskette Editor, the sector data buffer is filled with zeros,

the current drive is A, the current side is 0, the current track is

00, and the current sector number is 01. This is the diskette's

boot record which is read by the BIOS during a reboot.

The default mode when Diskette Editor is started is

hexadecimal. (This is changed with the [H]exadecimal and [A]SC II

commands). A pointer highlights the current byte in the data,

either the hexadecimal or the ASC II. The four arrow keys on the

numeric keypad move it in the indicated directions. If you move

the cursor into one of the four sides, the window will scroll, or

the pointer will wrap, if there is more data in that direction.

The [Home] key moves the pointer to the first byte of the first

page, and the [End] key moves the pointer to the last byte of the

last page. The [PgUp] key displays the previous page of data, if

one exists, and the [PgDn] key displays the next page of data,

again if one exists.

The two windows fit 256 bytes of data (one page). A normal

diskette sector is 512 bytes so there are two pages. Using the

keys mentioned in the above paragraph, it is possible to view all

the data in a sector. Instead of using the [PgDn] key, you could

press the cursor down key in the numeric keypad 16 times but the

[PgDn] key is perceptibly faster.



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 3








To change a byte use the [M]odify command. (The space bar

also activates the modify command). This lets you change the byte

being highlighted by the pointer. If you are in the hexadecimal

mode, type in a new hexadecimal value; if in the ASC II mode, type

the character to replace the highlighted. After a byte is modified

the pointer is moved automatically to the next byte. To modify

the next one you must either press the space bar or [M]odify.

All the modifications that you make are to the sector data

stored in the computer's memory, not the actual sector on the

diskette. To save the changes that you made, use the [W]rite

sector command. Be very careful when writing to the diskette!

That is all that is required to know for basic diskette

editing. But there is much more to Diskette Editor--read on!

SCANNING A DISKETTE

When a diskette is formatted, 40 (decimal) tracks are laid out

on it. They are numbered from 00 to 27 (hexadecimal). Within each

track there are sectors. In the earlier versions of DOS (1.x)

there were only 08 sectors in each track. With the later versions

there are 09. Diskettes also have two sides (unless you have one

of the older single-sided diskette drives) which are numbered 00

and 01. Some software comes on single-side diskettes which means

that only one side of the diskette is being used.

The above paragraph describes an ordinary diskette. But there

are many "copy protection" schemes that entail using abnormal

formats. A number of things can easily be done to copy protect a

program. Giving sectors weird numbers is popular. The sector

numbers can range from 00 to FF. Adding an extra track is also



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 4








commonly done. Sector sizes can also be changed from 512 to 128,

256, or 1024 bytes (decimal). But the most popular of all these

tricks is a combination of them. DOS (all versions) expects there

to be 40 (decimal) tracks of 08, or 09, sectors of 512 (decimal)

bytes. If this is not so, it reports a read error and no data is

transferred. When DISKCOPY copys a disk, it produces a normally

formatted diskette. When the "copy protected" program first runs,

it checks to see if the diskette it was loaded off of has the

extraordinary format, if not it was a DISKCOPYed copy so it aborts.

The Sca[n] command is used to find these abnormal formats.

When its window opens, it asks you the starting track. Enter the

desired track number to start on or 00 to start with the first. It

then asks you for the ending track. Enter it or 27 for the last.

Next comes the lowest sector number to search for, then the

highest. Diskette Editor's scan command will the proceed to look,

starting from the starting track, for all the sectors of any size

in the range entered for the sector numbers, to the ending track,

reporting anything it finds. To read in an unusually sized sector,

see the BYTES PER SECTOR option under DISKETTE PARAMETER TABLE.

DISKETTE PARAMETER TABLE

Between the two windows there is the diskette parameter table

and it is labeled as so. This table controls how the diskette

drives will act. Most of the values in the table should not be

changed unless you know what you are doing. But there are a couple

that will be very helpful. Here is the table:







(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 5








Diskette Parameter Table
Byte # Default Value Description
0 DF 1st nibble stop rate for drive head
2nd nibble disk head unload time
1 02 1st nibble disk head load time
2nd nibble DMA mode select
2 25 Wait time before motor off
*3 02 Bytes per sector
*4 09 Highest sector number on track
5 2A Gap length between sectors
6 FF Data length value
7 50 Formatting gap length
8 F6 Formatting fill byte
9 00 Head settle time
10 02 Motor start delay

Only table values with asterisks should be modified unless you

are familiar with diskette drive operations (i.e. you understand

the descriptions) otherwise you can damage your diskette drives.

Two things you should note are some of the default values vary with

DOS, and in Diskette Editor the descriptions are abbreviated.

To modify a value in the table, press the highlighted number

next to the one you want. The last option does not have a "10"

next to it, instead it has an "X". To modify it press the [X] key.

The original table is restored when you exit from Diskette Editor.

BYTES PER SECTOR (3) -- this is the one you will want to play

around with the most. Changing this will enable you to read in

some "copy protected" sectors. This controls the number of bytes

per sector. If you enter a 00 there is 128 bytes per sector, a 01

there are 256 bytes per sector, a 02 (normal) there are 512 bytes

per sector, or a 03 1024 bytes per sector. Any other number is

invalid, but Diskette Editor will not warn you of this. To find

out how to locate unusual sized sectors, see the Sca[n] command.

To read an abnormally sized sector reported by the Sca[n] command,

the current sector size must match the size revealed. To find out



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 6








how to create your own unusual sized sectors, see the [F]ormat

command.

HIGHEST SECTOR NUMBER ON TRACK (4) -- this is used by Diskette

Editor's [+] and [-] (see below) commands. It controls when the

current sector number will wrap back to a 01. Under DOS 1.x the

default value is 08 (8 sectors per track), and under DOS 2.x and

3.x it is a 09 (9 sectors per track).

COMMANDS OVERVIEW

[ESC]--cancels a command or input at any time.

[H]exadecimal--switches the current mode to hexadecimal. The

highlighted cursor will move to the left window if it was in the

right. [M]odifications will be in hexadecimal.

[A]SC II--switches the current mode to ASC II (text mode). The

highlighted cursor will move to the right window if it was in the

left. [M]odifications will be in ASC II.

[M]odify--lets you change the byte being highlighted by the

pointer. If the mode is ASC II, type the appropriate character

otherwise type in the desired hexadecimal value.

[R]ead--reads in the current sector. The information line

(bottom-most) tells where the current sector is located.

[W]rite--writes the sector data stored in the computer's memory

to the diskette. Be careful to write the sector to the same place

you read it from unless you are specifically copying the data. A

yes/no warning is given before the data is written.

[V]erify--verifies that the current sector is readable. The

sector data is not transferred to the sector data buffer in the

computer's memory.



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 7








[D]rive--toggles between drive A and drive B. Note: Diskette

Editor does not support a hard disk, so the drives are limited to A

and B.

[T]rack--allows you to type in a track number for the current

track. If Auto-Read is on, the current sector is read from the new

track. Entering a track number greater than 27 results in a

warning with an "Are you sure?"

[S]ector--allows you to enter a new sector number for the current

sector number. Valid sectors numbers are from 00 to FF, although

normal sector numbers range from 01 to 09. If Auto-Read is on, the

new sector is read.

[+]--the plus key increments the current sector number by one and

reads it from the diskette if auto-read is on (see A[u]to Read).


If the current sector number is the highest sector number on the

track, then the current sector number will be 01. (To change the

highest value see HIGHEST SECTOR NUMBER ON TRACK under the DISKETTE

PARAMETER TABLE section).

[-]--the minus key decrements the current sector number by one

and reads it from the diskette if auto-read is on. If the current

sector number is 01, the current sector number becomes the highest

sector number on the track.

[<]--the less than sign key decrements the current track number

by one and reads in the current sector off of the new track if

auto-read is on. If the current track was 01, the current track

becomes 27.

[>]--the greater than sign key increments the current track

number by one and reads in the current sector off of the new track




(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 8








if auto-read is on. If the current track was 27, the current track

becomes 01.

S[i]de--flips the side of the diskette being edited. If Auto-

Read is on, the sector from the opposite side is read.

A[u]to Read--toggles Auto-Read on/off. If Auto-Read is ON, all

commands that change the position of the current sector ([+], [-],

[T]rack, etc.) will automatically read in the resulting sector.

The default value is ON.

Clr Key Buffer[:]--(Clear keyboard type-ahead buffer)--toggles

the flushing of the keyboard type ahead-buffer on/off. If OFF,

characters may be typed before a prompt for them is given. If ON,

those characters are flushed.

[ALT-R]--[hold ALTERNATE key then press "R"]--Resets the disk

system. This command should ordinarily not be needed.

[F9]--changes the highlight text color.

[F10]--changes the normal text color.

Mas[k]--controls the ASC II display. Normally non-text

characters are displayed as periods. Diskette Editor determines if

a character is a valid text character by checking to see if it is

above a low value and if it is below a high value. Mas[k] lets you

change these high and low values. (Low value of 00 and a high

value of FF disables the character masking). After you change the

lower and upper bounds, you then can modify the character used as

the mask character. (Normally a period).

Fil[l]--fills the sector data buffer with a specified byte. This

does not change the sector on the diskette unless you use the

[W]rite command.



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 9








S[e]arch--searches a user specified range on the diskette for a

pattern of hexadecimal or ASC II (text) data. Enter the data in

either hexadecimal or ASC II (as you indicate). Then enter the

starting and ending track and sector numbers. Diskette Editor will

then ask if you want to search both sides, meaning side 0 and side

1 of the diskette.

To Diskette Editor a match is when the data is exactly the

same. So "Are you sure?" does not match "ARE YOU SURE?" There is

one case when Diskette Editor treats a partial match as a whole

match. This is when Diskette Editor is scanning the edge of the

sector data buffer. If you have it search for "password" and at

the end of its buffer there is "passw" a match would be found.

Quite often, a sector ends with the same byte as the data you are

searching for begins. Diskette Editor treats this also as a match,

although it might not be. Be wary when a match occurs at offset

1FF (for a sector size of 512 bytes).

When a match is found, you have the option of searching for

the next occurrence of the search data, or view the data previously

found. To view the matched data just found, press the ESC key,

otherwise press any other key to continue the search.

WARNING WARNING --POTENTIALLY DANGEROUS COMMAND-- WARNING WARNING
\/
[F]ormat--formats the current track to your specifications. (For

a complete description of a diskette see SCANNING A DISKETTE

above). The drive and track number that will be formatted are

displayed. You are then asked for the number of sectors on the

track. This can range from 01 to FF, but only low numbers will

actually work; if the number is too big the sectors will overlap on



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 10








the track.

Diskette Editor will then ask information about each sector.

The sectors are stored sequentially on the track, but the they can

be called by any number desired. Diskette Editor displays the

physical sector number and asks what logical sector number you want

it called. The logical number can range from 00 to FF. In DOS

1.x, there are 8 sectors per track and they number from 01 to 08.

In DOS 2.x and 3.x there are 9 sectors per track and they number

from 01 to 09. If you give your sectors any other numbers DOS will

be unable to read them. This is used in some "copy-protection"

schemes.

Diskette Editor will then ask you the size of the sector. The

sector can be 128, 256, 512, or 1024 bytes in length. Normally

sectors are 512 bytes. When prompted, enter a 0 for 128 bytes, a 1

for 256 bytes, a 2 for 512 bytes, or a 3 for 1024 bytes. This is

another "copy-protection" method used by some companies. Most

often a combination of weird sector numbers and sizes are used.

(See the Sca[n] command to find out if a track contains any of

these weird combinations).

After all the information about the track is entered, a final

yes/no warning message is displayed. If you answer yes, the track

is formatted. This DESTROYS ALL THE DATA that was on that track.

Be very, very careful with this command. I recommend that you

never use this command unless you have a good reason to.

Sca[n]--see SCAN A DISKETTE above for a complete description of

the Sca[n] command and disk formats.

[C]onvert--converts, for your convenience, a number from either



(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 11








hexadecimal or decimal to its equivalent hexadecimal or decimal

form on the display.

[Q]uit--exits Diskette Editor.






- - -

Diskette Editor warns you before it does anything potentially

dangerous, but be very careful when you use it; you can

accidentally lose an entire diskette's data.

Diskette Editor belongs to the U.S.S. crowd. (User Supported

Software). You are given a trial period of two weeks in which you

can use it at no cost. If you use it after the trial period you

must register your copy for $30.00. If you register or not you are

encouraged to distribute copies of Diskette Editor as long as there

is not a disk fee of more than $10.00. My name and address for

registration, comments, or bug reports is:

Paul Troiano
531 Village Road West
Princeton Jct, NJ 08550

Diskette Editor has no warranty implied or expressed. In no

event will the author be held liable for damages caused by the use

of this program.














(C)Copyright 1986 by Paul Troiano
(Diskette Editor) Page 12




 December 13, 2017  Add comments

Leave a Reply