PunyInform and Ozmoo
PunyInform and Ozmoo
This project looks interesting for budding adventure authors: PunyInform. The official site is here.
Edit: Topic title changed as suggested, with the aim of improving searchability.
Edit: Topic title changed as suggested, with the aim of improving searchability.
Last edited by davidb on Fri Jul 24, 2020 1:33 pm, edited 1 time in total.
Re: PunyInform
Thanks for that. I've been following the development of PunyInform in a very casual way, and I contacted one of the devs, who is also the developer of the C64 Z-Code interpreter Ozmoo, to ask how easy it would be to port Ozmoo to the Beeb: he wasn't optimistic because of the memory requirements.davidb wrote: ↑Thu Jul 16, 2020 3:27 pm This project looks interesting for budding adventure authors: PunyInform. The official site is here.
But the reason I asked the question was that quite a while ago I'd tried Jon Welch's Z-Code interpreter (or "Z-machine interpreter") for the Beeb, which you can download from the Retro Software website, and I seemed to recall it ran very slowly, in MODE0 (or MODE128), probably on a Master, so I'd always assumed that a good Z-Code interpreter for the Beeb or Master just wasn't available.
But I've just downloaded a couple of zips from the Retro Software site, and I've found that -- as I think the website in fact states (and as I'd have realised if I'd bothered to read it properly!) -- there is a version of the Beeb Z-Code interpreter that is pretty good, if not perfect, at running "Z3" versions of Infocom games: I've just used it to run the Z3 version of The Hitchhiker's Guide To The Galaxy in Model B mode in BeebEm, and I've played around with it a bit, and although it's not blazingly fast, it's usable and it does seem to run the game without error:
This is good news because the implication is that it should be possible to compile a game with Inform, using the PunyInform library, and have it run on a Beeb!
One thing that's slightly confusing is that I've got a version of the interpreter ROM that's been in my personal archive for a long time and that's different from at least one of the ROMs that I just downloaded from Retro Software today. The header in the old ROM from my personal archive says this:
Code: Select all
Z-Code Interpreter 0 (C) 2008 Jon Welch
Code: Select all
Z-Code Interpreter for BBC Model B 0 (C) 2008 Jon Welch
EDIT: Btw, the command that invokes the Z-Code interpreter is *Z-CODE. You can follow it with the name of a Z-Code game file to run the game: e.g. *Z-CODE HHGG
EDIT2: Looks like the ROM from my personal archive is very similar (just two bytes differ) to what's described as the "beta" version here:
Oh dear -- does that mean that the beta version of the ROM works better than the final release?!
Last edited by lurkio on Thu Jul 16, 2020 7:34 pm, edited 1 time in total.
Re: PunyInform
Here's Jon Welch's Z-Code interpreter running Library Of Horror, the demo game that comes as source code with the PunyInform library:
I compiled the source on the commandline on my Mac, following the instructions here:
I compiled the source on the commandline on my Mac, following the instructions here:
Re: PunyInform
Not quite! There's a moment in the Hitchhiker's game where you have to enter the commandlurkio wrote: ↑Thu Jul 16, 2020 4:51 pm ... there is a version of the Beeb Z-Code interpreter that is pretty good, if not perfect, at running "Z3" versions of Infocom games: I've just used it to run the Z3 version of The Hitchhiker's Guide To The Galaxy in Model B mode in BeebEm, and I've played around with it a bit, and although it's not blazingly fast, it's usable and it does seem to run the game without error
Code: Select all
TYPE "GASHEE"
I think this is a bug in the interpreter.
EDIT: If only Samwise had played a little further!:
OK, I can run both Zork and The Hitchhiker's Guide to the Galaxy. Haven't spent a lot of time on Zork, but I've just played through the first part of HHGTTG. I got 25/400 points, and it seems to be working perfectly!
Re: PunyInform
Actually, I think I was slightly misled by the speed advantage of having turned disc-drive noises permanently off in Mac BeebEm: the Z-Code interp seemed much faster than it "really" is. It has to access the disc a heck of a lot between turns:lurkio wrote: ↑Thu Jul 16, 2020 4:51 pm ... there is a version of the Beeb Z-Code interpreter that is pretty good, if not perfect, at running "Z3" versions of Infocom games: I've just used it to run the Z3 version of The Hitchhiker's Guide To The Galaxy in Model B mode in BeebEm, and I've played around with it a bit, and although it's not blazingly fast, it's usable
Re: PunyInform
Maybe the Ozmoo interpreter could be ported to machines with sideways RAM.
Re: PunyInform
Yes, I think that's an intriguing possibility, especially given that one of the features that the Readme says that Ozmoo supports is this:
There's also this:Building a Z-code game without virtual memory. This means the whole game must fit in RAM at once, imposing a size restriction of about 50-52 KB. A game built this way can then be played on a C64 without a diskdrive.
Using an REU (Ram Expansion Unit) for caching. The REU can also be used to play a game built for a dual disk drive system with just one drive.
- Dave Footitt
- Posts: 998
- Joined: Thu Jun 22, 2006 10:31 am
- Location: Abandoned Uranium Workings
- Contact:
Re: PunyInform
This is great, I tried Inform 6.something a while back and thought it was a fantastic language for making this sort of thing!
Re: PunyInform
It is, but the issue is the speed of the Z-Code interpreter for the Beeb, I think. I haven't tried it on a real Beeb with a real disc drive, but I fear it's gonna be painfully slow. I might give it a try later on.Dave Footitt wrote: ↑Fri Jul 17, 2020 12:53 pm This is great, I tried Inform 6.something a while back and thought it was a fantastic language for making this sort of thing!
Still, have you ever thought about porting Calypso to PunyInform..?! At the very least it might then be playable on Beeb emulators with drive noises turned off and the emulation speed cranked up!
- Dave Footitt
- Posts: 998
- Joined: Thu Jun 22, 2006 10:31 am
- Location: Abandoned Uranium Workings
- Contact:
Re: PunyInform
Could certainly give that a go... Wonder how much work is involved?
Re: PunyInform
Last edited by lurkio on Thu Dec 30, 2021 11:46 pm, edited 1 time in total.
- vanpeebles
- Posts: 763
- Joined: Wed Nov 28, 2012 10:01 am
- Location: UK
- Contact:
Re: PunyInform
I have some proper infocom games for the Tatung and they do hammer the disc drive a lot. I was surprised at first!
- Dave Footitt
- Posts: 998
- Joined: Thu Jun 22, 2006 10:31 am
- Location: Abandoned Uranium Workings
- Contact:
Re: PunyInform
I had a quick go at this, couldn't get Calypso to build (2 header files missing, so I think it might be more work than a quick recompile)
So I had a go at building their demo, and got a load of errors:
I'm building using this:
Has anyone had any success?
So I had a go at building their demo, and got a load of errors:
Code: Select all
Inform 6.34 (28th June 2018)
"lib/globals.h", line 222: Error: Expected '->', '-->', 'string', 'table' or 'buffer' but found static
[... lots more errors ...]
Code: Select all
../inform6/i6 +lib library_of_horror.inf
Re: PunyInform
Yes, it worked for me:Dave Footitt wrote: ↑Sat Jul 18, 2020 10:10 pmI had a go at building their demo, and got a load of errors ... Has anyone had any success?
https://stardot.org.uk/forums/viewtopi ... 52#p279080
- Dave Footitt
- Posts: 998
- Joined: Thu Jun 22, 2006 10:31 am
- Location: Abandoned Uranium Workings
- Contact:
Re: PunyInform
Hmm.. I get the same errors even with those switches, I'm using 6.34 too
Perhaps I'll drop the chap an email.
[edit] I briefly saw a list of pre-compiled versions before the post was deleted - interesting that those were compiled very recently, as opposed to mine. I've just pulled the latest and got 18 fresh commits so I'll rebuild my inform compiler tomorrow.
Perhaps I'll drop the chap an email.
[edit] I briefly saw a list of pre-compiled versions before the post was deleted - interesting that those were compiled very recently, as opposed to mine. I've just pulled the latest and got 18 fresh commits so I'll rebuild my inform compiler tomorrow.
Re: PunyInform
Ozmoo sounds pretty cool and I've been looking for some sort of "virtual memory"-ish project to tinker with, so I'm going to see what I can do with this. I'm starting by targetting the 6502 second processor, which gives C64-ish levels of free memory, so I can get the Acorn port mostly working before I start to fiddle with the virtual memory. I'm almost certain that with enough effort (which may or may not be forthcoming ) a good port can be done to the 6502 second processor. The developer may well be right about "plain" Beeb but I haven't really looked into that aspect of things yet. I'd hope that with sideways RAM it can be made to work, but that's for later, when I get the actual port mostly working on the second processor.lurkio wrote: ↑Thu Jul 16, 2020 4:51 pm Thanks for that. I've been following the development of PunyInform in a very casual way, and I contacted one of the devs, who is also the developer of the C64 Z-Code interpreter Ozmoo, to ask how easy it would be to port Ozmoo to the Beeb: he wasn't optimistic because of the memory requirements.
Quick screenshot as a not-very-tantalising teaser:
Re: PunyInform
There was a pre-release version of Inform 6.34 floating around in 2017-2018, and a package with this compiler and the Inform 6 library was created for Unix and uploaded to if-archive. I have been told that this, now obsolete package will be updated in a day or two.Dave Footitt wrote: ↑Sat Jul 18, 2020 10:55 pm Hmm.. I get the same errors even with those switches, I'm using 6.34 too
Perhaps I'll drop the chap an email.
[edit] I briefly saw a list of pre-compiled versions before the post was deleted - interesting that those were compiled very recently, as opposed to mine. I've just pulled the latest and got 18 fresh commits so I'll rebuild my inform compiler tomorrow.
PunyInform requires both bug fixes and a feature (static arrays) which were added to Inform in 2020. The release version of Inform 6.34, published in May 2020, is what you want to get. You can get it as inform634_source.zip at https://www.ifarchive.org/indexes/if-ar ... m6/source/ , and there are binaries for Windows and Mac in ../executables .
Re: PunyInform
Game code written in PunyInform is about 97-99% the same as code using the standard library. One of the details that differ is the name of the include-files. For the standard library, you include "parser", "verblib" and "grammar". For Puny, you include "globals" and "puny".Dave Footitt wrote: ↑Sat Jul 18, 2020 10:10 pm I had a quick go at this, couldn't get Calypso to build (2 header files missing, so I think it might be more work than a quick recompile)
But yes, you will probably need to read the manual and learn about the differences in order to convert your game to Puny. Once you change the names of the include files, you should start getting some errors which give you something to look for in the manual. You'll figure it out.
Re: PunyInform
Hi. I presume that's Fredrik Ramsberg, developer of Ozmoo and PunyInform..?
Welcome to Stardot! And thanks for the useful info.
Re: PunyInform
I am he. I saw that we were getting traffic from Stardot and checked it out.
Thanks!
We'd love to see a BBC version of Ozmoo too. Tried to message Steve about it, but seems like I'm not allowed to send him messages, maybe because I have a new account.
Re: PunyInform
Sounds like a very worthwhile project! Good luck!
Btw, I presume that that screenshot's just a mock-up..? In any case, please consider providing a MODE7 option in your port of Ozmoo, for speed's sake! (And for clarity/smoothness of on-screen text. MODE7 is "the best of MODEs".)
Re: PunyInform
Correct. (I've sent you a quick PM, but, as you say, you won't be able to reply.)
I'll ask the mods to consider switching PM-sending on for you.
Re: PunyInform
Re: PunyInform
Thanks!lurkio wrote: ↑Sun Jul 19, 2020 10:01 amSounds like a very worthwhile project! Good luck!
Btw, I presume that that screenshot's just a mock-up..? In any case, please consider providing a MODE7 option in your port of Ozmoo, for speed's sake! (And for clarity/smoothness of on-screen text. MODE7 is "the best of MODEs".)
It's real code. I've attached an SSD - just press SHIFT-BREAK - if anyone wants to have a play, but this is extremely under-tested and still a work-in-progress. You definitely won't be able to save or load the game and it needs a second processor at the moment. The text output is also unnecessarily slow as it does a VDU 31,x,y before printing every character.
Press SHIFT if the output pauses (there's currently no "more" prompt). Otherwise it should be fairly unsurprising to use.
You can switch to mode 7 by editing the "CHECK" BASIC program on the disc, or just do:
Code: Select all
MODE 7
*RUN OZMOO
Jumping the gun a bit: for mode 7, would it be better to have:
- 40 characters in the status bar with no inverse video, as currently happens
- 37 characters in the status bar with inverse video, and the status bar "indented" compared to the rest of the screen using 40 character black and white - the screenshot of Jon Welch's interpreter above shows this
- 37 characters in all lines with foreground and background colours user-selectable and the status bar reverse video and not "indented"
The code is on github: https://github.com/ZornsLemma/ozmoo/tree/acorn
If you do have a play with this please let me know how you get on, but it's pre-alpha quality at the moment so don't get too upset if you find problems!
- Attachments
-
- ozmoo-preview-2020-07-19.zip
- (20.82 KiB) Downloaded 124 times
Re: PunyInform
Wow, you've come a long way with that port already!
If you plan on supporting z4+ games, and you have a different number of characters in the statusline compared to the rest of the screen, you would need to use this width for the top window in general (In z4+, the statusline is just a top window of height 1).
Would it be possible to make your changes part of the main Ozmoo distribution, as a separate build mode?
If you plan on supporting z4+ games, and you have a different number of characters in the statusline compared to the rest of the screen, you would need to use this width for the top window in general (In z4+, the statusline is just a top window of height 1).
Would it be possible to make your changes part of the main Ozmoo distribution, as a separate build mode?
Re: PunyInform
Thanks Fredrik! The code's pretty clear and that certainly helps.
Yes, I definitely plan on supporting these, so thanks for the warning. I don't think there will be a technical problem here, it's just a question of what tradeoffs users would prefer in mode 7 (in which changing colours uses control codes that take space on the screen). One reason I'm working in mode 6 (as in the original blue and white screenshot above) to start with is that it is a closer match to the C64 screen so I don't get caught out by things like this.fredrikr wrote: ↑Sun Jul 19, 2020 1:13 pm If you plan on supporting z4+ games, and you have a different number of characters in the statusline compared to the rest of the screen, you would need to use this width for the top window in general (In z4+, the statusline is just a top window of height 1).
That would be cool if/when the port gets to a stable state. I'm trying to make the changes sensitively as I go, using !ifdef/!ifndef ACORN to bracket my changes, and I'd hope to tidy this up further when the port is more stable.
Re: PunyInform
Talk about "burying the lede", Steve!
I'll reply in greater detail once I've recovered a bit..!
Re: PunyInform
Seems to work very well! Only had a quick play so far, but, once it's loaded, the demo game doesn't seem to need to access the disc very much, if at all! Brilliant!
There's a cleanness to the current look which I quite like, but what about a slight modification that would only sacrifice one char (on a 40-char screen mode where chars-per-line are a precious commodity): have the status line be in cyan, while the text on the rest of the screen is just white and uses the full 40-char width?
That would also be fine, although you're "losing" a couple of precious chars to Teletext control codes!
I personally feel that's my least favourite option. I think that to lose a few chars per line for all of the main game text isn't great when you've only got 40 chars to begin with. Those few chars make a big difference to the general look and readability of the text. (Just ask fuzzel!)
Thanks for working on this. It's a fantastic project, a great contribution to text adventuring in general and obviously to text adventuring on the Beeb specifically!
Re: PunyInform
This is a great project!
I hadn't heard of it before today!
Lee.
I hadn't heard of it before today!
Lee.
- Dave Footitt
- Posts: 998
- Joined: Thu Jun 22, 2006 10:31 am
- Location: Abandoned Uranium Workings
- Contact:
Re: PunyInform
Well this is all very exciting
So it doesn't look like too much work to do!
I've updated Inform, InformLib and PunyInform from GitHub, and I can now build the example adventures! Many thanks, having the same version number confused me. I now get:fredrikr wrote: ↑Sun Jul 19, 2020 12:11 am Game code written in PunyInform is about 97-99% the same as code using the standard library. One of the details that differ is the name of the include-files. For the standard library, you include "parser", "verblib" and "grammar". For Puny, you include "globals" and "puny".
But yes, you will probably need to read the manual and learn about the differences in order to convert your game to Puny. Once you change the names of the include files, you should start getting some errors which give you something to look for in the manual. You'll figure it out.
Code: Select all
~/Develop/calypso$ ../inform6/i62 +../PunyInform/lib/ calypso.inf
Inform 6.34 (21st May 2020)
line 1009: Error: Expected routine name but found GamePreRoutine
> [GamePreRoutine
line 216: Error: No ...Sub action routine found for action: "LookUnder"
line 358: Error: No ...Sub action routine found for action: "Swim"
line 612: Error: No ...Sub action routine found for action: "Burn"
line 641: Error: No ...Sub action routine found for action: "Wave"
line 641: Error: No ...Sub action routine found for action: "Swing"
line 806: Error: No ...Sub action routine found for action: "GetOff"
line 946: Error: No ...Sub action routine found for action: "Empty"
line 946: Error: No ...Sub action routine found for action: "EmptyT"
line 6: Warning: Defined constant "MANUAL_PRONOUNS" declared but not used
Compiled with 9 errors and 1 warning (no output)