X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=testpico%2Fmain.c;h=2f7a4ec26196c510a3153a3b54ead40b476e65de;hb=refs%2Fremotes%2Fgithub%2Fmaster;hp=43da6e6d6b3a992db5c674983c6a38cbf5a513bb;hpb=ec8170d94019bbfcdd7f53b31f0d27951162c23b;p=megadrive.git diff --git a/testpico/main.c b/testpico/main.c index 43da6e6..2f7a4ec 100644 --- a/testpico/main.c +++ b/testpico/main.c @@ -810,6 +810,33 @@ static int t_dma_fill_src(void) return ok; } +// should not see the busy flag +static int t_dma_busy_vram(void) +{ + const u32 *src = (const u32 *)0x3c0000; + u16 sr[3]; + int ok = 1; + + vdp_wait_for_line_0(); + + do_setup_dma(src, 1); + write32(VDP_CTRL_PORT, CTL_WRITE_VRAM(0x100) | CTL_WRITE_DMA); + sr[0] = read16(VDP_CTRL_PORT); + + do_setup_dma(src, 4); + write32(VDP_CTRL_PORT, CTL_WRITE_VRAM(0x100) | CTL_WRITE_DMA); + sr[1] = read16(VDP_CTRL_PORT); + + VDP_setReg(VDP_DMA_LEN0, 8); + write32(VDP_CTRL_PORT, CTL_WRITE_VRAM(0x100) | CTL_WRITE_DMA); + sr[2] = read16(VDP_CTRL_PORT); + + expect_bits(ok, sr[0], 0, SR_DMA); + expect_bits(ok, sr[1], 0, SR_DMA); + expect_bits(ok, sr[2], 0, SR_DMA); + return ok; +} + // (((a & 2) >> 1) ^ 1) | ((a & $400) >> 9) | (a & $3FC) | ((a & $1F800) >> 1) static int t_dma_128k(void) { @@ -2234,7 +2261,7 @@ static int t_32x_reset_prep(void) r16[0x8a/2] = 0x0001; mem_barrier(); for (i = 0; i < 220/2; i++) - fbl[i] = 0; + write32(&fbl[i], 0); r8 [0x81] = 1; r16[0x82/2] = 0xffff; r16[0x84/2] = 0xffff; @@ -2273,6 +2300,7 @@ static const struct { { T_MD, t_dma_fill3_vsram, "dma fill3 vsram" }, { T_MD, t_dma_fill_dis, "dma fill disabled" }, { T_MD, t_dma_fill_src, "dma fill src incr" }, + { T_MD, t_dma_busy_vram, "dma no busy" }, { T_MD, t_dma_128k, "dma 128k mode" }, { T_MD, t_vdp_128k_b16, "vdp 128k addr bit16" }, // { t_vdp_128k_b16_inc, "vdp 128k bit16 inc" }, // mystery