Disk
The COMX Floppy disk controller allows connection of 5.25 disk drives. The controller uses the WD1770 with a speed of 8 Mhz. Not all details of this chips are described here but can be found in the data sheets available on the COMX Club pages.
The DOS ROM is selected between address C000-DFFF and also overrides address DD0-DDF of the BASIC ROM.
The WD1770 is controlled from the COMX via the following in and outputs:
Q = 1, OUT2: Register Select
Q = 0, OUT2: Write Register
Q = 1, INP2: INTRQ
Q = 0, INP2: Read Register
EF4 (override TAPE input): DRQ
Register Select
Bit 1 and 0 are defined as for the WD 1770:
b1 | b0 | READ | WRITE |
0 | 0 | Status | Command |
0 | 1 | Track | Track |
1 | 0 | Sector | Sector |
1 | 1 | Data | Data |

Next to the register select function also drive number (bit 5) and side (bit 2/3) can be specified with bit 4 set to 1:
b5 | b4 | b3 | b2 |
|
0 | 1 | 0 | 1 | Drive 1 & Side 1 |
1 | 1 | 0 | 1 | Drive 1 & Side 2 |
0 | 1 | 1 | 0 | Drive 2 & Side 1 |
1 | 1 | 1 | 0 | Drive 2 & Side 2 |
Format
COMX DOS supports 35 tracks for both single and double sided disks and 70 tracks on single sided disks. Every track consists of 16 sectors and every sector of 128 bytes, resulting in disk sizes of max 140K.
Boot Procedure
At the first DOS command a ROM subroutine will execute 'BOOT0', this will load sector 15 of track 0 to the RAM memory location @4000. After this the routine at @4000 will be executed which is called 'BOOT1'.
The 'BOOT1' routine will load sector 0 to sector 7 of track 1 to memory location @B700-@BAFF. This routine is called 'BOOT2'
'BOOT2' contains the DOS handler, jump table and a subroutine which is executed after 'BOOT1' to set system flags and parameters.
As the BOOT procedure is partly stored on the Floppy disk, it is possible to create specific boot procedures. This was also made easier by using ‘F&M INIT’ software which initialized an empty floppy disk with a boot procedure finishing by loading a program called ‘STARTUP’. This startup program could be any user specified software.
For more advanced usage the ‘F&M Disk monitor’ could also be used allowing changing any sector of the floppy disk directly.


Initialisation in Emma 02
At least one COMX disk image should be specified as FDC 0 to boot COMX DOS. Emma 02 installs the master disk image 'dos.1.4+f&m.disk.tools.img'. When DOS NEW is used the COMX DOS should be initiated as shown on the left
After this any DOS command or utility from the master disk can be used, for explanation of COMX DOS commands please see the COMX DOS manual available on the Dutch COMX Club.
To create a new disk image including COMX DOS boot data, keep 'dos.1.4+f&m.disk.tools.img' specified as FDC 0 and any filename of your choice as FDC 1.
To format a disk use DOS URUN,"INIT" and make sure to select drive No. 2 when asked on what drive to format! See examples for 3 different disk options below.



F&M Disk Utilities and utilities not documented in COMX DOS Manual
DISKCOPY
Make an exact copy of a disk, including a format of the destination disk before copy begins.
FILECOPY
Copy any file to another disk image
F&M COPYDUB
F&M Disk copy program copying a complete disk; however the destination disk will have to be formatted in advance via the INIT program as described above.
F&M LOCK
Locks all software on the disk.
F&M ULOCK
Unlocks all software on the disk.
F&M DISKMONITOR
Allows editing and inspecting disk data directly on the disk or in the emulator case directly in the disk image.
F&M INIT
Formats a disk like the INIT program however with an F&M boot sector which will attempt to load and run a program called 'STARTUP' when DOS is initialised (like with DOS NEW).
STARTUP
An example start-up program showing all programs on disk and allowing starting them from a menu.