Virtual Worlds #01
31 декабря 1999

Technical assistance - Dos Review 3: The material on the format of the disk operating system CP / M, ASC SOUND MASTER, RT11, SM computers RAFOS.

<b>Technical assistance</b> - Dos Review 3: The material on the format of the disk operating system CP / M, ASC SOUND MASTER, RT11, SM computers RAFOS.
         DOS REVIEW # 02



  Now you can talk about
most of the old, common and problematic system
CP / M.


  In one form or another it
used on a vast number of computers. Many
Foreign and Domestic
PC makers have tried to
use this system to
their computers. Tried to do it and SPEKTRUM'e. But
then there were wonderful times,
when the format is MS-DOS, as well, and
it may have been a sweet dream. The firm IBM
used this system with eight-disk drives.


  Nevertheless, the old
eight-digit system would seem to be ideal for many simple 
machines. In some ways it correctly. But correct to say that 
its ability to osovmestivnivaniyu (=: () -

Ed. ) Different computers is very
modest. This system was created
for text terminals. She has no means of working with
graphics! And with lots of memory may occur
problems.


  There was only an elementary
compatibility on shared memory
text and format the disk. But even here
compatibility negligible. On
Spectrum is extremely difficult
display 80 characters per line.


  But most interesting was
question-disk format. All
The fact that the eight-disk was 77 tracks and on
each located 26 sectors
to 128 bytes.


  It seems that the problem is solvable and
disks can be read. However,
read up.


  Quite often we can see
a reference to this book:


     Ueyt Angermeyer M. J.

  The operating system CP / M.
 Trans. from English. M: Radio and communication,

             1986.


  But upon close examination it turned out that this is clearly 
a benefit work, but not for programming in this system.


  The same was the book:

NV Makarova, and others are working on

    PC
Robotron 1715 A: Mechanical Engineering,

             1989.


  It seems that this book was written
at a time when the word
Computer understands: Large
Very clever, expensive and complicated
Machine with a large screen Type
Calculator for accountant.


  More details can be mentioned
and scientific, but outdated, and remote from the practice of 
the book: 


    Deytel GM Introduction

  operating systems. Trans. with
 Eng. Ed. VS Shtarkman.

      M: Mir, 1987 in 2 volumes


  Somewhat outdated, in my
look, but very useful for
creators of the OS book. But there are described methods are 
very complex, and in practice is described as

once the old CP / M under vosmidyuymovik.


  As a result stnet clear
that in this system, different cars
using almost any
possible format of the disk partitioning.
Only on ROBOTRON'e standard
three of them. Slightly different methods of segmentation. As a 
result, there are two models of computer Corvette is not 
compatible with each other (once told me that a teacher of 
computer science our school). But with KORVET'om

as with the school's computer and
so almost finished, because there are many incompatible
between a school assemblies.
But staging CP / M on the corvette
named one of the most successful. Called by those who
prisobachival ORION128 to the computer, which not only drives, 
but the controller with the ports there are five versions.



  The same can be said about
other computers. Therefore,
hard to be run on
ROBOTRON'e and even KORVET'e
Game of the PROFI or ATM-TURBO.


  But it turns out that some
compatibility is, Disk format, described below, although
is the most applicable
for KORVET'a quite readable and
other companies, despite the fact
that their OSes are called
like differently: CP / M (-80) and
MICRODOS, also different versions. It became clear that read
disks of different components can be, but
how to distinguish between them - is unknown.


  That has hardly
understand what's what. Unfortunately, I've never seen live
ATM-TURBO. Therefore, about him, I
did not yet speak, and
try to look at it first.
About corvette and a lot of Orion said in magazines and radio 
amateurs. I also tried to explore the disc from the PROFI, but 
with him I got a sad story. I asked for a copy

This single-disc with
assistance NEXTCOPY. As a result,
source has deteriorated, and in my
drive copied a couple of tracks,
containing the catalog. And with the help of
him I learned the general principles
storing information on such
disk.


  The breakdown was as in KORVET'e and other machines for 5
sectors of 1024 bytes. And such
should recognize the common format.
Descriptors catalog consisted of
32 bytes, 16 of which the latter is clearly described in the 
blocks which were placed bytes. 


  It was only much later that I learned
some details. This
pore I walked into the library
and set himself this emulator
System: MYZ80 v 1.0 by Simeon
Cran. True, he used the
virtual disk, which is not
quite similar to real ones. But
Some interesting things I learned from there. Then I detail
examined the documentation and KORVET'u
a lot of things figured out.


  All having the most difficult
different units of measurement:
from the records of 128 bytes to
extents, and blocks of 16KB, and
4K. And it seems that all dimensions
differ depending on the version.


  But the general principles do not change.
Somewhere on the disk directory is located: the PROFI - on the 
second track, the ROBOTRON'a - on the third. 


  The file on the 32-byte
but in older systems has been and
33. Descriptor contains a
string of bytes - the sequence of blocks where the file is 
placed. Thus, the ROM emulator could create files up to 32768 
(16384) bytes long. But for systems with

Maximum hard drives
referred to the length reached 8MB.
Also limited by the size and
disk: about 256MB. But this
problem can be overcome by increasing the size of the blocks. 
Also mentions the possibility of creating a chain of several

descriptors for a single file
total to 16. A separate pieces
large files are called
extents. The next descriptor previously pointed out the 33rd 
byte. Later, it became responsible for bytes

another number.


  Directories in the system is not
supported. But there
a remarkable opportunity.
The fact that the earlier one
machine comes on set
users. And even a flexible and
moreover, hard drives have been
small. We had to decide whether
sharing of data on disks.
It was therefore decided to partition a disk
a few USER-areas to only 16, but theoretically up to
255. Directory was shared, but
descriptor of each file contained the tag file belonging to a 
certain area. So way, one disk

There was some logic, as in MS-DOS. But the drive for
This was considered as a single
whole and how to load, write and delete files, as well as
cleaning tools, not determined
ownership of the file to a specific area and the separation was
purely external.


  Now we can consider the file descriptor in more detail:


  0th byte: it just contains the number and USER-field to which 
the file belongs. Using it can not organize a

of spreading, but very comprehensive
directory structure. All systems
limit the number of regions to
15, but with small alterations this figure can be increased to 
255. If the file is deleted, then its zero byte is # E5.



  1.8 bytes contain the file name,
and bytes 9-11 - its enlargement. Y
KORVET'a significant bits of these bytes contain the 
attributes: 9th - read-only, 10th - System

file.


  Bytes 13-15 contain system
information. On older systems, and
on the emulator is used only byte 15. It contained a long
file in the records of 128 bytes each. The balance of the 
sector can be filled with code # E5. In KORVET'a

Byte 12 - number of the current extent, number of that 
16-kilobyte file block, which corresponds to the current 
descriptor. 13 bytes from him indicates the number of bytes in 
the last record file, the total number of which also

contained in byte 15.


  Bytes 16-31 contain a map
file location. It consists of
eight pairs of bytes, each of which contains the values ​​of 
the unit on which contains part of the file.

In the emulator the block size is equal to
4096 bytes for ROBOTRON'e and KORVET'e - 2048 bytes.


  In principle, this information
already sufficient to read and write files. Nevertheless, the
older systems, the disk also
placed bitmap to 243
bytes. Every bit of it was responsible for
a cluster of 8 sectors
(8 * 128 = 1024). When writing a file
placed first found
the discarded bits and the descriptor
was brought the number of the
block.


  However, to record a new file is enough to scan directory, 
although this operation is not very convenient to implement in 
software, in addition, must pass deleted files. Better first

create a table of free blocks
in memory and do it at the first reading of the disc, and then
using and adjusting it in memory, overwrite only
directory changes. So I do not
found no mention of more
about a similar allocation table in
later models of computers.


  Nevertheless, we can not say that the system uses the 
original method segmentation. Other Systems

place information about segments
either in the general table, and then
catalog anyway Recalls
One of its paragraphs. Other
contain it in some sectors for each file and directory 
reference is made to such sector. But if you copy it would be 
reasonable to consider such sectors as the segments file. 
IS-DOS, in this sense is very original and uses and the table 
and sectors, and also allows create no segmentation sectors. 
The authors, apparently, learned CP / M, but passed on her way 
to the segmentation and was unique.



  The documentation on the corvette
