Page 1 of 1

Q68 and plug-in ROM

Posted: Tue Sep 08, 2020 9:30 pm
by FrancoisLanciault
Hi,

Is there a way, when using the Q68 with SMSQE, to load a 16k piece of code at address $C000 in order to simulate a QL plugin ROM module ? Some of these module can be loaded anywhere in ram (I think these was a tool for that but I can’t remember) but many need to be run from the correct $C000 address.

I think that if using the Q68 with Minerva the solution is straightforward, just add the 16k module at the end of the minerva 48k and load the resulting 64k at address $0000, but I can’t figure out how to do it with SMSQE.

François

Re: Q68 and plug-in ROM

Posted: Wed Sep 09, 2020 12:13 am
by janbredenbeek
FrancoisLanciault wrote:Hi,

Is there a way, when using the Q68 with SMSQE, to load a 16k piece of code at address $C000 in order to simulate a QL plugin ROM module ? Some of these module can be loaded anywhere in ram (I think these was a tool for that but I can’t remember) but many need to be run from the correct $C000 address.

You can use the EPROM_LOAD command. When used the first time after a reset, the ROM image will be loaded at address $C000.
I think that if using the Q68 with Minerva the solution is straightforward, just add the 16k module at the end of the minerva 48k and load the resulting 64k at address $0000, but I can’t figure out how to do it with SMSQE.

Unfortunately, Minerva needs some additional drivers to run on the Q68 and these are currently implemented as extension ROM images in one large 96K file. The space at $C000 is occupied by the keyboard driver (which is a few Kbytes) and the space at $10000 by the SD-card driver (which is 20K, so there is no additional 16K space available in the lower memory area).

Thinking of this, it would be possible to drop some code from Minerva (e.g. the MDV driver) and use the freed space to incorporate the keyboard driver below $C000, so you could patch in a ROM image at that point in the Q68_ROM.SYS image. Minerva also scans the area after RAMTOP for ROMs (which could be used to store ROM images in the Q68 RAM since Minerva only uses the lower 16MB), but you would need to load and link them in manually since they won't be there yet at startup.

Jan

Re: Q68 and plug-in ROM

Posted: Wed Sep 09, 2020 3:52 am
by FrancoisLanciault
Thank you Jan, the EPROM_LOAD command is exactly what I need.

As for Minerva you are right. I wrongly assumed that Minerva for Q68 was still 48k including everything...

François

janbredenbeek wrote:
FrancoisLanciault wrote:Hi,

Is there a way, when using the Q68 with SMSQE, to load a 16k piece of code at address $C000 in order to simulate a QL plugin ROM module ? Some of these module can be loaded anywhere in ram (I think these was a tool for that but I can’t remember) but many need to be run from the correct $C000 address.

You can use the EPROM_LOAD command. When used the first time after a reset, the ROM image will be loaded at address $C000.
I think that if using the Q68 with Minerva the solution is straightforward, just add the 16k module at the end of the minerva 48k and load the resulting 64k at address $0000, but I can’t figure out how to do it with SMSQE.

Unfortunately, Minerva needs some additional drivers to run on the Q68 and these are currently implemented as extension ROM images in one large 96K file. The space at $C000 is occupied by the keyboard driver (which is a few Kbytes) and the space at $10000 by the SD-card driver (which is 20K, so there is no additional 16K space available in the lower memory area).

Thinking of this, it would be possible to drop some code from Minerva (e.g. the MDV driver) and use the freed space to incorporate the keyboard driver below $C000, so you could patch in a ROM image at that point in the Q68_ROM.SYS image. Minerva also scans the area after RAMTOP for ROMs (which could be used to store ROM images in the Q68 RAM since Minerva only uses the lower 16MB), but you would need to load and link them in manually since they won't be there yet at startup.

Jan

Re: Q68 and plug-in ROM

Posted: Wed Sep 09, 2020 12:25 pm
by Peter
janbredenbeek wrote:You can use the EPROM_LOAD command. When used the first time after a reset, the ROM image will be loaded at address $C000.

Interesting, I was not aware of this command. Currently SMSQ/E doesn't occupy the 16 KB at $C000, so it should also be possible to just load and call it. The area is effectively unused RAM under SMSQ/E.

Re: Q68 and plug-in ROM

Posted: Thu Sep 10, 2020 9:18 pm
by FrancoisLanciault
Peter wrote:
janbredenbeek wrote:You can use the EPROM_LOAD command. When used the first time after a reset, the ROM image will be loaded at address $C000.

Interesting, I was not aware of this command. Currently SMSQ/E doesn't occupy the 16 KB at $C000, so it should also be possible to just load and call it. The area is effectively unused RAM under SMSQ/E.


I can confirm that EPROM_LOAD works perfectly on the Q68 with SMSQ/E