Mesen Debugger - Feedback/Feature Requests? (2018 edition)

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

I just tried it.

Is there any way to force Mesen to update the PPU viewer every frame (even if it is slow) ?
Seems like its updating every few frames, so I miss updates from time to time.
Alternatively, another workaround would be to leave the updated tiles on screen for a few milliseconds.
Both works for me.

-Mat
Sour
Posts: 890
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by Sour »

bleubleu wrote:Is there any way to force Mesen to update the PPU viewer every frame (even if it is slow) ?
Seems like its updating every few frames, so I miss updates from time to time.
Yea, this is an issue I noticed yesterday myself. The PPU viewer only updates at 15fps at most - if you slow down the emulation to 25%, you should see every frame (although that's probably not ideal). I'll look into adding a "refresh speed" option like in the memory tools (60fps should be possible, I think)
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

Oh that's a decent workaround. Ill give it a go.

-Mat
Sour
Posts: 890
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by Sour »

I added a "Refresh speed" option in the PPU viewer (defaults to ~30fps but can be set to 60fps). Seems to be working pretty nicely on my end, let me know if you have any issues with it.

And, forgot to say this this morning when I replied, but thank you for the donation!
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

Fantastic. I will give it a try.

I running a build for a couple nights ago. Did you change something in the debugger? Im having a hard time adding a watch to view variables as WORDs ({xxxx} notation). Seems like it doesnt work anymore.
The debugger clearly knows the right address as they are present in the "labels" list, but somehow it doesnt work. I can send a ROM if you need.

Also, hovering my mouse on the variable in the disassembly shows the correct BYTE/WORD value. Im puzzled.

-Mat
Attachments
Capture.JPG
Sour
Posts: 890
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by Sour »

I fixed a number of issues in the expression evaluator a couple of weeks ago, might have broken this in the process. I'll take a look.
Sour
Posts: 890
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by Sour »

This was actually a bug caused by the multi-byte labels. Since labels imported from CA65 are automatically converted to multi-byte labels when appropriate now, I imagine that's how you ended up finding this.

Should be fixed in the latest appveyor build.
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

Beautiful! It works! Thanks!

-Mat
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

Hi.

I got this today while debugging. First time ever. I think it happened when I was supposed to hit a breakpoint (?) Not sure.
Not sure the callstack is good enough to pinpoint the problem. Good luck :)

-Mat
Attachments
Capture.JPG
Sour
Posts: 890
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by Sour »

Uhm... haven't done any testing yet, but my best guess would be that there is a specific label that's causing the code to crash while trying to display a row in the disassembly. I think a label that ends in "+" might cause it, but manually creating that kind of label should no longer be possible as of a few weeks ago.

I'll do some testing on my end and see what I can find when I have a chance.
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

I might be running a build from 1+ month ago (whenever the last time you added me a feature!).
I will take a new nightly and give it a try.

-Mat
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

Hi!

I want to create myself some simple debugging Lua scripts to display the state of my hero, NPCs, etc. Is it possible to access debug info from Lua? This would avoid me having to hard-code addresses of stuff (which changes all the time during development).

Thanks!

-Mat
Sour
Posts: 890
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by Sour »

In the latest dev builds, there's a "emu.getLabelAddress" function that returns an address that can be used with emu.read/write. See: https://github.com/SourMesen/Mesen/blob/master/Docs/content/apireference/MemoryAccess.md#getlabeladdress

And that's another reason why I really need to get around to releasing a new release and updating the documentation website. Not enough hours in a day, and not enough days in a weekend :p
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by bleubleu »

Haha. Thanks is brilliant! Thanks!

I'll give it a try soon. I think I can make myself a really kickass visual debugger for gameplay with that.

-Mat
Kurrono
Posts: 1
Joined: Wed Aug 23, 2017 8:49 pm

Re: Mesen Debugger - Feedback/Feature Requests? (2018 editi

Post by Kurrono »

Is there a way to make the debugger the same way as bsnes... So when u write the registers for music to be detected before the music starts like using...

4100 using as breakpoint...to trigger the values in A,X,Y registers? Oh and by the way can u give me an explanation how Mesen audio msu1 routine is?
Post Reply