diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-01-07 15:13:24 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-01-07 15:13:24 -0600 |
commit | ff60685f4e08699ba9655bbdd9773b6f4a8d9140 (patch) | |
tree | 6a95c2ba97c86b745b3ac8ae81a0ad7daa843fee /extras/analyze_incbins.py | |
parent | 20c54ccd583d2f847e6f264d7ced057f652dd095 (diff) |
text analysis and insertion code (TX_FAR targets only)
hg-commit-id: e4c007ad1c11
Diffstat (limited to 'extras/analyze_incbins.py')
-rw-r--r-- | extras/analyze_incbins.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/extras/analyze_incbins.py b/extras/analyze_incbins.py index 7c7c93dd..4bc82c63 100644 --- a/extras/analyze_incbins.py +++ b/extras/analyze_incbins.py @@ -204,6 +204,32 @@ def dump_all_remaining_maps(): print "Inserting map id=" + str(map_id) wrapper_insert_map_header_asm(map_id) +def reset_incbins(): + "reset asm before inserting another diff" + asm = None + incbin_lines = [] + processed_incbins = {} + load_asm() + isolate_incbins() + process_incbins() + +def apply_diff(diff): + print "... Applying diff." + + #write the diff to a file + fh = open("temp.patch", "w") + fh.write(diff) + fh.close() + + #apply the patch + os.system("patch ../pokered.asm temp.patch") + + #remove the patch + os.system("rm temp.patch") + + #confirm it's working + subprocess.check_call("cd ../; make clean; LC_CTYPE=UTF-8 make", shell=True) + if __name__ == "__main__": #load map headers load_rom() |