mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-04 01:45:08 +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 */
|
||||
if (reg[1] & 0x04)
|
||||
{
|
||||
bitmap.viewport.h = 224 + ((reg[1] & 0x08) << 1);
|
||||
bitmap.viewport.y = (config.overscan & 1) * ((240 + 48*vdp_pal - bitmap.viewport.h) >> 1);
|
||||
/* Mode 5 */
|
||||
if (reg[1] & 0x08)
|
||||
{
|
||||
/* 240 active lines */
|
||||
bitmap.viewport.h = 240;
|
||||
bitmap.viewport.y = (config.overscan & 1) * 24 * vdp_pal;
|
||||
}
|
||||
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.y = (config.overscan & 1) * 24 * (vdp_pal + 1);
|
||||
}
|
||||
|
@ -1659,17 +1659,8 @@ static void vdp_reg_w(unsigned int r, unsigned int d, unsigned int cycles)
|
||||
/* Mode 5 only */
|
||||
if (d & 0x04)
|
||||
{
|
||||
if (status & 8)
|
||||
{
|
||||
/* Changes should be applied on next frame */
|
||||
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);
|
||||
}
|
||||
/* Changes should be applied on next frame */
|
||||
bitmap.viewport.changed |= 2;
|
||||
|
||||
/* Update vertical counter max value */
|
||||
vc_max = vc_table[(d >> 2) & 3][vdp_pal];
|
||||
|
Loading…
Reference in New Issue
Block a user