4 ms·
CHIP-8 is by far the easiest emulator project you can start with, but be wary - chances are it won't work perfectly from the get go and you'll end up writing an
by madflame991 9y ago
CHIP-8 is by far the easiest emulator project you can start with, but be wary - chances are it won't work perfectly from the get go and you'll end up writing an assembler, disassembler and debugger. There are tons of documentation and implementations out there to help you out.
I wrote one[1] some time ago and it's very rewarding to pop in random games and see how badly they perform on your faulty/incomplete "machine" (ex: tetrominoes not dropping in tetris because the hardware timer was not implemented).
[1]: http://adrianton3.github.io/chip8/src/assembler/assembler.html http://adrianton3.github.io/chip8/src/assembler/assembler.ht...
- masklinn 9y ago> it won't work perfectly from the get go and you'll end up writing an assembler, disassembler and debugger. There are tons of documentation and implementations out there to help you out. It's really interesting, but I found some bits of the "end game" frustrating, I didn't finish mine because I was never sure how keyboard events had to be handled in the face of cycles coalescing (the emulator's rendering loop works at 60fps and the timers are 60Hz, but IIRC most programs which are are written assuming 500~1000Hz, this causes issues when a key is pressed over an entire frame — or more — and the program uses SKP or SKNP rather than the better-behaved LDxK). Then there's the weird stuff like the SYS opcode which kinda exists but should not be implemented but has two sub-opcodes which should be. I wonder if there's a "test harness" for chip8 emulators somewhere (hook in a chip8 emulator somehow and it tells you what you fucked up).