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,210
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,210
Country
United States

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Materia_tofu @ Materia_tofu:
    im not a very bright individual, but we live and we learn
  • SylverReZ @ SylverReZ:
    @Materia_tofu, We do learn a lot from plenty of talented individuals.
  • Materia_tofu @ Materia_tofu:
    this is true! i learned how to make soundfont remixes from a friend back in 2021
    +1
  • BakerMan @ BakerMan:
    Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
    +2
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
    The Real Jdbye @ The Real Jdbye: you can report it and request deletion