PDA

View Full Version : romdiskfs for the DS



GPF
December 5th, 2005, 18:38
This DS library implementation the Linux ROMFS file system for reading a pre-made boot romdisk.

To create a romdisk image, you will need the program "genromfs". This program was designed for Linux but can compile under Cygwin.", included is a prebuilt mingw windows binary.

This was derived/ported from KOS 1.3.x from the Dreamcast KallistiOS .

included is a simple FS test which demonstrates reading a couple of files from the romdisk, and then it displays the directory structure.

for more information about using the filesystem checkout the fs.h file for the proper api calls, which are all very similiar to standard stdio calls.

Also include is some stdio newlib stubs that call the kosFS for better stdio support but so far I havent figure out how to port those into the existing devkitpro / libnds configuration.

Troy Davis(GPF)
http://gpf.dcemu.co.uk/ndsromdisk.shtml

quzar
December 5th, 2005, 23:48
you should work to just all-out port kos to the DS. It already had a functional GBA port, I'm sure you would get support from DP et all.

lukeusher123
March 20th, 2006, 18:03
When I try to compile the example with MSYS I get this:


$ make
fstest.c
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c: In function 'fs_test':
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:29: warning: implicit declaration of function 'fprintf'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:29: warning: incompatible implicit declaration of built-in function 'fprintf'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:29: error: 'stderr' undeclared (first use in this function)
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:29: error: (Each undeclared identifier is reported only once
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:29: error: for each function it appears in.)
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:36: warning: incompatible implicit declaration of built-in function 'fprintf'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:38: warning: implicit declaration of function 'malloc'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:38: warning: incompatible implicit declaration of built-in function 'malloc'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:39: warning: implicit declaration of function 'exit'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:39: warning: incompatible implicit declaration of built-in function 'exit'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:46: warning: implicit declaration of function 'printf'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:46: warning: incompatible implicit declaration of built-in function 'printf'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:49: warning: format '%s' expects type 'char *', but argument 2 has type 'int'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:54: warning: format '%s' expects type 'char *', but argument 2 has type 'int'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:65: warning: incompatible implicit declaration of built-in function 'fprintf'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:25: warning: unused variable 'i'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:25: warning: unused variable 'n'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:24: warning: unused variable 'c'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:23: warning: unused variable 'wFile'
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c: In function 'main':
c:/Devkitpro/examples/NDS/DSROMDISKFS/fstest/source/fstest.c:186: warning: implicit declaration of function 'find_first_romfs_file'
make[1]: *** [fstest.o] Error 1
make: *** [build] Error 2

Does anyone have any idea why I get the errors and how to fix them?

GPF
March 21st, 2006, 17:35
yeah fprintf is defined as printf in that version , so the fprintf(stderr, ......

the stderr part is whats failing, iv actually written a fprintf function now that using vsnprintf and fwrite to write a line to a file, don't know how stderr would work, you will have to change it to KOS_stderr, for it to compile, dont know if it will work though for stderr, but it will compile.

I just updated the kosfs library code today, so redownload this new version iv implemented a couple more stdio like functions.
http://gpf.dcemu.co.uk/ndsromdisk.shtml

Troy(GPF)