mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-06 10:38:16 +00:00
Adds text colour register.
Oddly this isn't currently being set. So probably another latent fault elsewhere.
This commit is contained in:
parent
b57a2bfec9
commit
3bb3d8c5c1
@ -187,8 +187,14 @@ class ConcreteMachine:
|
||||
*value = clock_.get_control();
|
||||
} else {
|
||||
clock_.set_control(*value);
|
||||
video_->set_border_colour(*value & 0xf);
|
||||
// TODO: also set border colour.
|
||||
video_->set_border_colour(*value);
|
||||
}
|
||||
break;
|
||||
|
||||
// Colour text control.
|
||||
case 0xc022:
|
||||
if(!is_read) {
|
||||
video_->set_text_colour(*value);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -152,7 +152,7 @@ void VideoBase::output_row(int row, int start, int end) {
|
||||
}
|
||||
|
||||
// Possibly output border, pixels, border, if this is a pixel line.
|
||||
if(row < 200) { // TODO: use real test here; should be 192 for classic Apple II modes.
|
||||
if(row < 192 + ((new_video_&0x80) >> 4)) { // i.e. 192 lines for classic Apple II video, 200 for IIgs video.
|
||||
|
||||
// Output left border as far as currently known.
|
||||
if(start >= start_of_left_border && start < start_of_pixels) {
|
||||
@ -211,6 +211,8 @@ void VideoBase::output_row(int row, int start, int end) {
|
||||
}
|
||||
|
||||
bool VideoBase::get_is_vertical_blank() {
|
||||
// Cf. http://www.1000bit.it/support/manuali/apple/technotes/iigs/tn.iigs.040.html ;
|
||||
// this bit covers the entire vertical border area, not just the NTSC-sense vertical blank.
|
||||
return cycles_into_frame_ >= FinalPixelLine * CyclesPerLine;
|
||||
}
|
||||
|
||||
@ -245,5 +247,10 @@ void VideoBase::set_interrupts(uint8_t new_value) {
|
||||
}
|
||||
|
||||
void VideoBase::set_border_colour(uint8_t colour) {
|
||||
border_colour_ = appleii_palette[colour];
|
||||
border_colour_ = appleii_palette[colour & 0xf];
|
||||
}
|
||||
|
||||
void VideoBase::set_text_colour(uint8_t colour) {
|
||||
text_colour_ = appleii_palette[colour >> 4];
|
||||
background_colour_ = appleii_palette[colour & 0xf];
|
||||
}
|
||||
|
@ -37,7 +37,9 @@ class VideoBase: public Apple::II::VideoSwitches<Cycles> {
|
||||
void set_interrupt_register(uint8_t);
|
||||
|
||||
void notify_clock_tick();
|
||||
|
||||
void set_border_colour(uint8_t);
|
||||
void set_text_colour(uint8_t);
|
||||
|
||||
/// Sets the scan target.
|
||||
void set_scan_target(Outputs::Display::ScanTarget *scan_target);
|
||||
@ -62,7 +64,11 @@ class VideoBase: public Apple::II::VideoSwitches<Cycles> {
|
||||
|
||||
int cycles_into_frame_ = 0;
|
||||
const uint8_t *ram_ = nullptr;
|
||||
|
||||
// The modal colours.
|
||||
uint16_t border_colour_ = 0;
|
||||
uint16_t text_colour_ = 0xfff;
|
||||
uint16_t background_colour_ = 0;
|
||||
|
||||
void output_row(int row, int start, int end);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user