PDA

View Full Version : Rumors of Z-machine at UPEW



Oldbitcollector (Jeff)
07-07-2009, 04:12 AM
Not sure who I was talking to at UPEW.. (I tried to catch all of you..)

Someone was rumoring of a Z-machine engine for the Propeller (zork stuff)

Anyone want to fess up?

:)

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

RossH
07-07-2009, 06:10 AM
@OBC,

Not me, but it's one of things high on my "to do" list - there are plenty of good Z-machine implementations written in C. The problem is that they are all quite resource hungry. But it's not just the Z machine that's resource hungry - the text strings alone of even the simplest Z game would easily blow the Prop's 32kb limit (which represents less than 10 pages of text). So not only do you need XMM, you also need to be able to put the constant text segment into XMM - something which I am still working on.

Imagecraft may be more advanced than Catalina on this point - you could try that compiler. But the simplest way to do it at the moment may be to use ZiCog running CP/M - there are several Z machines that I believe will run under CP/M.

Ross.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=795326)

ericball
07-07-2009, 06:44 AM
Although I wasn't the leak (though I know who was), it was about the Z3 interpreter project which I've half completed.· The current version is written in SPIN (600+ lines) and is 100% functional.· Unfortunately, it is limitted to Z3 files which can be loaded entirely in HUB RAM (minus 5.25K for the Z machine interpreter and Parallax Serial Terminal object).· My plan is to create an SD card·version, using SD both to load the Z3 file, save & restore games, and as virtual memory.· But before I dive into SD/FAT I have to finish another project I'm working on.· (Which is very close to completion.)

Note: This is completely new code and not based on any other Z machine interpreter.· It is also limitted to version 3 of the Z-machine spec.· (Which includes most of the best known Infocom games.)· I did the original development & debugging in C then ported the final version to SPIN.· This way I wasn't limitted by HUB RAM.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: http://forums.parallax.com/showthread.php?p=800114
NTSC & PAL templates: http://forums.parallax.com/showthread.php?p=803904


Post Edited (ericball) : 7/7/2009 2:11:37 AM GMT

RossH
07-07-2009, 07:04 AM
@ericball,

Great work. I look forward to playing your version.

Ross.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=795326)

Harley
07-07-2009, 07:19 AM
Could someone describe what a 'Z-machine' is?

I'd guess maybe something to do with a Z80?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko

RossH
07-07-2009, 07:34 AM
@Harley,

A Z machine is a game interpreter that is used to execute the old text-based adventure games that were sold by a company called Infocom. The most famous in a long line of games was probably "Zork" - which I guess is probably where the name comes from. Other people also developed such games.

The games themselves were just big data files containing a map of the "universe" in which the game was played, the game rules to apply, and all the text that you would see on the screen (no graphics!). The Z machine included a pretty cool (for the time) language parser that could accept free input input (e.g. " open the box and take the key").

I loved those games!

Ross.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=795326)

ericball
07-07-2009, 07:45 AM
http://en.wikipedia.org/wiki/Z-machine

Actually, the parser isn't part of the Z-machine. The Z-machine accepts a line of text input and then tokenizes the words using a dictionary included in the game file. The Z-machine code in the game file then uses the tokens to determine what actions the user has requested.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: http://forums.parallax.com/showthread.php?p=800114
NTSC & PAL templates: http://forums.parallax.com/showthread.php?p=803904


Post Edited (ericball) : 7/7/2009 12:51:38 AM GMT

Harley
07-07-2009, 08:08 AM
Thanks for the info about Z-machine. Didn't realize it would be something to 'google' even.

Sounds like lots of time and sweat went into the early games. I was busy with real work in that era, so games were not high on my list of 'to do's'. Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko

TheGrue
07-07-2009, 08:32 AM
Ah! The good old days of loosing months inside the world of Zork I, II & III

As a point of interest, language that the games were written in was called ZIL [Zork Interactive Language]. This was stated in one of the company's newsletters which were called "The New Zork Times" [prior to the lawsuit of the paper with a similar name]

RossH
07-07-2009, 08:41 AM
... you are in a maze of small, twisty passages, all alike ....

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=795326)

Bill Henning
07-07-2009, 09:14 AM
Another option is to use a nice cheap Winbond SPI chip. For something like this you don't really need a file system, and even the small Spin routines I wrote some time ago would let you read the text strings.


ericball said...
Although I wasn't the leak (though I know who was), it was about the Z3 interpreter project which I've half completed. The current version is written in SPIN (600+ lines) and is 100% functional. Unfortunately, it is limitted to Z3 files which can be loaded entirely in HUB RAM (minus 5.25K for the Z machine interpreter and Parallax Serial Terminal object). My plan is to create an SD card version, using SD both to load the Z3 file, save & restore games, and as virtual memory. But before I dive into SD/FAT I have to finish another project I'm working on. (Which is very close to completion.)


