mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-20 14:29:11 +00:00
Remove redundant state.
This commit is contained in:
parent
511ec5a736
commit
612413cb1c
@ -126,10 +126,6 @@ void Blitter::set_control(int index, uint16_t value) {
|
||||
fill_carry_ = (value & 0x0004);
|
||||
} else {
|
||||
minterms_ = value & 0xff;
|
||||
channel_enables_[3] = value & 0x100;
|
||||
channel_enables_[2] = value & 0x200;
|
||||
channel_enables_[1] = value & 0x400;
|
||||
channel_enables_[0] = value & 0x800;
|
||||
sequencer_.set_control(value >> 8);
|
||||
}
|
||||
shifts_[index] = value >> 12;
|
||||
@ -221,10 +217,10 @@ uint16_t Blitter::get_status() {
|
||||
// Table 6-2: Typical Blitter Cycle Sequence
|
||||
|
||||
void Blitter::add_modulos() {
|
||||
pointer_[0] += modulos_[0] * channel_enables_[0] * direction_;
|
||||
pointer_[1] += modulos_[1] * channel_enables_[1] * direction_;
|
||||
pointer_[2] += modulos_[2] * channel_enables_[2] * direction_;
|
||||
pointer_[3] += modulos_[3] * channel_enables_[3] * direction_;
|
||||
pointer_[0] += modulos_[0] * sequencer_.channel_enabled<0>()* direction_;
|
||||
pointer_[1] += modulos_[1] * sequencer_.channel_enabled<1>() * direction_;
|
||||
pointer_[2] += modulos_[2] * sequencer_.channel_enabled<2>() * direction_;
|
||||
pointer_[3] += modulos_[3] * sequencer_.channel_enabled<3>() * direction_;
|
||||
}
|
||||
|
||||
bool Blitter::advance_dma() {
|
||||
|
@ -108,6 +108,10 @@ class BlitterSequencer {
|
||||
return std::make_pair(next, loop_);
|
||||
}
|
||||
|
||||
template <int channel> bool channel_enabled() {
|
||||
return control_ & (8 >> channel);
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr std::array<Channel, 1> pattern0 = { Channel::None };
|
||||
static constexpr std::array<Channel, 2> pattern1 = { Channel::Write, Channel::None };
|
||||
@ -199,8 +203,6 @@ class Blitter: public DMADevice<4, 4> {
|
||||
bool exclusive_fill_ = false;
|
||||
bool fill_carry_ = false;
|
||||
|
||||
bool channel_enables_[4]{};
|
||||
|
||||
uint8_t minterms_ = 0;
|
||||
uint32_t a32_ = 0, b32_ = 0;
|
||||
uint16_t a_data_ = 0, b_data_ = 0, c_data_ = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user