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 r17 compiles, but doesn't work

#102648 - Lick - Fri Sep 15, 2006 10:24 pm

I'm trying to replace libFat (DKP r19) with Rein r17 for more compatability. However, I have everything compiling but all the FAT_f* functions fail.

- I'm using Supercard MiniSD.
- FAT_InitFiles() returns true, FAT_fopen() fails. [I use modes "r", and "w"]
- I have 2 swiWaitForVBlank()s prior to FAT_InitFiles().
- All the Rein code is getting compiled.

Did I miss something?
_________________
http://licklick.wordpress.com

#102685 - chishm - Sat Sep 16, 2006 3:15 am

What does rein's version of gba_nds_fat support that libfat doesn't?
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com

#102697 - TJ - Sat Sep 16, 2006 7:46 am

More devices, I thought.

#102701 - Lick - Sat Sep 16, 2006 9:37 am

I think the main difference is writing to microSD devices. DSLiveWeather users have reported that they can't seem to save, but they can load though.

Hmm.. So no one knows? I better check my code again then.
_________________
http://licklick.wordpress.com

#102707 - Lick - Sat Sep 16, 2006 10:38 am

I added the following code:

Code:
#include "reinfat17/disc_io.h"

..

disc_HostType();


But I get an undefined reference error when linking. When I look at /build I can see disc_io.o, though.
_________________
http://licklick.wordpress.com

#102712 - Lick - Sat Sep 16, 2006 11:03 am

Errr.. Wait. Does Rein r17 even work with DevKitPro r19?

Yuck! Disgusting! The project uses arm-elf-* so I guess it doesn't work. Blegh..
_________________
http://licklick.wordpress.com

#102841 - chishm - Sun Sep 17, 2006 9:59 am

If you are not using directory listing functions, I suggest you move to libfat. From your descriptions, it appears that you were originally using gba_nds_fat, not libfat as you specified; if I'm wrong, feel free to correct me.

Most of the supoprt provided by gba_nds_fat is for CF based devices. libfat, on the other hand, should support almost as many devices as REIN's lib, including proper M3SD and SCSD support.

EDIT: Rephrased for clarity
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com


Last edited by chishm on Sun Sep 17, 2006 12:33 pm; edited 1 time in total

#102847 - wintermute - Sun Sep 17, 2006 10:49 am

REIN's lib is gba_nds_fat with some horrible assembly patches
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#102902 - Lick - Sun Sep 17, 2006 8:44 pm

chishm: I was using LibFat (DKP r19) at first, but it seems that writing doesn't work on microSD cards (SC Lite) and a few other cards as well. I will of course use LibFat again when DKP r20 comes out, but I thought I had waited long enough to implement REIN for the time being.

wintermute: Hmm.. You're actually the first to say this. Hmm.. Really, if DKP r20 comes out soon enough, I won't have to think about this.. AT ALL!! Hehe.. :p
_________________
http://licklick.wordpress.com

#102967 - chishm - Mon Sep 18, 2006 9:02 am

Ah, I must've added the SC Lite changes (2006-08-19) to CVS after the latest library release (2006-08-13).
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com