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,105
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,105
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,105
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,105
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,105
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
  • K3Nv2 @ K3Nv2:
    From what people say pvp isn't even worth it
  • BigOnYa @ BigOnYa:
    I just been playing offline, and they give you a few bots here n there on your team to help battle. I don't think it's as funny as the other games tho, more battle oriented than humor, which kinda sucks, but I'm still early in it
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, doesnt the game have a campaign mode?
  • BigOnYa @ BigOnYa:
    Yea, and co-op, but you can also start a pvp session and battle just with friends. You get special skill cards (powers) the more you play. And higher value cards, but you can only enable so many cards at a time.
  • K3Nv2 @ K3Nv2:
    If you can find enough for it
  • BigOnYa @ BigOnYa:
    Toilet paper is considered the money, you collect and buy stuff with TP, kinda funny. Graphics are def better than the other games tho, I think they used Unity 5 engine.
  • Psionic Roshambo @ Psionic Roshambo:
    Look if I zoom in enough I can see the herpes!!!
    +1
  • BigOnYa @ BigOnYa:
    In fact I'm gonna go make a drink, roll a fatty n play some, good night to all!
    +2
  • Xdqwerty @ Xdqwerty:
    I bet most people at the time still watched it in black and white
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Many of them did before colour television was common.
  • SylverReZ @ SylverReZ:
    Likely because black and white TV was in-expensive.
    +1
  • K3Nv2 @ K3Nv2:
    It certainly wasn't inexpensive it cost the same as a new car back then
  • K3Nv2 @ K3Nv2:
    How much did a 1965 color TV cost?

    For example, a 21-inch (diagonal) GE color television in 1965 had an advertised price of $499, which is equal to $4,724 in today's dollars, according to the federal government's inflation calculator.
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, take into consideration how economy was back then
  • K3Nv2 @ K3Nv2:
    Yeah that's why they listed inflation rates
  • Xdqwerty @ Xdqwerty:
    Sorry didnt read that part
  • BakerMan @ BakerMan:
    @LeoTCK don't worry i knew he was joking
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    My first color TV was like 1984 or something lol
  • Psionic Roshambo @ Psionic Roshambo:
    19 inches it was glorious lol
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, If it doesn't fit, you should've gotten one smaller lol
    +2
  • SylverReZ @ SylverReZ:
    If a racoon can fit up to 8-inches then so be it
    +1
    SylverReZ @ SylverReZ: If a racoon can fit up to 8-inches then so be it +1