SPM
ZXNet echo conference «zx.spectrum»
From Vova Hex → To All 9 February 1998
Dear Andrew!
Is there a converter for FDI to SPM images? Anadisk doesn't work for me, but
I would like to look at an iS-DOS disk larger than 800K in size. Or advise how to
do it.
Yours truly, Hexman/BYTEX.
[Team ZX ASM] [Team Metallica] [Team Art Works]
From Andrew MOA → To All 12 February 1998
On the day 09 Feb 98 Vova Hex had the good fortune to write to Andrew MOA:
VH> Is there an FDI converter to SPM images?
Apparently not.
VH> Anadisk does not work for me, but I would like to look at an iS-DOS disk
VH> with a size of more than 800K.
What is the structure of this disk (how many and what sectors per track)?
VH> Or advise how to do this.
Either send me the FDI format, and I will embed it, or use the
FDD format and write the converter yourself.
=== Cut ===
/* --------------------------------------*/
/* SPM (c) 1995-1998 MOA */
/* --------------------------------------*/
/* floppy disk image emulator (image.fdd) */
/* ------------------------------------- */
// "floppy disk" parameters
#define versionLength 30
#define TRACKMAX (85*2)
#define SECTMAX 30 // number of sectors per track
/* disk image file format */
/* header */
struct diskHEADER {
char head[versionLength]; /* signature */
byte trkMax; /* number of tracks, total excluding heads */
byte headMax; /* number of heads (1 or 2) */
long diskIndex = 0l; /* unused */
long trkIdx[TRACKMAX]; /* offset in the file to header structures */
/* tracks */
};
/* location of the rest of the information in the file is not fixed */
/*track information */
struct diskTRACK {
byte trkType = 0; /* unused */
byte sectNum; /* number of sectors on the track */
struct {
/* sector header */
byte trk; /* track number */
byte side; /* side number */
/* Bit 7 of this byte indicates bit a */
byte sect; /* sector number */
byte size; /* sector size (code) */
long sectPos; /* file offset to sector data */
} sect[SECTMAX];
=== Cut ===
The signature must be “torn out” from any FDD file created by the emulator.
Andrew
From Vova Hex → To All 12 February 1998
AM> Either send me the FDI format, and I will embed it, or use
AM> the FDD format and write the converter yourself.
It is better to send the FDI format. :) Мылом не рискую, так что...
=== Cut ===
##############################################################################
# #
# Формат FDI-файла #
# #
##############################################################################
Поскольку по ряду причин существующие форматы floppy disk image files
were not suitable (lack of documentation, and most importantly - the impossibility of expanding the
format to record complete images of tracks, areas with physical defects
etc.), so I had to create my own format. I cannot guarantee
that the *.FDI extension is not used by anyone else for other purposes; therefore
let me make a reservation that this description is relevant only for files created
by the MAKEFDI program and used by the SP_EMU (Spectrum debugger) program.
------------------------------------------------------------------------------
Offset Field length Description
------------------------------------------------------------------------------
0 3 Key label'FDI'
3 1 Write protection flag (0 - write enabled, 1 - write disabled)
4 2 Number of cylinders
6 2 Number of surfaces
8 2 Text offset (short comment to the disk)
A 2 Data offset
C 2 Length of additional information in the header. In this version - 0
E "Additional information length"
Format not yet defined (reserve for further modernization)
E+ "additional information length"
???
Track header area. Here you can find all the information about
floppy disk format. This area must contain at least
"Number of cylinders"*"Number of surfaces" headings. The headers
are in the order Cyl 0 Head 0, Cyl 0 Head 1, Cyl 1 Head 0, etc.
The header format is described below.
"Text offset"
???
Disk comment. The end of the comment is a null character.
MAKEFDI when creating a new file allows you to enter a comment
of no more than 64 characters with a terminating null, but when working with file
the length of this field will be determined by the position of the terminating
null character
"Data offset"
???
Here lies the actual data from the sectors. How many sectors there will be
, their length and order depend on the format.
------------------------------------------------------------------------------
The FDI file format allows gaps between areastrack headers, text
comment and data area.
Track header format
------------------------------------------------------------------------------
Offset Field length Description
------------------------------------------------------------------------------
0 4 Track offset - the beginning of the data area of this track
relative to the "Data offset"
4 2 Always contains 0 (reserve for upgrade)
6 1 Number of sectors on the track
7 (Number of sectors)*7
Information about sectors on the track. Each sector is described by 7
bytes. The first 4 bytes are the standard parameters C,H,R,N from the
address marker. The next byte is flags:
bit 7=0 - normal data marker, 1 - deleted data;
bit 0-5: CRC flags. A one in one of the bits means that
when reading that sector for a length of 128,256,1024,2048 or
4096 bytes, the correct checksum is obtained. If all
bits are 0, the sector is written with a checksum error.
bit 6: In this version it is always 0. Perhaps a 1 in this bit
will indicate an address marker without a data area.
The last 2 bytes are the offset of the data of this sector relative to
the beginning of the track data area. To get the absolute address
in the file, to this number you need to add "Data offset" and
"Offsettrack"
---------------------------------------------------------------------------------------------------------------------‑---------------------------------- --------------------------------------- into tracks
7*(pnumber) of sectors Note that the flags byte in the sector description is not yet used by the
emulator.
Carbon K === Cut ===
This. всё...
<