Previous 15994 Revisions Next

r1178 Tuesday 23rd October, 2007 at 18:14:24 UTC by Wilbert Pol
[SVI318] Remove dynamic expansion ram alloction/freeing. Should be re-implemented using CONFIG_RAM entries.
[src/mess/drivers]svi318.c
[src/mess/machine]svi318.c

src/mess/machine/svi318.c
r1177r1178
653653   set = readinputport (13);
654654   TMS9928A_set_spriteslimit (set & 0x20);
655655   TMS9928A_interrupt();
656
657   /* memory banks */
658   for (i=0;i<4;i++)
659   {
660      bit = set & (1 << i);
661      p = (i & 1);
662      b = i / 2 + 2;
663
664      if (bit && !svi.banks[p][b])
665      {
666         svi.banks[p][b] = malloc (0x8000);
667         if (!svi.banks[p][b])
668            logerror ("Cannot malloc bank%d%d!\n", b, p + 1);
669         else
670         {
671            memset (svi.banks[p][b], 0, 0x8000);
672            logerror ("bank%d%d allocated.\n", b, p + 1);
673         }
674      }
675      else if (!bit && svi.banks[p][b])
676      {
677         free (svi.banks[p][b]);
678         svi.banks[p][b] = NULL;
679         logerror ("bank%d%d freed.\n", b, p + 1);
680      }
681   }
682656}
683657
684658/* Memory */
src/mess/drivers/svi318.c
r1177r1178
231231  PORT_DIPNAME( 0x20, 0x20, "Enforce 4 sprites/line")
232232  PORT_DIPSETTING( 0, DEF_STR( No ) )
233233  PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
234  PORT_DIPNAME( 0x01, 0x00, "Bank 21 RAM")
235  PORT_DIPSETTING( 0, DEF_STR( Off ) )
236  PORT_DIPSETTING( 0x01, DEF_STR( On ) )
237  PORT_DIPNAME( 0x02, 0x00, "Bank 22 RAM")
238  PORT_DIPSETTING( 0, DEF_STR( Off ) )
239  PORT_DIPSETTING( 0x02, DEF_STR( On ) )
240  PORT_DIPNAME( 0x04, 0x00, "Bank 31 RAM")
241  PORT_DIPSETTING( 0, DEF_STR( Off ) )
242  PORT_DIPSETTING( 0x04, DEF_STR( On ) )
243  PORT_DIPNAME( 0x08, 0x00, "Bank 32 RAM")
244  PORT_DIPSETTING( 0, DEF_STR( Off ) )
245  PORT_DIPSETTING( 0x08, DEF_STR( On ) )
246234
247235 PORT_START /* 14 */
248236  PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RIGHT SHIFT") PORT_CODE(KEYCODE_RSHIFT)
r1177r1178
299287  PORT_DIPNAME( 0x20, 0x20, "Enforce 4 sprites/line")
300288  PORT_DIPSETTING( 0, DEF_STR( No ) )
301289  PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
302  PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_UNUSED)
303  PORT_DIPNAME( 0x02, 0x00, "Bank 22 RAM")
304  PORT_DIPSETTING( 0, DEF_STR( Off ) )
305  PORT_DIPSETTING( 0x02, DEF_STR( On ) )
306  PORT_DIPNAME( 0x04, 0x00, "Bank 31 RAM")
307  PORT_DIPSETTING( 0, DEF_STR( Off ) )
308  PORT_DIPSETTING( 0x04, DEF_STR( On ) )
309  PORT_DIPNAME( 0x08, 0x00, "Bank 32 RAM")
310  PORT_DIPSETTING( 0, DEF_STR( Off ) )
311  PORT_DIPSETTING( 0x08, DEF_STR( On ) )
312290
313291 PORT_START /* 14 */
314292  PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RIGHT SHIFT") PORT_CODE(KEYCODE_RSHIFT)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team