Mercurial > repos > blastem
comparison vdp.c @ 1437:da72344af3ff
Fix external v counter when normal resolution interlace mode is active
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 21 Aug 2017 23:49:56 -0700 |
parents | 40c3be9f1af7 |
children | a664bade4b29 |
comparison
equal
deleted
inserted
replaced
1436:40c3be9f1af7 | 1437:da72344af3ff |
---|---|
2955 } | 2955 } |
2956 } | 2956 } |
2957 | 2957 |
2958 static uint16_t get_ext_vcounter(vdp_context *context) | 2958 static uint16_t get_ext_vcounter(vdp_context *context) |
2959 { | 2959 { |
2960 uint16_t line= context->vcounter & 0xFF; | 2960 uint16_t line= context->vcounter; |
2961 if (context->double_res) { | 2961 if (context->regs[REG_MODE_4] & BIT_INTERLACE) { |
2962 line <<= 1; | 2962 if (context->double_res) { |
2963 line <<= 1; | |
2964 } else { | |
2965 line &= 0x1FE; | |
2966 } | |
2963 if (line & 0x100) { | 2967 if (line & 0x100) { |
2964 line |= 1; | 2968 line |= 1; |
2965 } | 2969 } |
2966 } | 2970 } |
2967 return line << 8; | 2971 return line << 8; |