The background to my presence here

Helpful tips and guides, also new users can ask for help here.
User avatar
TMD2003
Over Heated PSU
Posts: 129
Joined: Sat Oct 10, 2020 12:18 pm

The background to my presence here

Postby TMD2003 » Sun Oct 11, 2020 4:32 pm

My QL story starts in April 2020. Actually, it doesn't - I'd had an old shareware copy of QemuLator kicking around on my hard drive since, probably, around 2003 when I first signed up at World of Spectrum (which explains some of the username). But I'd never used it, and I'd never had a reason to look into QL emulation until this year.

At the start of the dark days of Coronatarianism, one WOS user started a project to fill in as many of the blanks in The Type Fantastic as possible, given that the site owner, Jim Grimwood, is horribly ill and can't do it himself. After completing the issues of Sinclair Programs, Sinclair User and ZX Computing that I had when I was much younger, I took on the job of getting the Sinclair User listings completed - and found that there were QL SuperBASIC listings. Would this be a problem? I couldn't get that old QemuLator to run, and the only other options I knew of were ZEsarUX 8.0, which looks to have half the keyboard missing, and EightyOne 1.16, which only starts a QL screen with a mess of flashing lines, and I can't find any reason in the options why it would be doing so (even now). ZEsarUX has been updated to version 9.0 but is still a multi-multi-machine emulator with no focus on any one model (the author looks to be trying to cram in as many Sinclair and peripherally-related models as possible) and still isn't running, while EightyOne is now at version 1.18 and the QL option is still totally crippled. And as that's designed more as a ZX81 and ZX80 emulator, that's all I use it for.

In April, JimG was at least well enough to tell me how he'd tackled QL emulation - using QLAYW, and he showed some examples of five QL programs he'd already typed in from the later years of ZX Computing. I thought "how hard can it be?" - and soon found it wasn't as easy as I'd thought. QLAYW wouldn't work on the Windows 7 PC I'm on now, and as it said it was designed for Windows 2000 and XP, I tried it on a 21-year-old Compaq laptop running Windows 2000. To my surprise, it crashed with the same error report as it had on the Windows 7 PC.

The only option I've found that works has been to go back to the DOS-based QLAY 0.90 and run it through DOSBox. It works in that I can type in listings and save them to a virtual microdrive with an .MDV extension that's always the exact same number of bytes, or via QLAY's internal win2_ drive, which I can redirect to a specific folder that will contain the file I've just saved, with the filename truncated to eight characters, alongside QLAY.DIR. What I have no way of knowing at this point, is whether it's possible for any other QL emulator out there to load the files I've saved with QLAY - whether that means ZEsarUX or EightyOne, if I can ever get either of those to work properly, or (preferably) a standalone QL emulator that will work as easily as I've found Spectrum and ZX81 emulators to do (as well as, say, STeem, Vice, CaPriCe, and any others outside the Sinclair realm).

The main reason for all this is, I have compiled my work in April and JimG's into the start of an admittedly-small collection of QL type-in games, the further reasons for which will probably become clearer early next year. I would like to complete the type-ins this year, while I have the time to do so, but I would also like them to be easily accessible to everyone who's got about as much background in QL emulation as I have. This year, I've had to teach an American friend all about Spectrum emulation and my instructions could be as easy as "download and install Fuse from here, switch it to +3 mode, open this .dsk file, select Loader and you're done". If there's any way of doing the same for the QL, this would be great to know.

There is the further problem that, even for those who are fluent in the ways of DOSBox, running QLAY through it isn't ideal. In April I found a few sound test programs on Dilwyn Jones' site, including the one that plays a downwards "scale" - in the loosest possible sense of the term - so that I could get QLAY running at the correct speed. Essentially, this meant feeding the output from the sound card into another PC running an oscilloscope program and changing the values in QLAY.RC until BEEP 100000,15 produced a consistent 440 Hz... or as consistent as QLAY gets. Yesterday, while assessing what I'd typed in, and what JimG had sent me earlier (and while waiting for my registration to be accepted here), I had several other programs running - LibreOffice to enter the programs I'd assessed into a spreadsheet, GIMP to get screenshots of them all, Opera, Thunderbird (occasionally) and several other windows - and the pitch of the sound was not just noticeably lower, it was all over the place. Think of it as the equivalent of a bagpipe player (who we'll call Clive, and not after some bald ginger bloke from Cambridge who's just turned 80). When Clive changes his fingering on the pipes, because there's still air going through it, there's a scramble of extra rapid notes because Clive's fingers don't all change places instantaneously. QLAY was doing this, sometimes taking three or four dreadful attempts to get a note right without actually doing so. And if I changed focus to another window, the pitch dropped by a couple of octaves as the emulation suddenly ran a lot slower. Clearly, if I'm going to have to assess QL programs for their sound, QLAY - at least when running through DOSBox - is a blind alley. It's been useful so far, but I think I'm going to have to file for divorce and find an emulator that will provide a more realistic experience.

