1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Resolves border colour resets.

This commit is contained in:
Thomas Harte 2020-11-26 13:13:48 -05:00
parent 73d28838c0
commit fdd102df52
3 changed files with 9 additions and 2 deletions

View File

@ -250,7 +250,7 @@ class ConcreteMachine:
// Clock and border control.
case Read(0xc034):
*value = clock_.get_control();
*value = (clock_.get_control() & 0xf0) | (video_.last_valid()->get_border_colour() & 0x0f);
break;
case Write(0xc034):
clock_.set_control(*value);

View File

@ -448,7 +448,12 @@ void Video::set_interrupts(uint8_t new_value) {
}
void Video::set_border_colour(uint8_t colour) {
border_colour_ = appleii_palette[colour & 0xf];
border_colour_entry_ = colour & 0x0f;
border_colour_ = appleii_palette[border_colour_entry_];
}
uint8_t Video::get_border_colour() {
return border_colour_entry_;
}
void Video::set_text_colour(uint8_t colour) {

View File

@ -40,6 +40,7 @@ class Video: public Apple::II::VideoSwitches<Cycles> {
void set_border_colour(uint8_t);
void set_text_colour(uint8_t);
uint8_t get_border_colour();
void set_composite_is_colour(bool);
bool get_composite_is_colour();
@ -120,6 +121,7 @@ class Video: public Apple::II::VideoSwitches<Cycles> {
// The modal colours.
uint16_t border_colour_ = 0;
uint8_t border_colour_entry_ = 0;
uint16_t text_colour_ = 0xffff;
uint16_t background_colour_ = 0;