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.

DS development > Writing to type 4 DS cards

#127970 - Venomfire - Mon May 07, 2007 1:40 am

I've been working on a program that requires it to write to the eeprom or flash rom on a DS card. I found the cardme library and have had success with it on each DS game card I've tried EXCEPT for when I try to write to my Pokemon Pearl save.

I looked up the card type and it appears to be a 4Mbit (512kb) flash rom. Also some page cited it as being a "type 4" card.

I've spent hours trying everything I can think of. Someone please give me some direction.

#128042 - tondopie - Tue May 08, 2007 12:17 am

I'm pretty sure it's type 3 actually...
_________________
Development Blog: http://teendev.org
Homebrew Podcast: http://homebrewcast.net
Web Design: http://xtendesign.net

#128046 - Abcd1234 - Tue May 08, 2007 1:31 am

Try this patch to libnds that josath pointed me at, which adds support for more EEPROM types:

http://h.davr.org/eeprom.patch

I've applied this to libnds-20070503, and it purports to support 4MB and 8MB EEPROM types.

BTW, please let me know if it works... I built savsender with this, hoping I would get addition EEPROM support in the process. :)

#128361 - Gunnex - Fri May 11, 2007 12:08 am

tondopie wrote:
I'm pretty sure it's type 3 actually...


Type 3 is 256KB, not 512KB.

#128375 - tondopie - Fri May 11, 2007 1:45 am

my bad...
_________________
Development Blog: http://teendev.org
Homebrew Podcast: http://homebrewcast.net
Web Design: http://xtendesign.net

#128775 - Venomfire - Tue May 15, 2007 4:15 am

I don't know... The code from the patch looks more modern, but it still isn't working properly.

I'm thinking maybe it's my method. This is the general process I've been using:

Erase chip
Copy SRAM to RAM buffer
Write buffer to DS flash

This is right, isn't it?

#128777 - tepples - Tue May 15, 2007 4:32 am

Copy from what SRAM to DS main RAM?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#128779 - Venomfire - Tue May 15, 2007 5:08 am

I'm not sure how the compiler works it. I make a "u8 *buffer[]" and use that.