Homebrew Homebrew game Issues with Nitrofox Makefile with Visual Studio Code environment setup

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
I am quite new to Nintendo DS development and am hoping to make a game on the platform. I started my project with Programmer's Notepad as that was what tutorials said I should use, but when I started refactoring after getting used to the different NitroFox functions I decided I wanted to switch to Visual Studio Code, a platform that I was much more used to and has better syntax highlighting. Thankfully I was able to find a GitHub repository that contained a setup VSC project to make things easier. My initial tests worked fine and compiled fine but when it came to adding the NitroFox library it failed to compile. I knew it had to be the Makefile so I swapped it with the one I had been using before with my Programmer's Notepad project. This didn't cause any compiler errors which seemed like a good sign, but attempting to run the file gives a DeSmuME warning that the ROM header is invalid. The ROM clearly doesn't run after that so I think it's safe to say that particular Makefile is not compatible with my VSC setup. The only issue is although I have knowledge of C++, I have no idea how Makefiles work or even where to start to fix my Makefile so it's able to have NitroFox and compile correctly. If anybody has any resources/a tutorial/anything that can help me please let me know :)

Due to my new account I am unable to link the VSC project template or the Makefile but the project is made by cuibonobo and can be found by googling "cuibonobo nds vscode", and the Nitrofox Makefile comes from the Nitrofox example projects (I can't remember which example I grabbed it from but as far as I'm aware they are all the same). Sorry!
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
I am quite new to Nintendo DS development and am hoping to make a game on the platform. I started my project with Programmer's Notepad as that was what tutorials said I should use, but when I started refactoring after getting used to the different NitroFox functions I decided I wanted to switch to Visual Studio Code, a platform that I was much more used to and has better syntax highlighting. Thankfully I was able to find a GitHub repository that contained a setup VSC project to make things easier. My initial tests worked fine and compiled fine but when it came to adding the NitroFox library it failed to compile. I knew it had to be the Makefile so I swapped it with the one I had been using before with my Programmer's Notepad project. This didn't cause any compiler errors which seemed like a good sign, but attempting to run the file gives a DeSmuME warning that the ROM header is invalid. The ROM clearly doesn't run after that so I think it's safe to say that particular Makefile is not compatible with my VSC setup. The only issue is although I have knowledge of C++, I have no idea how Makefiles work or even where to start to fix my Makefile so it's able to have NitroFox and compile correctly. If anybody has any resources/a tutorial/anything that can help me please let me know :)

Due to my new account I am unable to link the VSC project template or the Makefile but the project is made by cuibonobo and can be found by googling "cuibonobo nds vscode", and the Nitrofox Makefile comes from the Nitrofox example projects (I can't remember which example I grabbed it from but as far as I'm aware they are all the same). Sorry!
do you mean this?

1663812321824.png
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
where do I put this? I'm not sure I understand where nitrofox is located. you said examples, what example?
NitroFox is a library that you can include in your devkitPro libnds projects. It includes example projects similar to the ones that devkitpro includes and those example projects have a makefile. when i started working in programmers notepad i just took the makefile from those examples, put it in my project, and used it. it would go where the normal makefile would go. however now that ive moved to VS Code it no longer compiles correctly. if you dont have nitrofox and want to see these examples that i took the file from it can be found on source forge (once again my account is too new to post links sorry!)
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
I'm sorry, but that's beyond my abilities. I've added includes, at least with vs 2022, but I can find no way with vs code. plus, I don't know which folder you're adding.
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
where is lnflib? can't even run normal make due to missing that, and I've tried googling and nothing is found.
ive sent over 5 posts with this account so i should be able to send links now
https://github.com/Wolftr/ds-game/
this is the github repository with my setup. the makefile that is currently in the repository is the one that came with the template, and ive given you the one that came with night fox. remember to change the files in the .vscode folder so the filepaths work with your setup, and you can compile it with one of the tasks or with the ccr.bat included in the repository
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
ive sent over 5 posts with this account so i should be able to send links now
https://github.com/Wolftr/ds-game/
this is the github repository with my setup. the makefile that is currently in the repository is the one that came with the template, and ive given you the one that came with night fox. remember to change the files in the .vscode folder so the filepaths work with your setup, and you can compile it with one of the tasks or with the ccr.bat included in the repository
well, this is what happened in vs code terminal:

PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS> make
linking NitroFS.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/bin/ld.exe: c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/lib/thumb/ds_arm9_crt0.o: in function `IPCSync':
(.crt0+0x2f0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/home/GODREBORN/Desktop/nflib/makefiles/NitroFS/Makefile:56: /home/GODREBORN/Desktop/nflib/makefiles/NitroFS/NitroFS.elf] Error 1
make: *** [Makefile:162: build] Error 2
PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS>
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
well, this is what happened in vs code terminal:

PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS> make
linking NitroFS.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/bin/ld.exe: c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/12.1.0/../../../../arm-none-eabi/lib/thumb/ds_arm9_crt0.o: in function `IPCSync':
(.crt0+0x2f0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/home/GODREBORN/Desktop/nflib/makefiles/NitroFS/Makefile:56: /home/GODREBORN/Desktop/nflib/makefiles/NitroFS/NitroFS.elf] Error 1
make: *** [Makefile:162: build] Error 2
PS C:\Users\GODREBORN\Desktop\nflib\makefiles\NitroFS>
im not sure why youre getting errors when it comes to main
when using the makefile in the nflib\makefiles\NitroFS the program does compile a working rom oddly enough, i guess the file is slightly different then the one in the examples. there is still an issue of the file system not working properly but i can look into that on my own, thanks anyways
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
im not sure why youre getting errors when it comes to main
when using the makefile in the nflib\makefiles\NitroFS the program does compile a working rom oddly enough, i guess the file is slightly different then the one in the examples. there is still an issue of the file system not working properly but i can look into that on my own, thanks anyways
did you put those files in nds-lib or something else, then used an environmental variable to point to it? I'm trying to have the same setup as you.
 

Vulf

Member
OP
Newcomer
Joined
Sep 22, 2022
Messages
11
Trophies
0
Age
18
Location
Massachusetts
XP
49
Country
United States
did you put those files in nds-lib or something else, then used an environmental variable to point to it? I'm trying to have the same setup as you.
if you mean the makefile it should put be at the root of your project. the other files are exactly as i have them in the github. ive also updated the github to include the icon.bmp (fails to compile without) and put files in the nitrofiles folder (NFLib fails to set the directory when it is empty)
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
if you mean the makefile it should put be at the root of your project. the other files are exactly as i have them in the github. ive also updated the github to include the icon.bmp (fails to compile without) and put files in the nitrofiles folder (NFLib fails to set the directory when it is empty)
I'm talking about this: lnflib.a and it's corresponding include folder. there's no make install, so I don't even know where they're supposed to go in devkitPro.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Biomutant looks cool tho, may have to try that
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
    K3Nv2 @ K3Nv2: @BigOnYa...