uxn11/README.md

70 lines
2.1 KiB
Markdown
Raw Normal View History

2022-04-05 19:42:50 +01:00
# Uxn11
2022-03-27 00:23:52 +00:00
2023-11-11 17:50:19 +00:00
An emulator for the [Uxn stack-machine](https://wiki.xxiivv.com/site/uxn.html), 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.
2022-03-27 00:23:52 +00:00
2022-04-06 04:06:42 +01:00
## Building
### Graphical
2022-03-27 05:07:01 +01:00
All you need is X11.
2022-04-06 04:06:42 +01:00
```sh
2023-08-09 01:00:48 +01:00
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
2022-03-27 05:07:01 +01:00
```
2022-04-06 04:06:42 +01:00
### Terminal
2022-03-27 05:07:01 +01:00
2022-03-27 02:32:46 +01:00
If you wish to build the emulator without graphics mode:
```sh
2023-08-09 01:00:48 +01:00
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
2022-03-27 02:32:46 +01:00
```
2023-06-08 19:17:47 +01:00
If do not wish to build it yourself, you can download linux binaries for [uxnasm](https://rabbits.srht.site/uxn11/bin/uxnasm), [uxncli](https://rabbits.srht.site/uxn11/bin/uxncli) and [uxn11](https://rabbits.srht.site/uxn11/bin/uxn11).
2023-06-08 19:11:52 +01:00
[![builds.sr.ht status](https://builds.sr.ht/~rabbits/uxn11.svg)](https://builds.sr.ht/~rabbits/uxn11?)
2022-04-06 20:38:34 +01:00
## Usage
The first parameter is the rom file, the subsequent arguments will be accessible to the rom, via the [Console vector](https://wiki.xxiivv.com/site/varvara.html#console).
2022-04-06 04:06:42 +01:00
```sh
2022-04-06 20:38:34 +01:00
bin/uxnemu bin/polycat.rom arg1 arg2
2022-04-06 04:06:42 +01:00
```
2022-03-27 16:46:50 +01:00
## Devices
2022-06-21 17:04:37 +01:00
The file device is _sandboxed_, meaning that it should not be able to read or write outside of the working directory.
2022-03-27 16:46:50 +01:00
- `00` system
2023-11-11 17:50:19 +00:00
- `10` console(+)
2022-03-28 17:51:38 +01:00
- `20` screen
2022-03-28 17:39:05 +01:00
- `80` controller
2022-04-06 03:31:53 +01:00
- `90` mouse
2023-08-09 01:00:48 +01:00
- `a0` file
2022-03-27 16:46:50 +01:00
- `c0` datetime
2022-04-06 04:06:42 +01:00
## Emulator Controls
2023-08-09 01:00:48 +01:00
- `F2` toggle on-screen debugger
2022-06-13 19:14:17 +01:00
- `F4` load boot.rom, or reload rom
2022-04-06 04:06:42 +01:00
### Buttons
- `LCTRL` A
- `LALT` B
- `LSHIFT` SEL
- `HOME` START
## Need a hand?
The following resources are a good place to start:
* [XXIIVV — uxntal](https://wiki.xxiivv.com/site/uxntal.html)
* [XXIIVV — uxntal reference](https://wiki.xxiivv.com/site/uxntal_reference.html)
* [compudanzas — uxn tutorial](https://compudanzas.net/uxn_tutorial.html)
2022-03-27 00:23:52 +00:00
## Contributing
Submit patches using [`git send-email`](https://git-send-email.io/) to the [~rabbits/public-inbox mailing list](https://lists.sr.ht/~rabbits/public-inbox).