Previous 199869 Revisions Next

r29608 Sunday 13th April, 2014 at 15:15:30 UTC by Alex Jackson
Fix rackemup gfx rom that was dumped with low and high bytes split (nw)
[src/mame/drivers]battlnts.c
[src/mame/includes]battlnts.h

trunk/src/mame/includes/battlnts.h
r29607r29608
3434   DECLARE_WRITE8_MEMBER(battlnts_sh_irqtrigger_w);
3535   DECLARE_WRITE8_MEMBER(battlnts_bankswitch_w);
3636   DECLARE_WRITE8_MEMBER(battlnts_spritebank_w);
37   DECLARE_DRIVER_INIT(rackemup);
3837   virtual void machine_start();
3938   virtual void machine_reset();
4039   UINT32 screen_update_battlnts(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
trunk/src/mame/drivers/battlnts.c
r29607r29608
330330   ROM_LOAD( "765_j01.10a", 0x00000, 0x08000, CRC(77ae753e) SHA1(9e463a825d31bb79644b083d24b25670d96441c5) )
331331
332332   ROM_REGION( 0x40000, "gfx1", 0 )
333   ROM_LOAD( "765_l04.13a", 0x00000, 0x40000, CRC(acfbeee2) SHA1(c2bf750892ba33d4610fa4497170f49c101ed4c1) ) /* tiles */
333   ROM_LOAD( "765_l04.13a", 0x00000, 0x40000, CRC(d8fb9c64) SHA1(37dac643aa492ef1ecc29c5030bc7fe5226027a2) ) /* tiles */
334334
335335   ROM_REGION( 0x40000, "gfx2", 0 )
336336   ROM_LOAD( "765_l05.13e", 0x00000, 0x40000, CRC(1bb6855f) SHA1(251081564dfede8fa9a422081d58465fe5ca4ed1) ) /* sprites */
r29607r29608
367367ROM_END
368368
369369
370/*************************************
371 *
372 *  Driver initialization
373 *
374 *************************************/
375370
376/*
377    This recursive function doesn't use additional memory
378    (it could be easily converted into an iterative one).
379    It's called shuffle because it mimics the shuffling of a deck of cards.
380*/
381static void shuffle( UINT8 *buf, int len )
382{
383   int i;
384   UINT8 t;
385
386   if (len == 2)
387      return;
388
389   if (len % 4)
390      fatalerror("shuffle() - not modulo 4\n");   /* must not happen */
391
392   len /= 2;
393
394   for (i = 0; i < len / 2; i++)
395   {
396      t = buf[len / 2 + i];
397      buf[len / 2 + i] = buf[len + i];
398      buf[len + i] = t;
399   }
400
401   shuffle(buf, len);
402   shuffle(buf + len, len);
403}
404
405
406DRIVER_INIT_MEMBER(battlnts_state,rackemup)
407{
408   /* rearrange char ROM */
409   shuffle(memregion("gfx1")->base(), memregion("gfx1")->bytes());
410}
411
412
413
414371/*************************************
415372 *
416373 *  Game driver(s)
417374 *
418375 *************************************/
419376
420GAME( 1987, battlnts,  0,        battlnts, battlnts, driver_device, 0,        ROT90, "Konami", "Battlantis (program code G)",         GAME_SUPPORTS_SAVE )
421GAME( 1987, battlntsa, battlnts, battlnts, battlnts, driver_device, 0,        ROT90, "Konami", "Battlantis (program code F)",         GAME_SUPPORTS_SAVE )
422GAME( 1987, battlntsj, battlnts, battlnts, battlnts, driver_device, 0,        ROT90, "Konami", "Battlantis (Japan, program code E)",  GAME_SUPPORTS_SAVE )
423GAME( 1987, rackemup,  0,        battlnts, rackemup, battlnts_state, rackemup, ROT90, "Konami", "Rack 'em Up (program code L)",        GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
424GAME( 1987, thehustl,  rackemup, battlnts, thehustl, driver_device, 0,        ROT90, "Konami", "The Hustler (Japan, program code M)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
425GAME( 1987, thehustlj, rackemup, battlnts, thehustl, driver_device, 0,        ROT90, "Konami", "The Hustler (Japan, program code J)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
377GAME( 1987, battlnts,  0,        battlnts, battlnts, driver_device, 0, ROT90, "Konami", "Battlantis (program code G)",         GAME_SUPPORTS_SAVE )
378GAME( 1987, battlntsa, battlnts, battlnts, battlnts, driver_device, 0, ROT90, "Konami", "Battlantis (program code F)",         GAME_SUPPORTS_SAVE )
379GAME( 1987, battlntsj, battlnts, battlnts, battlnts, driver_device, 0, ROT90, "Konami", "Battlantis (Japan, program code E)",  GAME_SUPPORTS_SAVE )
380GAME( 1987, rackemup,  0,        battlnts, rackemup, driver_device, 0, ROT90, "Konami", "Rack 'em Up (program code L)",        GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
381GAME( 1987, thehustl,  rackemup, battlnts, thehustl, driver_device, 0, ROT90, "Konami", "The Hustler (Japan, program code M)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
382GAME( 1987, thehustlj, rackemup, battlnts, thehustl, driver_device, 0, ROT90, "Konami", "The Hustler (Japan, program code J)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team