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 > Rebuilding libfat

#162582 - RobinWatts - Fri Sep 05, 2008 1:36 pm

Hi all,

I've got an M3 DS Real here, with a RAM/Rumble pack. If I boot any program that uses libfat with the RAM/Rumble pack in, it starts to rumble.

I thought I might try to build myself my own version of libfat rather than relying on the one packaged with devkitARM, so I could try and track down what's causing this problem.

I've downloaded the sources, but when I try and build them, it tells me that I'm missing nds/ndstypes.h. I've looked all over the packages I've downloaded and can't for the life of me find this file.

I'm probably doing something really dim here, and have forgotten something vital... any hints? Anyone here managed to rebuild libfat themselves?

Thanks,

Robin

#162583 - Maxxie - Fri Sep 05, 2008 1:50 pm

RobinWatts wrote:

I thought I might try to build myself my own version of libfat rather than relying on the one packaged with devkitARM, so I could try and track down what's causing this problem.


Doing a forum search can be much more helpfull.
Cause and solution will be delivered without additional costs.
_________________
Trying to bring more detail into understanding the wireless hardware

#162591 - RobinWatts - Fri Sep 05, 2008 3:11 pm

Maxxie wrote:
Doing a forum search can be much more helpfull.
Cause and solution will be delivered without additional costs.


I have searched. I couldn't find the answer, hence the posting.

Now, I'm quite prepared to believe I've overlooked something blindingly obvious, in which case I'm very sorry and I apologise for wasting everyones time and bandwidth.

Nonetheless, I still can't find it - could you maybe point me at the blindingly obvious thing I've missed please?

Thanks,

Robin

#162594 - Maxxie - Fri Sep 05, 2008 4:19 pm

Points to alternative drivers:
http://forum.gbadev.org/viewtopic.php?t=14653&highlight=fat+rumble

But there is a thread somewhere around that tells you which of the default drivers is causing this problem with the rumble if it tries to detect the card.
Iirc it is the M3SD with sdram which rumbles, just disable it .
_________________
Trying to bring more detail into understanding the wireless hardware

#162600 - RobinWatts - Fri Sep 05, 2008 6:24 pm

Maxxie wrote:
Points to alternative drivers:
http://forum.gbadev.org/viewtopic.php?t=14653&highlight=fat+rumble


OK, but none of the drivers mentioned there are for the M3 DS Real, right?

Quote:

But there is a thread somewhere around that tells you which of the default drivers is causing this problem with the rumble if it tries to detect the card.
Iirc it is the M3SD with sdram which rumbles, just disable it .


How do I disable it without rebuilding libfat?

How does that help when I get prebuilt apps from other people? Long term someone needs to fix libfat so that it doesn't trigger the rumble - I was hoping that I could have a go at doing that.

Robin

#162612 - Maxxie - Fri Sep 05, 2008 10:07 pm

So with "rebuilding an own version of libfat" you mean build libfat yourself with your settings instead of building really an own version?

Sorry then, i missunderstood you as someone who wants to invent the wheel another time.

To disable the build in interfaces in libfat, remove their entries in source/disc_io/disc.c's ioInterface array.

If you want a patcher that works on allready compiled binaries, search for this array in memory (search for the device type IDs in their characteristic distance&order) and overwrite everyone but the dldi with the dldi entry. (Or something that is identified as invalid)
_________________
Trying to bring more detail into understanding the wireless hardware

#162613 - RobinWatts - Fri Sep 05, 2008 10:31 pm

Maxxie wrote:
So with "rebuilding an own version of libfat" you mean build libfat yourself with your settings instead of building really an own version?

Sorry then, i missunderstood you as someone who wants to invent the wheel another time.


As I said in my first post, I've got the sources to libfat - I just want to be able to rebuild them.

When I do make, I immediately hit problems with missing files, nds/ndstypes.h for example.

Quote:

To disable the build in interfaces in libfat, remove their entries in source/disc_io/disc.c's ioInterface array.


Presumably you've got a copy that you can build successfully then? Which means that you have nds/ndstypes.h? Where did you get it? What package is it in?

Thanks,

Robin

#162615 - zeruda - Sat Sep 06, 2008 12:24 am

That's an incorrect line.
replace #include <nds/ndstypes.h>
with
#include <nds/jtypes.h>

I assume you've installed devkitpro. Go to the folder \devkitPro\libnds. All the libnds header files like jtypes.h are there so you can look through them to see how things work. Documentation for libnds is at http://libnds.devkitpro.org/dirs.html as well.