Hacking Homebrew Misc How to Debug an NDS homebrew?

elezzar

Well-Known Member
OP
Newcomer
Joined
Apr 6, 2023
Messages
46
Trophies
0
XP
221
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
221
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
110
Trophies
0
Age
29
Location
SP, Brazil
XP
583
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,035
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
221
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
  • AncientBoi
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • Psionic Roshambo @ Psionic Roshambo:
    Pokemon Black I played that one a lot
  • K3Nv2 @ K3Nv2:
    Honestly never messed with Pokémon on ds much
  • mthrnite @ mthrnite:
    I played pokemon once, was bored, never tried again
  • Psionic Roshambo @ Psionic Roshambo:
    Oh Dragon Quest IX
  • K3Nv2 @ K3Nv2:
    Spent like 5 hours on switch one never touched it again
  • Psionic Roshambo @ Psionic Roshambo:
    Sentinel of the stary skies
  • K3Nv2 @ K3Nv2:
    Ds is 20 years old this year
  • Psionic Roshambo @ Psionic Roshambo:
    So MJ no longer wants to play with it?
  • K3Nv2 @ K3Nv2:
    He put it down when the 3ds came out
  • SylverReZ @ SylverReZ:
    @K3Nv2, RIP Felix does great videos on the PS3 yellow-light-of-death.
  • Jayro @ Jayro:
    Eventhough the New 3DS XL is more powerful, I still feel like the DS Lite was a more polished system. It's a real shame that it never got an XL variant keeping the GBA slot. You'd have to go on AliExpress and buy an ML shell to give a DS phat the unofficial "DS Lite" treatment, and that's the best we'll ever get I'm afraid.
    +1
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :shy::blush::evil:.... :tpi::rofl2:
    AncientBoi @ AncientBoi: ESPECIALLY for things I do to myself :shy::blush::evil:.... :tpi::rofl2: