diff options
author | Oxore <oxore@protonmail.com> | 2022-10-03 00:31:53 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2022-10-03 00:31:53 +0300 |
commit | 872d2c2766536a372af5d1048bed7514078f9d31 (patch) | |
tree | 7d4071d664214d500d1be710add46b1f7486c350 /vdp.hpp | |
parent | 897c498b543f88d9b97f39e7a8f3aa691d11cc37 (diff) |
Impl vblank irq
Diffstat (limited to 'vdp.hpp')
-rw-r--r-- | vdp.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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]{}; |