Reading/Writing Files

Shy Guy
Posts: 12
Joined: Tue Jun 01, 2010 11:02 am
Location: Germany

Re: Reading/Writing Files

Post by Shy Guy » Wed Jul 27, 2011 11:43 am

Hm, what do I have to change in which makefile to get files from a certain directory into my rom?

Yes, I indeed have 3 makefiles, one for arm9, one for arm7 and the general one. And I don't want to change that structure, because some minor edits of the arm7 executable might be useful for me (I don't know whether the "default" one initializes maxmod?).

Isn't there any tutorial for nitrodir?

EDIT: By looking in the ds_rules file I now found out how I get my files into the rom.
But still the question: Any real tutorial for this?

WinterMute
Site Admin
Posts: 1478
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Reading/Writing Files

Post by WinterMute » Wed Jul 27, 2011 12:43 pm

The default arm7 initialises maxmod yes.

Please use an arm9 only project template, custom arm7 code *will* cause you grief. Providing support for people who use custom arm7 code causes us so much grief that we're reluctant to do it. There are very few reasons why you would need to change the arm7 code and many reasons why you shouldn't.

There are no tutorials, sorry. There never seems to be the time to put together anything useful - lots of things are still being updated and I still need to sort out a decent cross platform editor to go with the tools. Programmer's Notepad is ok but a little basic and windows only.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Shy Guy
Posts: 12
Joined: Tue Jun 01, 2010 11:02 am
Location: Germany

Re: Reading/Writing Files

Post by Shy Guy » Wed Jul 27, 2011 1:03 pm

WinterMute wrote:The default arm7 initialises maxmod yes.

Please use an arm9 only project template, custom arm7 code *will* cause you grief. Providing support for people who use custom arm7 code causes us so much grief that we're reluctant to do it. There are very few reasons why you would need to change the arm7 code and many reasons why you shouldn't.

There are no tutorials, sorry.
Hm, okay. But I keep my project now like it is. I know what I am doing, and I don't remove something important from the executable ^^

Maybe I will think of writing some (more up-to-date) NDS tutorials, also describing the makefiles, templates, etc.

Shy Guy
Posts: 12
Joined: Tue Jun 01, 2010 11:02 am
Location: Germany

Re: Reading/Writing Files

Post by Shy Guy » Wed Jul 27, 2011 1:23 pm

The nitrofs thing is working now for me in Emulator, but trying to initialize it on the hardware (with DSTT) it always get stuck!
It's also the same problem using the nitrodir example.

What should I do? Do I have to live with that the rom internal filesystem will not work on my hardware?

elhobbs
Posts: 355
Joined: Thu Jul 02, 2009 1:19 pm

Re: Reading/Writing Files

Post by elhobbs » Wed Jul 27, 2011 2:26 pm

you need to use a loader that supports argv. there are probably other ways to get this, but you can replace the default loader with HomebrewMenu and it will work. HomebrewMenu is not pretty (text only) but it is fast and functional. you can get it here: http://sourceforge.net/projects/devkitpro/files/hbmenu/

WinterMute
Site Admin
Posts: 1478
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Reading/Writing Files

Post by WinterMute » Wed Jul 27, 2011 2:44 pm

Shy Guy wrote:I know what I am doing, and I don't remove something important from the executable ^^
Famous last words.

It might be worth noting that most of the horrendously intractable problems I see regularly involve people "who know what they're doing" ignoring advice. You're removing nothing important from the executable, libnds provides a good default arm7 core which is used by all the examples and will be continually updated. Currently work is in progress to provide better DSi mode support, using a custom arm7 binary will make it difficult to ensure your applications will work as expected in the future.
Maybe I will think of writing some (more up-to-date) NDS tutorials, also describing the makefiles, templates, etc.
This is something we're in dire need of - sadly nobody ever keeps these things to date and the vast majority of DS tutorials out there are quite wrong now and there's no way to get them updated. For that reason I'd rather get anything into the devkitPro wiki somewhere but I'm still at a bit of a loss as to how best to lay things out. Any suggestions would be much appreciated. The wiki isn't really linked much from the main page right now due to the lack of content and currently anyone wanting to edit the wiki will need to be added to a special forum group. It was relatively open at one point but I had to delete a truckload of nonsense related to PALib so I'm very careful about who gets editing privileges now.

I've just added the banner text and nitro filesystem variables to the arm9 template - I'll probably be releasing a new libnds and example set next week or so.

Until relatively recently the IRC channels and the provided examples have been enough to get people up and running. These days it looks like we're attracting people who aren't used to the relative sparsity of good information in the homebrew scene.

The combined template should be avoided, most people have no need to write custom arm7 code, please don't write about it, use it or encourage other people to use it.
The nitrofs thing is working now for me in Emulator, but trying to initialize it on the hardware (with DSTT) it always get stuck!
It's also the same problem using the nitrodir example.
The DSTT launcher doesn't support argv unfortunately, you can use hbmenu - there's a binary in the distribution which will boot on the DSTT or you can launch hbmenu from the DSTT menu (I think, this hasn't been tested)
Help keep devkitPro toolchains free, Donate today

Personal Blog

Shy Guy
Posts: 12
Joined: Tue Jun 01, 2010 11:02 am
Location: Germany

Re: Reading/Writing Files

Post by Shy Guy » Wed Jul 27, 2011 3:23 pm

elhobbs wrote:you need to use a loader that supports argv. there are probably other ways to get this, but you can replace the default loader with HomebrewMenu and it will work. HomebrewMenu is not pretty (text only) but it is fast and functional. you can get it here: http://sourceforge.net/projects/devkitpro/files/hbmenu/
Okay, thanks, now it works! :)
In addition, also another homebrew I've got from the web works :)

EDIT:
WinterMute wrote:
Shy Guy wrote:I know what I am doing, and I don't remove something important from the executable ^^
Famous last words.

It might be worth noting that most of the horrendously intractable problems I see regularly involve people "who know what they're doing" ignoring advice. You're removing nothing important from the executable, libnds provides a good default arm7 core which is used by all the examples and will be continually updated. Currently work is in progress to provide better DSi mode support, using a custom arm7 binary will make it difficult to ensure your applications will work as expected in the future.
Maybe I will think of writing some (more up-to-date) NDS tutorials, also describing the makefiles, templates, etc.
This is something we're in dire need of - sadly nobody ever keeps these things to date and the vast majority of DS tutorials out there are quite wrong now and there's no way to get them updated. For that reason I'd rather get anything into the devkitPro wiki somewhere but I'm still at a bit of a loss as to how best to lay things out. Any suggestions would be much appreciated. The wiki isn't really linked much from the main page right now due to the lack of content and currently anyone wanting to edit the wiki will need to be added to a special forum group. It was relatively open at one point but I had to delete a truckload of nonsense related to PALib so I'm very careful about who gets editing privileges now.

[...]

The combined template should be avoided, most people have no need to write custom arm7 code, please don't write about it, use it or encourage other people to use it.
Okay, I understand I should not change the arm7 code... but I think I had some trouble in the beginning getting my code compiling, having the correct makefile etc.. and I'm happy it's working now. Maybe I will try to "remove" my "custom" arm7 code if still everything works fine with my current makefile and directories.

If I would do a tutorial, I try to explain the user everything from downloading and installing devkitPro, setting environment variables, using the command line etc.
And then I will try to avoid the arm7 thing. Maybe I will discover it a bit in an advanced tutorial, if there might be a good (very special) reason for editing that code.

WinterMute
Site Admin
Posts: 1478
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Reading/Writing Files

Post by WinterMute » Wed Jul 27, 2011 4:48 pm

You don't download and install devkitPro any more than you download and install Microsoft or Adobe.

Setting up the toolchains, currently devkitARM, devkitPPC and devkitPSP, should be left to the installer/updater. There is a basic guide found at http://devkitpro.org/wiki/Getting_Started already. I intend to expand this section for console specifics in the near future. There's a stub for DS at http://devkitpro.org/wiki/Getting_Started/Nintendo_DS but I'd really hoped to get CodeLite into the installers before going too far with that.

Using the command line appears to be an advanced topic for most users, sadly. Still, it's probably much more productive for most people to use an IDE like CodeLite than mess about with arcane commands.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests