1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-17 13:29:02 +00:00

Obey blitter DMA-enable mask.

This commit is contained in:
Thomas Harte 2021-08-10 09:19:15 -04:00
parent e412927415
commit 76e9fcc94a

View File

@ -219,6 +219,7 @@ template <int cycle> void Chipset::output() {
} }
template <int cycle, bool stop_if_cpu> bool Chipset::perform_cycle() { template <int cycle, bool stop_if_cpu> bool Chipset::perform_cycle() {
constexpr auto BlitterFlag = DMAMask<DMAFlag::Blitter, DMAFlag::AllBelow>::value;
constexpr auto CopperFlag = DMAMask<DMAFlag::Copper, DMAFlag::AllBelow>::value; constexpr auto CopperFlag = DMAMask<DMAFlag::Copper, DMAFlag::AllBelow>::value;
constexpr auto DiskFlag = DMAMask<DMAFlag::Disk, DMAFlag::AllBelow>::value; constexpr auto DiskFlag = DMAMask<DMAFlag::Disk, DMAFlag::AllBelow>::value;
@ -255,8 +256,11 @@ template <int cycle, bool stop_if_cpu> bool Chipset::perform_cycle() {
// Down here: give first refusal to the Blitter, otherwise // Down here: give first refusal to the Blitter, otherwise
// pass on to the CPU. // pass on to the CPU.
if((dma_control_ & BlitterFlag) == BlitterFlag) {
return !blitter_.advance(); return !blitter_.advance();
} }
return true;
}
template <bool stop_on_cpu> int Chipset::advance_slots(int first_slot, int last_slot) { template <bool stop_on_cpu> int Chipset::advance_slots(int first_slot, int last_slot) {
if(first_slot == last_slot) { if(first_slot == last_slot) {