From 46696e1d57aa33b3bf1cd54cc78ef58dc14c8079 Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 3 Oct 2022 02:59:26 +0300 Subject: Impl DMA VRAM fill --- vdp.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'vdp.hpp') diff --git a/vdp.hpp b/vdp.hpp index 030b38e..1db49db 100644 --- a/vdp.hpp +++ b/vdp.hpp @@ -77,8 +77,14 @@ class VDP { uint8_t* base, uint32_t source_address, uint16_t destination_address, - uint16_t transfer_size); - static void runDMAVRAMFill(uint8_t* base); + uint16_t transfer_size, + uint8_t increment); + static void runDMAVRAMFill( + uint8_t* base, + uint16_t destination_address, + uint16_t transfer_size, + uint8_t increment, + uint16_t filler); static void runDMAVRAMCopy(uint8_t* base); static constexpr size_t kRegistersCount = static_cast(RegID::kRegistersCount); @@ -90,7 +96,11 @@ class VDP { StatusRegister _status{}; bool _control_write_second_word{}; + // DMA Fill is ready to kick in, waiting for filler set to data port + bool _dma_ready{}; uint16_t _lines_counter{}; + // TODO: Make _address_mode of type AddressMode somehow and all private + // methods using it should be accepting AddressMode instead of uint8_t. uint8_t _address_mode{}; uint16_t _address{}; uint8_t _reg[kRegistersCount]{}; -- cgit v1.2.3