• Please review our updated Terms and Rules here

QX-16 booting from a Compact Flash card.

brijohn

Experienced Member
Joined
Jul 18, 2021
Messages
218
Location
Michigan
Ok i have been working on this for a while, but i have finally gotten my qx-16 to boot successfully from my compact flash adapter. No floppies involved! You will need to replace the IPL ROM with my modifed version to support CF booting. For this I was able to pull a version of the 3.0A source code that already supported MFM winchester drive booting and modified it to work with an IDE based compact flash card instead. The source was pulled from one of the disk images in Emmanuel Roche's QX-10 archive dummped by @Altomare. In addition the loader on the system tracks needed some modification as well, so i extracted and disassembled that from the system tracks of a B2.27 boot disk.

Once you replace the IPL ROM with the modified ROM, setting up a CF card for boot should be pretty straightforward using my qx16lba.imd disk image.

Here are the basic instructions:

  1. Boot from floppy and run hdpart to create a new partition (make sure to set it as bootable)
  2. Reboot (again from floppy) and run cfformat (this writes e5 across the directory table for both partitions)
  3. Run copydisk
    1. Select Copy -> System
    2. Choose Hard Disk as destination drive
    3. Select Start Copy to copy system tracks and cpm2.sys to Compact Flash
    4. Now exit copydisk
  4. Now copy over setup.com to your compact flash (pip c:setup.com=setup.com)
  5. Now remove your floppy disk and reboot
  6. If everything worked right you should boot off the CF card.
The first boot will complain about bad sectors on drive A since you don't have a drive in the disk, but you can press enter several times to eventually drop to the CLI. Then just change drives to C and run setup to remap your drive assignments so A and B point your two hard drives, and C/D point to your floppies. Future boots should now work without error.

During the work I ended up writing a few utilities
  • cmsodump - dumps first 512 bytes of CMOS SRAM (contains hdd access routines)
  • cmosload - loads binary into first 512 bytes of CMOS SRAM
  • loadrom - loads an 8k file called BIOS.ROM to address 0 and jumps to it (allows testing modified IPL rom without physically replacing it)
Next I'll have to see if I can get a modified IPL for the QX-10 and get it booting from a CF card as well.

The current files can be found in my qx-10 github repo, but i've also attached them along with the BIOS.ROM binary to this post.

PXL_20260130_173246232.jpgPXL_20260130_173302732.jpg
 

Attachments

You've done a lot of great work on these QX machines. Perhaps some of us can bootstrap our systems up to your level with what you've done. The QX10 and 16 have not had the following of other retro machines of the era, but maybe that's about to change? Will your ROM updates work with the other QX10/16 CF card adapter too? If so, I need to get a greasemonkey connected to a working 5.25" PDQ. Maybe I can rob a drive out of my Ampro Little Board system. Or figure out how to repair a stack of non-functioning 5.25's I've got packed away.
 
You've done a lot of great work on these QX machines. Perhaps some of us can bootstrap our systems up to your level with what you've done. The QX10 and 16 have not had the following of other retro machines of the era, but maybe that's about to change? Will your ROM updates work with the other QX10/16 CF card adapter too? If so, I need to get a greasemonkey connected to a working 5.25" PDQ. Maybe I can rob a drive out of my Ampro Little Board system. Or figure out how to repair a stack of non-functioning 5.25's I've got packed away.
All my code should work fine Scott's CF adapter as well, both are ours are configurable for the IO port ranges the card responds to, my code uses 0xd0-0xd7, so long as the dips switches are set to the correct address it should work fine with either adapter. That being said i have not actually used his adapter myself i just see no reason it should be incompatible with his hardware based on what i know of it.
 
So here is a version of the QX-10 IPL that supports booting from a Compact Flash as well. Due to the fact that the ROM on a QX-10 is only 2k in size however i had to trim some of the existing code to make room for the CF Boot code. As a result this ROM will not actually perform the Z80 instruction test, though this shouldn't be a problem in most cases. The memory tests are still included.
 

Attachments

Oh, this is fantastic. My last "open question" is answered now. I will try. So, this also will work with CF Card on 0x80 ( ;-) you know who is asking now... )?

@brijohn - Would you also share your RGB2HDMI settings and profile for the QX?
 
Last edited:
Oh, this is fantastic. My last "open question" is answered now. I will try. So, this also will work with CF Card on 0x80 ( ;-) you know who is asking now... )?

@brijohn - Would you also share your RGB2HDMI settings and profile for the QX?
The current version i posted here is still on 0xD0, and not 0x80. Here is a version of both the disk image and the QX-10 IPL rom that has been configured for port 0x80 on the QX-10, the QX-16 still uses 0xD0 for the moment.

I will post my RGB2HDMI profiles once i have a chance to grab them.
 

Attachments

Today I was able to test around a bit. First I had no luck with my QX-10 on 0x80. I followed your steps, but whyever I needed four "runs" to get it working. But now: IT IS WORKING!
I reassigned A: to D: aaaand fun!

That "speed" is insane :-D
 
Today I was able to test around a bit. First I had no luck with my QX-10 on 0x80. I followed your steps, but whyever I needed four "runs" to get it working. But now: IT IS WORKING!
I reassigned A: to D: aaaand fun!

