Exclude baseroms as dependencies in scaninc

This commit is contained in:
octorock 2021-06-22 12:34:17 +02:00
parent cc4c42c54e
commit 78f88ccee2
3 changed files with 24 additions and 1 deletions

View File

@ -1,5 +1,17 @@
# Install
First, you must put a The Legend of Zelda: The Minish Cap (U) ROM (with SHA1: `b4bd50e4131b027c334547b4524e2dbbd4227130`) in the root directory of the repository and name it `baserom.gba`.
## Building other variants
To build other variants, you currently need a combination of different baseroms, depending on the variant.
| | USA | DEMO | JP | EU |
| - | :-: | :-: | :-: | :-: |
| baserom.gba | X | X | X | X |
| baserom_demo.gba | | X | | |
| baserom_jp.gba | | | X | X |
| baserom_eu.gba | | | | X |
## Prerequisites
| Linux | macOS | Windows 10 (build 18917+) | Windows 10 (1709+) | Windows 8, 8.1, and 10 (1507, 1511, 1607, 1703)

View File

@ -636,7 +636,11 @@ gUnk_08126798:: @ 08126798
.incbin "baserom.gba", 0x126B60, 0x000001C
.endif
.4byte gUnk_08125F10
.ifdef EU
.incbin "baserom_eu.gba", 0x1262B8, 0x0000004
.else
.incbin "baserom.gba", 0x126B80, 0x0000004
.endif
.4byte gUnk_08125F38
.incbin "baserom.gba", 0x126B88, 0x000000C
.4byte gUnk_08125F48
@ -701,7 +705,11 @@ gUnk_08126798:: @ 08126798
.incbin "baserom.gba", 0x126CC0, 0x000001C
.endif
.4byte gUnk_081263E8
.ifdef EU
.incbin "baserom_eu.gba", 0x126418, 0x0000004
.else
.incbin "baserom.gba", 0x126CE0, 0x0000004
.endif
.4byte gUnk_081262B8
.incbin "baserom.gba", 0x126CE8, 0x0000004
.4byte gUnk_081262D0

View File

@ -93,7 +93,10 @@ int main(int argc, char **argv)
includeDirs.push_back(file.GetSrcDir());
for (auto incbin : file.GetIncbins())
{
dependencies.insert(incbin);
// Don't include incbins starting with baserom, as they might not be necessary if another variant is being built.
if (incbin.rfind("baserom", 0) != 0) {
dependencies.insert(incbin);
}
}
for (auto include : file.GetIncludes())
{