Homebrew Homebrew app using NitroFS doesn't load correctly from stock DS/DSi Menu, loads fine from nds hbmenu and TwilightMenu++

Dionicio3

goat
OP
Member
Joined
Feb 26, 2017
Messages
4,046
Trophies
2
Age
20
Location
Hollister, CA
Website
dionicio3.com
XP
7,212
Country
United States
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
1700869787042.png


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;
}
 

Dionicio3

goat
OP
Member
Joined
Feb 26, 2017
Messages
4,046
Trophies
2
Age
20
Location
Hollister, CA
Website
dionicio3.com
XP
7,212
Country
United States

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan @ BakerMan:
    IT'S LIKE THAT ALMOST EVERY FUCKING METEOR SHOWER TOO
  • BigOnYa @ BigOnYa:
    You need to setup a time lapse camera, be neat
  • BigOnYa @ BigOnYa:
    I actually use a pic of it on my pc desktop cause its cool looking
  • Xdqwerty @ Xdqwerty:
    Apparently the pro versión of pizza boy is back aswell
  • Xdqwerty @ Xdqwerty:
    Gonna download the update
  • Xdqwerty @ Xdqwerty:
    Only 2 antiviruses detected the APK as a virus on virustotal so it Must be safe
  • Xdqwerty @ Xdqwerty:
    Cuz false positive
  • Xdqwerty @ Xdqwerty:
    Wait
  • Xdqwerty @ Xdqwerty:
    Eh nvm
  • BakerMan @ BakerMan:
    sadly, the clouds are setting in now

    hey BigOnYa the clouds are coming from the south, maybe check again
  • Xdqwerty @ Xdqwerty:
    Good night it's 11 pm
  • BakerMan @ BakerMan:
    night
  • BigOnYa @ BigOnYa:
    @BakerMan Nuh I'm in for the night playing Fallout 4, ill look tomorrow night
  • BigOnYa @ BigOnYa:
    Ok had let dog out, and yea still can't see it, oh well. Maybe tom night.
  • K3Nv2 @ K3Nv2:
    Ballocks these drives aren't allowing raid
  • BigOnYa @ BigOnYa:
    That sucks, well you will get double the space then atleast.
  • K3Nv2 @ K3Nv2:
    @Sicklyboy needs to come back
  • BigOnYa @ BigOnYa:
    Did you try Raid 10?
  • K3Nv2 @ K3Nv2:
    I did raid69
  • K3Nv2 @ K3Nv2:
    The physical disk keeps disabling in bios
  • BakerMan @ BakerMan:
    hey ken did you see the aurora tonight?
  • BakerMan @ BakerMan:
    also sorry it was too cloudy, that sucks
  • SylverReZ @ SylverReZ:
    @K3Nv2, This chat is sponsored by Raid Shadow Legends.
  • K3Nv2 @ K3Nv2:
    So I guess raid0 doesn't allow mismatched storage oh well
    K3Nv2 @ K3Nv2: So I guess raid0 doesn't allow mismatched storage oh well