standard was also the most
the first sector on the disk - its 128
bytes contain the size of all areas on the disk: size and 
sector, in bytes, the number of them tracks - and if this 
information together with the format of the directory is more 
or less standard, then we can try and write

universal-reader-pisalku on
drives all systems that claim
on CP / M compatibility.


  It contains:


Bytes Standard Appointment

0-1 0, or # BE80 Address OS boot

2.3 0 or # BF00 run OS Address

5.4 0 or # 0D number of sectors under OS

6 0 size-diameter floppy disk (133mm)

8 0 96 tracks per inch (1 - 48 dor.)

September 1 data vector translation sectors

                        (0 - not used)

March 10 Sector Size:

                        (0 - 128 bytes

                         1 - 256

                         2 - 512

                         3 - 1024)

Jan. 11 Two-way floppy drive (even lanes

                        above, 0 - one-sided)

12-13 5 Number of sectors per track

14-16, 0080 Number of tracks on one side

                        (TPD, TPD '= 2TPD)

16-17 40 Number of logical records for 128

                        bytes per track (SPT)

April 18 shift factor (= LOG2 (BLS/128))

19 15 mask layout block data

                        (= BLS/128-1)

20 0 mask block size

                        (= BLS/1024-1-DSM/256)

21-22 # 187 Number of data blocks on disk

                        (DSM = SPT * (TPD'-OFF) * 128/BLS-1)

23-24 # 7F Number of TOC entries minus 1

                        (DRM)

25-26 2 Number of units under the table of contents

                        (= 32 * DRM / BLS)

27-28 # 0020 Size of the vector control table of contents

                        (Checksum directory?)

29-30 3 Number of tracks for the operating

                        system, including zero (OFF)

31 # E7 (# F1) checksum of the sector

32-128 0 Reserved for vector translation sectors



  It remains unexplained, where
stored BLS - data block size (2048/4096) as such.
But it can be calculated from the 19 th
bytes - the mask data block.


  Time passed, and I also met the disks of other
CP / M / MICRODOS systems: Vector-06C, ATM and Skorpionovskie.


  Under Vector-06C, I had an emulator with an external program 
MST, working with egoshnimi disks.

But, unfortunately, naibollee buggy she works in the process of 
formatting disks - much everywhere bad tracks, and in other 
systems disk is formatted correctly. Therefore if nothing can 
not say, but the directory like standard.



  Under the ATM, I formatted disks
Honey Commander'om V 1.0, what version is still working on any
128'om. Drive - as in TR-DOS 16
sectors of 256 bytes, blocks like in 4096, but no sign
for their determination, except bytes
# E5 in naalnyh sectors. Work with them, in general, possible.
Establishing the seventh bits first
two-letter file extension match the attributes of READ ONLY and
SYSTEM, that for the above
Commanderie means HIDDEN: file
takii with just a bit in the directory no longer displayed. Also
As used in KORVET'e
Bytes 12 and 15 of the file descriptor.



  By Scorpion CP / M adapted bre.
MOA as much in 1992. It is bad, or
No, but only a sample of such
drive yet I have one called SEXDEMO - is it some pictures and 
Mouzon, a pair of executable files ... Only here

Scorpion then I netuti under
Emulsion rod Kaki something READING
ERRORS 8 -!, And a detailed examination of the files in them 
have found either breaks, or holes, score zero. Yes, and the 
directory structure was markedly different from Standard: in 
plate descriptions mestonahozhleniya blocks of the file on

disk was noticeable that in each block is not on a pair of
bytes and one byte. This
understood: when a block size of 4096
bytes of disk space to fit about 150. But these breaks in the 
directory, zero padding, forcing me to wait for the other 
samples or information. 


  Thus, CP / M compatible computer says absolutely nothing 
about the breakdown of his disc. But in general, reduced

Information should be sufficient to
At least work with the standard
KORVET'ovskimi disks.



        ASC SOUND MASTER


  And, they say, is so sly ASM - music editor.
Not talking about his musical abilities, but I remembered that 
with some versions, he finally can have something else, and 
their known Only the author, disk format. And, of course, I 
have not found reasons to climb on asmovskih disks. Sobsno grya 
I needs to such a case netuti. Yes

here does not compile Mouzon
should always be under the address 49152.
Wise coders, I suppose, would write his own compiler - because
a lot of them under the ST has been written. A
Here climb the tricky drive nobody wanted - rekompiler written 
under a different address. 


  I'm also very busy did not,
so maybe in the following
description of the sho is not so - not tested
until the special something.


  In brief breakdown of the disc was.
Separate line quite tricky:
the first 8 sectors of 512 bytes and
Last - to 1024 bytes. Well
the rest - well, 10 sectors of 512 bytes.


  At zero path is directory. Tors
He can take I do not know when
I last sector is always empty.


  At entry in the directory has 16 bytes. Zero entry -
the first 16 bytes of disk - special.
It contains the string: "ADS
1.00 (C) ASC "- for it is easy
determine the membership drive
to the order of "music".


  The remaining entries in the file:


  Bytes 0-7 - name.


  Bytes 8-10 - extension. It

can be PAT, SAM, IMG, and maybe even some.


  The next byte, number
11, together with younger nibble
12-second bytes contain the number of first block (cluster) 
file. See below.



  The remaining bits of the 12 th byte -
feature state of the file, namely if it contains a number of
1 - this is a normal file;
5 - protected from removal or
record file;
0 - remote file.


  Then bytes 13-14 record -
length of the file in bytes.


  Byte 15 - is always # 00!


  Now a few words about segmentation. Disc structure remarkably
similar to the disk MS-DOS. Pieces
file can occupy any space on the disk, and records of
file specifies a reference to the first piece. Only in this 
format the disk chunk size is equal to one sector and therefore 
its number can be called a cluster number, block number and 
offset to absoyutnogo sector. Finding the scattered disk these 
pieces is carried out here help with a similar table

FAT 12 bit. Two copies of the table size by 5 sectors that are 
on the first track. 


  When you need to read the file
number of the first piece of which is recorded in the catalog, 
read the first this first piece, and then determine what is 
contained in Table in a cell with a number equal to the number

the first piece of a file. And it contains a number of the 
second piece. Now he's read and repeat

process with the third. And so to those
long as the table will not number the next piece, a symptom
end of file.


  When recording, the table look
cells that contain a sign
unallocated disk space, and
write back number of the next
found an empty place, and the
sector, corresponding to the number
cells of the table, write the desired portion of the file.


  The problem is that the cells
have a size of 12 bits = 1.5 bytes
therefore it is necessary to extract
the desired half of the three bytes
teams shift.


  The first cell of the table is always
contains a number of # AC - mediadiskriptor for MS-DOS; # 000 -
sign a blank space on the disk;
# FFF - end of file -
the last cell that contains a number of pieces of the file -
the last piece.


  In short, to explain in words
it is difficult, if anyone should
understand - to learn in practice, and a short description I've 
finished. 



              RT11



  I have been more different drives.
I have many long and hard digging. But, you see, without any
information is difficult to understand chtolibo immediately.


  First of all, caught me in
hand wheels of the DCK. But they were
completely unreadable despite
the fact that their compatibility
with the standard formats breakdown mentioned more than once.


  A little more luck to me with disks from UKNZ. Read them just 
fine, uglyadyvalos name disk boot ... But there was no

no hint of the presence of
directory. In the future I
will have access to these machines and
an expert on it. But in the documents to them I did not find any
polzitelnoy information on the theme you want, and even 
reformatting disc and recorded on the famous

files with a known directory, I
did not find it on the drive itself. There was only some kind 
of table structure resembles that whether the directory, or 
file allocation table, which by the way should not be, because 
of information obtained disk structure resembles SPEKTRUM'sky. 
Then, I still wound up emulator Running RT-11 is compatible 
with the format FODOS on UKNC, so even with konvertilka discs 
in that format. But again, no proof, no catalog, but only the 
stuff everyone. In Overall, there remains an open question, and 
while there is still some hope.



  Whole year, I hope these
lived, and then again went into
library. Break a whole bunch of
books. Initially, it became clear that,
in general, all proceeds from this same RT-11, and from it 
"otkopirovalis" all there RAFOS, RAFOS 2 FODOS, FODOS 2, OS DCK 
and something there yet - in short, everything that

used on older machines
SM and a series of "Electronics". On
them, and, incidentally, on MS-DOS and
on CP / M, seemed more important
sovmestimot software. In
result - again, secrets, and
can - for shame someone ripoffs
with foreign designs.


  Word of the disks of siih
Compatible OS said little. The most detailed information I've 
found in the directory:



  Operating System SM computers

             RAFOS

Compiled by: AI Cushions, GV
Vigorodchik, AJ Vorobyov, AA
Lukin under Society. Ed. VP Semin.
M: Finance and Statistics, 1984

            - 207.


  It turns out that the system RAFOS can still work with DOS 
disks CM and UCS. Most likely, this

also affects the format of a cunning
directory. Why is it nowhere
seen? Yes, the fact is that all
character strings are packaged in
crafty (and it seems staryuschy)
such a code - RADIX-50. Almost a small compression: three
letters - in two bytes. But the set
letters, incidentally, is not
32 characters - five bits
letter, and even a bit in a pair of bytes
remains, and all the decoded
you simply shift - for a directory, like enough. But no,
it uses a set of 40
characters: letters, numbers, and three
special signs. It seems to need 6 bits
symbol - in the two bytes do not squeeze. But this is - if you 
work shifts, and if multiplication - then

get:


  40 * 40 * 40 = 64 000 - well
double-byte integer.

  And we get:


   Kod_Pervoy_Bukvy * 1600 +

  Kod_Vtoroy_Bukvy + * 40 +

  + Kod_Tretey_Bukvy =

more # FFFF or no matter how obtained,
If the code letter is in the range
from 0 to 39!


  In the space bar code - zero, in letters
A-Z - codes 1 through 26. Next
are special characters: "a point in the circle" in our "$" - 
code 27 "Point" - code 28, "/" - code 29 -

This symbol replaces characters
which have no analogues in the code
RADIX-50. Well, the numbers "0" - "9" -
codes 30-39.


  Kodiovanie and decoding
carried out the operations of multiplication and division.


  And then - easier.


  The entire disk is divided into blocks of
512 bytes on UKNC it - the size of
sector, and these blocks are numbered
from zero to nekotoroga maximum - the total number of blocks. 
Number it depends on the number of tracks and sectors on them: 
10 or 9 


  Block 0 - the boot sector.
It begins with a code # A0, there are
Other notable bytes, but
How does it find Number
sides, tracks and sectors - is still unknown.


  Block 1 - includes: in the end -
user name, drive and
opreratsionnoy system, but in the beginning - the table of 
replacement of defective blocks. As it is encoded these

bdoki bad - no one says, in addition, there presentedin
something which is always constant bytes.


  Blocks 2-5 - the system itself or
empty - if the disk is not bootable.


  Starting with the block 6 is
directory. It consists of one
or more segments - each with 1024 bytes - 2 blocks. The number 
of segments can be specified when initializing the disk. It is 
assumed that all information in the double-byte directory - a 
total of 512 words (pairs of bytes) in the segment.



  The first five words - service:


  Word 1 - the number of segments in
directory.


  Word 2 - the number next
segments: the segments form a list, the last segment is 
numbered zero. 


  Word 3 - the number of employed
segments, only changes in
the first segment.


  Word of 4 - the number of additional
bytes in each record on file.
The system uses 14 bytes - 7
words in the file, but special
programs may have their own segments with a length of the 
descriptor file.



  Word 5 - Number of primary
block of the first file
segment.

 Standard Recording File - 7
words:


  Word 1 - the type of record in the file:


    # 0100 - temporary

            File-It

            ispolzuessya word

            six

    # 0200 - deleted files -

            empty space in the

            CD

    # 0400 - a normal file

    # 8400 - READ ONLY

    # 0800 - the end of the segment,

              but not directory

              end of catalog

              determined if

              this segment -

              Last used
              transformations.

Not necessarily used by all
segment before the end of the transition to a new segment, 
perhaps with another length of the file descriptor, can

happen anywhere.


  Words 2, 3, 4 - name and extension in the code RADIX-50 - 6 
and 3 characters. 


  Word 5 - length of the file or empty space.


  Word 6 - for a temporary file
in the low byte channel number
associated with the file problem
number of which - in the high byte.


  The Word 7 - file creation date:

    Bits 0-4 - year-1972

             (T.e.1972 - 2004)

    Bits 5-9 - day (1-31)

    Bits 10-14 - month (1-12)


  There may be additional
bytes.


  Position of the file on disk
must be determined by adding
lengths of the files beginning with the first
File this segment and
file is going to be given,
plus a fifth word of this segment. It looks like a winding 
ribbon of recorder on the counter, in other matters, this OS 
has its chronology with tape times. 

Naposdedok add that to the OS RAFOS possible virtual drives, 
files, whose structure repeats the breakdown of the disc.








Other articles:

From the Editor - the story of creating a magazine.

Guide - the detailed contents of rooms.

Description shells - a description of the shell and methods for its proper operation.

Authors - the authors.

Assembler - Z80 Flags: undocumented command processor Z80.

Assembler - Overlays for JC: Description of methods for creating utilities running Jemmini_Commander 4.0T.

Assembler - Secrets of the TR-DOS: the methods of distribution presence drives.

Assembler - Circles on the water: The algorithms simulate the effect of a well-known on other platforms, called "ripples."

Assembler - search path. Solution to the problem of "static" find the shortest route between two points.

Spending - The mechanical effect. This story is about what happens using condoms dubious origin.

Iron - Bugs keyboard: why in the game for two players, when playing together, the computer does not listen to your management, and information on how to avoid it.

Iron - Interrupts: Something strange about the interruptions of the second kind.

Technical assistance - the thought aloud. It is interesting letter from fido7.zx.spectrum conference on the theme "On the question of standardization."

Technical assistance - File FAQ. A complete analysis of file formats, most often vstechayuschihsya the Internet, and not only, as well as methods for their conversion into a "normal" form.

Technical assistance - Dos Review: material on the format of the disk operating system IS-DOS.

Technical assistance - Dos Review 2: The material on the format of disk operating systems, PC "Agat", Radio-86RK, SP-DOS, BK-0011M.

Technical assistance - Dos Review 3: The material on the format of the disk operating system CP / M, ASC SOUND MASTER, RT11, SM computers RAFOS.

Technical assistance - Dos Review 4: The material on the format of the disk operating system from an unknown author.

DI: HALT: 99 - An analysis of DH: 99. Finally, the whole truth about the past summer, in Dzerzhinsk party, from the organizers themselves.

DI: HALT: 99 - Hidden Parts. Dzerzhinsky life (not only) in the period spektrumistov of DI: HALT: 99.

DI: HALT: 99 - The results. Having walked DH: 99, almost every other newspaper, considered it their duty to come up with a new version of the results. This article is the direction on the fact that finally put the record straight "I".

Programs - Alien: description and walkthrough of the film "Alien."

Programs - description of the Universal AntiProtector 0.01 (a program for automatically splitting a number of popular defense systems).

Programs - Editor-game screens, "White Spot".

Programs - Exhumator: a program to "drive the exhumation."

Programs - chankovy graphics editor: Hard Core ver 3.01

Programs - Eye of crying: the files of allowing to watch pictures, sprites, while listening to etommuzyku.

Spending - Verse of Sysop'e. Poetry, but ...

Spending - Sex and Fido. Humorous raskaz about What about actually making love inveterate fidoshniki.

Spending - Anecdotes. A selection of jokes with a computer theme.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Expert Tips - Game Scorpions: Die Machines.
Aperativchik - Freebies will be no more.
Advertising - Advertisements and announcements ...
Proclamation - advertisements and announcements about finding friends on the Spectrum.

В этот день...   25 April