mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-08 14:25:05 +00:00
Completes state object.
Subject to not yet dealing with last_fetches_ and last_contended_access_ correctly. Thought required.
This commit is contained in:
@@ -366,6 +366,7 @@ template <Timing timing> class Video {
|
|||||||
Sets the current border colour.
|
Sets the current border colour.
|
||||||
*/
|
*/
|
||||||
void set_border_colour(uint8_t colour) {
|
void set_border_colour(uint8_t colour) {
|
||||||
|
border_byte_ = colour;
|
||||||
border_colour_ = palette[colour];
|
border_colour_ = palette[colour];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,6 +390,7 @@ template <Timing timing> class Video {
|
|||||||
Outputs::CRT::CRT crt_;
|
Outputs::CRT::CRT crt_;
|
||||||
const uint8_t *memory_ = nullptr;
|
const uint8_t *memory_ = nullptr;
|
||||||
uint8_t border_colour_ = 0;
|
uint8_t border_colour_ = 0;
|
||||||
|
uint8_t border_byte_ = 0;
|
||||||
|
|
||||||
uint8_t *pixel_target_ = nullptr;
|
uint8_t *pixel_target_ = nullptr;
|
||||||
int attribute_address_ = 0;
|
int attribute_address_ = 0;
|
||||||
@@ -430,6 +432,14 @@ struct State: public Reflection::StructImpl<State> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Video> State(const Video &source) : State() {
|
||||||
|
border_colour = source.border_byte_;
|
||||||
|
time_into_frame = source.time_into_frame_;
|
||||||
|
flash = source.flash_mask_;
|
||||||
|
flash_counter = source.flash_counter_;
|
||||||
|
is_alternate_line = source. is_alternate_line_;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Video> void apply(Video &target) {
|
template <typename Video> void apply(Video &target) {
|
||||||
target.set_border_colour(border_colour);
|
target.set_border_colour(border_colour);
|
||||||
target.time_into_frame_ = time_into_frame;
|
target.time_into_frame_ = time_into_frame;
|
||||||
|
Reference in New Issue
Block a user