From 70bf4cf84a5802a08f0ffa2c543c311727404a03 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 20 Oct 2012 06:50:03 +0200 Subject: fixed Summer; added JPv2; fixed NTSC/PALv2 --- tools/mapfile_tool.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'tools') 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) -- cgit v1.2.3