Repton Infinity Decompiler

reminisce about classic bbc micro and acorn electron games here
Related forum: adventures


Post Reply
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Repton Infinity Decompiler

Post by geraldholdsworth »

As part of the Repton Map Creator application, I thought it would be good to be able to decompile the Repton Infinity '0.*' files (and 'eO.*' files). So, I've now successfully written one using the information in Repton Decoder, supplied by Tautology. However, I have had to expand on this information to make it as complete as I could.

So, I've written this as a separate application (prior to putting the code into the main application) to make sure it does indeed decompile. So far, it can decompile the four object files supplied with Repton Infinity, and a few that I have created just for the purpose. I am therefore wondering if anyone has some of these files, of their own creation, stashed away somewhere that they could send me to try out. It would be useful if you also have the 'T.*' (or 'eT.*') file...oh, incidentally, it can also detokenise a 'T.*' (and 'eT.*') file.

Not sure if my programming skills are up to writing a recompiler though. I should be able to write a convertor to convert the BBC files to Electron and vice versa, which is the ultimate aim. I should also be able to write a retokeniser to produce the 'T.*' files from an 'O.*' file.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
The Kraken
Posts: 206
Joined: Tue Oct 21, 2008 5:51 pm
Contact:

Re: Repton Infinity Decompiler

Post by The Kraken »

I have this disc with a number of the files from my "Repton 5" project of 2010. If it helps to verify that your program is working correctly, you can see a playlist of these levels here: https://www.youtube.com/playlist?list=P ... 53D627FB75
Attachments
Repton5.ssd
(167.5 KiB) Downloaded 52 times
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Repton Infinity Decompiler

Post by geraldholdsworth »

That's perfect, thank you.

It decompiles perfectly - only thing is that I've noticed another bug in the application that I had missed before.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Repton Infinity Decompiler

Post by geraldholdsworth »

I've found some more here, thanks to SimonSideBurns (probably the same ones I've got on the Repton Resource Page). One of these did show up some code that wasn't getting decompiled properly.

I'm thinking of putting a build out on the public domain for folk to try out - it's still very "rough and ready", but good enough to use.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
AJW
Posts: 984
Joined: Sun Feb 15, 2004 2:01 pm
Contact:

Re: Repton Infinity Decompiler

Post by AJW »

The Kraken wrote: Thu Mar 30, 2023 6:59 pm I have this disc with a number of the files from my "Repton 5" project of 2010. If it helps to verify that your program is working correctly, you can see a playlist of these levels here: https://www.youtube.com/playlist?list=P ... 53D627FB75
Don't Repton infinity games count as standalone games releases and a place on the game archives?
User avatar
The Kraken
Posts: 206
Joined: Tue Oct 21, 2008 5:51 pm
Contact:

Re: Repton Infinity Decompiler

Post by The Kraken »

They aren't standalone; you need to load them inside the Repton Infinity game engine to play them.
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Repton Infinity Decompiler

Post by geraldholdsworth »

I've been developing this, on and off, for a while now and have written the compiler side of it...albeit it still doesn't compile properly at the moment (doesn't take into account 'ELSE' branches in an IF...ENDIF structure).

I've made the source publically available on GitHub (yes, I know, I'm going to be moving away from GitHub - it's just so convenient at the moment).

I've provided binaries for the usual crop of machines: Windows (32 and 64 bit), macOS (32, 64 bit Intel and 64 bit ARM), and Linux (32 and 64 bit Intel, 32 and 64 bit ARM).

It is all very rough and ready so if you try and break it, you will break it (probably). Just trying to tie the core code down for now, then I'll add some syntax checking, etc.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
Dave_E
Posts: 908
Joined: Fri Jun 16, 2006 1:55 pm
Location: Middlesbrough
Contact:

Re: Repton Infinity Decompiler

Post by Dave_E »

HeadFirst PD wrote some Electron-specific Repton Infinity games so you might well be able to create BBC Micro equivalents of these using your decompiler/recompiler.

There was also a game called Nectar Collector (on Everygamegoing) which I believe was the winner of the Repton Infnitity competition that Superior ran. The game could potentially be decompiled and then converted to Electron and then recompiled using these tools.

I guess if it could handle each of these then it must be pretty robust!
joachim
Posts: 325
Joined: Wed Jun 21, 2006 2:20 am
Location: Germany
Contact:

Re: Repton Infinity Decompiler

Post by joachim »

I know we have detailed understanding of the various R∞ file formats (as you'd imagine from the existence of the decompiler), but is there full documentation anywhere of how the main game loop uses these files, in the detail that one would need to reimplement the main game in a modern language and run original game files?

I'm thinking of stupid corner cases like "what happens when a slow-moving object starts to move onto a square from one direction, and then a fast-moving object moves onto it from the opposite direction, so that the object that the slow-moving object saw before it moved isn't the object that it ends up hitting?"
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Repton Infinity Decompiler

Post by geraldholdsworth »

I think there is a decompiled Repton Infinity source code somewhere. Might give a clue.

In fact, if there is, it might even answer my question...basically, the object code produced by RepTol has a maximum size - but this isn't documented anywhere. (OK, not quite a question).

EDIT: There doesn't appear to be one: See here
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
AJW
Posts: 984
Joined: Sun Feb 15, 2004 2:01 pm
Contact:

Re: Repton Infinity Decompiler

Post by AJW »

The Kraken wrote: Fri Apr 07, 2023 7:36 am They aren't standalone; you need to load them inside the Repton Infinity game engine to play them.
So how does Nectar Collector work then?
Post Reply

Return to “8-bit acorn software: classic games”