A special, Emualtor Only, CPM disk controller is implemented. 

Located at $F1A200 thru $F1A21f  (unused locations return 0)
these are illegal in real VME10

'   CmdSts-H     CmdSts-L     +00
'   Drive-H      Drive-L      +02
'   Cylinder-H   Cylinder-L   +04	DO NOT USE (may read, but NO write)
'   Head-H       Head-L       +06	DO NOT USE (may read, but NO write)
'   Sector-H     Sector-L     +08
'   DMA-hh       DMA-hl       +0a
'   DMA-lh       DMA-ll       +0c
'   Trackh       Trackl       +0e

'   Cylinders/Disk   H and L     +14h
'   Heads/disk       H and L     +16h
'   Sector/track     H and L     +18h
'   Sector Size      H and L     +1ah

accesses are done as 128 byte blocks, with auto-de-blocking

WARNING

Tis DC is used by a special BIOS for CPM (fake hardware BIOS)

Each time a disk is Logged-IN the bios determines what type of disk is being used and sets the correct DPB and XLT in the DPH. 

For IMD disk images, this simulated hardware only detects formats that are defined in the BIOS. The IMD file contains the Cylinder, Head, SPT and Sector size that is use to determine the correct format.

For Raw images, only types that are defined in the Emulator's Raw disk Handler can be used. Again, the BIOS sets proper DPB et al.

There are 7 formats described in the Raw Handler. 

 VME10 raw HD files for 5, 10, 15, 40, 70 MB drives are defined... 
  also the PC1440 floppy and the IBM 3470 SSSD format is described...

The BIOS detects 96TPI and 48TPI IMD VME10 floppy disks, along with 5, 10, 15 MB HDs and the PC1440 and IBM3470 formats. The PC1440 and IBM3740 formats can be used with either the RAW handler, or the IMD handler. 

NOTE- any unique format can be handled by the IMD handler and the BIOS. The bios checks the Number of Cylinders, heads and SPT to detect the type.  However, only RAW files, that are described in the emulator's RAW handler can be used, since there's no description of the disk in the disk image file. 

ALL accesses are done as 128 byte transfers
Uses CPM track instead of Cylinder and Head... but C and H are still there (DO NOT USE)

Status returns Cylinder and Head errors, because the writing to Track sets them
  according to CPM translation for TRACK to C and H  

Must access registers as words or longwords, not byte

Must write Track Sector in order 
Writing to Track causes the Cylinder and Head to be auto calculated and set

Reading Status clears the status, so must read status to clear errors from previous IO


read status
(select drive)
(set T S)
(set DMA)
write command to DC
read status

at any time, can read status, but clears errors 
	so if error, do NOT continue
Commands are 

	Read = 1

	Write = 2

Status word is ...

' 15 14 13 12 11 10 9  8  7   6   5   4   3   2   1   0
'                        R/W  WP DMA  C   H   S  DRV CMD


note--- sectors with compressed data are expanded on reads... 
	writes to disks with compressed sectors is not allowed

deleted address marks and sectors with errors are not handled right