github StrikerX3/Ymir v0.2.0

8 hours ago

Ymir v0.2.0

Discord | Patreon | Compatibility list

This update introduces low-level CD Block emulation, an optional major feature that significantly improves accuracy. Additionally, this release features a simple automatic update check that you can opt-in, SH-2, M68000 and SCU DMA timing accuracy improvements and a handful of the usual bug fixes.

The build system has been upgraded to support more complex libraries such as curl and OpenSSL. These libraries enable implementation of HTTP web requests, which allows Ymir to check for updates directly from GitHub releases (like the one you're reading right now). Because of these changes, the macOS build has been split into x86_64 and ARM64 builds instead of an universal package.

This version also fixes a known issue in version 0.1.8 related to the rewind buffer.

The CD Block LLE changes have not introduced any breaking changes to the save state file structure -- 0.2.0 is still compatible with 0.1.x save states.

Important

CD Block LLE mode fundamentally changes how CD Block emulation works. For that reason, enabling and disabling the option forces a hard reset as it is near impossible to reconciliate the HLE and LLE states.

Save states created in LLE mode require the user to have the CD Block ROM used to originally create the state in order to load it. Save states created in HLE mode require no extra ROM. Loading a save state will automatically adjust the CD Block LLE mode accordingly and attempt to load the matching ROM if available. If the ROM cannot be found, the save state will not be loaded.

Starting from this version, expect the next updates to come a bit slower and/or with less bullet points in the changes list, as I'm going to divide my attention with other projects.

Compatibility improvements

Here's a small showcase of games that now work on 0.2.0 or had major bugs fixed:

showcase

(click any image to zoom)

Thanks to the community, the compatibility list is now completely filled. Ymir now boasts over 90% compatibility over the whole collection of Saturn games with the majority of games working flawlessly or with minor issues. Some configuration tweaks are required in order to maximize compatibility -- you can find instructions in the Additional notes column of the spreadsheet.

There are three major factors that significantly improved compatibility from 0.1.x:

  • The newly introduced low-level CD Block emulation option
  • Improved SH-2 and M68EC000 bus timings
  • SCU DMA, SCU DSP DMA and SH-2 DMAC timing and bus stalls

The low-level CD Block emulation mode requires a valid CD Block ROM to work. When enabled, it greatly improves emulation accuracy of the CD drive and the commands sent by games. From my own notes and community testing, at least 23 games are now capable of going in-game or have major issues fixed when this option is enabled. A few games present issues when the option is enabled, including Grandia, Mahjong Hyper Reaction R and LifeScape - Seimei 40 Okunen Haruka na Tabi.

image

You will need to procure these ROMs on your own.

The timing improvements made to SH-2 and M68EC000 bus exchanges fixed a problem where Resident Evil would get stuck in scripted sequences, leaving characters bobbing their heads in silence forever. This change also slightly boosts overall performance as the CPUs are now running a few less instructions per frame.

Finally, the DMA timings and bus stalls were a requirement for CD Block LLE to work. The CD block subsystem requires very tight timings for each data transfer done between the CD drive, the SH-1 CPU embedded in the block and the rest of the system, and the method used previously by Ymir (run full DMA transfers instantly) was incompatible with this model. Now, Ymir will perform transfers one by one, as many as can fit within a cycle budget, and stall components (effectively skip processing them) if the bus signals that the transfer must wait. The good thing is that this method also improves compatibility with more than 20 games even with CD Block LLE is not used.

Low-level CD Block emulation reduces performance by about 15-20% due to emulating an additional CPU -- the SH-1 runs at 20 MHz, not too far from the 28 MHz of the two main SH-2 CPUs. The old high-level emulation mode will not be replaced by this option because it provides better performance and flexibility. For example, you cannot change the read speed on the LLE version because the CD Block program expects disc sector transfers to happen at very precise intervals. Any slight deviation in these timings is seen as an "error" by the program, and the block starts reporting disc read failures to the Saturn, resulting in non-working games.

The CUE parser has received an overhaul which should hopefully fix almost all audio track shifting issues. Additionally, Ymir will now correctly load cue sheets that reference .wav files as long as the files are in 44100 Hz, stereo, 16-bit raw PCM format (which exactly matches CD audio data). The CHD and ISO loaders received small fixes to improve compatibility with non-Redump dumps.

Rounding up the list is a small number of VDP1 and VDP2 fixes which deal with minor graphics issues found in a number of games as you've come to expect. Also, there's a new 6 MiB development DRAM cart option required by the Heart of Darkness prototype. Finally, a small SMPC change allows the dev kit BIOS to play its animation, but it still doesn't go past the Saturn logo.

Automatic update checks

A new automatic update check system has been introduced to help you know when Ymir has a new version. When you first launch Ymir, you will be greeted with an onboarding dialog:

image

When a new version is made available, be it a stable or a nightly version, Ymir will display a popup window with links to the release notes and a direct download link to the new version. On a future version, this process will be fully automated.

image

New options have been added to Settings > General to configure the update checker. Here you can also open the release notes and grab the binary package for the stable and nightly releases.

image

You can also check for updates from the Help menu:

image

Debugger

The old CD Block command trace has received a small upgrade: the commands and responses are now color-coded by the command type and status, respectively.

image

New debug windows have been added to trace the LLE CD drive communications as well as commands and responses.

image

A couple of new VDP2 debugger windows have been added: a CRAM palette viewer and a display overlay with various customizable views. The overlay display allows you to see which layers are being rendered, window states for every layer, RBG0 rotation parameters being displayed, and whether color calculations or shadows are in use. More overlays will come in the future.

image image image image image image image

Changes

New features and improvements

  • App: Added option to check for updates on startup. Also added manual update check action. (#110)
  • Build: Create macOS app bundle. (#591; @tegaidogun)
  • Cart: Add 6 MiB development DRAM cartridge, required by the Heart of Darkness prototype. (#584)
  • CD Block: Implemented optional low-level emulation mode. Requires valid CD Block ROMs and has considerable performance cost, but fixes numerous issues when enabled:
    • Gunbird music no longer stops when pausing and resuming the game (#625)
    • Mr. Bones is now 100% stable (#494)
    • Pocket Fighter's audio and video are now in sync (#222)
    • X-Men: Children of the Atom no longer hangs on the loading screen (#488)
    • X-Men vs. Street Fighter and Marvel vs. Street Fighter no longer hang at the end of the Capcom logo (#507)
    • Several games now boot properly:
      • Primal Rage (USA) (#225)
      • Hop Step Idol (#512)
      • Hissatsu Pachinko Collection (#536)
      • DonPachi (#475)
      • Shichuu Suimei Pitagraph (#549)
      • Deroon Dero Dero (#501)
      • Sol Divide (#470)
      • ... and probably more
  • GameDB: Apply game-specific settings directly in the emulator core rather that from the frontend.
  • GameDB: Include Heart of Darkness prototype to automatically insert the 6 MiB development DRAM cartridge, allowing it to go in-game. (#584)
  • GameDB: Introduce flag to force fast bus timings to work around issues with X-Men/Marvel Super Heroes vs. Street Fighter. (#507)
  • GameDB: Support for using disc hashes to the database in addition to product codes.
  • M68K, SH2: Implement approximate bus access timings. Fixes softlocks in Resident Evil, Shichisei Toushin Guyferd - Crown Kaimetsu Sakusen, and Densha de Go. (#41, #42, #333, #523)
  • Media: Support WAVE audio tracks.
  • SH2: Cycle count DMAC transfers. Necessary for CD Block LLE.
  • SH2: Optimize watchpoint checks to reduce performance penalty when debug tracing is enabled.
  • SMPC: Preinitialize OREG31 to 0xF0 to avoid lockup when attempting to boot the dev kit BIOS. (#612)
  • VDP2: Added CRAM palette viewer/editor.
  • VDP2: Added debug overlays: single layer view, layer stack, window states, RBG0 rotation parameters, color calculations, and shadows.

Fixes

  • App: Avoid crash if the <profile>/roms/cart folder is deleted while the emulator is running and the user loads a game that needs to load a cartridge from that folder.
  • CD Block: Properly initialize internal filesystem state and remove unnecessarily strict save state check. Fixes crashes related to the rewind buffer.
  • GUI: Limit maximum size of various windows.
  • Media: Allow loading CHDs that don't contain raw sector data, such as those created from ISOs.
  • Media: Restrict ISO loader to files with the .iso extension to prevent users from loading .bin files instead of the .cue files.
  • Media: Tracks now include the unit sizes along with sector sizes, only needed for CHDs.
  • Rewind: Allow varying the size of the state struct. Fixes occasional crashes when rewinding.
  • SCU: Delay immediate transfer interrupt signals based on the transfer length. Fixes multiple hang/freeze/crash issues:
    • Advanced V.G. (#227)
    • Angel Graffiti S - Anata e no Profile (#461)
    • Arcade Gears Vol. 1 - Pu-Li-Ru-La (#468)
    • DeJig games (#399, #541)
    • Dream Square - Hinagata Akiko (#361)
    • Ferox prototype (#609)
    • GeGeGe no Kitarou - Gentou Kaikitan (#396)
    • Gekka no Kishi - Ouryuu-sen (#353)
    • Goiken Muyou - Anarchy in the Nippon (#556)
    • Horror Tour (#319)
    • Kuro no Danshou - The Literary Fragment (#610)
    • Mahou Shoujo Pretty Samy - Heart no Kimochi (#431)
    • Marie no Atelier Ver. 1.3 - Salburg no Renkinjutsushi (#619)
    • Mario Mushano no Chou Shougi Juku - Mario Mushano's Hyper Shogi School (#430)
    • Nonomura Byouin no Hitobito (#436)
    • Pastel Muses (#380)
    • Tenchi Muyou Rensa Hitsuyou (#339)
    • Several homebrew apps (#620, #626)
  • SCU: Make DMA transfers interruptible to support LLE CD Block interactions.
  • VDP1: Adjust Y coordinate framebuffer offsets for erase process based on TVMR.TVM. Fixes erase glitches in Grandia when using transparent meshes.
  • VDP2: Bitmap delays only occur if the timings are mapped to different VRAM chips, not banks. Fixes right team name plate being shifted left during game intro in 3D Baseball. (#593
  • VDP2: Clear framebuffer when switching resolutions. Fixes single-frame artifacts in multiple games that switch modes without clearing the screen.
  • VDP2: Shift one cell of 2x2 character patterns which have illegal access cycles. Fixes garbled text in Shichuu Suimei Pitagraph. (#549)
  • VDP2: Use line color calculation ratio when LNCL is inserted on top of a layer that uses color calculations. Fixes text dialog background in Find Love 2 - The Prologue. (#618)
  • VDP2: Use TVMD.DISP from threaded state if rendering with dedicated VDP2 thread. Fixes black stripes on the bottom of the screen in Bug! (#623)

Which version should I download?

Grab the file matching your operating system and processor architecture:

  • windows, linux and macos indicate the operating system
  • x86_64 is for Intel or AMD CPUs and AArch64/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 work on 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)

Don't miss a new Ymir release

NewReleases is sending notifications on new releases.