Baekalfen/PyBoy

[Enhancement] Expose BG/Obj0/Obj1 Palletes

Closed this issue · 0 comments

# Running DMG ROM on CGB hardware use the default palettes
bg_pal = (0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000)
obj0_pal = (0xFFFFFF, 0xFF8484, 0xFF8484, 0x000000)
obj1_pal = (0xFFFFFF, 0xFF8484, 0xFF8484, 0x000000)
self.BGP.palette_mem_rgb = [(c << 8) for c in bg_pal]
self.OBP0.palette_mem_rgb = [(c << 8) for c in obj0_pal]
self.OBP1.palette_mem_rgb = [(c << 8) for c in obj1_pal]

These pallets are hardcoded now. Exposing them would let us apply the original gameboy color pallets to gameboy games. We'd like to toss this on Pokemon Red for the AI project on it.