ROMable SMSQ/E

Anything QL Software or Programming Related.
User avatar
Peter
Super Gold Card
Posts: 641
Joined: Sat Jan 22, 2011 8:47 am

Re: ROMable SMSQ/E

Postby Peter » Mon Jan 22, 2018 9:00 am

mk79 wrote:The ROM version relocates one time less than the LRESPR version, but as that relocates 2 times you still got one relocation left SMSQ/E (so far) never runs from ROM.

Are you sure? I have not used recent SMSQ/E much, but I seem to remember a speed difference between running SMSQ/E from ROM and DRAM on the Q40 at versions 2.9x. ROM on Q40/Q60 is mirrored at two locations by hardware, so having two start addresses does not necessarily mean relocation.

mk79 wrote:SMSQ/E also has an area for internal variables within the lower 64k, though I think it's constant once booting has finished.

Yes, but it does not spread over the whole 64K, not even 48K, at least on the Q68.

Peter


User avatar
mk79
Over Heated PSU
Posts: 137
Joined: Sun Feb 02, 2014 10:54 am

Re: ROMable SMSQ/E

Postby mk79 » Mon Jan 22, 2018 9:59 am

Peter wrote:
mk79 wrote:The ROM version relocates one time less than the LRESPR version, but as that relocates 2 times you still got one relocation left SMSQ/E (so far) never runs from ROM.

Are you sure? I have not used recent SMSQ/E much, but I seem to remember a speed difference between running SMSQ/E from ROM and DRAM on the Q40 at versions 2.9x. ROM on Q40/Q60 is mirrored at two locations by hardware, so having two start addresses does not necessarily mean relocation.
Never had access to a Q40, but reading the source code I don't see how it could not relocate. You can check where the modules end up using a simple program:

Code: Select all

100 CLS
110 PRINT "SMSQ/E module list:"
120 :
130 addr = PEEK_L($93C)
140 REPeat
150   addr = PEEK_L(addr)
160   IF addr = 0 THEN EXIT
170   PRINT HEX$(addr, 32)
180 END REPeat
Are the addresses you see in ROM or RAM?

Marcel


User avatar
Peter
Super Gold Card
Posts: 641
Joined: Sat Jan 22, 2011 8:47 am

Re: ROMable SMSQ/E

Postby Peter » Tue Jan 23, 2018 8:17 pm

This can't work because the high ROM addresses are interpreted as negative numbers by BASIC.
Anyway, $93C already points into nirvana for SMSQ/E 2.98, so it would not make sense trying to iterate further.
(And current versions don't fit into ROM).


User avatar
mk79
Over Heated PSU
Posts: 137
Joined: Sun Feb 02, 2014 10:54 am

Re: ROMable SMSQ/E

Postby mk79 » Fri Jan 26, 2018 11:24 am

Peter wrote:This can't work because the high ROM addresses are interpreted as negative numbers by BASIC.
Doesn't matter, when transformed back into a 32-bit int address the bits look the same.
Anyway, $93C already points into nirvana for SMSQ/E 2.98, so it would not make sense trying to iterate further.
My bad, you're right. Exchange $93C with $8FC, that should work universally.

Cheers, Marcel


User avatar
Peter
Super Gold Card
Posts: 641
Joined: Sat Jan 22, 2011 8:47 am

Re: ROMable SMSQ/E

Postby Peter » Sun Jan 28, 2018 11:19 am

mk79 wrote:
Peter wrote:This can't work because the high ROM addresses are interpreted as negative numbers by BASIC.
Doesn't matter, when transformed back into a 32-bit int address the bits look the same.

Not therefore. It mattered because the program stopped with error on high addresses.

But with the correct list start, I actually saw RAM addresses.

So if not even Q40/Q60 SMSQ/E runs in ROM, it seems save to say that SMSQ/E always loads itself to RAM.
Last edited by Peter on Sun Jan 28, 2018 11:52 am, edited 1 time in total.


HAOUI
ROM Dongle
Posts: 33
Joined: Tue Dec 14, 2010 2:17 pm

Re: ROMable SMSQ/E

Postby HAOUI » Sun Jan 28, 2018 11:52 am

I don't know if following information may help, but I remember when I tried roming smsq/e on my q40 I found that recent smsq/e versions don't work when romed while they start correctly when lrespred.
This happens whatever the rom size used or high/low parts.
Last version working in rom i found is 3.17. 3.30/3.31 dont work.
I didn't try other version between 3.17 and 3.30.
Alain


User avatar
mk79
Over Heated PSU
Posts: 137
Joined: Sun Feb 02, 2014 10:54 am

Re: ROMable SMSQ/E

Postby mk79 » Tue Jan 30, 2018 12:52 pm

Peter wrote:
mk79 wrote:
Peter wrote:This can't work because the high ROM addresses are interpreted as negative numbers by BASIC.
Doesn't matter, when transformed back into a 32-bit int address the bits look the same.

Not therefore. It mattered because the program stopped with error on high addresses.
Hmm, cannot reproduce, "PRINT PEEK_L($F0000000)" doesn't throw any error here. Perhaps the rogue address was odd?

But with the correct list start, I actually saw RAM addresses.

So if not even Q40/Q60 SMSQ/E runs in ROM, it seems save to say that SMSQ/E always loads itself to RAM.
Yes. And the init code that walks the linked list printed by the BASIC program hasn't changed since at least 1997, which is the oldest version I have at hand at the moment. It's certainly possible to create a version that uses the modules already in ROM, but much of the loader code would have to change for this.

Marcel


User avatar
mk79
Over Heated PSU
Posts: 137
Joined: Sun Feb 02, 2014 10:54 am

Re: ROMable SMSQ/E

Postby mk79 » Tue Jan 30, 2018 12:56 pm

HAOUI wrote:I don't know if following information may help, but I remember when I tried roming smsq/e on my q40 I found that recent smsq/e versions don't work when romed while they start correctly when lrespred.
This happens whatever the rom size used or high/low parts.
Last version working in rom i found is 3.17. 3.30/3.31 dont work.
I didn't try other version between 3.17 and 3.30.
Alain
I guess hardly anybody has modified their Q40 to have ROMs large enough to fit the latest versions, so most people won't notice. Although, seeing that they are copied from ROM to RAM anyway they could be stored compressed and decompressed on the fly to fit again. That's probably not even that difficult to do, I think, but then again, you also don't gain much except avoiding the double boot.

Marcel


HAOUI
ROM Dongle
Posts: 33
Joined: Tue Dec 14, 2010 2:17 pm

Re: ROMable SMSQ/E

Postby HAOUI » Tue Jan 30, 2018 2:32 pm

I agree Marcel, but the question was : What happened in recent versions making smsq/e not working when romed, regardless of rom size ?

Also, there is no modif to do on the q40 to allow using ONE big os in rom. Only replace 2 ships 128kb capacity each by bigger ones 256 or 512.
Alain



Return to “Software & Programming”

Who is online

Users browsing this forum: No registered users and 6 guests