mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 00:30:31 +00:00
Delay bitplane installation until end of slot.
This commit is contained in:
parent
4e66017205
commit
42145a5b8a
@ -272,16 +272,28 @@ template <int cycle> void Chipset::output() {
|
|||||||
if(cycle == line_length_ - 1) {
|
if(cycle == line_length_ - 1) {
|
||||||
flush_output();
|
flush_output();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update all active pixel shifters.
|
|
||||||
bitplane_pixels_.shift(is_high_res_);
|
|
||||||
sprite_shifters_[0].shift();
|
|
||||||
sprite_shifters_[1].shift();
|
|
||||||
sprite_shifters_[2].shift();
|
|
||||||
sprite_shifters_[3].shift();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update all active pixel shifters.
|
||||||
|
bitplane_pixels_.shift(is_high_res_);
|
||||||
|
sprite_shifters_[0].shift();
|
||||||
|
sprite_shifters_[1].shift();
|
||||||
|
sprite_shifters_[2].shift();
|
||||||
|
sprite_shifters_[3].shift();
|
||||||
|
|
||||||
|
// Reload if anything is pending.
|
||||||
|
if(has_next_bitplanes_) {
|
||||||
|
has_next_bitplanes_ = false;
|
||||||
|
bitplane_pixels_.set(
|
||||||
|
previous_bitplanes_,
|
||||||
|
next_bitplanes_,
|
||||||
|
odd_delay_,
|
||||||
|
even_delay_
|
||||||
|
);
|
||||||
|
previous_bitplanes_ = next_bitplanes_;
|
||||||
|
}
|
||||||
|
|
||||||
#undef LINK
|
#undef LINK
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -510,14 +522,11 @@ template <bool stop_on_cpu> Chipset::Changes Chipset::run(HalfCycles length) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Chipset::post_bitplanes(const BitplaneData &data) {
|
void Chipset::post_bitplanes(const BitplaneData &data) {
|
||||||
// Expand this
|
// Posted bitplanes should be received at the end of the
|
||||||
bitplane_pixels_.set(
|
// current memory slot. So put them aside for now, and
|
||||||
previous_bitplanes_,
|
// deal with them momentarily.
|
||||||
data,
|
has_next_bitplanes_ = true;
|
||||||
odd_delay_,
|
next_bitplanes_ = data;
|
||||||
even_delay_
|
|
||||||
);
|
|
||||||
previous_bitplanes_ = data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Chipset::BitplaneShifter::set(const BitplaneData &previous, const BitplaneData &next, int odd_delay, int even_delay) {
|
void Chipset::BitplaneShifter::set(const BitplaneData &previous, const BitplaneData &next, int odd_delay, int even_delay) {
|
||||||
|
@ -245,7 +245,8 @@ class Chipset: private ClockingHint::Observer {
|
|||||||
} bitplanes_;
|
} bitplanes_;
|
||||||
|
|
||||||
void post_bitplanes(const BitplaneData &data);
|
void post_bitplanes(const BitplaneData &data);
|
||||||
BitplaneData previous_bitplanes_;
|
BitplaneData next_bitplanes_, previous_bitplanes_;
|
||||||
|
bool has_next_bitplanes_ = false;
|
||||||
|
|
||||||
class BitplaneShifter {
|
class BitplaneShifter {
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user