• Please review our updated Terms and Rules here

GLaBIOS on the QX-16

brijohn

Experienced Member
Joined
Jul 18, 2021
Messages
223
Location
Michigan
So this is one of the things I started working on recently. Rather then trying to disassemble and modify the existing Epson BIOS used with the 8088 processor, I have decided to try porting GLaBIOS, an open source 8088/XT bios, to the QX-16. The biggest changes needed to get things working were a custom keyboard interrupt/handling routine as well as serial port handling. The graphics is required very little changes since it has a fairly compatible MDA/CGA graphics board. Since the ROM on the QX-16 is 16k in size i'm able to add some additional features such the RTC support that is not built into GLaBIOS, as well as put a small copy of TinyBasic compiled into the ROM as well. I also intend to add IDE support to hopefully allow it to boot from my CompactFlash adapter as well.

Currently i have yet to try booting on real hardware, my testing during development was done on my also work in progress QX-16 emulation in MAME. But it does boot up and sucessfully give me a command prompt using Epson's MS-DOS 2.11 disk image, so hopefully it should work on my real QX-16 when i get the chance to test it.
 

Attachments

  • glabios_qx16.png
    glabios_qx16.png
    191.9 KB · Views: 12
That is actually really cool. Are you planning to put MSDOS in ROM like they do for the QX-11 ?

In order to improve the QX-16 compatibility with a regular PC I been doing some system modifications in my QX-16. To mention one, I wrote a tiny application that will override INT 74 forcing the BIOS to make an INT 9 call after processing each keystroke. That allows any IBM compatible program that overrides the IBM's keyboard interrupt 9, to work on the QX-16.

Epson is already doing something similar for INT 8 (machine timer). The QX-16 msdos is already overriding EPSON int 71 so it calls int 8 at every timer tic. Something similar may be necessary for the Seiral and Parallel port interrupts.

Instead of making it a resident application as I'm doing right now, those changes could easily be part of the BIOS.
 
In order to improve the QX-16 compatibility with a regular PC I been doing some system modifications in my QX-16. To mention one, I wrote a tiny application that will override INT 74 forcing the BIOS to make an INT 9 call after processing each keystroke. That allows any IBM compatible program that overrides the IBM's keyboard interrupt 9, to work on the QX-16.
That is actually one of the things i am doing inside GLaBIOS. I still use Vector 74 for the keyboard handler but it calls INT 09 to process each key, with INT 74 just handling housekeeping.

Are you planning to put MSDOS in ROM like they do for the QX-11 ?
Probably not. I don't think there is enough room i only really have around 8k, but am using some it for additional extensions RTC, IDE, keyboard translation tables, etc. Even without tiny basic i probably only have 6-7 left.

Epson is already doing something similar for INT 8 (machine timer). The QX-16 msdos is already overriding EPSON int 71 so it calls int 8 at every timer tic. Something similar may be necessary for the Seiral and Parallel port interrupts.
So the timer is interesting, it actually ticks twice as fast as the standard PC timer, in the original BIOS Epson went and adjusted the tick value during calls to the set/get system ticks interrupt. I'm actually only calling INT 08 in GLaBIOS every other tick.

The serial interrupts are disabled by default in the original Epson BIOS and the standard INT 14 just does polling. However it does seem to support interrupt driven serial if you enable them on the 7201. In this case from what i can tell i think INT 74 will if it triggers for the RS232 port, rather then the keyboard, will call INT 7F. Be default INT 7F is just an IRET, so a user who wanted to use interrupts with the QX-16 could install their own INT 7F vector and then enable the serial interrupts.
 
That is actually one of the things i am doing inside GLaBIOS. I still use Vector 74 for the keyboard handler but it calls INT 09 to process each key, with INT 74 just handling housekeeping.


Probably not. I don't think there is enough room i only really have around 8k, but am using some it for additional extensions RTC, IDE, keyboard translation tables, etc. Even without tiny basic i probably only have 6-7 left.


So the timer is interesting, it actually ticks twice as fast as the standard PC timer, in the original BIOS Epson went and adjusted the tick value during calls to the set/get system ticks interrupt. I'm actually only calling INT 08 in GLaBIOS every other tick.

The serial interrupts are disabled by default in the original Epson BIOS and the standard INT 14 just does polling. However it does seem to support interrupt driven serial if you enable them on the 7201. In this case from what i can tell i think INT 74 will if it triggers for the RS232 port, rather then the keyboard, will call INT 7F. Be default INT 7F is just an IRET, so a user who wanted to use interrupts with the QX-16 could install their own INT 7F vector and then enable the serial interrupts.
I used this mappings for my experiments on the qx16 box and used the same approach for the qx11 mame driver.. Epson basically maps the irq controller starting by the master controller irq 0 to int 70 ...

I also did test overriding INT 7A to test running a task every time the rtc raises its irq and it did work perfectly. By default INT 7A points to an iret.
 

Attachments

  • Screenshot_20260408_170720_Samsung Notes.jpg
    Screenshot_20260408_170720_Samsung Notes.jpg
    85.1 KB · Views: 8
This is awesome! If there's anything I can do to help let me know.

640KB
 
Back
Top