Previous 199869 Revisions Next

r28754 Thursday 20th March, 2014 at 14:08:00 UTC by hap
fix crash
[src/mame/video]popeye.c

trunk/src/mame/video/popeye.c
r28753r28754
6060{
6161   1,      /*  one prom 5 lines */
6262   0,      /*  start at 0 */
63   31,      /*  end at 31  */
63   15,      /*  end at 15 (banked) */
6464   /*  R,   G,   B,  */
6565   {   0,   0,   0 },      /*  offsets */
6666   {   0,   3,   6 },      /*  shifts */
r28753r28754
224224   for (i=0; i<16; i++)
225225      cpi[i] = color_prom[i] ^ m_invertmask;
226226
227   compute_res_net_all(rgb, cpi, popeye_7051_decode_info, popeye_7051_bck_net_info);
227   compute_res_net_all(rgb, &cpi[0], popeye_7051_decode_info, popeye_7051_bck_net_info);
228228   m_palette->set_pen_colors(0, rgb, 16);
229229
230230#else
r28753r28754
234234      int r,g,b;
235235
236236      /* red component */
237      bit0 = ((*color_prom ^ m_invertmask) >> 0) & 0x01;
238      bit1 = ((*color_prom ^ m_invertmask) >> 1) & 0x01;
239      bit2 = ((*color_prom ^ m_invertmask) >> 2) & 0x01;
237      bit0 = ((color_prom[0] ^ m_invertmask) >> 0) & 0x01;
238      bit1 = ((color_prom[0] ^ m_invertmask) >> 1) & 0x01;
239      bit2 = ((color_prom[0] ^ m_invertmask) >> 2) & 0x01;
240240      r = 0x1c * bit0 + 0x31 * bit1 + 0x47 * bit2;
241241      /* green component */
242      bit0 = ((*color_prom ^ m_invertmask) >> 3) & 0x01;
243      bit1 = ((*color_prom ^ m_invertmask) >> 4) & 0x01;
244      bit2 = ((*color_prom ^ m_invertmask) >> 5) & 0x01;
242      bit0 = ((color_prom[0] ^ m_invertmask) >> 3) & 0x01;
243      bit1 = ((color_prom[0] ^ m_invertmask) >> 4) & 0x01;
244      bit2 = ((color_prom[0] ^ m_invertmask) >> 5) & 0x01;
245245      g = 0x1c * bit0 + 0x31 * bit1 + 0x47 * bit2;
246246      /* blue component */
247247      bit0 = 0;
248      bit1 = ((*color_prom ^ m_invertmask) >> 6) & 0x01;
249      bit2 = ((*color_prom ^ m_invertmask) >> 7) & 0x01;
248      bit1 = ((color_prom[0] ^ m_invertmask) >> 6) & 0x01;
249      bit2 = ((color_prom[0] ^ m_invertmask) >> 7) & 0x01;
250250      if (m_bitmap_type == TYPE_SKYSKIPR)
251251      {
252252         /* Sky Skipper has different weights */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team