1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-17 13:29:02 +00:00

Merge pull request #413 from TomHarte/VicPAL

Adjusts PAL Vic timing.
This commit is contained in:
Thomas Harte 2018-04-12 21:38:18 -04:00 committed by GitHub
commit a32a7d1374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,8 +138,8 @@ template <class BusHandler> class MOS6560 {
chrominances = pal_chrominances; chrominances = pal_chrominances;
display_type = Outputs::CRT::DisplayType::PAL50; display_type = Outputs::CRT::DisplayType::PAL50;
timing_.cycles_per_line = 71; timing_.cycles_per_line = 71;
timing_.line_counter_increment_offset = 0; timing_.line_counter_increment_offset = 4;
timing_.final_line_increment_position = 71; timing_.final_line_increment_position = timing_.cycles_per_line - timing_.line_counter_increment_offset;
timing_.lines_per_progressive_field = 312; timing_.lines_per_progressive_field = 312;
timing_.supports_interlacing = false; timing_.supports_interlacing = false;
break; break;
@ -159,7 +159,7 @@ template <class BusHandler> class MOS6560 {
switch(output_mode) { switch(output_mode) {
case OutputMode::PAL: case OutputMode::PAL:
crt_->set_visible_area(Outputs::CRT::Rect(0.1f, 0.05f, 0.9f, 0.9f)); crt_->set_visible_area(Outputs::CRT::Rect(0.1f, 0.07f, 0.9f, 0.9f));
break; break;
case OutputMode::NTSC: case OutputMode::NTSC:
crt_->set_visible_area(Outputs::CRT::Rect(0.05f, 0.05f, 0.9f, 0.9f)); crt_->set_visible_area(Outputs::CRT::Rect(0.05f, 0.05f, 0.9f, 0.9f));
@ -300,6 +300,9 @@ template <class BusHandler> class MOS6560 {
cycles_in_state_++; cycles_in_state_++;
if(this_state_ == State::Pixels) { if(this_state_ == State::Pixels) {
// TODO: palette changes can happen within half-characters; the below needs to be divided.
// Also: a perfect opportunity to rearrange this inner loop for no longer needing to be
// two parts with a cooperative owner?
if(column_counter_&1) { if(column_counter_&1) {
character_value_ = pixel_data; character_value_ = pixel_data;
@ -340,7 +343,10 @@ template <class BusHandler> class MOS6560 {
character_code_ = pixel_data; character_code_ = pixel_data;
character_colour_ = colour_data; character_colour_ = colour_data;
} }
}
// Keep counting columns even if sync or the colour burst have interceded.
if(column_counter_ >= 0 && column_counter_ < columns_this_line_*2) {
column_counter_++; column_counter_++;
} }
} }