Disassembling gblorb?

Hi,

I have a gblorb file (my own game) that I want to dissamble into any readable format, having lost the source code. I7 would be great, but that’s most probably not possible. Is there any way to do this?

5 Likes

You can extract the text strings from the game with this program (which also accepts blorbed files): glulx-strings

(It doesn’t yield code, but is at least easier than playing a game through by hand to get a transcript.)

There’s also a decompiler for Glulx that emits I6 code at Index: if-archive/programming/glulx/tools/mrifk, although when I tried that just now with some games, it stopped the process after some errors, giving out only a partial I6 inf file. But it’s worth a try.

To get the original I7 code back would be, as you say, probably quite difficult, since I7 generates I6 before compiling that to Glulx or Zcode, so one would need to revert that intermediate step, too.

6 Likes

Mrifk doesn’t account for some opcodes.

Reverse Engineering the Source Code from .gblorb has some discussion or upgrading Mrifk–I’m not sure if anyone ever got the haskell code that tracked the new opcodes compiled, which I assume appeared after the last build of Mrifk.

Glulx-strings doesn’t do everything–it does’t show, say, i7 code with “[the item described]” but leaves it blank. But you’ll be able to weed out the narrative chunks among all the under-the-hood strings.

Hope you’re able to recover a lot and also to see something new from you!

I’d think the text bits are the biggest part of the decompilation. I’d also note it has a list of rules, which looks extensive if not complete, near the top of the file. That should help jog your memory about whatever rules you used, where, and save a bit of time and frustration.

(I speak from experience decompiling gblorbs with glulx-strings when I got stuck without a walkthrough.)

3 Likes

Thanks folks, I will try this out and see how far it gets me.

1 Like

I started working on a Glulx to C decompiler, which sometimes works. But it won’t help you get high level Inform 7 structure.

https://github.com/curiousdannii/if-decompiler

3 Likes