Previous 199869 Revisions Next

r18063 Friday 21st September, 2012 at 15:02:49 UTC by Miodrag Milanović
firebeat cleanup (no whatsnew)
[src/mame/drivers]firebeat.c

trunk/src/mame/drivers/firebeat.c
r18062r18063
186186   UINT32 screen_update_firebeat_0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
187187   UINT32 screen_update_firebeat_1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
188188   INTERRUPT_GEN_MEMBER(firebeat_interrupt);
189   DECLARE_READ32_MEMBER(gcu0_r);
190   DECLARE_WRITE32_MEMBER(gcu0_w);
191   DECLARE_READ32_MEMBER(gcu1_r);
192   DECLARE_WRITE32_MEMBER(gcu1_w);
193   DECLARE_READ32_MEMBER(input_r);
194   DECLARE_READ32_MEMBER(sensor_r );
195   DECLARE_READ32_MEMBER(flashram_r);
196   DECLARE_WRITE32_MEMBER(flashram_w);
197   DECLARE_READ32_MEMBER(soundflash_r);
198   DECLARE_WRITE32_MEMBER(soundflash_w);
199   DECLARE_READ32_MEMBER(atapi_command_r);
200   DECLARE_WRITE32_MEMBER(atapi_command_w);
201   DECLARE_READ32_MEMBER(atapi_control_r);
202   DECLARE_WRITE32_MEMBER(atapi_control_w);
203   DECLARE_READ32_MEMBER(comm_uart_r);
204   DECLARE_WRITE32_MEMBER(comm_uart_w);
205   DECLARE_READ32_MEMBER(cabinet_r);
206   DECLARE_READ32_MEMBER(keyboard_wheel_r);
207   DECLARE_READ32_MEMBER(midi_uart_r);
208   DECLARE_WRITE32_MEMBER(midi_uart_w);
209   DECLARE_READ32_MEMBER(extend_board_irq_r);
210   DECLARE_WRITE32_MEMBER(extend_board_irq_w);
211   DECLARE_WRITE32_MEMBER(lamp_output_w);
212   DECLARE_WRITE32_MEMBER(lamp_output_kbm_w);
213   DECLARE_WRITE32_MEMBER(lamp_output_ppp_w);
214   DECLARE_WRITE32_MEMBER(lamp_output2_w);
215   DECLARE_WRITE32_MEMBER(lamp_output2_ppp_w);
216   DECLARE_WRITE32_MEMBER(lamp_output3_w);
217   DECLARE_WRITE32_MEMBER(lamp_output3_ppp_w);
218   DECLARE_READ32_MEMBER(ppc_spu_share_r);
219   DECLARE_WRITE32_MEMBER(ppc_spu_share_w);
220   DECLARE_READ16_MEMBER(spu_unk_r);   
189221};
190222
191223
r18062r18063
708740   }
709741}
710742
711static READ32_HANDLER(gcu0_r)
743READ32_MEMBER(firebeat_state::gcu0_r)
712744{
713745   return GCU_r(space.machine(), 0, offset, mem_mask);
714746}
715747
716static WRITE32_HANDLER(gcu0_w)
748WRITE32_MEMBER(firebeat_state::gcu0_w)
717749{
718750   GCU_w(space.machine(), 0, offset, data, mem_mask);
719751}
720752
721static READ32_HANDLER(gcu1_r)
753READ32_MEMBER(firebeat_state::gcu1_r)
722754{
723755   return GCU_r(space.machine(), 1, offset, mem_mask);
724756}
725757
726static WRITE32_HANDLER(gcu1_w)
758WRITE32_MEMBER(firebeat_state::gcu1_w)
727759{
728760   GCU_w(space.machine(), 1, offset, data, mem_mask);
729761}
730762
731763/*****************************************************************************/
732764
733static READ32_HANDLER(input_r)
765READ32_MEMBER(firebeat_state::input_r)
734766{
735767   UINT32 r = 0;
736768
r18062r18063
750782   return r;
751783}
752784
753static READ32_HANDLER( sensor_r )
785READ32_MEMBER(firebeat_state::sensor_r )
754786{
755787   if (offset == 0)
756788   {
r18062r18063
762794   }
763795}
764796
765static READ32_HANDLER(flashram_r)
797READ32_MEMBER(firebeat_state::flashram_r)
766798{
767   firebeat_state *state = space.machine().driver_data<firebeat_state>();
768799   UINT32 r = 0;
769800   if (ACCESSING_BITS_24_31)
770801   {
771      r |= (state->m_flash[0]->read((offset*4)+0) & 0xff) << 24;
802      r |= (m_flash[0]->read((offset*4)+0) & 0xff) << 24;
772803   }
773804   if (ACCESSING_BITS_16_23)
774805   {
775      r |= (state->m_flash[0]->read((offset*4)+1) & 0xff) << 16;
806      r |= (m_flash[0]->read((offset*4)+1) & 0xff) << 16;
776807   }
777808   if (ACCESSING_BITS_8_15)
778809   {
779      r |= (state->m_flash[0]->read((offset*4)+2) & 0xff) << 8;
810      r |= (m_flash[0]->read((offset*4)+2) & 0xff) << 8;
780811   }
781812   if (ACCESSING_BITS_0_7)
782813   {
783      r |= (state->m_flash[0]->read((offset*4)+3) & 0xff) << 0;
814      r |= (m_flash[0]->read((offset*4)+3) & 0xff) << 0;
784815   }
785816   return r;
786817}
787818
788static WRITE32_HANDLER(flashram_w)
819WRITE32_MEMBER(firebeat_state::flashram_w)
789820{
790   firebeat_state *state = space.machine().driver_data<firebeat_state>();
791821   if (ACCESSING_BITS_24_31)
792822   {
793      state->m_flash[0]->write((offset*4)+0, (data >> 24) & 0xff);
823      m_flash[0]->write((offset*4)+0, (data >> 24) & 0xff);
794824   }
795825   if (ACCESSING_BITS_16_23)
796826   {
797      state->m_flash[0]->write((offset*4)+1, (data >> 16) & 0xff);
827      m_flash[0]->write((offset*4)+1, (data >> 16) & 0xff);
798828   }
799829   if (ACCESSING_BITS_8_15)
800830   {
801      state->m_flash[0]->write((offset*4)+2, (data >> 8) & 0xff);
831      m_flash[0]->write((offset*4)+2, (data >> 8) & 0xff);
802832   }
803833   if (ACCESSING_BITS_0_7)
804834   {
805      state->m_flash[0]->write((offset*4)+3, (data >> 0) & 0xff);
835      m_flash[0]->write((offset*4)+3, (data >> 0) & 0xff);
806836   }
807837}
808838
809static READ32_HANDLER(soundflash_r)
839READ32_MEMBER(firebeat_state::soundflash_r)
810840{
811   firebeat_state *state = space.machine().driver_data<firebeat_state>();
812841   UINT32 r = 0;
813842   fujitsu_29f016a_device *chip;
814843   if (offset >= 0 && offset < 0x200000/4)
815844   {
816      chip = state->m_flash[1];
845      chip = m_flash[1];
817846   }
818847   else
819848   {
820      chip = state->m_flash[2];
849      chip = m_flash[2];
821850   }
822851
823852   offset &= 0x7ffff;
r18062r18063
841870   return r;
842871}
843872
844static WRITE32_HANDLER(soundflash_w)
873WRITE32_MEMBER(firebeat_state::soundflash_w)
845874{
846   firebeat_state *state = space.machine().driver_data<firebeat_state>();
847875   fujitsu_29f016a_device *chip;
848876   if (offset >= 0 && offset < 0x200000/4)
849877   {
850      chip = state->m_flash[1];
878      chip = m_flash[1];
851879   }
852880   else
853881   {
854      chip = state->m_flash[2];
882      chip = m_flash[2];
855883   }
856884
857885   offset &= 0x7ffff;
r18062r18063
12171245
12181246
12191247
1220static READ32_HANDLER( atapi_command_r )
1248READ32_MEMBER(firebeat_state::atapi_command_r )
12211249{
12221250   UINT16 r;
12231251//  printf("atapi_command_r: %08X, %08X\n", offset, mem_mask);
r18062r18063
12331261   }
12341262}
12351263
1236static WRITE32_HANDLER( atapi_command_w )
1264WRITE32_MEMBER(firebeat_state::atapi_command_w )
12371265{
12381266//  printf("atapi_command_w: %08X, %08X, %08X\n", data, offset, mem_mask);
12391267
r18062r18063
12481276}
12491277
12501278
1251static READ32_HANDLER( atapi_control_r )
1279READ32_MEMBER(firebeat_state::atapi_control_r )
12521280{
12531281   UINT16 r;
12541282//  printf("atapi_control_r: %08X, %08X\n", offset, mem_mask);
r18062r18063
12651293   }
12661294}
12671295
1268static WRITE32_HANDLER( atapi_control_w )
1296WRITE32_MEMBER(firebeat_state::atapi_control_w )
12691297{
12701298   if (ACCESSING_BITS_16_31)
12711299   {
r18062r18063
12801308
12811309/*****************************************************************************/
12821310
1283static READ32_HANDLER( comm_uart_r )
1311READ32_MEMBER(firebeat_state::comm_uart_r )
12841312{
12851313   UINT32 r = 0;
12861314
r18062r18063
13041332   return r;
13051333}
13061334
1307static WRITE32_HANDLER( comm_uart_w )
1335WRITE32_MEMBER(firebeat_state::comm_uart_w )
13081336{
13091337   if (ACCESSING_BITS_24_31)
13101338   {
r18062r18063
13361364static const int kbm_cab_data[2] = { 0x2, 0x8 };
13371365static const int ppd_cab_data[2] = { 0x1, 0x9 };
13381366
1339static READ32_HANDLER( cabinet_r )
1367READ32_MEMBER(firebeat_state::cabinet_r )
13401368{
1341   firebeat_state *state = space.machine().driver_data<firebeat_state>();
13421369   UINT32 r = 0;
13431370
13441371//  printf("cabinet_r: %08X, %08X\n", offset, mem_mask);
r18062r18063
13471374   {
13481375      case 0:
13491376      {
1350         r = state->m_cur_cab_data[state->m_cab_data_ptr & 1] << 28;
1351         state->m_cab_data_ptr++;
1377         r = m_cur_cab_data[m_cab_data_ptr & 1] << 28;
1378         m_cab_data_ptr++;
13521379         return r;
13531380      }
13541381      case 2:      return 0x00000000;
r18062r18063
13601387
13611388/*****************************************************************************/
13621389
1363static READ32_HANDLER( keyboard_wheel_r )
1390READ32_MEMBER(firebeat_state::keyboard_wheel_r )
13641391{
13651392   if (offset == 0)      // Keyboard Wheel (P1)
13661393   {
r18062r18063
13741401   return 0;
13751402}
13761403
1377static READ32_HANDLER( midi_uart_r )
1404READ32_MEMBER(firebeat_state::midi_uart_r )
13781405{
13791406   UINT32 r = 0;
13801407
r18062r18063
13861413   return r;
13871414}
13881415
1389static WRITE32_HANDLER( midi_uart_w )
1416WRITE32_MEMBER(firebeat_state::midi_uart_w )
13901417{
13911418   if (ACCESSING_BITS_24_31)
13921419   {
r18062r18063
15011528// 0x10: ?
15021529// 0x20: ?
15031530
1504static READ32_HANDLER( extend_board_irq_r)
1531READ32_MEMBER(firebeat_state::extend_board_irq_r)
15051532{
1506   firebeat_state *state = space.machine().driver_data<firebeat_state>();
15071533   UINT32 r = 0;
15081534
15091535   if (ACCESSING_BITS_24_31)
15101536   {
1511      r |= (~state->m_extend_board_irq_active) << 24;
1537      r |= (~m_extend_board_irq_active) << 24;
15121538   }
15131539
15141540   return r;
15151541}
15161542
1517static WRITE32_HANDLER( extend_board_irq_w )
1543WRITE32_MEMBER(firebeat_state::extend_board_irq_w )
15181544{
1519   firebeat_state *state = space.machine().driver_data<firebeat_state>();
15201545//  printf("extend_board_irq_w: %08X, %08X, %08X\n", data, offset, mem_mask);
15211546
15221547   if (ACCESSING_BITS_24_31)
15231548   {
1524      state->m_extend_board_irq_active &= ~((data >> 24) & 0xff);
1549      m_extend_board_irq_active &= ~((data >> 24) & 0xff);
15251550
1526      state->m_extend_board_irq_enable = (data >> 24) & 0xff;
1551      m_extend_board_irq_enable = (data >> 24) & 0xff;
15271552   }
15281553}
15291554
15301555/*****************************************************************************/
15311556
1532static WRITE32_HANDLER( lamp_output_w )
1557WRITE32_MEMBER(firebeat_state::lamp_output_w )
15331558{
15341559   // -------- -------- -------- xxxxxxxx   Status LEDs (active low)
15351560   if (ACCESSING_BITS_0_7)
r18062r18063
15471572//  printf("lamp_output_w: %08X, %08X, %08X\n", data, offset, mem_mask);
15481573}
15491574
1550static WRITE32_HANDLER( lamp_output_kbm_w )
1575WRITE32_MEMBER(firebeat_state::lamp_output_kbm_w )
15511576{
15521577   lamp_output_w(space, offset, data, mem_mask);
15531578
r18062r18063
15661591   }
15671592}
15681593
1569static WRITE32_HANDLER( lamp_output_ppp_w )
1594WRITE32_MEMBER(firebeat_state::lamp_output_ppp_w )
15701595{
15711596   lamp_output_w(space, offset, data, mem_mask);
15721597
r18062r18063
16081633   }
16091634}
16101635
1611static WRITE32_HANDLER( lamp_output2_w )
1636WRITE32_MEMBER(firebeat_state::lamp_output2_w )
16121637{
16131638//  printf("lamp_output2_w: %08X, %08X, %08X\n", data, offset, mem_mask);
16141639}
16151640
1616static WRITE32_HANDLER( lamp_output2_ppp_w )
1641WRITE32_MEMBER(firebeat_state::lamp_output2_ppp_w )
16171642{
16181643   lamp_output2_w(space, offset, data, mem_mask);
16191644
r18062r18063
16421667   }
16431668}
16441669
1645static WRITE32_HANDLER( lamp_output3_w )
1670WRITE32_MEMBER(firebeat_state::lamp_output3_w )
16461671{
16471672//  printf("lamp_output3_w: %08X, %08X, %08X\n", data, offset, mem_mask);
16481673}
16491674
1650static WRITE32_HANDLER( lamp_output3_ppp_w )
1675WRITE32_MEMBER(firebeat_state::lamp_output3_ppp_w )
16511676{
16521677   lamp_output3_w(space, offset, data, mem_mask);
16531678
r18062r18063
16681693/*****************************************************************************/
16691694
16701695
1671static READ32_HANDLER(ppc_spu_share_r)
1696READ32_MEMBER(firebeat_state::ppc_spu_share_r)
16721697{
1673   firebeat_state *state = space.machine().driver_data<firebeat_state>();
16741698   UINT32 r = 0;
16751699
16761700   if (ACCESSING_BITS_24_31)
16771701   {
1678      r |= state->m_spu_shared_ram[(offset * 4) + 0] << 24;
1702      r |= m_spu_shared_ram[(offset * 4) + 0] << 24;
16791703   }
16801704   if (ACCESSING_BITS_16_23)
16811705   {
1682      r |= state->m_spu_shared_ram[(offset * 4) + 1] << 16;
1706      r |= m_spu_shared_ram[(offset * 4) + 1] << 16;
16831707   }
16841708   if (ACCESSING_BITS_8_15)
16851709   {
1686      r |= state->m_spu_shared_ram[(offset * 4) + 2] <<  8;
1710      r |= m_spu_shared_ram[(offset * 4) + 2] <<  8;
16871711   }
16881712   if (ACCESSING_BITS_0_7)
16891713   {
1690      r |= state->m_spu_shared_ram[(offset * 4) + 3] <<  0;
1714      r |= m_spu_shared_ram[(offset * 4) + 3] <<  0;
16911715   }
16921716
16931717   return r;
16941718}
16951719
1696static WRITE32_HANDLER(ppc_spu_share_w)
1720WRITE32_MEMBER(firebeat_state::ppc_spu_share_w)
16971721{
1698   firebeat_state *state = space.machine().driver_data<firebeat_state>();
16991722   if (ACCESSING_BITS_24_31)
17001723   {
1701      state->m_spu_shared_ram[(offset * 4) + 0] = (data >> 24) & 0xff;
1724      m_spu_shared_ram[(offset * 4) + 0] = (data >> 24) & 0xff;
17021725   }
17031726   if (ACCESSING_BITS_16_23)
17041727   {
1705      state->m_spu_shared_ram[(offset * 4) + 1] = (data >> 16) & 0xff;
1728      m_spu_shared_ram[(offset * 4) + 1] = (data >> 16) & 0xff;
17061729   }
17071730   if (ACCESSING_BITS_8_15)
17081731   {
1709      state->m_spu_shared_ram[(offset * 4) + 2] = (data >>  8) & 0xff;
1732      m_spu_shared_ram[(offset * 4) + 2] = (data >>  8) & 0xff;
17101733   }
17111734   if (ACCESSING_BITS_0_7)
17121735   {
1713      state->m_spu_shared_ram[(offset * 4) + 3] = (data >>  0) & 0xff;
1736      m_spu_shared_ram[(offset * 4) + 3] = (data >>  0) & 0xff;
17141737   }
17151738}
17161739
17171740#ifdef UNUSED_FUNCTION
1718static READ16_HANDLER(m68k_spu_share_r)
1741READ16_MEMBER(firebeat_state::m68k_spu_share_r)
17191742{
1720   firebeat_state *state = space.machine().driver_data<firebeat_state>();
1721   return state->m_spu_shared_ram[offset] << 8;
1743   return m_spu_shared_ram[offset] << 8;
17221744}
17231745
1724static WRITE16_HANDLER(m68k_spu_share_w)
1746WRITE16_MEMBER(firebeat_state::m68k_spu_share_w)
17251747{
1726   firebeat_state *state = space.machine().driver_data<firebeat_state>();
1727   state->m_spu_shared_ram[offset] = (data >> 8) & 0xff;
1748   m_spu_shared_ram[offset] = (data >> 8) & 0xff;
17281749}
17291750#endif
17301751
1731static READ16_HANDLER(spu_unk_r)
1752READ16_MEMBER(firebeat_state::spu_unk_r)
17321753{
17331754   return 0xffff;
17341755}
r18062r18063
17501771
17511772static ADDRESS_MAP_START( firebeat_map, AS_PROGRAM, 32, firebeat_state )
17521773   AM_RANGE(0x00000000, 0x01ffffff) AM_RAM AM_SHARE("work_ram")
1753   AM_RANGE(0x70000000, 0x70000fff) AM_READWRITE_LEGACY(midi_uart_r, midi_uart_w)
1754   AM_RANGE(0x70006000, 0x70006003) AM_WRITE_LEGACY(extend_board_irq_w)
1755   AM_RANGE(0x70008000, 0x7000800f) AM_READ_LEGACY(keyboard_wheel_r)
1756   AM_RANGE(0x7000a000, 0x7000a003) AM_READ_LEGACY(extend_board_irq_r)
1757   AM_RANGE(0x74000000, 0x740003ff) AM_READWRITE_LEGACY(ppc_spu_share_r, ppc_spu_share_w) // SPU shared RAM
1758   AM_RANGE(0x7d000200, 0x7d00021f) AM_READ_LEGACY(cabinet_r)
1759   AM_RANGE(0x7d000340, 0x7d000347) AM_READ_LEGACY(sensor_r)
1774   AM_RANGE(0x70000000, 0x70000fff) AM_READWRITE(midi_uart_r, midi_uart_w)
1775   AM_RANGE(0x70006000, 0x70006003) AM_WRITE(extend_board_irq_w)
1776   AM_RANGE(0x70008000, 0x7000800f) AM_READ(keyboard_wheel_r)
1777   AM_RANGE(0x7000a000, 0x7000a003) AM_READ(extend_board_irq_r)
1778   AM_RANGE(0x74000000, 0x740003ff) AM_READWRITE(ppc_spu_share_r, ppc_spu_share_w) // SPU shared RAM
1779   AM_RANGE(0x7d000200, 0x7d00021f) AM_READ(cabinet_r)
1780   AM_RANGE(0x7d000340, 0x7d000347) AM_READ(sensor_r)
17601781   AM_RANGE(0x7d000400, 0x7d000403) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0xffff0000)
1761   AM_RANGE(0x7d000800, 0x7d000803) AM_READ_LEGACY(input_r)
1762   AM_RANGE(0x7d400000, 0x7d5fffff) AM_READWRITE_LEGACY(flashram_r, flashram_w)
1763   AM_RANGE(0x7d800000, 0x7dbfffff) AM_READWRITE_LEGACY(soundflash_r, soundflash_w)
1764   AM_RANGE(0x7dc00000, 0x7dc0000f) AM_READWRITE_LEGACY(comm_uart_r, comm_uart_w)
1782   AM_RANGE(0x7d000800, 0x7d000803) AM_READ(input_r)
1783   AM_RANGE(0x7d400000, 0x7d5fffff) AM_READWRITE(flashram_r, flashram_w)
1784   AM_RANGE(0x7d800000, 0x7dbfffff) AM_READWRITE(soundflash_r, soundflash_w)
1785   AM_RANGE(0x7dc00000, 0x7dc0000f) AM_READWRITE(comm_uart_r, comm_uart_w)
17651786   AM_RANGE(0x7e000000, 0x7e00003f) AM_DEVREADWRITE8("rtc", rtc65271_device, rtc_r, rtc_w, 0xffffffff)
17661787   AM_RANGE(0x7e000100, 0x7e00013f) AM_DEVREADWRITE8("rtc", rtc65271_device, xram_r, xram_w, 0xffffffff)
1767   AM_RANGE(0x7e800000, 0x7e8000ff) AM_READWRITE_LEGACY(gcu0_r, gcu0_w)
1768   AM_RANGE(0x7e800100, 0x7e8001ff) AM_READWRITE_LEGACY(gcu1_r, gcu1_w)
1769   AM_RANGE(0x7fe00000, 0x7fe0000f) AM_READWRITE_LEGACY(atapi_command_r, atapi_command_w)
1770   AM_RANGE(0x7fe80000, 0x7fe8000f) AM_READWRITE_LEGACY(atapi_control_r, atapi_control_w)
1788   AM_RANGE(0x7e800000, 0x7e8000ff) AM_READWRITE(gcu0_r, gcu0_w)
1789   AM_RANGE(0x7e800100, 0x7e8001ff) AM_READWRITE(gcu1_r, gcu1_w)
1790   AM_RANGE(0x7fe00000, 0x7fe0000f) AM_READWRITE(atapi_command_r, atapi_command_w)
1791   AM_RANGE(0x7fe80000, 0x7fe8000f) AM_READWRITE(atapi_control_r, atapi_control_w)
17711792   AM_RANGE(0x7ff80000, 0x7fffffff) AM_ROM AM_REGION("user1", 0)      /* System BIOS */
17721793ADDRESS_MAP_END
17731794
17741795static ADDRESS_MAP_START( spu_map, AS_PROGRAM, 16, firebeat_state )
17751796   AM_RANGE(0x000000, 0x07ffff) AM_ROM
17761797   AM_RANGE(0x100000, 0x13ffff) AM_RAM
1777   AM_RANGE(0x340000, 0x34000f) AM_READ_LEGACY(spu_unk_r)
1798   AM_RANGE(0x340000, 0x34000f) AM_READ(spu_unk_r)
17781799ADDRESS_MAP_END
17791800
17801801/*****************************************************************************/
r18062r18063
22142235
22152236/*****************************************************************************/
22162237
2217static void init_lights(running_machine &machine, write32_space_func out1, const char *out1name, write32_space_func out2, const char *out2name, write32_space_func out3, const char *out3name)
2238static void init_lights(running_machine &machine, write32_delegate out1, write32_delegate out2, write32_delegate out3)
22182239{
2219   if(!out1) out1 = lamp_output_w, out1name = "lamp_output_w";
2220   if(!out2) out2 = lamp_output2_w, out2name = "lamp_output2_w";
2221   if(!out3) out3 = lamp_output3_w, out3name = "lamp_output3_w";
2240   firebeat_state *state = machine.driver_data<firebeat_state>();
2241   if(out1.isnull()) out1 = write32_delegate(FUNC(firebeat_state::lamp_output_w),state);
2242   if(out2.isnull()) out2 = write32_delegate(FUNC(firebeat_state::lamp_output2_w),state);
2243   if(out3.isnull()) out3 = write32_delegate(FUNC(firebeat_state::lamp_output3_w),state);
22222244
2223   machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_write_handler(0x7d000804, 0x7d000807, out1, out1name);
2224   machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_write_handler(0x7d000320, 0x7d000323, out2, out2name);
2225   machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_write_handler(0x7d000324, 0x7d000327, out3, out3name);
2245   machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x7d000804, 0x7d000807, out1);
2246   machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x7d000320, 0x7d000323, out2);
2247   machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x7d000324, 0x7d000327, out3);
22262248}
22272249
22282250static void init_firebeat(running_machine &machine)
r18062r18063
22442266
22452267   set_ibutton(state, rom);
22462268
2247   init_lights(machine, FUNC_NULL, FUNC_NULL, FUNC_NULL);
2269   init_lights(machine, write32_delegate(), write32_delegate(), write32_delegate());
22482270}
22492271
22502272DRIVER_INIT_MEMBER(firebeat_state,ppp)
22512273{
22522274   init_firebeat(machine());
2253   init_lights(machine(), FUNC(lamp_output_ppp_w), FUNC(lamp_output2_ppp_w), FUNC(lamp_output3_ppp_w));
2275   init_lights(machine(), write32_delegate(FUNC(firebeat_state::lamp_output_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output2_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output3_ppp_w),this));
22542276}
22552277
22562278DRIVER_INIT_MEMBER(firebeat_state,ppd)
22572279{
22582280   init_firebeat(machine());
2259   init_lights(machine(), FUNC(lamp_output_ppp_w), FUNC(lamp_output2_ppp_w), FUNC(lamp_output3_ppp_w));
2281   init_lights(machine(), write32_delegate(FUNC(firebeat_state::lamp_output_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output2_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output3_ppp_w),this));
22602282
22612283   m_cur_cab_data = ppd_cab_data;
22622284}
r18062r18063
22722294DRIVER_INIT_MEMBER(firebeat_state,kbm)
22732295{
22742296   init_firebeat(machine());
2275   init_lights(machine(), FUNC(lamp_output_kbm_w), FUNC_NULL, FUNC_NULL);
2297   init_lights(machine(), write32_delegate(FUNC(firebeat_state::lamp_output_kbm_w),this), write32_delegate(), write32_delegate());
22762298
22772299   init_keyboard(machine());
22782300

Previous 199869 Revisions Next


© 1997-2024 The MAME Team