mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[Core/VDP] fixed V28/V30 mode switching during active display (verified on real hardware)
This commit is contained in:
parent
50d3603c17
commit
1b0db486e7
@ -404,11 +404,23 @@ void system_frame_gen(int do_skip)
|
|||||||
/* active screen height */
|
/* active screen height */
|
||||||
if (reg[1] & 0x04)
|
if (reg[1] & 0x04)
|
||||||
{
|
{
|
||||||
bitmap.viewport.h = 224 + ((reg[1] & 0x08) << 1);
|
/* Mode 5 */
|
||||||
bitmap.viewport.y = (config.overscan & 1) * ((240 + 48*vdp_pal - bitmap.viewport.h) >> 1);
|
if (reg[1] & 0x08)
|
||||||
|
{
|
||||||
|
/* 240 active lines */
|
||||||
|
bitmap.viewport.h = 240;
|
||||||
|
bitmap.viewport.y = (config.overscan & 1) * 24 * vdp_pal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* 224 active lines */
|
||||||
|
bitmap.viewport.h = 224;
|
||||||
|
bitmap.viewport.y = (config.overscan & 1) * (8 + (24 * vdp_pal));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Mode 4 (192 active lines) */
|
||||||
bitmap.viewport.h = 192;
|
bitmap.viewport.h = 192;
|
||||||
bitmap.viewport.y = (config.overscan & 1) * 24 * (vdp_pal + 1);
|
bitmap.viewport.y = (config.overscan & 1) * 24 * (vdp_pal + 1);
|
||||||
}
|
}
|
||||||
|
@ -1658,18 +1658,9 @@ static void vdp_reg_w(unsigned int r, unsigned int d, unsigned int cycles)
|
|||||||
{
|
{
|
||||||
/* Mode 5 only */
|
/* Mode 5 only */
|
||||||
if (d & 0x04)
|
if (d & 0x04)
|
||||||
{
|
|
||||||
if (status & 8)
|
|
||||||
{
|
{
|
||||||
/* Changes should be applied on next frame */
|
/* Changes should be applied on next frame */
|
||||||
bitmap.viewport.changed |= 2;
|
bitmap.viewport.changed |= 2;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Update active display height */
|
|
||||||
bitmap.viewport.h = 224 + ((d & 8) << 1);
|
|
||||||
bitmap.viewport.y = (config.overscan & 1) * (8 - (d & 8) + 24*vdp_pal);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update vertical counter max value */
|
/* Update vertical counter max value */
|
||||||
vc_max = vc_table[(d >> 2) & 3][vdp_pal];
|
vc_max = vc_table[(d >> 2) & 3][vdp_pal];
|
||||||
|
Loading…
Reference in New Issue
Block a user