Home GADGETS Dev uses Claude AI to write a ‘functional NES emulator’ — you...

Dev uses Claude AI to write a ‘functional NES emulator’ — you can test it now, playing Donkey Kong in your browser

Dev uses Claude AI to write a ‘functional NES emulator’ — you can test it now, playing Donkey Kong in your browser

Retro fun-loving developer Rodrigo Delduca has succeeded in prompting Claude to write “a functional NES emulator.” Claude generated a series of Lua scripts that worked in tandem with Delduca’s Carimbo 2D game engine to create the emulator. You can give the code a spin for yourself and enjoy a bit of retro Donkey Kong action online, simply by visiting this link.

The NES is one of the most widely emulated game consoles ever. And, as one of the older cartridge-based platforms, it provides a good baseline for emulator development on new platforms, or for demonstrating new emulator creation technologies. We’ve seen AI generate playable games before, as in the recent competent Minesweeper clone test using four competing LLMs. However, emulators present a very different challenge for developers (and AI).

Some insight into the NES emulator is provided by Delduca’s GitHub, where the source scripts are shared. Here you can dive into the Lua scripts that breathe life into the emulator. From the file names alone, you can see separate scripts targeting the NES CPU, PPU, Input, bus, and more. These all have to work in harmony with the game code.

(Image credit: Rodrigo Delduca)

Lua and Stamp

Source link