mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-09 12:51:01 +00:00
adding some reminders for me
This commit is contained in:
@@ -56,6 +56,7 @@ namespace ComSquare::PPU
|
|||||||
|
|
||||||
tileData.raw = data;
|
tileData.raw = data;
|
||||||
palette = getPalette(tileData.palette);
|
palette = getPalette(tileData.palette);
|
||||||
|
// TODO explain X and Y and rethink the formula
|
||||||
graphicAddress = this->_tileSetAddress + (tileData.posX * 16 * this->_bpp * 8) + (tileData.posY * this->_bpp * 8);
|
graphicAddress = this->_tileSetAddress + (tileData.posX * 16 * this->_bpp * 8) + (tileData.posY * this->_bpp * 8);
|
||||||
for (int i = 0; i < this->_characterSize.y; i++) {
|
for (int i = 0; i < this->_characterSize.y; i++) {
|
||||||
for (int j = 0; j < this->_characterSize.x; j++) {
|
for (int j = 0; j < this->_characterSize.x; j++) {
|
||||||
@@ -127,7 +128,7 @@ namespace ComSquare::PPU
|
|||||||
Vector2<int> pos(0,0);
|
Vector2<int> pos(0,0);
|
||||||
uint16_t vramAddress = baseAddress;
|
uint16_t vramAddress = baseAddress;
|
||||||
|
|
||||||
while (vramAddress < 0x800 + baseAddress) {
|
while (vramAddress < baseAddress + 0x800) {
|
||||||
tileMapValue = this->_vram->read_internal(vramAddress);
|
tileMapValue = this->_vram->read_internal(vramAddress);
|
||||||
tileMapValue += this->_vram->read_internal(vramAddress + 1) << 8U;
|
tileMapValue += this->_vram->read_internal(vramAddress + 1) << 8U;
|
||||||
drawBgTile(tileMapValue, {(pos.x * this->_characterSize.x) + offset.x, (pos.y * this->_characterSize.y) + offset.y});
|
drawBgTile(tileMapValue, {(pos.x * this->_characterSize.x) + offset.x, (pos.y * this->_characterSize.y) + offset.y});
|
||||||
|
|||||||
@@ -595,8 +595,10 @@ namespace ComSquare::PPU
|
|||||||
for (auto & _background : this->_backgrounds)
|
for (auto & _background : this->_backgrounds)
|
||||||
_background.renderBackground();
|
_background.renderBackground();
|
||||||
|
|
||||||
|
// TODO make a function getDefaultBgColor
|
||||||
colorPalette = this->cgram->read_internal(0);
|
colorPalette = this->cgram->read_internal(0);
|
||||||
colorPalette += this->cgram->read_internal(1) << 8U;
|
colorPalette += this->cgram->read_internal(1) << 8U;
|
||||||
|
|
||||||
for (unsigned long i = 0; i < this->_subScreen.size(); i++)
|
for (unsigned long i = 0; i < this->_subScreen.size(); i++)
|
||||||
for (unsigned long j = 0; j < this->_subScreen[i].size(); j++)
|
for (unsigned long j = 0; j < this->_subScreen[i].size(); j++)
|
||||||
this->_subScreen[i][j] = getRealColor(colorPalette);
|
this->_subScreen[i][j] = getRealColor(colorPalette);
|
||||||
@@ -679,6 +681,7 @@ namespace ComSquare::PPU
|
|||||||
//sprites priority 2
|
//sprites priority 2
|
||||||
this->addToMainSubScreen(this->_backgrounds[bgName::bg1Priority]);
|
this->addToMainSubScreen(this->_backgrounds[bgName::bg1Priority]);
|
||||||
//sprites priority 3
|
//sprites priority 3
|
||||||
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
// Not implemented
|
// Not implemented
|
||||||
default:
|
default:
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
#include <QtWidgets/QTableView>
|
#include <QtWidgets/QTableView>
|
||||||
#include <QtWidgets/QToolBar>
|
#include <QtWidgets/QToolBar>
|
||||||
#include <QtWidgets/QWidget>
|
#include <QtWidgets/QWidget>
|
||||||
//efef
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class Ui_CPUView
|
class Ui_CPUView
|
||||||
|
|||||||
Reference in New Issue
Block a user