Hacker News new | ask | show | jobs
by RetroTechie 17 days ago
Browsing the repo linked on the page: https://github.com/floooh/chips-test

I see references to files in a "chips" directory. For example "chips/m6502.h". But those are missing? Where can they be found?

Like the concept! Reminds me somewhat of simulating a design in a hardware description language (eg. Verilator). Or the concept of 'drivers' in MAME (dunno if those emulate cycle-by-cycle btw).

So I'd welcome the opportunity to dive into how it's done on a code level.

1 comments

The actual emulator code lives here (all in STB-style headers):

https://github.com/floooh/chips

The chips-test repo has the 'integration' code which assembles the headers into executables:

https://github.com/floooh/chips-test

There's also a similar project in Zig (but less complete, it's more like an experiment what the same implementation ideas would look like in Zig) that might be a bit more readable and with everything in one place:

https://github.com/floooh/chipz

E.g. start reading the top-level emulator executables:

https://github.com/floooh/chipz/tree/main/emus

...and then move your way down to the system implementations:

https://github.com/floooh/chipz/tree/main/src/systems

...and finally to the chip emulators:

https://github.com/floooh/chipz/tree/main/src/chips

Thx for those links!