summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-05-14 00:46:34 -0700
committerMike Pavone <pavone@retrodev.com>2013-05-14 00:46:34 -0700
commit9fa33049138aaee23501e87a088bc08109e2a58c (patch)
tree6a7a9903be828be6fbfb92228ef9f6468395f857
parenta5ee22f1f54069c92c7e255f3a7c21244c88aabc (diff)
Only latch video mode at the very beginning of the frame to avoid problems with the cycle count getting out of sync with what I expect
-rw-r--r--vdp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vdp.c b/vdp.c
index 1ef315f..a0bfdb3 100644
--- a/vdp.c
+++ b/vdp.c
@@ -1111,7 +1111,7 @@ void vdp_run_context(vdp_context * context, uint32_t target_cycles)
{
uint32_t line = context->cycles / MCLKS_LINE;
uint32_t active_lines = context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE;
- if (!line) {
+ if (!context->cycles) {
latch_mode(context);
}
uint32_t linecyc = context->cycles % MCLKS_LINE;