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

Added NTSC-VIC's switching of phase every field.

This commit is contained in:
Thomas Harte 2016-06-12 17:45:25 -04:00
parent 6b5a322918
commit 4c2b964cd4
2 changed files with 4 additions and 1 deletions

View File

@ -133,6 +133,7 @@ uint16_t MOS6560::get_address()
if(_vertical_counter == 261)
{
_frame_colour_burst_phase ^= 128;
_vertical_counter = 0;
_row_counter = -1;
}
@ -181,7 +182,7 @@ uint16_t MOS6560::get_address()
switch(_output_state)
{
case State::Sync: _crt->output_sync(_cycles_in_state * 4); break;
case State::ColourBurst: _crt->output_colour_burst(_cycles_in_state * 4, 0, 0); break;
case State::ColourBurst: _crt->output_colour_burst(_cycles_in_state * 4, _frame_colour_burst_phase, 0); break;
case State::Border: output_border(_cycles_in_state * 4); break;
case State::Pixels: _crt->output_data(_cycles_in_state * 4, 1); break;
}

View File

@ -51,6 +51,8 @@ class MOS6560 {
uint8_t _registers[16];
uint8_t _colours[16];
uint8_t _frame_colour_burst_phase;
void output_border(unsigned int number_of_cycles);
};