From 6baae249714f936528dadff7e6ef6906eff46c42 Mon Sep 17 00:00:00 2001 From: Akatsuki-py Date: Sat, 16 May 2020 07:47:02 +0900 Subject: [PATCH] #1 OAM VRAM Bank take only 0 in DMG --- pkg/gpu/gpu.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/gpu/gpu.go b/pkg/gpu/gpu.go index fc48021..c1ad6d6 100644 --- a/pkg/gpu/gpu.go +++ b/pkg/gpu/gpu.go @@ -229,6 +229,10 @@ func (g *GPU) setTileLine(entryX, entryY int, lineIndex uint, addr uint16, tileT // entryX, entryY: 何Pixel目を基準として配置するか VRAMBankPtr := (attr >> 3) & 0x01 + if !isCGB { + VRAMBankPtr = 0 + } + lowerByte, upperByte := g.VRAMBank[VRAMBankPtr][addr-0x8000], g.VRAMBank[VRAMBankPtr][addr-0x8000+1] for j := 0; j < 8; j++ {