Skip to content

Commit

Permalink
Fix get() in LCD register FF69 to return 8 bits instead of 16. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
krs013 authored and Baekalfen committed Dec 26, 2023
1 parent e211225 commit b6adc3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyboy/core/lcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,10 @@ def set(self, val):
self.index_reg.shouldincrement()

def get(self):
return self.palette_mem[self.index_reg.getindex()]
if self.index_reg.hl:
return (self.palette_mem[self.index_reg.getindex()] & 0xFF00) >> 8
else:
return self.palette_mem[self.index_reg.getindex()] & 0x00FF

def getcolor(self, paletteindex, colorindex):
# Each palette = 8 bytes or 4 colors of 2 bytes
Expand Down

0 comments on commit b6adc3a

Please sign in to comment.