News for hackers. Stuff that matters.
Re:Visual 6502 in JavaScript by flohofwoe on Monday February 10, 2020 @05:45PM (#22294236)
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)

Re:Visual 6502 in JavaScript by jakear on Monday February 10, 2020 @08:45PM (#22295242)
Does yours have a clock speed readout? Can’t seem to find it.
Re:Visual 6502 in JavaScript by flohofwoe on Tuesday February 11, 2020 @04:48AM (#22297257)
No display for that, I was mostly interested in the single-stepping capability for investigating the chip behaviour and validating against my CPU emulators.

But when clicking the "play" button it's throttled to one half-cycle per 60 Hz display frame (requestanimationframe) so "usually" it should run at 30 Hz.

I haven't checked how fast the WASM version would run unthrottled compared against a natively compiled version of perfect6502, but performance should be somewhat close (much closer than to the JS version anyway).

As far as I have seen, the C rewrite in perfect6502 uses a handful compact arrays for the simulation state, unlike the Javascript version which seems to be more like a huge graph of linked nodes, where each node is a JS object, so the C version should be a lot more cache-friendly.