4

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.

Raffzahn
  • 222,541
  • 22
  • 631
  • 918
zomega
  • 5,362
  • 4
  • 25
  • 52
  • 6
    I wouldn't be surprised if the ROM is built into the CPU as mask ROM, not flash. Nintendo did not need to write to it; they could have the chip manufactured with the code already there. Nothing Nintendo made had firmware updates (other than by replacing the whole system) before the Wii or DSi. – Hearth Sep 04 '22 at 16:45
  • See also: https://www.reddit.com/r/Gameboy/comments/2zmopt/reflashing_gba_bios/ – GrapefruitIsAwesome Sep 04 '22 at 17:19
  • @Hearth The DS had rewritable firmware, sort of. Not sure how it works exactly but it's how it saves the profile information (name, birthday, favourite color) and you can flash custom firmware by bridging two contacts on the PCB. https://wiki.gbatemp.net/wiki/FlashMe – Meatwad Sep 18 '22 at 07:53

1 Answers1

9

Writing to ROMs of shipping hardware (as opposed to dev boards/and cartridges) is not possible. Mask ROMs are ROM chips that are one-time (factory) programmable and that are not Flash storage.

If any game was able to write to the system ROM, then you’d easily end up with bricked consoles, because a buggy game could errorneously write something to that memory (eg. when trying to write to a null pointer, or address 0).

The AGB Programming Manual doesn’t have details about how the System ROM is made, but it mentions cartridges consist of Mask ROMs, so it’s reasonable to assume the system ROM is also produced this way.

Chris Warrick
  • 205
  • 1
  • 4
  • I’ve never heard of a Mask ROM. Back in the day, a plain old ROM was just that: read-only memory. (One-time) Programable ROMs were called PROMs, Erasable PROMs were EPROMs, and Electrically Erasable PROMs were EEPROMs. And none of it was NAND Flash RAM. – RonJohn Sep 05 '22 at 04:05
  • 2
    And a short time after "Back in the day", when IBM PC BIOS'ses were in PROMs or EPROMs, people still said things like "The BIOS can't be changed, it's in ROM". So inventing a term for "ROM that's not PROM or EPROM" kind of makes sense, doesn't it? – Guntram Blohm Sep 05 '22 at 05:04
  • 6
    @RonJohn: Mask ROM is a technology (ROM "hardcoded" in an IC). There are/were other technologies for ROM (e.g. core rope memory, diode matrices, prob many others). – Mat Sep 05 '22 at 08:36
  • 3
    A 'Mask' ROM is a ROM that was created by the chip manufacturer in a similar way to a microprocessor. Basically, the transistors were 'fused' into the positions required to make it so that whatever patterns applied to the address bus, meant that the data bus output the correct pattern. They were VERY expensive and generally required orders of tens or hundreds of thousands, to be economically viable. Later mask roms were EPROMS with a different case, without the glass panel (which was used to erase them via ultraviolet light). – Neil Sep 05 '22 at 12:21
  • @Neil So Mask ROM is made out of the same components as logical gates? Is that right? – zomega Sep 05 '22 at 13:42
  • 40+ years ago, yes. Whether that was still the case in the GBA, era I have no idea. – Neil Sep 05 '22 at 14:26
  • @somega Yes, it's just a big array of logic gates, and you either put a gate there or don't, to encode a 1 or a 0. "Mask" refers to the masks used to make the patterns of transistors on computer chips. – user253751 Sep 05 '22 at 15:05
  • @Neil no one (except maybe IC designer) in 1982 would have called a Mask ROM anything but a ROM chip. If you could program it outside of the factory, it was a PROM or EPROM or EEPROM. – RonJohn Sep 06 '22 at 01:43
  • However, as far as I can remember, the Nintendo DS still uses mask roms for its cartridges, and I know you can reflash its firmware by bridging two contacts through a hole in the battery compartment, so it's not that clear-cut. (Source: I did it to get rid of that annoying health and safety warning since they didn't provide a "Yeah, I got it. Don't show again." option.) – ssokolow Sep 06 '22 at 09:57
  • "inventing a term for "ROM that's not PROM or EPROM" kind of makes sense, doesn't it?" Not really? The term is just... ROM. If anything, PROM and EPROM are the weird terms, because they imply writing (in a different sense) to something which is not supposed to be writable. – Karl Knechtel Sep 07 '22 at 00:58