Introducing SwanShellDX, a fork of swanshell for the nileswan, coded with Claude. I couldn't have done it otherwise.
The nileswan is a top flashcart for the WonderSwan, great for your WS/WSC backups and even better for homebrew. I don't get a single euro from them, I paid full price for mine!
Given my history with the Cardputer, I just had to try getting Claude to port the simpler emulators to the WonderSwan, with some suggestions from ChatGPT 6.2 and Gemini Neon too.
So, first I customized asie's excellent swanshell (I forked it and renamed it SwanShellDX).
It now has thumbnails, game images, wallpapers and icon sets; the images and icons can be made with the tools on GitHub.
It also patches games in real time to add Quit to Cart (START + Y1 back to the menu).
On top of that, I had Claude add emulators for Game Gear, SG-1000, MSX, Sega Master System, ColecoVision, Game Boy, ZX Spectrum and SC-3000/SF-7000, the last two still very much preliminary. All of them have save states.
The optimizations took hundreds of commits:
- dynamic recompilation of the code;
- hot paths translated to V30MZ assembly;
- a custom ColecoVision BIOS rewritten from scratch, with parts of it run as native code;
- attempts to fit the code to the quirks of the WonderSwan's CPU.
You can't just write "make me a Game Boy emulator". It takes a whole lot of fine-tuning, plus guessing at changes and optimizations.
Full speed has been reached in several ROMs, mostly SMS and SG-1000, with others close to it (Game Gear, Game Boy, MSX). Frameskip is there to help make up for the rest.
There are several options to profile performance and improve it, including pre-translating at launch the code blocks recorded in .dyn files.
For more details, head over to the GitHub page, where you'll find all the technical stuff if you're interested: https://github.com/mariovirgili/swanshellDX
Releases HERE