running code on dsi

support for the ARM toolchain
Post Reply
cyberant
Posts: 2
Joined: Fri Jul 02, 2010 2:42 pm

running code on dsi

Post by cyberant » Sun Jul 04, 2010 12:38 pm

I started getting intersted in ds programming recently, and I tried running some codes that came with certain tutorials on my DSi.

When I compiled and tested the hello_world code that comes with the devkitpro, it ran perfeclty on my DSi. However, when I tried following drunken-coders' day1 tutorial running the code below, it ran well on an emulator but didn't run well on the DSi:

Code: Select all

#include <nds.h>
#include <stdio.h>
 
int main(void)
{
	int i;
 
	consoleDemoInit();
 
	videoSetMode(MODE_FB0);
 
	vramSetBankA(VRAM_A_LCD);
 
	printf("Hello World!\n");
	printf("www.Drunkencoders.com");
 
	for(i = 0; i < 256 * 192; i++)
		VRAM_A[i] = RGB15(31,0,0);
 
	swiWaitForVBlank();
 
	return 0;
}
Am I doing something wrong?

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: running code on dsi

Post by vuurrobin » Mon Jul 05, 2010 6:40 pm

didn't you ask that same question here?:

http://forum.gbadev.org/viewtopic.php?t=17309

cyberant
Posts: 2
Joined: Fri Jul 02, 2010 2:42 pm

Re: running code on dsi

Post by cyberant » Mon Jul 05, 2010 7:37 pm

err yes.. :oops:
At the time I was a bit impetuous because of the frustration of being stuck right at the begining and from not knowing whether the DSi is trustful for hombrew checking (or should I say, vice versa). (at the time I decided to ask here I haven't noticed the answer at gbadev)

Anyway, apologies for being hasty, and thanks for your interest :)

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

Re: running code on dsi

Post by WinterMute » Tue Jul 06, 2010 12:47 am

Not everyone that reads these forums reads the gbadev forums and vice versa, cross posting isn't a big deal.

As you've discovered exiting from the main loop will shut down the DS - in this case the DSi is completely irrelevant as it's running in DS mode.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest