Mesen - Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

Re: Mesen - Emulator

Post by Sour »

bklD wrote: Mon Apr 10, 2023 7:39 am Unfortunately, this bug is back again with windows dpi scale 200%. It's not exactly the same, but you can't move the mouse to the bottom or to the right.
Thanks! Should be fixed now.

The latest dev build also upgrades to the latest (preview) version of the ui toolkit, so that might potentially have broken some things. It also fixes some memory leaks/allocation issues in the UI (mostly for the debug tools).
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

@sour the full screen issue i was encountering was caused by a setting on samsung tvs not the emulator. Sorry for the confusion I might have caused.

The way the emulator is handling things is fine and proper.
bklD
Posts: 36
Joined: Fri Sep 01, 2017 8:56 am

Re: Mesen - Emulator

Post by bklD »

Sour wrote: Mon Apr 10, 2023 8:45 pm
bklD wrote: Mon Apr 10, 2023 7:39 am Unfortunately, this bug is back again with windows dpi scale 200%. It's not exactly the same, but you can't move the mouse to the bottom or to the right.
Thanks! Should be fixed now.

The latest dev build also upgrades to the latest (preview) version of the ui toolkit, so that might potentially have broken some things. It also fixes some memory leaks/allocation issues in the UI (mostly for the debug tools).
Thank you! I will do some more testing in the coming days and will give you feedback if I find anything.
gzip
Posts: 23
Joined: Sat Mar 13, 2021 2:29 pm
Contact:

Re: Mesen - Emulator

Post by gzip »

Ran into a few more issues in the debugger.

There's a problem with multibyte labels in Assembler:
  • A line like LDA my_label+0,X produces <error: Invalid operands for instruction>
  • Removing +0 results in <error: Unknown label>
With "Show jump/sub labels" checked in Disassembly Settings:
  • The auto label is not displayed if the line also has a comment.
  • When editing a line with an auto label, the Code Editor shows <error: Invalid instruction> for the label and it has to be removed before applying.
Saving:
  • Debugger no longer has the option to Save ROM, only Save ROM as... Just an annoyance to have to always go through the dialog and confirm overwrite.
  • If a file is locked by another program during save then it fails silently and you're left with not knowing why it isn't actually saving.
I've also been experiencing a lot of hangs that never recover and I have to end the process. I haven't nailed down when it happens but it seems to have to do with multiple windows being open (Debugger, Tile Viewer, Tilemap Viewer, multiple instances of Memory Viewer etc). I'm usually in Memory Viewer when it hangs and search might be involved. I'm saving often because of this so the "Save ROM as" is extra steps.

I'm using version Mar 10, 2023.
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Emulator

Post by Sour »

007 wrote: Tue Apr 11, 2023 12:05 pm @sour the full screen issue i was encountering was caused by a setting on samsung tvs not the emulator. Sorry for the confusion I might have caused.
Good to know this is working properly, thanks!

bklD wrote: Tue Apr 11, 2023 12:56 pm Thank you! I will do some more testing in the coming days and will give you feedback if I find anything.
Thanks!

gzip wrote: Tue Apr 11, 2023 5:04 pm Ran into a few more issues in the debugger.
Thanks, these should all be fixed.

For the freeze, try to see if you can reproduce it in the latest build - it might be related to the freeze that others were getting a while ago, and the fix for that was changed when I upgraded the ui toolkit (because it was once again causing freezes). So with some luck it might be fixed already in the latest dev build. If not, try to keep note of what you had opened exactly & what you were doing/clicking when it freezes, and hopefully I'm able to find a way to reproduce it.

FYI, some of the features you requested in the tile editor and some of the other problems you reported last time (duplicates in find all occurrences, missing "+#" suffix to the label in the tooltips) were also added/fixed a few weeks ago.
gzip
Posts: 23
Joined: Sat Mar 13, 2021 2:29 pm
Contact:

Re: Mesen - Emulator

Post by gzip »

Very nice! I just downloaded the latest build and am already using several of the changes. I'll keep an eye out for the freezing issue, hopefully it's fixed.

In Tile editor would you consider swapping the right-click and shift-click actions? In YY-CHR, which is pretty much the best chr editor out there, right-click is select color and I keep on trying to use that in Mesen. :? So shift-click would be set transparent and right-click for select color.

The other awkward key combination in Tile Editor is ctrl-up for flip horizontal. Definitely not intuitive. I had suggested ctrl-left/right for flip horizontal, ctrl-up/down for flip vertical, and then ctrl-shift-left/right for rotate. Could use alt or some other combination as well. Either way, no biggie.

Btw, one of the features that's been very useful is Edit Tiles 2x2, 4x4 etc from Tilemap Viewer. Awesome work there!
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - Emulator

Post by tepples »

Mesen 2's uninitialized memory read breakpoint is triggering hundreds of times in a loop to clear RAM. It treats the dummy read after an instruction of the form sta $0700,x or sta ($00),y as an important read.

To reproduce:
  1. Open the attached ROM in Mesen.
  2. From the Debug menu, choose Debugger.
  3. Under "Break on..." check Uninitialized memory read. (In Mesen 1 or Mesen-X, under Options > Break Options, check Break on uninitialized memory read.)
  4. From the Game menu of the main window, choose Power cycle.
  5. Click the Continue button in the toolbar.
Mesen 1 and Mesen-X break on one uninitialized read at ldy $0700 and then continue through the rest of the program. Mesen 2 (both the March 1 and April 12 builds) breaks on ldy $0700 and then on every single sta ($00),y throughout all of work RAM.
Attachments
uninitialized-ram-clearing.zip
ROM and source code of RAM clearing loop
(4.6 KiB) Downloaded 25 times
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Emulator

