gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Edit ROM directly

#35392 - interdpth - Fri Feb 04, 2005 12:32 am

I was wonder if it is possible directly edit the ROM data inside a cart? Instead of Writing to SRAM and that

#35394 - tepples - Fri Feb 04, 2005 1:06 am

It's possible to rewrite the flash card from within a program running in EWRAM, as the multiboot clients do it. However, the register write sequence to do this varies from card model to card model, and not all manufacturers publish register-level specifications.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#35419 - Vince - Fri Feb 04, 2005 2:07 pm

Hello,

Quote:
... not all manufacturers publish register-level specifications

Are there any out there that do? I don't think so. All info around here about such things come from disassembling the multiboot clients.

Maybe the F2A info comes from old specs that may have been released by Visoly (but I'm not sure).

Vince
_________________
Reclaim control of your F2A/F2AU with if2a !!

#35440 - interdpth - Fri Feb 04, 2005 6:40 pm

No no that's not what I mean here's what i mean is it possible for a ROM on a cart I made myself be able to edit and save changes to itself? So I wouldn't have to waste SRAM

#35442 - ScottLininger - Fri Feb 04, 2005 6:49 pm

interdpth wrote:
No no that's not what I mean here's what i mean is it possible for a ROM on a cart I made myself be able to edit and save changes to itself? So I wouldn't have to waste SRAM


That's what they're saying... it's only possible if you can get your specific brand of flash cart to do it for you. There are not "standard" GBA registers to write to ROM since the GB assumes its, well, ROM (read only memory).

If you post the exact brand and model of your flash cart, it's possible that someone can point you at code to modify the ROM at runtime. But this code will NOT work on any other brand of flash cart. Maybe that's cool with you if you're just building something for your own use.

Writing to SRAM is easy and supported by most flash carts. If you're out of SRAM space, you might want to do some compression of the data. That's probably a less difficult solution.

Alternatively, if you post what you're trying to accomplish, then there might be some other suggestions for how to do it.

Cheers,

-Scott