From 8a4a515d4c30b4dec9bedd365c76c6cd2c040cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Wed, 7 Jul 2021 01:05:23 +0200 Subject: [PATCH] updating debug registers result is better but it's weird --- sources/PPU/PpuDebug.cpp | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/sources/PPU/PpuDebug.cpp b/sources/PPU/PpuDebug.cpp index 2657e27..2de7ba1 100644 --- a/sources/PPU/PpuDebug.cpp +++ b/sources/PPU/PpuDebug.cpp @@ -3776,18 +3776,18 @@ namespace ComSquare::PPU::Utils::Debug { ppu._registers._bgmode.bgMode = 1; ppu._backgrounds[0].setBpp(ppu.getBPP(1)); - ppu._backgrounds[1].setBpp(ppu.getBPP(1)); - ppu._backgrounds[2].setBpp(ppu.getBPP(2)); - ppu._backgrounds[3].setBpp(ppu.getBPP(2)); - ppu._backgrounds[4].setBpp(ppu.getBPP(3)); - ppu._backgrounds[5].setBpp(ppu.getBPP(3)); + ppu._backgrounds[1].setBpp(ppu.getBPP(2)); + ppu._backgrounds[2].setBpp(ppu.getBPP(3)); + ppu._backgrounds[3].setBpp(ppu.getBPP(4)); + //ppu._backgrounds[4].setBpp(ppu.getBPP(3)); + //ppu._backgrounds[5].setBpp(ppu.getBPP(3)); //ppu._registers._bgmode.characterSizeBg1 = false; //ppu._registers._bgmode.characterSizeBg2 = false; ppu._registers._bgmode.mode1Bg3PriorityBit = true; ppu._backgrounds[0].setCharacterSize(ppu.getCharacterSize(1)); - ppu._backgrounds[1].setCharacterSize(ppu.getCharacterSize(1)); - ppu._backgrounds[2].setCharacterSize(ppu.getCharacterSize(2)); - ppu._backgrounds[3].setCharacterSize(ppu.getCharacterSize(2)); + ppu._backgrounds[1].setCharacterSize(ppu.getCharacterSize(2)); + ppu._backgrounds[2].setCharacterSize(ppu.getCharacterSize(3)); + ppu._backgrounds[3].setCharacterSize(ppu.getCharacterSize(4)); ppu._registers._bgsc[0].tilemapAddress = 0x4800U >> 10U; // 0x4800 ppu._registers._bgsc[0].tilemapHorizontalMirroring = 1; @@ -3796,14 +3796,15 @@ namespace ComSquare::PPU::Utils::Debug ppu._registers._bgsc[2].tilemapAddress = 0x5C00U >> 10U; ppu._backgrounds[0].setTileMapStartAddress(ppu.getTileMapStartAddress(1)); ppu._backgrounds[0].setTileMapMirroring(ppu.getBackgroundMirroring(1)); - ppu._backgrounds[1].setTileMapStartAddress(ppu.getTileMapStartAddress(1)); - ppu._backgrounds[1].setTileMapMirroring(ppu.getBackgroundMirroring(1)); - ppu._backgrounds[2].setTileMapStartAddress(ppu.getTileMapStartAddress(2)); - ppu._backgrounds[2].setTileMapMirroring(ppu.getBackgroundMirroring(2)); - ppu._backgrounds[3].setTileMapStartAddress(ppu.getTileMapStartAddress(2)); - ppu._backgrounds[3].setTileMapMirroring(ppu.getBackgroundMirroring(2)); - ppu._backgrounds[4].setTileMapStartAddress(ppu.getTileMapStartAddress(3)); - ppu._backgrounds[5].setTileMapStartAddress(ppu.getTileMapStartAddress(3)); + ppu._backgrounds[1].setTileMapStartAddress(ppu.getTileMapStartAddress(2)); + ppu._backgrounds[1].setTileMapMirroring(ppu.getBackgroundMirroring(2)); + ppu._backgrounds[2].setTileMapStartAddress(ppu.getTileMapStartAddress(3)); + ppu._backgrounds[2].setTileMapMirroring(ppu.getBackgroundMirroring(3)); + ppu._backgrounds[3].setTileMapStartAddress(ppu.getTileMapStartAddress(4)); + ppu._backgrounds[3].setTileMapMirroring(ppu.getBackgroundMirroring(4)); + + //ppu._backgrounds[4].setTileMapStartAddress(ppu.getTileMapStartAddress(3)); + //ppu._backgrounds[5].setTileMapStartAddress(ppu.getTileMapStartAddress(3)); //registres bgnba //ppu._registers._bgnba[0].baseAddressBg1a3 = 0x5; @@ -3814,8 +3815,8 @@ namespace ComSquare::PPU::Utils::Debug //ppu._backgrounds[1].setTilesetAddress(ppu.getTilesetAddress(1)); //ppu._backgrounds[2].setTilesetAddress(ppu.getTilesetAddress(2)); //ppu._backgrounds[3].setTilesetAddress(ppu.getTilesetAddress(2)); - ppu._backgrounds[4].setTilesetAddress(ppu.getTilesetAddress(3)); - ppu._backgrounds[5].setTilesetAddress(ppu.getTilesetAddress(3)); + ppu._backgrounds[2].setTilesetAddress(ppu.getTilesetAddress(3)); + //ppu._backgrounds[3].setTilesetAddress(ppu.getTilesetAddress(3)); ppu._registers._vmain.incrementMode = true; ppu._registers._vmain.incrementAmount = 1;