Mesen - Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

Re: Mesen - Emulator

Post by Dwedit »

Seeing some graphical glitches in Mario Golf GBC with RunAhead 1 turned on, happening after finishing a hole. I'll investigate it a bit more later.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
ColtPhase2
Posts: 1
Joined: Wed May 03, 2023 10:51 am

Re: Mesen - Emulator

Post by ColtPhase2 »

Hi I noticed some unusual scaling behavior. When doing Fullscreen with Integer scaling enabled on latest build on my 4K TV, SNES Games have a very large black border around them. This was not the case with a NES game I played. I checked the lastest Mesen-S build and that seemed to scale correctly as it matched both the output from the emulators Ares and Bsnes in their Integer scaling modes. They still have a black border but not as much as the newest Mesen build has.

Edit: Turns out it's only when the scaling on Windows 11 is set to 250%. Works fine at 100% or 300%. Weird that it only effects the latest Mesen.
Last edited by ColtPhase2 on Wed May 03, 2023 11:01 am, edited 1 time in total.
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

Try exclusive 640 x 480. I sound crazy till u try it.
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

Just a small update, this emulator has just spent ove a month of almost daily use in 2 living rooms of my family as the go to for gaming. Its been used daily on nes pce snes and gb. For our casual gaming its running stellar!


Before this we were using retroarch, given how much i liked mesen when I heard a new mesen was out i jumped on it and got my whole family on it. Thanks for this wonderful emulator sour!

Its yielded tons of joy over here!!
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - Emulator

Post by tepples »

In a Linux build of Mesen downloaded on 2023-05-12, I found four behavior differences from my Game Boy Color.

Coin #35: OR mask for GBC registers (coin_gbc_or_mask)
Unused bits of SVBK, VBK, KEY1, SC, BCPS, OCPS, RP read as 1; more are unused on B&W

Problems:
  • Writing $00 to SVBK ($FF70) in GBC mode and reading it back produces $F8. Mesen reads $F9, as did SameBoy until just this week. $F8 and $F9 are distinct states, even though they have the same effect on $D000-$DFFF.
  • Writing $00 to SC ($FF02) in GBC mode and reading it back produces $7C, indicating that the serial port is in slow mode. Mesen produces $7E.
Coin #39: CRAM readable (coin_gbc_palette_readback):
Write and read palette in vblank, increment on write if address>=$80, wrap $BF-$80 (B&W: read $FF)

Problems found:
  • All 16 bits can be read back from GBC CRAM. Mesen ANDs the odd bytes with $7F.
Coin #40: CRAM access blocking (coin_cram_blocked_writes)
Palette writes in mode 3 only advance the address; reads give $FF

Problems found:
  • Reading GBC CRAM during produces $FF in mode 3 (active picture) and the value from CRAM in other modes. Mesen produces the value from CRAM in all modes.
Attachments
numism_40_coins.zip
(11.01 KiB) Downloaded 25 times
SuperTop
Posts: 7
Joined: Sat Dec 17, 2022 2:06 am

Re: Mesen - Emulator

Post by SuperTop »

I encounter fatal bugs when playing Darius Plus on PCE/TG16. I'm not sure if it's because this Super Grafx game allows compatibility with the original PCE/TG16?
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Emulator

Post by Sour »

Sorry for the fairly late replies!

jadasse wrote: Mon Apr 24, 2023 8:25 pmI knew seeking wouldn't be easy with NSFs, but I asked if it would be possible with NSFEs, not NSFs.
NSFE is the same as NSF, just with different/more metadata about the tracks/titles/etc. You still need to emulate the entire song to be able to seek through it, unfortunately.

Dwedit wrote: Tue May 02, 2023 11:29 am Seeing some graphical glitches in Mario Golf GBC with RunAhead 1 turned on, happening after finishing a hole. I'll investigate it a bit more later.
Tried to reproduce this but I can't seem to find a difference at the end of the first hole with vs without runahead (even with 10 frames of runahead) - if you can reproduce this, could you post a screenshot of the glitch?

gzip wrote: Sat Apr 29, 2023 10:44 pm Ran into a few sync issues in Tilemap Viewer > Edit Tiles > 1x2/4x4 etc.
The tile editor doesn't update the palette at all to prevent flashing/etc due to palette changes, and it only updates the tile data when you edit a pixel, at the moment. I guess I could make it refresh the tile data at a fixed rate, regardless of whether the emulator is running or not, to make it look like it's synced with the other views. I can add a 8x8 shortcut, too. (but this might take a little while, won't have any time to work on mesen for the next week or 2)
Good to hear the freeze seems to be fixed!

ColtPhase2 wrote: Wed May 03, 2023 10:54 am Hi I noticed some unusual scaling behavior. When doing Fullscreen with Integer scaling enabled on latest build on my 4K TV, SNES Games have a very large black border around them.
Thanks for the report, I'll have to try to see if I can reproduce this (though I don't have any 4k display to test this with)

tepples wrote: Fri May 12, 2023 6:29 pm I found four behavior differences from my Game Boy Color
I mentioned this on Discord as well, but thanks for the reports! These should all be fixed now.