Note: This is completely new code and not based on any other Z machine interpreter. It is also limitted to version 3 of the Z-machine spec. (Which includes most of the best known Infocom games.) I did the original development & debugging in C then ported the final version to SPIN. This way I wasn't limitted by HUB RAM.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com (http://www.mikronauts.com) - my site my 6.250MHz custom Crystals for running Propellers at 100MHz (http://mikronauts.com/products/mikronauts-625mhz-crystal/)
Las (http://mikronauts.com/products/las-largos-lmm-assembler/) - Large model assembler for the Propeller Largos (http://mikronauts.com/products/largos/) - a feature full nano operating system for the Propeller
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full

ericball
07-07-2009, 07:41 PM
Bill Henning said...
Another option is to use a nice cheap Winbond SPI chip. For something like this you don't really need a file system, and even the small Spin routines I wrote some time ago would let you read the text strings.

The advantage of using an SD card is I can read/write it from the PC.· So, in theory, I will be able to take the save file and pull it into my C version to debugging.

The Z-Machine has a flat 128K memory model with full random byte access.· Writes are restricted to the lower 64K (normally much less than that so swapping isn't required on a typical 8 bit computer).· My plan is to swap in 512 byte blocks into free HUB RAM, writing dirty blocks back out as required.· Because I need random block access I will probably need to write my own version of frsw.· (Also needed because I need 2 files open at once to copy z3->tmp, tmp->sav & sav->tmp.)

However, I will be releasing it under the ObEx/MIT license so anyone will be able to take it and modify it.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: http://forums.parallax.com/showthread.php?p=800114
NTSC & PAL templates: http://forums.parallax.com/showthread.php?p=803904

Dr_Acula
07-07-2009, 08:25 PM
Sounds fun. See attached screenshot of a N8VEM talking to a Prop PockeTerm. You may not be hearing from me for a while...

Whit
07-07-2009, 08:30 PM
Dr_Acula,

Don't forget to shower occasionally! http://forums.parallax.com/images/smilies/wink.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+


"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

Oldbitcollector (Jeff)
07-07-2009, 08:33 PM
Whit said...
Dr_Acula,

Don't forget to shower occasionally! http://forums.parallax.com/images/smilies/wink.gif



Or you are likely to be eaten by a Grue. (http://en.wikipedia.org/wiki/Grue_(monster)) :)


OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

Post Edited (Oldbitcollector) : 7/7/2009 2:02:33 PM GMT

Whit
07-07-2009, 08:38 PM
Oldbitcollector said...

Or you'll be eaten by a Grue. (http://en.wikipedia.org/wiki/Grue_(monster)) :)


LOL!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+


"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

Lawson
07-08-2009, 09:21 AM
Sorry when i see "Z-machine" I think of THIS little device at Sandia National Labs (http://en.wikipedia.org/wiki/Z_machine). Color me dissapointed to hear this thread talking about a mere "game" http://forums.parallax.com/images/smilies/roll.gif

Lawson

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?

ericball
07-08-2009, 07:24 PM
Lawson said...
Sorry when i see "Z-machine" I think of THIS little device at Sandia National Labs (http://en.wikipedia.org/wiki/Z_machine). Color me dissapointed to hear this thread talking about a mere "game" http://forums.parallax.com/images/smilies/roll.gif

The Infocom Z-Machine is around twenty years older than the X-Ray generator.

And although it is targetted for Interactive Fiction, the Z-Machine is Turing Complete and could be used for other tasks (although it's I/O functions are limitted).· One guy modified a C compiler (http://www.cowlark.com/vbcc-z-compiler/index.html)·to target the Z-Machine, then used it to write a chess game.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: http://forums.parallax.com/showthread.php?p=800114
NTSC & PAL templates: http://forums.parallax.com/showthread.php?p=803904

Oldbitcollector (Jeff)
07-09-2009, 12:37 AM
Lawson said...
Sorry when i see "Z-machine" I think of THIS little device at Sandia National Labs (http://en.wikipedia.org/wiki/Z_machine). Color me dissapointed to hear this thread talking about a mere "game"



Wow.. That's an impressive picture! Looks like something that should have been described in an
Infocom adventure somewhere. :)

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

trodoss
07-09-2009, 12:50 AM
I would it could almost imagine it existing somewhere in the G.U.E.
"You walk into a loud, circular chamber with stairs leading down into a pool whose surface arcs with lightning..." ;)

RossH
07-09-2009, 08:28 AM
@ericball

Very cool - so I could use your Z machine interpreter running on a Propeller to compile a version of Catalina to compile a Z machine emulator to run on a Propeller to ...

... you are in a maze of small, twisty passages, all alike ....

... oh, damn!

Ross.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina (http://forums.parallax.com/showthread.php?p=795326)