Mesen - NES Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

maseter
Posts: 23
Joined: Fri Nov 18, 2016 7:56 am

Re: Mesen - NES Emulator

Post by maseter »

To sidestep this selection dialogue, like when FdsBios.bin is present.

Because most bioses floating around on the net are indeed disksys.rom!

Compile-time conditions? How long does it take to compile Mesen?
Cheers :beer:
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples »

"Compile-time conditions" refers to conditional compilation, the means activated by #if in C++ or .if in 6502 assembly. The build system passes variables to the compiler or assembler, and the compiler or assembler uses those variables to determine which of two or more code paths to translate.
maseter
Posts: 23
Joined: Fri Nov 18, 2016 7:56 am

Re: Mesen - NES Emulator

Post by maseter »

Ok thanks for clearing that up, IANAC, I am not a coder! :)

Sour: What does Libretro support exactly mean on your roadmap, Libretro core support, or a mesen core for Libretro?
Cheers :beer:
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - NES Emulator

Post by Sour »

Mesen probably compiles in under a couple of minutes on most computers, I would imagine (except very low end stuff).
Like tepples said, this was mostly about conditional compilation - I try to avoid this whenever I can because it complexifies the code, build process and also increases the odds of a specific combination of conditional flags resulting in a build that just doesn't work anymore (e.g because I did not test it).

Yes, the idea (eventually) is to make a Libretro core - this is not really a huge priority for me at the moment (esp. since I have never used Retroarch before) due to the amount of research it would imply. There's also the fact that a Mesen core may not run at full speed on some low-spec hardware (which would reduce its usefulness in many scenarios). It is listed in the roadmap because of the excessively large number of times I get asked the question "Will you make a libretro port?" :)
maseter
Posts: 23
Joined: Fri Nov 18, 2016 7:56 am

Re: Mesen - NES Emulator

Post by maseter »

I'd much rather see other libretro cores work in Mesen!

How about including a public domain screensaver, instead of that black screen:

ImageImage

That or at least have some snow, like zsnes! :)

fireplace https://forums.nesdev.com/viewtopic.php?f=22&t=13639
nestify viewtopic.php?f=22&t=8472

I would also advise not using Y/Z as button inputs. As Y & Z are switched around on non US keyboards! Better map X&C for B&A.
Cheers :beer:
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - NES Emulator

Post by Sour »

Making Mesen into a libretro core host isn't going to happen - that'd essentially be the same as scrapping everything I've done and making something else altogether :p
The black screen is already used by the "Game Selection Screen" since 0.9.0 or so - the only time you'll see the black screen is on the first time you run Mesen, before loading any game.


On an unrelated note, I finally finished documenting (almost) everything there is to say about Mesen: https://www.mesen.ca/docs
It took far too much time to write, but it goes over most options, tools, all the debugging tools and some more stuff - there's still a small number of things left to document, but it should be a decent start.
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: Mesen - NES Emulator

Post by Rahsennor »

Sour wrote:And I could argue that worrying about 0.06$ worth of SSD disk space (or < 0.01$ worth of HDD space) is also equally as silly :)
Who said anything about disk space? It's my ISP I'm worried about. Have pity on us poor farmers.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples »

Sour wrote:
Rahsennor wrote:181 MB for a NES emulator is just silly.
And I could argue that worrying about 0.06$ worth of SSD disk space (or < 0.01$ worth of HDD space) is also equally as silly :)
Verizon Wireless offers four LTE Internet Installed plans:
  • $60 for first 10 GB in a month, $10 per GB thereafter
  • $90 for first 20 GB in a month, $10 per GB thereafter
  • $120 for first 30 GB in a month, $10 per GB thereafter
  • $150 for first 40 GB in a month, $10 per GB thereafter
Once a subscriber is in overage, a 181 MB download costs roughly $1.81. 100 MB here, 200 MB there, and soon it starts adding up to real money.

Exede offers three Exede Satellite Internet plans:
  • $50 for first 12 GB of 12 Mbps data outside 3 AM to 6 AM local time; 1 Mbps thereafter
  • $75 for first 25 GB of 12 Mbps data outside 3 AM to 6 AM local time; 1 Mbps thereafter
  • $100 for first 50 GB of 12 Mbps data outside 3 AM to 6 AM local time; 1 Mbps thereafter
Once a subscriber is in overage, a 181 MB download can take half an hour.

To put it another way: There's a reason the "computer" furniture in Animal Crossing: Wild World for Nintendo DS and Animal Crossing: City Folk for Wii makes dial-up noises, despite the games offering Wi-Fi multiplayer from release through May 2014.
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - NES Emulator

Post by Sour »

I fully understand that in some very specific conditions 180mb may be a lot - and in those specific conditions, you also have the same issue with a very large amount of software in general.

