Jump to content
IGNORED

Z-Code Interpreter


texacala

Recommended Posts

Hopefully .. glad I found this thread again.. I did not realize so many people responded.. I now have some work to do to figure out how to do this.

 

I am sure I will have more questions.. for now.. I will dig into it.

 

James

Edited by Bikerbob
  • Like 2
Link to comment
Share on other sites

On 5/26/2019 at 6:42 PM, rdea6 said:

Zfiles.zip 1021.67 kB · 21 downloads

 

 

This is all of the CTH infocom files that I have in my Infocom atr collection.

also in the zip is a header CTH loader file that is the wrapper for the z3 files that will fit into a 130kb atr or 90kb atr.

 

add together with copy command or hex editor CTH loader file first then fill atr to desired size.

 

 

 

Thanks..  I thought it needed the header the interp and the z3 file?? But thats fantastic.. I will work on it.

 

James

  • Like 2
Link to comment
Share on other sites

Hey there,

 

Glad to see some interest in Ozmoo, which I co-wrote.

 

Ozmoo is open source and may be ported freely. We will be happy to answer any questions that may arise too. I admit Ozmoo and its build system are a bit complex.

 

When considering tools to write your own Z-code games to be run on an 8-bit computer, performance is an issue. Any non-trivial game created in Inform 7 will be painfully slow on a typical 8-bit machine. A real-world game, if it can even run on an 8-bit machine, may take several minutes to process each command. This is due to the way Inform 7 was designed and developed, where performance on machines slower than say 1 GHz wasn't really considered. 

 

Inform 6 is fast enough, as a language. However, it comes with a quite powerful standard library, which has become more and more complex over the years. A game compiled with library 6/2 may be quite fast, but a game compiled with library 6/12 will most likely feel sluggish. However, so many bugs have been fixed in later versions, that it would be painful to use the oldest versions. Also, z3 games require a smaller interpreter and may therefore be a better fit for 8-bit machines than z5, but the Inform 6 library can't be used to build z3 games.

 

ZIL is probably the best option right now. It's fast and powerful. As for the syntax, it may take some time to get used to. There's an active and friendly group on Facebook called ZIL - Zork Implementation Language, where you can get all the help you need to get started. Also, the ZIL source code for all Infocom games was published a while ago, so there's lots of code to learn from.

 

We are currently working on a replacement library for Inform 6, which has performance on 8-bit machines as its main design goal. We're aiming for a parser which feels on par with Zork I, while keeping the code small and fast. Also, we're planning to allow authors to build z3 games using this library. 

//Fredrik

  • Like 11
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
On 7/19/2019 at 11:18 PM, fredrik said:

Hey there,

 

Glad to see some interest in Ozmoo, which I co-wrote.

 

Ozmoo is open source and may be ported freely. We will be happy to answer any questions that may arise too. I admit Ozmoo and its build system are a bit complex.

 

When considering tools to write your own Z-code games to be run on an 8-bit computer, performance is an issue. Any non-trivial game created in Inform 7 will be painfully slow on a typical 8-bit machine. A real-world game, if it can even run on an 8-bit machine, may take several minutes to process each command. This is due to the way Inform 7 was designed and developed, where performance on machines slower than say 1 GHz wasn't really considered. 

 

Inform 6 is fast enough, as a language. However, it comes with a quite powerful standard library, which has become more and more complex over the years. A game compiled with library 6/2 may be quite fast, but a game compiled with library 6/12 will most likely feel sluggish. However, so many bugs have been fixed in later versions, that it would be painful to use the oldest versions. Also, z3 games require a smaller interpreter and may therefore be a better fit for 8-bit machines than z5, but the Inform 6 library can't be used to build z3 games.

 

ZIL is probably the best option right now. It's fast and powerful. As for the syntax, it may take some time to get used to. There's an active and friendly group on Facebook called ZIL - Zork Implementation Language, where you can get all the help you need to get started. Also, the ZIL source code for all Infocom games was published a while ago, so there's lots of code to learn from.

 

We are currently working on a replacement library for Inform 6, which has performance on 8-bit machines as its main design goal. We're aiming for a parser which feels on par with Zork I, while keeping the code small and fast. Also, we're planning to allow authors to build z3 games using this library. 

//Fredrik

 

Great news!  Any update on this project?

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 8/23/2019 at 9:24 PM, zork said:

 

Great news!  Any update on this project?

If you're talking about the library, there hasn't been much acitivity during summer. Things should start happening during fall though. You can follow the project at https://github.com/johanberntsson/PunyInform

 

As for the Ozmoo interpreter, it has received some bugfixes and has gained support for some new languages. It now has support for games in English, Swedish, German, Italian and Spanish.  You can follow the project at https://github.com/johanberntsson/ozmoo

 

If you wanna try out Ozmoo, you can build disk images of any Z-code games you like at http://microheaven.com/ozmooonline/ 
 

 

 

 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 8 months later...

OK, I'm probably missing something on this one.

 

While, on the surface, having any version of Inform on the Atari 8-bit is a great thing, how does this help us as far as having a real Z-code interpreter on the Atari 8-bit?

 

Inform is just an authoring system for creating z-code files, correct? It doesn't actually play, or interpret, z-code files?

Link to comment
Share on other sites

You'd use the Inform v6.34 compiler and build your sources that utilise their library and target z3 as the output. Then, as described elsewhere on the forum, splice that onto an existing A8 z-code interpreter and you should be good to go. I'm guessing it will still miss out on being able to use z4 and above commands so until we make the z4 & z5 capable interpreters for the A8 then we'll have to live with that.

  • Like 2
