1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-14 14:49:03 -08:00
mm/asm/mm-bq

31 lines
705 B
Text
Raw Normal View History

2016-04-02 02:06:46 -07:00
#!/usr/bin/env bash
set -e
sha1=d6133ace5afaa0882cf214cf88daba39e266c078
#extracted=../dump/mm-US10-"$sha1"
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 labels.lua -b 0x80780000 "$@" extra.asm extra
2016-04-21 13:04:59 -07:00
luajit patch.lua -i labels.lua "$@" code.asm patchme/"$code"
2016-04-04 07:39:46 -07:00
# ensure the file is the proper size (Lua seems to expand it?)
2016-04-04 07:39:46 -07:00
dd if=extra of=patchme/"$extra" bs=370688 count=1 2>/dev/null
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"
2016-10-02 20:02:44 -07:00
dump asm/build/patchme
copy_rom "$out" 32
2016-04-02 05:58:46 -07:00
fi