The GBA has the "AGB CPU". Inside there Is an ARM7TDMI and to the memory interface there is a flash storage connected. All on one chip. The flash storage contains software similar to a PC's BIOS. It's called ROM but I think it must be updatable like any flash storage. The ROM is mapped to address 0. I could buy an empty cartridge and run a software which simply writes to address 0. But I don't know if this will work or if the processor will raise an exception. There is a second cpu on board (for classic games). Maybe this CPU let's me write to address 0 without raising an exception.
Any ideas? Also Nintendo must have had a way to write to the ROM.