mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Fix: modulos are 15-bit signed, the minterms are also in regular BLTCON0.
This commit is contained in:
parent
e06f470044
commit
adc071ed7a
@ -20,7 +20,7 @@ void Blitter::set_control(int index, uint16_t value) {
|
||||
if(index) {
|
||||
line_mode_ = !(value & 1);
|
||||
} else {
|
||||
|
||||
minterms_ = value & 0xff;
|
||||
}
|
||||
shifts_[index] = value >> 12;
|
||||
LOG("Set control " << index << " to " << PADHEX(4) << value);
|
||||
@ -59,7 +59,9 @@ void Blitter::set_horizontal_size(uint16_t value) {
|
||||
|
||||
void Blitter::set_modulo(int channel, uint16_t value) {
|
||||
LOG("Set modulo size " << channel << " to " << PADHEX(4) << value);
|
||||
modulos_[channel] = value;
|
||||
|
||||
// Convert by sign extension.
|
||||
modulos_[channel] = uint32_t(int16_t(value) >> 1);
|
||||
}
|
||||
|
||||
void Blitter::set_data(int channel, uint16_t value) {
|
||||
|
@ -44,7 +44,7 @@ class Blitter: public DMADevice<4> {
|
||||
uint8_t minterms_ = 0;
|
||||
int width_ = 0, height_ = 0;
|
||||
uint32_t a_ = 0, b_ = 0;
|
||||
uint16_t modulos_[4]{};
|
||||
uint32_t modulos_[4]{};
|
||||
|
||||
int shifts_[2]{};
|
||||
bool line_mode_ = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user