Project64 Debugger 1 2 3 4 »
Users browsing this thread: 1 Guest(s)

Some games that I would like to hack don't run well in Nemu, so I'm making a new debugger for Project64



Download

Current snapshot: https://github.com/shygoo/project64/releases/download/snapshot3/pj64d-snapshot-3.zip
Daily-ish builds: http://shygoo.net/pj64d/?C=M;O=D
Source: https://github.com/shygoo/project64



Setup
Project64d.exe needs plugins to run! You can download and install the official Project64 from here: http://www.pj64-emu.com/downloads/func-startdown/124/ and drop Project64d.exe and other files from the snapshot zip into Project64's directory.

For the debugger to work, Project64's debugging mode must be enabled and the CPU core style needs to be set to interpreter for the game you wish to hack. Note that emulation has to be completely stopped and restarted for interpreter mode to take effect. For the best experience, I would also recommend unchecking "Pause emulation when window is not active".
Spoiler: Settings
Options > Settings...
  Options > Advanced > Uncheck "Hide advanced settings"
  Advanced > Check "Enable debugger"
  Config: [Game title] > Recompiler > Set "CPU core style" to Interpreter

[Image: 948c42a3b1479f914d5bf613153099d2.png]

[Image: ede825885e6c72c9dd8d0cc9f06b2165.png]



Usage
To toggle a PC breakpoint, double click an instruction. To add a memory breakpoint, right click bytes in the memory viewer or press the + button in the debugger window .



Spoiler: Demos
Trapping a call to an object spawning function to replace a bob-omb's explosion with a chuckya




Javascript




Javascript socket



Spoiler: Todo notes
Scripting:
Add thread safety to console input
Add right-click context menu to script list (Start script/Stop script, Open in default editor)
Add clear console button
Add button with dynamic context menu of input history
Make "Run" button work
Show number of waiting events in the instance status bar

Debugger:
Add PC register textbox
Add input for stack viewer
Add auto refresh
Add right-click context menu to instructions list (Follow jump, Open in memory viewer)
Check ram size
Color register textboxes when they are being used
Highlight branch/jump targets
Highlight PC row in list with a different color if branch/jump is about to be taken
Fix scrollbar thumb
Fix mousewheel weirdness
Add instruction commenting
Add inline assembler that can save to ROM using DMA log info
Add execution logging option  

Symbols:
Show values & auto refresh
Allow value input
Add option to auto generate symbols for common functions

If you have any suggestions or bug reports feel free to post them!
(This post was last modified: 17-03-2017, 10:40 PM by shygoo.)

Embedded javascript api which will be part of the next snapshot



I just wanted to say, having had the same problem wit Nemu, that this is fantastic! Already it's great and your TODO list looks to make it even better.
Thanks for releasing it Smile

Once nice feature would be highlighting uses of the selected instructions registers, so for example, if the selected instruction is LW T9, 0x0000(A0) you can quickly scan up the list to see where A0 is set, and down the list to see where T9 is used.
(This post was last modified: 26-09-2016, 07:23 AM by jaytheham.)

Awesome idea! It will be included in the next release. https://i.gyazo.com/e7f6beac9735b34d764808d1f233f08c.gif

Will it be possible to keep track of the calling stack with this debugging tool?

One thing that might be interesting to see for the purposes of reverse engineering is to be able to define labels for jump and branch instructions, preferrably through some external file. Would be really great is if it also allowed some sort of scripting so that you could define labels for code addressed to virtual spaces. For example, Ocarina of Time's boot animation code is addressed to 80800000, which is then translated to someplace in RAM

Function labeling combined with a callstack would be truly great Big Grin

Thanks so much for this Shygoo! Here's a peak at what I've cooked up with this PJ64 debugger that he's put together:



New snapshot is up - here are some notable new features:
Added javascript api (basic support; just runs whatever is in _api.js & _script.js in a single context on startup)
Made GPR registers in debugger proper 64-bit
Added PI register tab
Memory write breakpoints now catch cart-to-ram DMA transfers
Other features like register usage highlighting, a stack frame viewer, and a symbols manager have also been started - these are far from finished though. Smile

See /apidoc.htm for javascript api documentation

Eggscellent

Project64 Debugger 1 2 3 4 »
Users browsing this thread: 1 Guest(s)