d0k3 / GodMode9

GodMode9 Explorer - A full access file browser for the Nintendo 3DS console :godmode:
GNU General Public License v3.0
2.16k stars 194 forks source link

Correct installable address whitelist #816

Closed danny8376 closed 1 year ago

danny8376 commented 1 year ago

blacklist is stored at 0xb088 - 0xb0bf, which is ulong[14] in {start(inclusive), end(exclusive)} pair. one thing to note is that boot9 use inclusive comparing with blacklist start for both section load address and section load address + section size (comparing logic is at 0xa42e - 0xa449), so if the firm fits perfectly at the end of the space right before the blacklisted range, it'll also be rejected.

d0k3 commented 1 year ago

Can you give us some background information, maybe some reference for that change? Also, @Wolfvak - does this need to be fixed?

danny8376 commented 1 year ago

This is mainly by-product when I'm trying to make stupidly huge vram drive for use with ntrboot. I test it by installing firm directly as flashing ntrboot is relatively annoying. Then when i installed a firm that's supposed to exactly fully occupy arm9 memory, it triggered bootrom error for some reason. After digging into boot9, figured that it does not only blacklist vector table, but also blacklist the last 32KiB of arm9 memory (not sure what it's actually used for)

danny8376 commented 1 year ago

also, find out it's also documented in gbatek (well, kinda expected) https://problemkaputt.de/gbatek-3ds-files-firm-format.htm