Mesen - Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

Re: Mesen - Emulator

Post by Sour »

gzip wrote: Mon Jan 30, 2023 11:07 pmThis does work but why change the labels at all if that's all that's preventing backwards compatibility?

Btw, is there any way to import/export breakpoints?
The format needed to be able to support all memory types for all supported consoles, so the 1-letter identifiers weren't really good enough anymore, this was the simplest solution code-wise. 2.0 was never intended to be backward compatible - save states or movies aren't either.

There is no way to import/export breakpoints - though you can extract them fairly easily from the workspace json/xml if you need to.

ISSOtm wrote: Tue Jan 31, 2023 5:40 am As an aside, should I find a satisfactory patch to allow compiling the core dylib on Linux in debug mode and/or with ASan/TSan, would you be interested in a PR?
Not sure what you mean by dylib exactly? Or did you just mean the .so? Using -g -O0 as flags should work fine as far as GDB debugging goes, I've done this a few times. I'm fairly sure I've run it through ASan at some point, too, but it's been a while. If it doesn't add too much complexity to the makefile to add these as options, sure.

Speaking of dylibs, currently in the process of fixing a couple of things for macos, but it mostly works atm, so hey, maybe the macOS port people have been asking for ~6 years will be a thing at last. :p

Pokun wrote: Tue Jan 31, 2023 6:49 pm it would be useful if you could also see the borders between the full 4x4 tile areas covered by each attribute byte
I'm almost sure I've had this exact discussion with someone before, but I can't find a trace of it on my future ideas list. I'll add it to it and see what can be done eventually. The attribute data byte is easy to add, so I'll add this soon since people seem to think it's useful.

gzip wrote: Tue Jan 31, 2023 7:58 pm 1) Change Memory Viewer address (or add two entries like for breakpoint)
2) Add Attribute Data field
3) Change size of selection outline
4) Add new Attribute Viewer window to edit a single attribute byte at a time
1/2/3 should all be pretty easy. I'd like to avoid 4, since it'd be a NES-specific tool, and probably not something that would be used very often, in most scenarios. Editing through the memory viewer should be good enough when the need is there.

Classico wrote: Tue Jan 31, 2023 8:35 pm Video filters don't work with PC Engine and PC Engine CD-Rom games
Thanks for the report! I think they actually do work, but the PC Engine core's resolution is ~1024x717, so if you turn on 2x xBRZ, it produces a ~2000x1400 picture and then shrinks it down to a lower resolution depending on your window's size, which makes it really hard to notice any difference. This is a bit tricky to fix since the 1024px wide res is needed to be able to display all 3 of the pce's "native" resolutions properly. I'll try to see if I can make the resolution auto-adjust based on what the game is trying to display, which should make the filters work better.
gzip
Posts: 23
Joined: Sat Mar 13, 2021 2:29 pm
Contact:

Re: Mesen - Emulator

Post by gzip »

Here's another one for Tilemap Viewer:
  • Missing option: Highlight tile selected in Tile Viewer
jonn233
Posts: 3
Joined: Wed Feb 01, 2023 2:26 am

Re: Mesen - Emulator

Post by jonn233 »

First of all, thank you Sour for providing such an awesome and extensive emulator to the community. It became my favorite PC Engine-CD emulator over night :D

After a few days of playing around and testing I wanted to give some feedback, that would improve the overall user experience tremendously:

- fix switching of aspect ratio (works randomly after pressing F11 several times)
- revise the display of scanlines or add an option to customize them (they are too thick and incorrectly positioned, i.e. not "inbetween" the pixels)
- scanlines broken on NES (scanlines completely missing from the lower part of the screen)
- add shaders like other modern emulators (crt shaders for example)
- integer scale is not working reliably (recognizable by uneven scanlines)

A personal feature request which would lead many people to Mesen2:

- add .CHD support for PC Engine-CD/TurboGrafx-16 CD (benefits greatly from the compression of CD images)


