Previous 199869 Revisions Next

r32191 Thursday 18th September, 2014 at 23:51:24 UTC by Alex Jackson
flyball.c: only descramble ROM once at startup (nw)
[src/mame/drivers]flyball.c

trunk/src/mame/drivers/flyball.c
r32190r32191
3636   flyball_state(const machine_config &mconfig, device_type type, const char *tag)
3737      : driver_device(mconfig, type, tag),
3838      m_playfield_ram(*this, "playfield_ram"),
39      m_rombase(*this, "rombase"),
4039      m_maincpu(*this, "maincpu"),
4140      m_gfxdecode(*this, "gfxdecode"),
4241      m_screen(*this, "screen"),
r32190r32191
4443
4544   /* memory pointers */
4645   required_shared_ptr<UINT8> m_playfield_ram;
47   required_shared_ptr<UINT8> m_rombase;
4846
4947   /* video-related */
5048   tilemap_t  *m_tmap;
r32190r32191
311309   AM_RANGE(0x0a00, 0x0a07) AM_WRITE(flyball_misc_w)
312310   AM_RANGE(0x0b00, 0x0b00) AM_READ(flyball_input_r)
313311   AM_RANGE(0x0d00, 0x0eff) AM_WRITEONLY AM_SHARE("playfield_ram")
314   AM_RANGE(0x1000, 0x1fff) AM_ROM AM_SHARE("rombase") /* program */
312   AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("maincpu", 0)
315313ADDRESS_MAP_END
316314
317315
r32190r32191
416414
417415void flyball_state::machine_start()
418416{
417   /* address bits 0 through 8 are inverted */
418   UINT8 *ROM = memregion("maincpu")->base();
419   int len = memregion("maincpu")->bytes();
420   dynamic_buffer buf(len);
421   for (int i = 0; i < len; i++)
422      buf[i ^ 0x1ff] = ROM[i];
423   memcpy(ROM, buf, len);
424
419425   save_item(NAME(m_pitcher_vert));
420426   save_item(NAME(m_pitcher_horz));
421427   save_item(NAME(m_pitcher_pic));
r32190r32191
427433
428434void flyball_state::machine_reset()
429435{
430   /* address bits 0 through 8 are inverted */
431   UINT8* ROM = memregion("maincpu")->base() + 0x2000;
432
433   for (int i = 0; i < 0x1000; i++)
434      m_rombase[i] = ROM[i ^ 0x1ff];
435
436   m_maincpu->reset();
437
438436   timer_set(m_screen->time_until_pos(0), TIMER_FLYBALL_QUARTER);
439437
440438   m_pitcher_vert = 0;
r32190r32191
477475 *************************************/
478476
479477ROM_START( flyball )
480   ROM_REGION( 0x3000, "maincpu", 0 )  /* program */
481   ROM_LOAD( "6129-02.d5", 0x2000, 0x0200, CRC(105ffe40) SHA1(20225571ccf76df5d96a42168d9223cccdff90a8) )
482   ROM_LOAD( "6130-02.f5", 0x2200, 0x0200, CRC(188210e1) SHA1(6d837dd9ea44d16f0d54ea9e14260de5f7c05b6b) )
483   ROM_LOAD( "6131-01.h5", 0x2400, 0x0200, CRC(a9c7e858) SHA1(aee4a359d6a5729dc1be5b8ce8fbe54d032d12b0) ) /* Roms found with and without the "-01" extension */
484   ROM_LOAD( "6132-01.j5", 0x2600, 0x0200, CRC(31fefd8a) SHA1(97e3ef278ce2175cd33c0f3147bdf7974752c836) ) /* Roms found with and without the "-01" extension */
485   ROM_LOAD( "6133-01.k5", 0x2800, 0x0200, CRC(6fdb09b1) SHA1(04ad412b437bb24739b3e31fa5a413e63d5897f8) ) /* Roms found with and without the "-01" extension */
486   ROM_LOAD( "6134-01.m5", 0x2A00, 0x0200, CRC(7b526c73) SHA1(e47c8f33b7edc143ab1713556c59b93571933daa) ) /* Roms found with and without the "-01" extension */
487   ROM_LOAD( "6135-01.n5", 0x2C00, 0x0200, CRC(b352cb51) SHA1(39b9062fb51d0a78a47dcd470ceae47fcdbd7891) ) /* Roms found with and without the "-01" extension */
488   ROM_LOAD( "6136-02.r5", 0x2E00, 0x0200, CRC(ae06a0f5) SHA1(6034176b255eeaa2980e8fef1b17ef6f0a743941) )
478   ROM_REGION( 0x1000, "maincpu", 0 )  /* program */
479   ROM_LOAD( "6129-02.d5", 0x0000, 0x0200, CRC(105ffe40) SHA1(20225571ccf76df5d96a42168d9223cccdff90a8) )
480   ROM_LOAD( "6130-02.f5", 0x0200, 0x0200, CRC(188210e1) SHA1(6d837dd9ea44d16f0d54ea9e14260de5f7c05b6b) )
481   ROM_LOAD( "6131-01.h5", 0x0400, 0x0200, CRC(a9c7e858) SHA1(aee4a359d6a5729dc1be5b8ce8fbe54d032d12b0) ) /* Roms found with and without the "-01" extension */
482   ROM_LOAD( "6132-01.j5", 0x0600, 0x0200, CRC(31fefd8a) SHA1(97e3ef278ce2175cd33c0f3147bdf7974752c836) ) /* Roms found with and without the "-01" extension */
483   ROM_LOAD( "6133-01.k5", 0x0800, 0x0200, CRC(6fdb09b1) SHA1(04ad412b437bb24739b3e31fa5a413e63d5897f8) ) /* Roms found with and without the "-01" extension */
484   ROM_LOAD( "6134-01.m5", 0x0A00, 0x0200, CRC(7b526c73) SHA1(e47c8f33b7edc143ab1713556c59b93571933daa) ) /* Roms found with and without the "-01" extension */
485   ROM_LOAD( "6135-01.n5", 0x0C00, 0x0200, CRC(b352cb51) SHA1(39b9062fb51d0a78a47dcd470ceae47fcdbd7891) ) /* Roms found with and without the "-01" extension */
486   ROM_LOAD( "6136-02.r5", 0x0E00, 0x0200, CRC(ae06a0f5) SHA1(6034176b255eeaa2980e8fef1b17ef6f0a743941) )
489487
490488   ROM_REGION( 0x0C00, "gfx1", 0 ) /* tiles */
491489   ROM_LOAD( "6142.l2", 0x0000, 0x0200, CRC(65650cfa) SHA1(7d17455146fc9def22c7bd06f7fde32df0a0c2bc) )
r32190r32191
499497ROM_END
500498
501499ROM_START( flyball1 )
502   ROM_REGION( 0x3000, "maincpu", 0 )  /* program */
503   ROM_LOAD( "6129.d5", 0x2000, 0x0200, CRC(17eda069) SHA1(e4ef0bf4546cf00668d759a188e0989a4f003825) )
504   ROM_LOAD( "6130.f5", 0x2200, 0x0200, CRC(a756955b) SHA1(220b7f1789bba4481d595b36b4bae25f98d3ad8d) )
505   ROM_LOAD( "6131.h5", 0x2400, 0x0200, CRC(a9c7e858) SHA1(aee4a359d6a5729dc1be5b8ce8fbe54d032d12b0) )
506   ROM_LOAD( "6132.j5", 0x2600, 0x0200, CRC(31fefd8a) SHA1(97e3ef278ce2175cd33c0f3147bdf7974752c836) )
507   ROM_LOAD( "6133.k5", 0x2800, 0x0200, CRC(6fdb09b1) SHA1(04ad412b437bb24739b3e31fa5a413e63d5897f8) )
508   ROM_LOAD( "6134.m5", 0x2A00, 0x0200, CRC(7b526c73) SHA1(e47c8f33b7edc143ab1713556c59b93571933daa) )
509   ROM_LOAD( "6135.n5", 0x2C00, 0x0200, CRC(b352cb51) SHA1(39b9062fb51d0a78a47dcd470ceae47fcdbd7891) )
510   ROM_LOAD( "6136.r5", 0x2E00, 0x0200, CRC(1622d890) SHA1(9ad342aefdc02e022eb79d84d1c856bed538bebe) )
500   ROM_REGION( 0x1000, "maincpu", 0 )  /* program */
501   ROM_LOAD( "6129.d5", 0x0000, 0x0200, CRC(17eda069) SHA1(e4ef0bf4546cf00668d759a188e0989a4f003825) )
502   ROM_LOAD( "6130.f5", 0x0200, 0x0200, CRC(a756955b) SHA1(220b7f1789bba4481d595b36b4bae25f98d3ad8d) )
503   ROM_LOAD( "6131.h5", 0x0400, 0x0200, CRC(a9c7e858) SHA1(aee4a359d6a5729dc1be5b8ce8fbe54d032d12b0) )
504   ROM_LOAD( "6132.j5", 0x0600, 0x0200, CRC(31fefd8a) SHA1(97e3ef278ce2175cd33c0f3147bdf7974752c836) )
505   ROM_LOAD( "6133.k5", 0x0800, 0x0200, CRC(6fdb09b1) SHA1(04ad412b437bb24739b3e31fa5a413e63d5897f8) )
506   ROM_LOAD( "6134.m5", 0x0A00, 0x0200, CRC(7b526c73) SHA1(e47c8f33b7edc143ab1713556c59b93571933daa) )
507   ROM_LOAD( "6135.n5", 0x0C00, 0x0200, CRC(b352cb51) SHA1(39b9062fb51d0a78a47dcd470ceae47fcdbd7891) )
508   ROM_LOAD( "6136.r5", 0x0E00, 0x0200, CRC(1622d890) SHA1(9ad342aefdc02e022eb79d84d1c856bed538bebe) )
511509
512510   ROM_REGION( 0x0C00, "gfx1", 0 ) /* tiles */
513511   ROM_LOAD( "6142.l2", 0x0000, 0x0200, CRC(65650cfa) SHA1(7d17455146fc9def22c7bd06f7fde32df0a0c2bc) )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team