From 60effdadd8fd52096e25f05e50303b06925e1951 Mon Sep 17 00:00:00 2001 From: geijoenr Date: Fri, 9 Jun 2017 17:21:47 +0200 Subject: [PATCH] v99xx: fix timing problem when reading from higher pages when reading from addresses above 0x3fff the first byte returned by vdp is always zero. we probably should be doing a di before setting the low byte of the address then di before setting the low bit, but that that does not seem feasible at the moment. --- Kernel/dev/v99xx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kernel/dev/v99xx.c b/Kernel/dev/v99xx.c index c9202318..4b637c37 100644 --- a/Kernel/dev/v99xx.c +++ b/Kernel/dev/v99xx.c @@ -136,6 +136,7 @@ void v99xx_copy_from_vram(uint8_t *dst, uint16_t vaddr, uint16_t size) pop de ld bc, (_vdpport) out (c),e + ld a,d out (c),d pop de push de @@ -143,6 +144,9 @@ void v99xx_copy_from_vram(uint8_t *dst, uint16_t vaddr, uint16_t size) push hl push iy dec c + cp #0x3f + jp m,cpfvram_loop + in a,(c) cpfvram_loop: ini dec de @@ -216,5 +220,3 @@ void v99xx_set_blink_period(uint8_t fg, uint8_t bg) { v99xx_write_reg(V99xx_REG_BLINK_PERIOD, (fg << 4) | (bg & 0xf)); } - - -- 2.34.1