Ymir v0.3.0
Discord | Patreon | Compatibility list
The first big release since my first "vacation" of sorts includes a sizable amount of bug fixes, compatibility improvements, more accurate emulation (thanks again to @celeriyacon) and some new features to play with.
First, two new peripherals have been added: the Shuttle Mouse and the Virtua Gun. However, you will note that 0.3.0 only includes the mouse peripheral. This is because the Virtua Gun has lots of issues and is only usable with a single game: House of the Dead. Download a nightly build if you want to try it out.
Save states also got some love. Have you accidentally saved a bad state on top of a good one? Push the Undo Save State button to get the old state back. Do you regret loading a state? Use the Undo Load State to go right back where you were just before loading it. Ymir now stores one additional save state per slot and one load state globally for this feature.
The SH2 debugger received many usability improvements this version with the addition of the Data Stack and Call Stack views, a navigable viewport, and enable/disable toggles for breakpoints and watchpoints.
And, of course, this version comes with plenty of bug fixes mostly focusing graphics as you've come to expect.
Important
Windows users: install the latest Microsoft Visual C++ Redistributable package (x86_64 installer, AArch64/ARM64 installer) before running the emulator. This is mandatory to avoid crashes on startup.
macOS users: follow these instructions to allow Ymir to run on your system. Ymir is signed with an ad-hoc certificate, flagging it as unverified.
Linux users: if you choose to install the Flatpak version or installed Ymir from the SteamOS's Discover Store, make sure to grant Ymir permission to access the filesystem or your multi-file disc images won't load properly.
Compatibility improvements
As usual, plenty of graphics rendering issues have been fixed, many of which have been detected by diligent work from the testers. Thanks!
A notable improvement made in this version is the VDP1 cycle counting method rework. It is still a rough approximation and still results in a much faster VDP1 than the real Saturn's, but is much less prone to stability problems. This change has fixed crashes, freezes, performance issues and graphics glitches in many games, including:
- Beach de Riichi
- Burning Rangers
- DonPachi
- Dungeons & Dragons Collection
- Isto E Zico - Zico no Kangaeru Soccer
- Real Bout Garou Densetsu Special
- Road Rash
- Virtua Cop
A number of game-specific flags have been added to the emulator core to work around extremely finicky bugs without affecting already working games. Here's a list of games that are now playable thanks to these flags:
- Vampire Savior - The Lord of Vampire
- Baku Baku Animal - World Zookeeper Contest (European version)
- Chisato Moritaka - Watarase Bashi & Lala Sunshine
- Deep Fear
- Dragon Ball Z - Idainaru Dragon Ball Densetsu
- Jikkyou Oshaberi Parodius
- Metal Fighter Miku
These flags also help fix graphics issues in a few more games:
- Emit Vol. 3 - Watashi ni Sayonara o
- Fishing Koushien II
- Spot Goes to Hollywood (European version only)
- Steamgear Mash
- Waku Waku 7
With that, compatibility stands at just over 92%, on par with Kronos.
New peripherals: Shuttle Mouse and Virtua Gun
Important
The Virtua Gun is EXPERIMENTAL and is only available in development and nightly builds.
It only works more or less properly with House of the Dead and has issues with pretty much every other game that supports it. See #787 for a list of issues. For this reason, the peripheral is disabled in 0.3.0, but you can try it out on the nightly builds.
In 0.3.0 you can use a Shuttle Mouse with games that support it.
Virtua Cop 2 plays great with the mouse!... if you can deal with a two-frame input delay.
Also, in nightly builds only, you can select the Virtua Gun. However, as noted above, it currently only works reasonably well with House of the Dead. It has worse latency than the Shuttle Mouse though, so temper your expectations.
The new Mouse Capture Mode setting allows you to control how the mouse capture works for the gun:
- System cursor: in this mode, the light gun reticle follows your system mouse cursor. This works well in cases where you only want to use a single Virtua Gun.
- Physical mouse: in this mode, each physical mouse attached to the computer can be bound to a different Virtua Gun. Yes, you can have two or more mice connected to the same PC and, yes, they are independent of one another.
The warning is also displayed in the Input settings window.
You can customize the reticle to your heart's content.
crosshairs.mp4
There's an infinite number of combinations!
Build fixes
The Windows SSE2 build now correctly targets the SSE2 instruction set, which should make 0.3.0 compatible with old CPUs once again.
The macOS ARM executable is now signed with an ad-hoc signature to work around the "damaged app" error. You still have to allow execution of an "untrusted" application, but at least this no longer blocks you from running the emulator altogether. Also, macOS builds no longer include two copies of the executable, roughly halving their size.
UI improvements
Every save state slot now holds an additional undo entry, which you can recover in case you accidentally saved a state. You can restore it with the new "Undo save state" action. Similarly, if you accidentally loaded a save state, you can go back to the previous state with the "Undo load state" action.
Each save state slot tells you if you have an undo for it.
New options have been added to manage full screen mode. You can now select a display and a resolution, including borderless windowed and exclusive full screen modes.
There's also a new option to select the graphics backend from Direct3D 11, Direct3D 12, Vulkan, Metal or OpenGL. This is in preparation for GPU rendering, which is still a work-in-progress. GPU rendering was slated to land on this version, but I decided to postpone it to fix some serious stability and performance issues that occur with higher internal resolution scaling ratios. For sneak peeks, check #60.
Debugger
The SH2 debugger received many usability and utility upgrades this version. The first thing you'll notice are the new Data Stack and Code Stack sections below the registers listing the contents of the stack and the call site return addresses respectively. These require debug tracing to be enabled (F11) to trace code execution and can be hidden from the new Stack menu in the debugger window.
The disassembly view can now be freely scrolled and navigated with both keyboard and mouse:
- Up/down arrow keys: move cursor up/down one instruction.
- Page up/down: move cursor up/down one page.
- Home/end: move cursor to the top/bottom of the viewport.
- The cursor is kept below 15% of the top and above 35% of the bottom of the viewport.
- Scroll with the mouse wheel to move the viewport.
The cursor is represented by a green line and you can use the keyboard shortcut F9 to toggle a breakpoint on that address and Shift+F9 to enable/disable an existing breakpoint. Yes, now you can disable breakpoints and watchpoints without removing them from the list. Also, their performance cost has been drastically reduced.
Note the hollow circles. Those breakpoints are disabled - they won't be hit, but they are kept in the list in case you need them again.
The VRAM access patterns are now color-coded in the VDP2 VRAM access delay view. Red CPs indicate illegal access timings based on the corresponding NBG parameters (and PN accesses for scroll NBGs).
It doesn't explain why, but these two CP0 accesses are not good.
The window also has a Generate test case button which creates code for a test case that developers can use to validate that exact configuration and fix VRAM access pattern bugs.
Changes
New features and improvements
- App: Add command line option
-F/--fast-forwardto launch the emulator in fast-forward mode. - App: Always use installed mode under Flatpak.
- App: Check for profile at the executable location. (#706)
- App: Warn users about Flatpak filesystem permissions if the app is running in its sandbox and a disc image fails to load.
- Backup RAM: Support in-memory and copy-on-write memory-mapped files in addition to regular memory-mapped files.
- Build: Add simple feature flags system. All feature flags are enabled by default on development builds (including nightly builds).
- Build: Support Profile-Guided Optimization (PGO) builds. (#742; @mmkzer0)
- Debugger: Allow scrolling the SH2 disassembly view. (#743; @mmkzer0)
- Debugger: Colorize VRAM access timing slots in the delay viewer.
- Debugger: Implement keyboard navigation and interactions in the SH2 disassembly view:
- Up/down arrow keys: move cursor up/down one instruction.
- Page up/down: move cursor up/down one page.
- Home/end: move cursor to the top/bottom of the viewport.
- The cursor is kept below 15% of the top and above 35% of the bottom of the viewport.
- Debugger: Manage SH2 breakpoints and watchpoints on the frontend and allow enabling/disabling them without removing from the list.
- Debugger: Optimize SH2 breakpoints and watchpoints when debug tracing is enabled. They no longer become more expensive with the amount of entries added and the baseline cost is lower than before.
- Debugger: Trace and display SH2 call stack.
- Debugger: Trace and display SH2 data stack contents.
- GameDB: Add new game-specific flags to improve compatibility:
- Double the clock rate of the MC68EC000
- Stall VDP1 drawing on VRAM writes
- Slow down VDP1 rendering
- Relax VDP2 bitmap CP VRAM access checks
- Input: Added support for mouse events.
- Input: Capture mouse for light gun and mouse peripherals, supporting these modes:
- System mouse: binds the system mouse cursor to a single peripheral. Mouse cursor is still available to interact with the GUI.
- Physical mouse: binds one or more mice to different peripherals. Disables the system cursor while any mice is bound.
NOTE: This option is only available on nightly builds due to issues with Virtua Gun. (#787)
The System mouse capture option only works with Virtua Gun.
- Input: Experimental Virtua Gun peripheral implementation. (#33)
NOTE: This feature is only available on nightly builds at the moment due to issues in nearly all games. (#787)
Only House of the Dead is known to work with minor reticle inaccuracy errors. - Input: Implemented Shuttle Mouse peripheral. (#32)
- MIDI: Force RtMidi to use dummy API if it fails to initialize, allowing Ymir to run without MIDI drivers.
- Save states: Added actions to undo a save state and restore an undone save state. (#700, #727; @Fueziwa)
- Save states: Store one extra save state per slot for undo. (#700, #727; @Fueziwa)
- Settings: Show currently loaded profile path in Settings > General.
- System: You can now select a preferred system variant (Saturn, HiSaturn, V-Saturn or Dev Kit) and Ymir will automatically pick a matching IPL ROM. (#637, #725; @Fueziwa)
- Video: Add option to enable/disable video synchronization in full screen mode.
- Video: Allow selecting full screen resolution and target display. (#705)
- Video: Allow switching graphics backends for GUI rendering.
Fixes
- Build: Introduced separate x64-win-llvm toolchains for SSE2 and AVX2 support. Fixes Windows SSE2 builds requiring SSE4.2 instructions. (#713; thanks to @Wunkolo)
- Build: Perform ad-hoc signature on macOS binaries to work around the "damaged" app warning. (#698; thanks to @Wunkolo)
- Build: Remove duplicate binary from macOS packages.
- GameDB: Double the MC68EC000 clock rate and force fast bus timings to fix crashes in Vampire Savior - The Lord of Vampire. (#699)
- GameDB: Force-enable SH2 cache emulation to fix issues with multiple games:
- Baku Baku Animal - World Zookeeper Contest (Europe only) -- freeze when trying to play FMVs from the Options menu (#642)
- Chisato Moritaka - Watarase Bashi & Lala Sunshine -- crash at startup (#604)
- Dragon Ball Z - Idainaru Dragon Ball Densetsu -- black screen after starting a new game (#538)
- Emit Vol. 3 - Watashi ni Sayonara o -- FMV tearing (#797)
- Metal Fighter Miku -- black screen after start menu (#466)
- Spot Goes to Hollywood -- glitched graphics in European version only (#520)
- Steamgear Mash -- flickering graphics (#440)
- Waku Waku 7 -- flickering sprites (#424)
- GameDB: Force fast bus timings to fix crashes in Deep Fear. (#740)
- GameDB: Slow down VDP1 to fix no-boot regression in Jikkyou Oshaberi Parodius. (#283)
- GameDB: Slow down VDP1 to fix performance issues in Fishing Koushien II. (#812)
- Input: Fixed analog to D-Pad axis conversion to not overwrite whenever an input was released in opposite direction. (#754; @PringleElUno)
- MIDI: Defend against crashes when the library fails to initialize.
- SCU: Timer fixes. (thanks to @celeriyacon)
- SH2: Block interrupts on instructions following LDC/LDS/STC/STS. (thanks to @celeriyacon)
- SH2: Cache emulation fixes. (thanks to @celeriyacon)
- SH2: Fix
@(disp.PC)loads being decoded as stores for watchpoints. - SH2: Fix
ldc/lds @Rmdecoding from the wrong opcode bits for watchpoints. - SH2: Interrupt prioritization and triggering fixes. (thanks to @celeriyacon)
- VDP1: Fix handling of zero horizontal character size in CMDSIZE.
- VDP1: Fix swap framebuffers race condition with threaded VDP1 rendering. Fixes flickering graphics in multiple games:
- VDP1: Increase PTM=1 drawing delay and apply it only during VBlank. Fixes flickering graphics on Earthworm Jim 2. (#745)
- VDP1: Properly load save state data when threaded VDP1 rendering is enabled.
- VDP1: Rework cycle counting method and increase cycle budget per frame. Fixes slowdowns in Road Rash and graphics glitches in multiple games, including Virtua Cop and Burning Rangers. (#704, #721, #722)
- VDP1: Stall VDP1 drawing on VRAM writes exclusively on Mega Man X3 and Rockman X3 to fix garbled sprites. (#244)
- VDP1: Stop processing commands if encountering an all-zeros entry. Fixes invalid clipping coordinates in Sekai no Shasou kara - I Swiss-hen - Alps Tozantetsudou no Tabi. (#761)
- VDP2: Apply VRAM access shift per bank to scroll NBGs with invalid timing patterns. Fixes World Heroes Perfect title screen shift and Cyberbots - Fullmetal Madness HUD shift and broken background in stage 2. (#756)
- VDP2: Clear normal shadow flag on transparent sprite pixels. Fixes shadows extending vertically across the screen in Tokyo Shadow. (#752)
- VDP2: Compute vertical cell scroll delays/offsets when enabling/disabling the effect in addition to access cycle changes.
- VDP2: Consolidate sprite data handling and fix 16-bit readout of 8-bit sprite data. Fixes garbled graphics in NBA Live 98 in-game.
- VDP2: Convert the "allow bitmap data access during SH-2 cycles" hack into a game-specific flag and enable it only for games that display issues with the strict timing checks:
- Lunar - Silver Star Story
- Mechanical Violator Hakaider
- Shin Kaitei Gunkan
- VDP2: Fix and optimize per-dot coefficient access checks. Fixes graphics glitches in Radiant Silvergun when starting a new game after interrupting the AKA-O boss fight in attract mode.
- VDP2: Fix NBG per dot special priority calculations. Fixes priority issues in Mr. Bones. (#703)
- VDP2: Illegal scroll CP accesses cause a shift if there aren't enough valid accesses in other banks and the illegal accesses occurs in the same bank as the PN access. Fixes fog background shift in Sonic 3D Blast. (#798)
- VDP2: Illegal scroll CP accesses in low-res modes are handled differently between T0-T3 and T4-T7. Fixes gaps in backgrounds in X-Men vs. Street Fighter. (#775)
- VDP2: Multiple VC accesses in the same timing slot do not cause extra delays. Fixes FMV glitches in Girls in Motion Puzzle Vol. 1 - Hiyake no Omoide + Himekuri. (#466)
- VDP2: Sprite special pattern detection was short by one bit.
- VDP2: Use only the first PN access to check for valid CP accesses. Fixes graphics shift in Daisuki and BattleSport. (#769, #770)
Which version should I download?
Grab the file matching your operating system and processor architecture:
windows,linuxandmacosindicate the operating systemx86_64is for Intel or AMD CPUs andAArch64/ARM64is for ARM CPUs- All builds are for 64-bit systems
For x86_64 builds, the AVX2 version offers slightly better performance but requires a CPU that supports the instruction set -- pretty much any Intel Core or AMD CPU since 2011 and Intel Pentium/Celeron CPUs from 2020 onwards has support for it. If you don't know if AVX2 is supported or you have no idea what any of this means, it's probably safe to grab the AVX2 version if you don't have an ancient or cheap computer. If it doesn't start up or randomly crashes for no reason, try the SSE2 version.
Every ARM build also includes support for the NEON instruction set.
For Windows releases, you might also need to install the latest Microsoft Visual C++ Redistributable package (x86_64 installer, AArch64/ARM64 installer). Ymir requires Windows 10 or later.
You can also install Ymir on Linux via Flatpak.
The macOS releases work on Apple Silicon (ARM) systems (arm64) and Intel systems (x64). Ymir requires macOS 13 (Ventura) or later.
FreeBSD users can install Ymir from the Ports Collection:
pkg install Ymir (uses zenity with GTK3 widgets for SDL3's file dialogs)
pkg install Ymir-gtk4 (uses zenity with GTK4 widgets)