Mesen - NES Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
Eugene.S
Posts: 309
Joined: Sat Apr 18, 2009 4:36 am
Location: Russia (UTC+3)
Contact:

Re: Mesen - NES Emulator

Post by Eugene.S »

Mesen have nice option to force user-specified refresh rate in fullscreen mode.
User can select it from drop-down list of refresh rates that your GPU/Dispaly support:

Image

Nestopia had "auto" refresh rate function in fullscreen depending of region.
For NTSC, emulator try to set 60 or 120 Hz, prefer higher value, if hardware supported it.
For PAL/Dendy, emulator try to set 50 or 100 Hz, prefer higher value, if hardware supported it.
It was really nice when i had CRT, which supported 60-75-85-100-120Hz:

Image

I guess nice idea is combine this methods.
To make an separate "requested refresh rate" options.
Two drop-down menus where user can set prefferred hardware refresh rate: one for NTSC, second for PAL/Dendy

Fortunately, lastest modern LCD displays have wide range of refresh rates native support, usually 50-144Hz
as well, as AMD FreeSync or Nvidia G-Sync technologies for automatic refresh adjustment.
mkwong98
Posts: 273
Joined: Mon May 30, 2011 9:01 pm

Re: Mesen - NES Emulator

Post by mkwong98 »

Interesting idea. I'll keep this in mind.
User avatar
Aclectico
Posts: 4
Joined: Thu Aug 09, 2018 10:56 am

Re: Mesen - NES Emulator

Post by Aclectico »

I just made a post on the emulation subreddit when it comes to Mesen. I figured I'd also post it here. It is in response to some apparent user confusion when it comes to the latest Mesen forks that emerged shortly after development on the main Mesen repository ceased. I'm hoping this should help to clear things up for the user base.

I just finished a couple of DMs with mkwong98, Dwedit, and NovaSquirrel. The feedback was very helpful and it's great to see all the interest in the Mesen Emulator. There are a lot of talented and passionate people involved.

Recently, mkwong98's build has been housing the most recent changes. The NovaSquirrel fork does receive these updates from time to time. However, if users are looking for the most recent build, the consensus at this time seems to be that the mkwong98 version should really be utilized.

So, in short - For simplicity's sake, I would encourage users to utilize the mkwong98 variant.

https://github.com/mkwong98/Mesen/releases

Mkwong98, Dwedit, and NovaSquirrel - thanks again for the latest feedback. Feel free to chime in if you have any other thoughts to add.
User avatar
Dwedit
Posts: 4658
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Mesen - NES Emulator

Post by Dwedit »

It is notably hard to find mkwong98's repository using the Network feature on Github. If you start at the SourMesen repository, and look at "Network", it picks the name of the most recent person who imported changes from that repository.
mesen-active-github2.png
mesen-active-github2.png (2.91 KiB) Viewed 3247 times
When I looked a couple days ago, it listed the mkwong98 repository as "NovaSquirrel", now it lists it as "RokkumanX".
You need to mouseover the orange graph to even see mkwong98 anywhere at all.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
nesrocks
Posts: 512
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Mesen - NES Emulator

Post by nesrocks »

Does Mesen have a "break on unlogged opcode" option? I just figured this would be incredibly useful for reverse engineering games. FCEUX doesn't have it. I tried adding it to FCEUX but I don't know enough C++ to do it.
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!
User avatar
Controllerhead
Posts: 293
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Mesen - NES Emulator

Post by Controllerhead »

nesrocks wrote: Wed Jun 23, 2021 5:40 am Does Mesen have a "break on unlogged opcode" option?
Ya

Image
Image
User avatar
nesrocks
Posts: 512
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Mesen - NES Emulator

Post by nesrocks »

No, not that. Unlogged code as in unexecuted/unread.
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Mesen - NES Emulator

Post by unregistered »

