Ymir v0.1.8
Discord | Patreon | Compatibility list
This releases focuses heavily on bug fixes, with a touch of quality-of-life features, debugging tools, and small but welcome improvements across the board. There are no major improvements or new features this time.
Official ARM Windows and FreeBSD builds have arrived, thanks to @tordona and @bsdcode respectively. You can find the Windows version attached in this release and the FreeBSD version in the ports collection.
This is probably the last 0.1.x release as I'm planning to rewrite CD Block and SMPC emulation for next version, which will be labeled 0.2.0. These components have been the Achilles's heel of Ymir's emulation accuracy, causing a large number of hard issues to investigate and solve. For this reason, expect the next release to take a bit longer or be less substantial that these last releases. Also, there's a small but non-negligible chance that the components will have big enough changes that save state compatibility with 0.1.x might be broken. I'll try my best to avoid this, but compatibility and accuracy will take precedence over convenience if necessary.
Compatibility improvements
Here's a small showcase of games that now work on 0.1.8 or had major bugs fixed:

(click any image to zoom)
Thanks to the enormous efforts of @GoodWall533, @thelastangryman1907 and jabeck1 (and, of course, everyone else that has contributed), the compatibility list has reached over 50% of total games reported with about 85% compatibility. Filing compatibility reports is a great way to help the community too, so don't hesitate to test games and write your reports here!
Let's start with the elephants in the room: the CD Block and the SMPC, both of which now have test ROMs built by @celeriyacon. These two components have shown the worst cracks of Ymir's emulation -- every single SMPC test fails, and out of the two CD Block tests available, it only barely manages to pass one. My attempts to fix the components to pass the tests have resulted in worsened compatibility, so they will remain failing for the time being for the sake of compatibility. Both are responsible for a large number of freezes, crashes, no-boots and similar issues, and will require significant rework to be fixed. For that reason, I have decided to shift the focus onto low-hanging fruits this version and leave these components in their just barely working states until next version.

Not looking great here, but sometimes we have to take a step backward before we can take two steps forward.
That's not to say they haven't received any fixes, though. The test ROM has helped iron out some kinks with CD Block emulation, enough to get Virtual On - Cyber Troopers to not immediately crash after winning a fight (although it's still not fully stable either), and the SMPC tests have helped fix input problems with both the JP and EU releases of Discworld. Also, the CHD loader has received enough fixes to allow every Last Bronx dump I tested to boot properly, and the CUE parser has been rewritten, fixing dozens of issues with misaligned audio tracks and problems loading files with Unicode characters. The application now supports UTF-8 characters everywhere, although the fonts won't display all characters properly yet (Japanese text, most notably).
The internal game database has been upgraded to allow detecting games that benefit (but not require) the Backup RAM cartridge. Ymir will automatically insert the cartridge for these games:
- Dezaemon 2 -- required for saving games
- Sega Ages - Galaxy Force II -- required for saving replays
These cartridges will have unique names based on the game name and are saved to <profile>/backup/games/bup-ext-<title> [<code>].bin
.
The SH-2 also got a few small fixes to edge cases thanks to new tests in @celeriyacon's SH-2 test ROM.
The SCU only had two fixes, one of which was affecting Phantasy Star IV in the Sega Ages collection from properly loading its graphics. Speaking of the games, there have been more SCSP fixes than usual this time which also helped improve compatibility with all games on the Phantasy Star collection. All of the games can now be played properly, although no one has played them to completion on Ymir yet. The SCSP fixes have also solved many problems such as soundtracks playing on only one channel, sound effects missing in multiple games, ear-bursting static noises, among others. Notably, CroNSF (also from @celeriyacon) is now playing songs properly!

Pairs of opposite sawtooth waves are used to simulate pulse waves of any width. Clever.
Finally, let's talk about graphics. Just like previous releases, there have been a multitude of VDP1 and VDP2 fixes, but this time, Ymir's VDP1 renderer has been upgraded to be pixel-perfect thanks Lordus (of DraStic fame). The new renderer received multiple optimizations and upgrades, including cycle-counting the VBlank erase process which fixes the flickering subtitles in Panzer Dragoon's FMVs (and fixes hangs in Parodius for some unexplainable reason), reworked erase and swap timings which fixes many cases of flickering or missing graphics, and a rough estimate-based cycle counting method for commands that solves significant slowdowns seen in Baroque's FMVs.
A VDP1 hack introduced on 0.1.7 to fix Mega Man X3's sprites has been reverted as it was causing problems on multiple games. This means the game's sprites are once again broken, but the upside is that at least 9 other games no longer have flashing or missing sprites.
As for the VDP2, yet another of @celeriyacon's test ROMs has helped tighten and improve video signal timings. Ymir was using an approximation that didn't quite yield the exact NTSC and PAL frame rates. Now, both modes target exactly 59.97 and 50 Hz respectively with very accurate VBlank and HBlank timings as well as VCNT sequences. Exclusive monitor modes (which no games seem to use) are partially working.
RBG rendering accuracy fixes have solved a longstanding problem in Radiant Silvergun's Stage 2C:

This used to be janky. Not anymore.
You can find the rest of the fixes in the Changes section below.
UI improvements
Ymir will now report slightly more useful error messages when it is unable to load a disc image which should help pinpoint the problem, be it a missing .bin file, a syntax error in a .cue file, a corrupted .chd, or anything of the sort. Also on the topic of errors, if the application fails to launch for some reason (such as failing to initialize the audio or video subsystems), it will display a message box with a short message describing the problem -- much better than the application not launching at all and leaving everyone (including me) confused. Also, thanks to @Wunkolo, macOS now has a global exception handler for serious issues like the one made available for Windows and Linux on 0.1.7.
The application is now capable of loading SDL game controller databases and includes a community-sourced database with the package, which should help improve compatibility with a variety of controllers.
On Windows 11, the window corners are now square rather than rounded.

An error box will be displayed if you attempt to load a game that requires a ROM cartridge (Ultraman - Hikari no Kyojin Densetsu and The King of Fighters '95) for which you don't have the image file in <profile>/roms/cart
:

The CD Block section in the System State window will now display the file being currently read, if available -- a feature requested by game translators.

Debugger
In order to help troubleshoot some of these bugs, new debugging tools have been developed which may also be useful to homebrew developers.
You can now add watchpoints to both SH-2 debuggers. Watchpoints suspend execution when a particular memory address is read or written -- extremely useful to find out what is changing or accessing a particular value (especially hardware registers), as long as it's done by an SH-2 instruction.

The SCSP has gained its first set of debugging tools:
- A slots viewer, showing the state of all registers as well as an oscilloscope of the output of each slot
- An oscilloscope with the final output sent to the speakers
- A simple KYONEX event trace (which will be improved in the future)

There's a new window that displays some of the most important VDP2 layer parameters, which has been helpful to detect some rendering issues.

The text in the Debug output window can now be selected and copied, and the entire contents of the window can be saved to a text file. This window displays data written to the Mednafen debug port and has been used by @celeriyacon's test ROMs to report test progress and provide additional context to errors. Additionally, the feature no longer requires debug tracing to be enabled.
Changes
New features and improvements
- App: Disable rounded window corners on Windows 11.
- App: Implement exception handler for macOS. (#460; @Wunkolo)
- App: Provide feedback to the user if any part of the app initialization fails.
- App: Show warning dialog if the user is missing the required ROM cartridge images for games that require them.
- Backup RAM: Per-game internal backup RAM file names changed from
bup-int-[<game code>] <title>.bin
tobup-int-<title> [<game code>].bin
to allow sorting files alphabetically in file browsers. Existing files will be automatically renamed as they are loaded. - Build: ARM64 Windows support. (#483; @tordona)
- Build: FreeBSD support for ARM64 systems. (#421; @bsdcode)
- Cart: Automatically insert Backup RAM cartridges for games that recommend their use, such as Dezaemon 2 and Sega Ages - Galaxy Force II. (#356)
- Cart: Add Vampire Savior - The Lord of Vampire demo to internal database of games that need a DRAM cartridge.
- CD Block: Allow querying files at specific frame addresses and display file being read in System State window.
- Debug: Allow exporting debug output to a file.
- Debug: Move debug port writes to a callback and remove them from the SCU tracer. Eliminates the need for debug tracing to use Mednafen's debug output method.
- Debugger: Implemented SH-2 watchpoints. (#22)
- Input: Add support for loading an external game controller database and include a community-sourced database in builds.
- Input: Added hotkey for exiting the application, requiring a key combo to trigger: at least one key modifier (Ctrl, Alt, Shift, Option, etc.) and one other key (e.g. Ctrl+Shift+Q). (#160)
- Media: Cache CHD hunks for improved performance at the cost of extra RAM usage.
- Media: Provide basic error feedback when attempting to load bad, corrupt or truncated disc images.
- SCSP: Basic debugger view for all slot registers and some state.
- SCSP: Final output oscilloscope view.
- VDP1: Optimize line plotting by skipping lines that are entirely out of the system clipping area.
- VDP1: Optimize mesh polygons by limiting updates to system clip area.
- VDP1: Simplify mesh rendering code for slightly improved performance.
- VDP1: Various performance micro optimizations.
- VDP2: Basic debugger view for NBG0-3 and RBG0-1 parameters.
Fixes
- App: Set en-US UTF-8 locale globally. Fixes CHD loader unable to load files with Unicode characters in their names.
- CD Block: Prevent a crash when attempting to set up subcode transfers without an active track.
- CD Block: Soft reset fixes. (thanks to @celeriyacon)
- CD Block: Use CD Block clock ratios instead of SCSP's for drive state update events.
- CD Block: Various state transition and playback nuances. (thanks to @celeriyacon)
- CD Block: Various Put/Get/Delete Sector Data nuances. (thanks to @celeriyacon)
- Input: Reset inputs when unbinding inputs or disconnecting gamepads.
- Media: Adjust sectors offsets when reading CHD images with multiple data tracks. Fixes some Last Bronx (USA) CHD images not booting. (#238)
- Media: Fix handling of Unicode characters when loading or saving the recent game disc list.
- Media: Ignore absolute paths when loading images from CUE sheets; load from the same directory as the CUE sheet instead.
- Media: Properly handle UTF-8-encoded CUE files referencing other files with Unicode characters.
- Media: Rewrite CUE parser to hopefully fix some audio skipping issues.
- SCSP: Allow M68K to fetch instructions from SCSP registers. Fixes CroNSF audio playback.
- SCSP: Fix check for attack stuck bug when KRS=0xF. Fixes issues in multiple games:
- Announcer voice in DonPachi's title screen is now playing consistently (#475)
- Both games in Sega Ages - I Love Mickey Mouse - Fushigi no Oshiro Daibouken & I Love Donald Duck - Georgia Ou no Hihou now play their songs correctly (#498)
- All games in Sega Ages: Phantasy Star Collection now play their songs correctly (#499)
- "Xing" voice line in Arcade Gears Vol. 2 - Gun Frontier's boot up (#467)
- Character voice lines in Langrisser III (#426)
- Character voice lines in AnEarth Fantasy Stories - The First Volume (#358)
- Voice lines during intro and throughout the game in Rapyulus Panic (#338)
- SCSP: Don't use SBCTL on slots that are playing samples from Sound RAM when the EG reaches the silence threshold. Fixes busted audio in Guardian Heroes and Elevator Action^2. (#155)
- SCSP: Silence audio when MVOL=0. Fixes lingering sound/music when pausing in Sega Ages - Galaxy Force II. (#427)
- SCU: Properly handle 8-bit and 16-bit writes to registers. Fixes Phantasy Star IV graphics in Phantasy Star Collection. (#499)
- SCU: Timer 1 was never triggering when configured to trigger on Timer 0 match of 0x000.
- SH2: Fix byte order of direct cache data accesses. (thanks to @celeriyacon)
- SH2: Fix MOVA offset when in delay slot. (thanks to @celeriyacon)
- SH2: Swap memory read order for MAC.W and MAC.L operands. (thanks to @celeriyacon)
- SMPC: Clear SF (with a delay) when receiving an INTBACK break request. Fixes Phantasy Star Collection hanging on a black screen after SEGA licensing screen.
- SMPC: Fix register reads/writes. (thanks to @celeriyacon)
- SMPC: Optimized INTBACK flag is inverted. Fixes some input issues during the intro sequence in Magic Knight Rayearth. (#477; thanks to @celeriyacon)
- SMPC: Time out pending INTBACK at VBlank IN if no Continue or Break requests are received until then. Fixes inputs in both Discworld versions. (#245; thanks to @celeriyacon)
- SMPC, VDP: Trigger optimized INTBACK more consistently closer to 1ms before VBlank IN depending on vertical resolution.
- System: Reset clock speed when soft resetting the system.
- VDP1: Clear transparent mesh layer to 0 instead of the erase write value when erasing framebuffer. Fixes Rayman's level loading screens rendering at half brightness when using the transparent meshes enhancement.
- VDP1: Cycle-count VBlank erase process. Fixes flashing subtitles in Panzer Dragoon FMVs and hangs in Parodius and Sexy Parodius. (#201)
- VDP1: Don't swap gouraud values when horizontal and/or vertical flip is enabled for an untextured polygon. Fixes bad shading in Croc - Legend of the Gobbos. (#543)
- VDP1: Force-align sprite character data address to 16 bytes when using RGB 5:5:5 color mode. Fixes misaligned team logos in All-Star Baseball '97 Featuring Frank Thomas. (#546)
- VDP1: Improve performance by avoiding double-writing the same pixels in the erase process low resolution modes. Also fixes erase process cycle counting in high resolutions.
- VDP1: Increase padding for system clip rendering optimization. Fixes stray white pixels on the right and bottom edges of the intro of Mahjong Yon Shimai - Wakakusa Monogatari and Croc - Legend of the Gobbos. (#527, #543)
- VDP1: Pixel-perfect rendering. (thanks to Lordus)
- VDP1: Delay PTM=1 drawing start to dodge some timing issues with games that trigger drawing too early. Fixes flickering glass shard in Fighter's History Dynamite's intro sequence. (#503)
- VDP1: Primitive cycle counting to work around some games that horribly abuse the VDP1, such as Baroque, Dark Seed II, and Funky Fantasy. (#311, #316, #364)
- VDP1: Remove write penalty hack introduced earlier for Mega Man X3's sprites. Fixes multiple issues:
- Missing sprites in Seikai Risshiden - Yoi Kuni, Yoi Seiji, and Jissen Pachinko Hisshou-hou! Twin (#425, #537)
- Flashing sprites in Alone in the Dark - One-Eyed Jacks Revenge, Cleaning Kit for Sega Saturn, and Contra - Legacy of War (#337, #412, #458)
- Flashing FMVs in Funky Fantasy, World Cup Golf - Professional Edition, and Magic Carpet (#311, #516, #561)
- Flickering letters in the mission briefing screens in Alien Trilogy (#394)
- VDP1: Rework scaled sprite rendering to correctly handle undocumented zoom point settings.
- VDP1: Rework erase/swap timings. Fixes numerous issues:
- VDP2: Adjust line width for RBG line color insertion. Fixes half of the field not being colored in World League Soccer '98. (#517)
- VDP2: Always read line screen scroll data even for disabled NBGs. Fixes one-frame offset on system settings screen and Deep Fear's GUI elements.
- VDP2: Don't draw out of bounds areas of the sprite layer when rotated. Fixes ground-on-sky glitch in Sega Ages - Power Drift. (#492)
- VDP2: Don't use supplementary data for characters in inaccessible VRAM banks. Fixes columns of "A"s in Darklight Conflict. (#545)
- VDP2: Double vertical window coordinates when the display is in single-density interlaced mode. Fixes the bottom half of the screen missing in Pro-Pinball: The Web. (#371)
- VDP2: Fix CRAM address bits shuffling. Fixes unexpected graphics showing up before the intro FMV in Saturn Bomberman. (#434)
- VDP2: Fix CRAM address calculation for RBG line colors. Fixes wrong colors for field shading in World League Soccer '98. (#517)
- VDP2: Fix exclusive monitor timings and resolution sizes, and out-of-bounds reads from lookup tables. (thanks to @celeriyacon)
- VDP2: Fix interlaced mode timings. (thanks to @celeriyacon)
- VDP2: Fix off-by-one error when clamping window X coordinates. Fixes one-pixel glitches in Albert Odyssey when displaying dialogue boxes.
- VDP2: Fix palette-based transparent meshes not blending with VDP2 layer (such as in Bulk Slash).
- VDP2: Fix rotation parameter line color data address calculation.
- VDP2: Fix window calculations involving illegal vertical coordinates. Fixes background glitch in Radiant Silvergun's Stage 2C.
- VDP2: Force-fetch first character of every scanline. Fixes some garbage tiles on the left edge of the screen in Athlete Kings' splash screen. (#515)
- VDP2: Handle games that only enable RBG1. Fixes missing background graphics in Houkago Ren'ai Club - Koi no Etude. (#551)
- VDP2: Handle sprite window on sprite layer manually. Fixes graphics effects when defeating the first boss in Metal Black. (#404)
- VDP2: Honor rotation parameter mode register when selecting line color data. Fixes bad sky on Episode 2 of Panzer Dragoon II Zwei and glitched sky/ceiling in Savaki. (#570)
- VDP2: Invert TVSTAT.ODD bit on single-density interlaced modes too. Fixes swapped interlaced fields in Pro-Pinball: The Web and Shienryuu. (#447)
- VDP2: Implement VCNT skip as a dedicated vertical phase. (thanks to @celeriyacon)
- VDP2: Latch TVMD.DISP and TVMD.BDCLMD at start of the frame. Fixes:
- VDP2: Move VCNT update to the left border horizontal phase where HBLANK switches to zero. (thanks to @celeriyacon)
- VDP2: Precompute per-dot rotation coefficient flag instead of deriving it twice per scanline.
- VDP2: Read per-screen line/back color only at the start of the frame. Fixes red screen after SEGA licensing logo in Ayakashi Ninden Kunoichiban Plus. (#478)
- VDP2: Recalculate RBG0/1 page base addresses when changed mid-frame. Fixes broken ground on NiGHTS into Dreams's boss fights. (#423)
- VDP2: Reduce rotation parameter calculation precision to more closely match the real system.
- VDP2: Render transparent meshes onto a separate layer instead of immediately blending them onto the sprite layer. Fixes priority issues on Akumajou Dracula X when using the enhancement. (#484)
- VDP2: Rework bitmap delays due to bad VRAM access cycles configuration. Fixes shifted graphics in Baroque Report - CD Data File. (#524)
- VDP2: Store line color data for RBGs separately. Fixes sky box issues when jumping on the spring pad in Sonic Jam's Sonic World mode. (#83)
- VDP2: Use more accurate NTSC/PAL clock timings for video sync. Eliminates stutters with refresh rates that are very slightly lower than a perfect multiple of the NTSC/PAL frame rates.
- VDP2: Use the correct character fetcher for scroll RBGs. Fixes background glitches in Battle Monsters. (#340)
Which version should I download?
Grab the file matching your operating system and processor architecture:
windows
,linux
andmacos
indicate the operating systemx86_64
is for Intel or AMD CPUs andAArch64
/ARM64
is 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.
The macOS releases are universal, working on both Apple Silicon (ARM) systems (AArch64
) and Intel systems (x86_64
). 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)