One of the incredible things of these emulators is that the chips are emulated in a completely modular and isolated way, and the interface to take everything together are the pins! Yes, the logical state of the pins in the emulated chip, which is awesome and really shows how each of those machines used to work.
[0]: https://floooh.github.io/2019/12/13/cycle-stepped-6502.html
One of my favourite libraries ever is Sokol, which is used for those emulators AFAIR:
https://github.com/floooh/sokol
It hits the spot for me in terms of features, small-size and ease of use/embedding.
Every other library has way too much I don't need and way too little that I do.
It was also a fantastic code reference for me, when I was porting game code between platforms. It has all the answers I need in it, and I know how to navigate it quite well after those years. If one studies it enough it has enough material for a few reference books.
I wonder if similar approach could realistically be applied to slightly newer generation hardware like GBA with ARM7TDMI.
https://gkanold.wixsite.com/homeputerium/copy-of-games-list-...
https://floooh.github.io/tiny8bit/
(the post's link is https://floooh.github.io/tiny8bit-preview/ which I had put up at some point in the past to test some new features, but it's very outdated by now).