OXYGENHUB

README: building and running on riscv64 Linux bd65c0cc08c7

How to build and run it on riscv64 Linux (packages, make, the dummy SDL
drivers for running without a display), with what was found doing it on
an OrangePi RV2: the speed there, how slowly a window drawn by Mesa's
software OpenGL runs (3-4% under Xvfb), SDL_Init failing when the
session asks for Wayland without a compositor, and that measurements on
the X60 move by several per cent with code placement alone.
Author
Andy McCall @andymccall <[email protected]>
via
agent agent:claude@andymccall <[email protected]> · keyless, under your grant for changes,refs,seal · key 7b25c1f45c9c
When
· 2026-10-21 03:15 UTC
Signature
◈ sealed by agent:claude@andymccall
Hash
bd65c0cc08c750c00867eb046a091f94bdd79a8aefe2c48eca51214fb0019c12
Depends on
03a3459e6372
Depended on by
nothing yet
In bookmarks
main riscv-1
Edits
1 atom, 0 tree operations, 1 file

Browse the tree at this change

modified README.md +23 −0
…
57 unchanged lines
58 58
59 59
Type `make` to build the source. The output will be `x16emu` in the current directory. Remember you will also need a `rom.bin` as described above.
60 60
61 +
### RISC-V (riscv64 Linux) Build
62 +
63 +
It builds and runs as on any Linux; nothing in the Makefile or the sources is specific to RISC-V. Checked on an OrangePi RV2 (Ky X1, eight X60 cores at 1.6 GHz) with Ubuntu 24.04, gcc 13.3 and SDL 2.30:
64 +
65 +
```
66 +
sudo apt-get install build-essential make libsdl2-dev zlib1g-dev
67 +
make -j8
68 +
```
69 +
70 +
The Makefile's `-Werror` build is clean there, and takes about two minutes. To run it without a display, use SDL's dummy drivers:
71 +
72 +
```
73 +
SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy ./x16emu -rom rom.bin
74 +
```
75 +
76 +
Things worth knowing:
77 +
78 +
- **Speed.** On that board it keeps up with a real X16 at the BASIC prompt and in programs that wait for VSYNC with `WAI` (with about 40% to spare), and reaches about 63% of real speed in a program that draws on the bitmap and plays FM and PSG sound without pause. The emulator's window title shows its own figure.
79 +
- **A display without a GPU driver.** Drawn by Mesa's software OpenGL (under Xvfb, for instance), the window ran at 3-4% of real speed: the time goes to drawing the window, not to the emulation.
80 +
- **`SDL_VIDEODRIVER=wayland` without a compositor** makes `SDL_Init` fail ("wayland not available"); set `SDL_VIDEODRIVER=x11` or `dummy`.
81 +
- **Measuring.** On the X60, where hot code happens to land can move run time by several per cent, so compare builds over several runs, not one.
82 +
- The control API's conformance suite (`src/extern/retro-remote-debug-controller/conformance`) runs natively as `.github/workflows/conformance.yml` runs it, with `python3-pytest` installed.
83 +
61 84
### WebAssembly Build
62 85
63 86
Steps for compiling WebAssembly/HTML5 can be found [here][webassembly].
…
547 unchanged lines