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 Flash Equipment > cardme?

#136027 - spinal_cord - Sat Jul 28, 2007 5:00 pm

I've had a little look at cardme for saveing/loading from eeprom/flash, but I can seem to get it to work properly, am I doing something wrong?
Code:

   int cardtype=cardmeGetType();
   u32 address=0;
   u8 data=255;
   u32 length=1;
   cardmeWriteEeprom(address, &data, length, cardtype);

   cardmeReadEeprom(address, &data, length, cardtype);
   PA_OutputText(0,1,2,"Return %d",data);


I'm trying to save '255' but it seems to be loading back '0'.
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage

#136031 - tepples - Sat Jul 28, 2007 5:50 pm

Which Game Card are you using, and which cardtype does it return? And have you tried it with blocks bigger than 1 byte?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#136047 - spinal_cord - Sat Jul 28, 2007 7:42 pm

I'm testing on the Neo R6 also the mk5 key (passme with 2mbit save) both are type 3, I haven't tried with other cards.
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage

#136056 - tepples - Sat Jul 28, 2007 8:03 pm

Type 3 saves (256 KiB flash) need to be written in blocks much bigger than 1 byte. They also need to be erased (using cardmeChipErase()) before writing. RAC is a working example of loading and saving on type 3.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#136078 - spinal_cord - Sat Jul 28, 2007 10:15 pm

what about the other types? is there somewhere to find out this information, or do I need it to trickle from the minds of those who know?
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage

#136079 - tepples - Sat Jul 28, 2007 10:17 pm

spinal_cord wrote:
what about the other types? is there somewhere to find out this information

GBATEK: DS Cartridge Backup
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.