Created an NES emulator with Babylon.js

I heard that recent AI can create an NES emulator, so I tried it out.
I used Claude Opus 4.6 to create this.

14 Likes

OMG what???

1 Like

Man…this is SO CRAZY?

2 Likes

No words, my hat to you @cx20 !

2 Likes

That is pretty fire.

Now you need to make a simple 3d arcade case and stick that as the texture for the screen.

Or like an old school TV sittin on a shag carpet XD

1 Like

I mean, how to play Donkey Kong ???

2 Likes

Does it look something like this?
This is not the result of the NES, but a glTF model (Virtual City) displayed with a CRT shader.

4 Likes

I tried to display the NES screen on the TV.

2 Likes

I have confirmed that AI can create an NES emulator in C and JavaScript.
Based on experience, I believe it is possible to do this with other languages ​​and combinations of graphics APIs.
The evolution of AI never stops.

how to actually see it emulating a game?

I’ve made it so that it can be run by dragging and dropping a ROM file.
I can’t tell you where to get the ROM file, so you’ll have to find it yourself.
The triangular sample below is an NES file that I created myself.

4 Likes

2042 works like a charm !:slight_smile:

1 Like

This is so cool thanks a ton for the loader support !!! :slight_smile:

1 Like

This is a very dangerous playground, like would it count as working if I’m testing it with Megaman 2??? :smiley:

3 Likes

I’ve confirmed that the nestest.nes ROM, which tests the NES CPU, works.

https://raw.githubusercontent.com/nwidger/nintengo/refs/heads/master/m65go2/test-roms/nestest/nestest.txt

It seems to be mostly working, but there’s a possibility of bugs in graphics, sound, timing, etc.

There’s room for improvement, but I’m satisfied with its current performance.

2 Likes

I guess so @AlitarSemiramis, at least I wont be alone :slight_smile:

5 Likes

This is a complete aside, but…
I’ve confirmed that it can be ported to C + GDI/Direct2D/X11/12/OpenGL4.6/Vulkan1.4.
I was also able to port it to Excel VBA lol

https://github.com/cx20/hello/blob/master/native_win/c/gdi/nes_triangle/hello.c
https://github.com/cx20/hello/blob/master/native_win/c/direct2d/nes_triangle/hello.c
https://github.com/cx20/hello/blob/master/native_win/c/directx11/nes_triangle/hello.c
https://github.com/cx20/hello/blob/master/native_win/c/directx12/nes_triangle/hello.c
https://github.com/cx20/hello/blob/master/native_win/c/opengl4.6/nes_triangle/hello.c
https://github.com/cx20/hello/blob/master/native_win/c/vulkan1.4/nes_triangle/hello.c
https://github.com/cx20/hello/blob/master/scripting/excel_vba/opengl4.6/nes_triangle/src/hello.bas

2 Likes

duck tales

2 Likes

I also had an AI create an NES simulator that uses a warehouse analogy to explain the NES’s structure.

4 Likes

Love the analogy!

1 Like