AetiasHax / ds-rom

Library/CLI for extracting and building DS ROMs
6 stars 0 forks source link

Improve compatibility for build info, DTCM and ROM padding #4

Closed AetiasHax closed 2 weeks ago

AetiasHax commented 2 weeks ago

As mentioned in #3, some games use the DTCM base address 027c0000 instead of the more common 027e0000. This is fixed now, but I decided it was a good idea to look through other games I own to find other minor fixable issues.

I found that some ROMs don't provide a build info offset in the header, but do so in the ARM9 footer. This has been fixed by checking in both places.

Then there were a couple instances of games where the padding was 0x00 instead of the typical 0xff. I decided to get this value by looking at the padding after the banner. There will always be padding there because the banner's size is never a multiple of 512 so it can't end precisely where a new section starts.

(Maybe the padding is forced even if a section is exactly a multiple of 512 bytes long, but I have no example of this so I don't want take a risk here :p)