A new cycle-stepped 6502 CPU emulator

Not retrocomputing, but interesting. Looking at the implementation of a cycle-stepped 6502 CPU emulator. Might be useful as a starting point for your own emulation projects.

I wrote a new version of my 6502/6510 emulator in the last weeks which can be stepped forward in clock cycles instead of full instructions.

3 Likes

Very interesting! Andre Weissflog aka floooh is very much one to watch: great to see both development out in the open, and clear explanations of what’s happening and why. To get pixel-perfect games, demos, and software protection routines, you need surprisingly intricate emulation of all the complex chips in a system.

Andre has a showcase of 8 bit emulators here, to run in your browser:
https://floooh.github.io/tiny8bit/
(Robotron, Commodore, Sinclair, Acorn, Amstrad)

In the same vein, Matt Godbolt has written up some of his adventures in writing JSBeeb, and has also got a couple of talks up online:
https://xania.org/Emulation

1 Like

His Atom emulator looks rather promising:
https://floooh.github.io/tiny8bit/atom-ui.html

1 Like

There are some nice gadgets in his emulators too: tracing, disassembly, memory heatmap, memory edit…

Perhaps a little OT but I notice a couple of previous technical articles by Andre about emulation tactics:
Z80 Emu Evolution (2017)
The Amazing Zilog Z80 (2016)

Over the last couple of days I’ve added AtoMMC file system support to Andre’s Atom emulator, so you can now access the whole of the Atom Software Archive (almost 1000 titles) on the web.

I’ve deployed a experimental version here:
https://hoglet67.github.io/atom-ui/

(Be patient first time you load this, there is a initial download of ~20MB which can take 20-30 secs).


More details on using this are posted on Stardot:
https://stardot.org.uk/forums/viewtopic.php?f=44&t=18400

Andre has done an amazing job with these emulators. This is by far the best Javascript 6502 Emulation I have come across, both in terms of accuracy and speed.

(and yes, it passes the Dormann and the Clark BCD tests, which are included in Chapter B of the archive)

Dave

2 Likes