Welcome! Log In Create A New Profile

Advanced

Black screen of nothing...

Posted by borbzz 
Black screen of nothing...
May 06, 2009 03:03AM
Hi everyone,

First off, I want to thank everyone in this community for answering the questions I keep posting. You guys are really helpful!

So, I finally have all the StepMania sources compiling and linking correctly. I get my .elf and my .dol file, which is great. When I launch my app via the HBC, I get a black screen for a few seconds, and then I return back to the HBC. My question now is this: what is the minimum that needs to be done to see some console text on the screen?

For example, would the following code display anything on my screen:

int main(int argc, char* argv[])
{
     printf("Hello, world!");
     return 0;
}

I've read through the awesome CodeMii tutorials, but I can't tell from them whether I need to do the VIDEO_Init/SYS_AllocateFrameBuffer/console_init system calls in order to get console output showing (in my circumstance, it doesn't seem to make a difference either way).

Thanks for the help!
Re: Black screen of nothing...
May 06, 2009 03:31AM
Theres a hellowrold example program that comes with devkitPRO. Looking at that may help you.
Re: Black screen of nothing...
May 06, 2009 11:10AM
you will always need to call VIDEO_init first then configure the VIDEO mode, allocate framebuffers, initialize console, etc


You also need to call VIDEO_SetBlack(FALSE) in order to enable display (it's disabled by default) and set the current framebuffer to be displayed (VIDEO_SetNextFramebuffer), then flush VIDEO settings (VIDEO_Flush)

Those are minimal steps in order to print something on-screen.



Edited 1 time(s). Last edit at 05/06/2009 11:11AM by ekeeke.
Re: Black screen of nothing...
May 06, 2009 05:25PM
I forgot to mention, most of the time I've been black screened of nothing, it has been due to errors loading (in my case external) files. You may want to put checks in to display to screen if a file loaded correctly help yourself debug if there are any loading issues.
Re: Black screen of nothing...
May 06, 2009 06:47PM
Thanks for the suggestions. I have tried with all the VIDEO_Init calls and without, but get nothing. I do know that I eventually need to load a lot of external files, but not before I initialize the video system.

I'll try a few more things tonight when I get back to my Wii. (It doesn't help that I can't run the gcube emulator with my crappy Intel graphics chipset.)

Thanks again! :-)
Re: Black screen of nothing...
May 07, 2009 08:39PM
Start from a working example. See C:\devkitPro\examples\wii\template\source\template.c
Sorry, only registered users may post in this forum.

Click here to login