CEmu icon indicating copy to clipboard operation
CEmu copied to clipboard

LCD controller's (PL111's) LPP not handled properly

Open runer112 opened this issue 7 years ago • 3 comments

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.

runer112 avatar Feb 17 '18 20:02 runer112

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

mateoconlechuga avatar Mar 28 '18 20:03 mateoconlechuga

Here's the offending code: https://github.com/CE-Programming/CEmu/blob/master/core/lcd.c#L152-L167

mateoconlechuga avatar Apr 05 '18 03:04 mateoconlechuga

image

The above rectangle should stretch across the whole screen horizontally.

test.8xp.zip

mateoconlechuga avatar Apr 08 '18 05:04 mateoconlechuga