From 550ab3aff427d0d64cb7bd6c608b571c739ec1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Mon, 26 Apr 2021 21:51:02 +0200 Subject: [PATCH] changing bg display --- sources/PPU/PPU.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/PPU/PPU.cpp b/sources/PPU/PPU.cpp index 2d87009..d13980b 100644 --- a/sources/PPU/PPU.cpp +++ b/sources/PPU/PPU.cpp @@ -35,7 +35,7 @@ namespace ComSquare::PPU */ //colors for the cgram - this->cgram->write(2, 0xE0); + /* this->cgram->write(2, 0xE0); this->cgram->write(3, 0x7F); this->cgram->write(4, 0x1F); // 0x1F this->cgram->write(6, 0xFF); @@ -75,17 +75,17 @@ namespace ComSquare::PPU 00,0x03,0x00,0x03,0x00,0x03,0x00,0x06,0x00,0x0c,0x00,0x18,0x00,0xf0,0x00,0xe0, 00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0xe0,0x00,0xf0,0x00,0xf8,0x00,0xfc,0x00, 00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x07,0x00,0x0f,00,0x1f,00,0x3f,00, -1 - }; - /* int *cgram_test = get_dump_cgram(); + }; */ + int *cgram_test = get_dump_cgram(); for (int i = 0; cgram_test[i] != -1; i++) { - this->cgram->write_internal(i, cgram_test[i]); + this->cgram->write(i, cgram_test[i]); } - int *vram_test = get_dump_vram();*/ + int *vram_test = get_dump_vram(); for (int i = 0; vram_test[i] != -1; i++) { this->vram->write(i, vram_test[i]); } - int vram_test_2[] = {8, 00, 02, 00, 0x0A, 00, 02, 00, 0x0A, 00, 00, 00, 00, 00, 00, -1}; + /* int vram_test_2[] = {8, 00, 02, 00, 0x0A, 00, 02, 00, 0x0A, 00, 00, 00, 00, 00, 00, -1}; for (int i = 0; vram_test_2[i] != -1; i++) { this->vram->write(i + 0x8000, vram_test_2[i]); } @@ -143,11 +143,11 @@ namespace ComSquare::PPU //this->_registers._bgofs[2].raw = 0x03E0; //this->_registers._bgofs[3].raw = 0x03DF; this->_registers._t[0].enableWindowDisplayBg1 = true; - this->_registers._t[0].enableWindowDisplayBg2 = true; + this->_registers._t[0].enableWindowDisplayBg2 = true; */ //registers - /* this->_registers._bgmode.bgMode = 1; + 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)); @@ -199,7 +199,7 @@ namespace ComSquare::PPU this->_registers._t[0].enableWindowDisplayBg2 = true; this->_registers._t[0].enableWindowDisplayBg3 = true; -*/ + } uint8_t PPU::read(uint24_t addr)