Some ETAs
Some ETAs
I'm just curious on possible time-frames for a couple of things...
1. Update to online docs... several (at least 2...) functions have new parameters from 1.3.1 to 1.3.2.
2. Example(s) for the new filesystem.
Also, is there any current knowledge of nitroFS' compatibility in emulators?
1. Update to online docs... several (at least 2...) functions have new parameters from 1.3.1 to 1.3.2.
2. Example(s) for the new filesystem.
Also, is there any current knowledge of nitroFS' compatibility in emulators?
Re: Some ETAs
yes i can't wait for examples for the new filesystem! i looked up in the header but there was only an init function
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Some ETAs
For future reference please do not play guessing games and make posts which modify files distributed with the toolchain. The integrity of information found on these boards is important. I have deleted all the offending posts and replies to them - if you're in that much of a rush then use #dsdev on irc.blitzed.org to ask. Generally you'll get better advice there if you're patient and ask the right questions.
The latest libnds docs are now online.
Examples for the nitro filesystem should be available in the next few days subject to further testing. Currently the code will work fine on no$gba and slot2 cards which copy the whole nds file to GBA cart space before execution. Slot1 support via FAT is supported but only through a launcher which supplies argv parameters - as yet none that we're aware of. A basic menu and launcher system is available in SVN @ http://devkitpro.svn.sourceforge.net/vi ... ebrewMenu/
The basics of adding files are as follows :-
Add a line at the top of the Makefile defining the directory to use, like this
Later in the Makefile, within the ifneq ($(BUILD),$(notdir $(CURDIR))) block
simple directory example.
obviously adding -lfilesystem -lfat to your LIBS line, before -lnds9
The only emulator we test with is no$gba, the nitroFS support works fine there but unfortunately we can't guarantee this will work with other emulators. Generally you should be testing on hardware whenever possible - even no$ gets things a bit wrong sometimes.
The latest libnds docs are now online.
Examples for the nitro filesystem should be available in the next few days subject to further testing. Currently the code will work fine on no$gba and slot2 cards which copy the whole nds file to GBA cart space before execution. Slot1 support via FAT is supported but only through a launcher which supplies argv parameters - as yet none that we're aware of. A basic menu and launcher system is available in SVN @ http://devkitpro.svn.sourceforge.net/vi ... ebrewMenu/
The basics of adding files are as follows :-
Add a line at the top of the Makefile defining the directory to use, like this
Code: Select all
#---------------------------------------------------------------------------------
TARGET := $(shell basename $(CURDIR))
BUILD := build
SOURCES := source
DATA :=
INCLUDES := include
NITRODATA := nitrofiles
Code: Select all
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
ifneq ($(strip $(NITRODATA)),)
export NITRO_FILES := $(CURDIR)/$(NITRODATA)
endif
Code: Select all
#include <nds.h>
#include <nitrofs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
//---------------------------------------------------------------------------------
int main(int argc, char **argv) {
//---------------------------------------------------------------------------------
// Initialise the console, required for printf
consoleDemoInit();
if (nitroFSInit()) {
DIR *pdir;
struct dirent *pent;
struct stat statbuf;
pdir=opendir("/");
if (pdir){
while ((pent=readdir(pdir))!=NULL) {
stat(pent->d_name,&statbuf);
if(strcmp(".", pent->d_name) == 0 || strcmp("..", pent->d_name) == 0)
continue;
if( S_ISDIR(statbuf.st_mode)) {
iprintf("%s <dir>\n", pent->d_name);
} else {
iprintf("%s %ld\n", pent->d_name, statbuf.st_size);
}
}
closedir(pdir);
} else {
iprintf ("opendir() failure; terminating\n");
}
} else {
iprintf("nitroFSInit failure: terminating\n");
}
while(1) {
swiWaitForVBlank();
}
return 0;
}
The only emulator we test with is no$gba, the nitroFS support works fine there but unfortunately we can't guarantee this will work with other emulators. Generally you should be testing on hardware whenever possible - even no$ gets things a bit wrong sometimes.
Re: Some ETAs
ok sorry about that i won't do it again. and i redownloaded devkitarm so i have no modified files distributed with the toolchain. i hope that everyone who read my post will do the same, as i did it totally wrong
edit why does ideas And my nds shows me a fat directory and no$gba not if i use the official lib? with my previous project and my deleted old lib it worked fine????
edit why does ideas And my nds shows me a fat directory and no$gba not if i use the official lib? with my previous project and my deleted old lib it worked fine????
Re: Some ETAs
My apologies as well. My edits didn't include modifications to the base_rules or ds_rules, just my own makefile (which admittedly, though, is from the libnds examples) and were just an attempt to try to get it working until official means were posted.
Also, the NitroFS wiki page mentions that you have in initialize FAT as well. Is this changed in the version integrated with libnds?
This isn't obvious to me at all, I have very little experience at the the makefile level. Its starting to make more and more sense as time goes on... but would you be willing to explain why this order is important? If I were to have guessed wildly, I would have thought you want to list your primary library first...WinterMute wrote: obviously adding -lfilesystem to your LIBS line, before -lnds9
Also, the NitroFS wiki page mentions that you have in initialize FAT as well. Is this changed in the version integrated with libnds?
Last edited by Sylus101 on Wed Mar 04, 2009 8:03 pm, edited 3 times in total.
Re: Some ETAs
yeah you didn't sylus, i thought ds_rules was a sort of a makefile and didn't thought about it that i'm not allowed to change that, for the second time, i'm so sorry Wintermute and the developers of devkitpro/devkitarm
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Some ETAs
It's ok, I understand people want to play - I'm just reluctant to allow posts here which involve modifying internals and other advice which may break the tools for inexperienced users. Like I said it's probably best to stop by IRC and ask there for a quicker response.Sylus101 wrote:My apologies as well. My edits didn't include modifications to the base_rules or ds_rules, just my own makefile (which admittedly, though, is from the libnds examples) and were just an attempt to try to get it working until official means were posted.
When the linker scans object files in archives it proceeds from left to right, fulfilling dependencies as it goes. If library A uses functions from library B then the link order must be -lA -lB otherwise you'll get link errors.This isn't obvious to me at all, I have very little experience at the the makefile level. Its starting to make more and more sense as time goes on... but would you be willing to explain why this order is important? If I were to have guessed wildly, I would have thought you want to list your primary library first...WinterMute wrote: obviously adding -lfilesystem to your LIBS line, before -lnds9
Yes, the point here is to avoid initialising features which may not be present. The filesystem library initialises the FAT layer only if it is required which simplifies user code.Also, the NitroFS wiki page mentions that you have in initialize FAT as well. Is this changed in the version integrated with libnds?
Re: Some ETAs
Thanks for that response, the more I learn the more dangerous I become. Just kidding...
I will definitely hang tight and wait for some examples...
I'm a little puzzled on this part. I tried what I had setup on hardware (R4, slot 1) for the first time and I guess as suspected it failed to work. What I'm not real clear on, is if the loader linked to is supposed to be an alternative that will work on slot 1 carts? It just gave a loading message and stayed hung there.WinterMute wrote: Examples for the nitro filesystem should be available in the next few days subject to further testing. Currently the code will work fine on no$gba and slot2 cards which copy the whole nds file to GBA cart space before execution. Slot1 support via FAT is supported but only through a launcher which supplies argv parameters - as yet none that we're aware of. A basic menu and launcher system is available in SVN @ http://devkitpro.svn.sourceforge.net/vi ... ebrewMenu/
I will definitely hang tight and wait for some examples...
Who is online
Users browsing this forum: No registered users and 1 guest