2022-04-05 14:42:50 -04:00
# Uxn11
2022-03-26 20:23:52 -04:00
2022-03-27 00:07:01 -04:00
An emulator for the [Uxn stack-machine ](https://wiki.xxiivv.com/site/uxn.html ), written in ANSI C.
2022-03-26 20:23:52 -04:00
2022-03-30 13:37:47 -04:00
## Uxn11/System
This emulator's system device supports changing a stack's location to a page of memory. The default memory mapping is as follows:
- `0000-ffff` , as **RAM** .
- `10000-100ff` , as **working stack** .
- `10100-101ff` , as **return stack** .
To use the last page of ram(`0xff00`) to host the working stack:
```
#ff .System/wst DEO
```
The stack mapping is 254 bytes of data, a byte for the pointer and a byte for an error code.
2022-03-27 00:07:01 -04:00
## Graphical
All you need is X11.
```
2022-03-28 14:03:02 -04:00
gcc src/uxn.c src/devices/system.c src/devices/screen.c src/devices/controller.c src/devices/mouse.c src/devices/file.c src/devices/datetime.c src/uxn11.c -D_POSIX_C_SOURCE=199309L -DNDEBUG -Os -g0 -s -o bin/uxn11 -lX11
2022-03-27 00:07:01 -04:00
```
## Terminal
2022-03-26 21:32:46 -04:00
If you wish to build the emulator without graphics mode:
```sh
cc src/devices/datetime.c src/devices/system.c src/devices/file.c src/uxn.c -DNDEBUG -Os -g0 -s src/uxncli.c -o bin/uxncli
```
2022-03-27 11:46:50 -04:00
## Devices
- `00` system
- `10` console(partial)
2022-03-28 12:51:38 -04:00
- `20` screen
2022-03-27 11:46:50 -04:00
- `30` audio(missing)
- `70` midi(missing)
2022-03-28 12:39:05 -04:00
- `80` controller
2022-03-28 12:51:38 -04:00
- `90` mouse(partial)
- `a0` file
2022-03-27 11:46:50 -04:00
- `c0` datetime
2022-03-26 20:23:52 -04: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 ).