mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Attempts to support left and right masks.
This commit is contained in:
parent
759689ff31
commit
b4b6c4d86f
@ -33,10 +33,12 @@ void Blitter::set_control(int index, uint16_t value) {
|
||||
|
||||
void Blitter::set_first_word_mask(uint16_t value) {
|
||||
LOG("Set first word mask: " << PADHEX(4) << value);
|
||||
a_mask_[0] = value;
|
||||
}
|
||||
|
||||
void Blitter::set_last_word_mask(uint16_t value) {
|
||||
LOG("Set last word mask: " << PADHEX(4) << value);
|
||||
a_mask_[1] = value;
|
||||
}
|
||||
|
||||
void Blitter::set_size(uint16_t value) {
|
||||
@ -161,9 +163,11 @@ bool Blitter::advance() {
|
||||
}
|
||||
|
||||
if(channel_enables_[3]) {
|
||||
const uint16_t a_mask = (x == 0) ? a_mask_[0] : ((x == width_ - 1) ? a_mask_[1] : 0xffff);
|
||||
|
||||
ram_[pointer_[3] & ram_mask_] =
|
||||
apply_minterm(
|
||||
a_,
|
||||
uint16_t(a_ & a_mask),
|
||||
b_,
|
||||
c_,
|
||||
minterms_);
|
||||
|
@ -46,6 +46,7 @@ class Blitter: public DMADevice<4> {
|
||||
bool line_mode_ = false;
|
||||
bool channel_enables_[4]{};
|
||||
uint32_t direction_ = 1;
|
||||
uint16_t a_mask_[2] = {0xffff, 0xffff};
|
||||
|
||||
uint8_t minterms_ = 0;
|
||||
uint32_t a32_ = 0, b32_ = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user