411d74f8cbcc — Laurens Holst 6 years ago
Sprite: Avoid too fast VRAM access.

The VDP writes garbage when out-ing so fast during a copy command.
Not emulated by openMSX by the way.
1 files changed, 5 insertions(+), 0 deletions(-)

M src/sprites/Sprite.asm
M src/sprites/Sprite.asm +5 -0
@@ 66,17 66,22 @@ DontHide:
 	jr nz,Hide
 
 	out (c),h
+	nop
 	out (c),l
 	ld a,(iy + Sprite.patternNumber)
 	out (c),a
+	nop
 	out (c),a
 	ret
 Hide:
 	ld a,(ix + Sprites.y)
 	add a,232
 	out (c),a
+	nop
 	out (c),a
+	nop
 	out (c),a
+	nop
 	out (c),a
 	ret
 	ENDP