mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Can't seem to find any documentation: assumed horizontal sync is generated during vertical.
This commit is contained in:
parent
c1a12ad4df
commit
5f1d76e855
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user