UR FINKEL
The Royal Game of Ur — a ~4,600-year-old board game — written in C and 6502 assembly for the Commodore Plus/4.
If the tab reloads itself, that is Safari running out of memory — the page comes back here, not into another attempt.
The machine has stopped. It has drawn no frames for eight seconds while you were watching it, which means the emulator has seized up rather than the game being slow. Nothing here can revive it — an emulator that has stopped keeps its memory and its audio either way — so the only real cure is to put it down and start again.
If it crashes or reloads on your phone
These take effect the next time you press play, and are remembered on this device only. Whichever one lets the game run is also the answer to what went wrong — the line below is that answer in a form worth sending me.
The game asks for these, and a phone has no keyboard to answer with. Before the first match it wants a name and a colour: send a name with the box above, or send nothing and it names you itself.
Downloads — four ways to take it away. Each card goes to the file it names; clicking a binary there saves it, while the checksum files open in the browser so you can save one beside the download and check it arrived whole.
-
urfinkel.prg
the program alone, for the Commodore Plus/4 — 56 510 bytes — built 2026-08-13
Drag it onto VICE, YAPE or plus4emu. It starts faster than the disk image — there is no directory to read first.
https://github.com/vonglurt/urfinkel/raw/main/build/urfinkel.prg
- SHA-256
3f868033a717e81af8cb86087bfdf023096614a76a11bb008cc0c9f3439bc191— urfinkel.prg.sha256- MD5
cb08c8af4ebb222417fd332adcda0baf— urfinkel.prg.md5
-
urfinkel.d64
a disk image, for the Commodore Plus/4 — 174 848 bytes — built 2026-08-13
Put it on an SD2IEC or a Pi1541, mount it as a disk, then
dload"urfinkel". Desktop emulators open it directly. https://github.com/vonglurt/urfinkel/raw/main/build/urfinkel.d64- SHA-256
de09c8773c6191a843f51e43236b1798fbe44f778b1941e2f6822722440a5548— urfinkel.d64.sha256- MD5
47ffc4bbca5e844494f076fc5694990f— urfinkel.d64.md5
-
urfinkel.zip
plays offline on a PC
full source included
the whole collection, zipped — 4 960 100 bytes — built 2026-08-13
Unpack it anywhere. Holds the program, the disk image, the whole C and 6502 source tree, this page with a script that serves it on your own machine, the licence, and notes — including the exact
cl65command that rebuilds the binary byte-for-byte from the source beside it. The emulator comes too, so the browser copy plays with nothing plugged in. https://github.com/vonglurt/urfinkel/raw/main/build/urfinkel.zip Fully offline: the game, the emulator and the page all come out of the folder — nothing is fetched from anywhere. It has to be served rather than opened directly, because afile://page may not read the files beside it: run./start-html.sh. The emulator inemulatorjs/is EmulatorJS, GPL-3.0 and not part of UR FINKEL — seeemulatorjs/SOURCE.txt.index.htmlbeside it is the same page taking the emulator from its CDN instead, which is always the current version.- SHA-256
06ad03c7e8c157419b6586729e0fcacdbb72c2e312cc516e939ca2c93e2c1446— urfinkel.zip.sha256- MD5
3bdf5541b37c3cf58d6204b4f8e9a2e7— urfinkel.zip.md5
To check a download arrived intact, save
its .sha256 beside it and run shasum -a 256 -c
urfinkel.prg.sha256. What built these — compiler, version and the
exact command — is in CHECKSUMS.txt.
Code — the whole repository
The four files above are built from, and committed to, github.com/vonglurt/urfinkel — along with the Makefile, the tests, the hooks and the reports that none of the archives carry. This is the same panel GitHub's green Code button opens, kept here so you do not have to go and find it.
https://github.com/vonglurt/urfinkel.git
git@github.com:vonglurt/urfinkel.git
Clone with either, then make && make disk.
Or take a snapshot of main as an archive — these are GitHub's
own, made from the branch on request, and are not the same files
as the collections above: they are the whole repository, and they carry no
checksums of their own.
VIDEO
A demonstration of the game running on a Commodore Plus/4 — also on YouTube.
CONTROLS
| Key | Where | What |
|---|---|---|
1–5 | menu | choose a mode |
1–7 | any turn | choose which piece to move |
m | menu and prompts | cycle the music |
s | menu | turn the sound effects on and off |
space | after a win, rules screen | continue |
return | name and colour prompts | accept what you typed — on its own, take what the game offers |
del | name and colour prompts | rub out the last character |
x x x | any match | leave, and return to the cabinet |
On a phone or a tablet, the same keys appear as buttons under the screen once the game is running — there is no other way to answer which piece? without a keyboard. The emulator's own on-screen pad is a joystick, and this game does not read one.
Left alone for two minutes, the cabinet starts the URBOT demo by itself and plays against itself.
WHAT THIS IS
The Royal Game of Ur, refereed by a Commodore Plus/4.
It is a race for seven pieces a side, it is about 4,600 years old, and it is a fun game. You do not need to read anything first — the machine holds the rules, casts the lots, and asks only which piece you want to move.
The ruleset is the one Irving Finkel reconstructed from a Babylonian
tablet, which is where the program gets its name. If you want the detail,
Wikipedia has it: the
Royal Game of Ur and Irving
Finkel. Otherwise press 5 on the menu for the rules screen,
or just start.
HOW IT GOT HERE
The port is not the point, but it is why the game looks the way it does. This began as UR ROYAL, the same rules and the same screen written entirely in Commodore BASIC 3.5. That edition took 24 seconds to draw the board and 2.8 seconds to work out which moves are legal. Rewritten in C and 6502 assembly, the same work takes milliseconds — and the recovered time went straight back into the game: motion tweening, a real dice tumble, and music playing from a raster interrupt while the match runs. All three were ruled out before.
| Primitive | BASIC 3.5 | Compiled | Speedup |
|---|---|---|---|
| draw the board | 23 960 ms | 123.4 ms | 194× |
| paint one 4×4 square | 594 ms | 2.05 ms | 290× |
| refresh both token rows | 1 826 ms | 7.48 ms | 244× |
| find the legal moves | 2 785 ms | 4.83 ms | 577× |
Measured on the machine, both editions against the same PAL jiffy clock. It has also been run on real restored hardware, loaded from an SD2IEC.
SCREENS
THE PROJECT
Everything below points at the main branch on GitHub.
- Repository — the whole project
- README — what it is, the numbers, and what it cost
- INSTALL — build it on a Mac, or run it in a browser
- CONTRIBUTING — forking is encouraged; commits must be signed
- src/ — the C and 6502 assembly
- docs/ — the migration report, the architecture, the keyboard, the music
LICENCE
MIT License Copyright (c) 2026 Paul Richeson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The emulator on this page is EmulatorJS, which carries its own licence and is fetched from its CDN — only when you press play, and not before. It is not part of this project.