Only in src: build
diff -udr src/Makefile src-bbraun/Makefile
--- src/Makefile	2005-09-26 23:22:04.000000000 -0700
+++ src-bbraun/Makefile	2006-09-17 09:48:41.000000000 -0700
@@ -33,7 +33,7 @@
 			-ffast-math \
 			$(ARCH)
 
-CFLAGS	+=	$(INCLUDE) -DARM9
+CFLAGS	+=	$(INCLUDE) -DARM9 -I$(DEVKITPRO)/libfat/include
 CXXFLAGS	:= $(CFLAGS)
 
 ASFLAGS	:=	-g $(ARCH)
@@ -42,7 +42,7 @@
 #---------------------------------------------------------------------------------
 # any extra libraries we wish to link with the project
 #---------------------------------------------------------------------------------
-LIBS	:= -lnds9
+LIBS	:= -lnds9 -L$(DEVKITPRO)/libfat/lib -lfat
 
 
 #---------------------------------------------------------------------------------
diff -udr src/source/main.cpp src-bbraun/source/main.cpp
--- src/source/main.cpp	2006-03-05 21:04:10.000000000 -0800
+++ src-bbraun/source/main.cpp	2006-09-17 09:48:42.000000000 -0700
@@ -4,17 +4,18 @@
 #include <nds/arm9/console.h>
 #include <nds/arm9/sound.h>
 #include <nds/system.h>
+#include <nds/registers_alt.h>
   
 #include "console.h"
 #include "sound.h"
-#include "mediasrc.h"
+#include "MediaSrc.h"
  
 #include "Event.h"
 #include "StellaEvent.h"
 #include "EventHandler.h"
 #include "SoundDS.h"
 
-#include "gba_nds_fat.h"
+#include <libfat.h>
 
 #define timers2ms(tlow,thigh) ((tlow>>5)+(thigh<<11))
 // #define FRAGMENT_SIZE 3000
@@ -54,7 +55,7 @@
 	char filename[255];
 	bool directory;
 
-	ROM::ROM() { directory = false; }
+	ROM() { directory = false; }
 };
 
 vector<ROM> romlist;
@@ -197,7 +198,7 @@
 	ROM temp_rom;
 	
 	// Find the first file.
-	FILE_TYPE temp_filetype = FAT_FindFirstFileLFN((char *)&temp_rom.filename);
+	FILE_TYPE temp_filetype = FAT_FindFirstFileLFN(temp_rom.filename);
 	
 	if (temp_filetype == FT_FILE)
 	{
@@ -219,7 +220,7 @@
 	{
 		ROM temporary_rom;
 		
-		temp_filetype = FAT_FindNextFileLFN((char *)&temporary_rom.filename);
+		temp_filetype = FAT_FindNextFileLFN(temporary_rom.filename);
 		
 		if (temp_filetype == FT_FILE)
 			temp_rom.directory = false;
@@ -257,6 +258,9 @@
 
 			if ((menuscrollptr + 18) > romlist.size())
 				menuscrollptr = romlist.size() - 17;
+
+			if( menuscrollptr < 0 )
+				menuscrollptr = 0;
 			
 			UpdateMenu();
 		}
@@ -274,6 +278,9 @@
 
 			if ((menuscrollptr + 18) > romlist.size())
 				menuscrollptr = romlist.size() - 17;
+
+			if( menuscrollptr < 0 )
+				menuscrollptr = 0;
 							
 			UpdateMenu();
 		}
@@ -310,6 +317,8 @@
 	// Draw 18 entries.
 	for (int i = menuscrollptr; i < (menuscrollptr + 18); i++)
 	{
+		if( i >= romlist.size() )
+			break;
 		iprintf("  %s\n", romlist[i].filename);
 	}
 	
diff -udr src/source/SoundDS.cpp src-bbraun/source/SoundDS.cpp
--- src/source/SoundDS.cpp	2006-03-03 19:53:34.000000000 -0800
+++ src-bbraun/source/SoundDS.cpp	2006-09-17 09:48:42.000000000 -0700
@@ -23,6 +23,7 @@
 #include "System.h"
 #include "SoundDS.h"
 #include <math.h>
+#include <assert.h>
 
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 SoundSDL::SoundSDL(uInt32 fragsize)

