Constants¶
Technical overview. The graphics and memory hardware uses fixed addresses, dimensions, and limits: VRAM, tile maps, OAM, the LCD frame, and the number of available tiles or sprites. These values describe the layout and capacity of the emulated hardware.
Using the API. The pyboy.api.constants module exposes those values as
named Python constants. Use them when interpreting addresses or sizing data
structures instead of duplicating hardware-specific numbers in an
application.
Memory constants used internally to calculate tile and tile map addresses.
- pyboy.api.constants.VRAM_OFFSET¶
Start address of VRAM
- pyboy.api.constants.LCDC_OFFSET¶
LCDC Register
- pyboy.api.constants.OAM_OFFSET¶
Start address of Object-Attribute-Memory (OAM)
- pyboy.api.constants.LOW_TILEMAP¶
Start address of lower tilemap
- pyboy.api.constants.HIGH_TILEMAP¶
Start address of high tilemap
- pyboy.api.constants.LOW_TILEDATA¶
Start address of lower tile data
- pyboy.api.constants.LOW_TILEDATA_NTILES¶
Number of tiles in lower tile data
- pyboy.api.constants.HIGH_TILEDATA¶
Start address of high tile data
- pyboy.api.constants.TILES¶
Number of tiles supported on Game Boy DMG (non-color)
- pyboy.api.constants.TILES_CGB¶
Number of tiles supported on Game Boy Color
- pyboy.api.constants.SPRITES¶
Number of sprites supported
- pyboy.api.constants.ROWS¶
Rows (horizontal lines) on the screen
- pyboy.api.constants.COLS¶
Columns (vertical lines) on the screen