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

Fixed NTSC colour cycle count, and hence the 2600's reported line lengths and phase offset.

This commit is contained in:
Thomas Harte 2017-03-04 17:31:39 -05:00
parent cccdc558e7
commit 4751615623
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ TIA::TIA(bool create_crt) :
{
if(create_crt)
{
crt_.reset(new Outputs::CRT::CRT(cycles_per_line * 2 + 1, 1, Outputs::CRT::DisplayType::NTSC60, 1));
crt_.reset(new Outputs::CRT::CRT(cycles_per_line * 2 - 1, 1, Outputs::CRT::DisplayType::NTSC60, 1));
crt_->set_output_device(Outputs::CRT::Television);
set_output_mode(OutputMode::NTSC);
}
@ -150,7 +150,7 @@ void TIA::set_output_mode(Atari2600::TIA::OutputMode output_mode)
"uint y = c & 14u;"
"uint iPhase = (c >> 4);"
"float phaseOffset = 6.283185308 * float(iPhase) / 13.0 + 5.074880441076923;"
"float phaseOffset = 6.283185308 * (float(iPhase) + 3.0) / 13.0 + 5.074880441076923;"
"return mix(float(y) / 14.0, step(1, iPhase) * cos(phase + phaseOffset), amplitude);"
"}");
display_type = Outputs::CRT::DisplayType::NTSC60;

View File

@ -59,7 +59,7 @@ void CRT::set_new_display_type(unsigned int cycles_per_line, DisplayType display
break;
case DisplayType::NTSC60:
set_new_timing(cycles_per_line, 262, ColourSpace::YIQ, 545, 2, false);
set_new_timing(cycles_per_line, 262, ColourSpace::YIQ, 455, 2, false); // i.e. 227.5
break;
}
}