diff --git a/src/mame/video/konamigx.c b/src/mame/video/konamigx.c index dbf6298a88d..0d31918e26a 100644 --- a/src/mame/video/konamigx.c +++ b/src/mame/video/konamigx.c @@ -443,11 +443,11 @@ WRITE32_HANDLER( konamigx_palette2_w ) WRITE32_HANDLER( konamigx_555_palette_w ) { COMBINE_DATA(&paletteram32[offset]); - paletteram16 = (UINT16 *)paletteram32; - if (ACCESSING_BITS_16_31) + + if ((ACCESSING_BITS_16_23) && (ACCESSING_BITS_24_31)) paletteram16_xRRRRRGGGGGBBBBB_word_w(machine, offset*2, data >> 16, mem_mask >> 16); - if (ACCESSING_BITS_0_15) + if ((ACCESSING_BITS_0_7) && (ACCESSING_BITS_8_15)) paletteram16_xRRRRRGGGGGBBBBB_word_w(machine, offset*2+1, data, mem_mask); } @@ -455,15 +455,13 @@ WRITE32_HANDLER( konamigx_555_palette_w ) WRITE32_HANDLER( konamigx_555_palette2_w ) { COMBINE_DATA(&gx_subpaletteram32[offset]); - offset += (0x4000/4); - COMBINE_DATA(&paletteram32[offset]); - paletteram16 = (UINT16 *)paletteram32; - if (ACCESSING_BITS_16_31) + + if ((ACCESSING_BITS_16_23) && (ACCESSING_BITS_24_31)) paletteram16_xRRRRRGGGGGBBBBB_word_w(machine, offset*2, data >> 16, mem_mask >> 16); - if (ACCESSING_BITS_0_15) + if ((ACCESSING_BITS_0_7) && (ACCESSING_BITS_8_15)) paletteram16_xRRRRRGGGGGBBBBB_word_w(machine, offset*2+1, data, mem_mask); }