Page 1 of 1
Determining in SuperBASIC is it's a 128K BBQL
Posted: Sat Mar 25, 2023 10:03 pm
by stephen_usher
I seem to remember someone recently asking in a thread how to determine if the program is running on a 128K BBQL.
This is how I do it in a loader for "The Lost Pharaoh":
Code: Select all
10 loader$ = "flp1_pharaoh"
20 IF PEEK_W(163872) = 4 THEN LRUN loader$
30 TK2_EXT
40 MODE 4
50 PRINT "Not curently in 128K mode. Rebooting."
60 a$ = INKEY$(500)
70 RES_128
Of course this won't necessarily work with Minerva or systems which move the system variables but programs which require a standard 128K BBQL probably won't run on those anyway.
Re: Determining in SuperBASIC is it's a 128K BBQL
Posted: Sun Mar 26, 2023 3:34 pm
by Derek_Stewart
Hi,
Why can't you look the Ramtop, if not128K, then rest to 128K
According the Rwap adverts, The Lost Pharaoh, needs 256K to run, is the advert wrong ?
Re: Determining in SuperBASIC is it's a 128K BBQL
Posted: Sun Mar 26, 2023 9:35 pm
by stephen_usher
Derek_Stewart wrote: Sun Mar 26, 2023 3:34 pm
Hi,
Why can't you look the Ramtop, if not128K, then rest to 128K
According the Rwap adverts, The Lost Pharaoh, needs 256K to run, is the advert wrong ?
I'm looking at the system variable offset 0x20 from the start, which is supposed to be a word holding the top of memory -1 but instead seems to hold 4 on a 128K machine and 64 on the SGC.
My copy of The Lost Pharoah only runs on a 128K machine or with res_128. It's an original copy on Microdrive initially.
Re: Determining in SuperBASIC is it's a 128K BBQL
Posted: Mon Mar 27, 2023 8:08 am
by Pr0f
4 sound about right for a ramtop for a 128 Machine - as it's a word - and you are probably looking at the top order byte - so 4 x 65536 - which is at 256K boundary (the first 128k of space in the QL memory map is ROM and I/O or reserved, and the 128K of RAM is after this)
Re: Determining in SuperBASIC is it's a 128K BBQL
Posted: Mon Mar 27, 2023 9:10 am
by Derek_Stewart
Hi,
My apologies, I forgot the definition of the system variables.
Looking the QL Technical Manual :
163872 ($28020) is SV_RAMT, long word
Re: Determining in SuperBASIC is it's a 128K BBQL
Posted: Wed Mar 29, 2023 11:45 pm
by Derek_Stewart
Hi,
A side question from this topic, I was wondering if a Test Rom for the QL could be plugged into the QL Rom Port, to test the QL internal circuitry, perform ram test, test the 8049, 8302, 8301.
Is this a possibility or just me being silly...
Re: Determining in SuperBASIC is it's a 128K BBQL
Posted: Thu Mar 30, 2023 8:14 pm
by stephen_usher
Whether it would be useful would depend upon how much of the system needs to be operational before the external ROM gets called. That would probably be determined by the start-up code in the system ROM.
Re: Determining in SuperBASIC is it's a 128K BBQL
Posted: Fri Mar 31, 2023 7:36 pm
by tofro
Derek_Stewart wrote: Wed Mar 29, 2023 11:45 pm
Hi,
A side question from this topic, I was wondering if a Test Rom for the QL could be plugged into the QL Rom Port, to test the QL internal circuitry, perform ram test, test the 8049, 8302, 8301.
Is this a possibility or just me being silly...
A plugin ROM can unfortunately not disable the original ROMs from behind the ROM port. If you'd make it to be selected from address 0 onwards (which is perfectly possible), it would create a bus conflict with the original ROMs. You could only use such a ROM card when the original ROMs are removed.