News for hackers. Stuff that matters.
Re:A new cycle-stepped 6502 CPU emulator by eatonphil on Sunday December 15, 2019 @05:47PM (#21799512)
This is a great introduction to emulation in general.

While I was trying to figure out how to write my first emulator I thought it would be simpler to start with a Game Boy Advance or an 8-bit processor like the 6502 or the PICO-8.

After a few false starts it turned out to be simplest to write a simple x86 emulator since I already had all the tools locally (assemblers, disassemblers, compilers, etc.) and a working reference environment (my laptop).

Here's the walkthrough I wrote for building an x86 emulator in JavaScript that you can use to run simple C programs compiled with GCC/Clang:

http://notes.eatonphil.com/emulator-basics-a-stack-and-regis...

Now that I did this though I'm still trying to get into a GBA emulator.

Re:A new cycle-stepped 6502 CPU emulator by jsmolka on Monday December 16, 2019 @06:58AM (#21802424)
> I thought it would be simpler to start with a Game Boy Advance or an 8-bit processor like the 6502

The 8-bit processor will be much more approachable. I have worked on my GBA emulator for around one year now. Before that I tried the classic GB and its 8-bit CPU was so much easier to implement. The GBA's ARM7TDMI alone took me 3 months to complete, even with extensive testing [1].

[1] https://github.com/jsmolka/eggvance/tree/master/tests