Comment

Comment by ehaskins

I've been working on a GB emulator for awhile.

Step one is to understand the architecture of the system. What are the different hardware components? How do they interact?

A simple emulator boils down to:

While(true) Emulate_one_cpu_cycle()

For each cycle you have to produce any side effects from the various peripherals (serial comms, update the display, generate audio, etc.), process any external changes (button presses, serial data), and emulate the next CPU instruction (basically a big switch).

I recommend "The Ultimate Gameboy Talk (33c3)" [0], for an overview of the Gameboy and it's internal peripherals.

There are various test ROMs available that you can use to verify the basic functionality. [1][2]

0. https://m.youtube.com/watch?v=HyzD8pNlpwI 1. http://gbdev.gg8.se/wiki/articles/Test_ROMs 2. https://github.com/Gekkio/mooneye-gb

parent ehaskins 7 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton