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

Fix sprite H start bit order.

This commit is contained in:
Thomas Harte 2021-10-22 23:20:20 -07:00
parent 2121e32409
commit 610327a04e

View File

@ -960,12 +960,12 @@ void Chipset::Bitplanes::set_control(uint16_t control) {
void Chipset::Sprite::set_start_position(uint16_t value) {
v_start_ = (v_start_ & 0xff00) | (value >> 8);
h_start_ = (h_start_ & 0xff00) | ((value & 0xff));
h_start_ = uint16_t((h_start_ & 0x0001) | ((value & 0xff) << 1));
active = false;
}
void Chipset::Sprite::set_stop_and_control(uint16_t value) {
h_start_ = uint16_t((h_start_ & 0x00ff) | ((value & 0x01) << 8));
h_start_ = uint16_t((h_start_ & 0x01fe) | (value & 0x01));
v_stop_ = uint16_t((value >> 8) | ((value & 0x02) << 7));
v_start_ = uint16_t((v_start_ & 0x00ff) | ((value & 0x04) << 6));
attached = value & 0x80;