{"id":31552583,"url":"https://github.com/inseven/opolua","last_synced_at":"2026-03-01T12:03:14.723Z","repository":{"id":43349483,"uuid":"427894381","full_name":"inseven/opolua","owner":"inseven","description":"A compiled-OPL interpreter for iOS written in Lua","archived":false,"fork":false,"pushed_at":"2026-02-26T20:15:28.000Z","size":28500,"stargazers_count":21,"open_issues_count":45,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-27T02:16:39.699Z","etag":null,"topics":["ios","lua","opl","psion","swift"],"latest_commit_sha":null,"homepage":"https://opolua.org","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inseven.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-14T10:10:48.000Z","updated_at":"2026-02-26T20:05:31.000Z","dependencies_parsed_at":"2023-09-26T05:00:34.845Z","dependency_job_id":"3a49895a-f8c4-46eb-841e-d7fc0fe5d5d3","html_url":"https://github.com/inseven/opolua","commit_stats":null,"previous_names":[],"tags_count":223,"template":false,"template_full_name":null,"purl":"pkg:github/inseven/opolua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inseven%2Fopolua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inseven%2Fopolua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inseven%2Fopolua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inseven%2Fopolua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inseven","download_url":"https://codeload.github.com/inseven/opolua/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inseven%2Fopolua/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T11:43:06.159Z","status":"ssl_error","status_checked_at":"2026-03-01T11:43:03.887Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ios","lua","opl","psion","swift"],"created_at":"2025-10-04T19:59:01.596Z","updated_at":"2026-03-01T12:03:09.522Z","avatar_url":"https://github.com/inseven.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpoLua\n\n[![Build](https://github.com/inseven/opolua/actions/workflows/build.yaml/badge.svg)](https://github.com/inseven/opolua/actions/workflows/build.yaml)\n\nAn OPO (compiled OPL) interpreter written in Lua and Swift/Qt, based on the Psion Series 5 era format (ie ER5, prior to the Quartz 6.x changes). It lets you run Psion 5 programs written in OPL on any iOS device, subject to the limitations described below, as well as on any platform supported by the Qt port (mac, windows, linux).\n\nSupported features:\n\n* Ability to decode a variety of Psion file types, including MBM, SIS, and databases.\n* SIS files can be installed directly by launching them.\n* Colour graphics (if the program originally provided them).\n* Sound.\n* Limited game controller support - although a paired bluetooth keyboard is necessary for some programs that rely on the keyboard rather than touchscreen input (iOS version only).\n\nOne thing that is explicitly not supported is programs that aren't pure OPL - ie that are native ARM-format binaries. This project is an OPL interpreter only, it is not a full ARM virtual machine.\n\nThere are two versions of the app: one for iOS and macOS Catalyst written in Swift; and one written in Qt which runs on macOS, Windows and linux. The two versions are mostly equivalent with some minor differences in UX.\n\n## Screenshots\n\nSome example OPL programs downloaded from the internet, running in OpoLua on iOS, Windows and macOS respectively:\n\n![Jumpy! Plus](assets/screenshots/jumpy-plus.png)\n\n![Vexed](assets/screenshots/vexed.png)\n\n![Tile Fall](assets/screenshots/tile-fall.png)\n\n## Building the Qt version\n\nOn Linux you'll need a version of Qt 5 or 6 and qmake, something like:\n\n```\nsudo apt install qt5-qmake qtmultimedia5-dev libqt5multimedia5-plugins\ngit clone https://github.com/inseven/opolua.git\ncd opolua/qt\ngit submodule update --init --recursive\nqmake opolua.pro\nmake\nsudo make install\n```\n\nOn mac:\n\n```\nbrew install qt@5\ngit clone https://github.com/inseven/opolua.git\ncd opolua/qt\ngit submodule update --init --recursive\nqmake opolua.pro\nmake\n```\n\nBoth Qt 5 and Qt 6 are supported and in theory should run on all platforms supported by Qt. Only macOS, Linux and Windows are tested, however.\n\n## SIBO/EPOC16/Series 3 support\n\nThere is preliminary support for running OPL programs which target the Series 3/3a/3c and Siena. Due to the lack of installable SIS files on these platforms, currently only the Qt app and the command line tools support them. You will need to manually construct a directory structure that looks like this:\n\n```\n\u003cwhatever\u003e.oplsys\n|- m/\n|  |- APP/\n|  |  |- \u003cappname\u003e.OPA\n```\n\nPopulate any files or directories under the 'm' directory as instructed by the readme for the app. At which point you can open the OPA in the app or (on macOS) double-click the .oplsys bundle. For a double-clickable option on other platforms, create an empty 'launch.oplsys' file next to the 'm' directory. This file can then be double-clicked to launch the app.\n\nThe Series 3 support is at an early stage of development and there are many missing features compared to the Series 5 support. Please raise bugs for any programs you particularly want to run! (Help -\u003e Report Issue, in the Qt app).\n\n## Implementation notes\n\nThis interpreter largely ignores types and specific memory layout restrictions. The stack is represented with a simple Lua table containing Lua number or string values, with no strict distinction between words/longs/floats.\n\nRight now it runs in minimal Lua 5.3 or 5.4 with bare bones I/O support (on any OS), or as a iOS Swift app with fairly comprehensive graphics support (which uses Lua 5.4). There is also now a version using Qt for the front end.\n\nVariables (ie, values not on the stack) are represented by a table of metatable type `Variable`. Calling `var()` gets the value, and calling `var(newVal)` sets it. In the case of array values, `Variable` also supports array indexing. Each item in the array is itself a `Variable`. To assign to the first item in an array variable, do `arrayVar[1](newVal)`.\n\nIn OpoLua v1.0 variables were represented solely by Lua data structures using `Variable` and a complex mapping and pseudo-allocator was maintained to support APIs like `ADDR()` and `PEEKB()`. In v1.1 this was rewritten (and simplified) so that all `Variables` are backed by a contiguous address space represented by `Chunk`, which allows more accurate emulation of things like out-of-bounds memory accesses which are technically undefined but many programs relied on how these behaved on real hardware. `Chunk` uses an array of Lua integers to represent the raw memory values, 4 bytes per integer. This allows the interpreter to function in pure-Lua mode while (in principle) allowing a more optimised native backing store.\n\nThis interpreter is not 100% behaviour compatible with the original Psion. The more relaxed typing will mean that code which errored on a Psion may execute fine on here. Equally, programs relying on undefined behaviour (like writing to freed memory, or abuse of the asynchronous APIs) may not run correctly. Any non-UB non-erroring program (which also doesn't rely on expecting errors to occur and trapping them) should run OK here. Except for...\n\n**This is a work in progress!** See the next section for missing features.\n\n## Missing features\n\n* Various other less-common opcodes, functions and OPXes\n* Not all database features are supported yet, including:\n  * Sorting records with ORDER BY\n  * Some databases created outside of OPL\n  * Writing Psion-format databases\n* Invert drawing mode\n  * This is mostly done now in the Swift frontend\n* Ability to suspend/resume app execution in the iOS UI\n* Due to the event handling and rendering pipeline for the Qt and Swift versions being completely different, there might be some differences in how apps behave. We will try to fix bugs in both versions to the extent it is possible to do so.\n\n\n## References\n\nVarious useful resources which aided greatly in reverse-engineering the OPL and EPOC environments:\n\n* https://github.com/opl-dev/opl-dev\n* https://web.archive.org/web/20070716134804/http://3lib.ukonline.co.uk/progindex.htm\n* https://web.archive.org/web/20060505220702/http://www.allaboutopl.com/wiki/OPLCommandsListing?v=kbu\n* https://www.thouky.co.uk/software/psifs/sis.html\n* http://www.koeniglich.de/epoc32_fileformats.txt\n* https://frodo.looijaard.name/psifiles/MBM_File\n* http://www.davros.org/psion/psionics/\n* http://www.users.globalnet.co.uk/~datajam/opl-manual/html/opl/opchapt13.html\n* https://web.archive.org/web/20041130063903/http://home.t-online.de/home/thomas-milius/Download/Documentation/EPCDB.htm\n\n## Contributing\n\nWe invite and welcome contributions! There's a pretty comprehensive list of [issues](https://github.com/inseven/opolua/issues) to get you started, and our documentation is always in need of some care and attention.\n\nPlease recognize OpoLua is a labour of love, and be respectful of others in your communications. We will not accept racism, sexism, or any form of discrimination in our community.\n\n## License\n\nOpoLua comprises three main components:\n\n- **OpoLua Core**\n  - Lua implementation of the OPL runtime, common utilities, and integration APIs targeting various platforms and languages.\n  - Licensed under the MIT License.\n  - Located in the 'core' directory.\n\n- **OpoLua iOS**\n  - Swift application targeting Apple platforms (iOS, iPadOS, and macOS).\n  - Licensed under the MIT License.\n  - Located in the 'ios' directory.\n\n- **OpoLua Qt**\n  - C++ application targeting Windows, Mac, and Linux, using Qt.\n  - Licensed under the GPLv2 or Later license.\n  - Located in the 'qt' directory.\n\nOriginal assets and resources (located in 'resources') remain copyright their creators and are not covered by the licenses herein.\n\nAll other material is licensed under the MIT License unless stated.\n\nSee [LICENSE](LICENSE) for full license texts.\n\nOpoLua also depends on the following separately licensed third-party libraries and components:\n\n- [Diligence](https://github.com/inseven/diligence), MIT License\n- [Interact](https://github.com/inseven/interact), MIT License\n- [Licensable](https://github.com/inseven/licensable), MIT License\n- [Lua](https://www.lua.org), MIT License\n- [LuaSwift](https://github.com/tomsci/LuaSwift), MIT License\n- [Qt](https://doc.qt.io/qt-6/licensing.html), LGPL v3 and GPL v3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finseven%2Fopolua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finseven%2Fopolua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finseven%2Fopolua/lists"}