mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-26 15:53:01 +00:00
Improved README
This commit is contained in:
parent
61b8750bae
commit
7598f40f30
2 changed files with 25 additions and 22 deletions
45
README.md
45
README.md
|
@ -6,13 +6,26 @@ An assembler and emulator for the [Uxn stack-machine](https://wiki.xxiivv.com/si
|
|||
|
||||
### Linux
|
||||
|
||||
To build the Uxn emulator, you must have [SDL2](https://wiki.libsdl.org/).
|
||||
To build the Uxn emulator, you must install [SDL2](https://wiki.libsdl.org/) for your distro. For example:
|
||||
|
||||
```sh
|
||||
sudo pacman -Sy sdl2 # Arch
|
||||
sudo apt install libsdl2-dev # Ubuntu
|
||||
```
|
||||
|
||||
Build the assembler and emulator by running the `build.sh` script. The assembler(`uxnasm`) and emulator(`uxnemu`) are created in the `/bin` folder.
|
||||
|
||||
```sh
|
||||
./build.sh
|
||||
--debug # Add debug flags to compiler
|
||||
```
|
||||
|
||||
If you only wish to simply build the `uxncli` cli tool:
|
||||
|
||||
```sh
|
||||
cc src/uxn.c -DNDEBUG -Os -g0 -s src/uxncli.c -o bin/uxncli
|
||||
```
|
||||
|
||||
### Plan 9
|
||||
|
||||
To build the Uxn emulator on [9front](http://9front.org/), via [npe](https://git.sr.ht/~ft/npe):
|
||||
|
@ -37,39 +50,29 @@ cd uxn
|
|||
|
||||
## Getting Started
|
||||
|
||||
Begin by building the assembler and emulator by running the build script. The assembler(`uxnasm`) and emulator(`uxnemu`) are created in the `/bin` folder.
|
||||
### Emulator
|
||||
|
||||
To launch a `.rom` in the emulator, point the emulator to the target rom file:
|
||||
|
||||
```sh
|
||||
bin/uxnemu bin/piano.rom
|
||||
```
|
||||
./build.sh
|
||||
```
|
||||
|
||||
You can also use the emulator without graphics by using `uxncli`. You can find additional roms [here](https://sr.ht/~rabbits/uxn/sources), you can find prebuilt rom files [here](https://itch.io/c/248074/uxn-roms).
|
||||
|
||||
### Assembler
|
||||
|
||||
The following command will create an Uxn-compatible rom from an [uxntal file](https://wiki.xxiivv.com/site/uxntal.html). Point the assembler to a .tal file in `/projects` to assemble a rom.
|
||||
The following command will create an Uxn-compatible rom from an [uxntal file](https://wiki.xxiivv.com/site/uxntal.html). Point the assembler to a `.tal` file, followed by and the rom name:
|
||||
|
||||
```
|
||||
```sh
|
||||
bin/uxnasm projects/examples/demos/life.tal bin/life.rom
|
||||
```
|
||||
|
||||
### Emulator
|
||||
|
||||
To start the rom, point the emulator to the newly created rom:
|
||||
|
||||
```
|
||||
bin/uxnemu bin/life.rom
|
||||
```
|
||||
|
||||
You can also use the emulator without graphics by using `uxncli`. You can find additional roms [here](https://sr.ht/~rabbits/uxn/sources). If you only wish to build `uxncli`
|
||||
|
||||
```
|
||||
cc src/uxn.c -DNDEBUG -Os -g0 -s src/uxncli.c -o bin/uxncli
|
||||
```
|
||||
|
||||
### I/O
|
||||
|
||||
You can send events from Uxn to another application, or another instance of uxn, with the Unix pipe. For a companion application that translates notes data into midi, see the [shim](https://git.sr.ht/~rabbits/shim).
|
||||
|
||||
```
|
||||
```sh
|
||||
uxnemu orca.rom | shim
|
||||
```
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ BRK
|
|||
[ #01 ] NEQk NIP ,&no-up JCN
|
||||
.selection LDZ STHk
|
||||
#00 ;draw-note JSR2
|
||||
[ STHkr GET-NOTE #01 ADD ] #00 STHkr ;melody ADD2 STA
|
||||
[ STHkr GET-NOTE INC ] #00 STHkr ;melody ADD2 STA
|
||||
STHr #01 ;draw-note JSR2
|
||||
#02 ;draw-selector JSR2
|
||||
&no-up
|
||||
|
|
Loading…
Reference in a new issue