1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-05-18 13:23:23 -07:00
mm/asm/mm-bq

30 lines
693 B
Plaintext
Raw Permalink Normal View History

2016-04-02 02:06:46 -07:00
#!/usr/bin/env bash
set -e
sha1=d6133ace5afaa0882cf214cf88daba39e266c078
rom=../../roms/everything/"Legend of Zelda, The - Majora's Mask (U) [!].z64"
2016-04-15 11:43:38 -07:00
out=mm-bq.z64
2016-04-02 05:58:46 -07:00
. common.sh
2016-04-02 02:06:46 -07:00
code="0031 V00B3C000"
2016-04-02 05:58:46 -07:00
extra="1552 V02EE7040"
2016-04-02 02:06:46 -07:00
2016-04-04 07:39:46 -07:00
unc "$code"
2016-04-02 02:06:46 -07:00
dd if=/dev/zero of=extra bs=370688 count=1 2>/dev/null
2016-04-02 05:58:46 -07:00
luajit patch.lua -e build/labels.lua -b 0x80780000 "$@" extra.asm extra
luajit patch.lua -i build/labels.lua "$@" code.asm build/patchme/"$code"
2016-04-04 07:39:46 -07:00
# 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
2016-04-04 07:39:46 -07:00
rm extra
2016-04-02 05:58:46 -07:00
if [ $fast -ne 2 ]; then
2016-04-04 07:39:46 -07:00
comp "$code"
comp "$extra"
dump "$patchme"
copy_rom "build/$out" 32
2016-04-02 05:58:46 -07:00
fi