# HG changeset patch # User Michael Pavone # Date 1431670675 25200 # Node ID 61faa298af0747be2f45a0a1d8fb7ce000b20247 # Parent 8aa9aacefe1295b0938d084f24eb1119458493bd Small horizontal interrupt fixes diff -r 8aa9aacefe12 -r 61faa298af07 gst.c --- a/gst.c Thu May 14 00:04:22 2015 -0700 +++ b/gst.c Thu May 14 23:17:55 2015 -0700 @@ -423,7 +423,7 @@ fprintf(stderr, "Could not read ident code from %s\n", fname); goto error_close; } - if (memcmp(ident, "GST\x40\xE0", 5) != 0) { + if (memcmp(ident, "GST\x40\xE0", 3) != 0) { fprintf(stderr, "%s doesn't appear to be a GST savestate. The ident code is %c%c%c\\x%X\\x%X instead of GST\\x40\\xE0.\n", fname, ident[0], ident[1], ident[2], ident[3], ident[4]); goto error_close; } diff -r 8aa9aacefe12 -r 61faa298af07 vdp.c --- a/vdp.c Thu May 14 00:04:22 2015 -0700 +++ b/vdp.c Thu May 14 23:17:55 2015 -0700 @@ -1476,7 +1476,7 @@ } } if (is_h40 && slot == LINE_CHANGE_H40 || !is_h40 && slot == LINE_CHANGE_H32) { - if (line >= inactive_start) { + if (line > inactive_start) { context->hint_counter = context->regs[REG_HINT]; } else if (context->hint_counter) { context->hint_counter--; @@ -1954,7 +1954,7 @@ } uint32_t inactive_start = context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START; uint32_t hint_line; - if (context->vcounter >= inactive_start) { + if (context->vcounter + context->hint_counter >= inactive_start) { hint_line = context->regs[REG_HINT]; } else { hint_line = context->vcounter + context->hint_counter + 1;