26 lines
1.2 KiB
Markdown
26 lines
1.2 KiB
Markdown
|
build with libdragon unstable. https://libdragon.dev/
|
||
|
|
||
|
requires real hardware or ares-emu to run. https://ares-emu.net/
|
||
|
|
||
|
because the n64's cpu needs *ten instructions* to byte-swap a word (and eight
|
||
|
to byte-swap a half-word), we just leave memory in word-wise big-endian and
|
||
|
simply invert the lower bits of addresses whenever we access bytes or halfwords
|
||
|
at runtime (just one XOR instruction, and no need to touch word accesses -
|
||
|
the most common by a landslide - at all!)
|
||
|
|
||
|
for this scheme to work, the ROM must also already be in word-wise big-endian,
|
||
|
which you can achieve with binutils like so:
|
||
|
|
||
|
```
|
||
|
objcopy -I binary -O binary --reverse-bytes=4 .../game.gba .../gpsp/libdragon/filesystem/rom.gba
|
||
|
```
|
||
|
|
||
|
dynarec doesn't quite work yet - crashes for reasons i don't yet understand!
|
||
|
to attempt to use it and/or debug, change the variables in the Makefile.
|
||
|
(hint: there's also a make target `debug` that works if you have ares and
|
||
|
multiarch gdb, but it doesn't change the build flags - that still needs to be
|
||
|
done by hand in the Makefile)
|
||
|
|
||
|
ppu emulation is still done in software on the main cpu - i am hoping to make
|
||
|
a renderer that utilizes the RCP, but that may take some time to implement.
|