Link to comment
Share on other sites

  • 7 months later...

Ozmoo has been ported to BBC/Acorn, supporting shadow RAM, a coprocessor, different display modes, several different computer models and pretty much any memory configuration, including beasts with 192 KB of RAM. Steve Flintham has done a terrific job with this. See https://stardot.org.uk/forums/viewtopic.php?f=2&t=19975&start=420

 

You can play the game Calypso built with this interpreter online at http://bbcmicro.co.uk/game.php?id=2575

 

BBC Ozmoo is now being further developed as a separate branch, but Steve keeps adding bug fixes and improvements from the trunk. This project is still in alpha, but I think we'll see an official release soon.

 

Meanwhile, Ozmoo (the trunk) has gained support for Commodore Plus/4 and C128. You can now build games for the C64, C128 and Plus/4 at http://microheaven.com/ozmooonline/

 

If someone in the Atari community wants to put in the effort required, they could adapt Ozmoo to work on Atari as well, no doubt. I'd be happy to help out with advice.

 

 



 

Edited by fredrik
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Just a peek at the sources shows conditional stuff, e.g.

!ifdef Z5PLUS {
z_opcode_extended = 190
z_opcode_call_vn2 = 250
}
!ifdef Z4PLUS {

 

 

 

So a resulting runtime image is the combination of the Z-code and the appropriate interpreter, rather than a single interpreter that can act differently based on the Z-header?

 

Link to comment
Share on other sites

8 minutes ago, Wrathchild said:

Just a peek at the sources shows conditional stuff, e.g.


!ifdef Z5PLUS {
z_opcode_extended = 190
z_opcode_call_vn2 = 250
}
!ifdef Z4PLUS {

 

 

 

So a resulting runtime image is the combination of the Z-code and the appropriate interpreter, rather than a single interpreter that can act differently based on the Z-header?

 

Yes and no... ;)

Everything that can be learnt from the Z-machine header is read from the header when the game starts.

Ozmoo comes with a make script written in Ruby, which builds the interpreter from source every time you package a game with the interpreter. To make the interpreter as small and fast as possible, it only includes code for the Z-machine version needed for this specific game, so you can basically build four different version of the interpreter, for z3, z4, z5 and z8 games. But additionally, you can customize the build further, like setting the default colours, adding text to the splash screen, customizing the cursor, putting in a custom font, changing the stack size, adding a loader showing an image etc.

 

You can also build a game in two principally different build modes - singlefile mode or disk-based mode. If you build using a disk-based mode, the interpreter, the dynamic memory part of the storyfile and as much of the static memory part that will fit are put into one file, 62 KB big, which is then compressed with Exomizer, which also adds code to make it self-extracting. All of static memory is then put on disk as raw sectors, and the first two sectors of the disk contain information about what parts are included in the boot file and where the interpreter can find all parts of static memory on disk.

 

So essentially, if you have built Zork 1 as a game on a disk (it's too large to build as a single-file build anyway), you can change it to play say Planetfall instead (both are z3 games), by decompressing the boot file, replacing the dynamic memory and the first part of static memory from Zork 1 with the dynamic memory and first part of static memory of Planetfall, compressing this as a new file (including the interpreter which was part of the original file), writing the static part of the Planetfall storyfile as raw sectors to the disk, then altering the first two sectors of the disk to reflect the change. While the layout of these sectors is documented, this is not a simple process to get right. So maybe you'll want to run the make script again instead, feeding it the Planetfall story file, and it will build you a disk image for Planetfall.


Steve has opted to write his own Python script for the make process for BBC.
 

Link to comment
Share on other sites

  • 3 months later...

Yeah I’m still really surprised no one has written a new Z-interpreter for the more advanced versions of Z-code. Even if limited to 128K machines and larger ATR containers for the games, it seems like it would be doable. 

Link to comment
Share on other sites

8 minutes ago, DrVenkman said:

Yeah I’m still really surprised no one has written a new Z-interpreter for the more advanced versions of Z-code. Even if limited to 128K machines and larger ATR containers for the games, it seems like it would be doable. 

 

Yes, I'd love to see one that would let the more powerful 8-bits load the story files similar to Frotz, rather than having to be auto-boot, and would work with all games up through at least z5, assuming the machine had been upgraded and was powerful enough. Of course, I don't have the skills, knowledge, or time to undertake the project myself, so all I can do is sit back and dream and wish. Maybe when I retire in 6-8 years I'll have time to teach myself 8-bit assembler and break into the Frotz source code or Ozmoo source code and port it to the A8.

 

Edited by bfollowell
  • Like 2
Link to comment
Share on other sites

  • 2 months later...
On 5/29/2021 at 2:14 PM, bfollowell said:

 

Yes, I'd love to see one that would let the more powerful 8-bits load the story files similar to Frotz, rather than having to be auto-boot, and would work with all games up through at least z5, assuming the machine had been upgraded and was powerful enough. Of course, I don't have the skills, knowledge, or time to undertake the project myself, so all I can do is sit back and dream and wish. Maybe when I retire in 6-8 years I'll have time to teach myself 8-bit assembler and break into the Frotz source code or Ozmoo source code and port it to the A8.

 

Porting Ozmoo should be fairly straightforward. It just seems there's no one who has the interest, skills and time to do it.

 

Frotz is written in C, meaning you'd get a much bigger and slower interpreter. That's typically ot a great fit for an 8-bit target. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...