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

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.

<b>Technical assistance</b> - 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
          FILE FORMATS



                (C) Time Keeper



  In recent years, the Spectrum all
more and more "growing" in
Internet. If we make
a list of all sites devoted to
Spectrum, all ftp-servers,
which are now available for download
programs for spektrumsovmestimyh machines, they would win no 
less than a hundred. But storage formats Spectrum information 
is not standardized. Even within One site you can find 
everything: hobetnye files, trd-images fdiobrazy, tap'y, 
snapshot'y, etc. n.



  In this regard, headache
arises not only from "realschikov" trying to bring this
information in the format of the real
Spectrum, but also "virtualschikov, which also accounts for
"Spin". As a rule, they
there are several emulators
(Each of which supports
any particular part of the formats), and various programs
for the distillation of one of fomata
another. And it will agree, complete ass. It would be nice if
would be "killed" most of "unnecessary" formats, but it is only
dreams. In addition to all, not
so easy to find a description of these
formats, and often, the files downloaded from the Internet, are 
a few months before you can find a description danogo

format or program for its
decoding.


  The purpose of this article - to give readers the maximum 
knowledge about the different storage formats Spectrum 
Information on IBM-PC and Internet, are most frequently 
encountered to date. 

-------------------------------


       TRD-format file.


  This format is used
Spectrum emulator as
floppy image. That is, when in
work in the emulator is
appeal to the TR-DOS, emulator working with this file, assuming 
it floppy disk. Image Format *. trd -

one of the easiest. This,
Indeed, an ordinary two-way
80-track TR-DOS disk
sixteen sectors per track, 256 bytes each. That is, in
file in this format entirely
stored content of TR-DOS disk (with partition). For
decode the format of the real
Spectrum, simply write the data contained therein
on net TR-DOS from a floppy disk
zero track. Size of files
*. Trd often equals 655,360
B (2544 +16 tr-dos sectors
), But sometimes there are circumcised *. trd images (less
655360 bytes), and "rubber" (more than 655,360 bytes).


  But for the simplicity of paying. On this disk image
You can not create custom
format, in consequence of that there is another, quite extended 
ones today, the format *. fdi. 



       FDI-format file.


  Description written by the author in this format:

------------- Cut. ------------

  Since a number of reasons, existing formats faylovobrazov 
floppies did not fit (No documentation, and

importantly - the inability to expand the format to record full
images of tracks, areas with physical defects, etc.), then
had to create your own.


  I can not guarantee that
extension *. FDI is not used
somebody else for other purposes;
therefore say, that this
description is relevant only to
files created by program
MAKEFDI and used the program SP_EMU (Spectrum debugger).



Offset (field length) Description:



00 (3) Key Tag 'FDI'.

03 (1) Flag of the write protection (0 -
write enabled, 1 - write
disabled).

04 (2) The number of cylinders.

+06 (2) The number of surfaces.

08 (2) Offset of text (a short commentary on disc).

+0 A (2) offset data.

+0 C (2) The length of the additional information in the 
header. In this version = 0.


+0 E "length for more information. Format is not yet defined
(Reserved for future upgrades).

+0 E + "length of additional
information ".

+? Labels area tracks.
Here all the information about
format a floppy disk. This area
shall contain not less than "Number of cylinders" * "The number 
of surfaces" headers. Headers are in order Cyl 0 Head 0, Cyl 0

Head 1, Cyl 1 Head 0, etc.
The header format is described below.

"Offset of text"

+? Comment to the disk. End
comment - a null character.
MAKEFDI when creating a new file allows you to enter a comment
no more than 64 characters in a null terminated, but when 
working with file length for this field will be

determined on the final null character.

"Data Offset"

+? Here are the actual data of the sectors. How many
will be sectors, their length and sequence - it depends on the 
format. 


  FDI-file format permits
gaps between the regions of the header track, a text commentary 
and data area. 


    The format of the header track:

Offset (field length) Description:



00 (4) shift the track - the beginning
data area of ​​the track
on the "data offset".

04 (2) Always contains 0 (reserved for modernization).

+06 (1) The number of sectors per track.

07 (number of sectors * 7) Information on the sectors on the 
track. Each sector is described by 7 bytes. The first 4 bytes - 
standard conditions parameters of C, H, R, N from the address

marker. The next byte - flags:

bit 7 = 0 - a marker of normal data, 1 - remote data;

bit 0-5: Flags CRC. Unit in
one of the bits means that
when reading this sector
of 128, 256, 1024, 2048 or
4096 bytes, get proper
checksum. If all
level 0 - the sector recorded a
checksum error.

bit 6: In this version, always 0.
Perhaps 1 in this discharge will be denoted address marker
without field data.


  Last 2 bytes - offset
Data in this sector relative to the beginning of the data track.
To obtain the absolute address
in a file to this number we must add "Data Offset" and 
"Shifting the track." 

7 * (sectors 1) the length of the title track.


  Note that the byte flags
description of the sector still does not
using an emulator.


                  (Uglekov K.)

------------ Cut. -------------



    Hobetnyh format files.


  This format was developed for
store individual Spectrum files on IBM-PC and transfer
them on the Internet. Take the contents of the TR-DOS file, 
ahead of it adds a header from 17

Bytes and all that is stored in the MSDOS file. Usually 
hobetnye files have the form *. $ X, where instead of X

is a symbol, an extension of tr-dos file, although it is not
always the case.

The structure of 17-byte header
added to the TR-DOS files
program HoBeta.exe:

00-07 - file name
08 - file type
09-0A - Start
0B-0C - Length
0D-0E - Length of 256-byte records (bytes 0E - the size in 
sectors) 0F-10 - Checksum


Thus, the first 14 bytes
copied from the TR-DOS directory.

Vychilenie Checksum:
S = S +257 * Di + i, where

S initial = 0
Di - byte value
i - ordinal number of bytes (starting with 0).


  But when the Internet is sent to a program consisting of
multiple files, and the order
files on the TR-DOS disk is
value, it is necessary to send
the accompanying text file
which describes how
sequence files. Many are
forget, and sometimes I have
spend a few hours to
restore the correct order
files on the TR-DOS disk. In connection
this was coined more
improved format *. scl.



       File Format SCL.


  Text taken from the guide to
Playing AMD Copier (IBM_PC).
This is the first program to support this format.


------------ Cut. -------------

 +00 (08) - the inscription 'SINCLAIR'

 09 (01) - the number of TR-DOS files
contained in the SCL file. <fnum>

 +0 A (0E * fnum) - to 14 bytes of
TR-DOS directory on each TR-DOS
file (except for the track / sector)

+0 A +0 E * fnum (??) - Directly to the content sectors.

+? (04) - 4-byte
Checksum (sum of all
previous bytes SCL file.)

------------- Cut. ------------


              to be continued ...







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:
System - Overview of system software: assembler ZXASM v 3.10 demo
SS'01 results - the results of the St. Petersburg Festival of Computer Art Chaos Construction 2001.

В этот день...   21 November