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 > REIN Remake?

#123227 - Wuschmaster - Mon Mar 26, 2007 9:09 am

Since REIN was discontinued and the latest version is not compatible with newer flash carts, would anyone be able to "remake" it?

I think the source code was not released, I'm not sure, though.

Edit: It *was* released. Here it is:
Version 17a Beta: http://uploaded.to/?id=nfa4es
Version 17: http://uploaded.to/?id=6g1ftz


Would anyone make a DLDI version of it? (Maybe with cart swapping for Slot-1 ones?)

#123236 - Diddl - Mon Mar 26, 2007 11:42 am

it would be no big problem. but a DLDI version makes no sense. if I want to backup/restore savegames of slot 1 cartridges I want to use a slot 2 flash cartridge. and all slot 2 cartridges are supported, also why DLDI?

#123240 - Wuschmaster - Mon Mar 26, 2007 12:52 pm

Because it's so hard to find a REIN-compatible Slot-2 device!! I think GBAMPs need to be flashed to work, M3s cost like $100 and SuperCard bricked my friend's DS (doesn't turn on anymore and when trying to charge it, the orange light just goes off after a second or less), so I don't trust SuperCard at all.

Slot-1 would work fine with card-swapping, just like the savetool "MP_Save.gba" does for GBA games.

#123243 - tepples - Mon Mar 26, 2007 1:20 pm

Wuschmaster wrote:
Slot-1 would work fine with card-swapping, just like the savetool "MP_Save.gba" does for GBA games.

No it doesn't. It has been reported that some SLOT-1 cards either reset the DS when reinserted or need to be put in a special state before they can access the FAT.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#123247 - Diddl - Mon Mar 26, 2007 3:05 pm

it would be nice to have a lib to read and write savegame area of slot 1 cards. this lib together with ChisHm's libfat would make it very easy to make a new REIN version.

but it makes only sense on a slot 2 device.

#123256 - josath - Mon Mar 26, 2007 5:13 pm

There is a 'lib' of sorts, just use the cardme.cpp and cardme.h from REIN. It's pretty self-contained.
Code:

void cardmeReadEeprom(u32 address, u8 *data, u32 length, u32 addrtype);
void cardmeWriteEeprom(u32 address, u8 *data, u32 length, u32 addrtype);
int cardmeChipErase(void);      //      USE TO TYPE 3 FLASH MEMORY ONLY

int cardmeGetType(void);        //
/*
 -1:no card or no EEPROM
  0:unknown                 PassMe?
  1:TYPE 1  4Kbit(512Byte)  EEPROM
  2:TYPE 2 64Kbit(8KByte)or 512kbit(64Kbyte)   EEPROM
  3:TYPE 3  2Mbit(256KByte) FLASH MEMORY
*/
int cardmeSize(int tp);
/*
        tp:1~3
        return:size (byte)
*/
u8 cardmeReadID(int i) ;        //      don't work ??
u8 cardmeCMD(u8 cmd,int address) ;

void cardmeReadHeader(uint8 * header) ;

#123358 - josath - Tue Mar 27, 2007 5:21 pm

Here's a very very basic clone of REIN using DLDI. Be warned, it will probably delete your save game, so use at your own risks.

I've inserted a bunch of pauses, and I try to unmount the FAT when done using it, so in theory it should be possible to swap between a slot-1 card and a game with eeprom. Except for the issues mentioned by tepples (resetting the DS, can't re-init FAT, etc). Worst case scenario, you would still be able to go from file -> commercial game, though you may not be able to do the reverse.

The menus should be pretty self-explanatory

http://davr.org/ds2/eepinator.nds