Another noob question: ROMs

Discussion and advice about emulating the QL on other machines.
Post Reply
User avatar
TMD2003
Trump Card
Posts: 168
Joined: Sat Oct 10, 2020 12:18 pm

Another noob question: ROMs

Post by TMD2003 »

Bear with me once more here.

My experiment with hard-coded QL UDGs and type-in listings is running into trouble again, and I need to know more about the ROMs. I'd encountered JM and JS as soon as I'd looked into QL emulation - but I don't know what, if anything, these letters stand for, neither do I know the essential differences (all I can see is different versions of QDOS, just not what the differences between versions are). All I know is, every QL emulator I've tried selects the JS ROM as "standard" (bar QPC2, but that's a different story altogether), with the JM on standby. Even loading one or the other on QLAY, where the screen full of shash at the beginning can't be switched off, I can see there are some differences just in the pattern on screen - the bottom left corner of the screen has a cluster of red pixels with the JM ROM, but not with JS.

Looking through Dilwyn's ROM archive, there isn't any appreciable size difference between the AH, JM and JS ROMs, so can I assume that none of these is the incomplete initial ROM that required the dongle? And if I needed to emulate one of those initial QLs, which ROMs am I looking at - and are there separate ROMs, one for the in-built version and one for the dongle, or is there one file that combined both into the intended fix?

This may be particularly useful when I'm testing listings from 1984 - those who sent listings to magazines that year probably had QLs with the dongle hanging out the back, and may need some fixing that's still beyond my capabilities. By the time of, say, David Nowotnik publishing his SuperBASIC articles in ZX Computing from late 1985, in one of which he makes specific reference to the JM ROM, I'd assume the dongles were history - so I should not have to use ROMs any older than JM for those.


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
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Another noob question: ROMs

Post by tofro »

TMD2003 wrote:Bear with me once more here.

My experiment with hard-coded QL UDGs and type-in listings is running into trouble again, and I need to know more about the ROMs. I'd encountered JM and JS as soon as I'd looked into QL emulation - but I don't know what, if anything, these letters stand for, neither do I know the essential differences (all I can see is different versions of QDOS, just not what the differences between versions are). All I know is, every QL emulator I've tried selects the JS ROM as "standard" (bar QPC2, but that's a different story altogether), with the JM on standby. Even loading one or the other on QLAY, where the screen full of shash at the beginning can't be switched off, I can see there are some differences just in the pattern on screen - the bottom left corner of the screen has a cluster of red pixels with the JM ROM, but not with JS.

Looking through Dilwyn's ROM archive, there isn't any appreciable size difference between the AH, JM and JS ROMs, so can I assume that none of these is the incomplete initial ROM that required the dongle? And if I needed to emulate one of those initial QLs, which ROMs am I looking at - and are there separate ROMs, one for the in-built version and one for the dongle, or is there one file that combined both into the intended fix?

This may be particularly useful when I'm testing listings from 1984 - those who sent listings to magazines that year probably had QLs with the dongle hanging out the back, and may need some fixing that's still beyond my capabilities. By the time of, say, David Nowotnik publishing his SuperBASIC articles in ZX Computing from late 1985, in one of which he makes specific reference to the JM ROM, I'd assume the dongles were history - so I should not have to use ROMs any older than JM for those.
Not sure what the actual question is?

JM and (mainly) JS are the main ROMs that happened to be used "back in the days". Lots of more serious QL users tried to upgrade their older ROMs to JS, as long as supplies lasted. There is actually not much point in using an older than JS ROM in an emulator (except you take fun in experiencing specific obscure bugs).

AH never had the "dongle" - These were "PM" and "FB" (jokingly purported to mean "PreMature" and "Full of Bugs", but actually, the initials of developers were used, I think). If you download a PM ROM, for example, from Dilwyn's site, you'll see it occupying 49kBytes, so, it just doesn't fit into the internal QL ROM space and spills over into the ROM port area (It's still one file. You will probably have to split it in a 48k "main ROM" and a 1k "ROM port ROM" padded with zeroes to 16k in order to be able to load it into an emulator).

There were no intended different behaviours of earlier ROM versions - just bugs. So, you won't loose anything if you're working with later, more mature ROMs.


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

Re: Another noob question: ROMs

Post by TMD2003 »

I suppose the question was "what ROM should I be using if I want to emulate an early-spec QL with a dongle in the back?", but if that's a PM/FB combination, then there's the answer. And I have tried just the PM, and that returned an error with the program (or two programs now) that I'm trying to get to work.

I needed to know the differences so I'd have an idea which ROMs were most likely to be in the QLs that those who submitted printed listings to magazines circa 1984-85 would own. David Nowotnik, presumably, has a JM ROM in his, because he specifically mentioned it in the "QL Characteristics" article in ZX Computing, Oct/Nov 1985. As for everyone else... I'd assume it was the JM, though so far the only difference I've found is a visual one in the memory-test screen on startup.

Where my problems start in both programs is where the standard character set is copied to a new area before UDGs are defined. They both start with the same PEEK, and I'll show one for example:

Code: Select all

1340 set=167722
1350 oldbase=PEEK_L(set)
1360 newbase=RESPR(875)
1370 FOR m=0 TO 875 STEP 4
1380 POKE_L newbase+m,PEEK_L(oldbase+m)
1390 NEXT m
1400 POKE_L set,newbase
And yet, when I PEEK_L(167722), the value returned is 0. Seeing as this is supposed to be the start address where the character set is stored, it seems strange that it should be 0. But I've used the same function on JS, JM and AH - and they all return 0, while PM returns 1. Using PM, line 1380 causes an error as it's trying to POKE_L to an odd-numbered address, and I've already found out that doesn't work. (Though it does work with even-numbered addresses that aren't divisible by 4.) So, at this stage, I can at least write off the PM ROM as a means of solving my problems.

Now here's something interesting: I've taken Toolkit II off QemuLator, and now PEEK_L(167722) returns 44442 with JS, 41410 with JM and 41304 with AH. All different, but all look like they mean something.

Time for another round of tests, I think!

EDIT: ...and it looks like that was the problem all along.

1985 QL users weren't using Toolkit II - presumably it didn't exist then - and it's playing havoc with the bits of memory the listings are trying to use.


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
RalfR
Aurora
Posts: 870
Joined: Fri Jun 15, 2018 8:58 pm

Re: Another noob question: ROMs

Post by RalfR »

TMD2003 wrote:1985 QL users weren't using Toolkit II - presumably it didn't exist then - and it's playing havoc with the bits of memory the listings are trying to use.
You are wrong: The Sinclair QL.Toolkit existed in 1985 (written by TT under the QJump label).

Look here:

https://qlwiki.qlforum.co.uk/doku.php?i ... ql_toolkit


4E75 7000
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Another noob question: ROMs

Post by mk79 »

If this is for purely archaeological reasons, ok. But those codes were wrong even back then, they just happened to work for some people sometimes. Any device driver loaded on boot can probably break them. In any case, there are ways to do this even with PEEK/POKE that don't rely on magic numbers and work on all systems, so there is really no excuse.


User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: Another noob question: ROMs

Post by janbredenbeek »

tofro wrote: AH never had the "dongle" - These were "PM" and "FB" (jokingly purported to mean "PreMature" and "Full of Bugs", but actually, the initials of developers were used, I think). If you download a PM ROM, for example, from Dilwyn's site, you'll see it occupying 49kBytes, so, it just doesn't fit into the internal QL ROM space and spills over into the ROM port area (It's still one file. You will probably have to split it in a 48k "main ROM" and a 1k "ROM port ROM" padded with zeroes to 16k in order to be able to load it into an emulator).
Actually, the ROMs did fit into 48K (there was even about 4K unused) but not into the 32K that was originally designed (it was a last-minute design choice to put SuperBASIC into ROM), hence the dongle that was needed for the last 16K. Later hardware issues allowed for a 32K+16K EPROM (and later ROM) on-board.

Jan


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Another noob question: ROMs

Post by dilwyn »

tofro wrote: AH never had the "dongle" - These were "PM" and "FB" (jokingly purported to mean "PreMature" and "Full of Bugs", but actually, the initials of developers were used, I think). If you download a PM ROM, for example, from Dilwyn's site, you'll see it occupying 49kBytes, so, it just doesn't fit into the internal QL ROM space and spills over into the ROM port area (It's still one file. You will probably have to split it in a 48k "main ROM" and a 1k "ROM port ROM" padded with zeroes to 16k in order to be able to load it into an emulator).
Windows may report the file as being 49K, but in reality as the note from Urs in the readme.txt for the PM ROM in my site says, the 48K ROM is actually 49,152 bytes which happens to be 1024*48 or 48K.

