To boot CDOS

load memory with an RDOS252.hex or RDOS312.hex

load memory map Cromemco.iom (this has a PRI rather than TUART for printer)

insert (open an image file) CDOS disk into drive A:
set drive properties (if not an IMD file)

type RDOS command "ba"



Warning--- some of the features requires z80 emulator 1.0.22 or higher... such as CRT Cromemco.tab file..
the .tab file uses insert mode ON and OFF, and DUMP2.. Using the Cromemco INIT disk program requires version 1.0.25 or higher

(index timing and WD write Track implemented in 1.0.25)

(Insert Mode ON and OFF added 1.0.22 and DUMP2 fixed bug in 1.0.22. If used on eariler z80 emulators, you must remove DUMP2 from .tab file, else you get an infinite loop. On earlier versions Insert mode simply does nothing)

The disks CDOS8.dsk and CDOS5.dsk are from www.schorn.ch (find lots of stuff there to use, but most will not boot on Z80 emulator, unless for supported hardware,like CDOS)... 

you may use CDOS IMD disk images ... 

CDOS IMDs also at www.dunfield.com, also find lots of stuff there.

The program IMDU (from www.dunfield.com) was used to convert to raw disk images.. 
Both contain CDOS 2.58, one sysgened for 8 inch drives and the other for 5 inch drives.

you must load the Cromemco IO MAP which remaps the 16FDC to where it belongs and removes all other IO devices. You MUST also set the drive properties to CDOS5DSDD512.FMT or CDOS8DSDD512.FMT. or use an IMD disk image.

you should also load the cromemco 3212 terminal abilities file.

you then should load memory with RDOS252 and goto c000, and then use RDOS's Boot command (;b a) 

NOTE- rdos is NOT resident in a simulated ROM.. it is loaded into RAM...it gets overlayed, so exiting to the RDOS is not possible. The new BYEE program will load a copy of RDOS252 into memory and jump to it.

since the z80 emulator (v1.0.24 or lower) does not support some of the hardware features required to initialize a disk (index not timed..always says index)and write track and read track is not implemented, you will not be able to use Cromemco's INIT.COM to initialize disks.. a switch on the 16FDC has been set to inhibit init.

to make new disks to use with CDOS.. simply make a file the right size (via Create New Disk) afterwards, you may run INIT (make sure to flip inhibit init switch) to initialize the disk. The ID in sector 1 is written durinig the Write Track command during format. The disk image MUST be the right size and the emulator's disk properties MUST be configured to access the type of disk being formatted.


( on v1.0.24 or lower) MUST add an Identification to sector 1 of track 0 ... at offset 0xf8 must exist LGDSDD (for 8) or SMDSDD (for 5)..(other IDs possible) you can use DD.EXE to copy sector 1 from an existing disk to the NEW, but it also copies the bootloader.. WRTSYS can be used to copy all of the SYS, including IDs, bootldr and sysloader... IF the IDs are not there, CDOS assumes the disk to be a standard disk for the drive type size (IBM3740 for 8) and you must set disk format to IBM3740 (for 8)

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



on Emulator 1.0.22,  must select Z80 Emulator ports only (map 2)(this map contains real hardware, too)

must load IO Remap file Cromemco.iom(1.0.23 up only) or CromemcoV22.iom(for 1.0.22)

NOTE the CromemcoV22.iom, IO Map file, needs default map to be map 2 or map 6 (map 6 only on 1.0.23 up) 
	the new Cromemco.iom, IO map, does everything for you, but only on 1.0.23 up.

or 

remap

	all ports to FF
then
	00 to 10	16FDC serial status
	01 to 11	16FDC serial data
	02-09 to 12-19	16FDC ports
	30-33 to 08-0B	WD17xx
	34 to 1A	16FDC ports
	40 to 1B	16FDC/16kZ/64kz bank select
	54 input to 41	Attempt to make printer work but fails. (bit 5 high)
	54 output to 40

this makes it appear that there is a subset of an 16FDC at 00-09 and 30-34
it also makes a printer appear at 54, but (for 1.0.22)does not work properly because it is expected to be parallel, with strobe on bit 7, so port 54 is writen 3 times to toggle strobe. 

printer works on 1.0.23 up using Cromemco PRI.

then set common memory start to 0x8000 (0x80)(this is not really needed since CDOS is not banked)

memory is organized as upper 32k common and lower 32k as 8 32k banks(simular to multiuser basic config)


--------

NOTE -- the serial status/data for the 16FDC are composite status registers... they do NOT use IO Properties settings

warning--CDOS attempts to use DLOAD/ULOAD ports, so they are made unavailable.. apparently CDOS tests for IO devices at known addresses, so it is appropriate to remap everything to an unused port, like FF

NOTE--since the CDOS program issues a read track address and then does NOT read the resulting data bytes, nor issues a force interupt, the emulated 16FDC's WD17xx will jump through hoops of fire to allow the program to think the emulated FDC is acting as the real one should (the real one would simply supply data until finished whether the data is read or not, then set lost data if no one read the data). to do this, the emulated FDC sets a countdown on every read, write, and read address command, equal to the number of bytes to be transfered+10. .. the countdown is decremented every time a staus register is read. when zero, the command is terminated and  LOST data is set. to prevent the situation where someone never polls the status , every new command automatically cancels the old. 

also, since the CDOS program apparently expects seek-in-progress bit to be set and then reset, this is done for all head move operations.