QLiberator decompiler

Anything QL Software or Programming Related.
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QLiberator decompiler

Post by RalfR »

Martin_Head wrote:I have now got a decompile of QLIB_OBJ that I am looking through for problems, and tidying up ready for loading. There are some embedded SuperBASIC extensions, which I have extracted, but not looked at yet.
I see, perhaps you found keywords like FINDSYMBOL, GENSYMBOL, INITgen, GENop, RA6, FINDnext, UNdef, GENop and so on. These seem to be MC extensions for finding the name tables and reading A6.


4E75 7000
Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: QLiberator decompiler

Post by Martin_Head »

Ralf R. wrote:
Martin_Head wrote:I have now got a decompile of QLIB_OBJ that I am looking through for problems, and tidying up ready for loading. There are some embedded SuperBASIC extensions, which I have extracted, but not looked at yet.
I see, perhaps you found keywords like FINDSYMBOL, GENSYMBOL, INITgen, GENop, RA6, FINDnext, UNdef, GENop and so on. These seem to be MC extensions for finding the name tables and reading A6.
I have not had a chance to have a good look at it yet. I have been concentrating on Disk Mate 5. Which I have just got to the stage where SMSQ/E will load, and start running it without complaint. But it stops when it hits the first extended keyword. So I now need to sort the keywords out like I did in Sedit, so that I can install them, and try the program.

There seems to be some very odd GO TO's in Disk Mate 5. I don't know if it's some decompiling problem, or intended. I suppose I will find out when get the keywords loaded.


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QLiberator decompiler

Post by RalfR »

I have a Supercharged loading programm for the original QL.Pawn. That was made by an italian guy long time ago. Would be good to see, what he has made to load this game. I can send you this one.


4E75 7000
Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: QLiberator decompiler

Post by Martin_Head »

Ralf R. wrote:I have a Supercharged loading programm for the original QL.Pawn. That was made by an italian guy long time ago. Would be good to see, what he has made to load this game. I can send you this one.
I don't know the copyright status of QL Pawn, If you want to post it here. But I will send you a personal message with my email address, If you want to send it to me. I don't know when I may find the time to look at it. Unless of course, you want to try to decompiling it yourself?


RWAP
RWAP Master
Posts: 2838
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: QLiberator decompiler

Post by RWAP »

I obtained consent to make QL Pawn freeware and it is available for download from Dilwyn's website - http://www.dilwyn.me.uk/games/adventures/index.html

This includes the loader referred to, as there was no other way of removing the copy protection.


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

Re: QLiberator decompiler

Post by pjw »

Martin_Head wrote:I had a quick look at decompiling QLiberator itself yesterday. There appears to be two compiled programs, QLib_obj and QLib_Patch_obj. The Patch file ran through the decompiler with a couple of warnings, But the QLib file threw up several warnings, and hit an unrecognised code. It also looks like it uses some ON ... GO TO's which the decompiler did not handle as well as I expected.
Great stuff, Martin!
IMHO QLib ought to be the main target, as it is a seminal program - in a class of its own. Decompiling it may help with improving the decompiler too.


Per
dont be happy. worry
- ?
Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: QLiberator decompiler

Post by Martin_Head »

While working on the decompiled Diskmate 5, I have a problem with Q_ERR_ON "fex" giving an error message.
This error also occurs in the compiled program.
Is this a known bug with QLiberator/SMSQE?

Also are there any other known bugs in QLiberator, as I now have a mostly working, decompiled QLIB_OBJ and QLIB_PATCH_OBJ files.
I have tried most of the 'demo' programs supplied with QLiberator, in the decompiled QLib, and they seem to work OK.


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

Re: QLiberator decompiler

Post by tofro »

Any error related to "FEX" might not necessarily be QLiberator's fault.
FEX is known to be an ambiguous keyword, occuring both in some versions of SMSQ/E and FileInfo 2. This should be fixed by today, but your error might still be a remnant of that name clash.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: QLiberator decompiler

Post by Martin_Head »

tofro wrote:Any error related to "FEX" might not necessarily be QLiberator's fault.
FEX is known to be an ambiguous keyword, occuring both in some versions of SMSQ/E and FileInfo 2. This should be fixed by today, but your error might still be a remnant of that name clash.

Tobias
I had a quick look at what Diskmate does. And I think it has a look through the results of the EXTRAS command, and if FEX appears (which it does) than it does a Q_ERR_ON "fex".

If I run the compiled Diskmate 5 in QPC2, it stops with an error on Q_ERR_ON, which I assume is this line. You can then 'C'ontinue to get past it. So I thought it was an issue with Q_ERR_ON in one of the QLiberator extensions.


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

Re: QLiberator decompiler

Post by pjw »

Martin_Head wrote: Also are there any other known bugs in QLiberator, as I now have a mostly working, decompiled QLIB_OBJ and QLIB_PATCH_OBJ files.
I have tried most of the 'demo' programs supplied with QLiberator, in the decompiled QLib, and they seem to work OK.
Im not quite ready to supply my answer that question, as you did this a lot faster than I expected ;)
AFAIK there are not many bugs in QLib, but it could do with some updating. For starters:
1) Allow int% and hex$ literals, as in SMSQ/E
2) Update PEEK and related keywords to allow the SMSQ/E variants. (QLib always uses its internal version)
3) DIV/MOD: IIRC, QLib also always uses its internal version of these which are word sized. SBASIC uses long
4) Personally I need QLib to leave room for longer job names! At present it is limited to 22 char, but Things may have 48 char
(_keys_qdos_sms: sms.mxjn equ $30 recommended job name allowance in job header) This so that a job may have room
to, eg, append a file name to the end of its name (a la Qpac2 Files, etc)
However, compatibility is important across platforms! so this must be kept in mind (as Im sure you know ;))


Per
dont be happy. worry
- ?
Post Reply