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

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

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

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

Post by bleubleu » Mon Jan 14, 2019 4:09 am

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: 815
Joined: Sun Feb 07, 2016 6:16 pm

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

Post by Sour » Mon Jan 14, 2019 5:47 am

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: 99
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

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

Post by bleubleu » Mon Jan 14, 2019 7:38 am

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

-Mat

Sour
Posts: 815
Joined: Sun Feb 07, 2016 6:16 pm

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

Post by Sour » Mon Jan 14, 2019 10:36 pm

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: 99
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

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

Post by bleubleu » Wed Jan 16, 2019 5:46 am

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: 815
Joined: Sun Feb 07, 2016 6:16 pm

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

Post by Sour » Wed Jan 16, 2019 5:55 am

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: 815
Joined: Sun Feb 07, 2016 6:16 pm

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

Post by Sour » Wed Jan 16, 2019 10:15 pm

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: 99
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

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

Post by bleubleu » Thu Jan 17, 2019 6:40 am

Beautiful! It works! Thanks!

-Mat

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

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

Post by bleubleu » Tue Feb 12, 2019 6:20 am

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: 815
Joined: Sun Feb 07, 2016 6:16 pm

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

Post by Sour » Tue Feb 12, 2019 9:34 pm

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: 99
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

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

Post by bleubleu » Wed Feb 13, 2019 7:05 pm

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: 99
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

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

Post by bleubleu » Sun Apr 28, 2019 5:01 am

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: 815
Joined: Sun Feb 07, 2016 6:16 pm

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

Post by Sour » Sun Apr 28, 2019 6:25 am

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: 99
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

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

Post by bleubleu » Sun Apr 28, 2019 7:12 pm

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 » Thu Oct 24, 2019 5:40 pm

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