updating debug registers result is better but it's weird

This commit is contained in:
Clément Le Bihan
2021-07-07 01:05:23 +02:00
parent 3e73370a9a
commit 8a4a515d4c

View File

@@ -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;