You mean one can go from .gblorb to I6? Wouldn’t I6 contain all the same information (plus some) contained in the I7 .ni file, just in a different language?
If I can get it in I6, I can learn I6. How can I disassemble the .gblorb into I6?
EDIT: What I’m most interested in is the text. It’s a small thing, and the mechanics are simple and easily re-made.
How do I go I7 → Glulx → I6? All these file types and interpreters and virtual machines have me mixed up. The only file I have is the .gblorb, compiled by I7.
Right, so you’ve compiled I7 into Glulx. Now you need to extract the .ulx file from the blorb packaging, then run it through the Inform 6 disassembler (it’s called Disinform or Uninform or something like that).
This contains a Glulx file which lets you manipulate blorb files in various ways, including extraction. It shouldn’t be too hard to figure out. Once you’ve extracted all the data from the blorb file, you should have a file called STORY0 (or something like that). This is your Glulx file which you need to disassemble to get at the text.
When I ran the windows binaries, it worked fine, but it just outputs the source to the console, so you’ll need to redirect it to a file. The command for that would be something like
And then you should have inform 6 source code for your game in a file called ‘sourcecode.inf’.
I know that this is a bit later than when this was started, but I tried doing this myself and mrifk keeps saying that there is an invalid opcode 181. is there anyway to fix this?
mrifk hasn’t been updated in about a decade, from the look of it, so it’s missing a lot of more recent opcodes. The only way to fix this would be to edit the source code and compile a new version. No idea how hard that would be, but the source code for mrifk is available on the if-archive.
Does anyone have knowledge of Haskell or how to compile on it? If not, I could figure it out eventually. I’d be glad to add the updated Mrifk_disasm.hs as well for all the new-ish opcodes, if someone can compile. Then we could have a working mrifk.
Also this thread finally got me to read Eye of Argon. Yay.
Aschulz, thanks for the pointer! I tried this last night and succeeded.
Download the compiler from here: haskell.org/ghc/
I used version 6.10 because it was smaller…
set a path to wherever you install the compiler
ie; path G:\ghc\ghc-6.10.1\bin
Modify the Mrifk_disasm.hs file and add the opcodes you want. The spacing in this file IS important.
I had to add these to decompile a game:
(0x73,(“streamunichar”, 1,0,0, OStreamStr)),
(0x178,(“malloc”, 1,1,0, OSpecial)),
(0x179,(“mfree”, 1,0,0, OSpecial)),
(0x180,(“accelfunc”, 2,0,0, OCallI)),
(0x181,(“accelparam”, 2,0,0, OCallI))]
Compile with: ghc --make -fglasgow-exts -o $@ Mrifk.hs
Enjoy the new .exe!
If it’s not too much trouble, would you mind submitting the revised executable to the IF Archive? It would be great to have an up-to-date version there.
I don’t think it’s quite ready yet. The thing is, running it on any gblorb now gives
mrifk: Mrifk_strings.hs:(99,5)-(102,30): Non-exhaustive patterns in case
This indicates that we probably have 0xe2 as a code somewhere. It appears to extract 32-bit data.
github.com/jcmf/glulx-strings/b … strings.py gives some insight as to how to do that. And in fact it is more useful cross-platform for text extraction because it is a webpage and not a compiled executable. But this might be neat to have for full disassembly.
I have a feeling we just need to add a few lines of code. l’ll see if I can translate the python into haskell. It loks like a good but nontrivial exercise.