HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mist64
perfect6502
C2014–2026
mist64 / perfect6502

perfect6502

perfect6502, a MOS 6502 CPU emulator that performs a simulation of the original NMOS 6502 netlist

4Distinct people
13Mentions
0Explicit recommenders
329GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

perfect6502, a MOS 6502 CPU emulator that performs a simulation of the original NMOS 6502 netlist

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year13 dated mentions

Observed mentions: 2014-05-29 16:53:29 UTC to 2026-10-17 19:55:50 UTC.

01232014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC110
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC303

What Hacker News says

13 sources
> Just glancing at the source you could do easy 100x performance improvements with simple fixes. Now that you said this you really are expected to do a proof-of-concept implementation that is 100x faster, but with the same low-level concepts ;) I think 2..3x might be achievable assuming the vibe-coded code quality is really badly optimized, but definitely not 100x. As far as I understand the simulation, it does the entire address decoding and memory accesses as a transistor-level simulation (which is the whole point!), e.g. everything that happens outside the CPU, CIAs, SID and VIC-II. That means every single memory access has significant overhead because it is essentially simulated from a transitor netlist similar to how visual6502.org simulates the CPU (which even in an optimized C simulation like https://github.com/mist64/perfect6502 i
Read the rest
s still about 30x slower than a real 6502 at 1 MHz). PS: Let's do some simple napkin math: the Antirez simulator is 3x slower than a real C64, 100x faster would mean around 30x faster than a real C64, e.g. like a C64 clocked at 30 MHz. That means on a 3 GHz host CPU you would have 100 host clock cycles to emulate a (30Mhz) C64 system clock cycle, and that's for 5 complex chips (CPU + 2xCIA + VICII + SID), so around 20 host clock cycles per emulated cycle for each chip, and that doesn't include address decoding and memory access (which is the expensive part in Antirez's simulator). And moving the chip emulators into threads won't help you much here, because you'd need to synchronise at least once per emulated clock cycle (maybe even twice per emulated clock cycle because of the C64's phi-1 and phi-2 'half cycles'). Good luck with that :) (e.g. squeezing a complete VIC-II clock cycle which renders 8 pixels and may have up to 8 active sprites into 20 host system clock cycles, even with perfect pipelining, SIMD, and no cache misses this isn't a lot of host CPU instructions compared to what a VIC-II needs to do each cycle). (disclaimer: I'm the author of the pin-based chip emulators used in this experiment)
In The Commodore 64 hardware simulator: break chips and pins, see the results
Shameless plug: I wrote a 'remix' a couple of years ago over a Christmas break using WASM+WebGL+DearImGui with better rendering performance, integrated assembler and a couple visualization tools (using the visual6502 team's original reverse engineered netlist data, and https://github.com/mist64/perfect6502 as simulation loop): - 6502: https://floooh.github.io/visual6502remix/ - Z80: https://floooh.github.io/visualz80remix/ - 2A03 (this was contributed): https://floooh.github.io/visual2a03remix/ - source code: https://github.com/floooh/v6502r (the simulation generally runs throttled to 1 half-clock-cycle per frame, so don't use it as any sort of benchmark)
In The Visual 6502
Alternatively it's fairly trivial today to run a transistor-level simulation of the 6502 (and a couple of other chips) thanks to the visual6502 reverse engineering effort (the http: link is intended): http://visual6502.org/ The netlist is available in their Git repo: https://github.com/trebonian/visual6502 ...and there's a C port of the netlist simulation code: https://github.com/mist64/perfect6502 One advantage of this approach is that you can inspect internal chip state that isn't visible on the output pins, which is very useful for emulator coding. ...and a couple of years ago I glued all those bits and pieces together for a 'remix' of the original visual6502 web application, using WASM + WebGL + Dear Imgui: https://floooh.github.io/visual6502remix/
In 6502 as a Service
Author here, interesting to see this posted since it's more like a reference manual for Z80 instructions with 'unusual' timings, mostly useful for emulator coders. The followup blog post about the cycle-stepped Z80 emulator is probably more interesting: https://floooh.github.io/2021/12/17/cycle-stepped-z80.html One important note: at the start of the post I'm speculating about why I was seeing some minor differences to a 'real' Z80, it turned out that this speculation was wrong and instead the differences were caused by 'incomplete' netlist simulation code which worked fine for the 6502 but required some tweaks for the Z80, see the comments of this GH issue for details: https://github.com/floooh/v6502r/issues/2. As far as I'm aware the netlist simulation now behaves correctly like a Zilog Z80 (but note that some reverse engineered Z80 clo
Read the rest
nes like the East German U880 are known to have slightly different undocumented behaviour - which barely matters in practice though). The Z80 and 6502 emulators in https://github.com/floooh/chips are tested against their respective netlist simulations for correct behaviour and timing (all being based on the netlists from http://www.visual6502.org/ and the simulation code from https://github.com/mist64/perfect6502 - which is the simulation from visual6502.org ported from JS to C).
In Getting into way too much detail with the Z80 netlist simulation (2021)
Shameless plug: I did a WASM "visual6502 remix" a little while ago with an integrated assembler and "execution history" (mostly for fun, but also because I found the original UI a bit hard to use for my emulator experiments, so I guess it was the same motivation as the Z80 Explorer project): https://floooh.github.io/visual6502remix/ Eventually I want to do a version using the Z80 netlist of the visual6502 project as well (the actual transistor simulation code should remain the same, I used a C port of the visual6502 Javascript code called 'perfect6502'): https://github.com/mist64/perfect6502 ...I heard though that not all 'trap transistors' which should protect the Z80 from reverse engineering had been found and 'neutralized' in that netlist, so even though the ZEX test is running I'm not entirely sure whether the simulation still contain
Read the rest
s hidden problems (neither ZEXDOC nor ZEXALL have complete "coverage" of the Z80).
In Z80 Explorer – a Zilog Z80 netlist-level simulator
You can actually check on the webpage when the simulation is running: on my machine it shows around 17 Hz, so it's about 60000x slower than a 1 MHz 6502. For comparison, the C reimplementation of the transistor level simulation, running unthrottled and without visualization (I think that's the main performance killer) is about 150x slower on a modern CPU (according to the readme here: https://github.com/mist64/perfect6502)
In Visual 6502 in JavaScript
I recently wrote a "remix" of visual6502 (just for fun), with C (and a bit of C++), compiled to WASM to see whether the rendering performance of the chip visualization can be improved while still running in browsers, and also to improve the "UX" a bit: https://floooh.github.io/visual6502remix/ Check Help -> About for a list of dependencies used in that project (lots of good stuff in there), the two most important being the original data sets from visual6502, and a C re-implementation of the transistor-level simulation, called perfect6502 https://github.com/mist64/perfect6502)
In Visual 6502 in JavaScript
TBH, the main factor for the smoother performance is that rendering the chip visualization is handled very differently than the original visual6502.org. Instead of using 2D canvas, the "remix" uses WebGL and offline-precomputed static vertex buffers. The actual simulation is most likely also faster than the original JS implementation, but I haven't measured that. This is done by https://github.com/mist64/perfect6502, which is a rewrite of the original JS simulation code to C. but there's only at most one CPU half-cycle running per 60Hz frame, so the actual CPU performance for the simulation is hard to compare with visual6502.org which I think is running "unthrottled".
In Visual6502 Remix

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.