Jump to content
IGNORED

Z-Code Interpreter


texacala

Recommended Posts

I have a vague memory that years ago I saw a project presented on the Closer To Home website describing a Z-Code interpreter for the A8. These interpreters are used to play text adventures in the popular Z-Code format. I can't find any info on this or a link, but I figured this is the place to ask. The thought of playing newly written interactive fiction on my Atari seems too cool for words, but I don't know if that's even possible.

  • Like 2
Link to comment
Share on other sites

People have written new games for the Z-machine and since it's machine independent, I don't see why it couldn't be then released on the Atari. I don't know if the official Infocom compiler is out there in stand-alone form, though. Maybe this link would help:

 

http://www.inform-fiction.org/zmachine/standards/index.html

Edited by Bryan
Link to comment
Share on other sites

You probably want FROTZ.

http://frotz.sourceforge.net/

 

I think that he wants to run story files on the Atari itself, though. There isn't a program to do this. There is, however, an Apple II 6502 Assembly program called "InfoLoad", which will load standard Infocom story files. I'll attach it, and maybe someone can do a port for the Atari...

InfoLoad.zip

Link to comment
Share on other sites

Infocom Z-Machine versions 3 & 5 were the two most common formats, so anything made in Inform 7 with a target of Z-Code version 5 stands a good chance of running.

 

Here's some info from my notes:

 

==========================

 

Z-Machine Interpreter Names:

 

Version 1: ZIP 1979 (Zork Implementation Program)

Version 2: ZIP

Version 3: ZIP "Standard"

Version 4: EZIP/LZIP "Plus" August 1985 Marc Blank ("A Mind Forever Voyaging", "Trinity")

Version 5: XZIP "Advanced" September 1987 by Dave Lebling (with contributions from others

including Brian Moriarty, Duncan Blanchard and Linde Dynneson)

("Beyond Zork" & "Border Zone)

Version 6: YZIP 1988 Tim Anderson & Dave Lebling (graphics, mouse support) "Zork Zero", "Shogun", "Journey" and "Arthur")

 

Two new formats, versions 7 and 8, have recently been devised to cope with large Inform games.

 

The maximum permitted length of a story file depends on the Version, as follows:

V1-3 128K

V4-5 256K

V6 512K

V7 320K

V8 512K

 

==========================

 

Sooo, z6, z7, z8 won't be running anytime soon... but there is a HUGE library of z3 & z5 stuff out there that will work, and you can make new stuff in Inform 7, with the target for z5, so, it's no problem to make new games that will work on the Atari.

 

The new way of doing things, though, is with Glux. Glux is really great, and very powerful for new systems, but anything written for a Glux target will not work on the Atari.

 

You can get "Gluxe" here, for many platforms. Gluxe runs Glux target code, and is really a very cool modern way to do things with a Z-Machine Virtual Machine, on modern systems.

 

I'm currently getting re-familiarized with all of this stuff. While no one is currently using Z-Machines for anything other than Interactive Fiction, I have started investigating its potential as a general purpose virtual machine for classical AI, a task for which it has a lot of potential to be really useful.

 

In any case, I can answer whatever you need to know about Z-Machines, since I'm currently fairly involved with them.

  • Like 3
Link to comment
Share on other sites

That's very helpful and exciting to think about. If I can find Tom Hunt's program somewhere I'll try it out and see what I can get running. I actually like the idea of Z-machine development for the Atari, seems like another fun way to use the system.

 

As Atari Frog mentioned, look atarimania by CTH enterprises.

Those are the Tom Hunt ports of Z-Code

Link to comment
Share on other sites

That's very helpful and exciting to think about. If I can find Tom Hunt's program somewhere I'll try it out and see what I can get running. I actually like the idea of Z-machine development for the Atari, seems like another fun way to use the system.

 

As Atari Frog mentioned, look atarimania by CTH enterprises.

Those are the Tom Hunt ports of Z-Code

 

Please post a direct link to it; I tried looking for CTH, in the search bar, at atarimania, & nothing came up.

 

 

Thanks!

 

 

Link to comment
Share on other sites

