Detect Q-emulator
Detect Q-emulator
I’m going to be working on some test software that needs to use different configurations depending on whether it’s running on a real QL or in Q-emulator (ideally I’d do all the development on a QL, but that’s just impractical for me currently due to circumstances)
So is there a way to determine which system the program is running on please?
If not I have the options of either running one on JS and the other on Minerva and checking the version or setting a flag at the top of the code
But it would be so much easier, and less chance of messing up/getting confused, if the detection was automatic
Any thoughts please?
Many thanks
Tony
So is there a way to determine which system the program is running on please?
If not I have the options of either running one on JS and the other on Minerva and checking the version or setting a flag at the top of the code
But it would be so much easier, and less chance of messing up/getting confused, if the detection was automatic
Any thoughts please?
Many thanks
Tony
Re: Detect Q-emulator
You could try and edit the ROM file that Qemulator i s using and change the JS string.
Re: Detect Q-emulator
That’s genius, thanks!bwinkel67 wrote: Sun Aug 31, 2025 8:21 pm You could try and edit the ROM file that Qemulator i s using and change the JS string.
-
- Font of All Knowledge
- Posts: 4843
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Detect Q-emulator
Hi,
Why not use VER$ which returns:
PRINT VER$ : REMark returns the QDOS ID
PRINT VER$(1) : REMark returns the QDOS version
Why not use VER$ which returns:
PRINT VER$ : REMark returns the QDOS ID
PRINT VER$(1) : REMark returns the QDOS version
Regards, Derek
Re: Detect Q-emulator
Hi Derek,Derek_Stewart wrote: Mon Sep 01, 2025 7:09 am Hi,
Why not use VER$ which returns:
PRINT VER$ : REMark returns the QDOS ID
PRINT VER$(1) : REMark returns the QDOS version
I’d assumed both the QL & Q-emulator would return the same values for the same ROM
They do for ver$
I get bad parameter from ver$(1)
Thanks
Tony
- janbredenbeek
- Super Gold Card
- Posts: 718
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
- Contact:
Re: Detect Q-emulator
Doesn't work on JS, only Minerva and SMSQ/E.
It's unfortunate that the MACHINE function only works on SMSQ/E.
Re: Detect Q-emulator
I’ll be using Minerva, but both QL & Q-emulator return 1.98 for ver$(1)janbredenbeek wrote: Mon Sep 01, 2025 8:43 amDoesn't work on JS, only Minerva and SMSQ/E.
It's unfortunate that the MACHINE function only works on SMSQ/E.
Will do something with the ROM image
Many thanks
Tony
Re: Detect Q-emulator
https://dilwyn.theqlforum.com/docs/arti ... ulator.zip
Assembler only, IIRC.
Other articles also on same page about identifying machine type, e.g. https://dilwyn.theqlforum.com/docs/articles/machine.zip and https://dilwyn.theqlforum.com/docs/articles/what_hw.zip
Assembler only, IIRC.
Other articles also on same page about identifying machine type, e.g. https://dilwyn.theqlforum.com/docs/articles/machine.zip and https://dilwyn.theqlforum.com/docs/articles/what_hw.zip
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: Detect Q-emulator
Thanks Dilwyn. That could be useful when I switch the dev from basic to assembler testingdilwyn wrote: Mon Sep 01, 2025 9:13 am https://dilwyn.theqlforum.com/docs/arti ... ulator.zip
Assembler only, IIRC.
Other articles also on same page about identifying machine type, e.g. https://dilwyn.theqlforum.com/docs/articles/machine.zip and https://dilwyn.theqlforum.com/docs/articles/what_hw.zip
For now I've just edited the 1.98 ROM to return 1.97 in q-emulator
Many thanks all
Tony
Re: Detect Q-emulator
There is an extension to detect Q-emuLator:
https://www.terdina.net/ql/soft/qemu_version_bin
It provides a command called IS_QEMULATOR (and another one called QEMU_VER$).
https://www.terdina.net/ql/soft/qemu_version_bin
It provides a command called IS_QEMULATOR (and another one called QEMU_VER$).