{"id":13778881,"url":"https://github.com/erkyrath/glulxe","last_synced_at":"2025-04-05T07:05:39.323Z","repository":{"id":43002526,"uuid":"156438","full_name":"erkyrath/glulxe","owner":"erkyrath","description":"The Glulx VM reference interpreter","archived":false,"fork":false,"pushed_at":"2024-12-02T21:57:42.000Z","size":615,"stargazers_count":114,"open_issues_count":6,"forks_count":22,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-29T06:07:05.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://eblong.com/zarf/glulx/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erkyrath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2009-03-22T16:41:28.000Z","updated_at":"2025-03-22T03:34:55.000Z","dependencies_parsed_at":"2023-10-02T02:40:26.392Z","dependency_job_id":"921dc853-1366-48ab-b9fd-4cfb19fa3ea2","html_url":"https://github.com/erkyrath/glulxe","commit_stats":{"total_commits":483,"total_committers":9,"mean_commits":"53.666666666666664","dds":0.4658385093167702,"last_synced_commit":"0a975939ff83ef1edb199a694c38adc73369b5bf"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkyrath%2Fglulxe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkyrath%2Fglulxe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkyrath%2Fglulxe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erkyrath%2Fglulxe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erkyrath","download_url":"https://codeload.github.com/erkyrath/glulxe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:00:58.519Z","updated_at":"2025-04-05T07:05:39.307Z","avatar_url":"https://github.com/erkyrath.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Glulxe: the Glulx VM interpreter\n\n- Version 0.6.1\n- Designed by Andrew Plotkin \u003cerkyrath@eblong.com\u003e\n- [Glulx home page][glulx]\n\n[glulx]: http://eblong.com/zarf/glulx/index.html\n[glk]: http://eblong.com/zarf/glk/index.html\n\n## Compiling\n\nSince this is a Glk program, it must be built with a Glk library. See\nthe [Glk home page][glk].\n\nThe Unix Makefile that comes with this package is designed to link any\nof the Unix libraries (CheapGlk, GlkTerm, RemGlk, etc.) You'll have to go\ninto the Makefile and set three variables to find the library. You'll also\nwant to set the appropriate OS_* constants on the OPTIONS line. There are\ninstructions at the top of the Makefile.\n\nThen just type\n\n    make glulxe\n\nThat should suffice. When the program is built, type\n\n    ./glulxe filename.ulx\n\nwhere \"filename.ulx\" is a Glulx game file to execute.\n\nTo build this program with a Mac or Windows interface, or any other \ninterface, you'll need the appropriate Glk library.\n\nThis program supports floating-point operations, which are implemented\nusing the standard C99 math functions. The Makefile uses \"-lm\" to link\nthese in. If your platform does not support these functions, you can\ncomment out the \"#define FLOAT_SUPPORT\" line in glulxe.h.\n\nIf you define the VM_DEBUGGER symbol (uncomment the \"#define VM_DEBUGGER\"\nline in glulxe.h), you must include the libxml2 library. See the\nXMLLIB definition in the Makefile.\n\n## Autosave\n\nThis interpreter supports autosave if the Glk library does. Currently\nonly two do: RemGlk and IosGlk. (The latter is no longer supported on\nmodern iOS, so RemGlk is your only real option.)\n\nThe --autosave option tells the interpreter to write out autosave\nfiles at the end of each turn. The --autorestore tells it to load\nthose files at startup time, thus starting the game where it was last\nautosaved. Note that --autosave will overwrite the autosave files if\npresent, but you should not use --autorestore unless the files exist.\n\nThere are two autosave files, by default kept in the current directory\nand named \"autosave.json\" and \"autosave.glksave\". You can change the\ndirectory with --autodir and the base filename with --autoname.\n\nIn some contexts it is useful for every game to have a unique autosave\nlocation. You can do this by giving an --autoname value with a hash\nmark, e.g.:\n\n    ./glulxe --autosave --autoname auto-# filename.ulx\n\nThe # character will be replaced with a (long) hex string that\nuniquely identifies the game file. (Pretty uniquely, at least. It's\nnot a cryptographically strong hash.)\n\nAutosave covers two slightly different scenarios:\n\n### Hedging against the possibility of process termination\n\nThis was how the iOS interpreters work (worked). The app would start\nand run normally, but it *could* be killed at any time (when in the\nbackground). Therefore, we autosave every turn. At startup time, if\nautosave files exist, we restore them and continue play.\n\nTo operate in this mode in a Unix environment:\n\n    ./glulxe --autosave --autoskiparrange filename.ulx\n\nThe --autosave argument causes an autosave every turn. The\n--autoskiparrange argument skips this on Arrange (window resize)\nevents. (We may get several Arrange events in a row, and they don't\nrepresent progress that a player would care about losing.)\n\nWhen relaunching, if autosave files exist, do:\n\n    ./glulxe --autosave --autoskiparrange --autorestore -autometrics filename.ulx\n\nThe --autorestore arguments loads the autosave. The -autometrics\nargument (a RemGlk argument, hence the single dash) tells RemGlk to\nskip the step of waiting for an Init event with metrics. (This is not\nneeded because the game will already be in progress. But you can send\na normal Arrange event if you think your window size might be\ndifferent from the autosave state.)\n\n### Single-turn operation\n\nThis mode allows you to play a game without keeping a long-term process\nactive. On every player input, the interpreter will launch, autorestore,\nprocess the input, autosave, and exit.\n\nTo operate in this mode in a Unix environment:\n\n    ./glulxe --autosave -singleturn filename.ulx\n\nThe -singleturn argument (a RemGlk argument) tells the interpreter to\nexit as soon as an output stanza is generated. When you pass in the\ninitial Init event, the interpreter will process the start-of-game\nactivity, display the initial window state, and exit.\n\nWhen relaunching, if autosave files exist, do:\n\n    ./glulxe --autosave --autorestore -singleturn -autometrics filename.ulx\n\nYou should only do this when the UI has a player input ready to process.\nLaunch the game and pass in the input. The interpreter will process it,\ndisplay the update, and then (without delay) exit.\n\n## Version\n\n0.6.2 (###)\n\n- Added autosave/autorestore support for the new RNG.\n\n0.6.1 (Oct 9, 2023)\n\n- Added a --rngseed argument to fix the RNG setting from the command\n  line.\n- Changed the built-in RNG to xoshiro**. Added configuration defs to\n  use a native OS RNG where possible.\n- Fixed obscure corner case in pow(), powf() on some platforms.\n- Configuration improvements for Windows.\n\n0.6.0 (Jun 25, 2022):\n\n- Added @hasundo and @discardundo opcodes. (Glulx spec 3.1.3.)\n- Added the double-precision opcodes. (Glulx spec 3.1.3.)\n- Added autosave support to the Unix startup code. (Previously the\n  autosave support only existed in the iOS startup code, which was\n  ObjC.) Autosave now works with the RemGlk library.\n- Added an --undo argument to set the number of undo states.\n- Fixed a bug where accelerated functions could write error messages\n  to Glk regardless of the current I/O system.\n- Added array bounds checking on stack access.\n- Added a guard against too-deep recursion when creating the string\n  cache.\n\n0.5.4 (Jan 23, 2017):\n\n- Added an internal debugger. Compile with \"#define VM_DEBUGGER\" \n  (and a debug-supporting Glk library) to use it.\n- Expanded the TOLERATE_SUPERGLUS_BUG behavior to tolerate more\n  Superglus game files.\n\n0.5.3 (Oct 25, 2016):\n\n- Turn on SERIALIZE_CACHE_RAM in the default build. This speeds up\n  save and save-undo operations.\n- Other tweaks to speed up launch, restart, restore, etc.\n- Fixed a bug where accelerated functions were not being autosaved.\n  (Only relevant for iOS, currently.)\n- When profiling, restore/restore-undo operations will now fail\n  (and the game will continue) instead of causing a fatal error.\n- Added a build option to tolerate the Superglus bug where (very old)\n  game files would try to write to memory address zero. (Not on by\n  default.)\n- Switched from my old ad-hoc license to the MIT license.\n\n0.5.2 (Mar 27, 2014):\n\n- Added acceleration functions 8 through 13, which work correctly when\n  NUM_ATTR_BYTES is changed.\n\n0.5.1 (Mar 10, 2013):\n\n- Fixed a bug in glkop.c that prevented get_buffer_stream() from\n  working right.\n- Updated profile-analyze.py to understand the upcoming, updated I6\n  debug file format. (See http://inform7.com/mantis/view.php?id=1073)\n  The old format is still supported.\n\n0.5.0 (Oct 18, 2012):\n\n- Turned on memory-range checking in the default build. (Should have\n  done this years ago.)\n- Fixed a bug where @setmemsize could crash an open char memory stream\n  or char line input request.\n- Updated glkop.c to handle arrays of Glk objects. (This is needed to\n  support glk_schannel_play_multi().)\n- Added hooks for the library to execute at startup and select time.\n- Added a hook which allows the library to get and pass on a game ID\n  string.\n- Clean up all memory allocation when the VM exits.\n\n0.4.7 (Oct 10, 2011):\n\n- Abstracted powf() to an osdepend wrapper. (Needed for Windows.)\n- Fixed a @ceil bug, for some C math libraries.\n- Improved the profiling system in several ways.\n- Fixed a bug in glkop.c dispatching, to do with optional array\n  arguments.\n\n0.4.6 (Aug 17, 2010):\n\n- Added floating-point math feature.\n- Updated winstart.c. (Thanks David Kinder.)\n- Fixed @random even more, on Windows.\n- @verify works right on game files with extended memory.\n- @getiosys works right when the two store operands are different\n  variable types. (E.g., one local and one global.)\n\n0.4.5 (Nov 23, 2009):\n\n- VERIFY_MEMORY_ACCESS now detects writes to the ROM section of memory.\n- Fixed off-by-eight bug in @astorebit and @aloadbit with negative bit\n  numbers.\n- Fixed an obscure bug with division and modulo of $80000000. (Thanks \n  Evin Robertson.)\n- Fixed an extremely obscure problem with changing I/O mode in the middle\n  of printing a number.\n- Glk array/string operations are now checked for memory overflows\n  (though not for ROM writing). This generates a warning at present;\n  in the future, it will be a fatal error.\n- Better fix for the @random bug.\n\n0.4.4 (Mar 11, 2009):\n\n- Added profiling code, which is turned off by default. To compile it \n  in, define VM_PROFILING in Makefile or in glulxe.h.\n- Added function-accleration feature.\n- Fixed bug where @random 0 was returning only positive numbers.\n\n0.4.3 (Jan 23, 2008):\n\n- Verify the presence of Unicode calls in the Glk library at runtime.\n  (Thanks Simon Baldwin.)\n- Added a compile-time option to check for invalid memory accesses.\n  (This is slower, but safer. Define VERIFY_MEMORY_ACCESS in Makefile\n  or in glulxe.h. Thanks Evin Robertson.)\n- Fixed a memory leak of undo states. (Thanks Matthew Wightman.)\n- Fixed a linked-list handling error for Glk unicode arrays. (Thanks\n  David Kinder.)\n\n0.4.2 (Feb 15, 2007):\n\n- Fixed a bug that preventing compiling with old (pre-Unicode) Glk\n  libraries.\n\n0.4.1 (Feb 11, 2007):\n\n- Added array copy and heap allocation functionality. (Glulx spec \n  3.1.0.)\n\n0.4.0 (Aug 13, 2006):\n\n- Added Unicode functionality. (Glulx spec 3.0.0.)\n\n0.3.5 (Aug 24, 2000):\n\n- Fixed El-Stupido bug in the modulo opcode.\n\n0.3.4 (Jul 11, 2000):\n\n- Finally supports string arguments to Glk calls.\n\n0.3.3 (Mar 29, 2000):\n\n- Added setiosys, getiosys opcodes.\n- Fixed bug in binarysearch.\n\n0.3.2 (Feb 21, 2000):\n\n- Added search, jumpabs, callf, and gestalt opcodes.\n\n0.3.1 (Aug 23, 1999):\n\n- Startup code now handles Blorb files correctly.\n\n0.3.0 (Aug 17, 1999):\n\n- Added support for compressed strings.\n\n0.2.2 (Jun 15, 1999):\n\n- Another pre-release version.\n\n0.2.0 (May 30, 1999):\n\n- A pre-release version.\n\n## Permissions\n\nThe source code in this package is copyright 1999-2023 by Andrew Plotkin.\nIt is distributed under the MIT license; see the \"[LICENSE][]\" file.\n\n[LICENSE]: ./LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferkyrath%2Fglulxe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferkyrath%2Fglulxe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferkyrath%2Fglulxe/lists"}