r/emulation • • 2d ago

AI-assisted Erings 1.0 release (Saturn emulator) - GPU rendering, upscaling, performance improvements and more

https://nachtimwald.com/2026/10/11/erings-1.0-release

AI Help

This is an AI assisted project and as such AI is used. I’ve talked about ways I use it before. All the tests and the majority of comments are written by AI per usual. These are tedious. Tests just need to work and it’s a lot easier to edit comments written by the AI to make sense vs writing them all myself.

That said, I leaned on it a lot with this GPU work. Specifically, the internal/hostgpu package. The two parts of this are the go compiler and the GPU backend emitters. These are pretty much all AI coded. Writing something like this would have taken me far longer and I would have hated it. Even with targeting a trimmed down subset of go, this is a big and error prone feature.

Having AI do the coding doesn’t mean I walked away. I still designed what I wanted it to do. Told the AI how to do it. Reviewed and corrected what it did. A lot of time was also spent tinkering with what it came up with. For example, the first emitted hlsl code was slower running at native resolution on the 5060 than software running at 4x. I spent a lot of time debugging, optimizing, and making the AI output usable. Even then, using the AI to write the bulk of the code still saved me significant time.

Another thing it was helpful with was designing the upscaling. I didn’t want to have separate upscaling and accurate compute shaders. The upscaling needed to support multiple resolutions and native resolution is a resolution. The majority of the compute shaders were reused with a few paths for non native added to them. This all came from talking through designs and modeling ideas with the AI.

94 Upvotes

35 comments sorted by

10

u/xenphor 2d ago

Is something like PGXP for saturn emulation possible?

14

u/StrikerX3 1d ago

Not like the PS1, no. There is no dedicated 3D computing hardware in the Saturn. The VDP1 only gets 2D coordinates, and the SCU DSP is rarely used and often misused to do things other than 3D maths. Most games do 3D math on the SH2s, and even then not always in the same way. There's even homebrew out there that uses the SCSP DSP (the sound chip, mind you) to do 3D maths!

In short: it's possible only on a per-game basis, with a metric ton of effort. There's no generic solution to this.

2

u/GameSpiritGS 1d ago

Many notable Saturn games are also released on Model2 arcade machine, they ussually look better on arcade, emulator is really really old but it's well enough.

Racing games • Daytona USA • Daytona USA: Championship Circuit Edition • Sega Rally Championship • Manx TT Super Bike • Sega Touring Car Championship

Fighting games • Virtua Fighter 2 • Fighting Vipers • Last Bronx • Dead or Alive

Light Gun and Action games • Virtua Cop • Virtua Cop 2 • The House of the Dead • Cyber Troopers Virtual-On

Many of them also released on PC but it was a hassle back then when I tried.

1

u/DepartmentJust6812 1d ago

this is hugely underestimating the saturn library

1

u/Even-Serve-3095 9h ago

dude, nowadays you should probably just use mame lol

13

u/diegorbb93 2d ago

Last night, Ymir received a ton of new wonderful fixes. In time, it could even improve Mednafen Saturn and enhancements are coming. Striker is a massive friendly dev and so fair and all his code is hand-crafted. I need to express my regards for his massive contribution.

6

u/stgftgstg 1d ago

Worth mentioning that Celeriyacon and srg320's (MiSTer core dev) real hardware tests have done the most to improve Saturn emulation knowledge over the last 18 months or so and is the work that Ymir is now benefitting from. Professor Abraisive also reverse engineered the SMPC a few months ago which will no doubt filter back to software emulation in time too.

7

u/yeusk 1d ago edited 1d ago

The upscaling needed to support multiple resolutions and native resolution is a resolution.

A resolution is a resolution.

What does that even mean? u/NXGZ can you even explain to us what that means?

2

u/NXGZ 1d ago

Imagine you are playing an old game built out of tiny LEGO blocks (the original game resolution), but you want to show it on a giant, modern TV (your screen resolution)

To do this, the computer has to play a game of copy/paste. It can either zoom in on the tiny blocks, which makes the picture look blurry, or it can cleverly rebuild the game using thousands of extra sharper blocks.

