Previous 15994 Revisions Next

r5416 Wednesday 12th August, 2009 at 23:36:00 UTC by Angelo Salese
[SNES]: Fixed 8bpp layer colors.
[src/mame/machine]snes.c
[src/mame/video]snes.c

src/mame/machine/snes.c
r5415r5416
338338   /* offset is from 0x000000 */
339339   switch( offset )
340340   {
341      /* hacks for SimCity 2000 (J) to boot - I presume openbus emulation will fix */
342      case 0x221a:
343      case 0x231c:
344      case 0x241e:
345         return 1;
346      case 0x2017:
347      case 0x221b:
348      case 0x231d:
349      case 0x241f:
350         return 0;
351      case 0x2016:
352         return 2;
353341      case OAMDATA:   /* 21xy for x=0,1,2 and y=4,5,6,8,9,a returns PPU1 open bus*/
354342      case BGMODE:
355343      case MOSAIC:
src/mame/video/snes.c
r5415r5416
473473         tile_divider = 2;
474474         break;
475475      case SNES_COLOR_DEPTH_8BPP:
476         color_shift = 6;   // 2009-08 FP: this should be 6 or 8, if I'm following correctly the drawing code
476         color_shift = 0;   //n/a, pal offset is always zero
477477         color_planes = 8;
478478         tile_divider = 4;
479479         break;
r5415r5416
496496      vflip = snes_vram[tmap + ii + 1] & 0x80;
497497      hflip = snes_vram[tmap + ii + 1] & 0x40;
498498      priority = ((snes_vram[tmap + ii + 1] & 0x20) >> 5) ? priority_b : priority_a;
499      pal = (snes_vram[tmap + ii + 1] & 0x1c) << color_shift;      /* 8 palettes of (4 * color_shift) colours */
499      pal = (color_depth == SNES_COLOR_DEPTH_8BPP) ? 0 : (snes_vram[tmap + ii + 1] & 0x1c) << color_shift;      /* 8 palettes of (4 * color_shift) colours */
500500      tile = (snes_vram[tmap + ii + 1] & 0x3) << 8;
501501      tile |= snes_vram[tmap + ii] & 0xff;
502502

Previous 15994 Revisions Next


© 1998-2018 The MESS Team