The first thing to find out will be how easy - or not - it is to transfer files between emulators. ZEsarUX and the so-far-unregistered QemuLator 3.3.1 I attempted yesterday spat the QLAY-derived .MDV file back at me without even attempting to recognise it. QemuLator also appears to lack an "Open file" option, quite bizarrely. ZEsarUX looks like it might only handle its own .ZSF memory-snapshot format, and that's not a viable option (and besides, it doesn't have a " key defined, so it'll be of very limited use anyway).

This is how it's going to be for a while - I am going to be asking a lot of noob-questions, though not right from the bottom of the pile because, as I say, I've had QLAY up and running and typing in 17 listings from Sinclair User has at least given me a start in both SuperBASIC and load/save operations. In the meantime, I am going to get the QL type-in games webpage up and running, and that'll take most of today, I suspect. I'll check back later to see what's going on.


Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
Chr$
Aurora
Posts: 902
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: The background to my presence here

Postby Chr$ » Sun Oct 11, 2020 4:49 pm

Hello.

I don't think I've fully digested everything you have just written there as I am a bit side tracked at the moment - but you know you can type in SuperBasic in any decent text editor (not windows notepad) and then load it into e.g. Qemulator by attaching a virtual drive to the directory where the plain text file is and then loading it in the normal way, with load mdv1_name ?

For just entering SuperBasic text I don't think you need to really worry too much about .mdv images and the like. As far as I can remember the free version of Qem allows you to attach any windows directory as a drive. And you can simply share the files as they are (or zip them in windows), as there is nothing QL-peculiar about simple BAS files (that only starts to get complicated with the executables).


http://QXL.WIN
Collector of QL related computers, accessories and software, even though I don't really understand how they work!
Original QL's: many (plus quite a bit of other old stuff and 180+ original software titles)
Custom XT cased QL system with Gold Card, Qimi mouse, Hermes and MFM HDD
QXLII card installed in a PC
Q40 and Q68 also present

Ask me about near NOS re-felted good quality Microdrive Carts and felt pads - many available.
User avatar
NormanDunbar
Forum Moderator
Posts: 1704
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: The background to my presence here

Postby NormanDunbar » Sun Oct 11, 2020 4:56 pm

TMD2003 wrote:This year, I've had to teach an American friend all about Spectrum emulation and my instructions could be as easy as "download and install Fuse from here, switch it to +3 mode, open this .dsk file, select Loader and you're done". If there's any way of doing the same for the QL, this would be great to know.


You might want to take a look at SMSQMulator, which runs under Java, or QPC2 which is a "proper" executable, ie, not Java.


I run QPC2 on Linux Mint 19.3 under Wine. It works perfectly except for floppy disc access, but it does read floppy images, which I can create with the "dd" command. This won't be a problem on Windows 7 or 2000 for example, assuming that Windows boxes still have floppies.

Marcel, who wrote QPC2 when he was just a child, is on this forum frequently. Wolfgang isn't, he wrote SMSQmulator. HE is available on the QL-Users mailing list.

HTH

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals - https://www.amazon.co.uk/Arduino-Softwa ... 1484257898, https://www.apress.com/gb/book/9781484257890
User avatar
bwinkel67
Aurora
Posts: 773
Joined: Thu Oct 03, 2019 2:09 am

Re: The background to my presence here

Postby bwinkel67 » Sun Oct 11, 2020 6:12 pm

It sounds like you found a really old version of QLAY. If you go to Dilwyn's site under software and then the emulators section you can download the latest. QLAY2 works really well in Windows 7. Then there is the upgrade to QLAY called QL2K which adds sounds -- I avoid it because I don't like how it reset the volume of audio when it's open, though it sets it back to normal when closed. The newest Q-Emulator also works really well but the free version is limited. These three will get you close to a BBQL whereas there are plenty of others ones that are designed to run a more modern version of the OS (SMSQ/E).


User avatar
tofro
Font of All Knowledge
Posts: 2189
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: The background to my presence here

Postby tofro » Sun Oct 11, 2020 6:41 pm

With QLay, you've probably picked the oldest and, definitely, least sophisticated QL emulator (let Grandpa rest for some time, please ;) ) available today.

The speed that QLay delivers to the emulated QL is, as you've seen, extremely dependent on the speed (and load) of the host computer. Running the emulation within yet another emulation (DOSBox) on Windows probably hasn't helped either.

Getting files to and from the emulated QL also is quite a bit fiddly - I wouldn't really try and use QLay today. All more modern emulators you'll get recommendations for have much easier methods to transfer files into emulation (or, rather, directly access the host file system)

