SuperCharge Decompiler
Re: SuperCharge Decompiler
As the author of the xwords program, I'm happy to try to explain any aspects of the program which cause any problems or which require clarification.
It is some time since I wrote the program. So it might take me a while to understand my own code!
It is some time since I wrote the program. So it might take me a while to understand my own code!
David
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
I have been doing some work on TurboDisCharge. I have reorganized the Library files into one for each of the versions of the code generator that I know about.
And the TurboProcessDump program will pick the corresponding files to use. Note that the Library files are not complete, I add to them as I identify routines.
I have also included the results of decompiling the Xwords program by dden.
xwordsOriginal_bas - The original BASIC program
xwords5_bas - The raw output from the decompiler
xwords_bas - After I tidied up xwords5_bas to get it to load and run (compare the two to see what I had to do)
xwords_ext - SuperBASIC extensions for Xwords that were embedded in the executable file, and extracted by the TurboProcessDump program
And the TurboProcessDump program will pick the corresponding files to use. Note that the Library files are not complete, I add to them as I identify routines.
I have also included the results of decompiling the Xwords program by dden.
xwordsOriginal_bas - The original BASIC program
xwords5_bas - The raw output from the decompiler
xwords_bas - After I tidied up xwords5_bas to get it to load and run (compare the two to see what I had to do)
xwords_ext - SuperBASIC extensions for Xwords that were embedded in the executable file, and extracted by the TurboProcessDump program
- Attachments
-
- xwords.zip
- (69.81 KiB) Downloaded 303 times
-
- Documents.zip
- (325.98 KiB) Downloaded 361 times
-
- DisCharge.zip
- (102.86 KiB) Downloaded 335 times
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
It's been a while since I posted anything on the Super/Turbo Decompiler. So here's an update.
There are now two versions of the Turbo decompiler, One for included line numbers, and one for omitted line numbers. Trying to get one program to handle both was getting a bit messy.
Note that the technical notes document is far from complete.
I have also supplied a worked example of decompiling a program called Super Kit Merger, which includes the original source SuperBASIC program. So you can compare the result of the decompilation with it.
Hope I have not forgot any files.
There are now two versions of the Turbo decompiler, One for included line numbers, and one for omitted line numbers. Trying to get one program to handle both was getting a bit messy.
Note that the technical notes document is far from complete.
I have also supplied a worked example of decompiling a program called Super Kit Merger, which includes the original source SuperBASIC program. So you can compare the result of the decompilation with it.
Hope I have not forgot any files.
- Attachments
-
- DisCharge.zip
- (254.23 KiB) Downloaded 298 times
-
- DisChargeDocs.zip
- (373.13 KiB) Downloaded 340 times
-
- WorkedExample.zip
- (204.95 KiB) Downloaded 323 times
Re: SuperCharge Decompiler
Hi Martin,
I have been away from QL scene for a while, however reading QL forum now and then, this project of yours caught my attention. I am curious what development tools and system you used for it, I can see some _libs but no executables, only _bas programs.
Cheers
Tomas
I have been away from QL scene for a while, however reading QL forum now and then, this project of yours caught my attention. I am curious what development tools and system you used for it, I can see some _libs but no executables, only _bas programs.
Cheers
Tomas
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
Talent/Quanta Assembler Workbench to produce disassembler listings (but you could use any disassembler you liked, though you may need to modify my programs to accept a different disassembly listing) , QPC2 and a text editor. (I use a Windows based one)tcat wrote:Hi Martin,
I have been away from QL scene for a while, however reading QL forum now and then, this project of yours caught my attention. I am curious what development tools and system you used for it, I can see some _libs but no executables, only _bas programs.
Cheers
Tomas
There are no machine code routines, it's all done in SBASIC. With some work you could probably convert the SBASIC to SuperBASIC and run it on a QDOS system.
The _lib files are libraries of routines that Super/TurboCharge use in the compiled code. If my decompiler identifies all the routines in the compiled program, then the _lib files are not needed. They are only needed to help you when you have to identify them yourself to teach the decompiler the new routines.
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
Here's an update to the decompiler.
The SuperCharge decompiler has had a rewrite to make it work in the same way as the Turbo decompiler. And the decompiler now recognizes sections of 'Inline' code that is surrounded by a REMark + and a REMark -. That is machine code, that gets embedded inside the coded version of the SuperBASIC program.
The decompiler does not decompile this code, but highlights where it is in the decompiled program.
So far I have only found one compiled program that uses 'Inline' code, and I can't think of a straight forward way of getting the decompiler to decompile it. So for the moment you will have to decompile this code by hand.
The SuperCharge decompiler has had a rewrite to make it work in the same way as the Turbo decompiler. And the decompiler now recognizes sections of 'Inline' code that is surrounded by a REMark + and a REMark -. That is machine code, that gets embedded inside the coded version of the SuperBASIC program.
The decompiler does not decompile this code, but highlights where it is in the decompiled program.
So far I have only found one compiled program that uses 'Inline' code, and I can't think of a straight forward way of getting the decompiler to decompile it. So for the moment you will have to decompile this code by hand.
- Attachments
-
- DisCharge_Jan2019.zip
- (268.41 KiB) Downloaded 305 times
-
- DisChargeDocs_Jan2019.zip
- (408.98 KiB) Downloaded 297 times
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
Here is an update to the DisCharge decompiler.
DisCharge now supports 7 SuperCharge versions, and 6 Turbo code generator versions.
I have also tried to make the decompiler a little easier to use by automating the process of disassembling.
When you run the DisCharge program, It now asks you for the file name of the executable program.
It then starts the Talent/Quanta Assembler Workbench monitor (available here http://www.dilwyn.me.uk/asm/talentaw22.zip). Does the disassembly, processes the result and then gives you the option of automatically starting the correct main decompiling program.
For anyone interested in seeing the kind of outputs DisCharge generates for the same program compiled with different options, I have included some samples.
DisCharge now supports 7 SuperCharge versions, and 6 Turbo code generator versions.
I have also tried to make the decompiler a little easier to use by automating the process of disassembling.
When you run the DisCharge program, It now asks you for the file name of the executable program.
It then starts the Talent/Quanta Assembler Workbench monitor (available here http://www.dilwyn.me.uk/asm/talentaw22.zip). Does the disassembly, processes the result and then gives you the option of automatically starting the correct main decompiling program.
For anyone interested in seeing the kind of outputs DisCharge generates for the same program compiled with different options, I have included some samples.
- Attachments
-
- Samples0619.zip
- (25.16 KiB) Downloaded 249 times
-
- DisChargeDocs0619.zip
- (461.54 KiB) Downloaded 263 times
-
- DisCharge0619.zip
- (315.02 KiB) Downloaded 270 times
-
- QL Wafer Drive
- Posts: 1068
- Joined: Sat Oct 25, 2014 9:53 am
Re: SuperCharge Decompiler
Dear Martin
Just in case I forget to say it, your development of the Decompiler remains a truly valuable project for us and I for one am grateful for your on-going efforts!
Just in case I forget to say it, your development of the Decompiler remains a truly valuable project for us and I for one am grateful for your on-going efforts!
Re: SuperCharge Decompiler
Ditto!
..one of the most valuable project of the last years.
Fabrizio

..one of the most valuable project of the last years.
Fabrizio
martyn_hill wrote:Dear Martin
Just in case I forget to say it, your development of the Decompiler remains a truly valuable project for us and I for one am grateful for your on-going efforts!
- mk79
- QL Wafer Drive
- Posts: 1349
- Joined: Sun Feb 02, 2014 10:54 am
- Location: Esslingen/Germany
- Contact:
Re: SuperCharge Decompiler
First of all, very cool project, congratulations! Now do Qliberator 
Cheers, Marcel

Wow, I didn't know this version existed! I've been using a patched Talent version for the last 25 years, it's an invaluable tool.Martin_Head wrote:It then starts the Talent/Quanta Assembler Workbench monitor
Cheers, Marcel