summaryrefslogtreecommitdiff
path: root/tools/mapfile_tool.py
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-10-20 06:50:03 +0200
committerTreeki <treeki@gmail.com>2012-10-20 06:51:00 +0200
commit70bf4cf84a5802a08f0ffa2c543c311727404a03 (patch)
tree17a4c49e73ad33d27508ec992d8e0a3a7a8ed147 /tools/mapfile_tool.py
parent879536caa4f2cec3d1c175a55a0980877df35fb3 (diff)
downloadkamek-70bf4cf84a5802a08f0ffa2c543c311727404a03.tar.gz
kamek-70bf4cf84a5802a08f0ffa2c543c311727404a03.zip
fixed Summer; added JPv2; fixed NTSC/PALv2
Diffstat (limited to 'tools/mapfile_tool.py')
-rwxr-xr-xtools/mapfile_tool.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/tools/mapfile_tool.py b/tools/mapfile_tool.py
index 41eff5a..cab9ec2 100755
--- a/tools/mapfile_tool.py
+++ b/tools/mapfile_tool.py
@@ -9,6 +9,9 @@ def make_hex_offset(offs):
return '0x%08X' % offs
def fix_offs_pal_v2(offs):
+ if offs >= 0x800CF6E8 and offs <= 0x800CF90F:
+ return offs + 8
+
if offs >= 0x807685A0 and offs <= 0x807AAA70:
return offs + 0x40
@@ -81,6 +84,9 @@ def fix_offs_ntsc_v1(offs):
def fix_offs_ntsc_v2(offs):
offs = fix_offs_ntsc_v1(offs)
+ if offs >= 0x800CF5F8 and offs <= 0x800CF81F:
+ return offs + 8
+
if offs >= 0x807685A0 and offs <= 0x807AAA70:
return offs + 0x40
@@ -196,6 +202,24 @@ def fix_offs_jpn_v1(offs):
return offs
+def fix_offs_jpn_v2(offs):
+ offs = fix_offs_jpn_v1(offs)
+
+ if offs >= 0x800CF578 and offs <= 0x800CF79F:
+ return offs + 8
+
+ if offs >= 0x807685A0 and offs <= 0x807AA7FF:
+ return offs + 0x40
+
+ if offs >= 0x807AA800 and offs <= 0x809900FF:
+ return offs + 0x10
+
+ if offs >= 0x80990100:
+ return offs + 0x20
+
+ return offs
+
+
import yaml
original = 'pal'
@@ -203,7 +227,8 @@ fix_for = {
'pal2': fix_offs_pal_v2,
'ntsc': fix_offs_ntsc_v1,
'ntsc2': fix_offs_ntsc_v2,
- 'jpn': fix_offs_jpn_v1
+ 'jpn': fix_offs_jpn_v1,
+ 'jpn2': fix_offs_jpn_v2
}
def do_mapfile(src, dest, fix_offset):
@@ -287,6 +312,7 @@ def main():
do_mapfile('kamek_pal.x', 'kamek_ntsc.x', fix_offs_ntsc_v1)
do_mapfile('kamek_pal.x', 'kamek_ntsc2.x', fix_offs_ntsc_v2)
do_mapfile('kamek_pal.x', 'kamek_jpn.x', fix_offs_jpn_v1)
+ do_mapfile('kamek_pal.x', 'kamek_jpn2.x', fix_offs_jpn_v2)
already_done = set()
do_project('NewerProject.yaml', already_done)