SuperCharge Decompiler
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
Here is an update of the SuperCharge decompiler as it stands at the moment.
In addition to improvements to the decompiler, I have added a system to to identify most of the library routines during the ProcessDump_bas program. This cuts out most of the tedious and error prone manual identification process. And it fills in the '_codes' file for you.
I have also included a user manual, which I hope makes some sense.
In addition to improvements to the decompiler, I have added a system to to identify most of the library routines during the ProcessDump_bas program. This cuts out most of the tedious and error prone manual identification process. And it fills in the '_codes' file for you.
I have also included a user manual, which I hope makes some sense.
- Attachments
-
- DisChargeDocs.zip
- (256.04 KiB) Downloaded 265 times
-
- DisCharge.zip
- (98.5 KiB) Downloaded 279 times
-
- RWAP Master
- Posts: 2893
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: SuperCharge Decompiler
It looks as though now might be the time for Martyn to approach Simon Goodwin - he probably still has the original Supercharge sources, and would be interested in this project no doubt. It would also be nice if someone asked him about releasing Supercharge as public domain, in line with Turbo (which he released as public domain some time ago).
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
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
If anyone is trying to use the decompiler, I have noticed a problem with it identifying the string = and <> routines.
The checksum system I introduced combines the number of bytes in the routine, and a total of those bytes added together.
By sod's law both routines have the same checksum! They both have the same number of bytes, and only differ by 2 bytes, and the two differences cancel each other out in the checksum.
The routines are almost exactly the same, You can differentiate between them by looking near the end of the routines for an instruction ‘movea.w $000000E6,a2’. just before it is a ‘moveq #$.. ,d0’ instruction.
‘moveq #$02,d0’ is an equals, and ‘moveq #$03,d0’ is a not equals.
The checksum system I introduced combines the number of bytes in the routine, and a total of those bytes added together.
By sod's law both routines have the same checksum! They both have the same number of bytes, and only differ by 2 bytes, and the two differences cancel each other out in the checksum.
The routines are almost exactly the same, You can differentiate between them by looking near the end of the routines for an instruction ‘movea.w $000000E6,a2’. just before it is a ‘moveq #$.. ,d0’ instruction.
‘moveq #$02,d0’ is an equals, and ‘moveq #$03,d0’ is a not equals.
-
- Super Gold Card
- Posts: 528
- Joined: Tue Mar 11, 2014 8:00 pm
- Location: Oxford, UK.
- Contact:
Re: SuperCharge Decompiler
Use a cryptographic hash instead, such as md5sum or even 3des?Martin_Head wrote:By sod's law both routines have the same checksum! They both have the same number of bytes, and only differ by 2 bytes, and the two differences cancel each other out in the checksum.
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
Another update.
Amongst improvements are that END FOR's now get the variable name added, and END DEFines get the procedure/function names added.
Amongst improvements are that END FOR's now get the variable name added, and END DEFines get the procedure/function names added.
- Attachments
-
- DisChargeDocs.zip
- (218.51 KiB) Downloaded 250 times
-
- DisCharge.zip
- (99.36 KiB) Downloaded 236 times
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: Super/TurboCharge Decompiler
Here is preview of a decompiler for TurboCharge
http://www.dilwyn.me.uk/tk/Tools_v1_10.zip by Emmanuel Verbeeck.
The original program was compiled without line numbers, so the decompiler has had to create line numbers, hence the odd line numbering. Also note that the decompiler has decompiled to one statement per line, due to the lack of line numbers.
While SuperCharged and TurboCharged programs are similar, There are enough differences to make me create a separate decompiler for Turbo. I will be making some changes to the SuperCharge decompiler (changing the checksums) So I have not included it here.
Here is some documentation for the decompiler Note that the technical manual is just odd notes I have made, and isn't very well organized.
I have downloaded a few programs from Dilwyn Jones web site that state they are Turbo compiled.
But before I start using any more of them for expanding the Turbo decompiler, Is there any copyright free programs that are actually wanted to be decompiled. If I am going to put the time and effort into decompiling something. I would rather it was something that was wanted.
It's not complete, or working completely right. But it hase produced this
From this program The original program was compiled without line numbers, so the decompiler has had to create line numbers, hence the odd line numbering. Also note that the decompiler has decompiled to one statement per line, due to the lack of line numbers.
While SuperCharged and TurboCharged programs are similar, There are enough differences to make me create a separate decompiler for Turbo. I will be making some changes to the SuperCharge decompiler (changing the checksums) So I have not included it here.
Here is some documentation for the decompiler Note that the technical manual is just odd notes I have made, and isn't very well organized.
I have downloaded a few programs from Dilwyn Jones web site that state they are Turbo compiled.
But before I start using any more of them for expanding the Turbo decompiler, Is there any copyright free programs that are actually wanted to be decompiled. If I am going to put the time and effort into decompiling something. I would rather it was something that was wanted.
-
- QL Wafer Drive
- Posts: 1068
- Joined: Sat Oct 25, 2014 9:53 am
Re: SuperCharge Decompiler
Amazing work, Martin - thank you!
Is there any value in my applying your decompiler to some of my own TURBO'd routines and comparing against my source - feeding back any insights here?
If so, are there particular internal compiled codes or program sequences that you'd be most interested in?
M.
Is there any value in my applying your decompiler to some of my own TURBO'd routines and comparing against my source - feeding back any insights here?
If so, are there particular internal compiled codes or program sequences that you'd be most interested in?
M.
-
- Aurora
- Posts: 970
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SuperCharge Decompiler
It would be nice to get some feedback as to how easy/hard people find trying to use the decompiler. And how close it gets to the original.martyn_hill wrote:Is there any value in my applying your decompiler to some of my own TURBO'd routines and comparing against my source - feeding back any insights here?
Note that the Turbo decompiler I have posted here is very young, and it is going to give problems. Especially when trying to decompile anything with omitted line numbers. The SuperCharge decompiler makes a lot of use of the starts of lines as reference points. When these references disappear, things start getting tricky.
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Super/TurboCharge Decompiler
Hi Martin,Martin_Head wrote:I have downloaded a few programs from Dilwyn Jones web site that state they are Turbo compiled.
But before I start using any more of them for expanding the Turbo decompiler, Is there any copyright free programs that are actually wanted to be decompiled. If I am going to put the time and effort into decompiling something. I would rather it was something that was wanted.
The source to Diskmate 5 is lost and only the Turbo compiled executable exists. I was trying to rewrite Diskmate 5 based on the way it works. I have extracted some of the Easyptr menu definitions, which were added to the end of the Turbo compiled code.
Maybe your discharge programme could be used to analyse the compiled code.
Regards,
Derek
Derek
-
- QL Wafer Drive
- Posts: 1068
- Joined: Sat Oct 25, 2014 9:53 am
Re: SuperCharge Decompiler
Sure - let me try some of my more complex compiled jobs and report back.Martin_Head wrote: It would be nice to get some feedback as to how easy/hard people find trying to use the decompiler. And how close it gets to the original.
I always leave line-numbers enabled - the value of the extra troubleshooting info this provides (when you have the source to compare against) far outweighs the larger job-size...