The Z-Machine Standards Document

Total Page:16

File Type:pdf, Size:1020Kb

The Z-Machine Standards Document The Z-Machine Standards Document Graham Nelson Version 1.0 22nd June 1997 two misprints corrected, 9th August resources appendix updated and discovery added to header table, 4th September Additional appendices: Quetzal: Z-machine Common Save-File Format Standard Martin Frost Version 1.3b Blorb: An IF Resource Collection Format Standard Andrew Plotkin Version 1.1 Z-Machine Standard 1.1 Proposal Kevin Bracey, Jason C. Penney Draft 7 1 Overview The Z-Machine Standards Document...................................................................................... 1 Quetzal: Z-machine Common Save-File Format Standard....................................................... 127 Blorb: An IF Resource Collection Format Standard ................................................................ 141 Z-Machine Standard 1.1 Proposal ........................................................................................... 157 Index ...................................................................................................................................... 175 Contents The Z-Machine Standards Document...................................................................................... 1 Contents ..............................................................................................................................................2 Preface ................................................................................................................................................4 Overview of Z-machine architecture....................................................................................................8 1. The memory map...........................................................................................................................12 2. Numbers and arithmetic.................................................................................................................15 3. How text and characters are encoded..............................................................................................17 4. How instructions are encoded ........................................................................................................26 5. How routines are encoded..............................................................................................................31 6. The game state: storage and routine calls .......................................................................................32 7. Output streams and file handling....................................................................................................36 8. The screen model...........................................................................................................................40 9. Sound effects.................................................................................................................................54 10. Input streams and devices ............................................................................................................57 11. The format of the header..............................................................................................................61 12. The object table ...........................................................................................................................65 13. The dictionary and lexical analysis...............................................................................................68 14. Complete table of opcodes ...........................................................................................................70 15. Dictionary of opcodes..................................................................................................................79 16. Font 3 and character graphics.....................................................................................................105 Appendix A. Error messages and debugging....................................................................................111 Appendix B. Conventional contents of the header............................................................................112 Appendix C. Resources available.....................................................................................................114 Appendix D. A short history of the Z-machine.................................................................................118 Appendix E. Statistics......................................................................................................................121 Appendix F. Canonical Story Files ..................................................................................................124 Quetzal: Z-machine Common Save-File Format Standard ................................................ 127 1. Conventions................................................................................................................................127 2. Overall structure .........................................................................................................................128 3. Content of dynamic memory .......................................................................................................128 4. Content of stacks ........................................................................................................................129 5. Associated story file....................................................................................................................131 2 6. Miscellaneous.............................................................................................................................132 7. Extensions to the format..............................................................................................................133 8. Introduction to the IFF format.....................................................................................................136 9. Resources available.....................................................................................................................138 10. Credits ......................................................................................................................................139 Blorb: An IF Resource Collection Format Standard .......................................................... 141 0. Overall Structure.........................................................................................................................141 1. Contents of the Resource Index Chunk........................................................................................142 2. Picture Resource Chunks ............................................................................................................142 3. Sound Resource Chunks .............................................................................................................143 4. Executable Resource Chunks ......................................................................................................144 5. The Release Number Chunk........................................................................................................144 6. The Game Identifier Chunk.........................................................................................................145 7. The Color Palette Chunk.............................................................................................................145 8. The Resolution Chunk ................................................................................................................146 9. The Looping Chunk ....................................................................................................................149 10. Other Optional Chunks .............................................................................................................149 11. Z-Machine Compatibility Issues................................................................................................150 12. Glk Compatibility Issues...........................................................................................................151 13. The IFF Format.........................................................................................................................151 14. Other Resource Arrangements...................................................................................................151 15. Rationales and Rationalizations.................................................................................................152 Z-Machine Standard 1.1 Proposal ....................................................................................... 157 1. Introduction.................................................................................................................................157 2. Updates / Clarifications................................................................................................................158 3. Additions.....................................................................................................................................166 Index...................................................................................................................................... 175 3 Preface The Z-machine was created on a coffee table in Pittsburgh in 1979. It is an imaginary computer whose programs are adventure games, and is well-adapted to its task, implementing complex games remarkably compactly. They were still perhaps 100K long, too large for the memory of the home computers of their day, and the Z-machine seems
Recommended publications
  • Theescapist 055.Pdf
    in line and everything will be just fine. two articles I fired up Noctis to see the Which, frankly, is about how many of us insanity for myself. That is the loneliest think to this day. With the exception of a game I’ve ever played. For those of you who fell asleep during very brave few. the classical mythology portion of your In response to “Development in a - Danjo Olivaw higher education, the stories all go like In this issue of The Escapist, we take a Vacuum” from The Escapist Forum: this: Some guy decides he no longer look at the stories of a few, brave souls As for the fact that thier isolation has In response to “Footprints in needs the gods, sets off to prove as in the game industry who, for better or been a benefit to them rather than a Moondust” from The Escapist Forum: much and promptly gets smacked down. worse, decided that they, too, were hindrance, that’s what I discussed with I’d just like to say this was a fantastic destined to make their dreams a reality. Oveur (Nathan Richardsson) while in article. I think I’ll have to read Olaf Prometheus, Sisyphus, Icarus, Odysseus, Some actually succeeded, while others Vegas earlier this year at the EVE the stories are full of men who, for crashed and burned. We in the game Gathering. The fact that Iceland is such whatever reason, believed that they industry may not have jealous, angry small country, with a very unique culture were not bound by the normal gods against which to struggle, but and the fact that most of the early CCP constraints of mortality.
    [Show full text]
  • Alan Adventure System V3.0
    The ALAN Adventure Language Reference Manual Version 3.0beta2 Alan Adventure System - Reference Manual This version of the manual was printed on September 26, 2011 - ii - Alan Adventure System - Reference Manual Table of Contents 1 INTRODUCTION.........................................................................11 1.1 Programmer’s Pitch........................................................................................................12 1.2 To the Reader.................................................................................................................12 2 CONCEPTS......................................................................................13 2.1 What Is An Adventure?................................................................................................13 2.2 Elements Of Adventures.................................................................................................15 2.3 Alan Fundamentals.......................................................................................................16 What Is A Language?....................................................................................................................................16 The Alan Idea..................................................................................................................................................18 What’s Happening?........................................................................................................................................18 The Map..........................................................................................................................................................19
    [Show full text]
  • DESIGN-DRIVEN APPROACHES TOWARD MORE EXPRESSIVE STORYGAMES a Dissertation Submitted in Partial Satisfaction of the Requirements for the Degree Of
    UNIVERSITY OF CALIFORNIA SANTA CRUZ CHANGEFUL TALES: DESIGN-DRIVEN APPROACHES TOWARD MORE EXPRESSIVE STORYGAMES A dissertation submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in COMPUTER SCIENCE by Aaron A. Reed June 2017 The Dissertation of Aaron A. Reed is approved: Noah Wardrip-Fruin, Chair Michael Mateas Michael Chemers Dean Tyrus Miller Vice Provost and Dean of Graduate Studies Copyright c by Aaron A. Reed 2017 Table of Contents List of Figures viii List of Tables xii Abstract xiii Acknowledgments xv Introduction 1 1 Framework 15 1.1 Vocabulary . 15 1.1.1 Foundational terms . 15 1.1.2 Storygames . 18 1.1.2.1 Adventure as prototypical storygame . 19 1.1.2.2 What Isn't a Storygame? . 21 1.1.3 Expressive Input . 24 1.1.4 Why Fiction? . 27 1.2 A Framework for Storygame Discussion . 30 1.2.1 The Slipperiness of Genre . 30 1.2.2 Inputs, Events, and Actions . 31 1.2.3 Mechanics and Dynamics . 32 1.2.4 Operational Logics . 33 1.2.5 Narrative Mechanics . 34 1.2.6 Narrative Logics . 36 1.2.7 The Choice Graph: A Standard Narrative Logic . 38 2 The Adventure Game: An Existing Storygame Mode 44 2.1 Definition . 46 2.2 Eureka Stories . 56 2.3 The Adventure Triangle and its Flaws . 60 2.3.1 Instability . 65 iii 2.4 Blue Lacuna ................................. 66 2.5 Three Design Solutions . 69 2.5.1 The Witness ............................. 70 2.5.2 Firewatch ............................... 78 2.5.3 Her Story ............................... 86 2.6 A Technological Fix? .
    [Show full text]
  • The New Zork Times Dark – Carry a Lamp VOL
    “All the Grues New Zork Area Weather: That Fit, We Print” The New Zork Times Dark – carry a lamp VOL. 3. .No. 1 WINTER 1984 INTERNATIONAL EDITION SORCERER HAS THE MAGIC TOUCH InfoNews Roundup New Game! Hint Booklets Sorcerer, the second in the In December, Infocom's long- Enchanter series of adventures in the awaited direct mail operation got mystic arts, is now available. The underway. Many of the functions game was written by Steve formerly provided by the Zork Users Meretzky, whose hilarious science Group were taken over by Infocom. fiction game, Planetfall, was named Maps and InvisiClues hint booklets by InfoWorld as the Best Adventure were produced for all 10 of Game of 1983. In Sorcerer, you are a Infocom's products. The games member of the prestigious Circle of themselves were also made available Enchanters, a position that you primarily as a service to those of you achieved in recognition of your in remote geographical areas and to success in defeating the Warlock those who own the less common Krill in Enchanter. computer systems. When the game starts, you realize Orders are processed by the that Belboz, the Eldest of the Circle, Creative Fulfillment division of the and the most powerful Enchanter in DM Group, one of the most the land, has disappeared. Perhaps he respected firms in direct mail. Their has just taken a vacation, but it facilities are in the New York metro- wouldn't be like him to leave without politan area, which explains the letting you know. You remember strange addresses and phone num- that he has been experimenting with bers you'll see on the order forms.
    [Show full text]
  • Metadefender Core V4.12.2
    MetaDefender Core v4.12.2 © 2018 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 13 Key Features of Metadefender Core 14 1. Quick Start with Metadefender Core 15 1.1. Installation 15 Operating system invariant initial steps 15 Basic setup 16 1.1.1. Configuration wizard 16 1.2. License Activation 21 1.3. Scan Files with Metadefender Core 21 2. Installing or Upgrading Metadefender Core 22 2.1. Recommended System Requirements 22 System Requirements For Server 22 Browser Requirements for the Metadefender Core Management Console 24 2.2. Installing Metadefender 25 Installation 25 Installation notes 25 2.2.1. Installing Metadefender Core using command line 26 2.2.2. Installing Metadefender Core using the Install Wizard 27 2.3. Upgrading MetaDefender Core 27 Upgrading from MetaDefender Core 3.x 27 Upgrading from MetaDefender Core 4.x 28 2.4. Metadefender Core Licensing 28 2.4.1. Activating Metadefender Licenses 28 2.4.2. Checking Your Metadefender Core License 35 2.5. Performance and Load Estimation 36 What to know before reading the results: Some factors that affect performance 36 How test results are calculated 37 Test Reports 37 Performance Report - Multi-Scanning On Linux 37 Performance Report - Multi-Scanning On Windows 41 2.6. Special installation options 46 Use RAMDISK for the tempdirectory 46 3. Configuring Metadefender Core 50 3.1. Management Console 50 3.2.
    [Show full text]
  • Metadefender Core V4.13.1
    MetaDefender Core v4.13.1 © 2018 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 13 Key Features of Metadefender Core 14 1. Quick Start with Metadefender Core 15 1.1. Installation 15 Operating system invariant initial steps 15 Basic setup 16 1.1.1. Configuration wizard 16 1.2. License Activation 21 1.3. Scan Files with Metadefender Core 21 2. Installing or Upgrading Metadefender Core 22 2.1. Recommended System Requirements 22 System Requirements For Server 22 Browser Requirements for the Metadefender Core Management Console 24 2.2. Installing Metadefender 25 Installation 25 Installation notes 25 2.2.1. Installing Metadefender Core using command line 26 2.2.2. Installing Metadefender Core using the Install Wizard 27 2.3. Upgrading MetaDefender Core 27 Upgrading from MetaDefender Core 3.x 27 Upgrading from MetaDefender Core 4.x 28 2.4. Metadefender Core Licensing 28 2.4.1. Activating Metadefender Licenses 28 2.4.2. Checking Your Metadefender Core License 35 2.5. Performance and Load Estimation 36 What to know before reading the results: Some factors that affect performance 36 How test results are calculated 37 Test Reports 37 Performance Report - Multi-Scanning On Linux 37 Performance Report - Multi-Scanning On Windows 41 2.6. Special installation options 46 Use RAMDISK for the tempdirectory 46 3. Configuring Metadefender Core 50 3.1. Management Console 50 3.2.
    [Show full text]
  • The New Zork Times by Brief but Savage Downpour
    ® “All the Gnus Weather: Thic fog, followed That Fit, We Print” The New Zork Times by brief but savage downpour. VOL. 4. .No. 2 —SUMMER 1985— INTERFERON EDITION New Release: A Mind Forever Voyaging A Mind Forever Voyaging, the first were to be introduced. While you're advanced-level Science Fiction story busy exploring the future, the scien- from Infocom, is for true text- tists and programmers who created adventure buffs. Why? Because it you are honing and perfecting the has more locations to visit (several simulation's parameters. Thus, as the hundred), more things to do, more story progresses, you can travel responses, and a large vocabulary further and further in time, watching (1800+ words) than any of our previ- Rockvil prosper as the Plan ously released products. succeeds, or perish as it fails. Only The story takes place in 21st- you can tell on what course the century Rockvil, South Dakota. The country sets itself by adopting the United States of North America has Plan. fallen prey to incredibly high unem- While there are several puzzles to ployment and crime rates. Political keep players on their toes, designer indiffererence, perhaps caused by Steve Meretzky (author of Planetfall backward educational systems or and Sorcerer, and co-author of The diminishing national resources, has Hitchhiker's Guide to the Galaxy) Items from Dr. Perleman’s desk are contained in every A Mind Forever swept the nation. Exploiting this op- concentrated more on immersing the Voyaging package. portunity, Senator Richard Ryder has player in a vast, highly detailed, develop (sic) the Plan for a Renewed realistic world; a vision of the National Purpose, stressing patriot- destiny of mankind.
    [Show full text]
  • 14. Riddle Machines: the History and Nature of Interactive Fiction
    Nick Montfort Riddle Machines: The History and Nature of Interactive Fiction 14. Riddle Machines: The History and Nature of Interactive Fiction Nick Montfort Introduction The genre that has also been labeled "text adventure" and "text game" is stereotypically thought to offer dungeons, dragons, and the ability for readers to choose their own adventure. While there may be dragons here, interactive fiction (abbreviated "IF") also offers utopias, revenge plays, horrors, parables, intrigues, and codework, and pieces in this form resound with and rework Gilgamesh, Shakespeare, and Eliot as well as Tolkien. The reader types in phrases to participate in a dialogue with the system, commanding a character with writing. Beneath this surface conversation, and determining what the computer narrates, there is the machinery of a simulated world, capable of drawing the reader into imagining new perspectives and understanding strange systems. Interactive fiction works can be challenging for literary readers, even those interested in other sorts of electronic literature, because of the text-based interface and because of the way in which these works require detailed exploration, mapping, and solution. Works in this form are often less visually rewarding, and the rewards they do offer are only attained with time and effort. But text-based interactive fiction has provided some of the most the intricate and compelling literary simulations yet developed. Understanding how interactive fiction works, and how it has developed over the past three decades, is an essential part of the puzzle of literary computing. Characteristics of interactive fiction Formally, a work of interactive fiction (often called a "game," even if it does not exhibit the typical qualities of a game) is an interactive computer program.
    [Show full text]
  • The Post Infocom Text Adventure Collection
    The Post Infocom Text Adventure Collection Many of us played and loved the text adventures produced by Infocom in the 1980’s. They were rich in story and puzzles, and contained some excellent writing. In the years since Infocom’s demise in 1989, there have been a lot of good games produced using the Z-Machine - the game format that Infocom was using. This gives us a chance to make these modern-day games run on the computers of the 80’s, like the Commodore 64. I decided to create a collection of Z-machine games for the C64, and this is it. All in all, it’s 31 games, released in 1993-2015. Each game has been put into its own directory, in which is also an empty disk for game saves and a file called AUTOSWAP.LST to make life easier for people using the SD2IEC diskdrive substitute. If you haven’t played text adventures before, or feel that you never got the hang of it, you should read the chapter How to play a text adventure. If you want more of a background on Infocom and the game format they used, you should read the chapter about The Zork Machine at the end of this document. There is also a chapter about the process of porting Z-machine games to the C64 and, finally, a chapter about writing your own games. I created this documentation as a PDF, so that you could easily print it out and keep it nearby if you’re enjoying the collection on a real C64.
    [Show full text]
  • Jay Simon 3/18/2002 STS 145 Case Study Zork: a Study of Early
    Jay Simon 3/18/2002 STS 145 Case Study Zork: A Study of Early Interactive Fiction I: Introduction If you are a fan of interactive fiction, or have any interest in text-based games from the early 1980’s, then you are no doubt familiar with a fascinating series known as Zork. For the other 97 percent of the population, the original Zork games are text-based adventures in which the player is given a setting, and types in a command in standard English. The command is processed, and sometimes changes the state of the game. This results in a new situation that is then communicated to the user, restarting the cycle. This type of adventure game is classified as belonging to a genre called “interactive fiction”. Zork is exceptional in that the early Zork games are by far the most popular early interactive fiction titles ever released. It is interesting to examine why these games sold so well, while most other interactive fiction games could not sell for free in the 1980’s. As we will see, this is a result of many different technological and stylistic aspects of Zork that separate it from the rest of the genre. Zork is a unique artifact in gaming history. II: MIT and Infocom – The Prehistory of Zork Zork was not a modern project developed under a strict timeline by a designated team of programmers, but credit is given to two MIT phenoms named Marc Blank and Dave Lebling. Its history can be traced all the way back to the invention of a medium-sized machine called the PDP-10, in the 1960’s.
    [Show full text]
  • Reading and Acting While Blindfolded: the Need for Semantics in Text Game Agents
    Reading and Acting while Blindfolded: The Need for Semantics in Text Game Agents Shunyu Yaoy∗ Karthik Narasimhany Matthew Hausknechtz yPrinceton University zMicrosoft Research {shunyuy, karthikn}@princeton.edu [email protected] Abstract et al., 2020), open-domain question answering systems (Ammanabrolu et al., 2020), knowledge Text-based games simulate worlds and inter- act with players using natural language. Re- graphs (Ammanabrolu and Hausknecht, 2020; Am- cent work has used them as a testbed for manabrolu et al., 2020; Adhikari et al., 2020), and autonomous language-understanding agents, reading comprehension systems (Guo et al., 2020). with the motivation being that understanding Meanwhile, most of these models operate un- the meanings of words or semantics is a key der the reinforcement learning (RL) framework, component of how humans understand, reason, where the agent explores the same environment and act in these worlds. However, it remains in repeated episodes, learning a value function or unclear to what extent artificial agents utilize semantic understanding of the text. To this policy to maximize game score. From this per- end, we perform experiments to systematically spective, text games are just special instances of reduce the amount of semantic information a partially observable Markov decision process available to a learning agent. Surprisingly, we (POMDP) (S; T; A; O; R; γ), where players issue find that an agent is capable of achieving high text actions a 2 A, receive text observations o 2 O scores even in the complete absence of lan- and scalar rewards r = R(s; a), and the under- guage semantics, indicating that the currently lying game state s 2 S is updated by transition popular experimental setup and models may 0 be poorly designed to understand and leverage s = T (s; a).
    [Show full text]
  • The Z-Machine Standards Document: Contents
    The Z-Machine Standards Document: Contents The Z-Machine Standards Document Version 1.0 22nd June 1997 two misprints corrected, 9th August resources appendix updated and discovery added to header table, 4th September ● Preface ● Overview of Z-machine architecture Fundamentals ● 1. The memory map ● 2. Numbers and arithmetic ● 3. How text and characters are encoded ● 4. How instructions are encoded ● 5. How routines are encoded ● 6. The game state: storage and routine calls Input/Output ● 7. Output streams and file handling ● 8. The screen model ● 9. Sound effects ● 10. Input streams and devices Tables ● 11. The format of the header ● 12. The object table ● 13. The dictionary and lexical analysis Instruction Set ● 14. Complete table of opcodes (with Inform assembly syntax) file:///D|/doc/zspec10/index.html (1 of 2) [6/22/2000 4:34:11 PM] The Z-Machine Standards Document: Contents ● 15. Dictionary of opcodes An Unusual Font ● 16. Font 3 and character graphics Appendices ● A. Error messages and debugging ● B. Conventional contents of the header ● C. Resources available (with WWW links) ● D. A short history of the Z-machine ● E. Statistics ● F. Canonical story files file:///D|/doc/zspec10/index.html (2 of 2) [6/22/2000 4:34:11 PM] The Z-Machine Standards Document: Preface Preface The Z-machine was created on a coffee table in Pittsburgh in 1979. It is an imaginary computer whose programs are adventure games, and is well-adapted to its task, implementing complex games remarkably compactly. They were still perhaps 100K long, too large for the memory of the home computers of their day, and the Z-machine seems to have made the first usage of virtual memory on a microcomputer.
    [Show full text]