Q-Liberator 3.46

Anything QL Software or Programming Related.
User avatar
Andrew
Aurora
Posts: 796
Joined: Tue Jul 17, 2018 9:10 pm

Re: Q-Liberator 3.46

Post by Andrew »

t0nyt wrote: Mon Mar 25, 2024 10:09 am When I lrun flp1_boot on Q-emuLator, with nothing else loaded, it crashes out (see image)

But if I boot Q-emuLator with the img already in the flp1 device slot it loads fine

Is there any obvious reason for this please?

Many thanks


Screenshot 2024-03-25 at 10.05.13.png
I have tested in QEmulator (Minerva + TK2) and it works - meaning that I get no error when I boot directly from floppy image or I use lrun
But at first run FindKey("TK2_EXT") always returns 0, even if TK2 is loaded and started. Subsequent calls to FindKey("TK2_EXT") return 1
What QEmulator configuration are you using?
As I can see in your screenshot, you get a "At line 100 bad name", but the error seems to appear after ENV_bin and QLIB_SYS already loaded in lines 370 and 470 :shock:


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Q-Liberator 3.46

Post by Derek_Stewart »

..or try this if TK2 is not loaded:

Code: Select all

100 td$='flp1_': REMark Change this to suit..
110 :
120 CLS: PRINT 'Q_Liberator Boot 3.46'
130 PRINT 'Copyright 1991+ Liberation Software'
140 PRINT, '& pjw, November 2021++'
150 :
160 PRINT 'Q_Liberator is loading ...'
170 :
360 PRINT 'Loading ENV_BIN ...'
370 L=RESPR (896): LBYTES td$&'ENV_BIN',L: CALL L
390 :
580 a=RESPR(2816)
590 LBYTES td$&'Qlib_bin',a : CALL a
600 :
610 REMark ** Load runtime system **
620 a=RESPR(10552)
630 LBYTES td$&'Qlib_run',a : CALL a
640 :
650 REMark ** Load OVERLAY and UNLOAD **
660 a=RESPR(1006)
670 LBYTES td$&'Qlib_ovl',a : CALL a
680 :
690 REMark ** Load SuperBASIC extensions **
700 REMark QERR Q_PIPE etc
710 a=RESPR(500)
720 LBYTES td$&'Qerr_bin',a : CALL a
730 :
740 a=RESPR(118)
750 LBYTES td$&'Qpipe_bin',a : CALL a
760 :
820 LRUN td$&'boot_use'
I can not seem to attach the boot file, the Forum is preventing me, from upload a simple text file, so I have zipped it up:
boot_no_tk2_bas.zip
(582 Bytes) Downloaded 10 times
I have just amended the LRESPR command for the ENV_BIN and use lines 580 to 820, the rest are not required.

I deleted the findkey stuff, I do not think that it is required, but there maybe some complicated reason for having the code.


Regards,

Derek
User avatar
t0nyt
Gold Card
Posts: 385
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: Q-Liberator 3.46

Post by t0nyt »

Hi Andrew, I always use JS Rom and default TK2 in q-emulator. Real iron’s are JS Rom and currently TK2 2.36 or so

Hi Derek, many thanks. Will give that a try later. Much appreciated

Many thanks


User avatar
t0nyt
Gold Card
Posts: 385
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: Q-Liberator 3.46

Post by t0nyt »

Derek_Stewart wrote: Mon Mar 25, 2024 11:17 am ..or try this if TK2 is not loaded:

Code: Select all

100 td$='flp1_': REMark Change this to suit..
110 :
120 CLS: PRINT 'Q_Liberator Boot 3.46'
130 PRINT 'Copyright 1991+ Liberation Software'
140 PRINT, '& pjw, November 2021++'
150 :
160 PRINT 'Q_Liberator is loading ...'
170 :
360 PRINT 'Loading ENV_BIN ...'
370 L=RESPR (896): LBYTES td$&'ENV_BIN',L: CALL L
390 :
580 a=RESPR(2816)
590 LBYTES td$&'Qlib_bin',a : CALL a
600 :
610 REMark ** Load runtime system **
620 a=RESPR(10552)
630 LBYTES td$&'Qlib_run',a : CALL a
640 :
650 REMark ** Load OVERLAY and UNLOAD **
660 a=RESPR(1006)
670 LBYTES td$&'Qlib_ovl',a : CALL a
680 :
690 REMark ** Load SuperBASIC extensions **
700 REMark QERR Q_PIPE etc
710 a=RESPR(500)
720 LBYTES td$&'Qerr_bin',a : CALL a
730 :
740 a=RESPR(118)
750 LBYTES td$&'Qpipe_bin',a : CALL a
760 :
820 LRUN td$&'boot_use'
I can not seem to attach the boot file, the Forum is preventing me, from upload a simple text file, so I have zipped it up:
boot_no_tk2_bas.zip

I have just amended the LRESPR command for the ENV_BIN and use lines 580 to 820, the rest are not required.

