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 > PC dev tools to DS, and others.

#125888 - Dood77 - Wed Apr 18, 2007 12:18 am

Well to start the only programming I know is qbasic, and Ti-83+ basic, so theres most likely obvious limitations to my ideas that I don't know about...

I was curious whether or not it would be possible to compile DS binaries on the DS itself? It might be useful for developers to make quick changes on the go. Obviously the process would be much slower, but is this possible? I'm guessing theres some PC specific compiler that has nothing to do with the DS involved in the process...

Another idea that is definitely possible is a DLDI patcher on DS. I know you're thinking why not just patch it on your computer right after you download it? The problem is though is that there are multiple patches to try for some cards before you find the right one. Also soon there might be DS web browsers that allow downloads and there is no PC involved at all. (have I heard of someone making an un-zip program that runs on DS?)

My last idea is a simple one, that if its possible I would like to make it my first DS programming venture. Yes, I've dabbled in C, I just have to look up the syntax frequently. Anyway my idea was for a DS clock-sync program. What I need to know is how to change the clock through libnds and how to make the appropriate request from a time server. (time.windows.com and time.nist.gov are listed in windows...)

#125889 - DekuTree64 - Wed Apr 18, 2007 12:32 am

Dood77 wrote:
I was curious whether or not it would be possible to compile DS binaries on the DS itself? It might be useful for developers to make quick changes on the go.

I doubt you could get GCC to run on a DS (maybe with RAM expansion...), but an assembler would be no problem at all. Heck, you could even do a nice touch screen and/or button interface for picking instructions and registers instead of typing out the names one letter at a time.

I've always wanted to make a DS game on DS. But you'd really need either one all-powerful IDE, or a multitasking OS to quickly switch between different programs. Restarting every time you want to go tweak a few pixels on a sprite would be painful.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#125890 - Lick - Wed Apr 18, 2007 12:41 am

Interesting, but I think it wouldn't work that well. The keyboard-mouse-monitor combination is by far the best for coding. It allows for fast development (I type faster than I "pick letters onscreen"), oversight (the DS has only two 256x192 screens) and not to mention a broad range of development tools.

I think it would be hard to create and hard to use a dev environment on the DS.
_________________
http://licklick.wordpress.com

#125901 - dantheman - Wed Apr 18, 2007 3:07 am

Dood77 wrote:
Another idea that is definitely possible is a DLDI patcher on DS. I know you're thinking why not just patch it on your computer right after you download it? The problem is though is that there are multiple patches to try for some cards before you find the right one. Also soon there might be DS web browsers that allow downloads and there is no PC involved at all. (have I heard of someone making an un-zip program that runs on DS?)


All of that is currently available in the RAM builds of DSLinux as far as I can tell. You can use Retawq to download the zipped DS binary to your card (Shift+D downloads from the currently selected link), the built-in "unzip" command to unzip it, and the ported dlditool from http://www.dslinux.org/index.php?showtopic=2008 to patch it (put in /linux/usr/bin). I have done all but the DLDI portion before personally.

Of course, this requires a RAM-enabled slot-2 device, since Unzip is only enabled in the RAM builds. You could probably also use the DLDI version with a compatible slot-1 card and the Opera RAM pack in the bottom slot. I think the EZ-V slot-2 expansion pack is also supported, but I'm not entirely sure about that.

#125902 - Dood77 - Wed Apr 18, 2007 3:10 am

Yes, of course you can't beat a full desktop environment, but if developers wanted to make a few small tweaks or something they could do it on the go (without a laptop)
Not that I really think someone needs to do this, but I was just curious.

Edit: Heh, dantheman posted right before i finished writing this one :P

I should've thought of DSLinux... kind of a no-brainer to port the desktop linux patcher. But surely a native DS patcher would be cake for an experienced programmer. Heck, it would work perfecftly as a DSO plugin, use the built in file browser and everything...

#125906 - tepples - Wed Apr 18, 2007 3:24 am

Lick wrote:
Interesting, but I think it wouldn't work that well. The keyboard-mouse-monitor combination is by far the best for coding. It allows for fast development (I type faster than I "pick letters onscreen"), oversight (the DS has only two 256x192 screens) and not to mention a broad range of development tools.

But compare to the single 96x64 screen and 40-key pad that programmers use to write TI-83 script.

