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

Can't seem to find any documentation: assumed horizontal sync is generated during vertical.

This commit is contained in:
Thomas Harte 2015-07-31 18:49:02 -04:00
parent c1a12ad4df
commit 5f1d76e855
2 changed files with 3 additions and 4 deletions

View File

@ -36,7 +36,6 @@ void Machine::switch_region()
_crt->set_new_timing(228, 312);
}
void Machine::get_output_pixel(uint8_t *pixel, int offset)
{
const uint8_t palette[16][3] =
@ -144,7 +143,7 @@ void Machine::output_pixels(int count)
// logic: if in vsync, output that; otherwise if in vblank then output that;
// otherwise output a pixel
if(_vSyncEnabled) {
state = OutputState::Sync;
state = (_horizontalTimer < 212) ? OutputState::Sync : OutputState::Blank;
} else {
// blank is decoded as 68 counts; sync and colour burst as 16 counts

View File

@ -20,7 +20,7 @@ static const uint32_t kCRTFixedPointOffset = 0x08000000;
void CRT::set_new_timing(int cycles_per_line, int height_of_display)
{
const int syncCapacityLineChargeThreshold = 5;
const int syncCapacityLineChargeThreshold = 3;
const int millisecondsHorizontalRetraceTime = 7; // source: Dictionary of Video and Television Technology, p. 234
const int scanlinesVerticalRetraceTime = 10; // source: ibid
@ -58,7 +58,7 @@ void CRT::set_new_timing(int cycles_per_line, int height_of_display)
// width should be 1.0 / _height_of_display, rotated to match the direction
float angle = atan2f(scanSpeedYfl, scanSpeedXfl);
float halfLineWidth = (float)_height_of_display * 1.6f;
float halfLineWidth = (float)_height_of_display * 1.2f;
_widths[0][0] = (sinf(angle) / halfLineWidth) * kCRTFixedPointRange;
_widths[0][1] = (cosf(angle) / halfLineWidth) * kCRTFixedPointRange;
}