1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-03 11:30:02 +00:00

Fixed scanline sizing and fill issues, as well as shortening vsync to the correct Atari length.

This commit is contained in:
Thomas Harte 2015-08-05 20:55:27 -04:00
parent 265d1d5b24
commit 5644b3a1cc
3 changed files with 4 additions and 4 deletions

View File

@ -136,7 +136,7 @@ void Machine::get_output_pixel(uint8_t *pixel, int offset)
void Machine::output_pixels(int count)
{
const int32_t start_of_sync = 214;
const int32_t end_of_sync = 188;
const int32_t end_of_sync = 198;
_timestamp += count;
while(count--)

View File

@ -164,7 +164,7 @@ const char *vertexShader =
"void main (void)\n"
"{\n"
"srcCoordinatesVarying = vec2(srcCoordinates.x / 512.0, (srcCoordinates.y + 0.5) / 512.0);\n"
"lateralVarying = lateral * 2.09435310266667 + 0.52359877566668;"
"lateralVarying = lateral + 1.0707963267949;\n"
"gl_Position = vec4(position.x * 2.0 - 1.0, 1.0 - position.y * 2.0 + position.x / 131.0, 0.0, 1.0);\n"
"}\n";
@ -180,7 +180,7 @@ const char *fragmentShader =
"\n"
"void main(void)\n"
"{\n"
"fragColour = texture(texID, srcCoordinatesVarying) * vec4(1.0, 1.0, 1.0, sin(lateralVarying));\n"
"fragColour = texture(texID, srcCoordinatesVarying) * vec4(1.0, 1.0, 1.0, sin(lateralVarying));\n" //
"}\n";
#if defined(DEBUG)

View File

@ -37,7 +37,7 @@ void CRT::set_new_timing(int cycles_per_line, int height_of_display)
_sync_capacitor_charge_threshold = ((syncCapacityLineChargeThreshold * _cycles_per_line) * 50) >> 7;
_horizontal_retrace_time = (millisecondsHorizontalRetraceTime * _cycles_per_line) >> 6;
const int vertical_retrace_time = scanlinesVerticalRetraceTime * _cycles_per_line;
const float halfLineWidth = (float)_height_of_display * 1.0f;
const float halfLineWidth = (float)_height_of_display * 1.85f;
for(int c = 0; c < 4; c++)
{