That "speed" is insane :-D
Yes you need to reassign the drive letters after booting from the the CF card, CP/M always considers A: to be the current drive one boot so the drives need to be reassigned so that hard drive 1 or 2 is assigned to A:. Also yes the boot speed is quite fast compared to floppy booting.
 
Last edited:
So i managed to finally get the Titan QXPC card and my compact flash adapter working nicely together. i can now access a drive C: from msdos when using the Titan card. to get this working you need to first use hdpart.com to create a "Titan MSDOS" partition on the card. After that run qxdisk.com which should find and format that partition for use with the Titan card. Now you can run the qxpc.com program and boot into msdos and drive C: should be available for use. I have my system currently setup with dual cpm/titan partitions, so that i can boot cp/m off it and then simply run qxpc to boot my msdos floppy disk and it all seems to work fine.

I've attached a zip containing the modified boot disk with the modified qxdisk/qxpc already on it, as well the titan qxpc version of msdos.
 

Attachments

So i managed to finally get the Titan QXPC card and my compact flash adapter working nicely together. i can now access a drive C: from msdos when using the Titan card. to get this working you need to first use hdpart.com to create a "Titan MSDOS" partition on the card. After that run qxdisk.com which should find and format that partition for use with the Titan card. Now you can run the qxpc.com program and boot into msdos and drive C: should be available for use. I have my system currently setup with dual cpm/titan partitions, so that i can boot cp/m off it and then simply run qxpc to boot my msdos floppy disk and it all seems to work fine.

I've attached a zip containing the modified boot disk with the modified qxdisk/qxpc already on it, as well the titan qxpc version of msdos.
Thank you SO much! I will test that final fun-step next weekend!
 
Can any of you guys describe me how exactly the boot process of the QX-16 works? It is my understanding that the machine starts the IPL that runs on the z80 processor. The IPL initiates the hardware, checks the ram and try to load CP/M from the left drive (A drive).

Documentation says that if loading cp/m fails, IPL will try to load msdos and switch to 8088 mode. What I don't completely understand is how the IPL will detect msdos. Is the IPL reading an msdos bootable disk (a 9 tracks per sector 512 bytes bootable disk?) or is there a CP/M formatted disk used to start the msdos boot process? How is the workflow to boot msdos in the qx16?

The reason Im asking is that I dont have a separate 8088 machine to create a disk with the msdos211.bin image, so what Im trying to do it to create a Z80 program in my qx16 that talks with the disk controller and write the msdos boot sector and copy the sys files to a floppy disk. I just want to be sure that a msdos bootable disk with the right msdos211 files is all you need to boot msdos on the qx16.

I really appreciate your help
best Regards
 
So for floppy booting on the QX-16 the first thing it does is seek to track 0 and then perform a READ ID command. One of the pieces of info this returns is the sector size, if it is 256 it assumes a CP/M disk and tries to load the the CP/M loader off the disk and boot cp/m, if it detects a sector size of 512 bytes on track 0 it assumes this is an msdos disk, at which point it will switch off the z80 cpu and turn on the 8088 letting the bios rom take over the boot process.

On QX-16 systems that support hard drive booting if the IPL does not detect a floppy in your the drive on power on. It will try to detect a hard drive and if there is one will check to see if a valid MBR exists and has a bootable partition defined on it. If there is it uses the partition type to determine which os to boot. A type of 0xF0 it cause it to try and load CP/M, and any other value will make it kick the 8088 and let the bios take over again. If any of this fails it goes back to waiting for you to insert a floppy disk for boot.
 
So for floppy booting on the QX-16 the first thing it does is seek to track 0 and then perform a READ ID command. One of the pieces of info this returns is the sector size, if it is 256 it assumes a CP/M disk and tries to load the the CP/M loader off the disk and boot cp/m, if it detects a sector size of 512 bytes on track 0 it assumes this is an msdos disk, at which point it will switch off the z80 cpu and turn on the 8088 letting the bios rom take over the boot process.

On QX-16 systems that support hard drive booting if the IPL does not detect a floppy in your the drive on power on. It will try to detect a hard drive and if there is one will check to see if a valid MBR exists and has a bootable partition defined on it. If there is it uses the partition type to determine which os to boot. A type of 0xF0 it cause it to try and load CP/M, and any other value will make it kick the 8088 and let the bios take over again. If any of this fails it goes back to waiting for you to insert a floppy disk for boot.
Thank you so much for the clarification. Interestingly I was looking at the IPL assembly code and I couldn't find the point where the IPL writes to I/O port 24h to switch from z80 mode into 8088 mode.
In my case, when I insert a formatted msdos blank floppy into my QX-16 (formatted for IBM with a 512 bytes sector size) the screen just turns black. I was expecting the machine to enter into 8088 mode and see the 8088 BIOS trying to boot the disk. I will look further into the issue (I wonder if the 8088 in my qx-16 is broken or something like that )...

Thanks again for explaining the process !
 
I will post my RGB2HDMI profiles once i have a chance to grab them.
I had tinkered a lot on my custom cable from the QX to RGB2HDMI, an did a lot of testing for the best quality of the picture. Please 🤩remember me, and please give me/us a picture about cable configuration and the settings for rgb2hdmi. I guess your pic is way more clear than mine. Maybe I made something wrong on mass conections or settings.

Again, @brijohn thank you so much!
 
Back
Top