My recommendations are Q-Emulator, SMSQMulator, QPC2, with QEMulator being the closest to the original black box, the other two have evolved a bit from there. The demo version of QEmulator should actually do the trick, even if registering is definitely recommended (The other two are free anyways).

QL SuperBASIC programs are straightforward ASCII files (with UNIX/MacOS line endings, that is LF only instead of Windows/DOS CR+LF). You can easily use any Windows/Linux/Mac editor to create them, and transfer them to the emulated QL for testing (so that's even easier than your Spectrum example).

QEmulator's "open file or directory" option BTW hides behind the four microdrive slots in the "Microdrives" window - Click on one, an it will ask what file or directory you want to place there.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
TMD2003
Over Heated PSU
Posts: 129
Joined: Sat Oct 10, 2020 12:18 pm

Re: The background to my presence here

Postby TMD2003 » Sun Oct 11, 2020 10:36 pm

Right! This all looks good so far - I'm tempted to give QPC2 a shot first. I need to find one emulator that works damn-near-perfectly (i.e. not like QLAY, so you're all telling me), on both my regular PC and a 13-year-old laptop that's also running Windows 7.

I will also need to be able to take screenshots at a 1:1 pixel ratio - i.e. one QL pixel equals one PC pixel - after I showed off a few screenshots I've done that way on Spectrum Computing and the response was "yes, that's what we'd be looking for, for preservation purposes" - it can be scaled to the QL's odd 3:2 pixel shape when the screenshot is displayed on screen. In other words, I'll make a .PNG that's 512x256, and display it (when in "full screen") at 1024x768 so it looks like it would on a QL monitor/TV. "Grandpa", as tofro puts it, will do this (although it does take a few extra steps in GIMP, but I've dealt with that so far), as most of its screen display modes show the screen in a 2:1 aspect ratio.

I'll try a few of your suggestions over the next few days and see how it goes.

One thing I would really like to do is solve the mysteries of ZEsarUX's QL emulation. Where has César hidden all the keys that I need? "Grandpa" at least uses a PC keyboard layout...


Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Martin_Head
Super Gold Card
Posts: 631
Joined: Tue Dec 17, 2013 1:17 pm

Re: The background to my presence here

Postby Martin_Head » Mon Oct 12, 2020 11:11 am

If you are typing in games, then Qemulator would be the best bet to run them on. As speed wise, it most closely emulates a real QL. QPC2 will be far too fast.


User avatar
Sparrowhawk
Gold Card
Posts: 373
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: The background to my presence here

Postby Sparrowhawk » Mon Oct 12, 2020 11:11 am

Hi,

Q-emuLator has a very decent free mode which I think would suit your needs, and IMO is by far the easiest of the emulators to use. The free mode restricts you to an unexpanded QL at original speed, but that is probably OK since, as mentioned, you would be better off doing most of the typing in a Windows text editor and attaching a Windows folder as a virtual microdrive in which to store your programs, only using the QL itself for testing that the program runs.

I have a feeling that there may be a SuperBASIC syntax colouring plugin for Visual Studio Code, but I am not 100% sure of that and at present I can't find it - maybe somebody on here knows the details.
If you have access to a Mac, I created a syntax colouring plugin for Bare Bones Software's BBEdit (which is free to use most features). It's available here: https://www.shimeril.com/free/qlsuperbasictw.zip

With regards screen shots, the Q-emuLator screen can be adjusted to 100% or 200%, Full Screen, or custom by dragging the windows edges.

The code listings project looks intriguing. Best of luck in your endeavours!


a.k.a. Jean-Yves !
User avatar
vanpeebles
Commissario Pebbli
Posts: 2636
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: The background to my presence here

Postby vanpeebles » Mon Oct 12, 2020 11:17 am

Just to add, Andrew has been doing code listings too?


User avatar
tofro
Font of All Knowledge
Posts: 2189
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: The background to my presence here

Postby tofro » Mon Oct 12, 2020 11:33 am

Sparrowhawk wrote:I have a feeling that there may be a SuperBASIC syntax colouring plugin for Visual Studio Code, but I am not 100% sure of that and at present I can't find it - maybe somebody on here knows the details.
If you have access to a Mac, I created a syntax colouring plugin for Bare Bones Software's BBEdit (which is free to use most features). It's available here: https://www.shimeril.com/free/qlsuperbasictw.zip

There's syntax-highlighting files for VIM and Notepad++ alongside your BBEdit/TextEdit files here http://www.dilwyn.me.uk/basic/index.html

I'd also agree with the recommendation of the free mode of QEmulator. It's going to be a long way until you'll reach its limits with what you have in mind.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO

Who is online

Users browsing this forum: No registered users and 1 guest