Previous 199869 Revisions Next

r44471 Monday 25th January, 2016 at 07:20:33 UTC by Miodrag Milanović
Merge pull request #580 from ajrhacker/inputname

Have sound_stream::input_name return the std::string it constructs [AJR]
[src/devices/sound]k056800.cpp rf5c400.cpp rf5c400.h
[src/mame]arcade.lst mess.lst
[src/mame/audio]m72.cpp
[src/mame/drivers]bfm_sc2.cpp cobra.cpp dec0.cpp didact.cpp fidel6502.cpp fidelz80.cpp gaelco2.cpp galaxi.cpp glass.cpp itech8.cpp marywu.cpp metro.cpp pacman.cpp segas16b.cpp segas18.cpp segaybd.cpp system16.cpp taito_f2.cpp targeth.cpp thoop2.cpp timex.cpp tispeak.cpp tumbleb.cpp zn.cpp
[src/mame/includes]dynax.h gaelco2.h segaybd.h
[src/mame/layout]fidel_fev.lay* fidel_sc12.lay* marywu.lay* md6802.lay* mp68a.lay*
[src/mame/machine]sms.cpp
[src/mame/video]c45.cpp dynax.cpp seta.cpp

trunk/src/devices/sound/k056800.cpp
r252982r252983
108108
109109      case 7:
110110         // Sound interrupt
111         m_int_pending = true;
112
113111         if (m_int_enabled)
112         {
113            m_int_pending = true;
114114            m_int_handler(ASSERT_LINE);
115
115         }
116116         break;
117117   }
118118}
trunk/src/devices/sound/rf5c400.cpp
r252982r252983
354354      {
355355         return 0;
356356      }
357
358      case 0x13:      // memory read
359      {
360         return m_rom[m_ext_mem_address];
361      }
357362   }
358363
359364   return 0;
r252982r252983
413418         case 0x08:      // relative to env attack (channel no)
414419         case 0x09:      // relative to env attack (0x0c00/ 0x1c00)
415420
416         case 0x11:      // ? counter for 0x13?
421         case 0x11:      // memory r/w address, bits 15 - 0
417422         {
423            m_ext_mem_address &= ~0xffff;
424            m_ext_mem_address |= data;
418425            break;
419426         }
420         case 0x13:      // ? bujutsu writes sample data here
427         case 0x12:      // memory r/w address, bits 23 - 16
421428         {
429            m_ext_mem_address &= 0xffff;
430            m_ext_mem_address |= (UINT32)(data) << 16;
422431            break;
423432         }
433         case 0x13:      // memory write data
434         {
435            m_ext_mem_data = data;
436            break;
437         }
424438
425         case 0x14:      // ? related to 0x11/0x13 ?
439         case 0x14:      // memory write
440         {
441            if ((data & 0x3) == 3)
442            {
443               m_rom[m_ext_mem_address] = m_ext_mem_data;
444            }
426445            break;
446         }
427447
428448         case 0x21:      // reverb(character).w
429449         case 0x32:      // reverb(pre-lpf).w
trunk/src/devices/sound/rf5c400.h
r252982r252983
109109   double m_env_rr_table[0x9f];
110110
111111   rf5c400_channel m_channels[32];
112
113   UINT32 m_ext_mem_address;
114   UINT16 m_ext_mem_data;
112115};
113116
114117extern const device_type RF5C400;
trunk/src/mame/arcade.lst
r252982r252983
7676mspacmanbgd     // bootleg
7777mspacmanbcc     // bootleg
7878mspacmanblt     // bootleg
79clubpacm        // Miky
79clubpacm        // Miky SRL
80clubpacma       // Miky SRL
81clubpacmb       // Miky SRL
8082woodpeck        // (c) 1981 Amenip (Palcom Queen River)
8183woodpeca        // (c) 1981 Amenip Nova Games Ltd.
8284mspacmab        // bootleg
r252982r252983
41924194grmatch         // (c) 1989 Yankee Game Technology
41934195stratab         // (c) 1990 Strata/Incredible Technologies
41944196stratab1        // (c) 1990 Strata/Incredible Technologies
4197stratabs      // (c) 1990 Strata/Incredible Technologies
41954198sstrike         // (c) 1990 Strata/Incredible Technologies
41964199gtg             // (c) 1990 Strata/Incredible Technologies
41974200gtgt            // (c) 1990 Strata/Incredible Technologies
r252982r252983
61976200secretag        // (c) 1989 Data East Corporation (World)
61986201secretagj       // (c) 1989 Data East Corporation (Japan)
61996202slyspy          // (c) 1989 Data East USA (US)
6203slyspy3         // (c) 1989 Data East USA (US)
62006204slyspy2         // (c) 1989 Data East USA (US)
62016205secretab        // bootleg
62026206midres          // (c) 1989 Data East Corporation (World)
r252982r252983
91739177touchgoe        // (c) 1995 - Ref 950510-1
91749178wrally2         // (c) 1995 - Ref 950510
91759179maniacsp        // (c) 1996 - Ref 922804/2 - (prototype)
9176maniacsq        // (c) 1996 - Ref ??? - (unprotected)
9180maniacsq        // (c) 1996 - Ref 940411 - (unprotected)
9181maniacsqa      // (c) 1996 - Ref 940411
91779182snowboar        // (c) 1996 - Ref 960419/1
91789183snowboara       // (c) 1996 - Ref 960419/1
91799184bang            // (c) 1998 - Ref ???
r252982r252983
96989703
96999704// Metro games
97009705karatour        // (c) 1992 Mitchell
9706karatourj       // (c) 1992 Mitchell
97019707ladykill        // (c) 1993 Yanyaka + Mitchell license - (Arcade TV Game List - P.101, Right, 2 from Bottom)
97029708moegonta        // (c) 1993 Yanyaka (Japan) (Arcade TV Game List - P.101, Right, 2 from Bottom)
97039709pangpoms        // (c) 1992
r252982r252983
1120511211musicsrt        // (c) 1995 ABM Games
1120611212galaxi          // (c) 2000 BRL S.R.L. Bologna
1120711213magjoker        // (c) 2000 BRL S.R.L. Bologna
11214lastfour        // (c) 2001 BRL S.R.L. Bologna
1120811215dwarfd          // (c) 198? Electro-Sports
1120911216dwarfda         // (c) 198? Electro-Sports
1121011217quarterh        // (c) 1983 Electro-Sports
trunk/src/mame/audio/m72.cpp
r252982r252983
5353   , device_sound_interface(mconfig, *this)
5454   , m_irqvector(0)
5555   , m_sample_addr(0)
56   , m_samples(*this, "samples")
56   , m_samples(*this, "^samples")
5757   , m_samples_size(0)
5858{
5959}
trunk/src/mame/drivers/bfm_sc2.cpp
r252982r252983
22842284
22852285void bfm_sc2_state::adder2_common_init()
22862286{
2287   UINT8 *pal;
2288
2289   pal = memregion("proms")->base();
2290   if ( pal )
2287   if (memregion("proms") != nullptr)
22912288   {
2289      UINT8 *pal;
2290      pal = memregion("proms")->base();
22922291      memcpy(m_key, pal, 8);
22932292   }
22942293}
trunk/src/mame/drivers/cobra.cpp
r252982r252983
493493public:
494494   cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
495495
496   DECLARE_WRITE_LINE_MEMBER(coin_1_w);
497   DECLARE_WRITE_LINE_MEMBER(coin_2_w);
498
496499protected:
497500   virtual bool switches(UINT8 *&buf, UINT8 count_players, UINT8 bytes_per_switch) override;
498501   virtual bool coin_counters(UINT8 *&buf, UINT8 count) override;
502   virtual void function_list(UINT8 *&buf) override;
503
504private:
505   int m_coin_counter[2];
499506};
500507
501508const device_type COBRA_JVS = &device_creator<cobra_jvs>;
r252982r252983
503510cobra_jvs::cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
504511   : jvs_device(mconfig, COBRA_JVS, "JVS (COBRA)", tag, owner, clock, "cobra_jvs", __FILE__)
505512{
513   m_coin_counter[0] = 0;
514   m_coin_counter[1] = 0;
506515}
507516
517WRITE_LINE_MEMBER(cobra_jvs::coin_1_w)
518{
519   if(state)
520      m_coin_counter[0]++;
521}
522
523WRITE_LINE_MEMBER(cobra_jvs::coin_2_w)
524{
525   if(state)
526      m_coin_counter[1]++;
527}
528
529void cobra_jvs::function_list(UINT8 *&buf)
530{
531   // SW input - 2 players, 13 bits
532   *buf++ = 0x01; *buf++ = 2; *buf++ = 13; *buf++ = 0;
533
534   // Coin input - 2 slots
535   *buf++ = 0x02; *buf++ = 2; *buf++ = 0; *buf++ = 0;
536
537   // Analog input - 8 channels
538   *buf++ = 0x03; *buf++ = 8; *buf++ = 16; *buf++ = 0;
539
540   // Driver out - 6 channels
541   *buf++ = 0x12; *buf++ = 6; *buf++ = 0; *buf++ = 0;
542}
543
508544bool cobra_jvs::switches(UINT8 *&buf, UINT8 count_players, UINT8 bytes_per_switch)
509545{
510546#if LOG_JVS
r252982r252983
538574   if (count > 2)
539575      return false;
540576
541   *buf++ = 0x00;
542   *buf++ = 0x01;
577   *buf++ = m_coin_counter[0] >> 8; *buf++ = m_coin_counter[0];
543578
579   if(count > 1)
580      *buf++ = m_coin_counter[1] >> 8; *buf++ = m_coin_counter[1];
581
544582   return true;
545583}
546584
r252982r252983
744782   DECLARE_DRIVER_INIT(racjamdx);
745783   DECLARE_DRIVER_INIT(bujutsu);
746784   DECLARE_DRIVER_INIT(cobra);
785   virtual void machine_start() override;
747786   virtual void machine_reset() override;
748787   virtual void video_start() override;
749788   UINT32 screen_update_cobra(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
r252982r252983
22492288               // GFX register select
22502289               m_gfx_register_select = w[3];
22512290
2252               printf("GFX: register select %08X\n", m_gfx_register_select);
2291            //   printf("GFX: register select %08X\n", m_gfx_register_select);
22532292            }
22542293            else if (w2 == 0x10500018)
22552294            {
22562295               // register write to the register selected above?
22572296               // 64-bit registers, top 32-bits in word 2, low 32-bit in word 3
2258               printf("GFX: register write %08X: %08X %08X\n", m_gfx_register_select, w[2], w[3]);
2297            //   printf("GFX: register write %08X: %08X %08X\n", m_gfx_register_select, w[2], w[3]);
22592298
22602299               gfx_write_reg(((UINT64)(w[2]) << 32) | w[3]);
22612300            }
r252982r252983
30963135
30973136INPUT_PORTS_START( cobra )
30983137   PORT_START("TEST")
3099   PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW)            /* Test Button */
3100   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service") PORT_CODE(KEYCODE_7)
3101   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 )
3102   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
3103   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
3104   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
3105   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
3106   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
3138   PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_HIGH)            /* Test Button */
3139   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
3140   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
3141   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
3142   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
3143   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
3144   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
3145   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
31073146
31083147   PORT_START("P1")
3109   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START1 )
3110   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_PLAYER(1)
3111   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
3112   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
3113   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
3114   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
3115   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
3116   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
3117   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
3118   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
3119   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
3120   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
3148   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START1 )
3149   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("P1 Service") PORT_CODE(KEYCODE_7)
3150   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
3151   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
3152   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
3153   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
3154   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
3155   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
3156   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)
3157   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1)
3158   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)
3159   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)
31213160   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(1)
31223161   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(1)
31233162   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(1)
31243163   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(1)
31253164
31263165   PORT_START("P2")
3127   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
3128   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_PLAYER(2)
3129   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
3130   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
3131   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
3132   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
3133   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
3134   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
3135   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
3136   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
3137   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
3138   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
3139   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(2)
3140   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(2)
3141   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(2)
3142   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(2)
3166   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START2 )
3167   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("P2 Service") PORT_CODE(KEYCODE_8)
3168   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
3169   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
3170   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
3171   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
3172   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
3173   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
3174   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(2)
3175   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2)
3176   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(2)
3177   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(2)
3178   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(2)
3179   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(2)
3180   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(2)
3181   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(2)
3182
3183   PORT_START("COINS")
3184   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1) PORT_WRITE_LINE_DEVICE_MEMBER("cobra_jvs1", cobra_jvs, coin_1_w)
3185   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_COIN2) PORT_WRITE_LINE_DEVICE_MEMBER("cobra_jvs1", cobra_jvs, coin_2_w)
31433186INPUT_PORTS_END
31443187
31453188WRITE_LINE_MEMBER(cobra_state::ide_interrupt)
r252982r252983
31643207   }
31653208}
31663209
3210void cobra_state::machine_start()
3211{
3212   /* configure fast RAM regions for DRC */
3213   m_maincpu->ppcdrc_add_fastram(0x00000000, 0x003fffff, FALSE, m_main_ram);
3214
3215   m_subcpu->ppcdrc_add_fastram(0x00000000, 0x003fffff, FALSE, m_sub_ram);
3216
3217   m_gfxcpu->ppcdrc_add_fastram(0x00000000, 0x003fffff, FALSE, m_gfx_ram0);
3218   m_gfxcpu->ppcdrc_add_fastram(0x07c00000, 0x07ffffff, FALSE, m_gfx_ram1);
3219}
3220
31673221void cobra_state::machine_reset()
31683222{
31693223   m_sub_interrupt = 0xff;
r252982r252983
32463300   MCFG_K001604_PALETTE("palette")
32473301
32483302   MCFG_DEVICE_ADD("cobra_jvs_host", COBRA_JVS_HOST, 4000000)
3249   MCFG_JVS_DEVICE_ADD("cobra_jvs", COBRA_JVS, "cobra_jvs_host")
3303   MCFG_JVS_DEVICE_ADD("cobra_jvs1", COBRA_JVS, "cobra_jvs_host")
3304   MCFG_JVS_DEVICE_ADD("cobra_jvs2", COBRA_JVS, "cobra_jvs_host")
3305   MCFG_JVS_DEVICE_ADD("cobra_jvs3", COBRA_JVS, "cobra_jvs_host")
32503306
32513307MACHINE_CONFIG_END
32523308
trunk/src/mame/drivers/dec0.cpp
r252982r252983
26812681
26822682ROM_START( slyspy )
26832683   ROM_REGION( 0x60000, "maincpu", 0 ) /* 68000 code */
2684   ROM_LOAD16_BYTE( "fa14-4.17l", 0x00000, 0x10000, CRC(60f16e31) SHA1(b2359fe8ecbed63b7d56c9962fab16b354a14305) )
2685   ROM_LOAD16_BYTE( "fa12-4.9l",  0x00001, 0x10000, CRC(b9b9fdcf) SHA1(fdd91b9bc8f0228078bb50323531808076180fe7) )
2686   ROM_LOAD16_BYTE( "fa15.19l",   0x20000, 0x10000, CRC(04a79266) SHA1(69d256ffb1c89721f8b1e929c581f187e047b977) )
2687   ROM_LOAD16_BYTE( "fa13.11l",   0x20001, 0x10000, CRC(641cc4b3) SHA1(ce0ccd14d201f411cfc02ec988b2ad4fcb0d8f5d) )
2688
2689   ROM_REGION( 0x10000, "audiocpu", 0 )    /* Sound CPU */
2690   ROM_LOAD( "fa10.5h", 0x00000, 0x10000, CRC(dfd2ff25) SHA1(3dcd6d50b92b49daae4b51581abe9c95f764e848) ) // == FB counterpart from World set
2691
2692   ROM_REGION( 0x10000, "gfx1", 0 ) /* chars */
2693   ROM_LOAD( "fa05.11a", 0x04000, 0x04000, CRC(09802924) SHA1(d9bc5fe7f053afa15cd39400aae993866d1b0226) ) // == FB counterpart from World set
2694   ROM_CONTINUE(         0x00000, 0x04000 )    /* the two halves are swapped */
2695   ROM_LOAD( "fa04.9a",  0x0c000, 0x04000, CRC(ec25b895) SHA1(8c1d2b9a2487fd7114d37fe9dc271183c4cc1613) ) // == FB counterpart from World set
2696   ROM_CONTINUE(         0x08000, 0x04000 )
2697
2698   ROM_REGION( 0x20000, "gfx2", 0 ) /* tiles */
2699   ROM_LOAD( "fa07.17a", 0x00000, 0x10000, CRC(e932268b) SHA1(ee8ed29affa951e725cf19a5f56d3beac24420c9) ) // == FB counterpart from World set
2700   ROM_LOAD( "fa06.15a", 0x10000, 0x10000, CRC(c4dd38c0) SHA1(267dbbdd5df6b13662cd307c5c95fdf643d64f45) ) // == FB counterpart from World set
2701
2702   ROM_REGION( 0x40000, "gfx3", 0 ) /* tiles */
2703   ROM_LOAD( "fa09.22a", 0x00000, 0x20000, CRC(1395e9be) SHA1(60693ac6236ffe1e0933d81771cfad32e14514c3) ) // == FB counterpart from World set
2704   ROM_LOAD( "fa08.21a", 0x20000, 0x20000, CRC(4d7464db) SHA1(82e2a3c3d78447985968220d52c7c1f1ff625d83) )
2705
2706   ROM_REGION( 0x80000, "gfx4", 0 ) /* sprites */
2707   ROM_LOAD( "fa01.4a", 0x00000, 0x20000, CRC(99b0cd92) SHA1(2729e874730391b5fa93e9a28142c02c00eb5068) ) // == FB counterpart from World set
2708   ROM_LOAD( "fa03.7a", 0x20000, 0x20000, CRC(0e7ea74d) SHA1(22078a2856933af2d31750a4a506b993fe309e9a) ) // == FB counterpart from World set
2709   ROM_LOAD( "fa00.2a", 0x40000, 0x20000, CRC(f7df3fd7) SHA1(ed9e4649e0b1fcca61cf4d159b3f8a35f06102ce) ) // == FB counterpart from World set
2710   ROM_LOAD( "fa02.5a", 0x60000, 0x20000, CRC(84e8da9d) SHA1(41da6042f80ea3562aa350f4f466b16db29e2aca) ) // == FB counterpart from World set
2711
2712   ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
2713   ROM_LOAD( "fa11.11k", 0x00000, 0x20000, CRC(4e547bad) SHA1(655eda4d00f8846957ed40dcbf750fba3ce19f4e) ) // == FB counterpart from World set
2714
2715   ROM_REGION( 0x0100, "proms", 0 )
2716   ROM_LOAD( "mb7114h.21k", 0x0000, 0x0100, CRC(ad26e8d4) SHA1(827337aeb8904429a1c050279240ae38aa6ce064) )    /* Priority (not used) */
2717
2718   ROM_REGION( 0x0800, "plds", 0 )
2719   ROM_LOAD( "pal16l8b-ta-1.15k", 0x0000, 0x0104, CRC(79a87527) SHA1(3c6ad20d5a7c41c020e671d462c0b1e4a5dda7f8) )
2720   ROM_LOAD( "pal16r4a-ta-2.16k", 0x0200, 0x0104, CRC(eca31311) SHA1(a87b2721e13767f7448236d0bbb3355583fe88bb) )
2721   ROM_LOAD( "pal16l8a-ta-3.17k", 0x0400, 0x0104, CRC(6c324919) SHA1(83bba4634d7ab7c4ad3083c063804fd1e7c9c10b) )
2722   ROM_LOAD( "pal16l8a-ta-4.11m", 0x0600, 0x0104, CRC(116177fa) SHA1(f63802578b6f743e2d3a64e4805488d44361dcb2) )
2723ROM_END
2724
2725ROM_START( slyspy3 )
2726   ROM_REGION( 0x60000, "maincpu", 0 ) /* 68000 code */
26842727   ROM_LOAD16_BYTE( "fa14-3.17l", 0x00000, 0x10000, CRC(54353a84) SHA1(899559f17705a8222fd56e9304e9b802eac8f6db) )
26852728   ROM_LOAD16_BYTE( "fa12-2.9l",  0x00001, 0x10000, CRC(1b534294) SHA1(cf7badea6604c47d9f3ff8a0ef326e09de1974a0) )
26862729   ROM_LOAD16_BYTE( "fa15.19l",   0x20000, 0x10000, CRC(04a79266) SHA1(69d256ffb1c89721f8b1e929c581f187e047b977) )
r252982r252983
32243267GAME( 1989, ffantasya,  hippodrm, hippodrm, ffantasy, dec0_state, hippodrm, ROT0,   "Data East Corporation", "Fighting Fantasy (Japan)", MACHINE_SUPPORTS_SAVE )
32253268GAME( 1989, secretag,   0,        slyspy,   slyspy,   dec0_state,   slyspy, ROT0,   "Data East Corporation", "Secret Agent (World revision 3)", MACHINE_SUPPORTS_SAVE )
32263269GAME( 1989, secretagj,  secretag, slyspy,   slyspy,   dec0_state,   slyspy, ROT0,   "Data East Corporation", "Secret Agent (Japan revision 2)", MACHINE_SUPPORTS_SAVE )
3227GAME( 1989, slyspy,     secretag, slyspy,   slyspy,   dec0_state,   slyspy, ROT0,   "Data East USA",         "Sly Spy (US revision 3)", MACHINE_SUPPORTS_SAVE )
3270GAME( 1989, slyspy,     secretag, slyspy,   slyspy,   dec0_state,   slyspy, ROT0,   "Data East USA",         "Sly Spy (US revision 4)", MACHINE_SUPPORTS_SAVE )
3271GAME( 1989, slyspy3,    secretag, slyspy,   slyspy,   dec0_state,   slyspy, ROT0,   "Data East USA",         "Sly Spy (US revision 3)", MACHINE_SUPPORTS_SAVE )
32283272GAME( 1989, slyspy2,    secretag, slyspy,   slyspy,   dec0_state,   slyspy, ROT0,   "Data East USA",         "Sly Spy (US revision 2)", MACHINE_SUPPORTS_SAVE )
32293273GAME( 1989, midres,     0,        midres,   midres,   driver_device,     0, ROT0,   "Data East Corporation", "Midnight Resistance (World)", MACHINE_SUPPORTS_SAVE )
32303274GAME( 1989, midresu,    midres,   midres,   midresu,  driver_device,     0, ROT0,   "Data East USA",         "Midnight Resistance (US)", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/didact.cpp
r252982r252983
11// license:BSD-3-Clause
22// copyright-holders:Joakim Larsson Edstrom
33/*
4 * The Didact Esselte 100 CPU board
54 *__________________________________________________________________________________________________________
6 *                                                                                                          |
5 * The Didact Esselte 100 CPU board                                                                         |
76 *__________________________________________________________________________________________________________|
87 *
9 * The Didact Mikrodator 6802 CPU board by lars Björklund 1983
10 *__________________________________________________________________________________________________________
11 *                                                                                                          |
12 *__________________________________________________________________________________________________________|
8 *  ___________________________________________________________________________________________________________           _____________________________________________________
9 * | The Didact Mp68A CPU board, by Anders Andersson 1979                                                      |         |The Didact Mp68A keypad/display  PB6   +oooo+        |
10 * |                  +------+ +-------+     +--+                                                              |         |  by Anders Andersson 1979  +-------+  |cass|        |
11 * |                  | 7402 | | 74490 |     |  |      +-------+               +--+                            |         |                    +--+    | 9368  |  +----+    +--+|
12 * |       +-------+  +------+ +-------+     |  |      |       |               |  |                            |         |+-------+    2x5082-|B |    +-------+            |  ||
13 * |       |       |    2112   2112          |  |      | EXP   |               |  |                            |         || 74132 |       7433|CD| 145  PA0-PA3            |E ||
14 * |       | ROM   |    +--+   +--+          +--+      | ANS   |               |P |                            |         |+-------+           |DI| +--+               132  |X ||
15 * |       | 7641  |    |  |   |  |                    | ION   |               |I |                            |         |+------+------+     | S| |  |               +--+ |P ||
16 * |       |       |    |A |   |B |       +-----+      | BUSES |               |A |                            |         ||      |SHIFT |     | P| |  | PA4-PA6       |  | |A ||
17 * |       | 512x8 |    |  |   |  |       |     |      | (2 x) |               |  |                            |         || RES  |(led) |     +--+ |  |               |  | |N ||
18 * |       |       |    +--+   +--+       |     |      | FOR   |               |A |                            |         ||      |  *   |          +--+               |  | |S ||
19 * |       +-------+    RAMS 4x256x4      |     |      |       |               |  |                            |         |+------+------+------+------+               +--+ |I ||
20 * |     ROMS 2x512x8   2112   2112       |     |      | KEY   |               |E |                            |         ||      |      |      |      |                    |O ||
21 * |       +-------+    +--+   +--+       |CPU  |      | BOARD | +------+      |X |                            |         || ADR  | RUN  | SST  | REG  |                    |N ||
22 * |       |       |    |  |   |  |       |6800 |      |       | |      |      |P |                            |         ||  0   |  4   |  8   |  C   |                    |  ||
23 * |       | ROM   |    |A |   |B |       |     |      | AND   | |      |      |A |                            |         |+------+------+------+------+                    |C ||
24 * |       | 7641  |    |  |   |  |       |     |      |       | |      |      |N |                            |         ||      |      |      |      |                    |O ||
25 * |       |       |    +--+   +--+       |     |      | I/O   | | 6820 |      |S |                            |         || STA  | STO  | BPR  | BPS  |                    |N ||
26 * |       | 512x8 |    512 bytes RAM     |     |      | BOARDS| | PIA  |      |I |                            |         ||  1   |  5   |  9   |  D   |                    |N ||
27 * |       +-------+                      |     |      |       | |  #1  |      |O |                         +-----+      |+------+------+------+------+           +------+ |E ||
28 * |     1024 bytes ROM                   |     |      |       | |      |      |N |                         |     |      ||      |      |      |      |           |      | |C ||
29 * |                                      +-----+      |       | |      |      |  |                  PIA A  |    |       || EXF  | EXB  | MOV  | PRM  |           |      | |T ||
30 * |        7402  7412                                 |       | |      |      |B |                EXPANSION|    |       ||  2   |  6   |  A   |  E   |           |      | |O ||
31 * |        +--+  +--+                                 |       | |      |      |U |                CONNECTOR|    |       |+------+------+------+------+           | 6820 | |R ||
32 * |        |  |  |  |                                 |       | |      |      |S |                         |   _|       ||      |      |      |      |           | PIA  | |  ||
33 * |        |  |  |  |                                 |       | |      |      |  |                     J4  |  |         || CLR  | REL  | REC  | PLA  |           |  #2  | |  ||
34 * |        |  |  |  |                                 |       | +------+      |  |                         |  |_        ||  3   |  7   |  B   |  F   |           |      | |  ||
35 * |        +--+  +--+         +--------+              |       |               |  |                         |    |       |+------+------+------+------+           |      | |  ||
36 * |                  +-+      | 96LS02 |              |       |               |  |                         |    |       | +-------+ +-------+  +------+          |      | |  ||
37 * |       R * * * R  |T|      +--------+              |       |               |  |                         |    |       | | 74148 | | 74148 |  | 7400 |          |      | |  ||
38 * |       O  X    A  |R|                              |       |               |  |                         |    |       | +-------+ +-------+  +------+          |      | +--+|
39 * |       M * * * M  |M|  Oscillator circuits         +-------+               +--+                         |     |      |                PB3    PB0-PB2          |      |     |
40 * |                  |_|                               J1   J2                 J3                          +-----+      |       +---------+                      +------+  J1 |
41 * |____________________________________________________________________________________________________________|        |______ |  _|||_  |___________________________________|
1342 *
14 * The Didact Mp68A CPU board, by Anders Andersson 1979
15 *__________________________________________________________________________________________________________
16 *                                       74138                                                              |
17 *                 +------+ +-------+     +--+                                                              |
18 *                 | 7402 | | 74490 |     |  |      +-------+               +--+                            |
19 *      +-------+  +------+ +-------+     |  |      |       |               |  |                            |
20 *      |       |    2112   2112          |  |      | EXP   |               |  |                            |
21 *      | ROM   |    +--+   +--+          +--+      | ANS   |               |P |                            |
22 *      | 7641  |    |  |   |  |                    | ION   |               |I |                            |
23 *      |       |    |A |   |B |       +-----+      | BUSES |               |A |                            |
24 *      | 512x8 |    |  |   |  |       |     |      | (2 x) |               |  |                            |
25 *      |       |    +--+   +--+       |     |      | FOR   |               |A |                            |
26 *      +-------+    RAMS 4x256x4      |     |      |       |               |  |                            |
27 *    ROMS 2x512x8   2112   2112       |     |      | KEY   |               |E |                            |
28 *      +-------+    +--+   +--+       |CPU  |      | BOARD | +------+      |X |                            |
29 *      |       |    |  |   |  |       |6800 |      |       | |      |      |P |                            |
30 *      | ROM   |    |A |   |B |       |     |      | AND   | |      |      |A |                            |
31 *      | 7641  |    |  |   |  |       |     |      |       | |      |      |N |                            |
32 *      |       |    +--+   +--+       |     |      | I/O   | | 6820 |      |S |                            |
33 *      | 512x8 |    512 bytes RAM     |     |      | BOARDS| | PIA  |      |I |                            |
34 *      +-------+                      |     |      |       | |  #1  |      |O |                         +-----+
35 *    1024 bytes ROM                   |     |      |       | |      |      |N |                         |     |
36 *                                     +-----+      |       | |      |      |  |                  PIA A  |    |
37 *       7402  7412                                 |       | |      |      |B |                EXPANSION|    |
38 *       +--+  +--+                                 |       | |      |      |U |                CONNECTOR|    |
39 *       |  |  |  |                                 |       | |      |      |S |                         |   _|
40 *       |  |  |  |                                 |       | |      |      |  |                     J4  |  |
41 *       |  |  |  |                                 |       | +------+      |  |                         |  |_
42 *       +--+  +--+         +--------+              |       |               |  |                         |    |
43 *                 +-+      | 96LS02 |              |       |               |  |                         |    |
44 *      R * * * R  |T|      +--------+              |       |               |  |                         |    |
45 *      O  X    A  |R|                              |       |               |  |                         |    |
46 *      M * * * M  |M|  Oscillator circuits         +-------+               +--+                         |     |
47 *                 |_|                               J1   J2                 J3                          +-----+
48 *__________________________________________________________________________________________________________|
43 *  _____________________________________________________________________________________________   ___________________________________________________________________________
44 * |The Didact Mikrodator 6802 CPU board by Lars Björklund 1983                            (  ) |  |The Didact Mikrodator 6802 TB16 board by Lars Björklund 1983               |
45 * |                                                                                     +----= |  |             +-|||||||-+                                         ______    |
46 * |                                                                                     |    = |  | CA2 Tx      |terminal |                                        |  ()  |   |
47 * |                                                                                     |    = |  | PA7 Rx      +---------+               +----------+  C1nF,<=R18k|      |   |
48 * |     Photo of CPU board mainly covered by TB16 Keypad/Display board                  +--- = |  | CA1 DTR               +-----------+   |          |   CB2->CB1  |  E   |   |
49 * |                                                                                            |  |               PA4-PA6 |           | 1 | BCD      |    +----+   |  X   |   |
50 * |                                                                                            |  |               ------->| 74LS145   |   | digit 5  |    |LS  |   |  P   |   |
51 * |                                                                                            |  |                       +-----------+   |----------|    | 122|   |  A   |   |
52 * |                                                                                     +-----=|  |                                   |   |          |    |    |   |  N   |   |
53 * |                                                                          +-------+  |     =|  |------ +--------+                  | 2 | BCD      |    |    |   |  S   |   |
54 * |                                                                          |       |  |     =|  | RES*  | SHIFT  |  LED( )          |   | digit 4  |    |    |   |  I   |   |
55 * |                                                                          |       |  |     =|  |       |  '*'   |    CA2           v   |----------|    +----+   |  O   |   |
56 * |                                                                          | 6821  |  |     =|  |   PA3 |PA7 PA2 | PA1      PA0         |          |        +----|  N   |   |
57 * |                                                                          | PIA   |  |     =|  |----|--+-----|--+--|-----+--|---+    3 |          |    PB0-|LS  |      |   |
58 * |                                                                          |       |  |     =|  |    v  |     v  |  v     |  v   |      | BCD      |     PB7| 244|  C   |   |
59 * |                                                                          |       |  |     =|  | ADR   | RUN    | SST    | CON  | 1    | digit 3  |    --->|    |  O   |   |
60 * |                                                                          |       |  |     =|  |  0    |  4     |  8     |  C   |      |----------|        |    |  N   |   |
61 * |                                                                          |       |  |     =|  |-------+--------+--------+------+      |          |<-------|    |  N   |   |
62 * |                                                                          |       |  |     =|  |       |        |        |      |    4 |          |        +----|  E   |   |
63 * |                                                                          |       |  |     =|  | STA   | BPS    | USERV  |      | 2    | BCD      |             |  C   |   |
64 * |                                                                          |       |  |     =|  |  1    |  5     |  9     |  D   |      | digit 2  |             |  T   |   |
65 * |                                                                          |       |  |     =|  |-------+--------+--------+------+      |----------|             |  O   |   |
66 * |                                                                          |       |  |     =|  |       |        |        |      |      |          |             |  R   |   |
67 * |                                                                          |       |  |     =|  | EXF   | EXB    | MOV    | LOAD | 3  5 | BCD      |             |      |   |
68 * |                                                                          |       |  |     =|  |  2    |  6     |  A     |  E   |      | digit 1  |             |      |   |
69 * |                                                                          +-------+  |     =|  |-------+--------+--------+------+      |----------|             |      |   |
70 * |                                                                                     |     =|  |       |        |        |      |      |          |             |      |   |
71 * |                                                                                     +-----=|  | CLR   |  SP    | USERJ  | FLAG | 4  6 | BCD      |             |      |   |
72 * |                                                                                            |  |  3    |  7     |  B     |  F   |      | digit 0  |             |  ()  |   |
73 * |                                                                                            |  |-------+--------+--------+------+      +----------+             +------+   |
74 * |                                                                                            |  |                                                                           |
75 * |                                                                                            |  |                                                                           |
76 * |____________________________________________________________________________________________|  |___________________________________________________________________________|
4977 *
50 * The Didact Mp68A Keypad and Display board, tb16a, Anders Andersson 1979
51 *______________________________________________________
52 *                                        +oooo+        |
53 *                     6064    +-------+  |cass|        |
54 *                     +--+    | 9368  |  +----+    +--+|
55 * +-------+           |B |    +-------+            |  ||
56 * | 74132 |           |CD| 145                     |E ||
57 * +-------+           |DI| +--+               132  |X ||
58 * +------+------+     | S| |  |               +--+ |P ||
59 * |      |      |     | P| |  |               |  | |A ||
60 * | RES  |(led) |     +--+ |  |               |  | |N ||
61 * |      |  *   |          +--+               |  | |S ||
62 * +------+------+------+------+               +--+ |I ||
63 * |      |      |      |      |                    |O ||
64 * | ADR  | RUN  | SST  | REG  |                    |N ||
65 * |  0   |  4   |  8   |  C   |                    |  ||
66 * +------+------+------+------+                    |C ||
67 * |      |      |      |      |                    |O ||
68 * | STA  | STO  | BPR  | BPS  |                    |N ||
69 * |  1   |  5   |  9   |  D   |                    |N ||
70 * +------+------+------+------+           +------+ |E ||
71 * |      |      |      |      |           |      | |C ||
72 * | EXF  | EXB  | MOV  | PRM  |           |      | |T ||
73 * |  2   |  6   |  A   |  E   |           |      | |O ||
74 * +------+------+------+------+           | 6820 | |R ||
75 * |      |      |      |      |           | PIA  | |  ||
76 * | CLR  | REL  | REC  | PLA  |           |  #2  | |  ||
77 * |  3   |  7   |  B   |  F   |           |      | |  ||
78 * +------+------+------+------+           |      | |  ||
79 *  +-------+ +-------+  +------+          |      | |  ||
80 *  | 74148 | | 74148 |  | 7400 |          |      | |  ||
81 *  +-------+ +-------+  +------+          |      | +--+|
82 *                                         |      |     |
83 *        +---------+                      +------+  J1 |
84 *________|   ___   |___________________________________|
85 *        |  _|||_  |
86 *       /|_|     |_|\
87 *
88 *
8978 * History of Didact
9079 *------------------
9180 * Didact Läromedelsproduktion was started in Linköping in Sweden by Anders Andersson, Arne Kullbjer and
r252982r252983
9887 *
9988 * Misc links about the boards supported by this driver.
10089 *-----------------------------------------------------
101 * http://www.elektronikforumet.com/forum/viewtopic.php?f=11&t=51424
90 * http://elektronikforumet.com/forum/viewtopic.php?f=11&t=51424
10291 * http://kilroy71.fastmail.fm/gallery/Miscellaneous/20120729_019.jpg
10392 * http://elektronikforumet.com/forum/download/file.php?id=63988&mode=view
10493 * http://elektronikforumet.com/forum/viewtopic.php?f=2&t=79576&start=150#p1203915
10594 *
106 *  TODO:
107 *  Didact designs:    mp68a, md6802, Esselte 100, Candela
95 *   TODO:
96 *  Didact designs:    mp68a, md6802, md6802v3, Esselte 100, Candela
10897 * --------------------------------------------------------------------------
109 *  - Add PCB layouts   OK
98 *  - Add PCB layouts   OK     OK
11099 *  - Dump ROM:s,       OK     OK
111 *  - Keyboard          OK
112 *  - Display/CRT       OK
113 *  - Clickable Artwork RQ
114 *  - Sound             NA
100 *  - Keyboard          OK     OK
101 *  - Display/CRT       OK     OK
102 *  - Clickable Artwork RQ     RQ
103 *  - Sound             NA     NA
115104 *  - Cassette i/f
116105 *  - Expansion bus
117106 *  - Expansion overlay
118107 *
108 *  - The md6802 has a strange delay in keyboard input that needs to be investigated
109 *
119110 ****************************************************************************/
120111
121112#include "emu.h"
122113#include "cpu/m6800/m6800.h"
123114#include "machine/6821pia.h" // For all boards
124115#include "video/dm9368.h"    // For the mp68a
116#include "machine/74145.h"   // For the md6802
117// Generated artwork includes
118#include "mp68a.lh"
119#include "md6802.lh"
125120
126121#define VERBOSE 0
127122
128123#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
129#if VERBOSE == 2
124#if VERBOSE >= 2
130125#define logerror printf
131126#endif
132127
r252982r252983
136131#define FUNCNAME __PRETTY_FUNCTION__
137132#endif
138133
134/* Didact base class */
135class didact_state : public driver_device
136{
137 public:
138   didact_state(const machine_config &mconfig, device_type type, const char * tag)
139    : driver_device(mconfig, type, tag)
140      ,m_io_line0(*this, "LINE0")
141      ,m_io_line1(*this, "LINE1")
142      ,m_io_line2(*this, "LINE2")
143      ,m_io_line3(*this, "LINE3")
144      ,m_io_line4(*this, "LINE4")
145      ,m_line0(0)
146      ,m_line1(0)
147      ,m_line2(0)
148      ,m_line3(0)
149      ,m_reset(0)
150      ,m_shift(0)
151      ,m_led(0)
152      { }
153   required_ioport m_io_line0;
154   required_ioport m_io_line1;
155   required_ioport m_io_line2;
156   required_ioport m_io_line3;
157   required_ioport m_io_line4;
158   UINT8 m_line0;
159   UINT8 m_line1;
160   UINT8 m_line2;
161   UINT8 m_line3;
162   UINT8 m_reset;
163   UINT8 m_shift;
164   UINT8 m_led;
165   TIMER_DEVICE_CALLBACK_MEMBER(scan_artwork);
166};
167
139168/* Esselte 100 driver class */
140class e100_state : public driver_device
169class e100_state : public didact_state
141170{
142171 public:
143 e100_state(const machine_config &mconfig, device_type type, const char *tag)
144    : driver_device(mconfig, type, tag),
172   e100_state(const machine_config &mconfig, device_type type, const char * tag)
173    : didact_state(mconfig, type, tag),
145174      m_maincpu(*this, "maincpu"),
146175      m_pia1(*this, "pia1"),
147176      m_pia2(*this, "pia2")
148177      { }
149178   required_device<m6802_cpu_device> m_maincpu;
150
179   virtual void machine_reset() override { m_maincpu->reset(); LOG(("--->%s()\n", FUNCNAME)); };
151180protected:
152181   required_device<pia6821_device> m_pia1;
153182   required_device<pia6821_device> m_pia2;
154183};
155184
156185/* Mikrodator 6802 driver class */
157class md6802_state : public driver_device
186class md6802_state : public didact_state
158187{
159188 public:
160 md6802_state(const machine_config &mconfig, device_type type, const char *tag)
161    : driver_device(mconfig, type, tag),
162      m_maincpu(*this, "maincpu"),
163      m_pia1(*this, "pia1"),
164      m_pia2(*this, "pia2")
189   md6802_state(const machine_config &mconfig, device_type type, const char * tag)
190    : didact_state(mconfig, type, tag)
191      ,m_maincpu(*this, "maincpu")
192      ,m_tb16_74145(*this, "tb16_74145")
193      ,m_segments(0)
194      ,m_pia1(*this, "pia1")
195      ,m_pia2(*this, "pia2")
165196      { }
166197   required_device<m6802_cpu_device> m_maincpu;
198   required_device<ttl74145_device> m_tb16_74145;
199   UINT8 m_segments;
200   DECLARE_READ8_MEMBER( pia2_kbA_r );
201   DECLARE_WRITE8_MEMBER( pia2_kbA_w );
202   DECLARE_READ8_MEMBER( pia2_kbB_r );
203   DECLARE_WRITE8_MEMBER( pia2_kbB_w );
204   DECLARE_WRITE_LINE_MEMBER( pia2_ca2_w);
167205
206   virtual void machine_reset() override;
207   virtual void machine_start() override;
168208protected:
169209   required_device<pia6821_device> m_pia1;
170210   required_device<pia6821_device> m_pia2;
171211};
172212
213/* Keyboard */
214READ8_MEMBER( md6802_state::pia2_kbA_r )
215{
216   UINT8 ls145;
217   UINT8 pa = 0xff;
173218
219   // Read out the selected column
220   ls145 = m_tb16_74145->read() & 0x0f;
221
222   // read out the artwork, line04 is handled by the timer
223   m_line0 = m_io_line0->read();
224   m_line1 = m_io_line1->read();
225   m_line2 = m_io_line2->read();
226   m_line3 = m_io_line3->read();
227
228#if VERBOSE > 2
229   if ((m_line0 | m_line1 | m_line2 | m_line3) != 0)
230      LOG(("%s()-->%02x %02x %02x %02x modified by %02x displaying %02x\n", FUNCNAME, m_line0, m_line1, m_line2, m_line3, m_shift, ls145));
231#endif
232
233    // Mask out those rows that has a button pressed
234   pa &= ~(((~m_line0 & ls145 ) != 0) ? 1 : 0);
235   pa &= ~(((~m_line1 & ls145 ) != 0) ? 2 : 0);
236   pa &= ~(((~m_line2 & ls145 ) != 0) ? 4 : 0);
237   pa &= ~(((~m_line3 & ls145 ) != 0) ? 8 : 0);
238
239   if (m_shift)
240   {
241      pa &= 0x7f;     // Clear shift bit if button being pressed (PA7) to ground (internal pullup)
242      LOG( ("SHIFT is pressed\n") );
243   }
244
245#if VERBOSE > 2
246   if ((m_line0 | m_line1 | m_line2 | m_line3) != 0)
247      LOG(("%s()-->LINE: 0:%02x 1:%02x 2:%02x 3:%02x SHIFT:%02x LS145:%02x PA:%02x\n", FUNCNAME, m_line0, m_line1, m_line2, m_line3, m_shift, ls145, pa));
248#endif
249
250   return pa;
251}
252
253/* Pull the cathodes low enabling the correct digit and lit the segments held by port B */
254WRITE8_MEMBER( md6802_state::pia2_kbA_w )
255{
256   UINT8 digit_nbr;
257
258//   LOG(("--->%s(%02x)\n", FUNCNAME, data));
259
260   digit_nbr = (data >> 4) & 0x07;
261    m_tb16_74145->write( digit_nbr );
262   if (digit_nbr < 6)
263   {
264      output().set_digit_value( digit_nbr, m_segments);
265   }
266}
267
268/* PIA 2 Port B is all outputs to drive the display so it is very unlikelly that this function is called */
269READ8_MEMBER( md6802_state::pia2_kbB_r )
270{
271    LOG( ("Warning, trying to read from Port B designated to drive the display, please check why\n") );
272    logerror("Warning, trying to read from Port B designated to drive the display, please check why\n");
273   return 0;
274}
275
276/* Port B is fully used ouputting the segment pattern to the display */
277WRITE8_MEMBER( md6802_state::pia2_kbB_w )
278{
279//   LOG(("--->%s(%02x)\n", FUNCNAME, data));
280
281   /* Store the segment pattern but do not lit up the digit here, done by pulling the correct cathode low on Port A */
282   m_segments = BITSWAP8(data, 0, 4, 5, 3, 2, 1, 7, 6);
283}
284
285WRITE_LINE_MEMBER( md6802_state::pia2_ca2_w )
286{
287   LOG(("--->%s(%02x) LED is connected through resisitor to +5v so logical 0 will lit it\n", FUNCNAME, state));
288   output().set_led_value(m_led, !state);
289   m_shift = !state;
290}
291
292void md6802_state::machine_start()
293{
294   LOG(("--->%s()\n", FUNCNAME));
295   save_item(NAME(m_shift));
296   save_item(NAME(m_led));
297   save_item(NAME(m_reset));
298}
299
300void md6802_state::machine_reset()
301{
302   LOG(("--->%s()\n", FUNCNAME));
303   m_led = 1;
304   m_maincpu->reset();
305}
306
174307/* Didact mp68a driver class */
308
175309// Just a statement that the real mp68a hardware was designed with 6820 and not 6821
176310// They are functional equivalents BUT has different electrical characteristics.
177311#define pia6820_device pia6821_device
178312#define PIA6820 PIA6821
179class mp68a_state : public driver_device
313class mp68a_state : public didact_state
180314{
181315 public:
182 mp68a_state(const machine_config &mconfig, device_type type, const char *tag)
183    : driver_device(mconfig, type, tag)
184       ,m_maincpu(*this, "maincpu")
185      ,m_io_line0(*this, "LINE0")
186      ,m_io_line1(*this, "LINE1")
187      ,m_io_line2(*this, "LINE2")
188      ,m_io_line3(*this, "LINE3")
189      ,m_io_line4(*this, "LINE4")
190      ,m_line0(0)
191      ,m_line1(0)
192      ,m_line2(0)
193      ,m_line3(0)
194      ,m_shift(0)
316   mp68a_state(const machine_config &mconfig, device_type type, const char * tag)
317    : didact_state(mconfig, type, tag)
318      ,m_maincpu(*this, "maincpu")
195319      ,m_digit0(*this, "digit0")
196320      ,m_digit1(*this, "digit1")
197321      ,m_digit2(*this, "digit2")
r252982r252983
204328
205329   required_device<m6800_cpu_device> m_maincpu;
206330
207   required_ioport m_io_line0;
208   required_ioport m_io_line1;
209   required_ioport m_io_line2;
210   required_ioport m_io_line3;
211   required_ioport m_io_line4;
212   UINT8 m_line0;
213   UINT8 m_line1;
214   UINT8 m_line2;
215   UINT8 m_line3;
216   UINT8 m_shift;
217
218   // The display segment driver device
331   // The display segment driver device (there is actually just one, needs rewrite to be correct)
219332   required_device<dm9368_device> m_digit0;
220333   required_device<dm9368_device> m_digit1;
221334   required_device<dm9368_device> m_digit2;
r252982r252983
229342   DECLARE_WRITE8_MEMBER( pia2_kbB_w );
230343   DECLARE_READ_LINE_MEMBER( pia2_cb1_r );
231344
345   virtual void machine_reset() override;
232346   virtual void machine_start() override;
233   TIMER_DEVICE_CALLBACK_MEMBER(scan_artwork);
234347protected:
235348   required_device<pia6820_device> m_pia1;
236349   required_device<pia6820_device> m_pia2;
r252982r252983
245358
246359WRITE8_MEMBER( mp68a_state::pia2_kbA_w )
247360{
248   UINT8 m_lednum;
361   UINT8 digit_nbr;
249362
250363#if VERBOSE > 1
251364   static UINT8 display[] = {' ',' ',' ',' ',' ',' ',' ',' ','\0'};
r252982r252983
254367
255368   /* Display memory is at $702 to $708 in AAAADD format (A=address digit, D=Data digit)
256369      but we are using data read from the port. */
257   m_lednum = (data >> 4) & 0x07;
370   digit_nbr = (data >> 4) & 0x07;
258371
259   switch (m_lednum)
372    /* There is actually only one 9368 and a 74145 to drive the cathode of the right digit low */
373    /* This can be emulated by prentending there are one 9368 per digit, at least for now      */
374   switch (digit_nbr)
260375   {
261376   case 0: m_digit0->a_w(data & 0x0f); break;
262377   case 1: m_digit1->a_w(data & 0x0f); break;
r252982r252983
265380   case 4: m_digit4->a_w(data & 0x0f); break;
266381   case 5: m_digit5->a_w(data & 0x0f); break;
267382   case 7: break; // used as an 'unselect' by the ROM between digit accesses.
268   default: logerror("Wrong digit index %d\n", m_lednum);
383   default: logerror("Invalid digit index %d\n", digit_nbr);
269384   }
270385
271386#if VERBOSE > 1
r252982r252983
277392READ8_MEMBER( mp68a_state::pia2_kbB_r )
278393{
279394   UINT8 a012, line, pb;
280   
395
281396   LOG(("--->%s %02x %02x %02x %02x %02x => ", FUNCNAME, m_line0, m_line1, m_line2, m_line3, m_shift));
282397
283398   a012 = 0;
r252982r252983
294409   }
295410
296411   pb   = a012;        // A0-A2 -> PB0-PB3
412
297413   if (m_shift)
298414   {
299415      pb |= 0x80;     // Set shift bit (PB7)
300416      m_shift = 0;  // Reset flip flop
301      output().set_led_value(0, m_shift);
417      output().set_led_value(m_led, m_shift);
302418      LOG( ("SHIFT is released\n") );
303419   }
304420
r252982r252983
327443   return (m_line0 | m_line1 | m_line2 | m_line3) != 0 ? 0 : 1;
328444}
329445
446void mp68a_state::machine_reset()
447{
448   LOG(("--->%s()\n", FUNCNAME));
449   m_maincpu->reset();
450}
451
330452void mp68a_state::machine_start()
331453{
332454   LOG(("--->%s()\n", FUNCNAME));
333455
334456   /* register for state saving */
335457   save_item(NAME(m_shift));
458   save_item(NAME(m_led));
459   save_item(NAME(m_reset));
336460}
337461
338462// This map is derived from info in "TEMAL 100 - teknisk manual Esselte 100"
r252982r252983
341465   AM_RANGE(0xc000, 0xc3ff) AM_RAM AM_SHARE("videoram")
342466   AM_RANGE(0xc808, 0xc80b) AM_DEVREADWRITE("pia1", pia6821_device, read, write)
343467   AM_RANGE(0xc810, 0xc813) AM_DEVREADWRITE("pia2", pia6821_device, read, write)
344   AM_RANGE(0xd000, 0xffff) AM_ROM AM_REGION("maincpu", 0xd0000)
468   AM_RANGE(0xd000, 0xffff) AM_ROM AM_REGION("maincpu", 0xd000)
345469ADDRESS_MAP_END
346470
347471// This address map is traced from schema
r252982r252983
366490INPUT_PORTS_END
367491
368492static INPUT_PORTS_START( md6802 )
493   PORT_START("LINE0") /* KEY ROW 0 */
494   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)   PORT_CHAR('0')
495   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)   PORT_CHAR('1')
496   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)   PORT_CHAR('2')
497   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)   PORT_CHAR('3')
498   PORT_BIT(0xf0, 0x00, IPT_UNUSED )
499
500   PORT_START("LINE1") /* KEY ROW 1 */
501   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)   PORT_CHAR('4')
502   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)   PORT_CHAR('5')
503   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)   PORT_CHAR('6')
504   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)   PORT_CHAR('7')
505   PORT_BIT(0xf0, 0x00, IPT_UNUSED )
506
507   PORT_START("LINE2") /* KEY ROW 2 */
508   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)   PORT_CHAR('8')
509   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)   PORT_CHAR('9')
510   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)   PORT_CHAR('A')
511   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)   PORT_CHAR('B')
512   PORT_BIT(0xf0, 0x00, IPT_UNUSED )
513
514   PORT_START("LINE3") /* KEY ROW 3 */
515   PORT_BIT(0x01, 0x01, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)   PORT_CHAR('C')
516   PORT_BIT(0x02, 0x02, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)   PORT_CHAR('D')
517   PORT_BIT(0x04, 0x04, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)   PORT_CHAR('E')
518   PORT_BIT(0x08, 0x08, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)   PORT_CHAR('F')
519   PORT_BIT(0xf0, 0x00, IPT_UNUSED )
520
521   PORT_START("LINE4") /* Special KEY ROW for reset and Shift/'*' keys */
522   PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("*") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR('*')
523   PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F12)
524   PORT_BIT(0xf3, 0x00, IPT_UNUSED )
369525INPUT_PORTS_END
370526
371527static INPUT_PORTS_START( mp68a )
r252982r252983
403559   PORT_BIT(0xf3, IP_ACTIVE_HIGH, IPT_UNUSED )
404560INPUT_PORTS_END
405561
406TIMER_DEVICE_CALLBACK_MEMBER(mp68a_state::scan_artwork)
562TIMER_DEVICE_CALLBACK_MEMBER(didact_state::scan_artwork)
407563{
408564   //   LOG(("--->%s()\n", FUNCNAME));
409565
r252982r252983
412568   {
413569      LOG( ("RESET is pressed, resetting the CPU\n") );
414570      m_shift = 0;
415      output().set_led_value(0, m_shift);
416      m_maincpu->reset();
417     
571      output().set_led_value(m_led, m_shift); // For mp68a only
572      if (m_reset == 0)
573      {
574         machine_reset();
575      }
576      m_reset = 1; // Inhibit multiple resets
418577   }
419578
420579    // Poll the artwork SHIFT/* key
421580   else if ( (m_io_line4->read() & 0x08) )
422581   {
423      LOG( ("SHIFT is set\n") );
582      LOG( ("%s", !m_shift ? "SHIFT is set\n" : "") );
424583      m_shift = 1;
425      output().set_led_value(0, m_shift);
584      output().set_led_value(m_led, m_shift); // For mp68a only
426585   }
586   else
587   {
588      if (m_reset == 1)
589      {
590         m_reset = 0; // Enable reset again
591      }
592   }
427593}
428594
429595static MACHINE_CONFIG_START( e100, e100_state )
r252982r252983
438604static MACHINE_CONFIG_START( md6802, md6802_state )
439605   MCFG_CPU_ADD("maincpu", M6802, XTAL_4MHz/4)
440606   MCFG_CPU_PROGRAM_MAP(md6802_map)
607   MCFG_DEFAULT_LAYOUT(layout_md6802)
441608
442   /* devices */
609   /* Devices */
610   MCFG_DEVICE_ADD("tb16_74145", TTL74145, 0)
611   /* PIA #1 0xA000-0xA003 - used differently by laborations and loaded software */
443612   MCFG_DEVICE_ADD("pia1", PIA6821, 0)
613
614   /* PIA #2 Keyboard & Display 0xC000-0xC003 */
444615   MCFG_DEVICE_ADD("pia2", PIA6821, 0)
616   /* --init----------------------- */
617   /* 0xE007 0xC002 (DDR B)     = 0xFF - Port B all outputs and set to 0 (zero) */
618   /* 0xE00B 0xC000 (DDR A)     = 0x70 - Port A three outputs and set to 0 (zero) */
619   /* 0xE00F 0xC001 (Control A) = 0x3C - */
620   /* 0xE013 0xC003 (Control B) = 0x3C - */
621   /* --execution-wait for key loop-- */
622   /* 0xE026 0xC000             = (Reading Port A)  */
623   /* 0xE033 0xC000             = (Reading Port A)  */
624   /* 0xE068 0xC000 (Port A)    = 0x60 */
625   /* 0xE08A 0xC002 (Port B)    = 0xEE - updating display */
626   /* 0xE090 0xC000 (Port A)    = 0x00 - looping in 0x10,0x20,0x30,0x40,0x50 */
627   MCFG_PIA_WRITEPA_HANDLER(WRITE8(md6802_state, pia2_kbA_w))
628   MCFG_PIA_READPA_HANDLER(READ8(md6802_state, pia2_kbA_r))
629   MCFG_PIA_WRITEPB_HANDLER(WRITE8(md6802_state, pia2_kbB_w))
630   MCFG_PIA_READPB_HANDLER(READ8(md6802_state, pia2_kbB_r))
631   MCFG_PIA_CA2_HANDLER(WRITELINE(md6802_state, pia2_ca2_w))
632   MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", md6802_state, scan_artwork, attotime::from_hz(10))
445633MACHINE_CONFIG_END
446634
447635static MACHINE_CONFIG_START( mp68a, mp68a_state )
448   MCFG_CPU_ADD("maincpu", M6800, XTAL_4MHz/4)
636   // Clock source is based on a N9602N Dual Retriggerable Resettable Monostable Multivibrator oscillator at aprox 505KHz.
637   // Trimpot seems broken/stuck at 5K Ohm thu. ROM code 1Ms delay loops suggest 1MHz+
638   MCFG_CPU_ADD("maincpu", M6800, 505000)
449639   MCFG_CPU_PROGRAM_MAP(mp68a_map)
640   MCFG_DEFAULT_LAYOUT(layout_mp68a)
450641
451642   /* Devices */
452643   /* PIA #1 0x500-0x503 - used differently by laborations and loaded software */
r252982r252983
458649   /* 0x0BAF 0x601 (Control A) = 0x30 - CA2 is low and enable DDRA */
459650   /* 0x0BB1 0x603 (Control B) = 0x30 - CB2 is low and enable DDRB */
460651   /* 0x0BB5 0x600 (DDR A)      = 0xFF - Port A all outputs and set to 0 (zero) */
461   /* 0x0BB9 0x602 (DDR B)      = 0x50 - Port B two outputs and set to 0 (zero9 */
652   /* 0x0BB9 0x602 (DDR B)      = 0x50 - Port B two outputs and set to 0 (zero) */
462653   /* 0x0BBD 0x601 (Control A) = 0x34 - CA2 is low and lock DDRA */
463654   /* 0x0BBF 0x603 (Control B) = 0x34 - CB2 is low and lock DDRB */
464655   /* 0x0BC3 0x602 (Port B)   = 0x40 - Turn on display via RBI* on  */
r252982r252983
500691   MCFG_OUTPUT_INDEX(5)
501692
502693   MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", mp68a_state, scan_artwork, attotime::from_hz(10))
503
504694MACHINE_CONFIG_END
505695
506696// TODO: Get a ROM set
r252982r252983
518708ROM_START( md6802 ) // ROM image from http://elektronikforumet.com/forum/viewtopic.php?f=2&t=79576&start=135#p1203640
519709   ROM_REGION(0x10000, "maincpu", 0)
520710   ROM_LOAD( "DIDACT.bin", 0xe000, 0x0800, CRC(50430b1d) SHA1(8e2172a9ae95b04f20aa14177df2463a286c8465) )
521//   ROM_LOAD( "md6802-1.bin", 0xf800, 0xf9ff, CRC(0ff53e1f) SHA1(52002ee22c032775dac383d408c44abe9244724f) )
522//   ROM_LOAD( "md6802-2.bin", 0xfa00, 0xfbff, CRC(0ff53e1f) SHA1(52002ee22c032775dac383d408c44abe9244724f) )
523//   ROM_LOAD( "md6802-3.bin", 0xfc00, 0xfdff, CRC(0ff53e1f) SHA1(52002ee22c032775dac383d408c44abe9244724f) )
524//   ROM_LOAD( "md6802-4.bin", 0xfe00, 0xffff, CRC(0ff53e1f) SHA1(52002ee22c032775dac383d408c44abe9244724f) )
525711ROM_END
526712
527713ROM_START( mp68a ) // ROM image from http://elektronikforumet.com/forum/viewtopic.php?f=2&t=79576&start=135#p1203640
r252982r252983
533719//    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT   CLASS            INIT        COMPANY             FULLNAME           FLAGS
534720COMP( 1979, mp68a,       0,          0,      mp68a,      mp68a,  driver_device,   0,          "Didact AB",        "mp68a",           MACHINE_NO_SOUND_HW )
535721COMP( 1982, e100,       0,          0,      e100,       e100,   driver_device,   0,          "Didact AB",        "Esselte 100",     MACHINE_IS_SKELETON )
536COMP( 1983, md6802,       0,          0,      md6802,     md6802, driver_device,   0,          "Didact AB",        "Mikrodator 6802", MACHINE_IS_SKELETON )
722COMP( 1983, md6802,       0,          0,      md6802,     md6802, driver_device,   0,          "Didact AB",        "Mikrodator 6802", MACHINE_NO_SOUND_HW )
trunk/src/mame/drivers/fidel6502.cpp
r252982r252983
66    See drivers/fidelz80.cpp for hardware description
77
88    TODO:
9    - speech doesn't work
9    - x
1010
1111******************************************************************************/
1212
1313#include "emu.h"
1414#include "cpu/m6502/m6502.h"
15#include "cpu/m6502/r65c02.h"
16#include "cpu/m6502/m65sc02.h"
1517#include "machine/6821pia.h"
18#include "sound/speaker.h"
1619
1720#include "includes/fidelz80.h"
1821
22// internal artwork
23#include "fidel_sc12.lh"
24#include "fidel_fev.lh"
1925
26extern const char layout_fidel_vsc[]; // same layout as fidelz80/vsc
2027
21// same layout of Sensory Chess Challenger
22//extern const char layout_vsc[];
2328
2429class fidel6502_state : public fidelz80base_state
2530{
2631public:
2732   fidel6502_state(const machine_config &mconfig, device_type type, const char *tag)
2833      : fidelz80base_state(mconfig, type, tag),
29      m_6821pia(*this, "6821pia")
34      m_6821pia(*this, "6821pia"),
35      m_speaker(*this, "speaker")
3036   { }
3137
3238   // devices/pointers
3339   optional_device<pia6821_device> m_6821pia;
40   optional_device<speaker_sound_device> m_speaker;
3441
35   UINT16 input_read(int index);
36   DECLARE_WRITE8_MEMBER( pia0_pa_w );
37   DECLARE_WRITE8_MEMBER( pia0_pb_w );
38   DECLARE_READ8_MEMBER( pia0_pb_r );
39   DECLARE_WRITE_LINE_MEMBER( pia0_ca2_w );
40   DECLARE_WRITE8_MEMBER( pia1_pa_w );
41   DECLARE_WRITE8_MEMBER( pia1_pb_w );
42   DECLARE_READ8_MEMBER( pia1_pa_r );
43   DECLARE_WRITE_LINE_MEMBER( pia1_ca2_w );
44   DECLARE_WRITE_LINE_MEMBER( pia1_cb2_w );
45   DECLARE_READ_LINE_MEMBER( pia1_ca1_r );
46   DECLARE_READ_LINE_MEMBER( pia1_cb1_r );
42   // model CSC
43   void csc_prepare_display();
44   DECLARE_READ8_MEMBER(csc_speech_r);
45   DECLARE_WRITE8_MEMBER(csc_pia0_pa_w);
46   DECLARE_WRITE8_MEMBER(csc_pia0_pb_w);
47   DECLARE_READ8_MEMBER(csc_pia0_pb_r);
48   DECLARE_WRITE_LINE_MEMBER(csc_pia0_ca2_w);
49   DECLARE_WRITE8_MEMBER(csc_pia1_pa_w);
50   DECLARE_WRITE8_MEMBER(csc_pia1_pb_w);
51   DECLARE_READ8_MEMBER(csc_pia1_pa_r);
52   DECLARE_WRITE_LINE_MEMBER(csc_pia1_ca2_w);
53   DECLARE_WRITE_LINE_MEMBER(csc_pia1_cb2_w);
54   DECLARE_READ_LINE_MEMBER(csc_pia1_ca1_r);
55   DECLARE_READ_LINE_MEMBER(csc_pia1_cb1_r);
4756
48   UINT8 m_selector;
4957   TIMER_DEVICE_CALLBACK_MEMBER(irq_timer);
5058
5159protected:
r252982r252983
5462
5563
5664
65// Devices, I/O
5766
67/******************************************************************************
68    CSC
69******************************************************************************/
5870
59UINT16 fidel6502_state::input_read(int index)
71// misc handlers
72
73void fidel6502_state::csc_prepare_display()
6074{
61   static const char *const col_tag[] =
75   // 7442 output, also update input mux (9 is unused)
76   m_inp_mux = (1 << m_led_select) & 0x1ff;
77   
78   // 4 7seg leds + H
79   for (int i = 0; i < 4; i++)
6280   {
63      "IN.0", "IN.1", "IN.2", "IN.3", "IN.4",
64      "IN.5", "IN.6", "IN.7", "IN.8"
65   };
81      m_display_segmask[i] = 0x7f;
82      m_display_state[i] = (m_inp_mux >> i & 1) ? m_7seg_data : 0;
83   }
84   
85   // 8*8 chessboard leds
86   for (int i = 0; i < 8; i++)
87      m_display_state[i+4] = (m_inp_mux >> i & 1) ? m_led_data : 0;
6688
67   return ioport(col_tag[index])->read();
89   set_display_size(8, 12);
90   display_update();
6891}
6992
70
71WRITE8_MEMBER( fidel6502_state::pia0_pa_w )
93READ8_MEMBER(fidel6502_state::csc_speech_r)
7294{
73   UINT8 out_digit = BITSWAP8(data,0,1,5,6,7,2,3,4 );
95   return m_speech_rom[m_speech_bank << 12 | offset];
96}
7497
75   switch (m_selector)
76   {
77   case 0:
78      output().set_digit_value(0, out_digit & 0x7f);
79      output().set_value("pm_led", BIT(out_digit, 7));
80      break;
81   case 1:
82      output().set_digit_value(1, out_digit & 0x7f);
83      break;
84   case 2:
85      output().set_digit_value(2, out_digit & 0x7f);
86      output().set_value("up_dot", BIT(out_digit, 7));
87      break;
88   case 3:
89      output().set_digit_value(3, out_digit & 0x7f);
90      output().set_value("low_dot", BIT(out_digit, 7));
91      break;
92   }
9398
94//  m_speech->data_w(space, 0, data & 0x3f);
99// 6821 PIA 0
95100
96   // for avoid the digit flashing
97   m_selector |= 0x80;
101WRITE8_MEMBER(fidel6502_state::csc_pia0_pa_w)
102{
103   // d0-d5: TSI C0-C5
104   m_speech->data_w(space, 0, data & 0x3f);
105
106   // d0-d7: data for the 4 7seg leds, bits are ABFGHCDE (H is extra led)
107   m_7seg_data = BITSWAP8(data,0,1,5,6,7,2,3,4);
108   csc_prepare_display();
98109}
99110
100WRITE8_MEMBER( fidel6502_state::pia0_pb_w )
111WRITE8_MEMBER(fidel6502_state::csc_pia0_pb_w)
101112{
102//  m_speech->start_w(BIT(data, 1));
113   // d0: speech ROM A12
114   m_speech->force_update(); // update stream to now
115   m_speech_bank = data & 1;
116
117   // d1: TSI START line
118   m_speech->start_w(data >> 1 & 1);
119
120   // d4: tone line
121   m_speaker->level_w(data >> 4 & 1);
103122}
104123
105READ8_MEMBER( fidel6502_state::pia0_pb_r )
124READ8_MEMBER(fidel6502_state::csc_pia0_pb_r)
106125{
126   // d2: printer?
107127   UINT8 data = 0x04;
108128
109   if(m_speech->busy_r())
129   // d3: TSI BUSY line
130   if (m_speech->busy_r())
110131      data |= 0x08;
111132
112   if (m_selector<9)
113      if (input_read(m_selector) & 0x100)
114         data |= 0x20;
133   // d5: button row 8 (active low)
134   if (!(read_inputs(9) & 0x100))
135      data |= 0x20;
136   
137   // d6,d7: language switches
138   data|=0xc0;
115139
116140   return data;
117141}
118142
119WRITE_LINE_MEMBER( fidel6502_state::pia0_ca2_w )
143WRITE_LINE_MEMBER(fidel6502_state::csc_pia0_ca2_w)
120144{
145   // printer?
121146}
122147
123WRITE8_MEMBER( fidel6502_state::pia1_pa_w )
148
149// 6821 PIA 1
150
151READ8_MEMBER(fidel6502_state::csc_pia1_pa_r)
124152{
125   m_selector = (m_selector & 0x0c) | ((data>>6) & 0x03);
153   // d0-d5: button row 0-5 (active low)
154   return (read_inputs(9) & 0x3f) ^ 0xff;
126155}
127156
128WRITE8_MEMBER( fidel6502_state::pia1_pb_w )
157WRITE8_MEMBER(fidel6502_state::csc_pia1_pa_w)
129158{
130   static const char *const row_tag[] =
131   {
132      "led_a", "led_b", "led_c", "led_d",
133      "led_e", "led_f", "led_g", "led_h"
134   };
135
136   if (m_selector < 8)
137      for (int i=0; i<8; i++)
138         output().set_indexed_value(row_tag[m_selector], i+1, BIT(data, 7-i));
159   // d6,d7: 7442 A0,A1
160   m_led_select = (m_led_select & ~3) | (data >> 6 & 3);
161   csc_prepare_display();
139162}
140163
141READ8_MEMBER( fidel6502_state::pia1_pa_r )
164WRITE8_MEMBER(fidel6502_state::csc_pia1_pb_w)
142165{
143   UINT8 data = 0xff;
144
145   if (m_selector<9)
146      data = input_read(m_selector);
147
148   return data & 0x3f;
166   // d0-d7: led row data
167   m_led_data = data;
168   csc_prepare_display();
149169}
150170
151WRITE_LINE_MEMBER( fidel6502_state::pia1_ca2_w )
171READ_LINE_MEMBER(fidel6502_state::csc_pia1_ca1_r)
152172{
153   m_selector = (m_selector & 0x07) | (state ? 8 : 0);
173   // button row 6 (active low)
174   return ~read_inputs(9) >> 6 & 1;
154175}
155176
156WRITE_LINE_MEMBER( fidel6502_state::pia1_cb2_w )
177READ_LINE_MEMBER(fidel6502_state::csc_pia1_cb1_r)
157178{
158   m_selector = (m_selector & 0x0b) | (state ? 4 : 0);
179   // button row 7 (active low)
180   return ~read_inputs(9) >> 7 & 1;
159181}
160182
161READ_LINE_MEMBER( fidel6502_state::pia1_ca1_r )
183WRITE_LINE_MEMBER(fidel6502_state::csc_pia1_cb2_w)
162184{
163   int data = 0x01;
164
165   if (m_selector<9)
166      data = BIT(input_read(m_selector), 6);
167
168   return data;
185   // 7442 A2
186   m_led_select = (m_led_select & ~4) | (state ? 4 : 0);
187   csc_prepare_display();
169188}
170189
171READ_LINE_MEMBER( fidel6502_state::pia1_cb1_r )
190WRITE_LINE_MEMBER(fidel6502_state::csc_pia1_ca2_w)
172191{
173   int data = 0x01;
192   // 7442 A3
193   m_led_select = (m_led_select & ~8) | (state ? 8 : 0);
194   csc_prepare_display();
195}
174196
175   if (m_selector<9)
176      data = BIT(input_read(m_selector),7);
177197
178   return data;
179}
180198
181199
182200TIMER_DEVICE_CALLBACK_MEMBER(fidel6502_state::irq_timer)
r252982r252983
184202   m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
185203}
186204
187/* Address maps */
188static ADDRESS_MAP_START(csc_mem, AS_PROGRAM, 8, fidel6502_state)
205/******************************************************************************
206    Address Maps
207******************************************************************************/
208
209static ADDRESS_MAP_START( csc_map, AS_PROGRAM, 8, fidel6502_state )
189210   ADDRESS_MAP_UNMAP_HIGH
190   AM_RANGE( 0x0000, 0x07ff) AM_RAM AM_MIRROR(0x4000)  //2K RAM
191   AM_RANGE( 0x0800, 0x0bff) AM_RAM AM_MIRROR(0x4400)  //1K RAM
192   AM_RANGE( 0x1000, 0x1003) AM_DEVREADWRITE("pia0", pia6821_device, read, write) AM_MIRROR(0x47fc)
193   AM_RANGE( 0x1800, 0x1803) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x47fc)
194   AM_RANGE( 0x2000, 0x3fff) AM_ROM  AM_MIRROR(0x4000)
195   AM_RANGE( 0x8000, 0x9fff) AM_NOP
196   AM_RANGE( 0xa000, 0xffff) AM_ROM
211   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_MIRROR(0x4000)
212   AM_RANGE(0x0800, 0x0bff) AM_RAM AM_MIRROR(0x4400)
213   AM_RANGE(0x1000, 0x1003) AM_DEVREADWRITE("pia0", pia6821_device, read, write) AM_MIRROR(0x47fc)
214   AM_RANGE(0x1800, 0x1803) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x47fc)
215   AM_RANGE(0x2000, 0x3fff) AM_ROM AM_MIRROR(0x4000)
216   AM_RANGE(0xa000, 0xffff) AM_ROM
197217ADDRESS_MAP_END
198218
199/* Input ports */
219
220static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state )
221   ADDRESS_MAP_UNMAP_HIGH
222   AM_RANGE(0x0000, 0x0fff) AM_RAM
223   AM_RANGE(0x8000, 0x9fff) AM_ROM
224   AM_RANGE(0xc000, 0xcfff) AM_ROM AM_MIRROR(0x1000)
225   AM_RANGE(0xe000, 0xffff) AM_ROM
226ADDRESS_MAP_END
227
228static ADDRESS_MAP_START( fev_map, AS_PROGRAM, 8, fidel6502_state )
229   ADDRESS_MAP_UNMAP_HIGH
230   AM_RANGE(0x0000, 0x1fff) AM_RAM
231   AM_RANGE(0x8000, 0xffff) AM_ROM
232ADDRESS_MAP_END
233
234
235/******************************************************************************
236    Input Ports
237******************************************************************************/
238
200239static INPUT_PORTS_START( csc )
201240   PORT_START("IN.0")
202   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
203   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
204   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
205   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
206   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
207   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
208   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
209   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
210   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Speak") PORT_CODE(KEYCODE_SPACE)
241   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
242   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
243   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
244   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
245   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
246   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
247   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
248   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
249   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speak") PORT_CODE(KEYCODE_SPACE)
211250
212251   PORT_START("IN.1")
213   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
214   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
215   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
216   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
217   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
218   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
219   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
220   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
221   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("RV")   PORT_CODE(KEYCODE_V)
252   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
253   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
254   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
255   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
256   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
257   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
258   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
259   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
260   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RV") PORT_CODE(KEYCODE_V)
222261
223262   PORT_START("IN.2")
224   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
225   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
226   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
227   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
228   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
229   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
230   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
231   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
232   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("TM")   PORT_CODE(KEYCODE_T)
263   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
264   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
265   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
266   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
267   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
268   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
269   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
270   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
271   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TM") PORT_CODE(KEYCODE_T)
233272
234273   PORT_START("IN.3")
235   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
236   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
237   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
238   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
239   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
240   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
241   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
242   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
243   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LV")   PORT_CODE(KEYCODE_L)
274   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
275   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
276   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
277   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
278   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
279   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
280   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
281   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
282   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L) // level
244283
245284   PORT_START("IN.4")
246   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
247   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
248   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
249   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
250   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
251   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
252   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
253   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
254   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("DM")   PORT_CODE(KEYCODE_M)
285   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
286   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
287   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
288   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
289   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
290   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
291   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
292   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
293   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M)
255294
256295   PORT_START("IN.5")
257   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
258   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
259   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
260   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
261   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
262   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
263   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
264   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
265   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ST")   PORT_CODE(KEYCODE_S)
296   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
297   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
298   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
299   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
300   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
301   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
302   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
303   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
304   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ST") PORT_CODE(KEYCODE_S)
266305
267306   PORT_START("IN.6")
268   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
269   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
270   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
271   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
272   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
273   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
274   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
275   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
276   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
307   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
308   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
309   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
310   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
311   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
312   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
313   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
314   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
315   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED)
277316
278317   PORT_START("IN.7")
279   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD)
280   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD)
281   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD)
282   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD)
283   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD)
284   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD)
285   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD)
286   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD)
287   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
318   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD)
319   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD)
320   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD)
321   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD)
322   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD)
323   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD)
324   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD)
325   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD)
326   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED)
288327
289328   PORT_START("IN.8")
290   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Pawn")     PORT_CODE(KEYCODE_1)
291   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Rook")     PORT_CODE(KEYCODE_2)
292   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Knight")   PORT_CODE(KEYCODE_3)
293   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Bishop")   PORT_CODE(KEYCODE_4)
294   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Queen")    PORT_CODE(KEYCODE_5)
295   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("King")     PORT_CODE(KEYCODE_6)
296   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL")       PORT_CODE(KEYCODE_DEL)
297   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("RE")       PORT_CODE(KEYCODE_R)
298   PORT_BIT(0x100,IP_ACTIVE_LOW, IPT_UNUSED) PORT_UNUSED
329   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn") PORT_CODE(KEYCODE_1)
330   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook") PORT_CODE(KEYCODE_2)
331   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight") PORT_CODE(KEYCODE_3)
332   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop") PORT_CODE(KEYCODE_4)
333   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen") PORT_CODE(KEYCODE_5)
334   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6)
335   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) // clear
336   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) // reset
337   PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_UNUSED
299338INPUT_PORTS_END
300339
301340
302341void fidel6502_state::machine_start()
303342{
304343   fidelz80base_state::machine_start();
305   save_item(NAME(m_selector));
306344}
307345
308/* Machine driver */
346
347/******************************************************************************
348    Machine Drivers
349******************************************************************************/
350
309351static MACHINE_CONFIG_START( csc, fidel6502_state )
352
310353   /* basic machine hardware */
311354   MCFG_CPU_ADD("maincpu", M6502, 3900000/2)
312   MCFG_CPU_PROGRAM_MAP(csc_mem)
355   MCFG_CPU_PROGRAM_MAP(csc_map)
313356
314   //MCFG_DEFAULT_LAYOUT(layout_vsc)
315357
316358   MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", fidel6502_state, irq_timer, attotime::from_hz(38400/64))
317359
318360   MCFG_DEVICE_ADD("pia0", PIA6821, 0)
319   MCFG_PIA_READPB_HANDLER(READ8(fidel6502_state, pia0_pb_r))
320   MCFG_PIA_WRITEPA_HANDLER(WRITE8(fidel6502_state, pia0_pa_w))
321   MCFG_PIA_WRITEPB_HANDLER(WRITE8(fidel6502_state, pia0_pb_w))
322   MCFG_PIA_CA2_HANDLER(WRITELINE(fidel6502_state, pia0_ca2_w))
361   MCFG_PIA_READPB_HANDLER(READ8(fidel6502_state, csc_pia0_pb_r))
362   MCFG_PIA_WRITEPA_HANDLER(WRITE8(fidel6502_state, csc_pia0_pa_w))
363   MCFG_PIA_WRITEPB_HANDLER(WRITE8(fidel6502_state, csc_pia0_pb_w))
364   MCFG_PIA_CA2_HANDLER(WRITELINE(fidel6502_state, csc_pia0_ca2_w))
323365
324366   MCFG_DEVICE_ADD("pia1", PIA6821, 0)
325   MCFG_PIA_READPA_HANDLER(READ8(fidel6502_state, pia1_pa_r))
326   MCFG_PIA_READCA1_HANDLER(READLINE(fidel6502_state, pia1_ca1_r))
327   MCFG_PIA_READCB1_HANDLER(READLINE(fidel6502_state, pia1_cb1_r))
328   MCFG_PIA_WRITEPA_HANDLER(WRITE8(fidel6502_state, pia1_pa_w))
329   MCFG_PIA_WRITEPB_HANDLER(WRITE8(fidel6502_state, pia1_pb_w))
330   MCFG_PIA_CA2_HANDLER(WRITELINE(fidel6502_state, pia1_ca2_w))
331   MCFG_PIA_CB2_HANDLER(WRITELINE(fidel6502_state, pia1_cb2_w))
367   MCFG_PIA_READPA_HANDLER(READ8(fidel6502_state, csc_pia1_pa_r))
368   MCFG_PIA_READCA1_HANDLER(READLINE(fidel6502_state, csc_pia1_ca1_r))
369   MCFG_PIA_READCB1_HANDLER(READLINE(fidel6502_state, csc_pia1_cb1_r))
370   MCFG_PIA_WRITEPA_HANDLER(WRITE8(fidel6502_state, csc_pia1_pa_w))
371   MCFG_PIA_WRITEPB_HANDLER(WRITE8(fidel6502_state, csc_pia1_pb_w))
372   MCFG_PIA_CA2_HANDLER(WRITELINE(fidel6502_state, csc_pia1_ca2_w))
373   MCFG_PIA_CB2_HANDLER(WRITELINE(fidel6502_state, csc_pia1_cb2_w))
332374
375   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
376   MCFG_DEFAULT_LAYOUT(layout_fidel_vsc)
377
333378   /* sound hardware */
334379   MCFG_SPEAKER_STANDARD_MONO("mono")
335   MCFG_SOUND_ADD("speech", S14001A, 25000) // around 25khz
380   MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
381   MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, csc_speech_r))
336382   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
383
384   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
385   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
337386MACHINE_CONFIG_END
338387
339/* ROM definition */
340ROM_START(csc)
341   ROM_REGION(0x10000, "maincpu", 0)
342   ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341))
343   ROM_LOAD("1025a03.bin", 0xa000,  0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c))
344   ROM_LOAD("1025a02.bin", 0xc000,  0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0))
345   ROM_LOAD("1025a01.bin", 0xe000,  0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b))
346388
347   ROM_LOAD("74s474.bin", 0xfe00,  0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456))
389static MACHINE_CONFIG_START( sc12, fidel6502_state )
348390
349   ROM_REGION(0x2000, "speech", 0)
350   ROM_LOAD("101-32107.bin", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d))
391   /* basic machine hardware */
392   MCFG_CPU_ADD("maincpu", R65C02, XTAL_4MHz)
393   MCFG_CPU_PROGRAM_MAP(sc12_map)
394
395   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
396   MCFG_DEFAULT_LAYOUT(layout_fidel_sc12)
397
398   /* sound hardware */
399   MCFG_SPEAKER_STANDARD_MONO("mono")
400   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
401   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
402MACHINE_CONFIG_END
403
404
405
406static MACHINE_CONFIG_START( fev, fidel6502_state )
407
408   /* basic machine hardware */
409   MCFG_CPU_ADD("maincpu", M65SC02, XTAL_3MHz) // M65SC102 (CMD)
410   MCFG_CPU_PROGRAM_MAP(fev_map)
411
412   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
413   MCFG_DEFAULT_LAYOUT(layout_fidel_fev)
414
415   /* sound hardware */
416   MCFG_SPEAKER_STANDARD_MONO("mono")
417   MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
418   MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, csc_speech_r))
419   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
420MACHINE_CONFIG_END
421
422
423/******************************************************************************
424    ROM Definitions
425******************************************************************************/
426
427ROM_START( csc )
428   ROM_REGION( 0x10000, "maincpu", 0 )
429   ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) )
430   ROM_LOAD("1025a03.bin",   0xa000, 0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c) )
431   ROM_LOAD("1025a02.bin",   0xc000, 0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0) )
432   ROM_LOAD("1025a01.bin",   0xe000, 0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b) )
433   ROM_LOAD("74s474.bin",    0xfe00, 0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456) )
434
435   ROM_REGION( 0x2000, "speech", 0 )
436   ROM_LOAD("101-32107.bin", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d) )
437   ROM_RELOAD(               0x1000, 0x1000)
351438ROM_END
352439
440ROM_START( fscc12 )
441   ROM_REGION( 0x10000, "maincpu", 0 )
442   ROM_LOAD("101-1068a01",   0x8000, 0x2000, CRC(63c76cdd) SHA1(e0771c98d4483a6b1620791cb99a7e46b0db95c4) ) // SSS SCM23C65E4
443   ROM_LOAD("tms2732ajl-45", 0xc000, 0x1000, CRC(45070a71) SHA1(8aeecff828f26fb7081902c757559903be272649) ) // TI TMS2732AJL-45
444   ROM_LOAD("tmm2764d-2",    0xe000, 0x2000, CRC(183d3edc) SHA1(3296a4c3bce5209587d4a1694fce153558544e63) ) // Toshiba TMM2764D-2
445ROM_END
446
353447ROM_START( fexcelv )
354448   ROM_REGION( 0x10000, "maincpu", 0 )
355   ROM_LOAD("101-1080a01.ic5", 0x0000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) )
449   ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) )
356450
357451   ROM_REGION( 0x8000, "speech", 0 )
358452   ROM_LOAD("101-1081a01.ic2", 0x0000, 0x8000, CRC(c8ae1607) SHA1(6491ce6be60ed77f3dd931c0ca17616f13af943e) )
359453ROM_END
360454
361/* Driver */
455/******************************************************************************
456    Drivers
457******************************************************************************/
362458
363/*    YEAR  NAME          PARENT  COMPAT  MACHINE    INPUT       INIT      COMPANY  FULLNAME                     FLAGS */
364COMP( 1981, csc,     0,      0,      csc,  csc, driver_device,   0, "Fidelity Electronics", "Champion Sensory Chess Challenger",   MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK)
459/*    YEAR  NAME      PARENT  COMPAT  MACHINE  INPUT     INIT              COMPANY, FULLNAME, FLAGS */
460COMP( 1981, csc,     0,      0,      csc,  csc, driver_device,   0, "Fidelity Electronics", "Champion Sensory Chess Challenger", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
365461
366COMP( 1987, fexcelv,     0,      0,      csc,  csc, driver_device,   0, "Fidelity Electronics", "Voice Excellence", MACHINE_NOT_WORKING )
462COMP( 1984, fscc12,     0,      0,      sc12,  csc, driver_device,   0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_NOT_WORKING )
463
464COMP( 1987, fexcelv,     0,      0,      fev,  csc, driver_device,   0, "Fidelity Electronics", "Voice Excellence", MACHINE_NOT_WORKING )
trunk/src/mame/drivers/fidelz80.cpp
r252982r252983
55    Fidelity Electronics Z80 based board driver
66    for 6502 based boards, see drivers/fidel6502.cpp
77
8    All detailed RE work done by Kevin 'kevtris' Horton
8    Detailed RE work done by Kevin 'kevtris' Horton, except where noted
99
1010    TODO:
1111    - Figure out why it says the first speech line twice; it shouldn't?
r252982r252983
235235PROG - I/O expander
236236
237237T0 - optical card sensor (high = bright/reflective, low = dark/non reflective)
238T1 - connects to inverter, then nothing
238T1 - connects to inverter, then nothing?
239239
240240
241241D8243C I/O expander:
r252982r252983
332332PIA 0:
333333------
334334
335PA0 - 7seg segments H, TSI A0
336PA1 - 7seg segments G, TSI A1
335PA0 - 7seg segments E, TSI A0
336PA1 - 7seg segments D, TSI A1
337337PA2 - 7seg segments C, TSI A2
338PA3 - 7seg segments B, TSI A3
339PA4 - 7seg segments A, TSI A4
338PA3 - 7seg segments H, TSI A3
339PA4 - 7seg segments G, TSI A4
340340PA5 - 7seg segments F, TSI A5
341PA6 - 7seg segments E
342PA7 - 7seg segments D
341PA6 - 7seg segments B
342PA7 - 7seg segments A
343343
344344PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K)
345345PB1 - START line on S14001A
346346PB2 - white wire
347347PB3 - BUSY line from S14001A
348348PB4 - Tone line (toggle to make a tone in the speaker)
349PB5 - button column I
349PB5 - button row 9
350350PB6 - selection jumper (resistor to 5V)
351351PB7 - selection jumper (resistor to ground)
352352
r252982r252983
568568PA.7 - button row 8
569569
570570PB.0 - button column I
571PB.1 - button row 9
571PB.1 - button column J
572572PB.2 - Tone line (toggle to make tone in the speaker)
573573PB.3 - violet wire
574574PB.4 - white wire (and TSI BUSY line)
r252982r252983
593593
594594******************************************************************************
595595
596Sensory Chess Challenger (SC12-B) (6502 based -> fidel6502.cpp driver)
597---------------------------------
598
599RE information by Berger
600
601
602
603
604
605
606******************************************************************************
607
596608Voice Excellence (FEV, model 6092) (6502 based -> fidel6502.cpp driver)
597609----------------------------------
598610
r252982r252983
863875// Devices, I/O
864876
865877/******************************************************************************
866    I8255 Device, for VCC/UVC
878    CC10 and VCC/UVC
867879******************************************************************************/
868880
881// misc handlers
882
869883void fidelz80_state::vcc_prepare_display()
870884{
871885   // 4 7seg leds
r252982r252983
882896   return m_speech_rom[m_speech_bank << 12 | offset];
883897}
884898
899
900// I8255 PPI
901
885902WRITE8_MEMBER(fidelz80_state::vcc_ppi_porta_w)
886903{
887904   // d0-d6: digit segment data, bits are xABCDEFG
r252982r252983
918935
919936READ8_MEMBER(fidelz80_state::vcc_ppi_portc_r)
920937{
921   // d0-d3: multiplexed inputs (inverted), also language switches
938   // d0-d3: multiplexed inputs (active low), also language switches
922939   UINT8 lan = (~m_led_select & 0x40) ? m_inp_matrix[4]->read() : 0;
923940   return ~(lan | read_inputs(4)) & 0xf;
924941}
r252982r252983
929946   m_inp_mux = ~data >> 4 & 0xf;
930947}
931948
949
932950// CC10-specific (no speech chip, 1-bit beeper instead)
933951
934952TIMER_DEVICE_CALLBACK_MEMBER(fidelz80_state::beeper_off_callback)
r252982r252983
951969}
952970
953971
972
954973/******************************************************************************
955    I8255 Device, for VSC
974    VSC
956975******************************************************************************/
957976
977// misc handlers
978
958979void fidelz80_state::vsc_prepare_display()
959980{
960981   // 4 7seg leds + H
r252982r252983
972993   display_update();
973994}
974995
996
997// I8255 PPI
998
975999WRITE8_MEMBER(fidelz80_state::vsc_ppi_porta_w)
9761000{
9771001   // d0-d5: TSI C0-C5
r252982r252983
9991023}
10001024
10011025
1002/******************************************************************************
1003    Z80 PIO Device, for VSC
1004******************************************************************************/
1026// Z80 PIO
10051027
10061028READ8_MEMBER(fidelz80_state::vsc_pio_porta_r)
10071029{
r252982r252983
10321054}
10331055
10341056
1057
10351058/******************************************************************************
1036    I8243 I/O Expander Device, for VBRC
1059    VBRC
10371060******************************************************************************/
10381061
1062// misc handlers
1063
10391064void fidelz80_state::vbrc_prepare_display()
10401065{
10411066   // 14seg led segments, d15 is extra led, d14 is unused (tone on prototype?)
r252982r252983
10461071   display_matrix(16, 8, outdata, m_led_select);
10471072}
10481073
1074
1075// I8243 I/O expander
1076
10491077WRITE8_MEMBER(fidelz80_state::vbrc_ioexp_port_w)
10501078{
10511079   // P4-P7: digit segment data
r252982r252983
10541082}
10551083
10561084
1057/******************************************************************************
1058    I8041 MCU, for VBRC
1059******************************************************************************/
1085// I8041 MCU
10601086
10611087WRITE8_MEMBER(fidelz80_state::vbrc_mcu_p1_w)
10621088{
r252982r252983
10681094READ8_MEMBER(fidelz80_state::vbrc_mcu_p2_r)
10691095{
10701096   // d0-d3: I8243 P2
1071   // d4-d7: multiplexed inputs (inverted)
1097   // d4-d7: multiplexed inputs (active low)
10721098   return (m_i8243->i8243_p2_r(space, offset) & 0x0f) | (read_inputs(8) << 4 ^ 0xf0);
10731099}
10741100
r252982r252983
11871213static INPUT_PORTS_START( fidelz80 )
11881214   PORT_START("IN.0")
11891215   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
1190   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_V)
1216   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L)
11911217   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_A)
11921218   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_E)
11931219
r252982r252983
13161342   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6)
13171343   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL)
13181344   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R)
1319   PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
13201345
13211346   PORT_START("IN.9") // buttons beside the display
13221347   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TM") PORT_CODE(KEYCODE_T)
r252982r252983
14011426   MCFG_I8255_IN_PORTC_CB(READ8(fidelz80_state, vcc_ppi_portc_r))
14021427   MCFG_I8255_OUT_PORTC_CB(WRITE8(fidelz80_state, vcc_ppi_portc_w))
14031428
1404   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80_state, display_decay_tick, attotime::from_msec(1))
1429   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
14051430   MCFG_DEFAULT_LAYOUT(layout_fidel_cc)
14061431
14071432   /* sound hardware */
r252982r252983
14251450   MCFG_I8255_IN_PORTC_CB(READ8(fidelz80_state, vcc_ppi_portc_r))
14261451   MCFG_I8255_OUT_PORTC_CB(WRITE8(fidelz80_state, vcc_ppi_portc_w))
14271452
1428   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80_state, display_decay_tick, attotime::from_msec(1))
1453   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
14291454   MCFG_DEFAULT_LAYOUT(layout_fidel_vcc)
14301455
14311456   /* sound hardware */
r252982r252983
14411466   MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz)
14421467   MCFG_CPU_PROGRAM_MAP(vsc_map)
14431468   MCFG_CPU_IO_MAP(vsc_io)
1444   MCFG_CPU_PERIODIC_INT_DRIVER(fidelz80_state, nmi_line_pulse, 600) // 555 timer, approx 600hz
1469   MCFG_CPU_PERIODIC_INT_DRIVER(fidelz80base_state, nmi_line_pulse, 600) // 555 timer, approx 600hz
14451470
14461471   MCFG_DEVICE_ADD("ppi8255", I8255, 0)
14471472   MCFG_I8255_OUT_PORTA_CB(WRITE8(fidelz80_state, vsc_ppi_porta_w))
r252982r252983
14531478   MCFG_Z80PIO_IN_PB_CB(READ8(fidelz80_state, vsc_pio_portb_r))
14541479   MCFG_Z80PIO_OUT_PB_CB(WRITE8(fidelz80_state, vsc_pio_portb_w))
14551480
1456   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80_state, display_decay_tick, attotime::from_msec(1))
1481   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
14571482   MCFG_DEFAULT_LAYOUT(layout_fidel_vsc)
14581483
14591484   /* sound hardware */
r252982r252983
14781503
14791504   MCFG_I8243_ADD("i8243", NOOP, WRITE8(fidelz80_state, vbrc_ioexp_port_w))
14801505
1481   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80_state, display_decay_tick, attotime::from_msec(1))
1506   MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1))
14821507   MCFG_DEFAULT_LAYOUT(layout_fidel_vbrc)
14831508
14841509   /* sound hardware */
r252982r252983
14951520
14961521ROM_START( cc10 )
14971522   ROM_REGION( 0x10000, "maincpu", 0 )
1498   ROM_LOAD( "cc10.bin", 0x0000, 0x1000, BAD_DUMP CRC(bb9e6055) SHA1(18276e57cf56465a6352239781a828c5f3d5ba63) ) // second half empty
1523   ROM_LOAD( "cc10b", 0x0000, 0x1000, CRC(afd3ca99) SHA1(870d09b2b52ccb8572d69642c59b5215d5fb26ab) ) // 2332
14991524ROM_END
15001525
15011526
r252982r252983
15971622******************************************************************************/
15981623
15991624/*    YEAR  NAME      PARENT  COMPAT  MACHINE  INPUT     INIT              COMPANY, FULLNAME, FLAGS */
1600COMP( 1978, cc10,     0,      0,      cc10,    fidelz80, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (version B?)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
1625COMP( 1978, cc10,     0,      0,      cc10,    fidelz80, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (version B)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
16011626COMP( 1979, vcc,      0,      0,      vcc,     fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
16021627COMP( 1979, vccg,     vcc,    0,      vcc,     fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
16031628COMP( 1979, vccfr,    vcc,    0,      vcc,     fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
trunk/src/mame/drivers/gaelco2.cpp
r252982r252983
1515    World Rally 2  | 1995 | GAE1 506  | 950510-1 | DS5002FP
1616    Touch & Go     | 1995 | GAE1 501  | 950906   | DS5002FP
1717    Touch & Go     | 1995 | GAE1 501  | 950510-1 | DS5002FP
18    Maniac Square  | 1996 | Unknown   | ???      | DS5002FP, but unprotected version available
18    Maniac Square  | 1996 | GAE1 501  | 940411   | DS5002FP, but unprotected version available
1919    Snow Board     | 1996 | CG-1V 366 | 960419/1 | Lattice IspLSI 1016-80LJ
2020    Bang!          | 1998 | CG-1V 388 | 980921/1 | No
2121
r252982r252983
6767   AM_RANGE(0x30004a, 0x30004b) AM_WRITENOP                                                                /* Sound muting? */
6868   AM_RANGE(0x320000, 0x320001) AM_READ_PORT("COIN")                                                       /* COINSW + SERVICESW */
6969   AM_RANGE(0x500000, 0x500001) AM_WRITE(gaelco2_coin_w)                                                   /* Coin lockout + counters */
70   AM_RANGE(0xfe0000, 0xfeffff) AM_RAM                                                                     /* Work RAM */
70   AM_RANGE(0xfe0000, 0xfeffff) AM_RAM AM_SHARE("shareram")                                                /* Work RAM */
7171ADDRESS_MAP_END
7272
7373
r252982r252983
198198   ROM_FILL(               0x0200000, 0x0080000, 0x00 )         /* to decode GFX as 5bpp */
199199ROM_END
200200
201ROM_START( maniacsqa ) // REF 940411
202   ROM_REGION( 0x040000, "maincpu", 0 )    /* 68000 code */
203   ROM_LOAD16_BYTE( "MS_U_45.U45",   0x000000, 0x020000, CRC(98f4fdc0) SHA1(1e4d5b0a8a432de885c96319c21280d304b38db0) )
204   ROM_LOAD16_BYTE( "MS_U_44.U44",   0x000001, 0x020000, CRC(1785dd41) SHA1(5c6a65c00248971ce54c8185858393f2c52cc583) )
205     
206   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
207   ROM_LOAD( "ms_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
201208
209   ROM_REGION( 0x0280000, "gfx1", 0 ) /* GFX + Sound */
210   // all 4 roms on a sub-board, no IC positions marked
211   ROM_LOAD( "MS1",   0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) )    /* GFX + Sound */
212   ROM_LOAD( "MS2",   0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) )    /* GFX + Sound */
213   ROM_LOAD( "MS3",   0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) )    /* GFX only */
214   ROM_FILL(          0x0120000, 0x0060000, 0x00 )         /* Empty */
215   ROM_LOAD( "MS4",   0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) )    /* GFX only */
216   ROM_FILL(          0x01a0000, 0x0060000, 0x00 )         /* Empty */
217   ROM_FILL(          0x0200000, 0x0080000, 0x00 )         /* to decode GFX as 5bpp */
218ROM_END
202219
220 
221
203222/*============================================================================
204223                                BANG
205224  ============================================================================*/
r252982r252983
577596   ROM_LOAD16_BYTE(    "u45",  0x000000, 0x080000, CRC(61c47c56) SHA1(6dd3fc6fdab252e0fb43c0793eef70203c888d7f) )
578597   ROM_LOAD16_BYTE(    "u44",  0x000001, 0x080000, CRC(f0be007a) SHA1(2112b2e5f020028b50c8f2c72c83c9fee7a78224) )
579598
599   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
600   ROM_LOAD( "aligator_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
601
580602   ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */
581603   /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */
582604   ROM_FILL(               0x1000000, 0x0400000, 0x00 )     /* to decode GFX as 5 bpp */
r252982r252983
831853   ROM_LOAD16_BYTE( "tg_56", 0x000000, 0x080000, CRC(8ab065f3) SHA1(7664abd7e5f66ffca4a2865bba56ac36bd04f4e9) )
832854   ROM_LOAD16_BYTE( "tg_57", 0x000001, 0x080000, CRC(0dfd3f65) SHA1(afb2ce8988c84f211ac71b84928ce4c421de7fee) )
833855
856   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
857   ROM_LOAD( "touchgo_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
858
834859   ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */
835860   /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */
836861   ROM_LOAD( "ic69",  0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) /* GFX only */
r252982r252983
847872   ROM_LOAD16_BYTE( "tg56.bin", 0x000000, 0x080000, CRC(fd3b4642) SHA1(3cab42aecad5ee641711763c6047b56784c2bcf3) )
848873   ROM_LOAD16_BYTE( "tg57.bin", 0x000001, 0x080000, CRC(ee891835) SHA1(9f8c60e5e3696b70f756c3521e10313005053cc7) )
849874
875   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
876   ROM_LOAD( "touchgo_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
877
850878   ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */
851879   /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */
852880   ROM_LOAD( "ic69",  0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) /* GFX only */
r252982r252983
863891   ROM_LOAD16_BYTE( "tg56", 0x000000, 0x080000, CRC(6d0f5c65) SHA1(00db7a7da3ec1676169aa78fe4f08a7746c3accf) )
864892   ROM_LOAD16_BYTE( "tg57", 0x000001, 0x080000, CRC(845787b5) SHA1(27c9910cd9f38328326ecb5cd093dfeb6d4f6244) )
865893
894   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
895   ROM_LOAD( "touchgo_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
896
866897   ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */
867898   /* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */
868899   ROM_LOAD( "ic69",  0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) /* GFX only */
r252982r252983
13251356   ROM_LOAD16_BYTE( "wr2.64",  0x000000, 0x080000, CRC(4cdf4e1e) SHA1(a3b3ff4a70336b61c7bba5d518527bf4bd901867) )
13261357   ROM_LOAD16_BYTE( "wr2.63",  0x000001, 0x080000, CRC(94887c9f) SHA1(ad09f1fbeff4c3ba47f72346d261b22fa6a51457) )
13271358
1359   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
1360   ROM_LOAD( "wr2_dallas.bin", 0x00000, 0x8000, NO_DUMP )
1361
1362
13281363   ROM_REGION( 0x0a00000, "gfx1", 0 )  /* GFX + Sound */
13291364   ROM_LOAD( "wr2.16d",    0x0000000, 0x0080000, CRC(ad26086b) SHA1(487ffaaca57c9d030fc486b8cae6735ee40a0ac3) )    /* GFX only */
13301365   ROM_LOAD( "wr2.17d",    0x0080000, 0x0080000, CRC(c1ec0745) SHA1(a6c3ce9c889e6a53f4155f54d6655825af34a35b) )    /* GFX only */
r252982r252983
13851420   ROM_LOAD16_BYTE( "2.u39",   0x000000, 0x020000, BAD_DUMP CRC(9939299e) SHA1(55303a2adf199f4b5a60f57be7480b0e119f8624) )
13861421   ROM_LOAD16_BYTE( "1.u40",   0x000001, 0x020000, BAD_DUMP CRC(311c2f94) SHA1(963d6b5f479598145146fcb8b7c6ce77fbc92b07) )
13871422
1423   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
1424   ROM_LOAD( "ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
1425
13881426   ROM_REGION( 0x0300000, "gfx1", 0 ) /* GFX + Sound */
13891427   ROM_LOAD( "3.u54", 0x0000000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) )
13901428   ROM_LOAD( "4.u53", 0x0080000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) )
r252982r252983
14011439   ROM_LOAD16_BYTE( "2.u39_v4",    0x000000, 0x020000, CRC(fff16141) SHA1(8493c3e58a231c03b152b336f43422a9a2d2618c) )
14021440   ROM_LOAD16_BYTE( "1.u40_v4",    0x000001, 0x020000, CRC(39f9d58e) SHA1(1cbdae2adc570f2a2e10a707075312ef717e2643) )
14031441
1442   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
1443   ROM_LOAD( "ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
1444
14041445   ROM_REGION( 0x0300000, "gfx1", 0 ) /* GFX + Sound */
14051446   ROM_LOAD( "3.u54", 0x0000000, 0x0080000, CRC(085008ed) SHA1(06eb4f972d79eab13b1b3b6829ef280e079abdb6) )
14061447   ROM_LOAD( "4.u53", 0x0080000, 0x0080000, CRC(94dc37a7) SHA1(28f9832b61541b292682a6e2d2264abccd138a2e) )
r252982r252983
14121453   ROM_LOAD( "palce16v8h.u29",  0x0000, 0x0117, BAD_DUMP CRC(4a0a6f39) SHA1(57351e471649391c9abf110828fe2f128fe84eee) )
14131454ROM_END
14141455
1456
1457READ16_MEMBER(gaelco2_state::maniacsqa_prot_r)
1458{
1459   int pc = space.device().safe_pc();
1460   
1461   // if -1 is returned at any point on these checks the game instantly reports 'power failure'
1462   // these are generally done right before the other checks
1463   if (pc == 0x3dbc) return 0x0000; // must not be -1
1464   if (pc == 0x5ce4) return 0x0000; // must not be -1
1465   if (pc == 0x5d08) return 0x0000; // must not be -1 (stores 5 here just before)
1466   if (pc == 0xaa90) return 0x0000; // must not be -1
1467   if (pc == 0xaab2) return 0x0000; // must not be -1
1468   if (pc == 0x9f10) return 0x0000; // must not be -1
1469   if (pc == 0x3b86) return 0x0000; // must not be -1
1470
1471   if (pc == 0x3dce) return 0x0000; // must be 0
1472
1473   if (pc == 0x25c2) return 0x0000; // writes 0 to 0xfe45fa then expects this to be 0
1474   
1475   if (pc == 0x5cf6) return 0x0000; // must be 0
1476   if (pc == 0x5d1a) return 0x0000; // must be 0
1477   if (pc == 0xaaa0) return 0x0000; // must be 0?
1478
1479   if (pc == 0xaac4) return 0x0000; // checks for 0, 2 possible code paths after - happens when piece is dropped
1480   if (pc == 0xaad0) return 0x0a00; // if above ISN'T 0 this must be 0x0a00 (but code then dies, probably wants some data filled?)
1481   // other code path just results in no more pieces dropping? maybe the MCU does the matching algorithm?
1482
1483   
1484   
1485
1486
1487   printf("read at PC %08x\n", pc);
1488   return m_shareram[(0xfedaa2 - 0xfe0000) / 2];
1489
1490}
1491
1492DRIVER_INIT_MEMBER(gaelco2_state,maniacsqa)
1493{
1494   m_maincpu->space(AS_PROGRAM).install_read_handler(0xfedaa2, 0xfedaa3, read16_delegate(FUNC(gaelco2_state::maniacsqa_prot_r), this) );
1495}
1496
1497
14151498GAME( 1994, aligator,  0,       alighunt, alighunt, gaelco2_state, alighunt, ROT0, "Gaelco", "Alligator Hunt", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
14161499GAME( 1994, aligatorun,aligator,alighunt, alighunt, gaelco2_state, alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected)", 0 )
14171500GAME( 1995, touchgo,  0,        touchgo,  touchgo,  gaelco2_state, touchgo,  ROT0, "Gaelco", "Touch & Go (World)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
r252982r252983
14191502GAME( 1995, touchgoe, touchgo,  touchgo,  touchgo,  gaelco2_state, touchgo,  ROT0, "Gaelco", "Touch & Go (earlier revision)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
14201503GAME( 1995, wrally2,  0,        wrally2,  wrally2,  driver_device, 0,        ROT0, "Gaelco", "World Rally 2: Twin Racing", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
14211504GAME( 1996, maniacsq, 0,        maniacsq, maniacsq, driver_device, 0,        ROT0, "Gaelco", "Maniac Square (unprotected)", 0 )
1505GAME( 1996, maniacsqa,maniacsq, maniacsq, maniacsq, gaelco2_state, maniacsqa,ROT0, "Gaelco", "Maniac Square (protected)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
14221506GAME( 1996, snowboar, 0,        snowboar, snowboar, driver_device, 0,        ROT0, "Gaelco", "Snow Board Championship (Version 2.1)", 0 )
14231507GAME( 1996, snowboara,snowboar, snowboar, snowboar, gaelco2_state, snowboar, ROT0, "Gaelco", "Snow Board Championship (Version 2.0)", 0 )
14241508GAME( 1998, bang,     0,        bang,     bang,     bang_state,    bang,     ROT0, "Gaelco", "Bang!", 0 )
trunk/src/mame/drivers/galaxi.cpp
r252982r252983
5757      m_bg3_ram(*this, "bg3_ram"),
5858      m_bg4_ram(*this, "bg4_ram"),
5959      m_fg_ram(*this, "fg_ram"),
60      m_bg3_xscroll(8),
61      m_bg3_yscroll(0),
6062      m_maincpu(*this, "maincpu"),
6163      m_gfxdecode(*this, "gfxdecode"),
6264      m_screen(*this, "screen"),
63      m_palette(*this, "palette") { }
65      m_palette(*this, "palette")
66      { }
6467
6568   /* memory pointers */
6669   required_shared_ptr<UINT16> m_bg1_ram;
r252982r252983
7780   tilemap_t   *m_bg4_tmap;
7881   tilemap_t   *m_fg_tmap;
7982
83   UINT16 m_bg3_xscroll;
84   UINT16 m_bg3_yscroll;
85
8086   /* misc */
8187   int       m_hopper;
8288   int       m_ticket;
83   UINT16    m_out[3];
89   UINT16    m_out;
90
8491   DECLARE_WRITE16_MEMBER(galaxi_bg1_w);
8592   DECLARE_WRITE16_MEMBER(galaxi_bg2_w);
8693   DECLARE_WRITE16_MEMBER(galaxi_bg3_w);
r252982r252983
187194   m_bg4_tmap->set_transparent_pen(0);
188195
189196   m_fg_tmap->set_transparent_pen(0);
190
191   m_bg3_tmap->set_scrolldx(-8, 0);
192197}
193198
194199UINT32 galaxi_state::screen_update_galaxi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
195200{
201   m_bg3_tmap->set_scrollx(m_bg3_xscroll);
202   m_bg3_tmap->set_scrolly(m_bg3_yscroll);
203
196204   int layers_ctrl = -1;
197205
198206#ifdef MAME_DEBUG
r252982r252983
208216   }
209217#endif
210218
219
211220   if (layers_ctrl & 1)    m_bg1_tmap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
212221   else                bitmap.fill(m_palette->black_pen(), cliprect);
213222   if (layers_ctrl & 2)    m_bg2_tmap->draw(screen, bitmap, cliprect, 0, 0);
r252982r252983
225234
226235void galaxi_state::show_out(  )
227236{
228//  popmessage("%04x %04x %04x", m_out[0], m_out[1], m_out[2]);
237//  popmessage("%04x", m_out);
229238}
230239
231240WRITE16_MEMBER(galaxi_state::galaxi_500000_w)
232241{
233   COMBINE_DATA(&m_out[0]);
242   COMBINE_DATA(&m_bg3_yscroll);
234243   show_out();
235244}
236245
237246WRITE16_MEMBER(galaxi_state::galaxi_500002_w)
238247{
239   COMBINE_DATA(&m_out[1]);
248   COMBINE_DATA(&m_bg3_xscroll);
240249   show_out();
241250}
242251
r252982r252983
271280      machine().bookkeeping().coin_counter_w(0, data & 0x2000);    // coins
272281   }
273282
274   COMBINE_DATA(&m_out[2]);
283   COMBINE_DATA(&m_out);
275284   show_out();
276285}
277286
r252982r252983
295304   AM_RANGE(0x100c00, 0x100fff) AM_RAM_WRITE(galaxi_bg4_w) AM_SHARE("bg4_ram")
296305
297306   AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(galaxi_fg_w ) AM_SHARE("fg_ram")
298   AM_RANGE(0x102000, 0x1047ff) AM_READNOP // unknown
307   AM_RANGE(0x102000, 0x107fff) AM_READNOP // unknown
299308
300309   AM_RANGE(0x300000, 0x3007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
301310
r252982r252983
309318   AM_RANGE(0x600000, 0x607fff) AM_RAM AM_SHARE("nvram")   // 2x DS1230Y (non volatile SRAM)
310319ADDRESS_MAP_END
311320
321
322static ADDRESS_MAP_START( lastfour_map, AS_PROGRAM, 16, galaxi_state )
323   AM_RANGE(0x000000, 0x03ffff) AM_ROM
324
325   // bg3+4 / 1+2 seem to be swapped, order, palettes, scroll register etc. all suggest this
326   AM_RANGE(0x100000, 0x1003ff) AM_RAM_WRITE(galaxi_bg3_w) AM_SHARE("bg3_ram")
327   AM_RANGE(0x100400, 0x1007ff) AM_RAM_WRITE(galaxi_bg4_w) AM_SHARE("bg4_ram")
328   AM_RANGE(0x100800, 0x100bff) AM_RAM_WRITE(galaxi_bg1_w) AM_SHARE("bg1_ram")
329   AM_RANGE(0x100c00, 0x100fff) AM_RAM_WRITE(galaxi_bg2_w) AM_SHARE("bg2_ram")
330
331   AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(galaxi_fg_w ) AM_SHARE("fg_ram")
332   AM_RANGE(0x102000, 0x107fff) AM_READNOP // unknown
333
334   AM_RANGE(0x300000, 0x3007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
335
336   AM_RANGE(0x500000, 0x500001) AM_READ_PORT("INPUTS")
337   AM_RANGE(0x500000, 0x500001) AM_WRITE(galaxi_500000_w)
338   AM_RANGE(0x500002, 0x500003) AM_WRITE(galaxi_500002_w)
339   AM_RANGE(0x500004, 0x500005) AM_WRITE(galaxi_500004_w)
340
341   AM_RANGE(0x700000, 0x700001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
342
343   AM_RANGE(0x600000, 0x607fff) AM_RAM AM_SHARE("nvram")   // 2x DS1230Y (non volatile SRAM)
344ADDRESS_MAP_END
345
312346/***************************************************************************
313347                                Input Ports
314348***************************************************************************/
r252982r252983
401435{
402436   m_hopper = 0;
403437   m_ticket = 0;
404   m_out[0] = 0;
405   m_out[1] = 0;
406   m_out[2] = 0;
438   m_out = 0;
407439}
408440
409441static MACHINE_CONFIG_START( galaxi, galaxi_state )
r252982r252983
449481   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 4.0)
450482MACHINE_CONFIG_END
451483
484static MACHINE_CONFIG_DERIVED( lastfour, galaxi )
485   MCFG_CPU_MODIFY("maincpu")
486   MCFG_CPU_PROGRAM_MAP(lastfour_map)
487MACHINE_CONFIG_END
452488
453489/***************************************************************************
454490                                ROMs Loading
r252982r252983
480516   ROM_LOAD( "21.u38", 0x00000, 0x40000, CRC(199baf33) SHA1(006708d955481fe1ae44555d27896d18e1ff8440) )
481517ROM_END
482518
519ROM_START( lastfour )
520   ROM_REGION( 0x40000, "maincpu", 0 )
521   ROM_LOAD16_BYTE( "15.u48", 0x00000, 0x20000, CRC(9168e19c) SHA1(4a2f0d100e457bd33691ba084a0f0549e8bf0790) )
522   ROM_LOAD16_BYTE( "14.u47", 0x00001, 0x20000, CRC(b10ce31a) SHA1(8d51ead24319ff775fc873957e6b4de748432a8d) )
483523
524   ROM_REGION( 0x100000, "gfx1", 0 )
525   ROM_LOAD16_BYTE( "13.u34", 0x00000, 0x80000, CRC(d595d4c4) SHA1(7fe8c9f36b03d763965abf325d1ff6d754342100) )
526   ROM_LOAD16_BYTE( "12.u33", 0x00001, 0x80000, CRC(5ee5568b) SHA1(6384e5dfa24b5ad4e4419fa3bbffb4d552867465) )
527
528   ROM_REGION( 0x40000, "oki", 0 ) /* 4-bit ADPCM mono @ 6 kHz.*/
529   ROM_LOAD( "21.u38", 0x00000, 0x20000, CRC(e48523dd) SHA1(47bc2e5c2164b93d685fa134397845e0ed7aaa5f) )
530ROM_END
531
484532/***************************************************************************
485533                               Game Drivers
486534***************************************************************************/
r252982r252983
488536/*     YEAR  NAME      PARENT  MACHINE   INPUT     INIT  ROT    COMPANY   FULLNAME                       FLAGS                   LAYOUT  */
489537GAMEL( 2000, galaxi,   0,      galaxi,   galaxi, driver_device,   0,    ROT0,  "B.R.L.", "Galaxi (v2.0)",               MACHINE_SUPPORTS_SAVE,     layout_galaxi )
490538GAMEL( 2000, magjoker, 0,      magjoker, magjoker, driver_device, 0,    ROT0,  "B.R.L.", "Magic Joker (v1.25.10.2000)", MACHINE_SUPPORTS_SAVE,     layout_galaxi )
539GAMEL( 2001, lastfour, 0,      lastfour, magjoker, driver_device, 0,    ROT0,  "B.R.L.", "Last Four (09:12 16/01/2001)",MACHINE_SUPPORTS_SAVE,     layout_galaxi )
trunk/src/mame/drivers/glass.cpp
r252982r252983
223223   ROM_LOAD16_BYTE( "1.c23", 0x000000, 0x040000, CRC(aeebd4ed) SHA1(04759dc146dff0fc74b78d70e79dfaebe68328f9) )
224224   ROM_LOAD16_BYTE( "2.c22", 0x000001, 0x040000, CRC(165e2e01) SHA1(180a2e2b5151f2321d85ac23eff7fbc9f52023a5) )
225225
226   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
227   ROM_LOAD( "glass_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
228
226229   ROM_REGION( 0x400000, "gfx1", ROMREGION_ERASE00 )   /* Graphics */
227230   /* 0x000000-0x3fffff filled in later in the DRIVER_INIT */
228231
r252982r252983
244247   ROM_LOAD16_BYTE( "c23.bin", 0x000000, 0x040000, CRC(688cdf33) SHA1(b59dcc3fc15f72037692b745927b110e97d8282e) )
245248   ROM_LOAD16_BYTE( "c22.bin", 0x000001, 0x040000, CRC(ab17c992) SHA1(1509b5b4bbfb4e022e0ab6fbbc0ffc070adfa531) )
246249
250   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
251   ROM_LOAD( "glass_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
252
247253   ROM_REGION( 0x400000, "gfx1", ROMREGION_ERASE00 )   /* Graphics */
248254   /* 0x000000-0x3fffff filled in later in the DRIVER_INIT */
249255
r252982r252983
265271   ROM_LOAD16_BYTE( "spl-c23.bin", 0x000000, 0x040000, CRC(c1393bea) SHA1(a5f877ba38305a7b49fa3c96b9344cbf71e8c9ef) )
266272   ROM_LOAD16_BYTE( "spl-c22.bin", 0x000001, 0x040000, CRC(0d6fa33e) SHA1(37e9258ef7e108d034c80abc8e5e5ab6dacf0a61) )
267273
274   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
275   ROM_LOAD( "glass_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
276
268277   ROM_REGION( 0x400000, "gfx1", ROMREGION_ERASE00 )   /* Graphics */
269278   /* 0x000000-0x3fffff filled in later in the DRIVER_INIT */
270279
trunk/src/mame/drivers/itech8.cpp
r252982r252983
10901090   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_RESET PORT_REVERSE PORT_COCKTAIL PORT_PLAYER(2)
10911091INPUT_PORTS_END
10921092
1093static INPUT_PORTS_START( stratabs )
1094   PORT_INCLUDE( stratab )
10931095
1096   PORT_START("FAKEX") /* fake */
1097   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_RESET PORT_PLAYER(1)
1098
1099   PORT_START("FAKEY") /* fake */
1100   PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(100) PORT_RESET PORT_REVERSE PORT_PLAYER(1)
1101INPUT_PORTS_END
1102
1103
1104
10941105CUSTOM_INPUT_MEMBER(itech8_state::gtg_mux)
10951106{
10961107   const char *tag1 = (const char *)param;
r252982r252983
22352246ROM_END
22362247
22372248
2249
2250
22382251ROM_START( dynobop )
22392252   ROM_REGION( 0x1c000, "maincpu", 0 )
22402253   ROM_LOAD( "dynobop.u5", 0x04000, 0x4000, CRC(98452c40) SHA1(9b9316fc258792e0d825f16e0fadf8e0c35a864e) )
r252982r252983
22832296ROM_END
22842297
22852298
2299ROM_START( stratabs )
2300   ROM_REGION( 0x1c000, "maincpu", 0 )
2301   ROM_LOAD( "sb_prog-v4t.u5", 0x08000, 0x8000, CRC(38ddae75) SHA1(71a9cbd36cf7b180a88bab3ab92a4dff93ce365f) )
2302   ROM_COPY( "maincpu", 0x8000, 0x14000, 0x8000 )
2303
2304   ROM_REGION( 0x10000, "soundcpu", 0 )
2305   ROM_LOAD( "sb_snds_1.4.u27", 0x08000, 0x8000, CRC(526ef093) SHA1(884f9149b3d5eb33e47258e466ad9cd9ce5ffddb) )
2306
2307   ROM_REGION( 0x10000, "sub", 0 )
2308   ROM_LOAD( "z80_prg_v1.0t.u53", 0x00000, 0x0800, CRC(08203f9f) SHA1(be5044938c73bf6fc1a6130dc473997e8c219b24) )
2309   ROM_CONTINUE(        0x00000, 0x0800 )
2310   ROM_CONTINUE(        0x00000, 0x0800 )
2311   ROM_CONTINUE(        0x00000, 0x0800 )
2312
2313   ROM_REGION( 0xc0000, "grom", 0 )
2314   ROM_LOAD( "sb_grom00", 0x00000, 0x20000, CRC(22f6ce56) SHA1(8e423122384257d9c5d8f48192ff6fa1f544fd97) )
2315   ROM_LOAD( "sb_grom01", 0x20000, 0x20000, CRC(6cc7ad6f) SHA1(d601b9bb81f26ad86e5cc053cab055831331ccde) )
2316   ROM_LOAD( "sb_grom02",  0x40000, 0x20000, CRC(475134ef) SHA1(5920e7a211f1b2234e8a3f51e570303c3787d8fd) )
2317
2318   ROM_REGION( 0x40000, "oki", 0 )
2319   ROM_LOAD( "sb_srom0", 0x00000, 0x20000, CRC(6ff390b9) SHA1(f31dae9e31f3fc83b9253e49fd4204820db3587e) )
2320ROM_END
2321
2322
22862323ROM_START( pokrdice )
22872324   ROM_REGION( 0x1c000, "maincpu", 0 )
22882325   ROM_LOAD( "pd-v17.u5", 0x04000, 0x4000, CRC(5e24be82) SHA1(97e50cc023ff651fb09cc5e85a1bef1bc234ccb9) )
r252982r252983
27092746GAME( 1989, grmatch,  0,        grmatch,           grmatch, itech8_state,  grmatch,  ROT0,   "Yankee Game Technology", "Grudge Match (Yankee Game Technology)", 0 )
27102747
27112748/* Strata Bowling-style PCB */
2712GAME( 1990, stratab,  0,        stratab_hi,        stratab, driver_device,  0,        ROT270, "Strata/Incredible Technologies", "Strata Bowling (V3)", 0 )
2749GAME( 1990, stratab,  0,        stratab_hi,        stratab, driver_device,  0,        ROT270, "Strata/Incredible Technologies", "Strata Bowling (V3)", 0 ) // still says V1 in service mode?
27132750GAME( 1990, stratab1, stratab,  stratab_hi,        stratab, driver_device,  0,        ROT270, "Strata/Incredible Technologies", "Strata Bowling (V1)", 0 )
27142751GAME( 1990, gtg,      0,        stratab_hi,        gtg, driver_device,      0,        ROT0,   "Strata/Incredible Technologies", "Golden Tee Golf (Joystick, v3.1)", 0 )
27152752GAME( 1989, gtgt,     gtg,      stratab_hi,        gtgt, driver_device,     0,        ROT0,   "Strata/Incredible Technologies", "Golden Tee Golf (Trackball, v2.0)", 0 )
r252982r252983
27212758GAME( 1990, slikshot,  0,        slikshot_hi,       slikshot, itech8_state, slikshot, ROT90,  "Grand Products/Incredible Technologies", "Slick Shot (V2.2)", MACHINE_MECHANICAL )
27222759GAME( 1990, slikshot17,slikshot, slikshot_hi,       slikshot, itech8_state, slikshot, ROT90,  "Grand Products/Incredible Technologies", "Slick Shot (V1.7)", MACHINE_MECHANICAL )
27232760GAME( 1990, slikshot16,slikshot, slikshot_hi,       slikshot, itech8_state, slikshot, ROT90,  "Grand Products/Incredible Technologies", "Slick Shot (V1.6)", MACHINE_MECHANICAL )
2724GAME( 1990, dynobop,   0,        slikshot_hi,       dynobop, itech8_state,  slikshot, ROT90,  "Grand Products/Incredible Technologies", "Dyno Bop", MACHINE_MECHANICAL )
2725GAME( 1990, sstrike,   0,        sstrike,           sstrike, itech8_state,  sstrike,  ROT270, "Strata/Incredible Technologies", "Super Strike Bowling", MACHINE_MECHANICAL )
2726GAME( 1991, pokrdice,  0,        slikshot_lo_noz80, pokrdice, driver_device, 0,        ROT90,  "Strata/Incredible Technologies", "Poker Dice", 0 )
2761GAME( 1990, dynobop,   0,        slikshot_hi,       dynobop,  itech8_state, slikshot, ROT90,  "Grand Products/Incredible Technologies", "Dyno Bop", MACHINE_MECHANICAL )
2762GAME( 1990, sstrike,   0,        sstrike,           sstrike,  itech8_state, sstrike,  ROT270, "Strata/Incredible Technologies", "Super Strike Bowling", MACHINE_MECHANICAL )
2763GAME( 1991, pokrdice,  0,        slikshot_lo_noz80, pokrdice, driver_device,0,        ROT90,  "Strata/Incredible Technologies", "Poker Dice", 0 )
2764GAME( 1990, stratabs,  stratab,  sstrike,           stratabs, itech8_state, sstrike,  ROT270, "Strata/Incredible Technologies", "Strata Bowling (V1 4T, Super Strike Bowling type PCB)", MACHINE_NOT_WORKING ) // need to figure out the control hookup for this set, service mode indicates it's still a trackball like stratab
27272765
27282766/* Hot Shots Tennis-style PCB */
27292767GAME( 1990, hstennis,  0,        hstennis_hi,       hstennis, itech8_state, hstennis, ROT90,  "Strata/Incredible Technologies", "Hot Shots Tennis (V1.1)", 0 )
trunk/src/mame/drivers/marywu.cpp
r252982r252983
1010
1111  TODO:
1212  * Figure out where exactly all devices are mapped to (the devices are
13    2 sound chips, the KC8279 controller the 2kb SRAM, the 8bit dipswitches,
13    2 sound chips, the 2kb SRAM, the 8bit dipswitches,
1414    31 LEDs, 13 modules of double-digit 7-seg displays and 4 push-buttons).
1515  * we may also have user inputs from the coin slot and from the
1616    cabinet buttons, for making bets.
r252982r252983
1919#include "emu.h"
2020#include "cpu/mcs51/mcs51.h"
2121#include "sound/ay8910.h"
22#include "machine/i8279.h"
23#include "marywu.lh"
2224
2325class marywu_state : public driver_device
2426{
r252982r252983
2628    marywu_state(const machine_config &mconfig, device_type type, const char *tag)
2729        : driver_device(mconfig, type, tag)
2830    { }
31
32    DECLARE_WRITE8_MEMBER(display_7seg_data_w);
33    DECLARE_WRITE8_MEMBER(multiplex_7seg_w);
34    DECLARE_WRITE8_MEMBER(ay1_port_a_w);
35    DECLARE_WRITE8_MEMBER(ay1_port_b_w);
36    DECLARE_WRITE8_MEMBER(ay2_port_a_w);
37    DECLARE_WRITE8_MEMBER(ay2_port_b_w);
38    DECLARE_READ8_MEMBER(keyboard_r);
39    DECLARE_READ8_MEMBER(port_r);
40private:
41    uint8_t m_selected_7seg_module;
2942};
3043
44static INPUT_PORTS_START( marywu )
45    PORT_START("KEYS1")
46    PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1)
47    PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2)
48    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3)
49    PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4)
50    PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5)
51    PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6)
52    PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7)
53    PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8)
54
55    PORT_START("KEYS2")
56    PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q)
57    PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W)
58    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E)
59    PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R)
60    PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T)
61    PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y)
62    PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U)
63    PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I)
64
65    PORT_START("DSW")
66    PORT_DIPNAME( 0x01, 0x01, "Unknown bit #0" )    PORT_DIPLOCATION("DSW:0")
67        PORT_DIPSETTING(0x01, DEF_STR( On ) )
68        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
69    PORT_DIPNAME( 0x02, 0x02, "Unknown bit #1" )    PORT_DIPLOCATION("DSW:1")
70        PORT_DIPSETTING(0x02, DEF_STR( On ) )
71        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
72    PORT_DIPNAME( 0x04, 0x04, "Unknown bit #2" )    PORT_DIPLOCATION("DSW:2")
73        PORT_DIPSETTING(0x04, DEF_STR( On ) )
74        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
75    PORT_DIPNAME( 0x08, 0x08, "Unknown bit #3" )    PORT_DIPLOCATION("DSW:3")
76        PORT_DIPSETTING(0x08, DEF_STR( On ) )
77        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
78    PORT_DIPNAME( 0x10, 0x10, "Unknown bit #4" )    PORT_DIPLOCATION("DSW:4")
79        PORT_DIPSETTING(0x10, DEF_STR( On ) )
80        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
81    PORT_DIPNAME( 0x20, 0x20, "Unknown bit #5" )    PORT_DIPLOCATION("DSW:5")
82        PORT_DIPSETTING(0x20, DEF_STR( On ) )
83        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
84    PORT_DIPNAME( 0x40, 0x40, "Unknown bit #6" )    PORT_DIPLOCATION("DSW:6")
85        PORT_DIPSETTING(0x40, DEF_STR( On ) )
86        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
87    PORT_DIPNAME( 0x80, 0x80, "Unknown bit #7" )    PORT_DIPLOCATION("DSW:7")
88        PORT_DIPSETTING(0x80, DEF_STR( On ) )
89        PORT_DIPSETTING(0x00, DEF_STR( Off ) )
90
91    PORT_START("PUSHBUTTONS")
92    PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
93    PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
94    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
95    PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
96    PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A)
97    PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S)
98    PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D)
99    PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F)
100INPUT_PORTS_END
101
102WRITE8_MEMBER( marywu_state::ay1_port_a_w )
103{
104    for (uint8_t i=0; i<8; i++){
105        output_set_led_value(i, (data & (1 << i)) ? 1 : 0);
106    }
107}
108
109WRITE8_MEMBER( marywu_state::ay1_port_b_w )
110{
111    for (uint8_t i=0; i<8; i++){
112        output_set_led_value(i+8, (data & (1 << i)) ? 1 : 0);
113    }
114}
115
116WRITE8_MEMBER( marywu_state::ay2_port_a_w )
117{
118    for (uint8_t i=0; i<8; i++){
119        output_set_led_value(i+16, (data & (1 << i)) ? 1 : 0);
120    }
121}
122
123WRITE8_MEMBER( marywu_state::ay2_port_b_w )
124{
125    for (uint8_t i=0; i<6; i++){
126        /* we only have 30 LEDs. The last 2 bits in this port are unused.  */
127        output_set_led_value(i+24, (data & (1 << i)) ? 1 : 0);
128    }
129}
130
131WRITE8_MEMBER( marywu_state::multiplex_7seg_w )
132{
133    m_selected_7seg_module = data;
134}
135
136READ8_MEMBER( marywu_state::port_r )
137{
138//TODO: figure out what each bit is mapped to in the 80c31 ports P1 and P3
139    switch(offset){
140        //case 1:
141   //   return (1 << 6);
142   default:
143      return 0x00;
144    }
145}
146
147READ8_MEMBER( marywu_state::keyboard_r )
148{
149    switch(m_selected_7seg_module % 8){
150   case 0: return ioport("KEYS1")->read();
151        case 1: return ioport("KEYS2")->read();
152        case 2: return ioport("DSW")->read();
153        case 3: return ioport("PUSHBUTTONS")->read();
154   default:
155            return 0x00;
156    }
157}
158
159WRITE8_MEMBER( marywu_state::display_7seg_data_w )
160{
161    static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // HEF4511BP (7 seg display driver)
162
163    output_set_digit_value(2 * m_selected_7seg_module + 0, patterns[data & 0x0F]);
164    output_set_digit_value(2 * m_selected_7seg_module + 1, patterns[(data >> 4) & 0x0F]);
165}
166
31167static ADDRESS_MAP_START( program_map, AS_PROGRAM, 8, marywu_state )
32168    AM_RANGE(0x0000, 0x7fff) AM_ROM
33169ADDRESS_MAP_END
34170
35171static ADDRESS_MAP_START( io_map, AS_IO, 8, marywu_state )
36    AM_RANGE(0x8000, 0x87ff) AM_RAM //HM6116: 2kbytes of Static RAM /* This is a guess. Maybe it is also mirrored? */
37    //AM_RANGE(0xB000, 0xB001) AM_NOP /*maybe this is where the keyboard/display "KC8279" controller is hooked up ? */
38    AM_RANGE(0x9001, 0x9002) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_data_w) /* This is a guess */
39    AM_RANGE(0x9003, 0x9004) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_data_w) /* This is a guess */
172    AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x0100) AM_RAM /* HM6116: 2kbytes of Static RAM */
173    AM_RANGE(0xb000, 0xb000) AM_MIRROR(0x0ffe) AM_DEVREADWRITE("i8279", i8279_device, data_r, data_w)
174    AM_RANGE(0xb001, 0xb001) AM_MIRROR(0x0ffe) AM_DEVREADWRITE("i8279", i8279_device, status_r, cmd_w)
175    AM_RANGE(0x9000, 0x9000) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay1", ay8910_device, data_address_w)
176    AM_RANGE(0x9001, 0x9001) AM_MIRROR(0x0ffc) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
177    AM_RANGE(0x9002, 0x9002) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay2", ay8910_device, data_address_w)
178    AM_RANGE(0x9003, 0x9003) AM_MIRROR(0x0ffc) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
179    AM_RANGE(0xf000, 0xf000) AM_NOP /* TODO: Investigate this. There's something going on at this address range. */
180    AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_READ(port_r)
40181ADDRESS_MAP_END
41182
42183static MACHINE_CONFIG_START( marywu , marywu_state )
r252982r252983
45186    MCFG_CPU_PROGRAM_MAP(program_map)
46187    MCFG_CPU_IO_MAP(io_map)
47188
189    /* Keyboard & display interface */
190    MCFG_DEVICE_ADD("i8279", I8279, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */
191    MCFG_I8279_OUT_SL_CB(WRITE8(marywu_state, multiplex_7seg_w))          // select  block of 7seg modules by multiplexing the SL scan lines
192    MCFG_I8279_IN_RL_CB(READ8(marywu_state, keyboard_r))                  // keyboard Return Lines
193    MCFG_I8279_OUT_DISP_CB(WRITE8(marywu_state, display_7seg_data_w))
194
195    /* Video */
196    MCFG_DEFAULT_LAYOUT(layout_marywu)
197
48198    /* sound hardware */
49199    MCFG_SPEAKER_STANDARD_MONO("mono")
50200    MCFG_SOUND_ADD("ay1", AY8910, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */
51201    MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
202    MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(marywu_state, ay1_port_a_w))
203    MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(marywu_state, ay1_port_b_w))
52204   
53205    MCFG_SOUND_ADD("ay2", AY8910, XTAL_10_738635MHz) /* should it be perhaps a fraction of the XTAL clock ? */
54206    MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
207    MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(marywu_state, ay2_port_a_w))
208    MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(marywu_state, ay2_port_b_w))
55209MACHINE_CONFIG_END
56210
57211ROM_START( marywu )
r252982r252983
60214ROM_END
61215
62216/*    YEAR  NAME       PARENT   MACHINE   INPUT     STATE          INIT   ROT    COMPANY       FULLNAME          FLAGS  */
63GAME( ????, marywu,    0,       marywu,   0,        driver_device, 0,     ROT0, "<unknown>", "<unknown> Labeled 'WU- MARY-1A' Music by: SunKiss Chen", MACHINE_NOT_WORKING )
217GAME( ????, marywu,    0,       marywu,   marywu,   driver_device, 0,     ROT0, "<unknown>", "<unknown> Labeled 'WU- MARY-1A' Music by: SunKiss Chen", MACHINE_NOT_WORKING )
trunk/src/mame/drivers/metro.cpp
r252982r252983
2121Other        :  Memory Blitter
2222
2323------------------------------------------------------------------------------------------------
24Year + Game                     PCB           Video  Sub CPU  Sound         Issues / Notes
24Year + Game                       PCB           Video  Sub CPU  Sound         Issues / Notes
2525------------------------------------------------------------------------------------------------
2692  Last Fortress - Toride      VG420         I4100  uPD7810  YM2413+M6295
2792  Last Fortress - Toride (Ger)VG460-(A)     I4100  uPD7810  YM2413+M6295
2892  Pang Pom's                  VG420         I4100  uPD7810  YM2413+M6295
2992  Sky Alert                   VG420         I4100  uPD7810  YM2413+M6295
3092  The Karate Tournament       VG460-B       I4100  uPD7810  YM2413+M6295
3193? Lady Killer / Moeyo Gonta!! VG460-B       I4100  uPD7810  YM2413+M6295
3293  Poitto!                     MTR5260-A     I4100  uPD7810  YM2413+M6295
2692  Last Fortress - Toride        VG420         I4100  uPD7810  YM2413+M6295
2792  Last Fortress - Toride (Ger)  VG460-(A)     I4100  uPD7810  YM2413+M6295
2892  Pang Pom's                    VG420         I4100  uPD7810  YM2413+M6295
2992  Sky Alert                     VG420         I4100  uPD7810  YM2413+M6295
3092  The Karate Tournament         VG460-(A)     I4100  uPD7810  YM2413+M6295
3192  The Karate Tournament (Japan) VG460-(A)     I4100  uPD7810  YM2413+M6295
3293? Lady Killer / Moeyo Gonta!!   VG460-B       I4100  uPD7810  YM2413+M6295
3393  Poitto!                       MTR5260-A     I4100  uPD7810  YM2413+M6295
3334
3494  Dharma Doujou               MTR5260-A     I4220  uPD7810  YM2413+M6295
3594  Dharma Doujou (Korea)       MTR527        I4220  uPD7810  YM2413+M6295
3694  Toride II Adauchi Gaiden    MTR5260-A     I4220  uPD7810  YM2413+M6295
3794  Toride II Adauchi Gaiden(Kr)MTR5260-A     I4220  uPD7810  YM2413+M6295
3894  Gun Master                  MTR5260-A     I4220  uPD7810  YM2151+M6295
3995  Daitoride                   MTR5260-A     I4220  uPD7810  YM2151+M6295
4095  Pururun                     MTR5260-A     I4220  uPD7810  YM2151+M6295
4195  Puzzli                      MTR5260-A     I4220  uPD7810  YM2151+M6295
4296  Sankokushi                  MTR5260-A     I4220  uPD7810  YM2413+M6295
3594  Dharma Doujou                 MTR5260-A     I4220  uPD7810  YM2413+M6295
3694  Dharma Doujou (Korea)         MTR527        I4220  uPD7810  YM2413+M6295
3794  Toride II Adauchi Gaiden      MTR5260-A     I4220  uPD7810  YM2413+M6295
3894  Toride II Adauchi Gaiden(Kr)  MTR5260-A     I4220  uPD7810  YM2413+M6295
3994  Gun Master                    MTR5260-A     I4220  uPD7810  YM2151+M6295
4095  Daitoride                     MTR5260-A     I4220  uPD7810  YM2151+M6295
4195  Pururun                       MTR5260-A     I4220  uPD7810  YM2151+M6295
4295  Puzzli                        MTR5260-A     I4220  uPD7810  YM2151+M6295
4396  Sankokushi                    MTR5260-A     I4220  uPD7810  YM2413+M6295
4344
4495  Mouse Shooter GoGo          -             I4220   -       YMF278B       GFX ROM data lines swapped
4596  Bal Cube                    -             I4220   -       YMF278B       GFX ROM data lines swapped
4696  Daitoride (YMF278B)         -             I4220   -       YMF278B       GFX ROM data lines swapped
4796  Bang Bang Ball              -             I4220   -       YMF278B       GFX ROM data lines swapped
4899  Battle Bubble v2.00         LM2D-Y        I4220   -       YMF278B       GFX ROM data lines swapped
4595  Mouse Shooter GoGo            -             I4220   -       YMF278B       GFX ROM data lines swapped
4696  Bal Cube                      -             I4220   -       YMF278B       GFX ROM data lines swapped
4796  Daitoride (YMF278B)           -             I4220   -       YMF278B       GFX ROM data lines swapped
4896  Bang Bang Ball                -             I4220   -       YMF278B       GFX ROM data lines swapped
4999  Battle Bubble v2.00           LM2D-Y        I4220   -       YMF278B       GFX ROM data lines swapped
4950
5094  Blazing Tornado             HUM-002-A-(B) I4220  Z80      YM2610        Konami 053936 PSAC2
5196  Grand Striker 2             HUM-003(A)    I4220  Z80      YM2610        Konami 053936 PSAC2
5194  Blazing Tornado               HUM-002-A-(B) I4220  Z80      YM2610        Konami 053936 PSAC2
5296  Grand Striker 2               HUM-003(A)    I4220  Z80      YM2610        Konami 053936 PSAC2
5253
5395  Varia Metal                 ES-9309B-B    I4220   -       ES8712+M6295+M6585
5495  Varia Metal                   ES-9309B-B    I4220   -       ES8712+M6295+M6585
5455
5595  Mahjong Doukyuusei          VG330-B       I4300   -       YM2413+M6295
5695  Mahjong Doukyuusei Special  VG340-A       I4300   -       YM2413+M6295
5796  Mouja                       VG410-B       I4300   -       YM2413+M6295
5897  Mahjong Gakuensai           VG340-A       I4300   -       YM2413+M6295
5998  Mahjong Gakuensai 2         VG340-A       I4300   -       YM2413+M6295
5695  Mahjong Doukyuusei            VG330-B       I4300   -       YM2413+M6295
5795  Mahjong Doukyuusei Special    VG340-A       I4300   -       YM2413+M6295
5896  Mouja                         VG410-B       I4300   -       YM2413+M6295
5997  Mahjong Gakuensai             VG340-A       I4300   -       YM2413+M6295
6098  Mahjong Gakuensai 2           VG340-A       I4300   -       YM2413+M6295
6061
6100  Puzzlet                     VG2200-(B)    I4300  Z86E02   YM2413+M6295  H8/3007 CPU
6200  Puzzlet                       VG2200-(B)    I4300  Z86E02   YM2413+M6295  H8/3007 CPU
6263------------------------------------------------------------------------------------------------
6364
6465Mouse Shooter GoGo, Bal Cube, Bang Bang Ball & Daitoride (YMF278B) PCBs have
r252982r252983
50655066***************************************************************************/
50665067
50675068ROM_START( karatour )
5069  ROM_REGION( 0x080000, "maincpu", 0 )        /* 68000 Code */
5070  ROM_LOAD16_BYTE( "2.2FAB.8G",  0x000000, 0x040000, CRC(199a28d4) SHA1(ae880b5d5a1703c54e0ef27015039c7bb05eb185) )  // Hand-written label "(2) 2FAB"
5071  ROM_LOAD16_BYTE( "3.0560.10G", 0x000001, 0x040000, CRC(b054e683) SHA1(51e28a99f87684f3e56c7a168523f94717903d79) )  // Hand-written label "(3) 0560"
5072
5073  ROM_REGION( 0x02c000, "audiocpu", 0 )       /* NEC78C10 Code */
5074  ROM_LOAD( "KT001.1I", 0x000000, 0x004000, CRC(1dd2008c) SHA1(488b6f5d15bdbc069ee2cd6d7a0980a228d2f790) )    // 11xxxxxxxxxxxxxxx = 0xFF
5075  ROM_CONTINUE(         0x010000, 0x01c000 )
5076
5077  ROM_REGION( 0x400000, "gfx1", 0 )   /* Gfx + Data (Addressable by CPU & Blitter) */
5078  ROMX_LOAD( "361A04.15F", 0x000000, 0x100000, CRC(f6bf20a5) SHA1(cb4cb249eb1c106fe7ef0ace735c0cc3106f1ab7) , ROM_GROUPWORD | ROM_SKIP(6))
5079  ROMX_LOAD( "361A07.17D", 0x000002, 0x100000, CRC(794cc1c0) SHA1(ecfdec5874a95846c0fb7966fdd1da625d85531f) , ROM_GROUPWORD | ROM_SKIP(6))
5080  ROMX_LOAD( "361A05.17F", 0x000004, 0x100000, CRC(ea9c11fc) SHA1(176c4419cfe13ff019654a93cd7b0befa238bbc3) , ROM_GROUPWORD | ROM_SKIP(6))
5081  ROMX_LOAD( "361A06.15D", 0x000006, 0x100000, CRC(7e15f058) SHA1(267f0a5acb874d4fff3556ffa405e24724174667) , ROM_GROUPWORD | ROM_SKIP(6))
5082
5083  ROM_REGION( 0x040000, "oki", 0 )    /* Samples */
5084  ROM_LOAD( "8.4A06.1D", 0x000000, 0x040000, CRC(8d208179) SHA1(54a27ef155828435bc5eba60790a8584274c8b4a) )  // Hand-written label "(8) 4A06"
5085ROM_END
5086
5087ROM_START( karatourj )
50685088   ROM_REGION( 0x080000, "maincpu", 0 )        /* 68000 Code */
50695089   ROM_LOAD16_BYTE( "kt002.8g",  0x000000, 0x040000, CRC(316a97ec) SHA1(4b099d2fa91822c9c85d647aab3d6779fc400250) )
50705090   ROM_LOAD16_BYTE( "kt003.10g", 0x000001, 0x040000, CRC(abe1b991) SHA1(9b6327169d66717dd9dd74816bc33eb208c3763c) )
r252982r252983
50835103   ROM_LOAD( "kt008.1d", 0x000000, 0x040000, CRC(47cf9fa1) SHA1(88923ace550154c58c066f859cadfa7864c5344c) )
50845104ROM_END
50855105
5086
50875106/***************************************************************************
50885107
50895108Moeyo Gonta!! (Lady Killer)
r252982r252983
62926311
62936312***************************************************************************/
62946313
6295GAME( 1992, karatour,  0,        karatour, karatour, metro_state, karatour, ROT0,   "Mitchell",                                        "The Karate Tournament",                  MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
6314GAME( 1992, karatour,  0,        karatour, karatour, metro_state, karatour, ROT0,   "Mitchell",                                        "The Karate Tournament",                  MACHINE_SUPPORTS_SAVE )
6315GAME( 1992, karatourj, karatour, karatour, karatour, metro_state, karatour, ROT0,   "Mitchell",                                        "The Karate Tournament (Japan)",          MACHINE_SUPPORTS_SAVE )
62966316GAME( 1992, pangpoms,  0,        pangpoms, pangpoms, metro_state, metro,    ROT0,   "Metro",                                           "Pang Pom's",                             MACHINE_SUPPORTS_SAVE )
62976317GAME( 1992, pangpomsm, pangpoms, pangpoms, pangpoms, metro_state, metro,    ROT0,   "Metro (Mitchell license)",                        "Pang Pom's (Mitchell)",                  MACHINE_SUPPORTS_SAVE )
62986318GAME( 1992, skyalert,  0,        skyalert, skyalert, metro_state, metro,    ROT270, "Metro",                                           "Sky Alert",                              MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/pacman.cpp
r252982r252983
41454145   ROM_LOAD( "m7611.3m",     0x0100, 0x0100, CRC(0e307106) SHA1(6140b5339008dd3110cd5be2e2fb4813779dfe28) )    /* timing - not used */
41464146ROM_END
41474147
4148ROM_START( clubpacma )
4149   ROM_REGION( 0x10000, "maincpu", 0 )
4150   ROM_LOAD( "new_club.bin",  0x0000, 0x4000, CRC(6d79d3f2) SHA1(61ac436b4dc30b074e6c95f13efbf66f9aa1e2f7) )
4151   ROM_CONTINUE(0x8000,0x4000)
41484152
4153   ROM_REGION( 0x2000, "gfx1", 0 )
4154   ROM_LOAD( "12.5e",   0x0000, 0x0800, CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) )
4155   ROM_LOAD( "14.5h",   0x0800, 0x0800, CRC(7409fbec) SHA1(f440f08ba026ae6172666e1bdc0894ce33bba420) )
4156   ROM_LOAD( "13.5f",   0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) )
4157   ROM_LOAD( "15.5j",   0x1800, 0x0800, CRC(50c7477d) SHA1(c04ec282a8cb528df5e38ad750d12ee71612695d) )
4158
4159   // Color PROMs have been dumped. They match the pacman/mspacman ones
4160   ROM_REGION( 0x0120, "proms", 0 )
4161   ROM_LOAD( "n82s123n.7f",  0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) )
4162   ROM_LOAD( "m7611.4a",     0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) )
4163
4164   ROM_REGION( 0x0200, "namco", 0 )    /* sound PROMs */
4165   ROM_LOAD( "m7611.1m",     0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) )
4166   ROM_LOAD( "m7611.3m",     0x0100, 0x0100, CRC(0e307106) SHA1(6140b5339008dd3110cd5be2e2fb4813779dfe28) )    /* timing - not used */
4167ROM_END
4168
4169ROM_START( clubpacmb )
4170   ROM_REGION( 0x10000, "maincpu", 0 )
4171   ROM_LOAD( "new_club_d.bin",  0x0000, 0x4000, CRC(3c8ce103) SHA1(1d3fd485f68c2c1ed6f19dcee51456a4d0ab0a01) )
4172   ROM_CONTINUE(0x8000,0x4000)
4173
4174   ROM_REGION( 0x2000, "gfx1", 0 )
4175   ROM_LOAD( "12.5e",   0x0000, 0x0800, CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) )
4176   ROM_LOAD( "14.5h",   0x0800, 0x0800, CRC(7409fbec) SHA1(f440f08ba026ae6172666e1bdc0894ce33bba420) )
4177   ROM_LOAD( "13.5f",   0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) )
4178   ROM_LOAD( "15.5j",   0x1800, 0x0800, CRC(50c7477d) SHA1(c04ec282a8cb528df5e38ad750d12ee71612695d) )
4179
4180   // Color PROMs have been dumped. They match the pacman/mspacman ones
4181   ROM_REGION( 0x0120, "proms", 0 )
4182   ROM_LOAD( "n82s123n.7f",  0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) )
4183   ROM_LOAD( "m7611.4a",     0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) )
4184
4185   ROM_REGION( 0x0200, "namco", 0 )    /* sound PROMs */
4186   ROM_LOAD( "m7611.1m",     0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) )
4187   ROM_LOAD( "m7611.3m",     0x0100, 0x0100, CRC(0e307106) SHA1(6140b5339008dd3110cd5be2e2fb4813779dfe28) )    /* timing - not used */
4188ROM_END
4189
4190
41494191ROM_START( hangly )
41504192   ROM_REGION( 0x10000, "maincpu", 0 )
41514193   ROM_LOAD( "hangly.6e",    0x0000, 0x1000, CRC(5fe8610a) SHA1(d63eaebd85e10aa6c27bb7f47642dd403eeb6934) )
r252982r252983
69016943GAME( 1991, mspacmanbcc,mspacman,woodpek, mspacman, driver_device, 0,        ROT90,  "bootleg (Tecnausa)", "Come-Cocos (Ms. Pac-Man) ('Made in Greece' Tecnausa bootleg)", MACHINE_SUPPORTS_SAVE ) // ^ same PCB, also dated 1991, distributed by Tecnausa
69026944GAME( 198?, pacmansp,   puckman, pacman,  pacmansp, driver_device, 0,        ROT90,  "bootleg",            "Puck Man (Spanish, 'Made in Greece' bootleg)", MACHINE_SUPPORTS_SAVE ) // probably a further conversion of the mspacmanbg bootleg, still has some MS Pacman code + extra features
69036945
6904GAME( 1989, clubpacm,  0,       woodpek,  mspacman, driver_device, 0,        ROT90,  "Miky SRL", "Pacman Club / Club Lambada (Argentina)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
6946GAME( 1989, clubpacm,  0,        woodpek, mspacman, driver_device, 0,        ROT90,  "Miky SRL", "Pacman Club / Club Lambada (Argentina)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
6947GAME( 1990, clubpacma, clubpacm, woodpek, mspacman, driver_device, 0,        ROT90,  "Miky SRL", "Pacman Club (set 1, Argentina)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
6948GAME( 1990, clubpacmb, clubpacm, woodpek, mspacman, driver_device, 0,        ROT90,  "Miky SRL", "Pacman Club (set 2, Argentina)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
69056949
69066950GAME( 1985, jumpshot, 0,        pacman,   jumpshot, pacman_state,  jumpshot, ROT90,  "Bally Midway", "Jump Shot", MACHINE_SUPPORTS_SAVE )
69076951GAME( 1985, jumpshotp,jumpshot, pacman,   jumpshotp,pacman_state,  jumpshot, ROT90,  "Bally Midway", "Jump Shot Engineering Sample", MACHINE_SUPPORTS_SAVE )
trunk/src/mame/drivers/segas16b.cpp
r252982r252983
82428242   DRIVER_INIT_CALL(generic_5358_small);
82438243   m_custom_io_r = read16_delegate(FUNC(segas16b_state::sdi_custom_io_r), this);
82448244
8245   UINT8 *rom = memregion("maincpux")->base();
8246   if (rom)
8245   if (memregion("maincpux") != nullptr)
8246   {
8247      UINT8 *rom = memregion("maincpux")->base();
82478248      memcpy(m_decrypted_opcodes, rom, 0x30000);
8249   }
82488250}
82498251
82508252
trunk/src/mame/drivers/segas18.cpp
r252982r252983
15611561   ROM_LOAD( "opr-12885.b2", 0x10000, 0x10000, CRC(8041b814) SHA1(29fa49ba9a73eed07865a86ea774e2c6a60aed5b) )
15621562   ROM_LOAD( "opr-12886.b3", 0x20000, 0x10000, CRC(de32285e) SHA1(8994dc128d6a23763e5fcfca1868b336d4aa0a21) )
15631563
1564   ROM_REGION( 0x20000, "sprites", 0 ) // sprites
1565   ROM_LOAD16_BYTE( "opr-12891.a11", 0x00001, 0x10000, CRC(90d31a8c) SHA1(1747652a5109ce65add197cf06535f2463a99fdc) )
1566   ROM_LOAD16_BYTE( "opr-12887.b11", 0x00000, 0x10000, CRC(f0c0f49d) SHA1(7ecd591265165f3149241e2ceb5059faab88360f) )
1564   ROM_REGION16_BE( 0x20000, "sprites", 0 ) // sprites
1565   ROM_LOAD16_BYTE( "opr-12891.a11", 0x00000, 0x10000, CRC(90d31a8c) SHA1(1747652a5109ce65add197cf06535f2463a99fdc) )
1566   ROM_LOAD16_BYTE( "opr-12887.b11", 0x00001, 0x10000, CRC(f0c0f49d) SHA1(7ecd591265165f3149241e2ceb5059faab88360f) )
15671567
15681568   ROM_REGION( 0x210000, "soundcpu", ROMREGION_ERASEFF ) // sound CPU
15691569   ROM_LOAD( "epr-12888.a4", 0x010000, 0x20000, CRC(6f2fc63c) SHA1(3cce22c8f80013f05b5a2d36c42a61a81e4d6cbd) )
r252982r252983
15791579   ROM_LOAD( "opr-12885.b2", 0x10000, 0x10000, CRC(8041b814) SHA1(29fa49ba9a73eed07865a86ea774e2c6a60aed5b) )
15801580   ROM_LOAD( "opr-12886.b3", 0x20000, 0x10000, CRC(de32285e) SHA1(8994dc128d6a23763e5fcfca1868b336d4aa0a21) )
15811581
1582   ROM_REGION( 0x20000, "sprites", 0 ) // sprites
1583   ROM_LOAD16_BYTE( "opr-12891.a11", 0x00001, 0x10000, CRC(90d31a8c) SHA1(1747652a5109ce65add197cf06535f2463a99fdc) )
1584   ROM_LOAD16_BYTE( "opr-12887.b11", 0x00000, 0x10000, CRC(f0c0f49d) SHA1(7ecd591265165f3149241e2ceb5059faab88360f) )
1582   ROM_REGION16_BE( 0x20000, "sprites", 0 ) // sprites
1583   ROM_LOAD16_BYTE( "opr-12891.a11", 0x00000, 0x10000, CRC(90d31a8c) SHA1(1747652a5109ce65add197cf06535f2463a99fdc) )
1584   ROM_LOAD16_BYTE( "opr-12887.b11", 0x00001, 0x10000, CRC(f0c0f49d) SHA1(7ecd591265165f3149241e2ceb5059faab88360f) )
15851585
15861586   ROM_REGION( 0x210000, "soundcpu", ROMREGION_ERASEFF ) // sound CPU
15871587   ROM_LOAD( "epr-12888.a4", 0x010000, 0x20000, CRC(6f2fc63c) SHA1(3cce22c8f80013f05b5a2d36c42a61a81e4d6cbd) )
trunk/src/mame/drivers/segaybd.cpp
r252982r252983
739739   AM_RANGE(0x084000, 0x08401f) AM_MIRROR(0x001fe0) AM_DEVREADWRITE("divider_suby", sega_315_5249_divider_device, read, write)
740740   AM_RANGE(0x0c0000, 0x0cffff) AM_RAM AM_SHARE("shareram")
741741   AM_RANGE(0x180000, 0x1807ff) AM_MIRROR(0x007800) AM_RAM AM_SHARE("rotateram")
742   AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_SHARE("bsprites")
742   AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_SHARE("sprites")
743743   AM_RANGE(0x190000, 0x193fff) AM_MIRROR(0x004000) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
744744   AM_RANGE(0x198000, 0x19ffff) AM_DEVREAD("segaic16vid", segaic16_video_device, rotate_control_r)
745745   AM_RANGE(0x1f0000, 0x1fffff) AM_RAM
r252982r252983
13971397
13981398   MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
13991399
1400   MCFG_SEGA_SYS16B_SPRITES_ADD("bsprites")
1400   MCFG_SEGA_SYS16B_SPRITES_ADD("sprites")
14011401   MCFG_SEGA_YBOARD_SPRITES_ADD("ysprites")
14021402   MCFG_SEGAIC16VID_ADD("segaic16vid")
14031403   MCFG_SEGAIC16VID_GFXDECODE("gfxdecode")
r252982r252983
14791479   ROM_LOAD16_BYTE( "epr-11816b.54",   0x000000, 0x20000, CRC(317dd0c2) SHA1(7f1c7dcfb111385e2a94912975c2f9bfe78445ac) )
14801480   ROM_LOAD16_BYTE( "epr-11815b.53",   0x000001, 0x20000, CRC(f1fb22f1) SHA1(da3ce521b0a19b391913c35af34084d29edceca7) )
14811481
1482   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
1482   ROM_REGION16_BE( 0x080000, "sprites", 0 )
14831483   ROM_LOAD16_BYTE( "mpr-11467.16",   0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
14841484   ROM_LOAD16_BYTE( "mpr-11468.14",   0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
14851485   ROM_LOAD16_BYTE( "epr-11694.17",   0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
r252982r252983
15531553   ROM_LOAD16_BYTE( "epr-11816b.54",   0x000000, 0x20000, CRC(317dd0c2) SHA1(7f1c7dcfb111385e2a94912975c2f9bfe78445ac) )
15541554   ROM_LOAD16_BYTE( "epr-11815b.53",   0x000001, 0x20000, CRC(f1fb22f1) SHA1(da3ce521b0a19b391913c35af34084d29edceca7) )
15551555
1556   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
1556   ROM_REGION16_BE( 0x080000, "sprites", 0 )
15571557   ROM_LOAD16_BYTE( "mpr-11467.16",   0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
15581558   ROM_LOAD16_BYTE( "mpr-11468.14",   0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
15591559   ROM_LOAD16_BYTE( "epr-11694.17",   0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
r252982r252983
16311631   ROM_LOAD16_BYTE( "epr-11690a.54",  0x000000, 0x20000, CRC(e18bc177) SHA1(3fb179c9074954fc9b64da1463f542d60a99ec84) )
16321632   ROM_LOAD16_BYTE( "epr-11689a.53",  0x000001, 0x20000, CRC(6010e63e) SHA1(00aa5e8516f094409a407744b84ef183393b8b19) )
16331633
1634   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
1634   ROM_REGION16_BE( 0x080000, "sprites", 0 )
16351635   ROM_LOAD16_BYTE( "mpr-11467.16",   0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
16361636   ROM_LOAD16_BYTE( "mpr-11468.14",   0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
16371637   ROM_LOAD16_BYTE( "epr-11694.17",   0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
r252982r252983
17061706   ROM_LOAD16_BYTE( "epr-11513.54",   0x000000, 0x20000, CRC(e18bc177) SHA1(3fb179c9074954fc9b64da1463f542d60a99ec84) )
17071707   ROM_LOAD16_BYTE( "epr-11512.53",   0x000001, 0x20000, CRC(6010e63e) SHA1(00aa5e8516f094409a407744b84ef183393b8b19) )
17081708
1709   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
1709   ROM_REGION16_BE( 0x080000, "sprites", 0 )
17101710   ROM_LOAD16_BYTE( "mpr-11467.16",   0x000000, 0x20000, CRC(6e60e736) SHA1(73086744cb2fe1ce162f851cb879755c21819b33) )
17111711   ROM_LOAD16_BYTE( "mpr-11468.14",   0x000001, 0x20000, CRC(74ca9ca5) SHA1(c6f27ce43ef270088e6155c8240fd15afa5729fd) )
17121712   ROM_LOAD16_BYTE( "epr-11694.17",   0x040000, 0x20000, CRC(7e297b84) SHA1(bbf1aa2b0b6b1f9fdaf9bea77d24b7f4f9320696) )
r252982r252983
17891789   ROM_LOAD16_BYTE( "epr-13030.54",  0x000000, 0x20000, CRC(81abcabf) SHA1(cb4e817d66a7f384aa9757758c51cd1bf7347dd0) )
17901790   ROM_LOAD16_BYTE( "epr-13029.53",  0x000001, 0x20000, CRC(f3638efb) SHA1(f82a46fc8616cbe0235746161c587e54adecfe50) )
17911791
1792   ROM_REGION16_BE( 0x200000, "bsprites", 0)
1792   ROM_REGION16_BE( 0x200000, "sprites", 0)
17931793   ROM_LOAD16_BYTE( "epr-13039.16",  0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) )
17941794   ROM_LOAD16_BYTE( "epr-13037.14",  0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) )
17951795   ROM_LOAD16_BYTE( "epr-13040.17",  0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
r252982r252983
18641864   ROM_LOAD16_BYTE( "epr-13030.54",  0x000000, 0x20000, CRC(81abcabf) SHA1(cb4e817d66a7f384aa9757758c51cd1bf7347dd0) )
18651865   ROM_LOAD16_BYTE( "epr-13029.53",  0x000001, 0x20000, CRC(f3638efb) SHA1(f82a46fc8616cbe0235746161c587e54adecfe50) )
18661866
1867   ROM_REGION16_BE( 0x200000, "bsprites", 0)
1867   ROM_REGION16_BE( 0x200000, "sprites", 0)
18681868   ROM_LOAD16_BYTE( "epr-13039.16",  0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) )
18691869   ROM_LOAD16_BYTE( "epr-13037.14",  0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) )
18701870   ROM_LOAD16_BYTE( "epr-13040.17",  0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
r252982r252983
19331933   ROM_LOAD16_BYTE( "epr-13325a.54",  0x000000, 0x20000, CRC(aba307e5) SHA1(a27a7d3699a95d7c6265a23157b2fefd362003dd) )
19341934   ROM_LOAD16_BYTE( "epr-13324a.53",  0x000001, 0x20000, CRC(eb1b19e5) SHA1(3d1d7299cb3befc22afc0db0376d7f94dec37367) )
19351935
1936   ROM_REGION16_BE( 0x200000, "bsprites", 0)
1936   ROM_REGION16_BE( 0x200000, "sprites", 0)
19371937   ROM_LOAD16_BYTE( "epr-13039.16",  0x000000, 0x80000, CRC(d7e1266d) SHA1(b0fc4cc60a7e876ae2af343bba6da3fb926ea9c5) )
19381938   ROM_LOAD16_BYTE( "epr-13037.14",  0x000001, 0x80000, CRC(b801a250) SHA1(7d1f6a1f2022a4f302f22d11fa79057cf8134ad2) )
19391939   ROM_LOAD16_BYTE( "epr-13040.17",  0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
r252982r252983
20092009   ROM_LOAD16_BYTE( "epr-12019a.54", 0x000000, 0x20000, CRC(11188a30) SHA1(42dd0344d92529848b53a8cec4c145237ccd5b51) )
20102010   ROM_LOAD16_BYTE( "epr-12018a.53", 0x000001, 0x20000, CRC(1c582e1f) SHA1(c32d2f921554bddd7dedcb81e231aa91f50fa27b) )
20112011
2012   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
2012   ROM_REGION16_BE( 0x080000, "sprites", 0 )
20132013   ROM_LOAD16_BYTE( "epr-11789.16",  0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
20142014   ROM_LOAD16_BYTE( "epr-11791.14",  0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
20152015   ROM_LOAD16_BYTE( "epr-11790.17",  0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
r252982r252983
20922092   ROM_LOAD16_BYTE( "epr-12019.54", 0x000000, 0x20000, CRC(e514d7b6) SHA1(27ae99f5f3e8d2f248916f7a252e2c0686638df5) )
20932093   ROM_LOAD16_BYTE( "epr-12018.53", 0x000001, 0x20000, CRC(0a3f7faf) SHA1(fe20a164a7a2c9e9bf0e7aade75b0488bdc93d79) )
20942094
2095   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
2095   ROM_REGION16_BE( 0x080000, "sprites", 0 )
20962096   ROM_LOAD16_BYTE( "epr-11789.16",  0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
20972097   ROM_LOAD16_BYTE( "epr-11791.14",  0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
20982098   ROM_LOAD16_BYTE( "epr-11790.17",  0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
r252982r252983
21762176   ROM_LOAD16_BYTE( "epr-11903.54",  0x000000, 0x20000, CRC(d004f411) SHA1(212a985275647fae24b580ebaffc1230c06318ac) )
21772177   ROM_LOAD16_BYTE( "epr-11902.53",  0x000001, 0x20000, CRC(e8028e08) SHA1(de4ee5011e9552e624b6223e0e1ef00bc271a811) )
21782178
2179   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
2179   ROM_REGION16_BE( 0x080000, "sprites", 0 )
21802180   ROM_LOAD16_BYTE( "epr-11789.16",  0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
21812181   ROM_LOAD16_BYTE( "epr-11791.14",  0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
21822182   ROM_LOAD16_BYTE( "epr-11790.17",  0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
r252982r252983
22622262   ROM_LOAD16_BYTE( "epr-11750b.54", 0x000000, 0x20000, CRC(bc14ce30) SHA1(9bbadee0946e0abaac4f0d2625ba5550f11fa8a9) )
22632263   ROM_LOAD16_BYTE( "epr-11749b.53", 0x000001, 0x20000, CRC(9e385568) SHA1(74e22eaed645cc80b1eb0c52912186066e58b9d2) )
22642264
2265   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
2265   ROM_REGION16_BE( 0x080000, "sprites", 0 )
22662266   ROM_LOAD16_BYTE( "epr-11789.16",  0x000000, 0x20000, CRC(b86f8d2b) SHA1(a053f2021841fd0ef89fd3f28050a698b36c435e) )
22672267   ROM_LOAD16_BYTE( "epr-11791.14",  0x000001, 0x20000, CRC(36b2910a) SHA1(9948b91837f944a7a606542fa685525e74bbe398) )
22682268   ROM_LOAD16_BYTE( "epr-11790.17",  0x040000, 0x20000, CRC(2a564e66) SHA1(5f30fc15bfd017d75cfffe1e9e62ed0bcf32a98e) )
r252982r252983
23472347   ROM_LOAD16_BYTE("epr-12109.54", 0x000000, 0x20000, CRC(256350b8) SHA1(72b05d3583d63766690fed4827ec586e832168d1) )
23482348   ROM_LOAD16_BYTE("epr-12108.53", 0x000001, 0x20000, CRC(a3a56771) SHA1(f41d466f31a1b833d21a7011314c48d5056409eb) )
23492349
2350   ROM_REGION16_BE(0x080000, "bsprites", 0)
2350   ROM_REGION16_BE(0x080000, "sprites", 0)
23512351   ROM_LOAD16_BYTE("epr-12114.16", 0x000000, 0x20000, CRC(8b07e8eb) SHA1(22a4aff968d6de52372b7b2b5322d353f7b835ef) )
23522352   ROM_LOAD16_BYTE("epr-12115.14", 0x000001, 0x20000, CRC(045b2912) SHA1(697c8eff69bf1a23745d24171f0b50635cf8513e) )
23532353   ROM_LOAD16_BYTE("epr-12112.17", 0x040000, 0x20000, CRC(5dd13e81) SHA1(74ced668a36480a2ce9e3667e4915bfee2391534) )
r252982r252983
24402440   ROM_LOAD16_BYTE( "epr-14092.54",  0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) ) // same as epr-13990.54 below
24412441   ROM_LOAD16_BYTE( "epr-14091.53",  0x000001, 0x20000, CRC(72a56f71) SHA1(d45d3072ea92b5dde5c70138e56e7f0ca248880e) ) // 1 byte difference between regions
24422442
2443   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
2443   ROM_REGION16_BE( 0x080000, "sprites", 0 )
24442444   ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
24452445   ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
24462446
r252982r252983
25002500   ROM_LOAD16_BYTE( "epr-13990.54",  0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) )
25012501   ROM_LOAD16_BYTE( "epr-13989.53",  0x000001, 0x20000, CRC(8f4f824e) SHA1(d470f23ce2dca4e75b7b714175d47338c41bb721) )
25022502
2503   ROM_REGION16_BE( 0x080000, "bsprites", 0 )
2503   ROM_REGION16_BE( 0x080000, "sprites", 0 )
25042504   ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
25052505   ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
25062506
r252982r252983
25652565   ROM_LOAD16_BYTE( "epr-13828.54",  0x000000, 0x20000, CRC(2470cf5f) SHA1(eb1a732228fe7ad9cf0747d2b53e391c5a733667) )
25662566   ROM_LOAD16_BYTE( "epr-13827.53",  0x000001, 0x20000, CRC(a9d0cf7d) SHA1(c40c73c9e9105ed6503b77b65a6423a26057d810) )
25672567
2568   ROM_REGION16_BE( 0x200000, "bsprites", 0)
2568   ROM_REGION16_BE( 0x200000, "sprites", 0)
25692569   ROM_LOAD16_BYTE( "epr-13833.16",  0x000000, 0x80000, CRC(6148e11a) SHA1(5802208cf0415f6af39de162e9f12e7c205915f7) )
25702570   ROM_LOAD16_BYTE( "epr-13832.14",  0x000001, 0x80000, CRC(41679754) SHA1(58d46f33a4318bbc9e2a20eb5550a66ee0b2e62f) )
25712571   ROM_LOAD16_BYTE( "epr-13040.17",  0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
r252982r252983
26362636   ROM_LOAD16_BYTE( "epr-13828.54",  0x000000, 0x20000, CRC(2470cf5f) SHA1(eb1a732228fe7ad9cf0747d2b53e391c5a733667) )
26372637   ROM_LOAD16_BYTE( "epr-13827.53",  0x000001, 0x20000, CRC(a9d0cf7d) SHA1(c40c73c9e9105ed6503b77b65a6423a26057d810) )
26382638
2639   ROM_REGION16_BE( 0x200000, "bsprites", 0)
2639   ROM_REGION16_BE( 0x200000, "sprites", 0)
26402640   ROM_LOAD16_BYTE( "epr-13833.16",  0x000000, 0x80000, CRC(6148e11a) SHA1(5802208cf0415f6af39de162e9f12e7c205915f7) )
26412641   ROM_LOAD16_BYTE( "epr-13832.14",  0x000001, 0x80000, CRC(41679754) SHA1(58d46f33a4318bbc9e2a20eb5550a66ee0b2e62f) )
26422642   ROM_LOAD16_BYTE( "epr-13040.17",  0x100000, 0x80000, CRC(4aeb3a85) SHA1(5521fd2d3956839bdbe7b70a9e60cd9fb72a42f1) )
trunk/src/mame/drivers/system16.cpp
r252982r252983
31243124   ROM_LOAD( "b53.bin", 0x10000, 0x10000, CRC(aca8e330) SHA1(912e636e3c1e238682ea29620e8e2c6089c77209) )
31253125   ROM_LOAD( "b63.bin", 0x00000, 0x10000, CRC(f2af2fd5) SHA1(0a95ebb5eae7cdc6535533d73d06419c23d01ac3) )
31263126
3127   ROM_REGION( 0x020000, "sprites", ROMREGION_ERASEFF ) /* sprites */
3127   ROM_REGION16_BE( 0x020000, "sprites", ROMREGION_ERASEFF ) /* sprites */
31283128   /* no sprites on this */
31293129
31303130   ROM_REGION( 0x40000, "soundcpu", 0 ) /* sound CPU */
r252982r252983
31513151   ROM_LOAD( "iqpipe.5", 0x10000, 0x10000, CRC(dfaedd39) SHA1(498f1c34fecd8de497fdce41bb683d00047a868a) )
31523152   ROM_LOAD( "iqpipe.6", 0x00000, 0x10000, CRC(8e554f8d) SHA1(4b3b0e47c36f37947422f1c31063f11975108cd0) )
31533153
3154   ROM_REGION( 0x020000, "sprites", ROMREGION_ERASEFF ) /* sprites */
3154   ROM_REGION16_BE( 0x020000, "sprites", ROMREGION_ERASEFF ) /* sprites */
31553155   /* no sprites on this */
31563156
31573157   ROM_REGION( 0x40000, "soundcpu", 0 ) /* sound CPU */
trunk/src/mame/drivers/taito_f2.cpp
r252982r252983
51965196   ROM_LOAD( "d20-06.5",  0x00000, 0x04000, CRC(3eb537dc) SHA1(368a03fc265157faf50612b823a78c820b2519f1) )
51975197   ROM_CONTINUE(          0x10000, 0x0c000 ) /* banked stuff */
51985198
5199   ROM_REGION( 0x100000, "ymsnd", ROMREGION_ERASE00 )
51995200   /* no ADPCM samples */
52005201
52015202   /* no Delta-T samples */
trunk/src/mame/drivers/targeth.cpp
r252982r252983
204204   ROM_LOAD16_BYTE( "targeth.c23", 0x000000, 0x040000, CRC(840887d6) SHA1(9a36b346608d531a62a2e0704ea44f12e07f9d91) )
205205   ROM_LOAD16_BYTE( "targeth.c22", 0x000001, 0x040000, CRC(d2435eb8) SHA1(ce75a115dad8019c8e66a1c3b3e15f54781f65ae) )
206206
207   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
208   ROM_LOAD( "targeth_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
209
207210   ROM_REGION( 0x200000, "gfx1", 0 )   /* Graphics */
208211   ROM_LOAD( "targeth.i13",    0x000000, 0x080000, CRC(b892be24) SHA1(9cccaaacf20e77c7358f0ceac60b8a1012f1216c) )
209212   ROM_LOAD( "targeth.i11",    0x080000, 0x080000, CRC(6797faf9) SHA1(112cffe72f91cb46c262e19a47b0cab3237dd60f) )
r252982r252983
222225   ROM_LOAD16_BYTE( "c23.bin", 0x000000, 0x040000, CRC(e38a54e2) SHA1(239bfa6f1c0fc8aa0ad7de9be237bef55b384007) )
223226   ROM_LOAD16_BYTE( "c22.bin", 0x000001, 0x040000, CRC(24fe3efb) SHA1(8f48f08a6db28966c9263be119883c9179e349ed) )
224227
228   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
229   ROM_LOAD( "targeth_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
230
225231   ROM_REGION( 0x200000, "gfx1", 0 )   /* Graphics */
226232   ROM_LOAD( "targeth.i13",    0x000000, 0x080000, CRC(b892be24) SHA1(9cccaaacf20e77c7358f0ceac60b8a1012f1216c) )
227233   ROM_LOAD( "targeth.i11",    0x080000, 0x080000, CRC(6797faf9) SHA1(112cffe72f91cb46c262e19a47b0cab3237dd60f) )
trunk/src/mame/drivers/thoop2.cpp
r252982r252983
221221   ROM_LOAD16_BYTE(    "th2c23.040",   0x000000, 0x080000, CRC(3e465753) SHA1(1ea1173b9fe5d652e7b5fafb822e2535cecbc198) )
222222   ROM_LOAD16_BYTE(    "th2c22.040",   0x000001, 0x080000, CRC(837205b7) SHA1(f78b90c2be0b4dddaba26f074ea00eff863cfdb2) )
223223
224   ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */
225   ROM_LOAD( "thoop2_ds5002fp.bin", 0x00000, 0x8000, NO_DUMP )
226
224227   ROM_REGION( 0x800000, "gfx1", 0 )
225228   ROM_LOAD( "th2-h8.32m",     0x000000, 0x400000, CRC(60328a11) SHA1(fcdb374d2fc7ef5351a4181c471d192199dc2081) )
226229   ROM_LOAD( "th2-h12.32m",    0x400000, 0x400000, CRC(b25c2d3e) SHA1(d70f3e4e2432d80c2ac87cd81208ada303bac04a) )
trunk/src/mame/drivers/timex.cpp
r252982r252983
212212 *******************************************************************/
213213void spectrum_state::ts2068_update_memory()
214214{
215   UINT8 *messram = m_ram->pointer();
215   UINT8 *messram = nullptr;
216   if (m_ram) messram = m_ram->pointer();
216217   address_space &space = m_maincpu->space(AS_PROGRAM);
217   UINT8 *DOCK = m_dock_crt->base();
218   UINT8 *DOCK = nullptr;
219   if (m_dock_crt) DOCK = m_dock_crt->base();
220
221
218222   UINT8 *ExROM = memregion("maincpu")->base() + 0x014000;
219223   UINT8 *ChosenROM;
220224
trunk/src/mame/drivers/tispeak.cpp
r252982r252983
102102    - notes: no display, MCU is TMS1100 instead of TMS0270, overall similar to Touch & Tell
103103
104104    Speak & Spell Compact (UK) "Speak & Write", 1981
105    - MCU & TMS51xx: same as US 1981 version
105    - MCU: same as US 1981 version
106    - TMS51xx: CD2801A
106107    - VSM: 16KB CD62174(rev.A)
107108    - notes: BTANB: gibberish when the module button is pressed (with module present),
108109      anecdotes from the developer, the same person working on the original UK version:
r252982r252983
11701171   MCFG_SOFTWARE_LIST_ADD("cart_list", "snspell")
11711172MACHINE_CONFIG_END
11721173
1174static MACHINE_CONFIG_DERIVED( snspellcuk, snspellc )
11731175
1176   /* sound hardware */
1177   MCFG_SOUND_REPLACE("tms5100", CD2801, MASTER_CLOCK) // CD2801A!
1178   MCFG_FRAGMENT_ADD(tms5110_route)
1179MACHINE_CONFIG_END
1180
1181
11741182static MACHINE_CONFIG_START( vocaid, tispeak_state )
11751183
11761184   /* basic machine hardware */
r252982r252983
15411549
15421550COMP( 1981, snspellc,   0,        0, snspellc,     snspellc,   tispeak_state, snspell,  "Texas Instruments", "Speak & Spell Compact (US, 1981 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
15431551COMP( 1982, snspellca,  snspellc, 0, snspellc,     snspellc,   tispeak_state, snspell,  "Texas Instruments", "Speak & Spell Compact (US, 1982 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
1544COMP( 1982, snspellcuk, snspellc, 0, snspellc,     snspellcuk, tispeak_state, snspell,  "Texas Instruments", "Speak & Write (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
1552COMP( 1982, snspellcuk, snspellc, 0, snspellcuk,   snspellcuk, tispeak_state, snspell,  "Texas Instruments", "Speak & Write (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
15451553
15461554COMP( 1986, snmath,     0,        0, snmath,       snmath,     driver_device, 0,        "Texas Instruments", "Speak & Math (US, 1986 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
15471555COMP( 1980, snmathp,    snmath,   0, snmath,       snmath,     driver_device, 0,        "Texas Instruments", "Speak & Math (US, 1980 version/patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING )
trunk/src/mame/drivers/tumbleb.cpp
r252982r252983
22072207
22082208MACHINE_RESET_MEMBER(tumbleb_state,htchctch)
22092209{
2210   /* copy protection data every reset */
2211   UINT16 *PROTDATA = (UINT16*)memregion("user1")->base();
2212   int i, len = memregion("user1")->bytes();
2210   if (memregion("user1") != nullptr)
2211   {
2212      /* copy protection data every reset */
2213      UINT16 *PROTDATA = (UINT16*)memregion("user1")->base();
2214      int i, len = memregion("user1")->bytes();
22132215
2214   for (i = 0; i < len / 2; i++)
2215      m_mainram[0x000/2 + i] = PROTDATA[i];
2216      for (i = 0; i < len / 2; i++)
2217         m_mainram[0x000 / 2 + i] = PROTDATA[i];
2218   }
22162219
22172220   MACHINE_RESET_CALL_MEMBER(tumbleb);
22182221}
trunk/src/mame/drivers/zn.cpp
r252982r252983
40794079   TAITOFX1_BIOS
40804080   ROM_REGION32_LE( 0x01000000, "bankedroms", ROMREGION_ERASE00 )
40814081   ROM_REGION( 0x080000, "audiocpu", ROMREGION_ERASE00 )
4082   ROM_REGION( 0x200000, "ymsnd", ROMREGION_ERASE00 )
40824083ROM_END
40834084
40844085ROM_START( ftimpcta )
trunk/src/mame/includes/dynax.h
r252982r252983
2323      , m_screen(*this, "screen")
2424      , m_palette(*this, "palette")
2525      , m_rtc(*this, "rtc")
26      , m_gfx_region(*this, "gfx")
26      , m_gfx_region1(*this, "gfx1")
27      , m_gfx_region2(*this, "gfx2")
28      , m_gfx_region3(*this, "gfx3")
29      , m_gfx_region4(*this, "gfx4")
30      , m_gfx_region5(*this, "gfx5")
31      , m_gfx_region6(*this, "gfx6")
32      , m_gfx_region7(*this, "gfx7")
33      , m_gfx_region8(*this, "gfx8")
34
2735   {
2836   }
2937
r252982r252983
3644   optional_device<screen_device> m_screen;
3745   required_device<palette_device> m_palette;
3846   optional_device<msm6242_device> m_rtc;
39   optional_region_ptr<UINT8> m_gfx_region;
47   optional_region_ptr<UINT8> m_gfx_region1;
48   optional_region_ptr<UINT8> m_gfx_region2;
49   optional_region_ptr<UINT8> m_gfx_region3;
50   optional_region_ptr<UINT8> m_gfx_region4;
51   optional_region_ptr<UINT8> m_gfx_region5;
52   optional_region_ptr<UINT8> m_gfx_region6;
53   optional_region_ptr<UINT8> m_gfx_region7;
54   optional_region_ptr<UINT8> m_gfx_region8;
4055
56   static memory_region * gfxregions[];
57
4158   // up to 8 layers, 2 images per layer (interleaved on screen)
4259   std::unique_ptr<UINT8[]>  m_pixmap[8][2];
4360
r252982r252983
286303   DECLARE_VIDEO_START(neruton);
287304
288305   inline void blitter_plot_pixel( int layer, int mask, int x, int y, int pen, int wrap, int flags );
289   int blitter_drawgfx( int layer, int mask, const char *gfx, int src, int pen, int x, int y, int wrap, int flags );
306   int blitter_drawgfx( int layer, int mask, memory_region *gfx, int src, int pen, int x, int y, int wrap, int flags );
290307   void dynax_blitter_start( int flags );
291308   void jantouki_blitter_start( int flags );
292309   void jantouki_blitter2_start( int flags );
trunk/src/mame/includes/gaelco2.h
r252982r252983
1616      m_eeprom(*this, "eeprom"),
1717      m_gfxdecode(*this, "gfxdecode"),
1818      m_palette(*this, "palette"),
19      m_generic_paletteram_16(*this, "paletteram") { }
19      m_generic_paletteram_16(*this, "paletteram"),
20      m_shareram(*this, "shareram")
21   { }
2022
2123   required_device<m68000_device> m_maincpu;
2224   required_device<buffered_spriteram16_device> m_spriteram;
r252982r252983
2628   required_device<gfxdecode_device> m_gfxdecode;
2729   required_device<palette_device> m_palette;
2830   required_shared_ptr<UINT16> m_generic_paletteram_16;
31   optional_shared_ptr<UINT16> m_shareram;
2932
33   
34
3035   UINT32 snowboard_latch;
3136
3237
r252982r252983
3439   tilemap_t *m_pant[2];
3540   int m_dual_monitor;
3641
37   DECLARE_READ16_MEMBER(dallas_kludge_r);
42   DECLARE_READ16_MEMBER(dallas_kludge_r);   
43   DECLARE_READ16_MEMBER(maniacsqa_prot_r);
44
3845   DECLARE_WRITE16_MEMBER(gaelco2_coin_w);
3946   DECLARE_WRITE16_MEMBER(gaelco2_coin2_w);
4047   DECLARE_WRITE16_MEMBER(touchgo_coin_w);
r252982r252983
4552   DECLARE_DRIVER_INIT(touchgo);
4653   DECLARE_DRIVER_INIT(snowboar);
4754   DECLARE_DRIVER_INIT(alighunt);
55   DECLARE_DRIVER_INIT(maniacsqa);
4856   TILE_GET_INFO_MEMBER(get_tile_info_gaelco2_screen0);
4957   TILE_GET_INFO_MEMBER(get_tile_info_gaelco2_screen1);
5058   TILE_GET_INFO_MEMBER(get_tile_info_gaelco2_screen0_dual);
trunk/src/mame/includes/segaybd.h
r252982r252983
2626         m_suby(*this, "suby"),
2727         m_soundcpu(*this, "soundcpu"),
2828         m_linkcpu(*this, "linkcpu"),
29         m_bsprites(*this, "bsprites"),
29         m_bsprites(*this, "sprites"),
3030         m_ysprites(*this, "ysprites"),
3131         m_segaic16vid(*this, "segaic16vid"),
3232         m_digital_ports(*this, digital_ports),
trunk/src/mame/layout/fidel_fev.lay
r0r252983
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4<!-- define elements -->
5
6   <element name="ledr" defstate="0">
7      <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
8      <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
9   </element>
10   <element name="ledg" defstate="0">
11      <disk state="0"><color red="0.04" green="0.2" blue="0.046" /></disk>
12      <disk state="1"><color red="0.2" green="1.0" blue="0.23" /></disk>
13   </element>
14
15
16<!-- build screen -->
17
18   <view name="Internal Layout">
19      <bounds left="0" right="20" top="0" bottom="20" />
20
21      <bezel name="0.0" element="ledr"><bounds x="1" y="1" width="1" height="1" /></bezel>
22      <bezel name="0.1" element="ledr"><bounds x="1" y="2" width="1" height="1" /></bezel>
23      <bezel name="0.2" element="ledr"><bounds x="1" y="3" width="1" height="1" /></bezel>
24      <bezel name="0.3" element="ledr"><bounds x="1" y="4" width="1" height="1" /></bezel>
25      <bezel name="0.4" element="ledr"><bounds x="1" y="5" width="1" height="1" /></bezel>
26      <bezel name="0.5" element="ledr"><bounds x="1" y="6" width="1" height="1" /></bezel>
27      <bezel name="0.6" element="ledr"><bounds x="1" y="7" width="1" height="1" /></bezel>
28      <bezel name="0.7" element="ledr"><bounds x="1" y="8" width="1" height="1" /></bezel>
29
30      <bezel name="1.0" element="ledg"><bounds x="2" y="9" width="1" height="1" /></bezel>
31      <bezel name="1.1" element="ledg"><bounds x="3" y="9" width="1" height="1" /></bezel>
32      <bezel name="1.2" element="ledg"><bounds x="4" y="9" width="1" height="1" /></bezel>
33      <bezel name="1.3" element="ledg"><bounds x="5" y="9" width="1" height="1" /></bezel>
34      <bezel name="1.4" element="ledg"><bounds x="6" y="9" width="1" height="1" /></bezel>
35      <bezel name="1.5" element="ledg"><bounds x="7" y="9" width="1" height="1" /></bezel>
36      <bezel name="1.6" element="ledg"><bounds x="8" y="9" width="1" height="1" /></bezel>
37      <bezel name="1.7" element="ledg"><bounds x="9" y="9" width="1" height="1" /></bezel>
38
39   </view>
40</mamelayout>
trunk/src/mame/layout/fidel_sc12.lay
r0r252983
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4<!-- define elements -->
5
6   <element name="led" defstate="0">
7      <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
8      <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
9   </element>
10
11
12<!-- build screen -->
13
14   <view name="Internal Layout">
15      <bounds left="0" right="20" top="0" bottom="20" />
16
17      <bezel name="0.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
18      <bezel name="0.1" element="led"><bounds x="1" y="2" width="1" height="1" /></bezel>
19      <bezel name="0.2" element="led"><bounds x="1" y="3" width="1" height="1" /></bezel>
20      <bezel name="0.3" element="led"><bounds x="1" y="4" width="1" height="1" /></bezel>
21      <bezel name="0.4" element="led"><bounds x="1" y="5" width="1" height="1" /></bezel>
22      <bezel name="0.5" element="led"><bounds x="1" y="6" width="1" height="1" /></bezel>
23      <bezel name="0.6" element="led"><bounds x="1" y="7" width="1" height="1" /></bezel>
24      <bezel name="0.7" element="led"><bounds x="1" y="8" width="1" height="1" /></bezel>
25
26      <bezel name="1.0" element="led"><bounds x="2" y="9" width="1" height="1" /></bezel>
27      <bezel name="1.1" element="led"><bounds x="3" y="9" width="1" height="1" /></bezel>
28      <bezel name="1.2" element="led"><bounds x="4" y="9" width="1" height="1" /></bezel>
29      <bezel name="1.3" element="led"><bounds x="5" y="9" width="1" height="1" /></bezel>
30      <bezel name="1.4" element="led"><bounds x="6" y="9" width="1" height="1" /></bezel>
31      <bezel name="1.5" element="led"><bounds x="7" y="9" width="1" height="1" /></bezel>
32      <bezel name="1.6" element="led"><bounds x="8" y="9" width="1" height="1" /></bezel>
33      <bezel name="1.7" element="led"><bounds x="9" y="9" width="1" height="1" /></bezel>
34
35      <bezel name="2.0" element="led"><bounds x="11" y="7" width="1" height="1" /></bezel>
36      <bezel name="2.1" element="led"><bounds x="11" y="8" width="1" height="1" /></bezel>
37
38   </view>
39</mamelayout>
trunk/src/mame/layout/marywu.lay
r0r252983
1<?xml version="1.0"?>
2<!-- marywu.lay -->
3
4<mamelayout version="2">
5
6   <element name="digit" defstate="0">
7      <led7seg>
8         <color red="1.0" green="0.0" blue="0.0" />
9      </led7seg>
10   </element>
11
12        <element name="led" defstate="0">
13                <text string=""></text>
14                <disk state="0">
15                        <color red="0.1" green="0.025" blue="0.028" />
16                        <bounds x="0.25" y="0.25" width="0.5" height="0.5" />
17                </disk>
18                <disk state="1">
19                        <color red="1.0" green="0.25" blue="0.28" />
20                        <bounds x="0.25" y="0.25" width="0.5" height="0.5" />
21                </disk>
22        </element>
23
24   <element name="background">
25      <rect>
26         <bounds left="0" top="0" right="1" bottom="1" />
27         <color red="0.0" green="0.0" blue="0.0" />
28      </rect>
29   </element>
30
31   <view name="Default Layout">
32
33      <!-- Background -->
34      <backdrop element="background">
35         <bounds left="0" top="20" right="798" bottom="770" />
36      </backdrop>
37
38                <!-- LEDs -->
39
40                <bezel name="led4"  element="led"><bounds x="199" y="160" width="40" height="40" /></bezel>
41                <bezel name="led5"  element="led"><bounds x="249" y="160" width="40" height="40" /></bezel>
42                <bezel name="led6"  element="led"><bounds x="324" y="160" width="40" height="40" /></bezel>
43                <bezel name="led7"  element="led"><bounds x="399" y="160" width="40" height="40" /></bezel>
44                <bezel name="led8"  element="led"><bounds x="474" y="160" width="40" height="40" /></bezel>
45                <bezel name="led9"  element="led"><bounds x="549" y="160" width="40" height="40" /></bezel>
46                <bezel name="led10" element="led"><bounds x="599" y="160" width="40" height="40" /></bezel>
47
48                <bezel name="led3"  element="led"><bounds x="199" y="210" width="40" height="40" /></bezel>
49                <bezel name="led11" element="led"><bounds x="599" y="210" width="40" height="40" /></bezel>
50
51                <bezel name="led2"  element="led"><bounds x="199" y="285" width="40" height="40" /></bezel>
52                <bezel name="led12" element="led"><bounds x="599" y="285" width="40" height="40" /></bezel>
53
54                <bezel name="led1"  element="led"><bounds x="199" y="360" width="40" height="40" /></bezel>
55                <bezel name="led30" element="led"><bounds x="399" y="360" width="40" height="40" /></bezel>
56                <bezel name="led13" element="led"><bounds x="599" y="360" width="40" height="40" /></bezel>
57
58                <bezel name="led0"  element="led"><bounds x="199" y="435" width="40" height="40" /></bezel>
59                <bezel name="led14" element="led"><bounds x="599" y="435" width="40" height="40" /></bezel>
60
61                <bezel name="led23" element="led"><bounds x="199" y="510" width="40" height="40" /></bezel>
62                <bezel name="led15" element="led"><bounds x="599" y="510" width="40" height="40" /></bezel>
63
64                <bezel name="led22" element="led"><bounds x="199" y="560" width="40" height="40" /></bezel>
65                <bezel name="led21" element="led"><bounds x="249" y="560" width="40" height="40" /></bezel>
66                <bezel name="led20" element="led"><bounds x="324" y="560" width="40" height="40" /></bezel>
67                <bezel name="led19" element="led"><bounds x="399" y="560" width="40" height="40" /></bezel>
68                <bezel name="led18" element="led"><bounds x="474" y="560" width="40" height="40" /></bezel>
69                <bezel name="led17" element="led"><bounds x="549" y="560" width="40" height="40" /></bezel>
70                <bezel name="led16" element="led"><bounds x="599" y="560" width="40" height="40" /></bezel>
71
72                <bezel name="led29" element="led"><bounds x="199" y="660" width="40" height="40" /></bezel>
73                <bezel name="led28" element="led"><bounds x="279" y="660" width="40" height="40" /></bezel>
74                <bezel name="led27" element="led"><bounds x="359" y="660" width="40" height="40" /></bezel>
75                <bezel name="led26" element="led"><bounds x="439" y="660" width="40" height="40" /></bezel>
76                <bezel name="led25" element="led"><bounds x="519" y="660" width="40" height="40" /></bezel>
77                <bezel name="led24" element="led"><bounds x="599" y="660" width="40" height="40" /></bezel>
78
79                <!-- Top 7seg display modules -->
80
81                <bezel name="digit23" element="digit">
82                        <bounds left="200" top="45" right="234" bottom="84" />
83                </bezel>
84                <bezel name="digit22" element="digit">
85                        <bounds left="244" top="45" right="278" bottom="84" />
86                </bezel>
87                <bezel name="digit21" element="digit">
88                        <bounds left="288" top="45" right="322" bottom="84" />
89                </bezel>
90                <bezel name="digit20" element="digit">
91                        <bounds left="332" top="45" right="366" bottom="84" />
92                </bezel>
93
94
95                <bezel name="digit19" element="digit">
96                        <bounds left="432" top="45" right="466" bottom="84" />
97                </bezel>
98                <bezel name="digit18" element="digit">
99                        <bounds left="476" top="45" right="510" bottom="84" />
100                </bezel>
101                <bezel name="digit17" element="digit">
102                        <bounds left="520" top="45" right="554" bottom="84" />
103                </bezel>
104                <bezel name="digit16" element="digit">
105                        <bounds left="564" top="45" right="598" bottom="84" />
106                </bezel>
107
108
109
110                <!-- Middle 7seg display module -->
111
112                <bezel name="digit25" element="digit">
113                        <bounds left="355" top="421" right="389" bottom="460" />
114                </bezel>
115                <bezel name="digit24" element="digit">
116                        <bounds left="399" top="421" right="433" bottom="460" />
117                </bezel>
118
119
120
121                <!-- Bottom 7seg display modules -->
122
123      <bezel name="digit15" element="digit">
124         <bounds left="10" top="721" right="44" bottom="760" />
125      </bezel>
126      <bezel name="digit14" element="digit">
127         <bounds left="54" top="721" right="88" bottom="760" />
128      </bezel>
129      <bezel name="digit13" element="digit">
130         <bounds left="110" top="721" right="144" bottom="760" />
131      </bezel>
132      <bezel name="digit12" element="digit">
133         <bounds left="154" top="721" right="188" bottom="760" />
134      </bezel>
135      <bezel name="digit11" element="digit">
136         <bounds left="210" top="721" right="244" bottom="760" />
137      </bezel>
138      <bezel name="digit10" element="digit">
139         <bounds left="254" top="721" right="288" bottom="760" />
140      </bezel>
141      <bezel name="digit9" element="digit">
142         <bounds left="310" top="721" right="344" bottom="760" />
143      </bezel>
144      <bezel name="digit8" element="digit">
145         <bounds left="354" top="721" right="388" bottom="760" />
146      </bezel>
147      <bezel name="digit7" element="digit">
148         <bounds left="410" top="721" right="444" bottom="760" />
149      </bezel>
150      <bezel name="digit6" element="digit">
151         <bounds left="454" top="721" right="488" bottom="760" />
152      </bezel>
153      <bezel name="digit5" element="digit">
154         <bounds left="510" top="721" right="544" bottom="760" />
155      </bezel>
156      <bezel name="digit4" element="digit">
157         <bounds left="554" top="721" right="588" bottom="760" />
158      </bezel>
159      <bezel name="digit3" element="digit">
160         <bounds left="610" top="721" right="644" bottom="760" />
161      </bezel>
162      <bezel name="digit2" element="digit">
163         <bounds left="654" top="721" right="688" bottom="760" />
164      </bezel>
165      <bezel name="digit1" element="digit">
166         <bounds left="710" top="721" right="744" bottom="760" />
167      </bezel>
168      <bezel name="digit0" element="digit">
169         <bounds left="754" top="721" right="788" bottom="760" />
170      </bezel>
171   </view>
172</mamelayout>
trunk/src/mame/layout/md6802.lay
r0r252983
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="pcb">
4      <image file="md6802.png" />
5   </element>
6   <element name="redled" defstate="0">
7      <disk state="1">
8         <color red="1.0" green="0.0" blue="0.0" />
9      </disk>
10   </element>
11   <element name="button" defstate="1"/>
12   <element name="digit" defstate="1">
13      <led7seg>
14         <color red="0.75" green="0.0" blue="0.0" />
15      </led7seg>
16   </element>
17   <view name="Full Artwork">
18      <backdrop element="pcb">
19         <bounds left="0" top="0" right="800" bottom="869" />
20      </backdrop>
21      <bezel name="led1" element="redled">
22         <bounds x="290" y="668" width="15" height="15"/>
23      </bezel>
24
25      <bezel name="digit0" element="digit">
26         <bounds x="170" y="410" width="78" height="85" />
27      </bezel>
28      <bezel name="digit1" element="digit">
29         <bounds x="250" y="410" width="78" height="85" />
30      </bezel>
31      <bezel name="digit2" element="digit">
32         <bounds x="330" y="410" width="78" height="85" />
33      </bezel>
34      <bezel name="digit3" element="digit">
35         <bounds x="410" y="410" width="78" height="85" />
36      </bezel>
37      <bezel name="digit4" element="digit">
38         <bounds x="490" y="410" width="78" height="85" />
39      </bezel>
40      <bezel name="digit5" element="digit">
41         <bounds x="570" y="410" width="78" height="85" />
42      </bezel>
43
44      <!-- Buttons -->
45      <!-- Row 0 : C D E F -->
46      <bezel element="button" inputtag="LINE3" inputmask="0x01">
47         <bounds x="345" y="555" width="70" height="60" />
48      </bezel>
49
50      <bezel element="button" inputtag="LINE3" inputmask="0x02">
51         <bounds x="425" y="555" width="70" height="60" />
52      </bezel>
53
54      <bezel element="button" inputtag="LINE3" inputmask="0x04">
55         <bounds x="505" y="555" width="70" height="60" />
56      </bezel>
57
58      <bezel element="button" inputtag="LINE3" inputmask="0x08">
59         <bounds x="585" y="555" width="70" height="60" />
60      </bezel>
61
62      <!-- Buttons -->
63      <!-- Row 1 : 8 9 A B -->
64      <bezel element="button" inputtag="LINE2" inputmask="0x01">
65         <bounds x="345" y="635" width="70" height="60" />
66      </bezel>
67
68      <bezel element="button" inputtag="LINE2" inputmask="0x02">
69         <bounds x="425" y="635" width="70" height="60" />
70      </bezel>
71
72      <bezel element="button" inputtag="LINE2" inputmask="0x04">
73         <bounds x="505" y="635" width="70" height="60" />
74      </bezel>
75
76      <bezel element="button" inputtag="LINE2" inputmask="0x08">
77         <bounds x="585" y="635" width="70" height="60" />
78      </bezel>
79
80      <!-- Buttons -->
81      <!-- Row 2 : SHIFT 4 5 6 7 -->
82      <bezel element="button" inputtag="LINE4" inputmask="0x08">
83         <bounds x="265" y="715" width="70" height="60" />
84      </bezel>
85
86      <bezel element="button" inputtag="LINE1" inputmask="0x01">
87         <bounds x="345" y="715" width="70" height="60" />
88      </bezel>
89
90      <bezel element="button" inputtag="LINE1" inputmask="0x02">
91         <bounds x="425" y="715" width="70" height="60" />
92      </bezel>
93
94      <bezel element="button" inputtag="LINE1" inputmask="0x04">
95         <bounds x="505" y="715" width="70" height="60" />
96      </bezel>
97
98      <bezel element="button" inputtag="LINE1" inputmask="0x08">
99         <bounds x="585" y="715" width="70" height="60" />
100      </bezel>
101
102      <!-- Buttons -->
103      <!-- Row 3 : RESET 0 1 2 3 -->
104      <bezel element="button" inputtag="LINE4" inputmask="0x04">
105         <bounds x="265" y="795" width="70" height="60" />
106      </bezel>
107
108      <bezel element="button" inputtag="LINE0" inputmask="0x01">
109         <bounds x="345" y="795" width="70" height="60" />
110      </bezel>
111
112      <bezel element="button" inputtag="LINE0" inputmask="0x02">
113         <bounds x="425" y="795" width="70" height="60" />
114      </bezel>
115
116      <bezel element="button" inputtag="LINE0" inputmask="0x04">
117         <bounds x="505" y="795" width="70" height="60" />
118      </bezel>
119
120      <bezel element="button" inputtag="LINE0" inputmask="0x08">
121         <bounds x="585" y="795" width="70" height="60" />
122      </bezel>
123
124   </view>
125</mamelayout>
trunk/src/mame/layout/mp68a.lay
r0r252983
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="pcb">
4      <image file="mp68A.png" />
5   </element>
6   <element name="button" defstate="1"/>
7   <element name="digit" defstate="1">
8      <led7seg>
9         <color red="0.75" green="0.0" blue="0.0" />
10      </led7seg>
11   </element>
12   <view name="Full Artwork">
13      <backdrop element="pcb">
14         <bounds left="0" top="0" right="840" bottom="1105" />
15      </backdrop>
16      <bezel name="digit0" element="digit">
17         <bounds left="70" top="840" right="100" bottom="885" />
18      </bezel>
19      <bezel name="digit1" element="digit">
20         <bounds left="100" top="840" right="125" bottom="885" />
21      </bezel>
22      <bezel name="digit2" element="digit">
23         <bounds left="125" top="840" right="150" bottom="885" />
24      </bezel>
25      <bezel name="digit3" element="digit">
26         <bounds left="150" top="840" right="175" bottom="885" />
27      </bezel>
28      <bezel name="digit4" element="digit">
29         <bounds left="175" top="840" right="200" bottom="885" />
30      </bezel>
31      <bezel name="digit5" element="digit">
32         <bounds left="200" top="840" right="225" bottom="885" />
33      </bezel>
34
35      <!-- Buttons -->
36      <!-- Row 3 : C D E F -->
37      <bezel element="button" inputtag="LINE0" inputmask="0x10">
38         <bounds x="240" y="750" width="85" height="85"/>
39      </bezel>
40
41      <bezel element="button" inputtag="LINE0" inputmask="0x20">
42         <bounds x="325" y="750" width="85" height="85"/>
43      </bezel>
44
45      <bezel element="button" inputtag="LINE0" inputmask="0x40">
46         <bounds x="410" y="750" width="85" height="85"/>
47      </bezel>
48
49      <bezel element="button" inputtag="LINE0" inputmask="0x80">
50         <bounds x="495" y="750" width="85" height="85"/>
51      </bezel>
52
53      <!-- Buttons -->
54      <!-- Row 2 : 8 9 A B -->
55      <bezel element="button" inputtag="LINE1" inputmask="0x01">
56         <bounds x="240" y="835" width="85" height="85"/>
57      </bezel>
58
59      <bezel element="button" inputtag="LINE1" inputmask="0x02">
60         <bounds x="325" y="835" width="85" height="85"/>
61      </bezel>
62
63      <bezel element="button" inputtag="LINE1" inputmask="0x04">
64         <bounds x="410" y="835" width="85" height="85"/>
65      </bezel>
66
67      <bezel element="button" inputtag="LINE1" inputmask="0x08">
68         <bounds x="495" y="835" width="85" height="85"/>
69      </bezel>
70
71      <!-- Buttons -->
72      <!-- Row 1 : SHIFT 4 5 6 7 -->
73      <bezel element="button" inputtag="LINE4" inputmask="0x08">
74         <bounds x="155" y="920" width="85" height="85"/>
75      </bezel>
76
77      <bezel element="button" inputtag="LINE2" inputmask="0x10">
78         <bounds x="240" y="920" width="85" height="85"/>
79      </bezel>
80
81      <bezel element="button" inputtag="LINE2" inputmask="0x20">
82         <bounds x="325" y="920" width="85" height="85"/>
83      </bezel>
84
85      <bezel element="button" inputtag="LINE2" inputmask="0x40">
86         <bounds x="410" y="920" width="85" height="85"/>
87      </bezel>
88
89      <bezel element="button" inputtag="LINE2" inputmask="0x80">
90         <bounds x="495" y="920" width="85" height="85"/>
91      </bezel>
92
93      <!-- Buttons -->
94      <!-- Row 0 : RESET 0 1 2 3 -->
95      <bezel element="button" inputtag="LINE4" inputmask="0x04">
96         <bounds x="155" y="1005" width="85" height="85"/>
97      </bezel>
98
99      <bezel element="button" inputtag="LINE3" inputmask="0x01">
100         <bounds x="240" y="1005" width="85" height="85"/>
101      </bezel>
102
103      <bezel element="button" inputtag="LINE3" inputmask="0x02">
104         <bounds x="325" y="1005" width="85" height="85"/>
105      </bezel>
106
107      <bezel element="button" inputtag="LINE3" inputmask="0x04">
108         <bounds x="410" y="1005" width="85" height="85"/>
109      </bezel>
110
111      <bezel element="button" inputtag="LINE3" inputmask="0x08">
112         <bounds x="495" y="1005" width="85" height="85"/>
113      </bezel>
114
115   </view>
116</mamelayout>
trunk/src/mame/machine/sms.cpp
r252982r252983
851851
852852void sms_state::setup_bios()
853853{
854   m_BIOS = memregion("user1")->base();
855   m_bios_page_count = (m_BIOS ? memregion("user1")->bytes() / 0x4000 : 0);
854   if (memregion("user1") != nullptr)
855   {
856      m_BIOS = memregion("user1")->base();
857      m_bios_page_count = (m_BIOS ? memregion("user1")->bytes() / 0x4000 : 0);
858   }
856859
857860   if (m_BIOS == nullptr || m_BIOS[0] == 0x00)
858861   {
trunk/src/mame/mess.lst
r252982r252983
21512151vbrc
21522152vsc
21532153csc
2154fscc12
21542155fexcelv
21552156
21562157// Hegener & Glaser Munich
r252982r252983
24012402mc1000
24022403d6809
24032404mp68a
2405md6802
24042406mk85
24052407mk90
24062408elwro800
trunk/src/mame/video/c45.cpp
r252982r252983
231231
232232void namco_c45_road_device::device_start()
233233{
234   m_clut = memregion("clut")->base();
234   if (memregion("clut") != nullptr)
235      m_clut = memregion("clut")->base();
235236
236237   // create a tilemap for the road
237238   m_tilemap = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(namco_c45_road_device::get_road_info), this),
trunk/src/mame/video/dynax.cpp
r252982r252983
275275}
276276
277277
278static const char *const gfxregions[] = { "gfx1", "gfx2", "gfx3", "gfx4", "gfx5", "gfx6", "gfx7", "gfx8" };
279278
279
280280WRITE8_MEMBER(dynax_state::dynax_blit_romregion_w)
281281{
282   if (data < ARRAY_LENGTH(gfxregions))
282   if (data < 8)
283283      m_blit_romregion = data;
284284   LOG(("GFX%X ", data + 1));
285285}
286286
287287WRITE8_MEMBER(dynax_state::dynax_blit2_romregion_w)
288288{
289   if (data + 1 < ARRAY_LENGTH(gfxregions))
289   if (data + 1 < 8)
290290      m_blit2_romregion = data + 1;
291291   LOG(("GFX%X' ", data + 2));
292292}
r252982r252983
391391    ---- --1-   0 = Ignore the pens specified in ROM, draw everything with the pen supplied as parameter
392392    ---- ---0   Clear
393393*/
394int dynax_state::blitter_drawgfx( int layer, int mask, const char *gfx, int src, int pen, int x, int y, int wrap, int flags )
394int dynax_state::blitter_drawgfx( int layer, int mask, memory_region *gfx, int src, int pen, int x, int y, int wrap, int flags )
395395{
396   size_t rom_size = m_gfx_region.bytes();
396   if (!gfx)
397      return 0;
397398
399   size_t rom_size = gfx->bytes();
400   UINT8* rom_data = gfx->base();
401
398402   if (m_layer_layout == LAYOUT_HNORIDUR)   // e.g. yarunara
399403      pen = ((pen >> 4) & 0xf) | ((mask & 0x10) ? ((pen & 0x08) << 1) : 0);
400404   else
r252982r252983
474478         return src;
475479      }
476480
477      UINT8 cmd = m_gfx_region[src++];
481      UINT8 cmd = rom_data[src++];
478482      src &= 0xfffff;
479483      if (!(flags & 0x02))    // Ignore the pens specified in ROM, draw everything with the pen supplied as parameter
480484         pen = (pen & 0xf0) | ((cmd & 0xf0) >> 4);
r252982r252983
501505            LOG(("\nGFXROM %s OVER %08x",gfx,src));
502506            return src;
503507         }
504         x = sx + m_gfx_region[src++];
508         x = sx + rom_data[src++];
505509         src &= 0xfffff;
506510         /* fall through into next case */
507511
r252982r252983
512516            LOG(("\nGFXROM %s OVER %08x",gfx,src));
513517            return src;
514518         }
515         cmd = m_gfx_region[src++];
519         cmd = rom_data[src++];
516520         src &= 0xfffff;
517521         /* fall through into next case */
518522
r252982r252983
542546void dynax_state::dynax_blitter_start(int flags )
543547{
544548   int blit_newsrc;
549   memory_region * gfxregions[] = { memregion("gfx1"), memregion("gfx2"), memregion("gfx3"), memregion("gfx4"), memregion("gfx5"), memregion("gfx6"), memregion("gfx7"), memregion("gfx8") };
545550
546551   LOG(("XY=%X,%X SRC=%X BLIT=%X\n", m_blit_x, m_blit_y, m_blit_src, flags));
547552
r252982r252983
569574void dynax_state::jantouki_blitter_start( int flags )
570575{
571576   int blit_newsrc;
577   memory_region * gfxregions[] = { memregion("gfx1"), memregion("gfx2"), memregion("gfx3"), memregion("gfx4"), memregion("gfx5"), memregion("gfx6"), memregion("gfx7"), memregion("gfx8") };
572578
573579   LOG(("XY=%X,%X SRC=%X BLIT=%X\n", m_blit_x, m_blit_y, m_blit_src, flags));
574580
r252982r252983
596602void dynax_state::jantouki_blitter2_start( int flags )
597603{
598604   int blit2_newsrc;
605   memory_region * gfxregions[] = { memregion("gfx1"), memregion("gfx2"), memregion("gfx3"), memregion("gfx4"), memregion("gfx5"), memregion("gfx6"), memregion("gfx7"), memregion("gfx8") };
599606
600607   LOG(("XY'=%X,%X SRC'=%X BLIT'=%02X\n", m_blit2_x, m_blit2_y, m_blit2_src, flags));
601608
trunk/src/mame/video/seta.cpp
r252982r252983
295295
296296            if (new_bank != m_samples_bank)
297297            {
298               if (memregion("x1snd") == nullptr) // triplfun no longer has the hardware, but still writes here
299                  break;
300
298301               UINT8 *rom = memregion("x1snd")->base();
299302               int samples_len = memregion("x1snd")->bytes();
300303               int addr;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team