#1  
Old 15th October 2016, 08:26 PM
Gible_95 Gible_95 is offline
Junior Member
 
Join Date: Oct 2016
Posts: 3
Default Help! - How to use the P64 Debugger ?

Hey Y'all,

I'm a novice programmer and New to N64 Programming..... just messing around a bit with NUSystem libraries.

I'm wanting to test out the Project64 debugger. I'm wondering if there is a Guide that explains things a bit? There are many of the Debugger menus that I don't really understand just yet.

I am wanting to see a Debug window that can display the code execution in real time. Some of the other debuggers I've used for Sega SMS programming in ASM code, they had this type of feature.

It could also allow you to execute one line of code at a time... and see how it navigates through your program.

Does the debugger in P64 work the same way? if so how do I activate the Debug window?

Sorry if this seems really basic......I'm a Rookie at all this.

Any help would be appreciated.
Cheers!
-Gib
Reply With Quote
  #2  
Old 15th October 2016, 08:56 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,148
Default

IIRC the debuggers in Project64 have been removed for years for some reason. Maybe they were added back for the R4300 and I'm just not aware of it now, but any time I tried it that caused a breakpoint. The RSP debugger within the plugin has always worked though. I can explain that if you like.

Have you ever used Nemu64? That's still kind of unanimously the only N64 emulator out there with as much debugging feature as it has. I don't know that it has the real-time display that you mentioned, but I'm sure a few pplz are still on EFNet who could walk you through it.
Reply With Quote
  #3  
Old 15th October 2016, 09:48 PM
Gible_95 Gible_95 is offline
Junior Member
 
Join Date: Oct 2016
Posts: 3
Default RE: Help! - How to use the P64 Debugger ?

Quote:
The RSP debugger within the plugin has always worked though. I can explain that if you like.
That would be awesome if you could.....just to get me started...

Quote:
Have you ever used Nemu64?
No I have yet to try it.... is there a link for that you could pass me?
Or is it a simple google search?

I just don't want to end up with a bogus version.

-Gib
Reply With Quote
  #4  
Old 16th October 2016, 03:14 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,148
Default

I would guess that the mirror of the old site at http://nemu.emuunlim.org/downloads.php would be legit enough.

I haven't used Nemu64 or Project64 since I had Windows installed though. I had it pretty heavily customized with some stuff, but I imagine you just mean you want the original archive.

As for debugging the RSP, everything is under the Debugger > RSP... sub-menu. (The Debugger menu might be hidden by default; don't ask me why.)
  • Registers (from the "RSP Registers" menu, window obviously) will update in real-time as you step through the instruction words in the RSP commands window.
  • You might set a breakpoint or check the "Break on start of task" option somewhere under the Debugger menu. Either of these should pause to the current RSP instruction.
  • Setting RSP, CPU type from Recompiler to Interpreter might be a good habit when stepping through commands in the debugger. Nemu64 IIRC could debug while the dynarec was in use, but I don't imagine why or how this was implemented.
  • To step through and debug mostly only audio RSP tasks, check "Use HLE graphics" in the main Options dialog underneath the plugins selection. Likewise for only stepping graphics tasks: "Use HLE audio".

That's all I can remember offhand without having Project64 for Windows open right in front of me using something like WINE or whatever. I don't remember how to debug changes to memory or set breakpoints on RAM modifications. RCP slave processor can read from and write to main N64 RAM (SP DMA) as well as local RCP cache memory at SP DMEM.
Reply With Quote
  #5  
Old 16th October 2016, 05:09 AM
Gible_95 Gible_95 is offline
Junior Member
 
Join Date: Oct 2016
Posts: 3
Talking RE: Help! - How to use the P64 Debugger ?

That is awesome...

Thanks for all this info.
This will def. get me started.

Your help is much appreciated.
Cheers!
-Gib
Reply With Quote
  #6  
Old 19th October 2016, 04:53 AM
zilmar zilmar is offline
Core Team
Alpha Tester
Project Supporter
Administrator
 
Join Date: Jun 2005
Posts: 953
Default

http://origami64.net/showthread.php?tid=549
Reply With Quote
  #7  
Old 25th January 2017, 04:43 PM
Olivieryuyu Olivieryuyu is offline
Alpha Tester
Project Supporter
Member
 
Join Date: Nov 2005
Posts: 32
Default

Quote:
Originally Posted by zilmar View Post
Would it be possible to improve the debugger of PJ64 in the same way than Nemu?

I am using Nemu currrently but some games just don't run on it. Mostly interested in:

- RSP breakpoint
- After each breakpoint the value of the registers (in Nemu there are just small boxes but it could made better)
- RDP commands screen (less buggy than Nemu though, sometimes results is odd)

It would be good for ucode RE.

Thx
Reply With Quote
  #8  
Old 28th January 2017, 04:18 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,148
Default

The RSP debugger supports breakpoints and real-time updates of the RSP registers after breakpoints, but it doesn't support conditional automatic breaks like Nemu64 does. Like break if some op-code is found or a segment of memory is written to etc..
Reply With Quote
  #9  
Old 18th February 2017, 02:52 PM
Olivieryuyu Olivieryuyu is offline
Alpha Tester
Project Supporter
Member
 
Join Date: Nov 2005
Posts: 32
Default

Quote:
Originally Posted by HatCat View Post
The RSP debugger supports breakpoints and real-time updates of the RSP registers after breakpoints, but it doesn't support conditional automatic breaks like Nemu64 does. Like break if some op-code is found or a segment of memory is written to etc..
Yes indeed but not seeing what RDP does then is a real pity. I succeeded to reverse few customs commands of this 64 de Hakken! Tamagotchi Minna de Tamagotchi World. Game is now playable. Nemu showed me exactly what happens in the RDP so i could figure out the matter. But without that, it is

https://github.com/gonetz/GLideN64/issues/268

I have also an issue: microcode uses overlays so the code changes place all the time. How can we do the RE in this way?

For SGI microcode it is fine, but Factor 5 microcode are big and then it is really impossible to follow things ...

Last edited by Olivieryuyu; 18th February 2017 at 07:20 PM.
Reply With Quote
Reply

Tags
debug help, debugger guide, debugging, p64 debugger

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 06:08 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.