Varvara emulator, written in C89(X11)
Go to file
d_m 4ff6a5e862 Support creating directories
Previously Varvara did not have a way to create new directories.
This change adds that capability without adding or modifying any
device ports.

The changes are:

 (1) When a filename ends in the directory separator, writing
     any value to File/write will create a directory. Unlike
     with regular files, the value is ignored.

 (2) When writing any path (regular files or directories) if
     there are missing parent directories Varvara will attempt
     to create them first. This behavior is similar to mkdir -p.

The directory separator is / on most platforms, and \ on Windows.
On POSIX platforms the directories will be created with permission
0755 (modified by the user's umask value).

This change has been tested and works in both uxnemu and uxncli.
2024-09-17 18:09:32 -07:00
doc/man Improve formatting in small terms. 2024-08-06 07:44:33 -07:00
etc Add 3 simple examples of using subprocesses. 2024-09-04 18:21:29 -07:00
src Support creating directories 2024-09-17 18:09:32 -07:00
.build.yml Updated CI 2023-08-25 10:17:36 -07:00
.clang-format Added Fn keys controls 2022-04-05 20:06:42 -07:00
.gitignore
LICENSE
README.md Add uxntal manpage. 2024-08-05 19:57:31 -07:00
boot.rom Added boot.rom 2024-02-22 15:47:44 -08:00
makefile Add uxntal manpage. 2024-08-05 19:57:31 -07:00

README.md

Uxn11

An emulator for the Uxn stack-machine, written in ANSI C. The emulator contains a few linux specific utilities in the Console device to allow for it to interface with the unix systems.

Building

Makefile

For your convenience a Makefile is provided. 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 ~/.local/bin and ~/.local/share
$ make install

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

Graphical

All you need is X11.

gcc -Os -DNDEBUG -g0 -s src/uxn.c src/devices/system.c src/devices/console.c src/devices/screen.c src/devices/controller.c src/devices/mouse.c src/devices/file.c src/devices/datetime.c src/uxn11.c -o bin/uxn11 -lX11

Terminal

If you wish to build the emulator without graphics mode:

gcc -Os -DNDEBUG -g0 -s src/uxn.c src/devices/system.c src/devices/console.c src/devices/file.c src/devices/datetime.c src/uxncli.c -o bin/uxncli

If do not wish to build it yourself, you can download linux binaries for uxnasm, uxncli and uxn11.

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/uxnemu bin/polycat.rom arg1 arg2

Manual

A manual page is provided documenting the Uxntal language:

man ./doc/man/uxntal.7

After running make install the man page should be found by man uxntal.

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
  • 80 controller
  • 90 mouse
  • a0 file
  • c0 datetime

Emulator Controls

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

Buttons

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

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.