mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +00:00
This register appears to be read/write.
This commit is contained in:
parent
6e9d517c26
commit
114d48b076
@ -313,6 +313,9 @@ class ConcreteMachine:
|
||||
case Write(0xc022):
|
||||
video_->set_text_colour(*value);
|
||||
break;
|
||||
case Read(0xc022):
|
||||
*value = video_.last_valid()->get_text_colour();
|
||||
break;
|
||||
|
||||
// Speed register.
|
||||
case Read(0xc036):
|
||||
|
@ -541,10 +541,15 @@ uint8_t Video::get_border_colour() {
|
||||
}
|
||||
|
||||
void Video::set_text_colour(uint8_t colour) {
|
||||
text_colour_entry_ = colour;
|
||||
text_colour_ = appleii_palette[colour >> 4];
|
||||
background_colour_ = appleii_palette[colour & 0xf];
|
||||
}
|
||||
|
||||
uint8_t Video::get_text_colour() {
|
||||
return text_colour_entry_;
|
||||
}
|
||||
|
||||
void Video::set_composite_is_colour(bool) {
|
||||
// TODO.
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ class Video: public Apple::II::VideoSwitches<Cycles> {
|
||||
|
||||
void set_border_colour(uint8_t);
|
||||
void set_text_colour(uint8_t);
|
||||
uint8_t get_text_colour();
|
||||
uint8_t get_border_colour();
|
||||
|
||||
void set_composite_is_colour(bool);
|
||||
@ -133,6 +134,7 @@ class Video: public Apple::II::VideoSwitches<Cycles> {
|
||||
// The modal colours.
|
||||
uint16_t border_colour_ = 0;
|
||||
uint8_t border_colour_entry_ = 0;
|
||||
uint8_t text_colour_entry_ = 0xf0;
|
||||
uint16_t text_colour_ = 0xffff;
|
||||
uint16_t background_colour_ = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user