Mercurial > repos > blastem
comparison vdp.c @ 921:2be771c4dfbd
After reviewing the results of my test ROM again it seems pretty clear that the VBlank flag gets set at the same time as the vcounter changes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 26 Jan 2016 19:23:10 -0800 |
parents | e64168bb2b25 |
children | 913a6336ce20 |
comparison
equal
deleted
inserted
replaced
920:e64168bb2b25 | 921:2be771c4dfbd |
---|---|
1690 value |= 0x10; | 1690 value |= 0x10; |
1691 } | 1691 } |
1692 uint32_t line= context->vcounter; | 1692 uint32_t line= context->vcounter; |
1693 uint32_t slot = context->hslot; | 1693 uint32_t slot = context->hslot; |
1694 uint32_t inactive_start = (context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START); | 1694 uint32_t inactive_start = (context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START); |
1695 if ( | 1695 if ((line >= inactive_start && line < 0x1FF) || !(context->regs[REG_MODE_2] & BIT_DISP_EN)) { |
1696 ( | |
1697 line > inactive_start | |
1698 && line < 0x1FF | |
1699 ) | |
1700 || (line == inactive_start | |
1701 && ( | |
1702 slot >= (context->regs[REG_MODE_4] & BIT_H40 ? VBLANK_START_H40 : VBLANK_START_H32) | |
1703 || slot < (context->regs[REG_MODE_4] & BIT_H40 ? LINE_CHANGE_H40 : LINE_CHANGE_H32) | |
1704 ) | |
1705 ) | |
1706 || (line == 0x1FF | |
1707 && slot < (context->regs[REG_MODE_4] & BIT_H40 ? VBLANK_START_H40 : VBLANK_START_H32)) | |
1708 && slot >= (context->regs[REG_MODE_4] & BIT_H40 ? LINE_CHANGE_H40 : LINE_CHANGE_H32) | |
1709 || !(context->regs[REG_MODE_2] & BIT_DISP_EN) | |
1710 ) { | |
1711 value |= 0x8; | 1696 value |= 0x8; |
1712 } | 1697 } |
1713 if (context->regs[REG_MODE_4] & BIT_H40) { | 1698 if (context->regs[REG_MODE_4] & BIT_H40) { |
1714 if (slot < HBLANK_END_H40 || slot > HBLANK_START_H40) { | 1699 if (slot < HBLANK_END_H40 || slot > HBLANK_START_H40) { |
1715 value |= 0x4; | 1700 value |= 0x4; |