1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-02 02:49:28 +00:00

Reintroduced emergency vertical sync — so that output occurs even when the emulation isn't catching syncs properly — and switched some spaces to tabs.

This commit is contained in:
Thomas Harte 2015-07-30 17:16:49 -04:00
parent 14adcd2096
commit 98efae2536
4 changed files with 19 additions and 22 deletions

View File

@ -22,6 +22,7 @@ CRT::CRT(int cycles_per_line, int height_of_display, int number_of_buffers, ...)
const int scanlinesVerticalRetraceTime = 10; // source: ibid const int scanlinesVerticalRetraceTime = 10; // source: ibid
_time_multiplier = (1000 + cycles_per_line - 1) / cycles_per_line; _time_multiplier = (1000 + cycles_per_line - 1) / cycles_per_line;
height_of_display += (height_of_display / 20); // this is the overrun area we'll use to
// store fundamental display configuration properties // store fundamental display configuration properties
_height_of_display = height_of_display;// + (height_of_display / 10); _height_of_display = height_of_display;// + (height_of_display / 10);
@ -105,14 +106,10 @@ CRT::SyncEvent CRT::next_vertical_sync_event(bool vsync_is_charging, int cycles_
int proposedSyncTime = cycles_to_run_for; int proposedSyncTime = cycles_to_run_for;
// have we overrun the maximum permitted number of horizontal syncs for this frame? // have we overrun the maximum permitted number of horizontal syncs for this frame?
// if (!_vretrace_counter) if (!_vretrace_counter && _rasterPosition.y == 0xffffffff) {
// { proposedSyncTime = 0;
// float raster_distance = _scanSpeed.y * proposedSyncTime; proposedEvent = SyncEvent::StartVSync;
// if(_rasterPosition.y < 1.02f && _rasterPosition.y + raster_distance >= 1.02f) { }
// proposedSyncTime = (int)(1.02f - _rasterPosition.y) / _scanSpeed.y;
// proposedEvent = SyncEvent::StartVSync;
// }
// }
// will an acceptable vertical sync be triggered? // will an acceptable vertical sync be triggered?
if (vsync_is_charging && !_vretrace_counter) { if (vsync_is_charging && !_vretrace_counter) {