Hacking Homebrew Misc How to Debug an NDS homebrew?

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
45
Trophies
0
XP
203
Country
United States
I'm making a DS homebrew with the latest DevKitPro and the Nightfoxlib template, I'm familiar with kind of debugger tools that can run right through the code line by line and show errors. is there any way i can do that or similar while making my DS homebrew? it would also be nice if there was a way to use visual studio codes intelisense

thanks in advance!
 

Cervi

Well-Known Member
Newcomer
Joined
Aug 25, 2022
Messages
46
Trophies
0
Location
Catalonia
XP
383
Country
Spain
Afaik the best way you can debug is by using printfs, or No$GBA, which lets you peek at the registers and the assembly being run, brake at certain points...

I don't think it would be possible to integrate any of that with one of the modern debuggers which run line by line, let you see variables and everything like that.
 

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
45
Trophies
0
XP
203
Country
United States
Afaik the best way you can debug is by using printfs, or No$GBA, which lets you peek at the registers and the assembly being run, brake at certain points...

I don't think it would be possible to integrate any of that with one of the modern debuggers which run line by line, let you see variables and everything like that.
thank you!
 

SylverReZ

Dat one with the Rez
Member
GBAtemp Patron
Joined
Sep 13, 2022
Messages
7,172
Trophies
3
Location
The Wired
Website
m4x1mumrez87.neocities.org
XP
22,016
Country
United Kingdom
Step one: Buy the developer hardware from eBay.

Step two: Debug your software on it.
Not an ideal setup for a homebrew developer, though. NO$GBA or Ghidra is the best choice.
 
  • Like
Reactions: Jayro

mrparrot2

Well-Known Member
Member
Joined
Nov 29, 2021
Messages
106
Trophies
0
Age
29
Location
SP, Brazil
XP
563
Country
Brazil
Grab an emulador like MelonDS and use nocashWrite function, available on both arm9 and arm7. The output shows in the terminal rather than on screen.
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,033
Country
United States
Thanks heaps I'll check it out 😁
This may be implied and/or obvious, but I would create a wrapper so you can easily swap out nocashWrite with printf for troubleshooting on real hardware. Emulators tend to be more forgiving than hardware so you will want to periodically test on hardware too.
 

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
45
Trophies
0
XP
203
Country
United States
This may be implied and/or obvious, but I would create a wrapper so you can easily swap out nocashWrite with printf for troubleshooting on real hardware. Emulators tend to be more forgiving than hardware so you will want to periodically test on hardware too.
noted, thanks again. I'll have to do some research and learn how to create a wrapper.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: I did use a bot for Diablo III though but no ban there lol