Skip to the content.

cgb.fs (lib)

The cgb.fs library contains words that help implement color support.


Word Index

enable-cgb ( – )

Use at toplevel to mark the cartridge as CGB compatible. Note that the default header marks the cartridge as a regular DMG game, which disables color related features when run on a CGB device.

detect-cgb ( – f )

Returns true if the game is running on a CGB device. Note that this word only works correctly before you write anything to the RAM, so it is recommended to check this flag immediately in your main definition, and manually store the value in a variable for later retrieval.