Add scripts to generate IPS files and ROM map from patch ASM files#330
Add scripts to generate IPS files and ROM map from patch ASM files#330blkerby merged 3 commits intoblkerby:mainfrom
Conversation
Separate unsourced IPS patches Add generated markers for ROM map files. Consistify non-generated labels to use closed intervals
|
I think this looks fine to merge, just will let @jeboo and/or @nn357 take a look to confirm that the changes to the ROM map look fine. I agree it would seem better to include all the address intervals in the When I ran There is some functionality in the current
None of these create an issue with merging the PR since we can just continue primarily using |
|
On the other hand, I am remembering having problems in the past when I would only assemble a specific ASM file, because it's easy to modify another ASM file and forget to reassemble it. So assembling all of them is probably better/safer than just assembling a hand-picked one. I see that |
|
Had a quick look over the results (will try it out tomorrow). One thing I did notice is in the output of the bank logs. There's a couple of chunks of vanilla code in bank 91 that are replaced with code from split_speed / x_mode fix that are currently noted but don't seen to have been included in the updated bank logs. |
|
Thanks for the generous feedback. I'll resolve the CMake binary path issue in this PR, that's an unfortunate platform-dependent behaviour I didn't anticipate, but it seems resolvable. The proposed enhancements for The addresses for the replaced code in bank $91 are now in |
Patch builder now reports conflicts with the ROM map and supports some input/output control options `dump_rom_map.py` tweaked for use as a module by `build_patches.py`
|
CMake build should be working now, outputting to the location a single-config generator (like makefiles) would place it. There's no way to query the CMake binary output directory outside of a CMake script; I would either have to modify the asar CMake scripts to note down the directory somewhere or write a miniature CMake project in this repo that imports the asar one. Meh. Added a conflict detector for Added a command-line option to be able to assemble a single, selected ASM file as suggested. Added some other output control options whilst I was in the neighbourhood. Added the |
Added python scripts:
build_asar.py- runs the CMake commands to build asar from the submodulebuild_patches.py- runs the above built asar on all the ASM files inpatches/src/andMoasaic/Projects/Base/ASM/to generate IPS patches topatches.ips/dump_rom_map.py- aggregates modified address intervals from IPS patches and feeds them topatches/rom_map/Repointed
asarsubmodule to newly created fork. Fork has been updated to generate IPS patches (which bitwise match the ones currently checked in) and to report an error if areadNcommand is used.Moved some source unavailable IPS patches to
patches/ips/no source/directory.The ROM map files as currently checked in are mostly using half-open intervals and I've changed this to closed intervals just to make intervals ending with FFFF work; I hope no one particularly minds this.
dump_rom_map.pywill respect labels written without a leading semicolon (to support changes not originating directly from a patch).It does aggressively separate address intervals in vanilla free space (to
Bank N.txt) from intervals overwriting vanilla (tovanilla_hooks.txt). Thoughts on this are welcome, I'm not entirely sure I see the value of this separation.