mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Uses explicit state to determine whether a pixel target has been requested.
This commit is contained in:
@@ -370,7 +370,8 @@ void TMS9918::run_for(const HalfCycles cycles) {
|
|||||||
intersect(
|
intersect(
|
||||||
line_buffer.first_pixel_output_column,
|
line_buffer.first_pixel_output_column,
|
||||||
line_buffer.next_border_column,
|
line_buffer.next_border_column,
|
||||||
if(start == line_buffer.first_pixel_output_column) {
|
if(!asked_for_write_area_) {
|
||||||
|
asked_for_write_area_ = true;
|
||||||
pixel_origin_ = pixel_target_ = reinterpret_cast<uint32_t *>(
|
pixel_origin_ = pixel_target_ = reinterpret_cast<uint32_t *>(
|
||||||
crt_->allocate_write_area(static_cast<unsigned int>(line_buffer.next_border_column - line_buffer.first_pixel_output_column))
|
crt_->allocate_write_area(static_cast<unsigned int>(line_buffer.next_border_column - line_buffer.first_pixel_output_column))
|
||||||
);
|
);
|
||||||
@@ -392,6 +393,7 @@ void TMS9918::run_for(const HalfCycles cycles) {
|
|||||||
const unsigned int length = static_cast<unsigned int>(line_buffer.next_border_column - line_buffer.first_pixel_output_column);
|
const unsigned int length = static_cast<unsigned int>(line_buffer.next_border_column - line_buffer.first_pixel_output_column);
|
||||||
crt_->output_data(length * 4, length);
|
crt_->output_data(length * 4, length);
|
||||||
pixel_origin_ = pixel_target_ = nullptr;
|
pixel_origin_ = pixel_target_ = nullptr;
|
||||||
|
asked_for_write_area_ = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -788,6 +788,7 @@ class Base {
|
|||||||
#undef slot
|
#undef slot
|
||||||
|
|
||||||
uint32_t *pixel_target_ = nullptr, *pixel_origin_ = nullptr;
|
uint32_t *pixel_target_ = nullptr, *pixel_origin_ = nullptr;
|
||||||
|
bool asked_for_write_area_ = false;
|
||||||
void draw_tms_character(int start, int end);
|
void draw_tms_character(int start, int end);
|
||||||
void draw_tms_text(int start, int end);
|
void draw_tms_text(int start, int end);
|
||||||
void draw_sms(int start, int end);
|
void draw_sms(int start, int end);
|
||||||
|
Reference in New Issue
Block a user