mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-26 22:40:33 +00:00
859230a25d
This adds some new Makefile commands: build_saturn_toolchain: Downloads GCCSH, and builds two docker containers. One container is binutils for SuperH, and the other has Dosemu. build_saturn: Copies GCCSH, the source code, and asm into the build directory and runs the GCCSH via Dosemu in the docker container. Everything is kept in the same directory since it's hard to use Dosemu otherwise. check_saturn: Dumps the object files to binary using the binutils Docker container, then checks the hashes. diff_saturn: Compares the binaries and outputs a diff to build/saturn/$FILENAME-diff.txt. Used like FILENAME=GAME.PRG make diff_saturn. I've added the source for game.c and t_bat.c. I've replaced one of the asm functions in t_bat.c to show that it's possible to match simple functions. I'm not able to generate linker scripts yet so functions that rely on symbols from other overlays generally can't be matched yet. This workflow is not all that clean so I'm open to ideas on improving it. I tried using various versions of https://github.com/decompals/old-gcc to try to get a native compiler but couldn't get a matching build. I'm not 100% sure that this version of GCCSH is correct but initial results seem promising. As of right now, it's not possible to run this in CI since the dosemu container changes the USER and Github won't let you write to disk if you do that. https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
36 lines
566 B
Plaintext
36 lines
566 B
Plaintext
main.exe
|
|
DRA.BIN
|
|
BIN/ARC_F.BIN
|
|
BIN/RIC.BIN
|
|
ST/
|
|
|
|
ctx.c
|
|
ctx.c.m2c
|
|
*.ld
|
|
*auto.*.txt
|
|
generated.symbols.*.txt
|
|
__pycache__
|
|
|
|
asm/*/*/*.s
|
|
asm/*/*/data/*.s
|
|
asm/*/*/nonmatchings/*.s
|
|
asm/*/*/nonmatchings/*/*.s
|
|
asm/*/*/nonmatchings/*/*/*.s
|
|
asm/*/servant/*/data/*.s
|
|
asm/*/servant/*/nonmatchings/*.s
|
|
asm/*/servant/*/nonmatchings/*/*.s
|
|
asm/*/servant/*/nonmatchings/*/*/*.s
|
|
asm/*/st/*/data/*.s
|
|
asm/*/st/*/nonmatchings/*.s
|
|
asm/*/st/*/nonmatchings/*/*.s
|
|
asm/*/st/*/nonmatchings/*/*/*.s
|
|
assets/
|
|
bin/
|
|
build/
|
|
expected/
|
|
disks/
|
|
|
|
.vscode/settings.json
|
|
tools/go
|
|
tools/saturn_toolchain/GCCSH
|