CEmu
CEmu copied to clipboard
LCD controller's (PL111's) LPP not handled properly
With "Emulate physical LCD SPI drawing" checked, lowering LPP (lines per panel) lowers both the number of rows and columns refreshed. It should only lower the number of rows refreshed.
Simple test code to replicate:
ld hl,(mpLcdRange+4)
push hl
res 0,h
res 1,h
ld (mpLcdRange+4),hl
ld a,100-1
ld (mpLcdRange+4),a
ld hl,vram
ld de,vram+1
ld bc,320*240*2
ld (hl),100
ldir
_: call _GetCSC
or a,a
jr z,-_
pop hl
ld (mpLcdRange+4),hl
ret
Here's the offending code: https://github.com/CE-Programming/CEmu/blob/master/core/lcd.c#L152-L167