nesrocks wrote: Wed Jun 23, 2021 5:40 am Does Mesen have a "break on unlogged opcode" option? I just figured this would be incredibly useful for reverse engineering games.
That would be super easy to implement, if is not hidden somewhere. Every byte in the .cdl file that’s a 00 is unlogged. And Mesen edits the cdl file all the time while running, so it should be simple for mkwong98 to just add an option to break whenever a 00 .cdl byte is accessed. :)

And it could be more specific to break when a 00 .cdl byte inside a function (including/after a .cdl byte with bit7 set) is accessed. I believe bit0 is set when an instruction’s byte(s) has been accessed.
Last edited by unregistered on Tue Dec 07, 2021 10:42 am, edited 1 time in total.
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Mesen - NES Emulator

Post by unregistered »

unregistered wrote: Wed Jun 23, 2021 2:49 pmAnd it could be more specific to break when a 00 .cdl byte inside a function (including/after a .cdl byte with bit7 set) is accessed. I believe bit0 is set when an instruction’s byte(s) has been accessed.
Sigh, since bit0 is set when an instruction has been accessed, you just simply break after visiting an $80 cdl byte.

CDL bytes:
bit7 set == function start
bit0 set == byte has been accessed
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Mesen - NES Emulator

Post by unregistered »

Oooh, here:

https://github.com/mkwong98/Mesen/relea ... 9.9-210715

mkwong98’s latest release contains
1.) a note in the PPU Viewer’s Sprite Viewer tab that its reported y value is now “Y = OAM[0] + 1”

Cool!

2.) A break option in Debugger’s Options>Break Options>Break on unlogged code

Cool!

3.) other changes

—-
Sry, my new note above was pointless bc this mkwong98 release happened a long time ago.
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Mesen - NES Emulator

Post by unregistered »

—-
Does anyone know how to see exactly what Mesen is doing while attempting to run a nes file?


My asm6 game just creates a black screen. If I could view what Mesen is doing while the forever black screen is there, then fixing this massive problem would probably be possible.


EDIT:
unregistered wrote: Wed Dec 08, 2021 5:17 pm ^Nintendulator says:
Loading file ‘(my file path here)’
iNES ROM image loaded: mapper 1 (MMC1) - Fully supported!
PRG: 512KB;CHR: 0KB
Flags: Battery-backed SRAM, Vertical mirroring
Loaded successfully!
Loaded SRAM (8192 bytes)
Performing hard reset…
Reset complete.
And… then it just does nothing with a black screen.


(Using Nintendulator Version 0.970)
Using Mesen’s debugger is impossible bc the game must never process past reset, according to Nintendulator, for some reason.
User avatar
nesrocks
Posts: 512
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Mesen - NES Emulator

Post by nesrocks »

Load the game, pause the emulator, open the debugger, reset the game and then advance to the next instruction on the debugger.
Last edited by nesrocks on Tue Dec 21, 2021 6:06 am, edited 1 time in total.
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Mesen - NES Emulator

Post by unregistered »

nesrocks wrote: Fri Dec 10, 2021 3:39 pm Load the game, pause the emulator, open the debugger, reset the game and then advance to the next instruction on the debugger.
Thank you nesrocks! 😊 Sadly, even now, after pausing the emulator, Mesen’s debugger doesn’t open (the entire debug menu is grayed out).
Fiskbit
Posts: 491
Joined: Sat Nov 18, 2017 9:15 pm

Re: Mesen - NES Emulator

Post by Fiskbit »

Go Tools -> Log Window and see what Mesen has to say about the ROM you've tried to load. I'd bet your header does not match the ROM size or something like that.
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Mesen - NES Emulator

Post by unregistered »

Fiskbit wrote: Fri Dec 10, 2021 8:15 pm Go Tools -> Log Window and see what Mesen has to say about the ROM you've tried to load. I'd bet your header does not match the ROM size or something like that.
You are exactly right Fiskbit! 👍😊 Thank you so much! 😀

[iNes] Invalid file (length does not match header information) - load operation cancelled.
Time to adjust the header.
Post Reply