Browse Source

Emulator: Move LCDC inside PPU class

master
Riyyi 2 years ago
parent
commit
adb290a7c7
  1. 14
      src/ppu.h

14
src/ppu.h

@ -23,7 +23,12 @@
#define TILE_HEIGHT 8 #define TILE_HEIGHT 8
#define TILE_SIZE 16 #define TILE_SIZE 16
enum LCDC : uint8_t { class PPU final : public ProcessingUnit {
public:
PPU(uint32_t frequency);
~PPU();
enum LCDC : uint8_t {
None = 0, None = 0,
BGandWindowEnable = BIT(0), BGandWindowEnable = BIT(0),
OBJEnable = BIT(1), OBJEnable = BIT(1),
@ -33,12 +38,7 @@ enum LCDC : uint8_t {
WindowEnable = BIT(5), // WindowEnable = BIT(5), //
WindowTileMapArea = BIT(6), // 0 = 0x9800-9bff, 1 = 0x9c00-9fff WindowTileMapArea = BIT(6), // 0 = 0x9800-9bff, 1 = 0x9c00-9fff
LCDandPPUEnable = BIT(7), LCDandPPUEnable = BIT(7),
}; };
class PPU final : public ProcessingUnit {
public:
PPU(uint32_t frequency);
~PPU();
enum State : uint8_t { enum State : uint8_t {
HBlank = 0, HBlank = 0,

Loading…
Cancel
Save