SuperTop wrote: Mon May 15, 2023 10:19 am I encounter fatal bugs when playing Darius Plus on PCE/TG16. I'm not sure if it's because this Super Grafx game allows compatibility with the original PCE/TG16?
Are you using the latest dev build? What kind of bugs are you seeing, can you show a screenshot? I tried playing in turbografx mode and it seems to be running fine, but it's hard to be sure without knowing where/when the bugs appear on your end.
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

@sour Ive never seen any notes on Blarggs NTSC filter being used for PCE and always read what makes it seem as though each Blargg NTSC filter is system specific. Is Mesen2s Blargg filter setup to match the PCE resolution in Mesen2?

I havnt encountered any issues, but this question has been on my mind so I decided to ask it.


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

Re: Mesen - Emulator

Post by Sour »

007 wrote: Mon May 15, 2023 4:21 pmIs Mesen2s Blargg filter setup to match the PCE resolution in Mesen2?
The PCE NTSC filter is just using blargg's SNES NTSC filter. That filter takes RGB555 as input, so I convert the palette used for the PCE to RGB555 (which does potentially slightly alter the colors) and feed it to the SNES NTSC filter. It very likely does not look exactly like what the PCE would on NTSC, but it's probably better than not having the option at all.
SuperTop
Posts: 7
Joined: Sat Dec 17, 2022 2:06 am

Re: Mesen - Emulator

Post by SuperTop »

20230516130624.png
I guess this may be due to the operating system being lower than Windows 10 (I am using Windows 8.1), even though Darius Plus can be played, resetting or opening other games to play can still cause fatal bugs.
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Mesen - Emulator

Post by creaothceann »

Sour wrote: Mon May 15, 2023 2:48 pm
ColtPhase2 wrote: Wed May 03, 2023 10:54 am Hi I noticed some unusual scaling behavior. When doing Fullscreen with Integer scaling enabled on latest build on my 4K TV, SNES Games have a very large black border around them.
Thanks for the report, I'll have to try to see if I can reproduce this (though I don't have any 4k display to test this with)
Not suggesting you get one, but if you have by chance one of these HDMI dummy plug adapters available you can set that virtual display to 4k and then connect to it via Teamviewer/Parsec/Anydesk et cetera.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

Sour wrote: Mon May 15, 2023 7:34 pm
007 wrote: Mon May 15, 2023 4:21 pmIs Mesen2s Blargg filter setup to match the PCE resolution in Mesen2?
The PCE NTSC filter is just using blargg's SNES NTSC filter. That filter takes RGB555 as input, so I convert the palette used for the PCE to RGB555 (which does potentially slightly alter the colors) and feed it to the SNES NTSC filter. It very likely does not look exactly like what the PCE would on NTSC, but it's probably better than not having the option at all.

Thank you for the explanation

And yes it is better than no filter! I have been enjoying it.

Please keep it in here forever!
Last edited by 007 on Tue May 16, 2023 7:16 am, edited 2 times in total.
007
Posts: 89
Joined: Mon May 02, 2016 5:55 am

Re: Mesen - Emulator

Post by 007 »

SuperTop wrote: Mon May 15, 2023 10:22 pm 20230516130624.png
I guess this may be due to the operating system being lower than Windows 10 (I am using Windows 8.1), even though Darius Plus can be played, resetting or opening other games to play can still cause fatal bugs.
Tried replicating here, can not reproduce.

All my systems are win 10 and 11 tho

Tried with emulated system as pce and as sgx since darius is sgx enhanced. Tried playing reloading jumping between games opening closing.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - Emulator

Post by tepples »

The PCE VCE's RGB to YUV lookup table has quirks that were investigated in a channel of the 240p Test Suite server, and some games depend on those quirks to make sky gradients look right.

EDIT: The research was summarized in "Dumping the NEC PC Engine YUV table" and "PC Engine palette improvements – the amazing people behind the technology".
Sour
Posts: 891
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - Emulator

Post by Sour »

tepples wrote: Tue May 16, 2023 7:43 am The PCE VCE's RGB to YUV lookup table has quirks that were investigated in a channel of the 240p Test Suite server, and some games depend on those quirks to make sky gradients look right. I'll need to ask members of that server to coalesce the findings into a web page.
The PCE core already uses the palette generated by Kitrinx that takes this into account, e.g: https://github.com/Kitrinx/TG16_Palette
This is the palette that's used for the NTSC filter, too.

SuperTop wrote: Mon May 15, 2023 10:22 pm I guess this may be due to the operating system being lower than Windows 10 (I am using Windows 8.1), even though Darius Plus can be played, resetting or opening other games to play can still cause fatal bugs.
I'm not sure, this is the first time I've ever seen that particular error popup. I've never tested this new version on any Windows version before 10 personally, but I think I recall someone telling me it worked on Windows 7 on their end. A quick search seems to imply error 0xc0000005 can happen for basically any reason - it could be my code's fault, or it could be the PC itself misbehaving, I'm not entirely sure. Does it only happen for PCE games? Does it happen for any PCE game, or just when Darius Plus is involved in some way?
Post Reply