This commit is contained in:
Clément Le Bihan
2020-02-12 17:52:17 +01:00
parent de0c145dd0
commit ad22881b58
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -80,7 +80,6 @@ namespace ComSquare::PPU
case ppuRegisters::vmaddh:
this->_vmadd.vmaddh = data;
break;
//! @info should must be in vblank for the write (and write it to the screen )? and increment vram address after;
case ppuRegisters::vmdatal:
if (!this->_inidisp.fblank) {
this->_vmdata.vmdatal = data;
@@ -138,13 +137,14 @@ namespace ComSquare::PPU
void PPU::update(unsigned cycles)
{
(void)cycles;
int inc = 0;
int inc = getVramAddress();
uint32_t pixelTmp = 0xFFFFFFFF;
//pixelTmp |= this->_inidisp.brightness;
if (!this->_inidisp.fblank) {
for (int x = 0; x < 448; x++) {
for (int y = 0; y < 512; y++) {
this->_renderer.putPixel(x, y, (uint32_t)_vram[inc++] << 8U + 0xFFU);
//this->_renderer.putPixel(x, y, ((uint32_t)_vram[inc++] << 8U) + 0xFFU);
this->_renderer.putPixel(x, y, (uint32_t)this->_bus->read(inc++));
}
}
}
+1 -1
View File
@@ -286,7 +286,7 @@ namespace ComSquare::PPU
};
uint8_t raw;
} _bgnba[2];
//! @brief BGXXOFS Register (BG1/2/3/4 Horizontal and Vertical Scroll)
//! @brief BGXXOFS Register (BG1/2/3/4 Horizontal and Vertical Scrolls)
union {
struct {
uint16_t offsetBg: 10;