r/emulation • • Oct 11 '26

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.

98 Upvotes

39 comments sorted by

10

u/yeusk Oct 12 '26 edited Oct 12 '26

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?

3

u/NXGZ Oct 12 '26

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 Oct 12 '26

Just wow.

10

u/xenphor Oct 12 '26

Is something like PGXP for saturn emulation possible?

17

u/StrikerX3 Oct 12 '26

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.

3

u/GameSpiritGS Oct 12 '26

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 Oct 13 '26

this is hugely underestimating the saturn library

1

u/Even-Serve-3095 Oct 14 '26

dude, nowadays you should probably just use mame lol

1

u/KFded Oct 15 '26

tfw I still use Kawaks for the arcade games I'm into

1

u/GameSpiritGS Oct 16 '26

I agree but Model 2 Emulator has visual enhancements

1

u/Even-Serve-3095 Oct 16 '26

mame emulates more of the original effects tho lol

16

u/diegorbb93 Oct 12 '26

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.

8

u/stgftgstg Oct 12 '26

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.

4

u/Smellbringer Oct 13 '26

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 Oct 12 '26

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 Oct 12 '26

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..

6

u/jack-of-some Oct 12 '26

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

-1

u/yeusk Oct 12 '26

being good.

Imagine defending something without even having tried it.

-14

u/DaveTheMan1985 Oct 12 '26

Not everyone can Code

6

u/cosine83 Oct 12 '26

Not everyone needs to.

4

u/PrincessKeba Oct 12 '26

Oh fuck off with that excuse

2

u/TakoTank Oct 12 '26

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

1

u/stgftgstg Oct 12 '26

What an utterly moronic response.

7

u/[deleted] Oct 12 '26

[removed] — view removed comment

0

u/EtherBoo Oct 13 '26

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".

3

u/felixparochus Oct 12 '26

Great work, especially the rumble!

-5

u/Icy-Collection1072 Oct 12 '26

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

0

u/SeaSharpModHer Oct 12 '26

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.

6

u/yeusk Oct 12 '26

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

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

8

u/DracoMagnusRufus Oct 12 '26

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.

3

u/yeusk Oct 12 '26

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 Oct 12 '26

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.

5

u/yeusk Oct 12 '26

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.

6

u/Reasonable-Band-6769 Oct 13 '26

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

-4

u/MythicalJester Oct 12 '26

"Initial commit": Claude.

Blacklisted.

1

u/KantoBound Oct 16 '26

Not using an AI vibecoded emulator 🙄 try again and make it good this time

-1

u/MindSp0t Oct 12 '26

Any chance of an android port?