Windows probably just uses the 1K=1,000 approach so it looks like it's 49K.

Not actually checked the length of the image, just taken Urs at his word.

In terms of which ROM should be used, best to avoid FB and PM as they have so many problems, they are probably only of interest to collectors.

AH and JM are perfectly usable, at least in a UK QL (don't know about European and North American QLs).

JS is probably the most widely used. But they are getting quite hard to obtain now unless you make one of your own. The JSU variant is for handling the little differences in USA display, etc.

MG was mainly for European QLs, not many were in use on British QLs.

I have two QLs and took a conscious decision that one should have a JM ROM and the other a JS ROM, so that I could test software against both. In fact, one of the machines has an old ROM switcher which lets me flick between two different ROMs. Someone (was it Tetroid in Russia?) produced a board which let you load multiple ROM images and you could in fact select between any of a number of ROMs.

This is bound to raise a perfectly valid NOOB question - how to tell and what the letters mean. In SuperBASIC, just entering the command PRINT VER$ will tell you the version as a 2, 3 or 4 letter code, e.g. Minerva, which is not a Sinclair produced ROM, it was made by an independent company, prints JSL1 - the initials of the people behind the company QVIEW who produced the ROM, Jonathan (Oakley), Stuart (McKnight) and Laurence (Reeves).

Remember also that PRINT VER$ technically prints the version of SuperBASIC, not the QDOS operating system version, which can't be checked from BASIC very easily in the Sinclair ROM versions (the operating system number is a number such as 1.01 or 1F10 - the letter denotes an international variant of the ROM). The list on my ROMs page matches up the operating system with the SuperBASIC version in most cases.

The significance of the Sinclair version lettering was never fully explained officially, but is often said to be initials relating to Sinclair staff or even taxi drivers who ferried Sinclair staff or equipment around! e.g. AH is often said to refer to "Angela's Holiday", JM to Sinclair engineer "John Mathieson", wonder if anyone knows who/what JS and MG referred to?

May be useful for new QL users to refer to Mark Knight and Simon Goodwin's articles on differences and bugs between ROM versions - available here http://www.dilwyn.me.uk/docs/basic/index.html.


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

Re: Another noob question: ROMs

Post by tofro »

dilwyn wrote:
MG was mainly for European QLs, not many were in use on British QLs.
I'm pretty sure MGUK was never released by Sinclair, but rather was a backported continental ROM with English keyboard layout and messages.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Another noob question: ROMs

Post by dilwyn »

tofro wrote:
dilwyn wrote:
MG was mainly for European QLs, not many were in use on British QLs.
I'm pretty sure MGUK was never released by Sinclair, but rather was a backported continental ROM with English keyboard layout and messages.

Tobias
That's right - John Alexander did the MGUK ROM later on, derived from MG, but with a few minor additions. Afraid I can't remember what those additions were, though.


Post Reply