From 872d2c2766536a372af5d1048bed7514078f9d31 Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 3 Oct 2022 00:31:53 +0300 Subject: Impl vblank irq --- vdp.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vdp.hpp') diff --git a/vdp.hpp b/vdp.hpp index cd93938..9357377 100644 --- a/vdp.hpp +++ b/vdp.hpp @@ -13,6 +13,7 @@ class VDP { VDP(const uint32_t base_address_a = VDP_START): base_address(base_address_a) {} uint32_t Read(uint32_t offset, enum bitness); void Write(uint32_t offset, enum bitness, uint32_t value); + bool Scanline(); // Returns true if display disabled or vblank happened void Reset(); const uint32_t base_address; @@ -76,9 +77,12 @@ class VDP { static constexpr size_t kVRAMSize = 64*1024; static constexpr size_t kCRAMSize = 64*2; static constexpr size_t kVSRAMSize = 40*2; + static constexpr uint16_t kLinesPerScreenNTSC = 262; + static constexpr uint16_t kLinesPerScreenPAL = 312; StatusRegister _status{}; bool _control_write_second_word{}; + uint16_t _lines_counter{}; uint8_t _address_mode{}; uint16_t _address{}; uint8_t _reg[kRegistersCount]{}; -- cgit v1.2.3