diff options
author | Oxore <oxore@protonmail.com> | 2024-05-25 14:19:46 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2024-05-25 15:01:47 +0300 |
commit | 8f8fd609dc654bbab6918335daa0bac998e88591 (patch) | |
tree | bdfc5fdd3cd44f21b74ac52d0513d2fec1b2a5b3 | |
parent | 12b7d3674f006d1916cc3df49938dd9b61b78e2c (diff) |
Fix the case of SEGA intro cropped in half
-rw-r--r-- | vdp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -660,10 +660,10 @@ void VDP::writeControl(const uint16_t value) const uint8_t dma_address_mode = (_address_mode >> 4) & 0x3; if (MODESET2_M1_GET(mode_set_2) && dma_address_mode) { const uint16_t destination_address = _address; - const uint16_t transfer_size = - _reg[static_cast<size_t>(RegID::kDMALengthCounterLow)] | - (_reg[static_cast<size_t>(RegID::kDMALengthCounterHigh)] << 8); const uint8_t increment = _reg[static_cast<size_t>(RegID::kAutoIncrement)]; + const uint16_t transfer_size = increment * + (_reg[static_cast<size_t>(RegID::kDMALengthCounterLow)] | + (_reg[static_cast<size_t>(RegID::kDMALengthCounterHigh)] << 8)); const uint8_t dma_action = DMASRCADRHIGH_DMD_GET(_reg[static_cast<size_t>(RegID::kDMASourceAddressHigh)]); switch (dma_action) { @@ -683,7 +683,7 @@ void VDP::writeControl(const uint16_t value) destination_address, transfer_size, increment); - _address += transfer_size * increment / 2; + _address += transfer_size; } break; case 2: |