Previous 15994 Revisions Next

r7583 Tuesday 16th March, 2010 at 08:43:40 UTC by Fabio Priuli
[SNES] removed unchecked debug options and added a few new ones
[src/mame/video]snes.c
[src/mess/drivers]snes.c

src/mame/video/snes.c
r7582r7583
9090   UINT8 draw_subscreen;
9191   UINT8 windows_disabled;
9292   UINT8 transparency_disabled;
93   UINT8 sprite_reversed;
94   UINT8 select_oam;
9395};
9496static struct DEBUGOPTS debug_options;
9597/*                                    red   green  blue    purple  yellow cyan    grey    white */
r7582r7583
11021104static UINT8 oam_itemlist[32];
11031105
11041106struct TILELIST {
1105  UINT16 x, priority, pal, tileaddr;
1106  int   hflip;
1107   INT16 x;
1108   UINT16 priority, pal, tileaddr;
1109   int hflip;
11071110};
11081111
11091112struct TILELIST oam_tilelist[34];
r7582r7583
12651268   /* finally draw the tiles from the tilelist */
12661269   for (i = 0; i < 34; i++)
12671270   {
1268      if (oam_tilelist[i].tileaddr == 0xffff)
1271      int tile = i;
1272#ifdef SNES_LAYER_DEBUG
1273      if (debug_options.sprite_reversed)
1274         tile = 33 - i;
1275#endif /* SNES_LAYER_DEBUG */
1276
1277      if (oam_tilelist[tile].tileaddr == 0xffff)
12691278         continue;
12701279
1271      priority = table_obj_priority[priority_tbl][oam_tilelist[i].priority];
1272      snes_draw_tile_object(charaddr + oam_tilelist[i].tileaddr, oam_tilelist[i].x, priority, oam_tilelist[i].hflip, oam_tilelist[i].pal);
1280      priority = table_obj_priority[priority_tbl][oam_tilelist[tile].priority];
1281
1282#ifdef SNES_LAYER_DEBUG
1283      if (debug_options.select_oam)
1284      {
1285         int oam_draw = debug_options.select_oam - 1;
1286         if (oam_draw != oam_tilelist[tile].priority)
1287            priority = 0;
1288      }
1289#endif /* SNES_LAYER_DEBUG */
1290
1291      snes_draw_tile_object(charaddr + oam_tilelist[tile].tileaddr, oam_tilelist[tile].x, priority, oam_tilelist[tile].hflip, oam_tilelist[tile].pal);
12731292   }
12741293}
12751294
r7582r7583
16751694
16761695      if (!debug_options.input_count--)
16771696      {
1678         UINT8 toggles = input_port_read_safe(machine, "DEBUG2", 0);
1697         UINT8 toggles = input_port_read_safe(machine, "DEBUG1", 0);
1698         debug_options.sprite_reversed = BIT(toggles, 7);
1699         debug_options.select_oam = (toggles & 0x70) >> 4;
1700
1701         toggles = input_port_read_safe(machine, "DEBUG2", 0);
16791702         if (BIT(toggles, 0))
16801703            debug_options.bg_disabled[0] = !debug_options.bg_disabled[0];
16811704         if (BIT(toggles, 1))
src/mess/drivers/snes.c
r7582r7583
295295
296296
297297#ifdef SNES_LAYER_DEBUG
298   PORT_START("INTERNAL")
299   PORT_CONFNAME( 0x1, 0x1, "Enforce 32 sprites/line" )
300   PORT_CONFSETTING(   0x0, DEF_STR( No ) )
301   PORT_CONFSETTING(   0x1, DEF_STR( Yes ) )
302
303298   PORT_START("DEBUG1")
304   PORT_CONFNAME( 0x3, 0x0, "Browse tiles" )
305   PORT_CONFSETTING(   0x0, DEF_STR( Off ) )
306   PORT_CONFSETTING(   0x1, "2bpl" )
307   PORT_CONFSETTING(   0x2, "4bpl" )
308   PORT_CONFSETTING(   0x3, "8bpl" )
309   PORT_CONFNAME( 0xc, 0x0, "Browse maps" )
310   PORT_CONFSETTING(   0x0, DEF_STR( Off ) )
311   PORT_CONFSETTING(   0x4, "2bpl" )
312   PORT_CONFSETTING(   0x8, "4bpl" )
313   PORT_CONFSETTING(   0xc, "8bpl" )
299   PORT_CONFNAME( 0x70, 0x00, "Select OAM" )
300   PORT_CONFSETTING(   0x00, "All" )
301   PORT_CONFSETTING(   0x10, "OAM1 only" )
302   PORT_CONFSETTING(   0x20, "OAM2 only" )
303   PORT_CONFSETTING(   0x30, "OAM3 only" )
304   PORT_CONFSETTING(   0x40, "OAM4 only" )
305   PORT_CONFNAME( 0x80, 0x00, "Draw sprite in reverse order" )
306   PORT_CONFSETTING(   0x00, DEF_STR( Off ) )
307   PORT_CONFSETTING(   0x80, DEF_STR( On ) )
314308
315309   PORT_START("DEBUG2")
316310   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 1") PORT_CODE(KEYCODE_1_PAD)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team