It is currently Wed Oct 18, 2017 8:03 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Best debugger?
PostPosted: Wed Aug 24, 2016 7:57 pm 
Online
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2962
Location: Tampere, Finland
tokumaru wrote:
Quietust wrote:
If you're stepping one frame at a time, I think it always samples it during VBlank - if you use breakpoints and/or step past the CHR switches, you can get it to show what you want.

I see, so you can in fact see the state of the PPU at different points in the frame... But what if I'm not stepping or using breakpoints at all, because I want to see the PPU stuff changing as I play, without interruptions? It's there a way to do that?

I don't think so. The "display on scanline X" option in FCEUX is indeed quite useful.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Sat Aug 27, 2016 8:07 am 
Offline
User avatar

Joined: Sat Nov 13, 2004 9:43 pm
Posts: 301
Location: Ohio, USA
The very first fork of Nintendulator, by rveach has a lot of nice features for NES ROM hacking as well as for working on your homebrew games. Some of the features were implemented in the official version by Quietust. I have used Unofficial Nintendulator a lot and was helping to spot bugs and such.

http://rveach.romhack.org/Nintendulator/

_________________
Gil-Galad


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Sat Aug 27, 2016 2:27 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 285
lidnariq wrote:
As far as I know, the current NES debuggers are:

Just to add to this, Mesen also has a debugger: Screenshot 1 2 3

As far as debugging execution, it's pretty complete:
-View CPU/PPU state
-Run 1 cpu instruction, 1 PPU cycle, 1 scanline or 1 full frame at a time (+ step in/step over features)
-Conditional breakpoints on anything (CPU/PPU read/write/exec) that support complex expressions. (e.g: A+X>10 && scanline>=240)
-PPU viewer (nametables, chr rom/ram, sprite ram, palette ram)
-RAM viewer (for everything: CPU, PPU, Palette, Sprite, PRG ROM, CHR ROM)
-"Set next statement" action
-Option to display the PPU's output as it is being built, instead of after a full frame

I still have a lot of features I want to add to it (e.g: labels/symbols, editing of ram/ppu/cpu state, displaying the cpu/ppu's memory maps, etc.), so it's still very much a work in progress.

Also, it doesn't (yet) run under Linux (whether in Mono or Wine).
I had a working Linux build a while ago, but had some issues with input and ended up working on other features instead.


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Sat Aug 27, 2016 8:49 pm 
Online
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2962
Location: Tampere, Finland
Sour wrote:
lidnariq wrote:
As far as I know, the current NES debuggers are:

Just to add to this, Mesen also has a debugger: Screenshot 1 2 3

Looks pretty nice judging from the screenshots! Probably will be giving it a try.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Sun Aug 28, 2016 5:16 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 285
thefox wrote:
Looks pretty nice judging from the screenshots! Probably will be giving it a try.

If you do test it out, let me know what you think!
I never got any feedback on the debugging tools yet, so it'd be nice to have another person's opinion.


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Sun Aug 28, 2016 9:08 pm 
Offline

Joined: Sun May 03, 2015 8:19 pm
Posts: 89
I like the call stack with the actual ROM addr. That is useful. For the CHR viewer is there a way for it to be in 8x16 (large sprite) mode. I belive the FCEux debugger just added that.


Ahh I just noticed one thing that is super useful in FCEUX that I don't see a way to do in MESEN. Can you edit the rom contents on the fly? Does MESEN highlight the area's of the rom that have been executed/read from?

How is the netplay non MESEN? Is it an improvement over nestopia's netplay via peer to peer kailerra?


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Mon Aug 29, 2016 3:42 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 285
Thanks for the comments and the 8x16 sprite suggestion - I just added that since it was pretty easy to implement.

Currently all of the debugger is pretty much read-only, you can't modify the data. I do plan on adding those kinds of feature in the future, though.
I do use CDL files to keep track of what is code and data (shown at the bottom of the debugger window), but there is nothing highlighting the data segments.
Mesen only disassembles code that has actually been executed, though, so anything that is shown as code is something that has been executed (could be from a previous debugging session because CDL files are automatically reloaded).

As for Netplay, I haven't ever used Nestopia's, so I can't compare. But here's what Mesen does support though:
-Clients automatically load the same game as the host (assuming the game is found). The host can change game, pause the game, or load save states and the clients will stay in sync
-There is no way to lose sync between host & client (aside from potential bugs) - the host will never get any lag, but clients may get input lag based on their ping.
-The host's settings are applied on the client side during netplay (controllers, cheats, any option that can have an impact on emulation, etc.) and cannot be changed by the client while netplay is running.
-All players are free to select their controller - so the host isn't forced to be player 1, etc. It's also possible to have both controllers set as zappers and play 2-player zapper games (probably only "Chiller"). You can also decide to "spectate" the game, instead of selecting a controller. Technically you could have 1 host with 2-3 players, and say 30 people watching on top of that.
-It supports UPnP, so it will try to automatically enable port forwarding if the router supports it.

I haven't really gotten any feedback on netplay either - I have played some NES games with my brother quite a few times with it though, and it was pretty stable. (Haven't tested it much in the past months, however)


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Mon Aug 29, 2016 4:13 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19094
Location: NE Indiana, USA (NTSC)
Sour wrote:
-All players are free to select their controller - so the host isn't forced to be player 1, etc. It's also possible to have both controllers set as zappers and play 2-player zapper games (probably only "Chiller").

