1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-05-05 16:43:24 -07:00
mm/asm/mm-bq

30 lines
693 B
Bash
Executable File

#!/usr/bin/env bash
set -e
sha1=d6133ace5afaa0882cf214cf88daba39e266c078
rom=../../roms/everything/"Legend of Zelda, The - Majora's Mask (U) [!].z64"
out=mm-bq.z64
. common.sh
code="0031 V00B3C000"
extra="1552 V02EE7040"
unc "$code"
dd if=/dev/zero of=extra bs=370688 count=1 2>/dev/null
luajit patch.lua -e build/labels.lua -b 0x80780000 "$@" extra.asm extra
luajit patch.lua -i build/labels.lua "$@" code.asm build/patchme/"$code"
# ensure the file is the proper size (Lua seems to expand it?)
dd if=extra of=build/patchme/"$extra" bs=370688 count=1 2>/dev/null
rm extra
if [ $fast -ne 2 ]; then
comp "$code"
comp "$extra"
dump "$patchme"
copy_rom "build/$out" 32
fi