mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[Core/VDP] allow active screen width to be modified during first two lines (Bugs Bunny in Double Trouble)
This commit is contained in:
parent
527fd6ecd8
commit
94103569ff
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.2 MiB After Width: | Height: | Size: 3.2 MiB |
Binary file not shown.
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
@ -1997,26 +1997,30 @@ static void vdp_reg_w(unsigned int r, unsigned int d, unsigned int cycles)
|
|||||||
fifo_timing = (int *)fifo_timing_h32;
|
fifo_timing = (int *)fifo_timing_h32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update active screen width */
|
/* Active screen width modified during VBLANK will be applied on upcoming frame */
|
||||||
if (v_counter >= bitmap.viewport.h)
|
if (v_counter >= bitmap.viewport.h)
|
||||||
{
|
{
|
||||||
/* Active screen width modified during VBLANK will be applied on upcoming frame */
|
|
||||||
bitmap.viewport.w = max_sprite_pixels;
|
bitmap.viewport.w = max_sprite_pixels;
|
||||||
}
|
}
|
||||||
else if ((v_counter == 0) && (cycles <= (mcycles_vdp + 860)))
|
|
||||||
|
/* Allow active screen width to be modified during first two lines (Bugs Bunny in Double Trouble) */
|
||||||
|
else if (v_counter <= 1)
|
||||||
{
|
{
|
||||||
/* Active screen width modified during first line HBLANK (Bugs Bunny in Double Trouble) */
|
|
||||||
bitmap.viewport.w = max_sprite_pixels;
|
bitmap.viewport.w = max_sprite_pixels;
|
||||||
|
|
||||||
/* Redraw first line */
|
/* Redraw lines */
|
||||||
render_line(0);
|
render_line(0);
|
||||||
|
if (v_counter)
|
||||||
|
{
|
||||||
|
render_line(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Screen width changes during active display (Golden Axe 3 intro, Ultraverse Prime) */
|
/* Screen width changes during active display (Golden Axe 3 intro, Ultraverse Prime) */
|
||||||
/* should be applied on next frame since backend rendered framebuffer width is fixed */
|
/* should be applied on next frame since backend rendered framebuffer width is fixed */
|
||||||
/* and can not be modified mid-frame. This is not 100% accurate but games generally */
|
/* and can not be modified mid-frame. This is not 100% accurate but games generally */
|
||||||
/* do this where the screen is blanked so it is likely unnoticeable. */
|
/* do this when the screen is blanked so it is likely unnoticeable. */
|
||||||
bitmap.viewport.changed |= 2;
|
bitmap.viewport.changed |= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user