added ppu register access

This commit is contained in:
Lauchmelder 2021-10-23 20:16:29 +02:00
parent 19d138fb5f
commit 7c0957325f
7 changed files with 113 additions and 19 deletions

View file

@ -23,7 +23,7 @@ struct PPU
Byte raw;
} ppuctrl;
} ppuCtrl;
union
{
@ -39,7 +39,7 @@ struct PPU
Byte raw;
} ppumask;
} ppuMask;
union
{
@ -53,13 +53,26 @@ struct PPU
Byte raw;
} ppustatus;
} ppuStatus;
Byte oamaddr;
Byte oamdata;
Byte ppuScroll;
Byte ppuAddr;
Byte ppuData;
Byte scrollX, scrollY;
Byte scrollWriteTarget;
union
{
struct
{
Byte lo;
Byte hi;
};
Word raw;
} ppuAddress;
Byte ppuAddressWriteTarget;
Byte oamdma;
Byte* patternTables[2];
@ -81,6 +94,8 @@ struct PPU
Word x, y;
struct Bus* bus;
};