Homebrew DeSmuME debugger version release

Poketard

Well-Known Member
OP
Member
Joined
Apr 3, 2013
Messages
180
Trophies
1
XP
1,490
Country
United States
I got tired of trying to use No$GBA's debug tools that just seemed to hate my PC, so I made my own modified version of DeSmuME with all the tools I wanted.

Features: code breakpoints, memory breakpoints, stepping through code

How to use:

There is new breakpoint options in the disassembler and memory viewer. Type an address in the box and press "add breakpoint" to add a new breakpoint of the respective type; select "Delete Breakpoint" to delete a breakpoint of the respective type from the top of the list. Use the arrow buttons to scroll the list.

Note: memory break points don't update the disassembly window, you'll have to refresh yourself. If you want to find the current code position, just copy what's in PC and scroll up 2 (no, I don't know why PC shows 2 operations ahead, that's just how it is in DeSmuME)

The rest should be self explanatory enough to anyone familiar with debugging.

Download: https://github.com/Yackerw/desmume/releases/tag/DebugRelease_0_1
 
Last edited by Poketard,

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,565
Country
Chile
I got tired of trying to use No$GBA's barely functional debug tools, so I made my own modified version of DeSmuME with all the tools I wanted.

Features: code breakpoints, memory breakpoints, stepping through code

How to use:

There is new breakpoint options in the disassembler and memory viewer. Type an address in the box and press "add breakpoint" to add a new breakpoint of the respective type; select "Delete Breakpoint" to delete a breakpoint of the respective type from the top of the list. Use the arrow buttons to scroll the list.

Note: memory break points don't update the disassembly window, you'll have to refresh yourself. If you want to find the current code position, just copy what's in PC and scroll up 2 (no, I don't know why PC shows 2 operations ahead, that's just how it is in DeSmuME)

The rest should be self explanatory enough to anyone familiar with debugging.

Download: https://github.com/Yackerw/desmume/releases/tag/DebugRelease_0_1

ARM Processors have the prefetch unit (+8 Bytes, 2 ARM opcodes, 4 THUMB v1 opcodes) and the relative PC offset always starts +4 bytes from it. That makes 12bytes of prefetch which is how surrounding opcodes / data stand from the Program Counter. (r15)
 

Poketard

Well-Known Member
OP
Member
Joined
Apr 3, 2013
Messages
180
Trophies
1
XP
1,490
Country
United States
ARM Processors have the prefetch unit (+8 Bytes, 2 ARM opcodes, 4 THUMB v1 opcodes) and the relative PC offset always starts +4 bytes from it. That makes 12bytes of prefetch which is how surrounding opcodes / data stand from the Program Counter. (r15)
Ah, I didn't know that. I'm relatively new to DS hacking, but I just found the entry point to be really rough with currently existing tools, so I opted to try and fix that myself. So I don't actually know that much about ARM yet.
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,565
Country
Chile
Ah, I didn't know that. I'm relatively new to DS hacking, but I just found the entry point to be really rough with currently existing tools, so I opted to try and fix that myself. So I don't actually know that much about ARM yet.

Doesn't matter! I've wasted a good few years with ARM Cores, if you have any questions, ask away.

You should read about the PSR bits:

http://www.cs.otago.ac.nz/cosc440/readings/arm-syscall.pdf

page 2. ARM Cores (and programs built with it, NDS games, etc), have different ARM processor modes. Such as software interrupt ( a software request using hardware resources), where the (swi)stack pointer, LR,PC and specific registers will be swapped in, saving current processor mode in CPSR register. Once the request is done it'll go back to last PSR mode (saved in SPSR register), then restoring such processor mode registers, as said in (PDF) page 2.
 
Last edited by Coto,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
More debug options is nice, especially something between cheats and simple viewers and long chain regex style breakpoint options (nice to have but sometimes I just want to have a simple one). no$gba usually did OK for me though. Either way will have to have a look at this later.
 

Poketard

Well-Known Member
OP
Member
Joined
Apr 3, 2013
Messages
180
Trophies
1
XP
1,490
Country
United States
Huh. I wonder if the no$gba problems were just something to do with my PC or something, then; but I for the life of me couldn't get break points working properly. Drove me to insanity...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
  • K3Nv2 @ K3Nv2:
    Lol newegg+
    Screenshot-20240423-053504-Gmail.jpg
  • S @ salazarcosplay:
    does update 19 really block it
  • SylverReZ @ SylverReZ:
    Update 19 never came out yet. Just the 18.1.
    SylverReZ @ SylverReZ: Update 19 never came out yet. Just the 18.1.