mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-21 21:33:54 +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:
parent
0ef2806970
commit
2510064218
@ -366,6 +366,7 @@ template <Timing timing> class Video {
|
||||
Sets the current border colour.
|
||||
*/
|
||||
void set_border_colour(uint8_t colour) {
|
||||
border_byte_ = colour;
|
||||
border_colour_ = palette[colour];
|
||||
}
|
||||
|
||||
@ -389,6 +390,7 @@ template <Timing timing> class Video {
|
||||
Outputs::CRT::CRT crt_;
|
||||
const uint8_t *memory_ = nullptr;
|
||||
uint8_t border_colour_ = 0;
|
||||
uint8_t border_byte_ = 0;
|
||||
|
||||
uint8_t *pixel_target_ = nullptr;
|
||||
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) {
|
||||
target.set_border_colour(border_colour);
|
||||
target.time_into_frame_ = time_into_frame;
|
||||
|
Loading…
Reference in New Issue
Block a user