Shop OBEX P1 Docs P2 Docs Learn Events
Rumors of Z-machine at UPEW — Parallax Forums

Rumors of Z-machine at UPEW

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2009-07-09 01:28 in Propeller 1
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?

[noparse]:)[/noparse]

OBC

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

Visit the: The Propeller Pages @ Warranty Void.

Comments

  • RossHRossH Posts: 5,512
    edited 2009-07-06 23:10
    @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
  • ericballericball Posts: 774
    edited 2009-07-06 23:44
    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
  • RossHRossH Posts: 5,512
    edited 2009-07-07 00:04
    @ericball,

    Great work. I look forward to playing your version.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • HarleyHarley Posts: 997
    edited 2009-07-07 00:19
    Could someone describe what a 'Z-machine' is?

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

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • RossHRossH Posts: 5,512
    edited 2009-07-07 00:34
    @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
  • ericballericball Posts: 774
    edited 2009-07-07 00:45
    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
  • HarleyHarley Posts: 997
    edited 2009-07-07 01:08
    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
  • TheGrueTheGrue Posts: 114
    edited 2009-07-07 01:32
    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 [noparse][[/noparse]Zork Interactive Language]. This was stated in one of the company's newsletters which were called "The New Zork Times" [noparse][[/noparse]prior to the lawsuit of the paper with a similar name]
  • RossHRossH Posts: 5,512
    edited 2009-07-07 01:41
    ... you are in a maze of small, twisty passages, all alike ....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-07-07 02:14
    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 - my site my 6.250MHz custom Crystals for running Propellers at 100MHz
    Las - Large model assembler for the Propeller 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
  • ericballericball Posts: 774
    edited 2009-07-07 12:41
    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_AculaDr_Acula Posts: 5,484
    edited 2009-07-07 13:25
    Sounds fun. See attached screenshot of a N8VEM talking to a Prop PockeTerm. You may not be hearing from me for a while...
    1280 x 960 - 365K
    Zork.JPG 365.1K
  • WhitWhit Posts: 4,191
    edited 2009-07-07 13:30
    Dr_Acula,

    Don't forget to shower occasionally! 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)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-07-07 13:33
    Whit said...
    Dr_Acula,

    Don't forget to shower occasionally! wink.gif


    Or you are likely to be eaten by a Grue. [noparse]:)[/noparse]


    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.

    Post Edited (Oldbitcollector) : 7/7/2009 2:02:33 PM GMT
  • WhitWhit Posts: 4,191
    edited 2009-07-07 13:38
    Oldbitcollector said...

    Or you'll be eaten by a Grue. [noparse]:)[/noparse]

    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
  • LawsonLawson Posts: 870
    edited 2009-07-08 02:21
    Sorry when i see "Z-machine" I think of THIS little device at Sandia National Labs. Color me dissapointed to hear this thread talking about a mere "game" roll.gif

    Lawson

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lunch cures all problems! have you had lunch?
  • ericballericball Posts: 774
    edited 2009-07-08 12:24
    Lawson said...
    Sorry when i see "Z-machine" I think of THIS little device at Sandia National Labs. Color me dissapointed to hear this thread talking about a mere "game" 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·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)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-07-08 17:37
    Lawson said...
    Sorry when i see "Z-machine" I think of THIS little device at Sandia National Labs. 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. [noparse]:)[/noparse]

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • trodosstrodoss Posts: 577
    edited 2009-07-08 17:50
    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..." [noparse];)[/noparse]
  • RossHRossH Posts: 5,512
    edited 2009-07-09 01:28
    @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
Sign In or Register to comment.