Post by Sour »

gzip wrote: Tue Apr 11, 2023 10:02 pm In Tile editor would you consider swapping the right-click and shift-click actions? In YY-CHR, which is pretty much the best chr editor out there, right-click is select color and I keep on trying to use that in Mesen. :? So shift-click would be set transparent and right-click for select color.
Since the information tooltip is on shift, shift-click to clear would be a bit awkward. For now, right-click OR shift-click are both pick color, and ctrl-click is now "erase" (what right-click used to to). Hopefully that works a bit better.
gzip wrote: Tue Apr 11, 2023 10:02 pm The other awkward key combination in Tile Editor is ctrl-up for flip horizontal. Definitely not intuitive. I had suggested ctrl-left/right for flip horizontal, ctrl-up/down for flip vertical, and then ctrl-shift-left/right for rotate. Could use alt or some other combination as well. Either way, no biggie.
Actions can't have 2 different shortcuts, so it can't be both ctrl-left or ctrl-right for flip horizontal, it would be either ctrl-left or ctrl-right - neither of which is particular obvious on its own. So in the end I opted to have all 4 actions use ctrl for simplicity and then use ctrl-left/right for rotate since those are a pretty natural fit. That said, you can remap all of these shortcuts on your end (along with basically any other shortcut in the debugger) in debug->settings->shortcuts.

tepples wrote: Wed Apr 12, 2023 8:55 am Mesen 2's uninitialized memory read breakpoint is triggering hundreds of times in a loop to clear RAM. It treats the dummy read after an instruction of the form sta $0700,x or sta ($00),y as an important read.
Thanks - this is fixed, the NES and PCE debuggers will no longer trigger this break for their dummy reads
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Mesen - Emulator

Post by 93143 »

I can't find the Super FX control registers anywhere. I had to use no$sns to find out what Vortex's GSU clock setting was (bit 5 of $3037, which is supposedly write-only from the S-CPU's perspective and shows up as $00 in the memory viewer).

Am I missing something?
gzip
Posts: 23
Joined: Sat Mar 13, 2021 2:29 pm
Contact:

Re: Mesen - Emulator

Post by gzip »

Sour wrote: Thu Apr 13, 2023 8:03 pmFor now, right-click OR shift-click are both pick color, and ctrl-click is now "erase" (what right-click used to to). Hopefully that works a bit better.
Sounds good. Downloading now.
Sour wrote: Thu Apr 13, 2023 8:03 pmActions can't have 2 different shortcuts, so it can't be both ctrl-left or ctrl-right for flip horizontal, it would be either ctrl-left or ctrl-right - neither of which is particular obvious on its own. So in the end I opted to have all 4 actions use ctrl for simplicity and then use ctrl-left/right for rotate since those are a pretty natural fit. That said, you can remap all of these shortcuts on your end (along with basically any other shortcut in the debugger) in debug->settings->shortcuts.
Fair enough. Didn't realize they could be remapped.

One more (hopefully simple) request for Tile Editor while I'm here. I've been using the edit tiles 2x2, 4x4 (etc) options from Tilemap Viewer quite a bit. It gets difficult to tell when one tile ends and the next tile starts so it would be useful to show division lines similar to what Tilemap Viewer already does (probably with the same type of checkbox option).

Thanks for all your hard work!
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Emulator

Post by Sour »

93143 wrote: Fri Apr 14, 2023 2:49 am Am I missing something?
Nope, apparently I never added this back in Mesen-S, and didn't notice it was missing when making this new UI either.
I added a GSU tab in the register viewer with what should be most of the info that wasn't already displayed in the GSU debugger window itself.
CX4, DSP and Satellaview are all also missing a tab in the register viewer and could probably use one, I'll add them when I have a chance.

gzip wrote: Fri Apr 14, 2023 1:12 pm One more (hopefully simple) request for Tile Editor while I'm here. I've been using the edit tiles 2x2, 4x4 (etc) options from Tilemap Viewer quite a bit. It gets difficult to tell when one tile ends and the next tile starts so it would be useful to show division lines similar to what Tilemap Viewer already does (probably with the same type of checkbox option).
There's a "show grid" checkbox in the tile editor now
User avatar
Gilbert
Posts: 564
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: Mesen - Emulator

Post by Gilbert »

Sorry for potentially drifting a bit off-topic.

I recently accidentally stumbled across Naitou Kan's* Youtube channel.
He had conducted some live sessions debugging his own games (mainly DQ3 atm) and I think he's using MESEN for this, as the memory viewer is identical to Mesen's:
https://youtu.be/ABx4tpX9G7k?t=562
(I don't know whether other debugging emulators use a similar arrangement, but last I looked at it this shouldn't be FCEUX.)

If this is really the case, congratulations! :beer:

* Chief programmer of the original Dragon Quest III and IV, and later co-found Climax which produced games such as Shining and the Darkness and Land Stalker.
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

Noticed one more minor thing.


Mesen2 first run on windows.

You get the option of install files on computer in the documents directory or to keep the application portable into mesen2’s dir.


When you select mesen2 dir there are still files left behind in the documents dir.

If you simply leave them or delete them all is good, im only mentioning it in case the true intent would of been for mesen2 to not leave that behind.

Just reporting to report it, its not a huge issue at all.
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

Maybe a stupid question. What does Mesen stand for?

Just curious.
jadasse
Posts: 7
Joined: Mon Apr 03, 2023 9:23 pm

Re: Mesen - Emulator

Post by jadasse »

When it comes to playing NSFes, will seeking (moving a slider, or skipping seconds) be implemented?
Post Reply