Re: QL CP/M
Posted: Mon Jan 22, 2018 8:22 pm
Hi All Questers for CP/M for the QL....
This is a thread that I discovered on Google and many assumptions and thoughts on the Quest system are correct but I can correct/confirm a few things because I wrote the BIOS I/O code for the original microdrive version by Quest. I had left before the disk based version was produced (that's another story tho').
It's all a very long time ago and much beer and many lines of code have gone under the bridge since 1984, but what I remember:
The interface card contained 1KB RAM that is bank switchable by writing to an I/O port(memory mapped?). No settings are stored in it. The problem was/is (as mentioned here) that the QL interrupt table is in ROM so the 1KB RAM is used to hold a copy of the interrupt table, with suitable adjustments made for when CP/M has control. Basically at start-up I copied the ROM Interrupt table to the RAM. Then made the adjustments (in the RAM) for where I needed the Interrupts to go. When CP/M booted it of course made it's own adjustments.
When switching the RAM out it retained it's contents so i could flip-flop between RAM/ROM as much as needed. Also The 68000 made "context switching" quite simple by taking advantage of the alternate registers and stack pointer (much like a z80 could do).
As suspected here the O/S ran on top of QDos much like Windows 3.x on MS-DOS for certain operations, especially microdrive reading/writing, screen control, colour display - which was supported via ANSI - and some other things I can't remember! So a lot of the BIOS code was actually creating wrappers around QDos calls and mimicking a floppy drive within a QDos file.
At initial boot of the QL the user had to load and run a small Basic Program IIRC (or it auto ran) . This (again IIRC) changed the memory allocation for basic/QDos, loaded a specialised CP/M IPL/Bootloader into RAM from microdrive and simply jumped to it's start address.
Why did quest do this? You ask. The thinking was based on an extensive Sinclair ad campaign for "OPD" or One-Per-Desk featuring the QL in a central position for businesses - like erm.. one on every desk!. So it followed (sort of) that businesses would want a "proper" operating system like CP/M. They should have course have gone for PC/MS-DOS which would have been only a little more trouble but a lot more expensive licence wise.
Why did I get the job? Because at that time I was writing all their hard disk interface code for various machines both MS-DOS and CP/M (I also did Concurrent-CP/M for the Apricot). So I was considered the closest person they had to a BIOS writer.
Final note. The RAM Disk: The rush was to get the product to a show (of course) and it was terminally slow to do things using microdrives so the day before the show someone said "we need a RAM Disk" So I set about including one. I had it done in 2 or 3 hours, it worked first time. OK ..it was a fixed size but first time no bugs. That had never happened to me before and hasn't since!
Hope that belatedly helps. Timbo.
This is a thread that I discovered on Google and many assumptions and thoughts on the Quest system are correct but I can correct/confirm a few things because I wrote the BIOS I/O code for the original microdrive version by Quest. I had left before the disk based version was produced (that's another story tho').
It's all a very long time ago and much beer and many lines of code have gone under the bridge since 1984, but what I remember:
The interface card contained 1KB RAM that is bank switchable by writing to an I/O port(memory mapped?). No settings are stored in it. The problem was/is (as mentioned here) that the QL interrupt table is in ROM so the 1KB RAM is used to hold a copy of the interrupt table, with suitable adjustments made for when CP/M has control. Basically at start-up I copied the ROM Interrupt table to the RAM. Then made the adjustments (in the RAM) for where I needed the Interrupts to go. When CP/M booted it of course made it's own adjustments.
When switching the RAM out it retained it's contents so i could flip-flop between RAM/ROM as much as needed. Also The 68000 made "context switching" quite simple by taking advantage of the alternate registers and stack pointer (much like a z80 could do).
As suspected here the O/S ran on top of QDos much like Windows 3.x on MS-DOS for certain operations, especially microdrive reading/writing, screen control, colour display - which was supported via ANSI - and some other things I can't remember! So a lot of the BIOS code was actually creating wrappers around QDos calls and mimicking a floppy drive within a QDos file.
At initial boot of the QL the user had to load and run a small Basic Program IIRC (or it auto ran) . This (again IIRC) changed the memory allocation for basic/QDos, loaded a specialised CP/M IPL/Bootloader into RAM from microdrive and simply jumped to it's start address.
Why did quest do this? You ask. The thinking was based on an extensive Sinclair ad campaign for "OPD" or One-Per-Desk featuring the QL in a central position for businesses - like erm.. one on every desk!. So it followed (sort of) that businesses would want a "proper" operating system like CP/M. They should have course have gone for PC/MS-DOS which would have been only a little more trouble but a lot more expensive licence wise.
Why did I get the job? Because at that time I was writing all their hard disk interface code for various machines both MS-DOS and CP/M (I also did Concurrent-CP/M for the Apricot). So I was considered the closest person they had to a BIOS writer.
Final note. The RAM Disk: The rush was to get the product to a show (of course) and it was terminally slow to do things using microdrives so the day before the show someone said "we need a RAM Disk" So I set about including one. I had it done in 2 or 3 hours, it worked first time. OK ..it was a fixed size but first time no bugs. That had never happened to me before and hasn't since!
Hope that belatedly helps. Timbo.