I deleted the findkey stuff, I do not think that it is required, but there maybe some complicated reason for having the code.
Hi Derek. I actually ran this script WITH TK2 installed and it works fine for me on Q-emuLator and real iron as I can now launch the QLiberator screen as per your original screenshot

Many, many thanks


User avatar
pjw
QL Wafer Drive
Posts: 1316
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Q-Liberator 3.46

Post by pjw »

t0nyt wrote: Mon Mar 25, 2024 10:09 am When I lrun flp1_boot on Q-emuLator, with nothing else loaded, it crashes out (see image)

But if I boot Q-emuLator with the img already in the flp1 device slot it loads fine

Is there any obvious reason for this please?

Many thanks
Screenshot 2024-03-25 at 10.05.13.png
No, its incredibly unobvious!

The problem seems to be that the function FindKey has too many LOCal
parameters for pre-Minerva Qdos! According to the documentation found in
The SuperBASIC Reference Manual the limit on LOCals should be nine. FindKey
has only eight. Perhaps the parameter, k$, counts as local too? But even
so, the sum is nine, which should have been ok.

The SuperBASIC Reference Manual proposes the fix

Code: Select all

CALL PEEK_W(282) + 36, 10
to increase the size of the name table, but for some reason it didnt work
in this case.

So for now the only thing I can suggest is

1) to REMark out line 870:

Code: Select all

870 REMark LOCal l%, k%
or
2) Use Minerva or SMSQ/E instead, or
3) Do what Derek_Stewart suggests (viewtopic.php?p=56318#p56318)

PS Derek: The reason for FindKey is to 1) check that TK2 is loaded (the
system wont work otherwise and) 2) avoid loading duplicate toolkits in the
event you have already booted.

Its so noobies dont get baffled - and to baffle the pundits! Just part of
the service..


Per
dont be happy. worry
- ?
User avatar
t0nyt
Gold Card
Posts: 385
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: Q-Liberator 3.46

Post by t0nyt »

pjw wrote: Mon Mar 25, 2024 2:08 pm
So for now the only thing I can suggest is

1) to REMark out line 870:

Code: Select all

870 REMark LOCal l%, k%
or
2) Use Minerva or SMSQ/E instead, or
3) Do what Derek_Stewart suggests (viewtopic.php?p=56318#p56318)
Hi Per,

Both the REM of 870 and Derek's boot file both work for me, so will use one of those

However the whole exercise seems to of been a dead end because I was expecting to get the QSAVE function but all I get is "bad name"

Reading thru all the manuals on Dilwyns QLiberator page only seem to make a passing comment about it but no information, that I can see, on how to get it

EDIT: seems it's actually part of SMS?

Many thanks all
Last edited by t0nyt on Mon Mar 25, 2024 2:33 pm, edited 1 time in total.


User avatar
Andrew
Aurora
Posts: 796
Joined: Tue Jul 17, 2018 9:10 pm

Re: Q-Liberator 3.46

Post by Andrew »

pjw wrote: Mon Mar 25, 2024 2:08 pm
The problem seems to be that the function FindKey has too many LOCal
parameters for pre-Minerva Qdos!
Under Qdos+Minerva at first run FindKey("TK2_EXT") always returns 0, even if TK2 is loaded and started. Subsequent calls to FindKey("TK2_EXT") return 1
Under SMSQE FindKey returns 1 from the first run


User avatar
pjw
QL Wafer Drive
Posts: 1316
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Q-Liberator 3.46

Post by pjw »

t0nyt wrote: Mon Mar 25, 2024 2:22 pm <>
However the whole exercise seems to of been a dead end because I was expecting to get the QSAVE function but all I get is "bad name"
<>
QLOAD/QSAVE are included on the Qlib346u disk in the qload_ directory.


Per
dont be happy. worry
- ?
User avatar
t0nyt
Gold Card
Posts: 385
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: Q-Liberator 3.46

Post by t0nyt »

pjw wrote: Mon Mar 25, 2024 2:42 pm
t0nyt wrote: Mon Mar 25, 2024 2:22 pm <>
However the whole exercise seems to of been a dead end because I was expecting to get the QSAVE function but all I get is "bad name"
<>
QLOAD/QSAVE are included on the Qlib346u disk in the qload_ directory.
Many thanks


User avatar
pjw
QL Wafer Drive
Posts: 1316
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Q-Liberator 3.46

Post by pjw »

Andrew wrote: Mon Mar 25, 2024 2:23 pm <>
Under Qdos+Minerva at first run FindKey("TK2_EXT") always returns 0, even if TK2 is loaded and started. Subsequent calls to FindKey("TK2_EXT") return 1
Under SMSQE FindKey returns 1 from the first run
Im not sure about your preconditions. Did you get the systems variables pointer first? If you did, it should work every time.
With my proposed fix of remming out two of the locals all issues mentioned have vanished!
I have prepared a new version of FindKey that will appear in the next update of Qlib.

I cant get people to beta test for me any more, so you are all beta testers now!


Per
dont be happy. worry
- ?
Post Reply