aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 975201c90403214c94070af28df913541eb2e098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# UXNGBA

This is a port of the [UXN virtual machine][uxn] for the GBA. It is currently at
an early stage, but is capable of running simple demos that make use of the
screen or console devices, including the beautiful DVD bouncing.

[uxn]: https://wiki.xxiivv.com/site/uxn.html

## Building from source

To build this software you need the [devkitPro][devkitpro] SDK. Once installed,
You may need to modify the Makefile to set up the path:

```
DEVKITPRO  := /opt/devkitpro
DEVKITARM  := /opt/devkitpro/devkitARM
PATH       := $(DEVKITARM)/bin:$(PATH)
LIBGBA_DIR := $(DEVKITPRO)/libgba
LIBGBA_SRC := /opt/devkitpro/libgba/include/
LIBGBA     := $(LIBGBA_DIR)/lib/libgba.a
LIBGBA     += $(LIBGBA_DIR)/lib/libfat.a
LIBGBA     += $(LIBGBA_DIR)/lib/libmm.a
```

An intermediate build step will create a `src/uxn/roms/boot.c` file, for which
you need the `bin2carr` utility that can be found [here][bin2carr].

If everything is properly installed, you should be able to run `make` to compile
the program into a `uxngba.gba` rom. If you have `mgba-qt` installed, you can
test it with: `make run`.

To use a specific UXN compiled rom, you can pass it as the `ROM_SRC` make
parameter:

```
make run ROM_SRC=src/uxn/roms/piano.rom
```

[devkitpro]: https://devkitpro.org/
[bin2carr]: https://git.badd10de.dev/gba-dev-tools/