diff --git a/Machines/Acorn/Archimedes/Video.hpp b/Machines/Acorn/Archimedes/Video.hpp index e0ca639da..e5215ae5d 100644 --- a/Machines/Acorn/Archimedes/Video.hpp +++ b/Machines/Acorn/Archimedes/Video.hpp @@ -124,6 +124,7 @@ struct Video { if(vertical_state_.position == vertical_timing_.period) { vertical_state_.position = 0; address_ = frame_start_; + if(address_ == buffer_end_) address_ = buffer_start_; entered_sync_ = true; interrupt_observer_.update_interrupts(); @@ -281,10 +282,10 @@ struct Video { return interrupt; } - void set_frame_start(uint32_t address) { frame_start_ = address; } - void set_buffer_start(uint32_t address) { buffer_start_ = address; } - void set_buffer_end(uint32_t address) { buffer_end_ = address; } - void set_cursor_start(uint32_t address) { cursor_start_ = address; } + void set_frame_start(uint32_t address) { frame_start_ = address & 0x7'ffff; } + void set_buffer_start(uint32_t address) { buffer_start_ = address & 0x7'ffff; } + void set_buffer_end(uint32_t address) { buffer_end_ = address & 0x7'ffff; } + void set_cursor_start(uint32_t address) { cursor_start_ = address & 0x7'ffff; } Outputs::CRT::CRT &crt() { return crt_; } const Outputs::CRT::CRT &crt() const { return crt_; }