Keep up the great work!
Last edited by jonn233 on Wed Feb 01, 2023 4:41 am, edited 1 time in total.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Mesen - Emulator

Post by jeffythedragonslayer »

gzip wrote: Tue Jan 31, 2023 11:22 pm Here's another one for Tilemap Viewer:
  • Missing option: Highlight tile selected in Tile Viewer
Highlight raster beam position is a feature I'd find super useful as well.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Mesen - Emulator

Post by Pokun »

rainwarrior wrote: Mon Jan 30, 2023 8:26 pm
Pokun wrote: Mon Jan 30, 2023 2:39 pmNintendo and possibly Sega both officially use this terminology [nametable]...
I'm curious about examples. The only place I can remember Nintendo using "name" in a related way was in the SNES manual where it refers to "CHR name" for a tile's index and "name base address" as the position of CHR index 0. This seems compatible with the concept of a "nametable" but I don't think I've seen an example of them ever using that term specifically.

Sega definitely does use "name table" in its official developer manual, but this terminology comes directly from TI.

TI also used the term "pattern table" for the concept which Nintendo seems to only refer to as CHR, but we similarly seem to have adopted for NESDev (but less pervasive in its use).
To avoid derailing this thread I'm posting my answer in this thread which is discussing the same subject.



Speaking of PC-Engine and video memory areas, I'm glad that Mesen 2 didn't adopt the reversed SAT (Sprite Attribute Table, a VRAM area) and SATB (Sprite Attribute Table Buffer, an internal memory area) like Mednafen and countless PCE reverse-engineering documents did (they keep saying SATB of the VRAM area which is wrong and very confusing). Probably because MagicKit documents used the two terms interchangeably, then someone misunderstood and it stuck.
Mesen 2 seems to use very generic terms like sprite RAM.
User avatar
Chipsum
Posts: 16
Joined: Fri Dec 07, 2018 3:07 am
Contact:

Re: Mesen - Emulator

Post by Chipsum »

Sour is Back ! :o :D :D :D

I already started forking :mrgreen:
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Mesen - Emulator

Post by rainwarrior »

Every now and then I seem to get a weird burst of fast-forward, like the game just zooms for a quarter-second unexpectedly. Is there some sort of "frameskip" option that I'm missing that will occasionally try to catch up?

Edit: Oh, I think it's just rewind/fast-forward being mapped to L2/R2 by default. I probably was pressing it by accident without realizing (or realizing that there was something mapped to it).

So, knowing the culprit I can definitely remove those mappings... but since it's really easy to hit one by accident when picking the controller up or putting it down, I'd kinda not recommend having them be a default. At least, I really didn't expect them, and they have the potential to destroy progress if you use them accidentally.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - Emulator

Post by tepples »

For comparison:
Years ago on Pocket Heaven, I said something similar about PocketNES, an NES emulator for GBA. I would accidentally bump L or R, causing the screen to scroll. Other members told me I was holding it wrong.
AxlRocks
Posts: 4
Joined: Mon Apr 01, 2019 2:34 pm

Re: Mesen - Emulator

Post by AxlRocks »

Can't tell you how glad I am to see you back, Sour! :beer: Can't wait to try Mesen2 out. PC Engine emulation is great to hear as well.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Mesen - Emulator

Post by jeffythedragonslayer »

Hey Sour I noticed a regression in Mesen 2 - audio stuttering in my game that doesn't happen in bsnes or Mesen-S or on real hardware. If you need the ROM to help debug it let me know.

Edit: thanks. This turned out to be because of emulation speed =0
Last edited by jeffythedragonslayer on Thu Feb 02, 2023 5:57 pm, edited 2 times in total.
bklD
Posts: 36
Joined: Fri Sep 01, 2017 8:56 am

Re: Mesen - Emulator

Post by bklD »

rainwarrior wrote: Wed Feb 01, 2023 6:20 pm Every now and then I seem to get a weird burst of fast-forward, like the game just zooms for a quarter-second unexpectedly. Is there some sort of "frameskip" option that I'm missing that will occasionally try to catch up?

