Mesen - NES Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Sour
Posts: 736
Joined: Sun Feb 07, 2016 6:16 pm

Mesen - NES Emulator

Post by Sour » Thu Feb 11, 2016 10:10 pm

Mesen is a high accuracy emulator for Windows/Linux/Libretro - as far as I know, it passes more test ROMs than any other emulator currently available.

It has most features you would expect from an emulator (save states, online play, cheats, movies) and a lot of advanced options (Rewinding, overclocking, remove sprite limit, custom palettes, stereo effects, support HD packs, automatic updates, etc.). It also includes a very complete set of debugging tools (including Lua scripting).

Download: https://www.mesen.ca/download.php
Website: https://www.mesen.ca
Documentation: https://www.mesen.ca/docs/
Source (GPLv3): https://github.com/SourMesen/Mesen
Releases: https://github.com/SourMesen/Mesen/releases

The current version is 0.9.8 - released on June 23, 2019.
Last edited by Sour on Sun Jun 23, 2019 12:01 pm, edited 30 times in total.

User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Re: Mesen - NES Emulator

Post by miker00lz » Thu Feb 11, 2016 10:28 pm

This is an excellent emulator! Tons of features. Sound is great. It handled everything I threw at it, except for one little bug I found (which you're likely already aware of)... got a hang in Battletoads on the second level.

User avatar
Dwedit
Posts: 4233
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Mesen - NES Emulator

Post by Dwedit » Thu Feb 11, 2016 11:28 pm

Joystick emulation has bugs. Seems to not respect the strobe status, and always shifts bits out after the first write. I think you need to make reads not trigger shifts until the strobe bit is cleared.

Example joystick reading code that shows the bug:

Code: Select all

   ldx #1
   stx $4016
   lda $4016
   dex
   stx $4016
   and #$FC
   tax

   cpx $4016
   ror a
   cpx $4016
   ror a
   cpx $4016
   ror a
   cpx $4016
   ror a
   cpx $4016
   ror a
   cpx $4016
   ror a
   cpx $4016
   ror a
   cpx $4016
   ror a
   eor #$FF
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
tokumaru
Posts: 11437
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Mesen - NES Emulator

Post by tokumaru » Thu Feb 11, 2016 11:31 pm

Sounds cool, but...

mesen-error.png

Any idea of what could've gone wrong?

User avatar
oRBIT2002
Posts: 585
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Mesen - NES Emulator

Post by oRBIT2002 » Thu Feb 11, 2016 11:42 pm

Works fine here on my Windows 10 x64. Nice work!

User avatar
Dwedit
Posts: 4233
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Mesen - NES Emulator

Post by Dwedit » Thu Feb 11, 2016 11:45 pm

It references System.IO.Compression and System.IO.Compression.FileSystem, and those should come with .NET 4.0 or greater.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
tokumaru
Posts: 11437
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Mesen - NES Emulator

Post by tokumaru » Thu Feb 11, 2016 11:56 pm

Dwedit wrote:It references System.IO.Compression and System.IO.Compression.FileSystem, and those should come with .NET 4.0 or greater.

Thanks. Looks like I don't have 4.5 installed, which according to the site, is required. Will try to install it now.

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

Re: Mesen - NES Emulator

Post by Sour » Fri Feb 12, 2016 5:37 am

Thanks for the replies!

Wasn't aware of the Battletoads freeze on level 2, thanks for letting me know, I'll look into it.

Dwedit - It does look like the code for this is incorrect, thanks!

tokumaru - Not sure if you've had any success with installing .NET 4.5, but that's most likely the source of the error. Mesen uses .NET 4.5-specific features to read/extract data from zip files, which is the first thing it needs to do when starting up.

User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Re: Mesen - NES Emulator

Post by miker00lz » Fri Feb 12, 2016 9:21 am

This how it looked when it hung on Battletoads for me:

Image

It happened when I moved all the way to the top of the screen. Doesn't necessarily mean it's related, but that's when it did this in any case. The game ran perfectly until this point.

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Mesen - NES Emulator

Post by zeroone » Fri Feb 12, 2016 9:32 am

Awesome emulator. Very impressive work.

As for Battletoads, many threads on this forum have been dedicated to that exact stage 2 freezing issue. The nature of the issue is not fully understood. Hopefully, further research will yield a new test ROM.

User avatar
tokumaru
Posts: 11437
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Mesen - NES Emulator

Post by tokumaru » Fri Feb 12, 2016 10:13 am

Sour wrote:tokumaru - Not sure if you've had any success with installing .NET 4.5, but that's most likely the source of the error.

Yup, installing .NET 4.5 fixed it. It's a very nice emulator! The debug tools look promising.

zeroone wrote:The nature of the issue is not fully understood.

Isn't it just a scrolling/sprite 0 hit issue?

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Mesen - NES Emulator

Post by zeroone » Fri Feb 12, 2016 10:53 am

tokumaru wrote:Isn't it just a scrolling/sprite 0 hit issue?


Yes. And, it has been confirmed with trace logs. But, the test ROMs do not detect the problem. The details of the issue are not fully understood.

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Mesen - NES Emulator

Post by zeroone » Fri Feb 12, 2016 11:37 am

@Sour

Could you provide a zip download link? Antivirus software does not like downloading .exe files.

User avatar
tokumaru
Posts: 11437
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Mesen - NES Emulator

Post by tokumaru » Fri Feb 12, 2016 11:51 am

Can't you temporarily disable your Antivirus?

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Mesen - NES Emulator

Post by zeroone » Fri Feb 12, 2016 4:25 pm

tokumaru wrote:Can't you temporarily disable your Antivirus?


I can't :(

Post Reply