Homebrew DeSmuME debugger version release

Yacker

Well-Known Member
OP
Member
Joined
Apr 3, 2013
Messages
182
Trophies
1
XP
1,543
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 Yacker,

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,566
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)
 

Yacker

Well-Known Member
OP
Member
Joined
Apr 3, 2013
Messages
182
Trophies
1
XP
1,543
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,566
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,795
Trophies
5
XP
28,519
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.
 

Yacker

Well-Known Member
OP
Member
Joined
Apr 3, 2013
Messages
182
Trophies
1
XP
1,543
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
    K3Nv2 @ K3Nv2: https://www.facebook.com/share/v/15TDJNLAFw/