Opera isn't out until June.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#125908 - Dood77 - Wed Apr 18, 2007 3:33 am

Heh, good point tepples.

Although the 83 and the like use a series of menus for all the functions, so you don't have to type anything except formulas and such.

You guys would ph33r me if you saw how fast I can throw together an 83 program, not to mention type on that A-Z keyboard xP

#125937 - silent_code - Wed Apr 18, 2007 10:19 am

Dood77 wrote:
You guys would ph33r me if you saw how fast I can throw together an 83 program, not to mention type on that A-Z keyboard xP

*LMAO* good one X^D

such a "programming" tool would only be useful for some sort of a basic visual (not visual basic ;^p ) scripting language - i think lego mindstorms (?) uses something similar - ontop or based on java afaik.

you could also have a level editor and stuff, but you would definitely have some waiting time before testing... that's where my <tada!> WAIT GAMES (tm)(r)(c) come in: "play pong/galaga/poker/etc. while waiting for your script to be executable" - just like the old tekken had a load game and... i feel like a weirdo.

#125938 - LiraNuna - Wed Apr 18, 2007 10:22 am

Quote:
I was curious whether or not it would be possible to compile DS binaries on the DS itself? It might be useful for developers to make quick changes on the go. Obviously the process would be much slower, but is this possible? I'm guessing theres some PC specific compiler that has nothing to do with the DS involved in the process...


Me and SausageBoy were working on a TinyCC-arm port.
we got it running with decent compiling speed (less then 5 seconds for a nice 100 line sprite example), but some limitations such as porting newlib/libc kept us back... libnds was successfully compiled, though.

Not to mention you need make, some sort of a text editor with syntax highlighting... etc. The plan was to code a DSO plugin to handle .c, .h and .cpp files (.cc, .cxx etc) but since we realized it won't be practical to restart the DS to compile/run /fix cycle, we stopped.

LUA could be fin if it had an embedded editor.
_________________
Private property.
Violators will be shot, survivors will be shot again.


Last edited by LiraNuna on Wed Apr 18, 2007 10:30 am; edited 1 time in total

#125959 - Sausage Boy - Wed Apr 18, 2007 4:08 pm

You managed to compile a 100 line sprite example? Cool :P. But yeah, we never got newlib running, so it's pretty useless. Also, TinyCC is a horrible mess of code with included .c files and stuff like that. I prefer not touching it if I can avoid it.
_________________
"no offense, but this is the gayest game ever"

#125997 - Dood77 - Wed Apr 18, 2007 11:57 pm

Anybody know anything about the clock thing?

#126226 - M3d10n - Sat Apr 21, 2007 3:05 am

You know, this gives me a good idea.

If your game uses some sort of scripting language for some features, it would be worth adding support for editing them directly on the DS (on the dev builds). And maybe even the ability to use WiFi to update the scripts from a SVN repository.

It could speed up the development of script-heavy games, like RPGs and adventure games.

#126227 - zzo38computer - Sat Apr 21, 2007 4:56 am

Dood77 wrote:
Well to start the only programming I know is qbasic, and Ti-83+ basic, so theres most likely obvious limitations to my ideas that I don't know about...
....


There is DSBASIC, but it doesn't work very well (it is a port of Integer Tiny BASIC, which isn't very powerful, as well as some other problems as well)
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.

#126244 - Dood77 - Sat Apr 21, 2007 9:13 am

Yeah I heard about that, it doesn't program on the DS, but on the computer. I don't think its worth the frustration I would probably have... Plus its terribly old, FAT might not work with my SCminiSD...

#126268 - zzo38computer - Sat Apr 21, 2007 3:01 pm

Dood77 wrote:
Yeah I heard about that, it doesn't program on the DS, but on the computer. I don't think its worth the frustration I would probably have... Plus its terribly old, FAT might not work with my SCminiSD...


If you mean DSBASIC, then yes it probably won't work with SCminiSD. And you can program on the DS as well as programming on the computer. But when writing the program in the Nintendo DS you need line numbers. If writing it on the computer and then copying it to Nintendo DS, line numbers are not required.
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.

#126302 - HyperHacker - Sun Apr 22, 2007 2:21 am

I do wish there was some sort of BASIC-like scripting language I could use to hack up simple programs on the DS. DSBASIC, however, is very buggy and very, very limited.
_________________
I'm a PSP hacker now, but I still <3 DS.