FIRST:
=======

http:// ??? (.sk? .cz? .uk?)
MB-02
This is a fairly new disk interface that takes the Speccy beyond where it should go. DMA, clock 
(optional), up to 512kb memory, works with old games by trapping tape loading calls... It speaks 
for itself. The datasheets for the DMA chip and RTC are available but programming 
information/system interfaces are still mainly in Czech. I now have the technical manual!
Multiface
Multifaces are an indispensable item for every gamesplayer ever to own a Speccy. I'm sure you 
know about them - interrupt a Speccy game at any point and change memory, or use it's RAM to 
store small programs (for hacking ) or for other data.
I've got the programmer's help sheet ready to type the info from, should be arriving here soon. I 
had the MF3 so am not so sure about ports for other Multifaces. Ports could be #5F and #7F.
To enable your own routines to run in a Multiface, you need to set the following values in the 
MF memory:
MF Memory settings

 Hex	Decimal		Data	Ascii equivalent
&2000	8192		Low byte of code start		
&2001	8193		High byte of code start		
&2002	8194		0	(zero)	
&2003	8195		&52	"R"	
&2004	8196		&55	"U"	
&2005	8197		&4E	"N"	
Remember that once the red button has been pressed, the MF RAM occupies the space the 
Spectrum ROM used to and so you cannot directly call ROM routines from there. You need to 
call them via the RAM above 16384.
To page the MF RAM in or out, read from the specified ports below, for example using IN 
A,(xx) in machine code (use IN to page both in and out...). To re-enable the stop button for 
normal operation, OUT to the port (eg OUT (xx),A). The Multiface 3 has less space than the 
others for usable RAM, as you can see.
Port/Address Details
 Ports/Addresses		Meaning
MF1	MF128	MF3	
		&3F		Page In MF
	#7F?	&BF		Page Out MF
	#7F?	&BF or &3F	Re-enable Stop button
		&260B(9739)	First RAM address usable
		&3FD7(16343)	Last RAM address usable
			
SECOND
======
Programming the Speccy


http://www.sintech-shop.de/home/spectrum-products.htm

Still the Spectrum is very important for us and we still supply a lot of products for this system. 
Here is a small overview about our range of products: 
The MB02+ 
The development took quite a long time, but now after about 1 year of development, the MB02 is 
out on the street. There has never been written so much about a disc interface, because there was 
never one like this. If you have never heard about it, take a look at it's most important features: 

Floppy disk space: HD 1.86 MB, DD 840 KB 
Speed: HD: 40-50 K/Sek., DD 25 K/Sek. 
Internal Memory: EPROM 2K (max. 64K), SRAM 128K (max. 512K) 
First rate DOS - a tape-compatible system (that is a great advantage) 
Up to 256 sub-directories on one disk 
Built in DMA-chip 
Available with DOS-supported real time clock 
Built in Kempston-joystick interface and 3-channel two-way parallel port 
One of the greatest advantages of the MB02+ is it's DOS. It's easy to learn and quite good to 
handle. In fact you don't have to learn new commands for the first steps. All you know about 
tape-loading is enough. With the tape-compatible system you can use the disc like a tape and 
more: You can even copy the software from tape to disc without having to change the loader, as 
long as the loader uses the ROM-routines (most loaders do). The DMA-chip can be very useful, 
too. If you learn how to use it, you can speed up all your programs by a distinct amount. Some 
programs were already patched so that they can take advantage of this chip. For example you got 
great new graphic-possibilities like running the MULTITECH-Picture Format with making great 
screens with many grey-shades (see pictures below). Amongst them are classic games like Elite 
and Ghostbusters, which now run up to 50 percent faster. 
As expansions to the MB02 Standard Model, we offer extra 128, 256 or 384 kB SRAM, Printer 
cable, Power supplies (MB02 needs extra 5V supply), Floppy-cable and RTC-Clock. Still thats 
not all, we currently have a prototype of IDE-Interface running with MB02 system. Look out for 
further news on MB02. 



THIRD
=====
http://www.breezer.demon.co.uk/spec/tech/mb02.html
MB02 Disk Interface (and more)
I have just become the proud owner of an MB02 disk interface. As it is such a new interface and 
little exists for it yet (but I aim to code stuff for it), I decided it needed a page to itself. See 
Sintech's page for the specifications (he sells them).
The DOS and BIOS were programmed by Busysoft and one of the major advantages is that it 
emulates the tape loading/saving routines in the Spectrum ROM at 1218/1366 (decimal). So any 
programs that load using these methods (or from BASIC with normal LOAD / SAVE statements) 
will automatically use the disk instead of the tape. You can also switch from using tape to disk in 
case you still want to use tape occasionally (but I can't see why, except to transfer stuff).
The interface itself has DMA, support for a realtime clock (optional chip), a reset button to reset 
Spectrum and MB02 (doesn't work on +2A/+3), SRAM memory up to 512Kb for use in machine 
code or as a RAMdisk, and an NMI generator button like the +D/Disciple had.
There are also extra commands for disk operations - it supports subdirectories, and he has made 
some updates to the standard Spectrum ROM which give better editing and other functions (like 
poking a string to memory, using up/down cursors in editing, peeking/poking 16-bit values,...). 
You can also easily make machine code routines that take command line parameters using NEW 
which has extended uses as do some other commands.
Picture to come soon!
Latest version of the English Technical documentation is also available as a text document.
Other people who own MB02's include:
?	L.A.Esq of Raww Arse (used to be Extacy-3) 
?	Bogie, also of Raww Arse (old E-3 again) 
?	Sintech (of course!) 
?	Busysoft (BS-DOS/BIOS maker) 
?	Nele Abels-Ludwig (email Abels@stud-mailer.uni-marburg.de) 
Software
There are not as many utilities that use the advanced features of the MB02 yet, but new ones are 
always being written. I myself have written TAP2BS which converts TAP files used in emulators 
to original program/code files for the Spectrum. There are also several essential utilities on the 
standard/latest system disk and demos that use the DMA to give very impressive Speccy effects. 
Games that are converted load quicker and can offer more features (but not many are improved 
except for the loading time/use of extra memory).

FOURTH
=======

SPECIFICATION:
#################################
## MB-02 technical description ##
#################################

Contens:

  1. ROM bios
  2. FDC bios
  3. BS-DOS services
  4. Disk format specification

(c) Busy soft, version 2, Index 980628151500

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

          *** ROM-BIOS ***

ROM-BIOS switches ram banks and disables writing to ram banks of MB-02.
It allows calling program between ram banks without use of memory above 
#4000.

Preview
~~~~~~~
  call #3C98 ... switch to ROM bank, write disable (works in both bank)
  call #3C9A ... switch to DOS bank, write disable (works in both bank)
  call #3C9C ... switch to ROM bank, write enable  (works in both bank)
  call #3C9E ... switch to DOS bank, write enable  (works in both bank)
  call #3CA0 ... call from one bank to other bank  (works in both bank)
  call #3CA2 ... set tape as actual medium (works in ROM bank only)
  call #3CA4 ... set disk as actual medium (works in ROM bank only)

Detailed description of calls
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bank switching calls: #3C98, #3C9A, #3C9C, #3C9E
These callings works in both ram bank - ROM and DOS.
It's strongly recomended do NOT use OUT instructions
for ram switch because address and data of switching
port is depended MB-02 versions.

Interbank calling: call #3CA0
Use this "far call" CALL #3CA0 by this way:
Program runs in DOS bank and it wants call any routine
(for example #22AA to compute coordinates) to ROM bank.
It is possible by this way:

program:
	...
	call #3CA0
	dw #22AA
	...

The same way can be used if ROM bank is switched and program wants call
any routine to DOS bank.

After called routine finished, program will continue in own bank.
Bank switch in CALL #3CA0 do not change any registers nor flags,
and it needs only 8 bytes memory on stack. SP must be above #4008.

NOTE: Since RST #28 is redirected to address #3CA0 in DOS bank, then
if program runs in DOS bank and it wants call program into ROM bank,
it can do:
	...
	rst #28
	dw #22AA
	...

Redirection rom load-save routines between tape and disk: call #3CA2, #3CA4
Rom load-save routines (entry points #4C6 and #562) may work with classic
tape by classic way, or they may work with disk. What device will be used,
it's set by these two calls. It's particulary equivalent to '@' commands:
Zero parameter means LOAD/SAVE commands redirected to tape and non-zero
parameter means to disk.

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

       *** FDC-BIOS ***

All accesses to FDC controller are via this FDC-BIOS.
Processor does not make hard-time operation, then you can use freezer
or run some routine from IM2 while any disk operation is running.

If you make some routine in IM2, then this routine CAN NOT:
 - modify any settings of FDC and DMA controllers
 - contains time-precision loops (because DMA makes slow down processor)
 - run longer than 5-10 ms (this is not so important)
 - switch MB-02 ram banks by any way
 - and all modified registers must be PUSHed and POPed of course :)

All services of FDC-bios may be calling by RST #18 in DOS ram bank.
Register A must contains number of service. Other registers can contain
another parameters for the called service.

Preview
~~~~~~~
 #00: RESET ..... reset FDC controller
 #01: STATUS .... read status information
 #02: RESTORE ... move head to track 0
 #03: SEEK ...... move head to track N
 #04: RDSEC ..... read sector
 #05: WRSEC ..... write sector
 #09: REZIM ..... set density
 #0C: AKTIVE .... turn on drive N
 #0D: PASIVE .... turn off all drives
 #0E: INFO ...... get information about drive
 #0F: SETMAX .... set maximal length of data transfer
 #10: SETMLT .... set multitasking routine
 #11: SETOFF .... set turn-off motor mode

Detailed description of services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Number of service: Mnemotechnical name of service
                  I: Register = value [input parameters]
                  I: Register = value [output parameters]
  ...description of service...

 #00: RESET
   O: A=status
 Reset FDC controler.
 This is good to call before work with FDC bios at begin of application.

 #01: STATUS
   O: A=status
 Returns status only. Status is described below.

 #02: RESTORE
   O: A=status
 Move drive head into track 0.

 #03: SEEK
   I: D=track
   O: A=status
 Move drive head into track D.

 #04: RDSEC
   I: DE=physical number of sector, HL=address
   O: A=status
 Reading of sector DE into memory at address HL from disk.

 #05: WRSEC
   I: DE=physical number of sector, HL=address
   O: A=status
 Writing of sector DE from memory at address HL to disk.
 There is no need call service SEEK before RDSEC and WRSEC.
 If it is needed, RDSEC and WRSEC does seek automatically.

 #09: REZIM
   I: E=0 pre DD, 1 pre HD, 2 pre ED, ...
   O: Z=ok, NZ=error
 Set of density in active drive.
 If NZ occured, disk drive does not support this density.

 #0C: AKTIVE
   I: E=number of drive
   O: A=result
 Turn on drive E and turn off all other drives (if some of them was active).
 Results may be:
   0 ... unknown disk ..... disk drive does not exist
   1 ... disk not ready ... disk drive does not contains diskette
   2 ... disk activated ... succesful, diskette was not changed
   3 ... disk activated ... succesful, diskette may be changed
 If 0 or 1 occured, no drive will be active.

 #0D: PASIVE
 Turn off all disk drives.

 #0E: INFO
   I: E=number of disk drive
   O: DE=information about disk drive
 This service returns these informations:
   D = number of tracks
   E = supported densities
       bit 0 = 1 ... DD
       bit 1 = 1 ... HD
       bit 2 = 1 ... ED
   If disk drive does not exist, DE will be set to 0.

 #0F: SETMAX
   I: BC=maximal length of data movement
 This service sets maximal number of bytes for DMA operations.
 This service is not important for user applications.

 #10: SETMLT
   I: HL=multitasking routine address (or 0 if no multitasking)
 Since DMA does data transfer between memory and FDC controller,
 another machine code program may run while this data transfer is running.
 HL contains address of routine called on begin of all DMA transfers.
 DMA transfers are used in services RDSEC and WRSEC.
 If you want run some routine while sector is reading, writing,
 then this routine CAN NOT (the same rules as IM2 routine):
  - modify any settings of FDC and DMA controllers
  - contains time-precision loops (because DMA makes slow down processor)
  - run longer than 5-10 ms (this is not so important)
  - switch MB-02 ram banks by any way
 Routine may change any registers and must end by classic RET.

 #11: SETOFF
   I: E=turn-off motors mode
 If E=0 then PASIVE will turn off whole disk drive (enable and motor).
 If E=255 then PASIVE will turn off only enable of disk drive.
 In this case, motor will be continue running.
 This is useful if you want access two disk drives in short time
 intervals, then you must not wait for starting of disk drive motor.

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

Description of physical number of sector:
  bit 0-7,D ... track
  bit   7,E ... side (head)
  bit 0-6,E ... number of sector on track D

Description of status byte:
 Bit    Name of event              Posibble situation     Services
  0 ... time out ............. service works too long ... [#04-#05]
  1 ... disk not ready ..... diskette is not in drive ... [#04-#05]
  2 ... lost data ................ DMA transfer error ... [#04-#05]
  2 ... track 0 ............. Disk head is on track 0 ... [#00-#03]
  3 ... CRC error .......... reading is not succesful ... [#04]
  4 ... record not found ......... disk not formatted ... [#04,#05]
  4 ... seek error ....... drive has not track 0 (?!) ... [#02]
  5 ... break ....... Q+W was pressed in DMA transfer ... [#04-#05]
  6 ... write protect ... Diskette is write protected ... [#00-#02,#03,#05]
  7 ... not ready ......... cannot turn on disk drive ... [#04-#05]
 Bit is set if the event was occured.

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

       *** BS-DOS Services ***

All services of BS-DOS may be calling by RST #20 in DOS ram bank.
Register A must contains number of service. Other registers can contain
another parameters for the called service.

Preview
~~~~~~~
 #00: GETVER ...... get version number of BS-DOS
 #01: DISP ........ print one character
 #02: ENTER ....... move cursor to next line
 #03: TAB ......... move cursor to column N
 #04: TXXT ........ print text
 #05: DEC8X ....... print 8-bit number
 #06: DEC16X ...... print 16-bit number
 #07: DEC32X ...... print 32-bit number
 #08: DEC32 ....... 32-bit decrement
 #09: INC32 ....... 32-bit increment
 #0A: ADD32 ....... 32-bit addition
 #0B: SUB32 ....... 32-bit substraction
 #0C: SDDX ........ print mode
 #0D: BEEP ........ sound signal
 #0E: PREVODX ..... sector number conversion
 #0F: HOWSEC ...... file length conversion
 #10: KUKNI * ..... actualize internal cache
 #11: KUINI * ..... actualize internal cache with cache reset
 #12: GETCST * .... get current path
 #13: SETDRV ...... set disk drive
 #14: SETDIR * .... set directory
 #15: SETLCX * .... set load-cursor
 #16: GETSUB * .... get directory entry
 #18: KOLKOX * .... get directory lenght
 #19: SEASX * ..... searching file by name and type
 #1A: SEADX * ..... searching directory by name
 #1B: OWSUB * ..... owerwrite directory item
 #1E: KILLX ....... reset internal cache
 #1F: FREEX * ..... get free space
 #27: UTRASX * .... repack directory
 #28: ERASEX * .... erase file/directory
 #29: ERASIX * .... erase more files
 #2A: MOVEXX * .... move file/directory
 #2B: MOVEIX * .... move more files
 #2C: CATX * ...... catalogue of directory
 #2D: SEAXXX * .... searching substring in names
 #2E: CATXD * ..... cataloque of directory on another disk
 #2F: SEAXXD * .... searching substring on another disk
 #33: FORMX * ..... quick format
 #34: MESSX ....... print text as system message
 #36: UNERAX * .... unerase file/directory
 #37: UNERIX * .... unerase more files

Services marked with '*' return carry flag by this way:
If CY is set then service happened successfully,
if CY is reset then an error occured (user did 'abort' probably).

Some services want and/or return 32-bit value. This value is always
in DE,HL registers, D is highest byte and L is lowest byte:
DEHL Value = 256^3*D + 256^2*E + 256^1*H + 256^0*L

Detailed description of services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Number of service: Mnemotechnical name of service ['*']
                  I: Register = value [input parameters]
                  I: Register = value [output parameters]
  ...description of service...

 #00: GETVER
   O: BC=version of DOS (this manual is for version 308)

 #01: DISP
   I: E=character to print
 DOS internal PRINT routine, independent of RST #10 in basic rom.
 Cursor position is system variables XXX and YYY, actual used attribute
 is in system variable COLOR. This service do not support any control
 codes like CR,LF... Do not support scroll too. Output may be redirected
 into memory by SDDX service. Then XXX,YYY mean address of character
 storing in memory. Redirection is usable for services #04-#07.

 #02: ENTER
 Move print cursor to begin of next line. Rest of old line is filled by 
spaces.

 #03: TAB
   I: E=number of column
 Printing spaces while print-cursor is not on column E.

 #04: TXXT
   I: HL=begin of text
 Print text. Text must be ended by #00.

 #05: DEC8X
   I: E=value, C=character for left zeros
 Print 8-bit number. If you want left-justify, then C must be 0, if you
 right-justify, then C must be #20. For print one character, DISP is called.

 #06: DEC16X
   I: HL=value, C=character for left zeros
 Print 16-bit value. C is the same as in DEC8X.

 #07: DEC32X
   I: DEHL=value, C=character for left zeros, B=maximal length of number
 Print 32-bit value. C is the same as in DEC8X, B is maximal count
 of character from right of printed number. B must be no longer than 10.

 #08: DEC32
   I: DEHL
   O: DEHL = DEHL-1

 #09: INC32
   I: DEHL
   O: DEHO = DEHL+1

 #0A: ADD32
   I: DEHL,BC
   O: DEHL = DEHL+BC

 #0B: SUB32
   I: DEHL,BC
   O: DEHL = DEHL-BC
 This four services XXX32 handles 32-bit arithmetic.

 #0C: SDDX
   I: E=print mode
 This service says how DISP will be printed characters.
 E=0...DISP will be printed characters into screen.
 XXX and YYY is print position, COLOR is attribute of printed character.
 E=1...DISP will be printed characters into memory.
 XXX,YYY is address (XXX=low,YYY=high byte). COLOR has no meaning.

 #0D: BEEP
 Some like as BEEP basic command, but uses AY-3-8912 for no change border.

 #0E: PREVODX
   I: HL=logical number of sector, E=sector per track
   O: HL=DE=physical number of sector
 Sector number conversion. Physical number of sector see in FDC bios part.

 #0F: HOWSEC
   I: DEHL=length of file
   O: BC=number of sectors if Z, overflow if NZ
 Conputing number of needed sector on disk for file with length DEHL. If file
 needs more than 65535 sectors, overflow occured. Nore, 1 sector = 1024 
bytes.

 #10: KUKNI *
 Checks diskette into disk drive and actualizes internal cache memories.

 #11: KUINI *
 Reset internal CACHE memory and reread all disk system sctructures.
 This is the same as calling #1E:KILLX and then #10:KUKNI.

 #12: GETCST *
   O: D=actual directory, E=actual disk, HL=load-cursor (actual file)
 Get actual path.

 #13: SETDRV
   I: E=number of disk drive
 Set actual drive. Does not try read diskette into selected disk 
immediatelly.

 #14: SETDIR *
   I: E=number of directory
 Set actual directory on diskette in actual disk drive.

 #15: SETLCX *
   I: BC=new load-cursor
 Set actual load-cursor. This is like rewing a virtual tape into file BC.

 #16: GETSUB *
   I: BC=number of file (load-cursor), IX=address of 32 byte buffer
   O: NZ = succesfull (directory item exist), Z = invalid directory item
 Get directory entry BC from actual directory.

 #18: KOLKOX *
   O: DE=directory items
 Returns how many directory items are in actual directory.

 #19: SEASX *
   I: HL=address of 10 character string, E=type of file
   O: NZ = file not found, Z = file found successfully
 Searching file by filename and type of file. Filename is 10 characters
 long and must be match exactly. Filetype is very know number from basic:
 0=basic, 1=number array, 2=character array, 3=bytes. If E is 255 then
 any filetype matches. This service searchs file from actual position
 of load-cursor to end of directory and then from begin of directory
 to actual position of load-cursor. If file found, load-cursor will be
 set to this file and searching is stopped immediatelly.
 
 #1A: SEADX *
   I: HL=address of 10 character string
   O: NZ = directory not found, Z = found and A = number of directory
 Searching directory by name. Name of directory is 10 characters long
 and must be match exactly. This service searchs directory from actual
 directory to end of directories (directory 255) and then from begin
 of directories (directory 0) to actual directory. If directory found,
 then A is set to this directory.

 #1B: OWSUB *
   I: HL=number of file, IX=new directory item
 Overwrite directory entry. If entry HL does not exist, nothing occured.
 This service is usable for renaming of files, setting anther start
 address, change date, time and type of file.
 Warning ! Use this service carefuly because you can damage data integrity
 on disk (for example if you change length of body).
 The best using of this service is: First of all call GETSUB for get
 directory entry, then make some modification what you want and then
 store this entry into disk by this service OWSUB.

 #1E: KILLX
 Reset internal cache of disk.
 This service is needed if you change data on disk by another way as DOS
 services. For example, if you write some disk sctructure sectors
 by FDC-bios services, DOS do not know what data is changed.

 #1F: FREEX *
   O: DEHL=free space ondisk in bytes, BC=in sectors
 Get free space on diskette in actual disk drive.

 #27: UTRASX *
 Repack directory. Deletes empty directory entries (after deleting files).
 Warning: Unerase after this service is not possible.

 #28: ERASEX *
   I: BC=number of file
 Erase file BC. If BC=0 then erases all directory.

 #29: ERASIX *
   I: BC..HL=range of files
 Erase files from BC to HL. If BC=0 then erases all directory.
 This service is more more faster than calling #28:ERASEX for each file.

 #2A: MOVEXX *
   I: BC=number of file, E=destination directory
 Move file BC from actual directory to directory E.
 If E is actual directory then it moves file at the end of directory.
 BC=0 means swap actual directory and directory E.

 #2B: MOVEIX *
   I: BC..HL=range of files, E=destination directory
 Move files from BC to HL to actual directory.
 If E is actual directory then it moves files at the end of directory.

 #2C: CATX *
   I: BC=directory specification
 Print directory as CAT/COPY basic command.
 If B=1 then actual directory will be printed,
 if B=0 then directory C will be printed.
 Bit 0 of system variable OPTIO says erased items will be printed too.

 #2D: SEAXXX *
   I: DE=string address, BC=string length (max 10)
 Searching substring in file names as .SEARCH basic command.
 Bit 0 of system variable OPTIO says erased items will be assumed in 
matching.

 #2E: CATXD *
   I: BC=directory specification, L=disk drive
 The same as CATX but actual directory of disk in disk drive L will be 
printed.

 #2F: SEAXXD *
   I: DE=string address, BC=string length (max 10), L=disk drive
 The same as SEAXXX but diskette in disk drive L will be searched.

 #33: FORMX *
 Quick format. Erases all directories and files on disk.

 #34: MESSX
   I: HL=text address
   O: CY=result of user interaction (CY=retry/ok,NC=abort)
 Print text as system message and wait for ENTER or SPACE. Text must
 me no longer than 28 bytes and must be ended by bytes #00 and #C9.
 For example: DB 'blah-blah-blah',#00,#C9

 #36: UNERAX *
   I: BC=number of file
 Unerase file. If BC=0 then it unerases directory.
 Note: Disk has all information of file after erase this file too.
 Then unerase immediatelly after any erase is always successfull.
 Unerasing files in unerased directory is no automatically.

 #37: UNERIX *
   I: BC..HL=range of files
 Unerase files from BC to HL. If BC=0 then unerases directory.
 This service is more more faster than calling #36:UNERAX for each file.


BS-DOS system variables
~~~~~~~~~~~~~~~~~~~~~~~
   #03E0 XXX ....... column or low byte of print position
   #03E1 YYY ....... row or high byte of print position
   #03E2 COLOR ..... used attributes for print characters
   #03E3 OPTIO ..... some flags

 OPTIO bits:

   bit 0 .... mode of catalogue printing and searching (used by #2C-#2F)
              0 = only valid files
              1 = deleted files too
   bit 1 .... begin of catalogue printing (used by #2C,#2E)
              0 = from begin of directory (file 1)
              1 = from actual position of load-cursor
   bit 7 .... reset internal chache before writing operations
              0 = make reset
              1 = do not make reset
   Another bits are unused but must be 0 for future compatibility.

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

      *** DISK FORMAT ***

BOOT sector
~~~~~~~~~~~
 physical number: track 0, side 0, sector 1
 logical number: 0
 This sector contains:

  #00-#01 ... Jump to system loader (#18,#7E)
  #02 ....... not used, usually #80
  #03 ....... byte #02 (MB-02 mark)
  #04-#05 ... number of track on disk (usually 80)
  #06-#07 ... number of sectors per track
  #08-#09 ... number of sides of disk (usually 2)
  #0A-#0B ... number of sectors per cluster (usually 1)
  #0C-#0D ... logical number of DIRS sector
  #0E-#0F ... number of FAT sectors FAT (usually 1 to 4)
  #10-#11 ... length of FAT (#400 * number of FAT sectors)
  #12-#13 ... logical number of first sector of first FAT
  #14-#16 ... logical number of first sector of second (backup) FAT
  #20 ....... byte #00 (MB-02 mark)
  #21-#24 ... date and time of disk formatting
  #25 ....... byte #00 (MB-02 mark)
  #26-#2F ... name of disk
  #30-#3F ... extension of name of disk

MB-02 marks says if it is MB-02 disk.


DIRS sector
~~~~~~~~~~~
 This sector contains 256 items, each item contains following 4 bytes:

  #00 ....... identification
              #80 = valid items for existing directory
              any other = directory does not exist (usually #00)
  #01 ....... XOR of name of directory (for speed-up search)
  #02,#03 ... logical number of first sector of directory (bits 0-13 only)


SUBS sectors (directories sectors)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
They contains 32 bytes items:

  #00 ....... identification
              #90 = file contains only head
              #A0 = file contains only body (headerless)
              #B0 = file contains head and body
              #80 = file contains no head nor body (it's not often)
              Another values means invalid directory item.
  #01-#04 ... date and time of file
  #05-#15 ... classic 17-byte tape header
  #16-#17 ... additional address of body
  #18-#1B ... length of body (#18=least, #1B=most significant byte)
  #1C ....... flagbyte of body
  #1D ....... attributtes of file
  #1E-#1F ... number of first sector of file

 0th item in directory contains no any file but has special meaning:

  #00 ....... identification (usually #80)
  #01-#04 ... date and time of file
  #05 ....... number of up-directory in tree (but not only tree!) structure
  #06-#0f ... name of directory ($"name" command find it)
  #10-#1f ... extension of name of directory


File alocation table
~~~~~~~~~~~~~~~~~~~~
 FAT contains 16-bit items, each item specified one sectors on disk.

 Bit 15: 0 ... free space
         1 ... not free space (used or error)
     14: 0 ... last sector of file
         1 ... not last sector
   0-13: [bit14=0] ... number of bytes to end of file in this last sector
         [bit14=1] ... logical number of next sector of file

 If high byte (bits 8-15) is set to #FF, then meaning
 of low byte (bits 0-7) is different:

   #00 ... special sector (boot, system, back-up)
   #F? ... unusable sector:
       #FC - error [Formatter detected CRC error]
       #FD - error [Formatter detected Record mot found]
       #FE - sector not exist (2nd side of one-side disk)
       #FF - sector not exist (out of physical range of disk)

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




