Files
Mark Johnson ff7db6a614 Add bootrom compiler flow (#231)
* Add makefile for bootrom compilation


Add flag for SameBoy compilation, separate asm sources

Also adds WIndows make switches
Replace SameBoy PB12 encoding with old encoding

GameBoy logo still not 100%
Clarify Makefile, add image compilation


Remove sameboy source

* Remove DMG emulation of CGB games


Remove unused variable.


Change logo extension


Remove rgbgfx option

Nintendo logo correct now
Explicitly define slice

* Remove palette selection for CGB games

* Old-style Gameboy logo

* Add GBA menu option for built-in CGB rom

* Restore original DMG scrolling animation

* Add original CGB bios checksum verification

* Add fastboot option to DMG/CGB bootroms, create new OSD submenu

Also add further checksums for CGB0 bootrom and equivalent checksum C code. Grouped together all bootrom items into new submenu. Removed redundant bootroms (AGB, fastboot)

* Update README and give SameBoy attribution

Clean up checksum + make

* Incorporate latest SameBoy boot changes

Gives correct register values on boot

* Update readme

* Add AGB alternative boot color

---------

Co-authored-by: Mark Johnson <mark.ai.johnson@pm.me>
2023-02-13 00:13:19 +08:00
..
2023-02-13 00:13:19 +08:00
2023-02-13 00:13:19 +08:00
2023-02-13 00:13:19 +08:00
2023-02-13 00:13:19 +08:00
2023-02-13 00:13:19 +08:00
2023-02-13 00:13:19 +08:00

Bootroms

Attribution

The bootrom source code here has been adapted from the SameBoy project The MIT license is included in these files.

Compilation

Bootrom compilation follows the same approach as SameBoy.

The following tools and libraries are required to build bootroms:

The Makefile contains to following targets:

  • default compiles dmg_boot.bin, cgb_boot.bin and sgb_boot.bin and concatenates them into cgb_boot.mif
  • bootroms compiles all default binaries as well as mgb_boot.bin, cgb0_boot.bin and sgb2_boot.bin
  • checksum compiles a program to calculate simple checksums of binary files
  • all all of the above
  • clean delete all bootroms and object files, as well as cgb_boot.mif

Checksum

A tool is provided to calculate the checksum of a binary file. These checksums are used in the core to verify if the enhanced boot features are available.

Note: If these bootroms are edited and recompiled in future, the checksums should be recalculated and updated in Gameboy.sv

Enhancements

For convenience, two enhancements have been added to the bootroms which enables the on-screen display to change the default boot behaviour without the user needing to load a new bootrom.
Some of these enhancements extend to alternative roms in the binary folder

Fast boot

Fast boot skips the boot animation for the following bootroms:

  • cgb_boot.bin (built-in)
  • cgb0_boot.bin
  • dmg_boot.bin (built-in)

AGB emulation

The Game Boy Advance had a slightly different CGB bootrom, which enabled special features in a small number of games. AGB emulation is available for:

  • cgb_boot.bin (built-in)
  • cgb0_boot.bin
  • The original CGB bootrom (not provided)