When devs say "a resolution is a resolution," they just mean that at every single step; from the tiny original game blocks to the giant TV screen, the computer is constantly trying to match up grids of dots, and if the math doesn't align perfectly, the picture gets stretched or messy.

2

u/yeusk 1d ago

Just wow.

3

u/Smellbringer 11h ago

AI as a way for people to test and refine the code they wrote is valid. The problem is people going “Claude, port Paper Mario to NES, make no mistakes.” and passing that off as their own work.

9

u/TakoTank 2d ago

I don't get the reason behind starting a passion project and then using an AI that copies and pastes from other  open source emulators. Where's the fun in that?

4

u/PC509 1d ago

I was really hoping that AI would help optimize some of these emulators, finding some long lost programming tip for the processor or whatever or go through the docs and have something like "Well, the x64 CPU can easily do these instructions from the SH2 using this small function" or whatever.

Making one from "scratch" and having AI do all the work isn't what I'm talking about. But, having a current one and having AI look at it to optimize it, remove shitty code that doesn't need to be there, add new functions to help out, etc..

5

u/jack-of-some 1d ago

Some people find the fun in the end product existing and being good.

-4

u/yeusk 1d ago

being good.

Imagine defending something without even having tried it.

-13

u/DaveTheMan1985 1d ago

Not everyone can Code

5

u/wasawho 1d ago

Then don't code?

-1

u/EtherBoo 20h ago

Years ago, if an emulator was giving issues and you wanted to see improvement or different features, the answer was always "you can contribute, it's open source" or "write your own emulator if you want that." Now there's a workaround and coding has been effectively opened to newbies, and the answer is "No, not like that."

You can't have it both ways. I'm not saying you specifically, but if the general scene sentiment is "learn to code", "write your own emulator", or "don't ask for timelines" (which was scene sentiment for YEARS); the scene can't suddenly do a 180 and say "well, write your own, but you have to write it yourself, no AI or other tools".

4

u/cosine83 1d ago

Not everyone needs to.

4

u/PrincessKeba 1d ago

Oh fuck off with that excuse

0

u/stgftgstg 1d ago

What an utterly moronic response.

-1

u/TakoTank 1d ago

I'm no writer, but I wouldn't ask an AI to write a Don Quixote variation and present it to the world.

3

u/felixparochus 2d ago

Great work, especially the rumble!

-7

u/MythicalJester 1d ago

"Initial commit": Claude.

Blacklisted.

-7

u/Icy-Collection1072 2d ago

Why bother? We have good emulators and cores written by people with skill. Not ai slop

-1

u/SeaSharpModHer 2d ago

Will you still be saying this in 10/20/30 years? It's already kind of a lost battle and seeing this kind of post is already getting tiring.

3

u/yeusk 1d ago

Will you still be saying this in 10/20/30 years?

You talk like crypto bros saying bitcoin and NFT are the future.

9

u/DracoMagnusRufus 1d ago

AI assisted coding makes emulation/decompilation development a thousand times easier and faster. The proof is already in the pudding and it's only going to get even better and even faster. In contrast, 99% of crypto promises have not come to pass and outside of Bitcoin itself, they're basically all flops and rug-pulls. So, you're comparing polar opposites.

1

u/yeusk 1d ago

AI assisted coding makes emulation/decompilation development a thousand times easier and faster.

Where are the emulators better than the ones we have?

5

u/DracoMagnusRufus 1d ago

It's not an either/or situation where you're choosing purely AI created emulators or those made from scratch. AI assistance can improve the state of any of the emulators that we currently have. If devs don't want to use those tools, that's fine too and you can personally boycott or use whatever you want.

6

u/Reasonable-Band-6769 1d ago

Wrong.

In this house we only can accept purely AI created emulators OR those made from scratch. There is no shades of grey here, accepting as such is a coward's way to think /s

Its post 2016, there is ONLY black or white. Get used to it. /s

2

u/yeusk 1d ago

thousand times easier and faster.

x10000 sped ups are impossible in real life.

Calling people out about their bullshit is not boycotting, is having an opnion.

0

u/MindSp0t 1d ago

Any chance of an android port?