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.

Flash Equipment > EFA2 hacking: Status, Hosting suggestions ?

#72610 - CyteX - Mon Feb 20, 2006 12:02 pm

Hi *

I did a bit RE and identified enable/unlock and access sequences of the EFA2 cart. I'm able to read boot block, FAT and root directory of the U-DISK in NAND Flash. That means: Yes, now we can access the U-DISK of EFA2 from our homebrew stuff. Nevertheless, there is still work to do (i.e. NOR-Flash functionality, Savegame handling, fread etc.).

Now I'm searching a place on the Net where to host the stuff. My first thoughts are to put it on SourceForge, but it may be a good idea to join forces with other projects.

As it is still in development it makes no sense to post it here on gbadev as there will be updates quite regularly . Things like SourceForge (cvs) or a Wiki will be the better choice.

Which other places/projects do you know where the "libefa2" can be placed ?
Are there any Flashcart related projects where I can contribute ?
Makes it sense to put it on PIRACY-DOT-COM Wiki ?

bye Cy'

#73214 - Joat - Thu Feb 23, 2006 10:37 pm

Heya, I've been collecting flash cart related info at http://www.bottledlight.com/ds/index.php/Hardware/FlashCartridges

I'd be glad to put your technical info up, or give you an account on the wiki, but I don't do generic web hosting. Dovoto and a bunch of others do tho, just drop him an email or ask in #mellowdsdev or #gbadev on EFNET IRC.

Regarding a CVS repository, hmm. There is some code already in the devkitpro tree somewhere for gbamp flashing IIRC, but we're talking about creating a new module just for cart management / FAT / etc... Will post back here when that gets decided.
_________________
Joat
http://www.bottledlight.com

#73350 - CyteX - Sat Feb 25, 2006 12:08 am

Ah, great Joat ! I gave your site a short look as I searched the forum for EFA2 related infos, but thought it was only related to Flashcarts usable with NDS only.

Gave it another, closer, view now and saw, that the EZFlash III and the EFA2 got the same magic unlock sequences before and after control register access:

Code:

  *(u16 *)0x9FE0000 = 0xD200;
  *(u16 *)0x8000000 = 0x1500;
  *(u16 *)0x8020000 = 0xD200;
  *(u16 *)0x8040000 = 0x1500;
  ....
  *(u16 *)0x9FC0000 = 0x1500;


Hehe.. I just gave them names :

Code:

  // "Magic" registers used for unlock/lock sequences
  #define REG_EFA2_MAGIC_A   *(vu16*)0x09fe0000
  #define REG_EFA2_MAGIC_B   *(vu16*)0x08000000
  #define REG_EFA2_MAGIC_C   *(vu16*)0x08020000
  #define REG_EFA2_MAGIC_D   *(vu16*)0x08040000
  #define REG_EFA2_MAGIC_E   *(vu16*)0x09fc0000

  // NAND flash lock/unlock register ?
  #define REG_EFA2_NAND_LOCK *(vu16*)0x09c40000
  // NAND flash enable register ?
  #define REG_EFA2_NAND_EN   *(vu16*)0x09400000
  // NAND flash command write register
  #define REG_EFA2_NAND_CMD   *(vu8*)0x09ffffe2
  // NAND flash address/data write register
  #define REG_EFA2_NAND_WR    *(vu8*)0x09ffffe0
  // NAND flash data read register
  #define REG_EFA2_NAND_RD    *(vu8*)0x09ffc000


So there is the possibility that EZFlash III and EFA2 are at least a bit compatible.

I would be very happy if it is OK to send you my code and you put it on the Wiki. Generic web hosting is not really needed, it is a good idea to put same things at the same place.

This weekend I wanted to start with the udisk directory and file access. Sure, it won't be finished on Monday, but at least a simple directory listing and textfile display will be done as demonstator.

#73355 - CyteX - Sat Feb 25, 2006 1:07 am

Ahh.. may be a good idea to contribute to chishm's gba_nds_fat library.

#73380 - chishm - Sat Feb 25, 2006 5:19 am

Yes, it'd be great if you could add EFA2 udisk support to the FAT library. There are just a few things you need to take care of:
1) Use io_mpcf.h and io_mpcf.c as templates for your driver.
2) The only supported sector size is 512 bytes. The udisk should support this if it is a standard USB thumb drive.
3) Be sure to return true from your EFA2_Startup() function if, and only if, there is definitely an EFA2 in the DS.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com