1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Restrict video buffer to first 512kb.

This commit is contained in:
Thomas Harte 2024-04-01 21:39:10 -04:00
parent 7c9715f00c
commit 3b62a2fe7a

View File

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