SuperCharge Decompiler
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
SuperCharge Decompiler
This is a walk through on how to use my SuperCharge decompiler.
This is not a full release of the Decompiler, as it is still a work in progress, and it doesn't know how to handle all commands.
This worked, walk through shows you the steps involved in generating a BASIC program from a SuperCharged executable.
Before unzipping the sample file, rename it sample_zip, and unzip in QDOS to retain the executable file header
This is not a full release of the Decompiler, as it is still a work in progress, and it doesn't know how to handle all commands.
This worked, walk through shows you the steps involved in generating a BASIC program from a SuperCharged executable.
Before unzipping the sample file, rename it sample_zip, and unzip in QDOS to retain the executable file header
- Attachments
-
- Documents.zip
- Libre office and PDF documents
- (719.99 KiB) Downloaded 363 times
-
- sample.zip
- Rename to sample_zip and unzip in QDOS
- (148.67 KiB) Downloaded 376 times
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
Something went a bit wrong with the first upload. The DisCharge_bas program got corrupted.
Here is another go...
This is a slightly updated version of DisCharge_bas that now knows about, code array indexs
53, == (string)
183, colour stipples (triple)
plus a few other bug fixes
As before rename and unzip in QDOS
Here is another go...
This is a slightly updated version of DisCharge_bas that now knows about, code array indexs
53, == (string)
183, colour stipples (triple)
plus a few other bug fixes
As before rename and unzip in QDOS
- Attachments
-
- sample2.zip
- Unzip in QDOS
- (152.94 KiB) Downloaded 366 times
- NormanDunbar
- Forum Moderator
- Posts: 2470
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: SuperCharge Decompiler
Hi Martin,
this is a very interesting project. Unfortunately, as far as I know, I don't have any Supercharged programs to try it out on, after the demo, even though I purchased Supercharge many years ago.
Sadly my floppy collection, built up over many years, died, or was found to be dead, a little while back. None of my originals or backups would spin in the drive.
Cheers,
Norm.
this is a very interesting project. Unfortunately, as far as I know, I don't have any Supercharged programs to try it out on, after the demo, even though I purchased Supercharge many years ago.
Sadly my floppy collection, built up over many years, died, or was found to be dead, a little while back. None of my originals or backups would spin in the drive.

Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
Rich Mellor suggested a few programs for me to try. Mostly still commercial, but Nucleon Programmers Assistant by Pyramide, and Concept 3D graphics drawing. Are available from Dilwyn Jones web site, if you fancy having a go.
So far, apart from the original Tridim, I have been using 3D Slime, and Type22 to teach the decompiler. While 3D Slime produces a BASIC program that mostly looks good, it has one or two oddities. And Type22 is just about to produce it's first full decompile.
So far, apart from the original Tridim, I have been using 3D Slime, and Type22 to teach the decompiler. While 3D Slime produces a BASIC program that mostly looks good, it has one or two oddities. And Type22 is just about to produce it's first full decompile.
-
- RWAP Master
- Posts: 2893
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: SuperCharge Decompiler
It might be silly - but how about trying to decompile SuperCharge itself? I believe it self-compiled originally.....
There is also a selection of programs on the Sinclair QL Homepage:
CadQL.zip on http://www.dilwyn.me.uk/graphics/index.html
Caxton on http://www.dilwyn.me.uk/label/index.html
Probably several others too...
These have the benefit of including the original BASIC source, so can be useful to compare the output with the original
There is also a selection of programs on the Sinclair QL Homepage:
CadQL.zip on http://www.dilwyn.me.uk/graphics/index.html
Caxton on http://www.dilwyn.me.uk/label/index.html
Probably several others too...
These have the benefit of including the original BASIC source, so can be useful to compare the output with the original
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
-
- RWAP Master
- Posts: 2893
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: SuperCharge Decompiler
There is also the loading program for PAWN (cracked version) 

Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: SuperCharge Decompiler
Good work !
I like to test for OMEGA. This game contains a bug, so i like to find that.
More intréssting is a decompiler for Qliberated files. is there anything around ?
Detlef
I like to test for OMEGA. This game contains a bug, so i like to find that.
More intréssting is a decompiler for Qliberated files. is there anything around ?
Detlef
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
While working on the decompiler, I have noticed that SuperCharge seems to treat '==' (almost equals) for integers and floats the same as '='. '==' for strings is not a problem.
Is '=' and '==' for integers and floats any different in SuperBASIC? I can't see the point of '==' for numbers, either they are the same, or they are not.
So would it be safe to convert what was a '==' into a '=' for numbers.
Is '=' and '==' for integers and floats any different in SuperBASIC? I can't see the point of '==' for numbers, either they are the same, or they are not.
So would it be safe to convert what was a '==' into a '=' for numbers.
-
- RWAP Master
- Posts: 2893
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: SuperCharge Decompiler
I thought there was a slight difference when you got to tiny differences between numbers (eg 0==0.0000000001) but I can't prove it in q-emulator....
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
- NormanDunbar
- Forum Moderator
- Posts: 2470
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: SuperCharge Decompiler
From Jan Jones:
The equivalence (= =) or ‘almost equal’ operator has a greater tolerance. Here X = = Y will be true if | X-Y | < = | Y* 1E-7 | where | X-Y | means the absolute, or positive, value of X-Y.
Note : it may not be immediately obvious that no value will ever be = = zero. If in the above equation, Y is zero, the check reduces to | x | < = 0, clearly impossible when x is a non-zero number. If you make X zero instead of Y, the test becomes | Y | < = | Y* 1E-7 |, which is also somewhat infeasible. To test for a quantity being very close to zero, add 1 to both sides eg, (X + 1) = = 1.
HTH
Cheers,
Norm.
The equivalence (= =) or ‘almost equal’ operator has a greater tolerance. Here X = = Y will be true if | X-Y | < = | Y* 1E-7 | where | X-Y | means the absolute, or positive, value of X-Y.
Note : it may not be immediately obvious that no value will ever be = = zero. If in the above equation, Y is zero, the check reduces to | x | < = 0, clearly impossible when x is a non-zero number. If you make X zero instead of Y, the test becomes | Y | < = | Y* 1E-7 |, which is also somewhat infeasible. To test for a quantity being very close to zero, add 1 to both sides eg, (X + 1) = = 1.
HTH
Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.