static int lof_changed_previous_field;
static int vposw_change;
static bool lof_lace;
+static bool prevlofs[3];
static bool bplcon0_interlace_seen;
static int scandoubled_line;
static bool vsync_rendered, frame_rendered, frame_shown;
if (currprefs.gfx_overscanmode == OVERSCANMODE_ULTRA) {
thisline_decision.vb = VB_NOVB;
}
- if (nosignal_status > 0 || nosignal_status) {
+ if (nosignal_status == 1) {
thisline_decision.vb = VB_XBLANK;
MARK_LINE_CHANGED;
} else if (nosignal_status < 0) {
lol = 0;
}
if (lof_changing) {
+ bool newlof = (v & 0x8000) != 0;
return;
}
vpos &= 0x00ff;
idle = 100 * 10;
gui_data.fps = fps;
gui_data.idle = (int)idle;
- gui_data.fps_color = nosignal_status ? 2 : (frameok ? 0 : 1);
+ gui_data.fps_color = nosignal_status == 1 ? 2 : (nosignal_status == 2 ? 3 : (frameok ? 0 : 1));
if ((timeframes & 15) == 0) {
- gui_fps (fps, (int)idle, gui_data.fps_color);
+ gui_fps(fps, (int)idle, gui_data.fps_color);
}
}
}
}
}
if (lof_changing) {
+
+ if (lof_store != (prevlofs[0] ? 1 : 0) && prevlofs[0] == prevlofs[1] && prevlofs[1] == prevlofs[2]) {
+ // resync if LOF was not toggling previously
+ nosignal_trigger = true;
+ }
+
// still same? Trigger change now.
if ((!lof_store && lof_changing < 0) || (lof_store && lof_changing > 0)) {
lof_changed_previous_field++;
lof_lace = false;
}
+ prevlofs[2] = prevlofs[1];
+ prevlofs[1] = prevlofs[0];
+ prevlofs[0] = lof_store;
+
#ifdef DEBUGGER
if (debug_copper) {
record_copper_reset();
if (nosignal_cnt <= 0) {
nosignal_cnt = 1;
}
+ } else {
+ nosignal_status = 2;
+ nosignal_cnt = (int)(vblank_hz / 2);
}
}
if (on > 1)
writing = 1;
} else if (led == LED_FPS) {
- double fps = (double)gui_data.fps / 10.0;
+ float fps = gui_data.fps / 10.0f;
extern float p96vblank;
pos = 2;
ptr = drive_text + pos * LED_STRING_WIDTH;
fps = 9999.9;
if (gui_data.fps_color == 2) {
_tcscpy(ptr, _T("No Sync"));
+ } else if (gui_data.fps_color == 3) {
+ _tcscpy(ptr, _T("FPS: ----"));
} else if (fps < 1000) {
if (ad->picasso_on)
_stprintf (ptr, _T("%.1f [%.1f]"), p96vblank, fps);
on_rgb = 0x000000;
off_rgb = gui_data.fps_color == 1 ? 0xcccc00 : (gui_data.fps_color == 2 ? 0x0000cc : 0x000000);
am = 3;
- if (fps > 999) {
- fps += 50;
- fps /= 10;
- if (fps > 999)
- fps = 999;
- num1 = fps / 100;
- num1 %= 10;
- num2 = 18;
- num3 = (fps - num1 * 100) / 10;
+ if (gui_data.fps_color >= 2) {
+ num1 = -1;
+ num2 = 15;
+ num3 = 15;
+ am = 2;
} else {
- num1 = fps / 100;
- num2 = (fps - num1 * 100) / 10;
- num3 = fps % 10;
- num1 %= 10;
- num2 %= 10;
- if (num1 == 0)
- am = 2;
+ if (fps > 999) {
+ fps += 50;
+ fps /= 10;
+ if (fps > 999)
+ fps = 999;
+ num1 = fps / 100;
+ num1 %= 10;
+ num2 = 18;
+ num3 = (fps - num1 * 100) / 10;
+ } else {
+ num1 = fps / 100;
+ num2 = (fps - num1 * 100) / 10;
+ num3 = fps % 10;
+ num1 %= 10;
+ num2 %= 10;
+ if (num1 == 0)
+ am = 2;
+ }
}
}
} else if (led == LED_CPU) {