ZapPing in Zap Ruder also supports two guns. In fact, that's why Podge and Daffle are dressed in gray and red: those are the barrel colors of the two versions of the Zapper.

Quote:
You can also decide to "spectate" the game, instead of selecting a controller. Technically you could have 1 host with 2-3 players, and say 30 people watching on top of that.

Can you have a spectator record an input movie?

Quote:
-It supports UPnP, so it will try to automatically enable port forwarding if the router supports it.

Unfortunately, a lot of ISPs are putting subscribers behind carrier-grade network address translation (CGNAT), and UPnP might not help there.


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Mon Aug 29, 2016 6:22 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 285
tepples wrote:
Can you have a spectator record an input movie?

Yep, any client can record a movie.
And I just noticed I half-broke netplay in 0.4.2 and it will crash when trying to switch games to match the host's, whoops.
(Edit: Netplay crash fixed in 0.4.3)

Quote:
Unfortunately, a lot of ISPs are putting subscribers behind carrier-grade network address translation (CGNAT), and UPnP might not help there.

Besides switching the code to UDP and using UDP hole punching, there is not much that can be done here, I think, unfortunately.


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Wed Nov 16, 2016 8:53 am 
Offline
User avatar

Joined: Sat Jan 09, 2016 9:21 pm
Posts: 211
Location: Central Illinois, USA
rainwarrior wrote:
You can create label files that will show up in the debugger. There's a python script in an ca65 code example I wrote a while back that shows how to translate ca65 outputs into FCEUX's label files. (The file format is documented.)


Resurrecting this....I've done some searching through ca65's manual and couldn't find and answer to this, so thought I'd ask here.

As far as I can tell, ca65/ld65 doesn't put private/non-global symbols into the map or label file. (which makes sense, as it would be confusing to have symbol name conflicts in there). That being said, it would sure be nice to have my non-global procedures listed in there, to make debugging easier. I haven't thought of any good solutions (other than temporarily marking a routine as global when I want to debug it, so I can easily find the address for it). Are there other simple solutions I'm missing for this?

_________________
My games: http://www.bitethechili.com


Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Wed Nov 16, 2016 12:52 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5714
Location: Canada
gauauu wrote:
As far as I can tell, ca65/ld65 doesn't put private/non-global symbols into the map or label file.

Are you not using the -g flag when compiling/assembling? Without it I think only exported symbols are generated for an object. (In C anything global that's not static. In assembly, anything that has .export.)


Last edited by rainwarrior on Wed Nov 16, 2016 1:11 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Best debugger?
PostPosted: Wed Nov 16, 2016 1:02 pm 
Offline
User avatar

Joined: Sat Jan 09, 2016 9:21 pm
Posts: 211
Location: Central Illinois, USA
rainwarrior wrote:
Are you not using the -g flag when compiling/assembling? Without it I think only exported symbols are generated for an object.


Aha, that did it! Thanks much!

_________________
My games: http://www.bitethechili.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot], Revenant, Tomy and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group