From 24dd2bf9dc9aa28df5daa05994218a8224969401 Mon Sep 17 00:00:00 2001 From: Kjetil Hvalstrand Date: Fri, 30 Dec 2022 17:08:51 +0100 Subject: [PATCH] Try to enable more modes. --- src/gfx-amigaos/ami-win.c | 27 +++++++++++++++++---------- src/picasso96.c | 6 +++++- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/gfx-amigaos/ami-win.c b/src/gfx-amigaos/ami-win.c index 1cce079..8b5eb4f 100644 --- a/src/gfx-amigaos/ami-win.c +++ b/src/gfx-amigaos/ami-win.c @@ -2757,16 +2757,23 @@ int DX_FillResolutions (uae_u16 *ppixel_format) DEBUG_LOG ("Function: DX_FillResolutions\n"); - if (bit_unit == 16) - picasso_vidinfo.rgbformat = RGBFB_R5G6B5; - else - picasso_vidinfo.rgbformat = RGBFB_A8R8G8B8; +// if (bit_unit == 16) +// picasso_vidinfo.rgbformat = RGBFB_R5G6B5; +// else +// picasso_vidinfo.rgbformat = RGBFB_A8R8G8B8; +// *ppixel_format = 1 << picasso_vidinfo.rgbformat; - *ppixel_format = 1 << picasso_vidinfo.rgbformat; - if (bit_unit == 16 || bit_unit == 32) - { - *ppixel_format |= RGBFF_CHUNKY; - } + + *ppixel_format =0; + + *ppixel_format |= 1 << RGBFB_R5G5B5; + *ppixel_format |= 1 << RGBFB_R5G5B5PC; + *ppixel_format |= 1 << RGBFB_R5G6B5; + *ppixel_format |= 1 << RGBFB_R5G6B5PC; + *ppixel_format |= 1 << RGBFB_A8R8G8B8; + *ppixel_format |= RGBFF_CHUNKY; + + ppixel_format = ~0; /* Check list of standard P96 screenmodes */ @@ -2803,7 +2810,7 @@ uae_u8 *gfx_lock_picasso (void) break; case PIXF_A8R8G8B8: - picasso_vidinfo.rgbformat = 9; // RGBFB_A8R8G8B8; + picasso_vidinfo.rgbformat = 6; // RGBFB_A8R8G8B8; break; } } diff --git a/src/picasso96.c b/src/picasso96.c index 15beb33..9677ca4 100644 --- a/src/picasso96.c +++ b/src/picasso96.c @@ -3062,17 +3062,21 @@ void InitPicasso96 (void) qsort (DisplayModes, mode_count, sizeof (struct PicassoResolution), resolution_compare); +#if 0 /* Work-around for possible P96 bug. A8R8G8B8 modes have * palette emulation issues. Tell the world we have a * a BGRA mode instead (and we'll byte-swap all pixels output). */ - if (picasso_vidinfo.rgbformat == RGBFB_A8R8G8B8) { + + if (picasso_vidinfo.rgbformat == RGBFB_A8R8G8B8) + { picasso_vidinfo.rgbformat = RGBFB_B8G8R8A8; picasso96_pixel_format &= RGBFF_CHUNKY; picasso96_pixel_format |= 1 << picasso_vidinfo.rgbformat; need_argb32_hack = 1; write_log ("Enabling argb32 byte-swapping for P96.\n"); } +#endif for (i = 0; i < mode_count; i++) { sprintf (DisplayModes[i].name, "%dx%d, %d-bit, %d Hz",