Inform 6 code output from Inform 7?

As I understand it, part of the compilation/release process in Inform 7 is to translate the story to Inform 6 code, then compile it into the various final formats.

Is it possible to take the Inform 6 version of the story from that process, then compile it with Inform 6?

My ultimate goal is to package my story with a version 5 Z Machine interpreter, to be able to play on original Apple II hardware or emulator. I believe this is only possible with Inform 6 output, not 7.

I think the issue with compiling Inform 7 to .z5 (besides the fact that the current IDE doesn’t let you do it) is that the latest Inform 7 templates are so large that the games that can be compiled from them won’t fit in the .z5 format. I’m pretty sure that taking the translated Inform 6 and compiling it to the z-machine won’t fix this problem.

One thing you can do, if you don’t want to try working directly in Inform 6, is to get the 6G60 version of the Inform app from this page and use that to compile to .z5. I’m fairly sure that you will have to avoid using indexed text and maybe lists–if you use these, Inform will have to reserve memory space for the heap, which will probably overflow the .z5 limits. (I think that the reason later versions don’t compile to .z5 anymore is that every project uses the heap, in part to allow the Inform 7 programmer to ignore the difference between text and indexed text.)

^ what Matt said. The I6 compiler is almost exactly the same, but I7 generates absolutely enormous I6 files. And they involve a memory heap for dynamically allocated lists and text, which takes up a lot of the Z-machine’s very limited RAM.

It is exactly the same. You’d just be manually repeating the last step of I7’s compile process.

All of that is correct. (With the minor correction that the dynamic-list module requires both heap (RAM) and code (ROM) space. In 6G60 it can be omitted if not necessary; in modern versions of I7 it is always used.)