diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 67 |
1 files changed, 53 insertions, 14 deletions
@@ -9,22 +9,20 @@ screen or console devices, including the beautiful DVD bouncing. | |||
9 | ## Building from source | 9 | ## Building from source |
10 | 10 | ||
11 | To build this software you need the [devkitPro][devkitpro] SDK. Once installed, | 11 | To build this software you need the [devkitPro][devkitpro] SDK. Once installed, |
12 | You may need to modify the Makefile to set up the path: | 12 | you may need to modify the Makefile to ensure the path is correct, but should |
13 | work with the default devikit installation methods on Linux and macOS. | ||
13 | 14 | ||
14 | ``` | 15 | ``` |
15 | DEVKITPRO := /opt/devkitpro | 16 | DEVKITPRO := /opt/devkitpro |
16 | DEVKITARM := /opt/devkitpro/devkitARM | 17 | DEVKITBIN := $(DEVKITPRO)/devkitARM/bin |
17 | PATH := $(DEVKITARM)/bin:$(PATH) | 18 | DEVKITTOOLS := $(DEVKITPRO)/tools/bin |
18 | LIBGBA_DIR := $(DEVKITPRO)/libgba | 19 | LIBGBA_DIR := $(DEVKITPRO)/libgba |
19 | LIBGBA_SRC := /opt/devkitpro/libgba/include/ | 20 | LIBGBA_SRC := $(DEVKITPRO)/libgba/include/ |
20 | LIBGBA := $(LIBGBA_DIR)/lib/libgba.a | 21 | LIBGBA := $(LIBGBA_DIR)/lib/libgba.a |
21 | LIBGBA += $(LIBGBA_DIR)/lib/libfat.a | 22 | LIBGBA += $(LIBGBA_DIR)/lib/libfat.a |
22 | LIBGBA += $(LIBGBA_DIR)/lib/libmm.a | 23 | LIBGBA += $(LIBGBA_DIR)/lib/libmm.a |
23 | ``` | 24 | ``` |
24 | 25 | ||
25 | An intermediate build step will create a `src/uxn/roms/boot.c` file, for which | ||
26 | you need the `bin2carr` utility that can be found [here][bin2carr]. | ||
27 | |||
28 | If everything is properly installed, you should be able to run `make` to compile | 26 | If everything is properly installed, you should be able to run `make` to compile |
29 | the program into a `uxngba.gba` rom. If you have `mgba-qt` installed, you can | 27 | the program into a `uxngba.gba` rom. If you have `mgba-qt` installed, you can |
30 | test it with: `make run`. | 28 | test it with: `make run`. |
@@ -33,8 +31,49 @@ To use a specific UXN compiled rom, you can pass it as the `ROM_SRC` make | |||
33 | parameter: | 31 | parameter: |
34 | 32 | ||
35 | ``` | 33 | ``` |
36 | make run ROM_SRC=src/uxn/roms/piano.rom | 34 | make run ROM_SRC=roms/noodle.rom |
37 | ``` | 35 | ``` |
38 | 36 | ||
37 | If you have compiled a rom already and want to change it, you probably want to | ||
38 | use `make clean` beforehand. | ||
39 | |||
39 | [devkitpro]: https://devkitpro.org/ | 40 | [devkitpro]: https://devkitpro.org/ |
40 | [bin2carr]: https://git.badd10de.dev/gba-dev-tools/ | 41 | |
42 | ## Configuration | ||
43 | |||
44 | The output .gba files will embed the rom used for installation. Different roms | ||
45 | have different needs, such as the usage of different input methods or the | ||
46 | desired audio quality. These options can be selected by defining the right | ||
47 | macros on compile time as described below. | ||
48 | |||
49 | ### Input method order | ||
50 | |||
51 | Uxngba currently supports three different control schemes that can be cycled by | ||
52 | pressing the SELECT button: `CONTROL_CONTROLLER`, `CONTROL_MOUSE` and | ||
53 | `CONTROL_KEYBOARD`. To select the order and available methods set the | ||
54 | `CONTROL_METHODS` macro on compile time. For example, [noodle][noodle] doesn't | ||
55 | make much use of the controller scheme, and we may want to use the mouse as the | ||
56 | default input method. This can be achieved with the following command: | ||
57 | |||
58 | ``` | ||
59 | make run ROM_SRC=roms/noodle.rom CONFIG="-DCONTROL_METHODS=CONTROL_MOUSE,CONTROL_KEYBOARD" | ||
60 | ``` | ||
61 | |||
62 | ### Audio quality | ||
63 | |||
64 | Audio processing can be computationally expensive and the GBA has limited | ||
65 | resources. uxngba supports 4 audio channel devices simultaneously, and depending | ||
66 | on the demands of the rest of the program, the audio quality can be increased or | ||
67 | decreased. By default, sounds will play on a 18157 Hz buffer, which offers | ||
68 | a good quality-performance compromise. A high quality and low-fi audio modes can | ||
69 | be selected by setting the `AUDIO_HIFI` or `AUDIO_LOFI` macros: | ||
70 | |||
71 | ``` | ||
72 | make run ROM_SRC=roms/audio.rom CONFIG="-DAUDIO_HIFI" | ||
73 | |||
74 | or | ||
75 | |||
76 | make run ROM_SRC=roms/audio.rom CONFIG="-DAUDIO_LOFI" | ||
77 | ``` | ||
78 | |||
79 | [noodle]: https://wiki.xxiivv.com/site/noodle.html | ||