Previous 199869 Revisions Next

r20506 Saturday 26th January, 2013 at 19:57:44 UTC by David Haywood
bfm_sc4 - cleanup some tagmap use

(note, previous change to screenless refreshrate for the synths still causes issues here)
[src/mame/drivers]bfm_sc4h.c
[src/mame/includes]bfm_sc45.h

trunk/src/mame/includes/bfm_sc45.h
r20505r20506
2020         m_ymz(*this, "ymz"),
2121         m_maincpu(*this, "maincpu"),
2222         m_vfd0(*this, "vfd0"),
23         m_nvram(*this, "nvram")
24
23         m_nvram(*this, "nvram"),
24         m_io1(*this, "IN-0"),
25         m_io2(*this, "IN-1"),
26         m_io3(*this, "IN-2"),
27         m_io4(*this, "IN-3"),
28         m_io5(*this, "IN-4"),
29         m_io6(*this, "IN-5"),
30         m_io7(*this, "IN-6"),
31         m_io8(*this, "IN-7"),
32         m_io9(*this, "IN-8"),
33         m_io10(*this, "IN-9"),
34         m_io11(*this, "IN-A"),
35         m_io12(*this, "IN-B")
2536   {
2637      m_chk41addr = -1;
2738      m_dochk41 = false;
r20505r20506
5970
6071   UINT16 m_mainram[0x10000/2];
6172
73   UINT8 read_input_matrix(running_machine &machine, int row);
6274
6375   DECLARE_WRITE8_MEMBER(mux_output_w);
6476   DECLARE_WRITE8_MEMBER(mux_output2_w);
r20505r20506
484496
485497   DECLARE_MACHINE_START(sc4);
486498   DECLARE_MACHINE_RESET(sc4);
499
500protected:
501   required_ioport m_io1;
502   required_ioport m_io2;
503   required_ioport m_io3;
504   required_ioport m_io4;
505   required_ioport m_io5;
506   required_ioport m_io6;
507   required_ioport m_io7;
508   required_ioport m_io8;
509   required_ioport m_io9;
510   required_ioport m_io10;
511   required_ioport m_io11;
512   required_ioport m_io12;
487513};
488514
489515class sc4_adder4_state : public sc4_state
trunk/src/mame/drivers/bfm_sc4h.c
r20505r20506
4242#include "sc4_dmd.lh"
4343
4444
45UINT8 read_input_matrix(running_machine &machine, int row)
45UINT8 sc4_state::read_input_matrix(running_machine &machine, int row)
4646{
47   static const char *const portnames[16] = { "IN-0", "IN-1", "IN-2", "IN-3", "IN-4", "IN-5", "IN-6", "IN-7", "IN-8", "IN-9", "IN-A", "IN-B" };
47   ioport_port* portnames[16] = { m_io1, m_io2, m_io3, m_io4, m_io5, m_io6, m_io7, m_io8, m_io9, m_io10, m_io11, m_io12 };
4848   UINT8 value;
4949
5050   if (row<4)
5151   {
52      value = (machine.root_device().ioport(portnames[row])->read_safe(0x00) & 0x1f) + ((machine.root_device().ioport(portnames[row+8])->read_safe(0x00) & 0x07) << 5);
52      value = ((portnames[row])->read_safe(0x00) & 0x1f) + (((portnames[row+8])->read_safe(0x00) & 0x07) << 5);
5353   }
5454   else
5555   {
56      value = (machine.root_device().ioport(portnames[row])->read_safe(0x00) & 0x1f) + ((machine.root_device().ioport(portnames[row+4])->read_safe(0x00) & 0x18) << 2);
56      value = ((portnames[row])->read_safe(0x00) & 0x1f) + (((portnames[row+4])->read_safe(0x00) & 0x18) << 2);
5757   }
5858
5959   return value;
r20505r20506
934934   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
935935
936936
937   PORT_START("IN-a")
937   PORT_START("IN-A")
938938   PORT_DIPNAME( 0x01, 0x00, "IN-a:0" )
939939   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
940940   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
r20505r20506
952952   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
953953
954954
955   PORT_START("IN-b")
955   PORT_START("IN-B")
956956   PORT_DIPNAME( 0x01, 0x00, "IN-b:0" )
957957   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
958958   PORT_DIPSETTING(    0x01, DEF_STR( On ) )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team