Post subject: Mesen-S (SNES emulator built in C++ and C#)
Spikestuff
They/Them
Editor, Publisher, Expert player (2642)
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
From the developer who brought you Cycle Accurate NES Mesen (thread). Sour brings a new emulator which might as well seem like an April Fools joke, but it isn't! Mesen-S. https://github.com/SourMesen/Mesen-S/
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Sonia
She/Her
Joined: 12/6/2013
Posts: 435
Location: Brazil
What a day to announce things on though. I'm interested to know what this will be able to do that higan/bsnes can't.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Sonia wrote:
I'm interested to know what this will be able to do that higan/bsnes can't.
Like being fast!
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Joined: 6/29/2016
Posts: 53
Ah, just noticed this thread now. Thanks for taking the time to make one!
I'm interested to know what this will be able to do that higan/bsnes can't.
Arguably there's already a few features in the debugger tools that aren't available in bsnes-plus, though in terms of gameplay there isn't all that much it offers right now (I can only write so much code in 2 months!). Though I think bsnes/snes9x don't have a rewind feature? Could be wrong on that.
Like being fast!
To be fair, it's not very fast right now (slower than Mesen in most cases), but it actually manages to process mid-scanline writes like the accuracy profile of higan while running a lot faster right now. Though, considering a number of things are still not displaying quite right, it might not be a fair comparison in the long run. Still, I'm "hoping" to be able to improve both performance and accuracy, compared to what it is right now, eventually. Mostly trying to focus on fixing all the emulation bugs I can find first before trying to optimize anything.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3821)
Joined: 11/30/2014
Posts: 2829
Location: US
Already? Wow that's amazing! Hopefully this breaths some fresh life into SNES work. It feels like it got so close but never quite overcame issues of complexity and hardware timing. This is just a suggestion, but you might want to contact DwamgoAC and some of the other TASBot folks. I remember them having some really serious issues working with the snes a while back. Maybe they can offer some input in how to future proof this or give it more options to behave like a real snes.
Post subject: Mesen-S 0.2.0 Released
Spikestuff
They/Them
Editor, Publisher, Expert player (2642)
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
I'll do this only once as this is a major update in terms of performance to how it was initialized and what comes with it in terms of debugging features. Honestly great job Sour. https://github.com/SourMesen/Mesen-S/releases/tag/0.2.0 This release greatly improves accuracy, compatibility and adds support for some of the enhancement chips. The vast majority of (supported) SNES games should play without any issues - if you find problems in a game (freezes, graphical bugs, etc.), please report them! General • Greatly improved timing/accuracy for everything: CPU, PPU, SPC, DMA, etc. Including: ◦ Numerous PPU fixes - graphical issues have been fixed in several games. ◦ Freezes in several games have been fixed by improving the SPC emulation accuracy. • Support for games using the DSP-1/2/3/4 and ST010/ST011 enhancement chips. Note: A firmware is required for these - the emulator will ask for the firmware when loading a game that requires one. • Libretro support • Added a number of UI options (mute in background, etc.) and corrected a few UI problems. Debugging • SPC debugger window (along with breakpoints, watch, labels, etc.) • Sprite viewer • Lua scripting • Improved usability and added new features to tile/tilemap viewers • DMA channel filters for the event viewer • Misc. debugger features (break options, disassembly options, etc.) • Ability to log the SPC and DSP-n chips in the trace logger. • CC65/CA65 source code and symbols integration • Labels/comments in the disassembly view
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Joined: 6/29/2016
Posts: 53
Ah, somehow didn't get a notification e-mail for your post. Thanks! There's still a lot to get done, but it's coming together quite a bit faster than Mesen did. Being able to reuse a lot of code has definitely been helpful :p Working on SA-1 support at the moment, should hopefully be in a decent state (including its own debugger window, etc) in a few more days. Also added NES-like overclocking options that work by adding scanline before/after NMI - surprisingly seems to work pretty well so far. Once SA-1 is done, I'll probably tackle Super FX next. With DSP/SA-1/Super FX supported, the number of unsupported games will be down to less than 10, which is a pretty acceptable number!
Spikestuff
They/Them
Editor, Publisher, Expert player (2642)
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
Sour wrote:
Once SA-1 is done, I'll probably tackle Super FX next.
Support for the SA-1, Super FX, CX4, S-DD1 and OBC1 chips (which means about 50 more games are supported compared to version 0.2.0) https://github.com/SourMesen/Mesen-S/releases/tag/0.3.0 (emphasis mine on one of these updates) General • Cheats (Game Genie/Pro Action Replay), including a cheat code database (by Mighty Mo) • Overclocking • Netplay • Input: Turbo bindings • Input: Super scope and multitap support • Input: Movie recording/playback • Input: Options to display the current input on screen and to configure the deadzone size for analog sticks • SPC file playback • PPU: Fixed a few bugs with the PPU's emulation • Option to blend high resolution frames (for proper transparency effects without having to use the NTSC filter) Debugging • Register Viewer tool to view the state of all flags/registers in the CPU/PPU/SPC • Debuggers for the Super FX and SA-1 chips (disassembly, breakpoints, watch expressions, etc.) • Trace logging for the Super FX, SA-1 and CX4 • General improvements, bug fixes and other smaller new features/options
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Dimon12321
He/Him
Editor, Reviewer, Experienced player (596)
Joined: 4/5/2014
Posts: 1222
Location: Romania
Spikestuff wrote:
and to configure the deadzone size for analog sticks
Wow! Does SNES actually have games that support analog sticks? I've never seen this kind of gamepad, or was Wii's Classic controller invented back in SNES days?
TASing is like making a film: only the best takes are shown in the final movie.
Joined: 6/29/2016
Posts: 53
Spikestuff wrote:
• Input: Movie recording/playback
I should probably mention that currently the timing for the input polling isn't quite as robust as it should be. It occurs at the end of the current cpu instruction after vblank begins. But if that happens to be a really long DMA transfer, it can be delayed for a stupidly long amount of time. Need to fix this, but only realized the issue a couple of days ago and didn't want to change that code and risk breaking something just before a release, so I kept it as-is for now. So probably best not to start experimenting too much with the movies just yet, but this particular problem should be fixed by the next release.
Dimon12321 wrote:
Does SNES actually have games that support analog sticks?
Sorry, might have worded that a bit weirdly - I meant you can control how big the deadzone is for your PC's controller's analog sticks (some people prefer using them over the D-pad.) It doesn't actually have any implication on any of the emulated SNES controllers.
Editor, Player (175)
Joined: 4/7/2015
Posts: 331
Location: Porto Alegre, RS, Brazil
Sour wrote:
rewind feature
Speaking of which, is there a particular reason (or limitation) to make the hold rewind take effect only after you hold the hotkey for 1 second? Rewind 10secs and 1min are instantaneous.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math. My things: YouTube, GitHub, Pastebin, Twitter
Joined: 6/29/2016
Posts: 53
Essentially, rewind works by taking a save state every 60 frames and recording the inputs in-between. When you start rewinding, the emulation first needs to load the previous state and re-run the emulation until the current point in time before it can start showing the video in reverse. This means your PC has to emulate at least 60 frames before anything can happen on the screen (that's the best case scenario, in practice it can be up to 119 frames). Even running at maximum speed, 120 frames can potentially take a good half second or more (varies wildly from a PC to another), which is where the delay comes from. The "rewind 10 secs/1 min" options simply load a save state and skip all of this extra processing, which is why they're instantaneous. The ideal/obvious solution would be to always keep the last ~120 frames of video/audio in memory and start preparing the rewinded video/audio for the 120 frames before that while the first 120 frames are displayed. But I'm not entirely convinced the extra code complexity+RAM usage that would be required is worth it.
Editor, Player (175)
Joined: 4/7/2015
Posts: 331
Location: Porto Alegre, RS, Brazil
Oh that totally makes sense, thanks for explaining. Not worth worrying about such a small detail. It's already the best rewind I ever used, it's smooth and the sound in reverse without glitching is great.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math. My things: YouTube, GitHub, Pastebin, Twitter