1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Attempts to support left and right masks.

This commit is contained in:
Thomas Harte 2021-09-26 18:42:08 -04:00
parent 759689ff31
commit b4b6c4d86f
2 changed files with 6 additions and 1 deletions

View File

@ -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_);

View File

@ -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;