From adb290a7c7da4cc82b65e7ecc41dcb513e699324 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 17 Oct 2022 13:31:32 +0200 Subject: [PATCH] Emulator: Move LCDC inside PPU class --- src/ppu.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ppu.h b/src/ppu.h index b17654b..5695ba6 100644 --- a/src/ppu.h +++ b/src/ppu.h @@ -23,23 +23,23 @@ #define TILE_HEIGHT 8 #define TILE_SIZE 16 -enum LCDC : uint8_t { - None = 0, - BGandWindowEnable = BIT(0), - OBJEnable = BIT(1), - OBJSize = BIT(2), // 0 = 8x8, 1 = 8x16 - BGTileMapArea = BIT(3), // 0 = 0x9800-9bff, 1 = 0x9c00-9fff - BGandWindowTileDataArea = BIT(4), // 0 = 0x8800-97ff, 1 = 0x8000-8fff - WindowEnable = BIT(5), // - WindowTileMapArea = BIT(6), // 0 = 0x9800-9bff, 1 = 0x9c00-9fff - LCDandPPUEnable = BIT(7), -}; - class PPU final : public ProcessingUnit { public: PPU(uint32_t frequency); ~PPU(); + enum LCDC : uint8_t { + None = 0, + BGandWindowEnable = BIT(0), + OBJEnable = BIT(1), + OBJSize = BIT(2), // 0 = 8x8, 1 = 8x16 + BGTileMapArea = BIT(3), // 0 = 0x9800-9bff, 1 = 0x9c00-9fff + BGandWindowTileDataArea = BIT(4), // 0 = 0x8800-97ff, 1 = 0x8000-8fff + WindowEnable = BIT(5), // + WindowTileMapArea = BIT(6), // 0 = 0x9800-9bff, 1 = 0x9c00-9fff + LCDandPPUEnable = BIT(7), + }; + enum State : uint8_t { HBlank = 0, VBlank = 1,