Like I said, it is what it is - the Mono dependency is there to stay, I do not have the interest (nor the time nor energy) to rewrite 1+ megabyte of UI code (which would literally take months of my time at this point). I try to make Mesen as accessible and user friendly as I possibly can - but I am not getting paid for this, and have already sunk a few thousand hours of my free time coding this. You cannot expect a single developer making an emulator for fun to cater to the needs of every single individual on the planet - if you cannot justify the download size for Mono on Linux, then all I can really say is "sorry, use something that matches your needs better".
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Mesen - NES Emulator

Post by gauauu »

Sour wrote:I fully understand that in some very specific conditions 180mb may be a lot - and in those specific conditions, you also have the same issue with a very large amount of software in general.

Like I said, it is what it is - the Mono dependency is there to stay, I do not have the interest (nor the time nor energy) to rewrite 1+ megabyte of UI code (which would literally take months of my time at this point). I try to make Mesen as accessible and user friendly as I possibly can - but I am not getting paid for this, and have already sunk a few thousand hours of my free time coding this. You cannot expect a single developer making an emulator for fun to cater to the needs of every single individual on the planet - if you cannot justify the download size for Mono on Linux, then all I can really say is "sorry, use something that matches your needs better".
Just wanted to chime in and say thanks for what you're doing, and I agree with you. You've done great work for the community with this project. If the download size is too big for someone, they can use another option. It's not your job to worry about all those edge cases.
User avatar
nesrocks
Posts: 563
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Mesen - NES Emulator

Post by nesrocks »

I see there's hd audio replacement. Is that a new feature? Are there games using this? I searched google for something similar recently and couldn't find anything so I thought it wasn't possible.
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!
https://www.patreon.com/bitinkstudios <- Support me on Patreon!
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - NES Emulator

Post by Sour »

gauauu wrote:Just wanted to chime in and say thanks for what you're doing, and I agree with you. You've done great work for the community with this project. If the download size is too big for someone, they can use another option. It's not your job to worry about all those edge cases.
Thanks!
nesrocks wrote:I see there's hd audio replacement. Is that a new feature? Are there games using this? I searched google for something similar recently and couldn't find anything so I thought it wasn't possible.
This is new in 0.9.2 - as far as I know, nobody has used it yet. The documentation for it isn't quite done yet, but there's some info in this thread
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Mesen - NES Emulator

Post by mkwong98 »

I'm thinking if it is possible to use a combination of LUA with HD audio replacement to replicate music replacement function in HDNes. To do this I need to trap writes changing the background music and use LUA to write to the replacement registers instead. There is a "addMemoryCallback" in the LUA API, does it also block the write or the write still happens? And how does the callback function get the address and value of the write? For me, writing LUA script is easier than changing the ROM itself. I'm not using it at the moment but it would be nice to know that it is an option.

BTW can you add a link to the doc from your main page?

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

Re: Mesen - NES Emulator

Post by Sour »

I just released 0.9.3 which fixes a few bugs here and there, and adds customizable shortcut keys for all of the main window's shortcuts (in the preferences), which should take care of the use case tepples had.
It should also help alleviate the issues where the debugger's key bindings were making it hard to work with at times (e.g because F5 to resume execution could end up loading a save state instead) - now you can remap the save/load state bindings to other shortcuts which do not conflict with the debugger's.

I also changed the default folder on Linux to ~/.config/mesen, but ~/Mesen will continue to be used if it exists (e.g only changes new installations) - you can move your ~/Mesen folder to ~/.config/mesen if you prefer that.

@mkwong98 I also updated the Lua API a bit in 0.9.3 to improve addMemoryCallback - any integer value returned from the callback function in Lua will now alter the read/write's result. I also updated the documentation with an example of this (+ how to get the address/value being read/written).

Now, as for using this to replace sound, I wouldn't recommend it - this would imply having both the debugger & hd packs running at once, which on a lot of slower computers will result in pretty bad performance (e.g potentially below 60 fps). The best option here would probably for me to add support for HDNes' way of replacing audio, but without making any UI for it - I haven't really looked at how HDNes does it, so I'm unsure how easy this would be to add, though.

I also added a link to the documentation on the website + in the emulator itself.
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Re: Mesen - NES Emulator

Post by B00daW »

This emulator is tops...

Couple things I've noticed before and after the roll-out.

- Holding joystick/controller inputs seems to affect keyboard inputs, like holding shift-f* to make a savestate.
- I'll check now, but there have been some instances of mesen/debugger crashes with editing RAM in the memory viewer. i'll report after more extensive usage in 0.9.3.

- Something that seems a bit out of the ordinary is that watch locations do not update in the debugger in real time like other emulators. Watch is nice for seeing addresses in realtime, grouped in a manner the user wishes, without having to scroll up and down through the memory viewer. I know there is logging too, but realtime is good for active gameplay/analysis.

Thank you for all your talented efforts!
Post Reply