mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
DMA: Add additional tick penalty to DMA chains for page change
This commit is contained in:
parent
6a2deb6d71
commit
df12f08ac3
|
@ -294,7 +294,7 @@ bool DMA::TransferChannel(Channel channel)
|
||||||
{
|
{
|
||||||
u32 header;
|
u32 header;
|
||||||
std::memcpy(&header, &ram_pointer[current_address & ADDRESS_MASK], sizeof(header));
|
std::memcpy(&header, &ram_pointer[current_address & ADDRESS_MASK], sizeof(header));
|
||||||
used_ticks++;
|
used_ticks += 10;
|
||||||
|
|
||||||
const u32 word_count = header >> 24;
|
const u32 word_count = header >> 24;
|
||||||
const u32 next_address = header & UINT32_C(0x00FFFFFF);
|
const u32 next_address = header & UINT32_C(0x00FFFFFF);
|
||||||
|
@ -302,6 +302,7 @@ bool DMA::TransferChannel(Channel channel)
|
||||||
word_count * UINT32_C(4), word_count, next_address);
|
word_count * UINT32_C(4), word_count, next_address);
|
||||||
if (word_count > 0)
|
if (word_count > 0)
|
||||||
{
|
{
|
||||||
|
used_ticks += 5;
|
||||||
used_ticks +=
|
used_ticks +=
|
||||||
TransferMemoryToDevice(channel, (current_address + sizeof(header)) & ADDRESS_MASK, 4, word_count);
|
TransferMemoryToDevice(channel, (current_address + sizeof(header)) & ADDRESS_MASK, 4, word_count);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue