It should theoretically be possible to trim CARD2 games more efficiently, right?
The way I do it now is play the game for a while on an untrimmed CARD2 game. I then export/backup the save from the ROM, trim the ROM, and then import/inject the save back into the ROM.
This will create a trimmed CARD2 ROM with a working save.
However, when I inspect the ROM, I notice that it actually has a lot of 'empty data'. Take the European Pokémon Alpha Sapphire for example:
From 0x4000 to 0x70AD5FFF is the game itself
From 0x70AD6000 to 0x712BAFFF is the manual
From 0x712BB000 to 0x7316FFFF is the update data.
Now, everything so far is very snug together, as it should be. This creates the smallest possible ROM. However, when you import/inject your save into the ROM, it gets injected at 0x77280000, because that is the offset that is set for the game.
This means that there is a whole lot of nothing between 0x73170000 and 0x7727FFFF. That is 65 MB of empty data. If I had gotten rid of the update data and the manual as well, that would've been 104 MB of empty data. That is a lot!
So of course my question is... This can be done much more efficiently, right? There should be a way to change that offset for the save to be as snug to the ROM data as possible.
And perhaps it's also possible to trim a CARD2 ROM without the contrived method of first playing it, then exporting the save, trimming the ROM, then injecting the save again?
The way I do it now is play the game for a while on an untrimmed CARD2 game. I then export/backup the save from the ROM, trim the ROM, and then import/inject the save back into the ROM.
This will create a trimmed CARD2 ROM with a working save.
However, when I inspect the ROM, I notice that it actually has a lot of 'empty data'. Take the European Pokémon Alpha Sapphire for example:
From 0x4000 to 0x70AD5FFF is the game itself
From 0x70AD6000 to 0x712BAFFF is the manual
From 0x712BB000 to 0x7316FFFF is the update data.
Now, everything so far is very snug together, as it should be. This creates the smallest possible ROM. However, when you import/inject your save into the ROM, it gets injected at 0x77280000, because that is the offset that is set for the game.
This means that there is a whole lot of nothing between 0x73170000 and 0x7727FFFF. That is 65 MB of empty data. If I had gotten rid of the update data and the manual as well, that would've been 104 MB of empty data. That is a lot!
So of course my question is... This can be done much more efficiently, right? There should be a way to change that offset for the save to be as snug to the ROM data as possible.
And perhaps it's also possible to trim a CARD2 ROM without the contrived method of first playing it, then exporting the save, trimming the ROM, then injecting the save again?