- Joined
- Feb 26, 2017
- Messages
- 4,046
- Trophies
- 2
- Age
- 20
- Location
- Hollister, CA
- Website
- dionicio3.com
- XP
- 7,249
- Country
I'm trying to start developing some basic homebrew using NitroFS and NFLib, but I'm having issues getting a basic Hello World-type program running the way I want. Whenever I launch it with melonDS, either directly or by going through the DS Menu, I just get a black screen. Same thing happens when I boot it from the DSi Menu on a real DSi installed via NTM. However, if I boot into nds hbmenu on melonDS, or into TwilightMenu++ and launch it from there, it works fine. How do other homebrew programs that use NitroFS get around this issue?
This is what the program is supposed to do
This is what the program is supposed to do
C++:
#include <stdio.h>
#include <nds.h>
#include <filesystem.h>
#include <nf_lib.h>
volatile int frame = 0;
void Vblank() {
frame++;
}
int main(int argc, char **argv) {
consoleDemoInit();
// turn on MODE 0 on the top screen
NF_Set2D(0, 0);
swiWaitForVBlank();
// init nitroFS and set as root folder
nitroFSInit(NULL);
NF_SetRootFolder("NITROFS");
// init tiled bg system on the top screen
NF_InitTiledBgBuffers();
NF_InitTiledBgSys(0);
// init tiled sprites system on the top screen
NF_InitSpriteBuffers();
NF_InitSpriteSys(0);
// Load our Tiled Sprite
NF_LoadSpriteGfx("skiddo", 0, 16, 16);
NF_LoadSpritePal("skiddo", 0);
// transfer sprite to VRAM
NF_VramSpriteGfx(0, 0, 0, false);
NF_VramSpritePal(0, 0, 0);
// create sprite
NF_CreateSprite(0, 0, 0, 0, 0, 0);
// print shit
iprintf("Testing :)\n");
while(true) {
NF_SpriteOamSet(0);
swiWaitForVBlank();
oamUpdate(&oamMain);
swiWaitForVBlank();
/*scanKeys();
int keys = keysDown();
if (keys & KEY_A) {
iprintf("A\n");
}
if (keys & KEY_B) {
iprintf("B\n");
}*/
}
return 0;
}