Page 1 of 2

Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 4:50 pm
by ql_freak
The test for my SuperBASIC hps_openOver%() function fails on uQLx with Minerva. The problem is, that DEVICE_STATUS() from Turbo Toolkit is faulty. I have written a short test for that (fits in #2) and as soon as you are using DEVICE_STATUS(0,'FILENAME') FILENAME will be open and you can only close the (QDOS) channel via Qpac2s Channel app. On QPC2 this program is working correctly.
testDEVICE_STATUS_bas.png
I have confirmed that my version of Turbo Toolkit is the same, as that from Dilwyns site. But this Archive contains 4 files. On QPC2 I'm using "Turbo_newsms_code" (don't know where I have got it) on uQLx the version from the archive called "turbo_tk_code" (the archive also contains turbo_sms_code and turbo_rem_code). What version should be used for Minerva and does anyone know, what version Turbo_newsms_code is, where to obtain it and if it can be used with Minerva (perphaps I have patched it myself, can't remember).

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 5:57 pm
by swensont
Interesting issue. I decided to run a few tests myself.

The key line is the DEVICE_STATUS(0,filename) line. I wondered why you were adding in single quotes instead of using just the file name, so I tested the following:

- DEVICE_STATUS(0,"ram1_del_me") - double quotes
output was -6 and the next delete failed with "in use"

- DEVICE_STATUS(0,'ram1_del_me') - single quotes
output was -6 and the next delete failed with "in use"

- DEVICE_STATUS(0,ram1_del_me) - no quotes
output was -7 and the next delete worked.

The above results were found with both JSU, Minerva and JS-4m roms (all available from Dilwyn's site).

Tim

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 6:00 pm
by RalfR
swensont wrote: Sat Feb 22, 2025 5:57 pm - DEVICE_STATUS(0,ram1_del_me) - no quotes
output was -7 and the next delete worked.
This surprises me a lot, because Turbo in particular always recommends putting all variables (and this would be one of them here) in quotation marks.

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 6:17 pm
by ql_freak
This is no wonder, cause -7 is the error for "not found", i.e. DEVICE_STATUS() has not found the file and so it has not opened it, so the DELETE will work. It seems DEVICE_STATUS() does not close the QDOS channel it has opened in its code.

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 7:52 pm
by pjw
ql_freak wrote: Sat Feb 22, 2025 6:17 pm This is no wonder, cause -7 is the error for "not found", i.e. DEVICE_STATUS() has not found the file and so it has not opened it, so the DELETE will work. It seems DEVICE_STATUS() does not close the QDOS channel it has opened in its code.
If youre happy to load a toolkit, there is FDEL at Knoware/toolkits/Compatibility. It is a delete function that doesnt error if the file you want to delete isnt present. I believe I also added this function to TK2, although it might not appear in all versions (like the ROM one due to space constraints).

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 7:58 pm
by pjw
It seems someone clobbered the version I did for SMSQ/E as it returns 0, rather than the intended -7 if the file is not found. However, it does return -9 if the file is in use, which is something, I suppose. I dont know about the TK2 one (V2.33+)

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 8:55 pm
by jobdone
I am seeing this error with version 3.44. I have version 3.22 which does not give this error.

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 9:52 pm
by jobdone
I am also getting -6 with Qemulator

Re: Turbo Toolkit (bug, which version)

Posted: Sat Feb 22, 2025 11:16 pm
by Andrew
swensont wrote: Sat Feb 22, 2025 5:57 pm Interesting issue. I decided to run a few tests myself.

The key line is the DEVICE_STATUS(0,filename) line. I wondered why you were adding in single quotes instead of using just the file name, so I tested the following:

- DEVICE_STATUS(0,"ram1_del_me") - double quotes
output was -6 and the next delete failed with "in use"
Out of curiosity I also tested
- DEVICE_STATUS(0,"ram1_del_me") - double quotes
output was -7
Both on QPC with turbo_sms_code v3.44 and QEmulator (Minerva+PE) with turbo_tk_code v3.44

Re: Turbo Toolkit (bug, which version)

Posted: Sun Feb 23, 2025 4:05 am
by jobdone
Andrew, AS ql_freak pointed out above the -7 is a not found error, so if there is no ram disk set up first, you get a -7. on q-emulator this is in the menu under QL Configuration>Devices and checking the Ram disk box, or just setting one up in software first, the same way on QPC.I actually booted QPC2 with the stock *.WIN file, which has a desktop and ram disk set up. this particular ram disk seems to return the number it should?