mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-09 04:24:58 +00:00
fixing some dumb errors and rm comments
This commit is contained in:
+1
-113
@@ -36,119 +36,7 @@ namespace ComSquare::PPU
|
|||||||
{
|
{
|
||||||
this->_registers._isLowByte = true;
|
this->_registers._isLowByte = true;
|
||||||
|
|
||||||
|
Utils::Debug::populateEnvironment(*this, 0);
|
||||||
//tiles
|
|
||||||
|
|
||||||
/* int *cgram_test = Utils::get_dump_cgram();
|
|
||||||
for (int i = 0; cgram_test[i] != -1; i++) {
|
|
||||||
this->cgram->write(i, cgram_test[i]);
|
|
||||||
} */
|
|
||||||
|
|
||||||
//int *vram_test = Utils::get_dump_vram();
|
|
||||||
/* for (int i = 0; vram_test[i] != -1; i++) {
|
|
||||||
this->vram->write(i, vram_test[i]);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
this->vram->write(0x80C0, 04);
|
|
||||||
this->vram->write(0x80C2, 06);
|
|
||||||
this->vram->write(0x80C4, 04);
|
|
||||||
this->vram->write(0x80C6, 06);
|
|
||||||
this->vram->write(0x80C8, 04);
|
|
||||||
|
|
||||||
this->vram->write(0xC000, 0x0C);
|
|
||||||
|
|
||||||
//registers tic tac toe
|
|
||||||
this->_registers._bgmode.bgMode = 0;
|
|
||||||
this->_backgrounds[0].setBpp(this->getBPP(1));
|
|
||||||
this->_backgrounds[1].setBpp(this->getBPP(1));
|
|
||||||
this->_backgrounds[2].setBpp(this->getBPP(2));
|
|
||||||
this->_backgrounds[3].setBpp(this->getBPP(2));
|
|
||||||
this->_backgrounds[4].setBpp(this->getBPP(3));
|
|
||||||
this->_backgrounds[5].setBpp(this->getBPP(3));
|
|
||||||
this->_backgrounds[6].setBpp(this->getBPP(4));
|
|
||||||
this->_backgrounds[7].setBpp(this->getBPP(4));
|
|
||||||
|
|
||||||
this->_registers._bgmode.characterSizeBg1 = true;
|
|
||||||
this->_registers._bgmode.characterSizeBg2 = true;
|
|
||||||
this->_backgrounds[0].setCharacterSize(this->getCharacterSize(1));
|
|
||||||
this->_backgrounds[1].setCharacterSize(this->getCharacterSize(1));
|
|
||||||
this->_backgrounds[2].setCharacterSize(this->getCharacterSize(2));
|
|
||||||
this->_backgrounds[3].setCharacterSize(this->getCharacterSize(2));
|
|
||||||
this->_backgrounds[4].setCharacterSize(this->getCharacterSize(3));
|
|
||||||
this->_backgrounds[5].setCharacterSize(this->getCharacterSize(3));
|
|
||||||
this->_backgrounds[6].setCharacterSize(this->getCharacterSize(4));
|
|
||||||
this->_backgrounds[7].setCharacterSize(this->getCharacterSize(4));
|
|
||||||
|
|
||||||
this->_registers._bgsc[0].tilemapAddress = 0x4000 >> 10U;
|
|
||||||
this->_registers._bgsc[1].tilemapAddress = 0x6000 >> 10U;
|
|
||||||
this->_backgrounds[0].setTileMapStartAddress(this->getTileMapStartAddress(1));
|
|
||||||
this->_backgrounds[1].setTileMapStartAddress(this->getTileMapStartAddress(1));
|
|
||||||
this->_backgrounds[2].setTileMapStartAddress(this->getTileMapStartAddress(2));
|
|
||||||
this->_backgrounds[3].setTileMapStartAddress(this->getTileMapStartAddress(2));
|
|
||||||
|
|
||||||
//this->_registers._bgofs[2].raw = 0x03E0;
|
|
||||||
//this->_registers._bgofs[3].raw = 0x03DF;
|
|
||||||
this->_registers._t[0].enableWindowDisplayBg1 = true;
|
|
||||||
this->_registers._t[0].enableWindowDisplayBg2 = true;
|
|
||||||
|
|
||||||
|
|
||||||
//registers aladin
|
|
||||||
|
|
||||||
this->_registers._bgmode.bgMode = 1;
|
|
||||||
this->_backgrounds[0].setBpp(this->getBPP(1));
|
|
||||||
this->_backgrounds[1].setBpp(this->getBPP(1));
|
|
||||||
this->_backgrounds[2].setBpp(this->getBPP(2));
|
|
||||||
this->_backgrounds[3].setBpp(this->getBPP(2));
|
|
||||||
this->_backgrounds[4].setBpp(this->getBPP(3));
|
|
||||||
this->_backgrounds[5].setBpp(this->getBPP(3));
|
|
||||||
//this->_registers._bgmode.characterSizeBg1 = false;
|
|
||||||
//this->_registers._bgmode.characterSizeBg2 = false;
|
|
||||||
this->_registers._bgmode.mode1Bg3PriorityBit = true;
|
|
||||||
this->_backgrounds[0].setCharacterSize(this->getCharacterSize(1));
|
|
||||||
this->_backgrounds[1].setCharacterSize(this->getCharacterSize(1));
|
|
||||||
this->_backgrounds[2].setCharacterSize(this->getCharacterSize(2));
|
|
||||||
this->_backgrounds[3].setCharacterSize(this->getCharacterSize(2));
|
|
||||||
|
|
||||||
this->_registers._bgsc[0].tilemapAddress = 0x4800U >> 10U; // 0x4800
|
|
||||||
this->_registers._bgsc[0].tilemapHorizontalMirroring = 1;
|
|
||||||
this->_registers._bgsc[1].tilemapAddress = 0x4000U >> 10U; // 0x4000
|
|
||||||
this->_registers._bgsc[1].tilemapHorizontalMirroring = 1;
|
|
||||||
this->_registers._bgsc[2].tilemapAddress = 0x5C00U >> 10U;
|
|
||||||
this->_backgrounds[0].setTileMapStartAddress(this->getTileMapStartAddress(1));
|
|
||||||
this->_backgrounds[0].setTilemaps(this->getBackgroundSize(1));
|
|
||||||
this->_backgrounds[1].setTileMapStartAddress(this->getTileMapStartAddress(1));
|
|
||||||
this->_backgrounds[1].setTilemaps(this->getBackgroundSize(1));
|
|
||||||
this->_backgrounds[2].setTileMapStartAddress(this->getTileMapStartAddress(2));
|
|
||||||
this->_backgrounds[2].setTilemaps(this->getBackgroundSize(2));
|
|
||||||
this->_backgrounds[3].setTileMapStartAddress(this->getTileMapStartAddress(2));
|
|
||||||
this->_backgrounds[3].setTilemaps(this->getBackgroundSize(2));
|
|
||||||
this->_backgrounds[4].setTileMapStartAddress(this->getTileMapStartAddress(3));
|
|
||||||
this->_backgrounds[5].setTileMapStartAddress(this->getTileMapStartAddress(3));
|
|
||||||
|
|
||||||
//registres bgnba
|
|
||||||
//this->_registers._bgnba[0].baseAddressBg1a3 = 0x5;
|
|
||||||
//this->_registers._bgnba[0].baseAddressBg2a4 = 0x5;
|
|
||||||
this->_registers._bgnba[1].baseAddressBg1a3 = 0x5;
|
|
||||||
|
|
||||||
//this->_backgrounds[0].setTilesetAddress(this->getTilesetAddress(1));
|
|
||||||
//this->_backgrounds[1].setTilesetAddress(this->getTilesetAddress(1));
|
|
||||||
//this->_backgrounds[2].setTilesetAddress(this->getTilesetAddress(2));
|
|
||||||
//this->_backgrounds[3].setTilesetAddress(this->getTilesetAddress(2));
|
|
||||||
this->_backgrounds[4].setTilesetAddress(this->getTilesetAddress(3));
|
|
||||||
this->_backgrounds[5].setTilesetAddress(this->getTilesetAddress(3));
|
|
||||||
|
|
||||||
this->_registers._vmain.incrementMode = true;
|
|
||||||
this->_registers._vmain.incrementAmount = 1;
|
|
||||||
|
|
||||||
this->_registers._vmdata.vmdata = 0x1AF0;
|
|
||||||
|
|
||||||
this->_registers._t[0].enableWindowDisplayBg1 = true;
|
|
||||||
this->_registers._t[0].enableWindowDisplayBg2 = true;
|
|
||||||
this->_registers._t[0].enableWindowDisplayBg3 = true;
|
|
||||||
*/
|
|
||||||
|
|
||||||
Utils::Debug::populateEnvironment(*this, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t PPU::read(uint24_t addr)
|
uint8_t PPU::read(uint24_t addr)
|
||||||
|
|||||||
@@ -74,6 +74,12 @@ namespace ComSquare::PPU::Utils::Debug
|
|||||||
vram->write(0x8046, 06);
|
vram->write(0x8046, 06);
|
||||||
vram->write(0x8048, 04);
|
vram->write(0x8048, 04);
|
||||||
|
|
||||||
|
vram->write(0x80C0, 04);
|
||||||
|
vram->write(0x80C2, 06);
|
||||||
|
vram->write(0x80C4, 04);
|
||||||
|
vram->write(0x80C6, 06);
|
||||||
|
vram->write(0x80C8, 04);
|
||||||
|
|
||||||
vram->write(0xC000, 0x0C);
|
vram->write(0xC000, 0x0C);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user