From be52fb13835338db7f8f7a8112e7faa1e12a9543 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 9 Nov 2020 14:56:25 -0500 Subject: [PATCH] sms/vdp: fix bad mirroring On the real machine, I ended up at some point getting a weird "bottom mirroring" issue. It turns out that it was because when I revamped my VDP flags in an earlier commit, I hadn't read the whole technical notes about register $02 and falsely thought that B0 was ignored. No it's not. When set, it mirrors the bottom 8 rows. --- arch/z80/sms/blk/605 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/z80/sms/blk/605 b/arch/z80/sms/blk/605 index b85436c..3614357 100644 --- a/arch/z80/sms/blk/605 +++ b/arch/z80/sms/blk/605 @@ -1,7 +1,7 @@ CREATE _idat 0b00000100 C, 0x80 C, ( Bit 2: Select mode 4 ) 0b00000000 C, 0x81 C, -0b00001110 C, 0x82 C, ( Name table: 0x3800 ) +0b00001111 C, 0x82 C, ( Name table: 0x3800, *B0 must be 1* ) 0b11111111 C, 0x85 C, ( Sprite table: 0x3f00 ) 0b11111111 C, 0x86 C, ( sprite use tiles from 0x2000 ) 0b11111111 C, 0x87 C, ( Border uses palette 0xf )