I'm new here. Let me know if this is the wrong place to ask this kind of question.
I'm planning to build a Gameboy emulator. Before I start, I want to have a clear understanding of the startup behaviour of Gameboy, to ensure I implement it appropriately in my emulator.
The below is how I understand the startup process, and intend to implement it in my project.
Startup behaviour (no cartridge is selected):
Load and read the emulator's configuration file to determine if the emulator is in debug mode or not, the size of its LCD display, etc. Change emulator's internal settings.
Set up GUI and the blank graphics display.
After a user selects and loads a cartridge into the emulator:
Read the cartridge header and configure the emulator's internal settings. Emulation will be stopped (the graphics display will be blank) if the cartridge requires unsupported hardware.
If the boot ROM is not enabled, set the program counter to $100 and skip this step. Otherwise, run the boot ROM. Emulation will be stopped if the Nintendo logo in the cartridge is invalid. The boot ROM will be locked automatically after the last instruction executed. The program counter is then set to $100.
Set the register values according to this documentation.
Begin emulation loop.
- Free any memory.
I want to make sure there is nothing wrong with my understanding. Are there any problems? Did I miss anything important that the physical Gameboy would do?
Thanks in advance.