# HG changeset patch # User Michael Pavone # Date 1490466703 25200 # Node ID da1ffc4026c4883388b1e8f9a9a357607c758f13 # Parent d5a47597b61f25d6e506b2a7a6039a3d10cac87e Fix latching of V32 mode bit diff -r d5a47597b61f -r da1ffc4026c4 Makefile --- a/Makefile Sat Mar 25 00:21:32 2017 -0700 +++ b/Makefile Sat Mar 25 11:31:43 2017 -0700 @@ -82,8 +82,7 @@ endif ifdef PROFILE -CFLAGS+= -pg -LDFLAGS+= -pg +LDFLAGS+= -Wl,--no-as-needed -lprofiler -Wl,--as-needed endif ifdef NOGL CFLAGS+= -DDISABLE_OPENGL diff -r d5a47597b61f -r da1ffc4026c4 vdp.c --- a/vdp.c Sat Mar 25 00:21:32 2017 -0700 +++ b/vdp.c Sat Mar 25 11:31:43 2017 -0700 @@ -1479,6 +1479,9 @@ } else if (!(context->latched_mode & BIT_PAL) && context->vcounter == 0xEB) { context->vcounter = 0x1E5; } + if (context->vcounter == 0x200 - context->border_top) { + latch_mode(context); + } } else if (context->vcounter == 0xDB) { context->vcounter = 0x1D5; }