The A8 interpreters will only manage V3 titles. I looked into this a few years back when making MaxFlash cart versions of the Infocom games (no disk swapping etc). The best option I think is to reverse engineer the C64 Border Zone, using Frotz sources as a reference (I think that's what I used when doing the HHGTTG V3 code), and compare the BZ V5 engine with the A8 V3 code and then make a new cart-based engine by fixing up the relevent bits, which should be around disk access and memory usage (maybe meaning 128K RAM would be miminal requirement?). Probably worth including the V4 engine from the C64 at the same time.

 

From what I remember the differences between V3 & V5 meant much V5 syntax couldn't be targeted at V3 and trying to rewrite those parts was too difficult. I think I was looking at the Inform sources for Scott Adams or something like that. Ended up just making a special cart for his games having done Brian Howarth's beforehand. Those can be found over at AtariMax.

 

Mark

  • Like 1
Link to comment
Share on other sites

Though having not investigated but having played some of the CTH titles, my impression would be that he had 'wrapped' the existing interpreter with a loader (and from what I remember also may have hooked into some of the screen drawing parts, e.g. dlist, to brand it). The Z-file containing the adventure's compiled code contains its own header and so simply placing this starting at the correct sector on the disk would mean the interpreter would detect it and run fine. So many of the V3 examples (e.g. Alice) could have been downloaded and used 'as-is'. This probably had the advantage too that these works were smaller in size than a full-blown Infocom title and so would fit on just one side of a disk.

 

FYI: For the cartridge port, code was assembled to run in the cart-bank area ($A000-$BFFF) and Z-code and working RAM is located below this, wheras the Infocom interpreter loads low.

Link to comment
Share on other sites

  • 7 years later...

Bringing this back up because I would like to write my own "infocom" adventure for my son or maybe write it with him.

 

Now 8 years later.. can the 8bit be used to Author a game.. or is it better to just buckle under and do it on a PC? what is the best current source for 8-bit Zmachine Int. compiler.. lots of info out there for the pc.

 

James

  • Like 1
Link to comment
Share on other sites

Bringing this back up because I would like to write my own "infocom" adventure for my son or maybe write it with him.

 

Now 8 years later.. can the 8bit be used to Author a game.. or is it better to just buckle under and do it on a PC? what is the best current source for 8-bit Zmachine Int. compiler.. lots of info out there for the pc.

 

James

Considering that all the best languages for doing this (Inform, Adrift etc) are all modern PC based, you'll want to do it on a PC. Far, FAR easier. As long as you aim for a lower Z-machine version to compile to, you'll be able to run it on an actual Atari. The more modern formats like .z8, .blorb etc. won't work.

 

The modern languages add so much power and functionality, you'd be crazy not to take advantage of it.

Link to comment
Share on other sites

This thread demonstrates it's possible to extract Infocom's Z3 interpreter from one of Infocom's Atari disk images and append your own Z3 story.

 

Links at the bottom of my post in that thread may help point you in the right direction. After a pretty intensive month or so of development, I was able to do it with Grue Z3. (Though I had the advantage of starting with someone else's story).

 

https://github.com/michaelsternberg/grue_z3

https://16kram.com/2017/07/20/an-apple-ii-build-chain-for-inform/(Apple II example - but the build instructions for Inform 6.15 and "hello world" example would apply to any 8-bit platform)

 

John Linville's series of posts in Inform and the Coco show a little more sane method of injecting a story file into a disk image. I clumsily concatenated the interpreter, story file, and padded out the remainder of with 0s.

 

Hope it helps.

  • Like 4
Link to comment
Share on other sites

If you decide to do it on the PC, check out an old program called AGT, The Adventure Game Toolkit. Was shareware, now freeware. I bought it many years ago. Super simple to use, and a great overall program. I myself like the 'big' version of the program, as it gives you a HUGE number of rooms, creatures, commands etc. Granted, the original is no slouch, but the big is a LOT bigger.

 

https://en.wikipedia.org/wiki/Adventure_Game_Toolkit

 

http://www.ifarchive.org/indexes/if-archive/programming/agt/

Link to comment
Share on other sites

Zfiles.zip

 

 

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.

 

 

 

  • Like 4
Link to comment
Share on other sites

  • 1 month later...

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...