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 > DLDI for DS Link (SD) problem ** solved!!

#119947 - Diddl - Tue Feb 27, 2007 9:08 pm

DLDI driver doesn't work for my DS Link (slot 1) card. But I have dsdoom compiled and running on my DS Link. So I want to see why ...

First tests shows, libfat already fails at function fatInitDefault(). So I inserted debug messages to console in this io driver (io_DLMS.c).

Now I have a reduced test scenario, this are the facts:

  • a WORKING sample based on gba_nds_fat (example 1)
  • a NOT WORKING sample based on libfat (example 2)
  • both use devkit20
  • both use the same io_DLMS driver!!
  • now I use the same object files of io_DLMS and io_DLMS_asm!!
  • gba_nds_fat and libfat does exactly the same calls. both examples simply calls first DLMS_StartUp() and then DLMS_ReadSectors(0,1)
  • the curiosity is, in example 1 DLMS_ReadSectors(0,1) reads the sector 0 with data at relative address 1c0 but example 2 gets only 00 bytes. all 512 bytes are 0.


I cannot understand this and I'm sorry, I cannot debug this assembler file which includes this DLMS_ReadSectors() function.


PLEASE HELP ME!!! I'm too weak to solve this problem without help. All I can do is done. I cannot explain the reason of the problem.


If anyone give me instructions I can test, but I have no idea to do it myself.


For the tests I have the following test files (binary and sources). To test you need a DS Link card in slot 1 with both test files (.nds). The console message show the call to DLMS_StartUp() and then DLMS_ReadSectors(0,1). A hex dump of the read block will follow. Key A for printing next line, Key B breaks hexdump.


Modified libfat code from Chishm - added this DS Link slot 1 driver:
Example 2 (libfat)


Libfat testcode (needs modified libfat):
Example 2



gba_nds_fat test code (working)
Example 1
[/list]


Last edited by Diddl on Fri Mar 02, 2007 8:29 am; edited 1 time in total

#120281 - Diddl - Fri Mar 02, 2007 8:24 am

have soved this problem. now I 'am testing a working DLDI.

does nobody own a DS Link here? Is there anybody who want to test?


Working DS Linker DLDI: DLDI :: Source