Kronos 2.1.2 progress report (Sega Saturn emulator)

It has been some time since the last report, let’s try to go a bit more in-depth this time.

The OpenGL CS video renderer

The Saturn is a beast. It features 8 processors, among them are 2 custom graphics processors called VDP1 and VDP2. The VDP2 handled backgrounds, while the VDP1 handled sprites, textures and polygons.

The VDP1 was rendering “quads” line per line, the general idea was to interpolate endpoints along the horizontal edges, then to draw textured lines between those endpoints. It had to draw the lines with an extra pixel where the slope changed, so all of the pixels had a neighbor to the left, right, top, or bottom. They did this to prevent gaps between the lines.

A modern graphics APIs like OpenGL doesn’t know how to do that, because its rendering pipeline is based on triangle geometry, so basically it can’t reproduce VDP1 behavior. There are tricks like tesselation, but ultimately they are just workarounds for specific issues and not all-in-one solutions for this. Here is some good news though : with OpenGL 4.3, a new feature called compute shaders was introduced, you might have heard about it through Flycast’s order independent transparency, or N64’s parallel, this new component gives lots of flexibility to OpenGL, and allows the implementation of routines to render quads line per line. It is what this renderer is about : reproducing VDP1 behavior accurately.

Let’s do some comparison, from first to last, those images were shot from console, Mednafen/beetle, Kronos (OpenGL CS renderer), Kronos (the old OpenGL renderer, based on YabaSanshiro’s). There are 2 things noticeable related to this VDP1 behavior in those :

  • border of the road : on console, Mednafen and Kronos’s new renderer, if you zoom in, you’ll notice it’s not a smooth line, there are dots, this is the accurate behavior; the last screen, while the smooth line might look better, is actually inaccurate.
  • holes everywhere : if you zoom in on the last screenshot, you’ll notice some holes here and there, on the top of the hills, on the road in the back, those holes don’t exist on the other screenshots.

It’s possible to workaround those holes with the OpenGL renderer, but at the end of the day you end up creating other issues in the process. Until recently we used such workaround but, in the case of Sega Rally, it was magnifying the dots on the border of the road.

The only known downside of this new renderer is that it will require a fairly good GPU!

ST-V support was improved

While still a bit preliminary, some major rework was done recently on ST-V support :

  • You can now set your favorite bios region (NB : it will be ignored if the game doesn’t support that region though)
  • The EEPROM is now properly saved and loaded
  • ROM loading mechanism was fixed, there should be no more messages of the ST-V bios telling you there is something wrong with the game you are trying to launch
  • Lots of input issues, going from the lack of kick harness (used for 5th & 6th buttons on some games) to the inputs not responding at all, were fixed

Improvements on the Libretro port

There were some long-term issues with the Libretro implementation, but a lot of improvements were done about them :

  • Resolution switching, which is something that happens every few seconds on saturn, was somehow wrong, one of the worst side effect was artifacts especially visible in “mesh” (if you don’t use the “improved mesh” core option), it was fixed
  • Toggling between fullscreen and windowed was causing issues from glitches to crashes, it has been mostly fixed
  • While the saturn framerate should be 50 or 60 fps depending on the region, sometimes it’s not rendering anything because the Saturn is actually shutting down its video output, kronos is trying to have an accurate behavior for this too, which is a bit of a headache for the libretro ecosystem which is expecting a more linear framerate. A better way of handling this was implemented.

Also, here is a summary of this core’s options :

  • Force HLE BIOS : it will ignore your bios file and use the old HLE bios from yabause instead, this function is unmaintained and is mainly there for debugging purpose (there is at least one known case where it’s unlocking the game though : Astal, for some reason the real bios is shutting down the video output), don’t report issues if you enabled this option.
  • Video format : will force format to PAL or NTSC, default is auto
  • Frameskip : will skip rendering at a fixed rate, it can improve playability dramatically on lower end devices
  • SH-2 cpu core : default is “kronos”, our cross-platform cached interpreter, the other one is the unmaintained yabause SH-2 interpreter, we got the same policy than the HLE bios about it.
  • OpenGL version : this option was introduced as a workaround for setups giving false positive when asking if a specific OpenGL version was supported (it happened…), set this to the highest version your gpu support.
  • Video renderer : to enable the new renderer, default is the old one for compatibility reasons
  • Share saves with beetle : will share save paths with beetle-saturn, allowing you to use the same savefiles.
  • Addon cartridge : to change cartridge, default is auto, it is recommended to let the default except if you intend to play heart of darkness, a prototype requiring the 16M extended RAM.
  • 6Player Adaptor on Port 1 : self explanatory
  • 6Player Adaptor on Port 2 : same, one word of warning though, enabling the second multitap is known for causing a weird autofire behavior.
  • Internal Resolution : self explanatory
  • Polygon Mode : works with the default OpenGL renderer, used to fix wobbling textures issues, OpenGL CS doesn’t need this, default is cpu tesselation but gpu tesselation is recommended if your gpu supports it (OpenGL 4.2), perspective correction is more cpu friendly but heavily glitched.
  • Improved mesh : will replace fake transparency (mesh) by real transparency, default is disabled
  • RBG Compute shaders : will use compute shaders to rotate background, it is recommended if your gpu supports it, default is disabled
  • Wireframe mode : self-explanatory ? It works only with OpenGL CS, mostly for debugging but can be a fun feature, give it a try for curiosity !
  • ST-V Service/Test Buttons : enable buttons to access service menu in ST-V game, default is disabled to avoid misspress
  • ST-V Favorite Region : select your region for ST-V, default is EU for censorship and language reasons.

On a sidenote, lots of other things were fixed/improved since my last report, but nothing seemed major so we decided to skip them. If you want to know more about this emulator, you can check the youtube channel, or join us on discord.

Final Burn Neo Progress Report

A lot happened since my last progress report, so it might be a good time to keep you updated about FBNeo progress.

NES/FDS support

I see most of you saying “Isn’t FBNeo an arcade emulator ?”. Well, not exactly, we do some console emulation too, i already mentioned it in my last post. You might think there is nothing exciting about having a new NES/FDS emulator, but here is the deal : it’s probably one of the best ones available, we have yet to find glitches, even on games known for glitching on pretty much every other NES/FDS emulators. The downside is that, since it’s accuracy oriented, it won’t run that well on low-end devices. The emulator was written from scratch, mainly by reading nesdev, dink worked on it for 7 months, getting tons of help/testing/code/imagery from team 🙂

If you try to find another emulator that will render the following screen without any kind of glitch, you might be in a pinch, codemasters games are generally the bane of nes emulation.

As usual, usage of specific romsets is required (dat files are available at the usual place), it’s mostly based on No-Intro dumps. If your favorite NES/FDS game (even hacks or unofficial translations) is missing, you can request support on our forum. Currently we support around 1300 games.

New arcade games

I’ll probably forget some :

  • Rabbit : a fighting game from 1997, one of the only Electronic Arts arcade games
  • Express Raider : a beat’em’up from 1987
  • Super Dodge Ball : a dodgeball game from 1987
  • Tom Tom Magic : a flipper game from 1997
  • Thief : a maze game from 1982
  • Shark Attack : a game where you are a great white shark who attacks divers, from 1981
  • NATO Defense : another maze game from 1982
  • Victory : a shooter game where you defend an island, from 1982
  • Sega System 24 : a Sega arcade hardware from early 90s, you can see the list of games here
  • Akka Arrh : a space shooter from 1982
  • Alien Rescue : a homebrew from, running on pacman hardware
  • Magic Purple : a platform game from 1996
  • King of Boxer : a boxing game from 1985
  • Dead Angle : a shooter game from 1988
  • Buggy Challenge : a racing game from 1985
  • Denjin Makai : a beat’em’up from 1995
  • Godzilla : a fighting game from 1993
  • Heated Barrel : a run’n’gun from 1992
  • Legionnaire : a beat’em’up from 1992
  • SD Gundam Sangokushi Rainbow Tairiku Senki : a run’n’gun from 1993
  • Pitpat Puzzle : a puzzle game from 1997
  • Berzerk : a maze/shooter game from 1980
  • Frenzy : follow up of berzerk, from 1982

Here is a screenshot of rabbit

New hacks

  • Final Fight 30th Anniversary Edition : an advanced hack of Final Fight, among other features/improvements it supports 3 players
  • Otto Project PZ : do you know about crazy otto ? if not you might want to read this. This hack is an attempt to reproduce this game which was a prototype of ms pacman.
  • Lots and lots of hacks of many popular games and systems, including neogeo, cps, donkey kong and mortal kombat

Here is a screenshot of Otto Project PZ

Improvements and fixes

There are hundreds of them so i’ll just mention the latest improvement i did : i added a Hires 1080p mode to every vector games, you can enable it through dipswitches (in core options)

You can find more about what was fixed by looking at our issue tracker

Improvements and fixes specific to the libretro port

  • fixed a crash that would happen when switching neogeo bios while using readahead
  • prevent user from using incompatible neogeo bios with specific games
  • improved default mapping for many games, including the usage of analog triggers as default to accelerate and brake in many racing games
  • added an alternative way to load subsystems, more friendly with devices using static linking like android (more details in my FAQ)
  • improved & sanitized core options, one thing worth mentioning is the CPU clock feature that got fixed (previously the values displayed were different from what was actually applied) and now allows to underclock too (which can be useful to reproduce slowdowns from original hardware, or to lower hardware requirements)