Edit: Oh, I think it's just rewind/fast-forward being mapped to L2/R2 by default. I probably was pressing it by accident without realizing (or realizing that there was something mapped to it).

So, knowing the culprit I can definitely remove those mappings... but since it's really easy to hit one by accident when picking the controller up or putting it down, I'd kinda not recommend having them be a default. At least, I really didn't expect them, and they have the potential to destroy progress if you use them accidentally.
It's interesting to see how different people's perspectives sometimes are. I think it is absolutly great that this is on by default.

Welcome back, Sour. I'm really glad that you are back again! :D
User avatar
gravelstudios
Posts: 159
Joined: Mon Mar 13, 2017 5:21 pm
Contact:

Re: Mesen - Emulator

Post by gravelstudios »

Super excited about the new Mesen! Especially that it runs SNES games. I love the idea of an emulator that runs both NES and SNES. Will test it out with my own games as soon as I'm able!
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Mesen - Emulator

Post by Dwedit »

Mesen-S existed for quite a while.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Alyosha_TAS
Posts: 173
Joined: Wed Jun 15, 2016 11:49 am

Re: Mesen - Emulator

Post by Alyosha_TAS »

I'm not really knowledgeable about UI stuff, but I'm really excited to see new a new Mesen framework. Merging everything into a single front end is really cool, and adding PCE, with cd-rom support no less, is pretty impressive, I recall that system being pretty finicky to emulate well. I'll be looking forward to renewed emulation work, especially for SNES. Good luck in development!
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Emulator

Post by Sour »

Thank you for all the comments, again, sorry for not replying to everyone!

Spent the past couple of days adding support for macOS. It currently builds and runs properly, but there are still a number of issues remaining (e.g opening the history viewer will crash it, pressing keys plays the macOS alert sound, gamepads aren't supported, etc.) To build the macOS build, you need SDL2 & .NET 6 and then just running "make" should work.

jonn233 wrote: Wed Feb 01, 2023 2:52 am- fix switching of aspect ratio (works randomly after pressing F11 several times)
- revise the display of scanlines or add an option to customize them (they are too thick and incorrectly positioned, i.e. not "inbetween" the pixels)
- scanlines broken on NES (scanlines completely missing from the lower part of the screen)
- add shaders like other modern emulators (crt shaders for example)
- integer scale is not working reliably (recognizable by uneven scanlines)
- add .CHD support for PC Engine-CD/TurboGrafx-16 CD (benefits greatly from the compression of CD images)
Thanks for the feedback! I'll take a look at the bugs soon. Shaders are a pretty complex topic though, and while it's been on my list of things to implement for several years, I still haven't gotten to it. I'm unsure how easily CHD support can be added - I'll have to do some research.

Pokun wrote: Wed Feb 01, 2023 8:08 am Mesen 2 seems to use very generic terms like sprite RAM.
I tried to stick to general terms as much as possible, although the memory type dropdowns and the like do usually list the memory using its most common name (e.g "Nametable RAM", etc.)

rainwarrior wrote: Wed Feb 01, 2023 6:20 pm I'd kinda not recommend having them be a default
These have actually been the default shortcuts for rewind/fast-forward in all Mesen versions since 2017, so I'm mostly leaning towards keeping this as-is. It hasn't really been something that's been reported as an issue before, that I can recall. I'm a bit biased here since I use this fairly often (and since I inevitably end up breaking/resetting my settings constantly during dev, I'd need to re-configure these constantly if they weren't the default)

Alyosha_TAS wrote: Thu Feb 02, 2023 4:24 pm I recall that system being pretty finicky to emulate well
To be fair, there are still a pretty decent amount of CD-ROM games with issues :p (and I've only really tested a small fraction of the CD-ROM game library)

jeffythedragonslayer wrote: Wed Feb 01, 2023 4:25 am Highlight raster beam position is a feature I'd find super useful as well.
This is already highlighted in the event viewer (and the numerical values are written in the debugger & register viewer)
Post Reply