1
0
Fork
You've already forked uxn2
0
  • C 94.9%
  • Makefile 5.1%
Find a file
choc 2fbaa62b8d network: init v3
-N enable network device
-4 use IPv4 (default)
-6 use IPv6
2026年04月25日 16:12:47 +08:00
doc network: init v3 2026年04月25日 16:12:47 +08:00
etc network: init v3 2026年04月25日 16:12:47 +08:00
src network: init v3 2026年04月25日 16:12:47 +08:00
.build.yml Progress on CI 2026年02月07日 01:35:55 -08:00
.clang-format Added formatter 2025年12月25日 19:06:11 -08:00
.gitignore Init 2025年12月25日 13:57:38 -08:00
LICENSE Added README 2025年12月25日 19:52:39 -08:00
makefile network: init v3 2026年04月25日 16:12:47 +08:00
README.md Progress on CI 2026年02月07日 01:35:55 -08:00

Uxn2

A graphical emulator for the Varvara Computer, written in C99(SDL2).

Building

You must have SDL2 installed.

cc -I/usr/include/SDL2 -DNDEBUG -O2 -g0 -s -lSDL2 src/uxn2.c -o bin/uxn2

For your convenience a Makefile is provided.

make run

You can run make install to build and install the files. By default, files are installed into ~/.local but this can be overridden using PREFIX:

# installs files into /opt/uxn/bin
$ make PREFIX=/opt/uxn install

Plan 9

If you're on plan 9.

cd src/
cc -p -I/sys/include/npe -I /sys/include/npe/SDL2/ uxn2.c
6l -o uxn2 uxn2.6

If do not wish to build it yourself, you can download linux binaries.

builds.sr.ht status

Usage

The first parameter is the rom file, the subsequent arguments will be accessible to the rom, via the Console vector.

bin/uxn2 bin/example.rom arg1 arg2

Assembler

This repository comes with a copy of the compiled Drifblim assembler.

cat etc/utils/drifblim.rom.txt | bin/uxn2 etc/utils/xh.rom > bin/drifblim.rom
bin/uxn2 bin/drifblim.rom etc/tests/opctest.tal bin/opctest.rom

Devices

The file device is sandboxed, meaning that it should not be able to read or write outside of the working directory.

  • 00 system
  • 10 console
  • 20 screen
  • 40 audio
  • 50 audio
  • 60 audio
  • 70 audio
  • 80 controller
  • 90 mouse
  • a0 file(a)
  • b0 file(b)
  • c0 datetime

Emulator Controls

  • F1 toggle zoom
  • F2 toggle debugger
  • F4 reboot
  • F5 reboot(soft)

Buttons

  • LCTRL A
  • LALT B
  • LSHIFT SEL
  • HOME START

SDL2

To build this emulator, you must install SDL2 for your distro. If you are using a package manager:

sudo pacman -Sy sdl2 # Arch
sudo apt install libsdl2-dev # Ubuntu
sudo xbps-install SDL2-devel # Void Linux
brew install sdl2 # OS X

Need a hand?

The following resources are a good place to start:

Contributing

Submit patches using git send-email to the ~rabbits/public-inbox mailing list.