Hacking Homebrew Misc How to Debug an NDS homebrew?

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
46
Trophies
0
XP
219
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
394
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
46
Trophies
0
XP
219
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!
 

mrparrot2

Well-Known Member
Member
Joined
Nov 29, 2021
Messages
106
Trophies
0
Age
29
Location
SP, Brazil
XP
570
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,034
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
46
Trophies
0
XP
219
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
  • BakerMan @ BakerMan:
    i mean, multiple have happened in my lifetime, but it's always been too cloudy
  • 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.
    SylverReZ @ SylverReZ: @K3Nv2, This chat is sponsored by Raid Shadow Legends.