pack
Serialises the (possibly modified) ROM back to a byte array.
Layout:
0x000 header (512 B)
0x200 pre-ARM9 region (secure area — preserved verbatim)
… ARM9 (at original arm9Off, same as original ROM)
… ARM7
… FNT
… FAT (rebuilt with new file offsets)
… ARM9 overlay table
… ARM7 overlay table
… banner
… file data (in file-ID order, each 4-byte aligned)Content copied to clipboard
All header offset and size fields are recalculated; the header CRC-16 is recomputed.
Return
The complete ROM image as a byte array, ready to be written to disk.