From 34fa9880ac5c526475c74f157b2cd1ee630be2a0 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 7 Sep 2014 11:30:31 +0300 Subject: [PATCH] Do not switch Picasso IV to RTG mode immediately at reset, wait until PIV ROM code enables flifi to prevent useless mode switching. --- gfxboard.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gfxboard.cpp b/gfxboard.cpp index 61e52ad4..1ff91cdc 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -185,6 +185,7 @@ static int vram_start_offset; static uae_u32 gfxboardmem_start; static bool monswitch; static bool oldswitch; +static bool monswitch_reset; static int fullrefresh; static bool modechanged; static uae_u8 *gfxboard_surface, *vram_address, *fakesurface_surface; @@ -564,7 +565,13 @@ static void reset_pci (void) static void picassoiv_checkswitch (void) { if (ISP4()) { - monswitch = (picassoiv_flifi & 1) == 0 || (vga.vga.cr[0x51] & 8) == 0; + bool rtg_active = (picassoiv_flifi & 1) == 0 || (vga.vga.cr[0x51] & 8) == 0; + // do not switch to P4 RTG until monitor switch is set to native at least + // once after reset. + if (monswitch_reset && rtg_active) + return; + monswitch_reset = false; + monswitch = rtg_active; } } @@ -1528,6 +1535,7 @@ void gfxboard_reset (void) configured_regs = 0; monswitch = false; oldswitch = false; + monswitch_reset = true; modechanged = false; gfxboard_vblank = false; gfxboard_intena = false; -- 2.47.3