#52877 - Sephiroth87 - Sun Sep 04, 2005 11:42 am
hi there...
i need to add a save features ot my prog, and i wanted to know the address where to put save data...
#52878 - chishm - Sun Sep 04, 2005 11:47 am
The address is 0x0A000000 on the NDS. Make sure you check that there is a compatible cartridge in the slot by checking for a PASS maker name in the header. You may also need to set the cartridge access control register:
For ARM7:
For ARM9:
#52928 - Sephiroth87 - Sun Sep 04, 2005 7:22 pm
mhm, that's a little different from gba thingy i was used to use xD
so, i've first to set up the 2 register, one in the arm7 main and the other in arm9 main...
then, how to control the pass maker?
and next, i'll write to 0x0A000000...
(oh, i meant, save to a gba flash card, is this right?)
#52948 - chishm - Sun Sep 04, 2005 10:34 pm
You only have to set up the register on the CPU that is going to access the GBA slot. If you want to use it on the ARM7, don't do anything. If you want to do it on the ARM9, use WAIT_CR &= ~0x8080.
After that it is pretty much the same as the GBA, except using 0x0A000000 instead of 0x0E000000.
#52953 - Sephiroth87 - Sun Sep 04, 2005 11:43 pm
ok, perfect...
thanks a lot ;)
ps: there's only the pass marker question, but it's not too important, however if smbdy can explain :P
#52958 - doublec - Mon Sep 05, 2005 1:01 am
I have a tutorial on how to write Save data to the SRAM area if interested:
http://www.double.co.nz/nintendo_ds/nds_develop5.html
#52987 - Sephiroth87 - Mon Sep 05, 2005 9:49 am
tnx very much :)
edit: but, if the cart is not a flash one, but commercial, it's still possible to write to sram area?
#53019 - tepples - Mon Sep 05, 2005 3:13 pm
Commercial Nintendo DS games do not have SRAM.
If you are looking to use what the PocketNES developers call "SRAM Cannibalism" on a commercial GBA Game Pak, then the procedure is the same, except only 32 KB are available. A write to the second half of SRAM on a commercial cart will overwrite the first half.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#53023 - Sephiroth87 - Mon Sep 05, 2005 3:43 pm
yeah, i'm trying to write data to a commercial gba cartridge, but it doesn't seem to works...
#53027 - tepples - Mon Sep 05, 2005 3:51 pm
Not all commercial GBA Game Paks have SRAM. Some have EEPROM. Some have flash. Some have no save at all. Which Game Pak are you using?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#53036 - Sephiroth87 - Mon Sep 05, 2005 6:28 pm
the idea was to create an app that would write saves to an original gamecard... so, not always the same type of saver...
but maybye in the header there's some info on the type of saver...
#53075 - tepples - Mon Sep 05, 2005 10:14 pm
If you scan through ROM space and find one of the common save type ID strings, such as "SRAM_V112", you can assume that the inserted GBA Game Pak has that type of save hardware.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#53077 - Sephiroth87 - Mon Sep 05, 2005 10:25 pm
and how i'll to write in other case of save except from sram?