Previous 199869 Revisions Next

r35005 Friday 13th February, 2015 at 20:02:01 UTC by hap
(MESS)New Working Game Added
----------------------
Tomy Alien Chase [hap, Kevin Horton]
[src/mess/drivers]alnchase.c wildfire.c

trunk/src/mess/drivers/alnchase.c
r243516r243517
55  Tomy Alien Chase (manufactured in Japan)
66  * boards are labeled TN-16
77  * NEC uCOM-43 MCU, labeled D553C 258
8  * red/green VFD display with color overlay, 2-sided (opposing player sees a mirrored image)
8  * red/green VFD display with color overlay, 2-sided*
9 
10  *Player one views the VFD from the front (grid+filament side) while the
11  opposite player views it from the back side (through the conductive traces),
12  basically a mirror-image.
13 
14  This is a space-themed tabletop VFD electronic game. To start, simply
15  press [UP]. Hold a joystick direction to move around.
916
17  NOTE!: MESS external artwork is required to be able to play
1018
1119***************************************************************************/
1220
r243516r243517
2331   alnchase_state(const machine_config &mconfig, device_type type, const char *tag)
2432      : driver_device(mconfig, type, tag),
2533      m_maincpu(*this, "maincpu"),
34      m_button_matrix(*this, "IN"),
2635      m_speaker(*this, "speaker")
2736   { }
2837
2938   required_device<cpu_device> m_maincpu;
39   required_ioport_array<2> m_button_matrix;
3040   required_device<speaker_sound_device> m_speaker;
3141   
42   UINT8 m_input_mux;
43   UINT32 m_plate;
44   UINT16 m_grid;
45
46   DECLARE_READ8_MEMBER(input_r);
47   DECLARE_WRITE8_MEMBER(display_w);
48   DECLARE_WRITE8_MEMBER(port_e_w);
49
50   UINT32 m_vfd_state[0x10];
51   void update_vfd();
52
3253   virtual void machine_start();
3354};
3455
3556
3657
58/***************************************************************************
59
60  Display
61
62***************************************************************************/
63
64void alnchase_state::update_vfd()
65{
66   for (int i = 0; i < 9; i++)
67      if (m_grid & (1 << i) && m_vfd_state[i] != m_plate)
68      {
69         // on difference, send to output
70         for (int j = 0; j < 17; j++)
71            output_set_lamp_value(i*100 + j, m_plate >> j & 1);
72         
73         m_vfd_state[i] = m_plate;
74      }
75}
76
77
78
79/***************************************************************************
80
81  I/O
82
83***************************************************************************/
84
85READ8_MEMBER(alnchase_state::input_r)
86{
87   UINT8 inp = 0;
88
89   // read selected button rows
90   for (int i = 0; i < 2; i++)
91      if (m_input_mux >> i & 1)
92         inp |= m_button_matrix[i]->read();
93
94   return inp;
95}
96
97WRITE8_MEMBER(alnchase_state::display_w)
98{
99   int shift;
100   
101   if (offset <= NEC_UCOM4_PORTE)
102   {
103      // C/D/E0: vfd matrix grid
104      shift = (offset - NEC_UCOM4_PORTC) * 4;
105      m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
106     
107      // C0(grid 0): input enable PL1
108      // D0(grid 4): input enable PL2
109      m_input_mux = (m_grid & 1) | (m_grid >> 3 & 2);
110   }
111   
112   if (offset >= NEC_UCOM4_PORTE)
113   {
114      // E23/F/G/H/I: vfd matrix plate
115      shift = (offset - NEC_UCOM4_PORTE) * 4;
116      m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2;
117   }
118   
119   update_vfd();
120}
121
122WRITE8_MEMBER(alnchase_state::port_e_w)
123{
124   display_w(space, offset, data);
125
126   // E1: speaker out
127   m_speaker->level_w(data >> 1 & 1);
128}
129
130
131
132/***************************************************************************
133
134  Inputs
135
136***************************************************************************/
137
138/* physical button layout and labels is like this:
139
140    POWER SOUND LEVEL PLAYER
141     ON    ON    PRO   TWO        START
142      o     o     |     |   
143      |     |     |     |       [joystick]
144      |     |     o     o
145     OFF   OFF   AMA   ONE     GAME 0,1,2,3
146   
147    1 PLAYER SIDE
148   
149    other player side only has a joystick
150*/
151
37152static INPUT_PORTS_START( alnchase )
153   PORT_START("IN.0") // C0 port A
154   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
155   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
156   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
157   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
158
159   PORT_START("IN.1") // D0 port A
160   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) // on non-mirrored view, swap P2 left/right
161   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) // "
162   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
163   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
164
165   PORT_START("SW") // port B
166   PORT_CONFNAME( 0x01, 0x01, "Players" )
167   PORT_CONFSETTING(    0x01, "1" )
168   PORT_CONFSETTING(    0x00, "2" )
169   PORT_CONFNAME( 0x02, 0x00, DEF_STR( Difficulty ) )
170   PORT_CONFSETTING(    0x00, "Amateur" )
171   PORT_CONFSETTING(    0x02, "Professional" )
172   PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
38173INPUT_PORTS_END
39174
40175
r243516r243517
47182
48183void alnchase_state::machine_start()
49184{
185   // zerofill
186   memset(m_vfd_state, 0, sizeof(m_vfd_state));
187   m_input_mux = 0;
188   m_plate = 0;
189   m_grid = 0;
190
191   // register for savestates
192   save_item(NAME(m_vfd_state));
193   save_item(NAME(m_input_mux));
194   save_item(NAME(m_plate));
195   save_item(NAME(m_grid));
50196}
51197
52198
r243516r243517
54200
55201   /* basic machine hardware */
56202   MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
203   MCFG_UCOM4_READ_A_CB(READ8(alnchase_state, input_r))
204   MCFG_UCOM4_READ_B_CB(IOPORT("SW"))
205   MCFG_UCOM4_WRITE_C_CB(WRITE8(alnchase_state, display_w))
206   MCFG_UCOM4_WRITE_D_CB(WRITE8(alnchase_state, display_w))
207   MCFG_UCOM4_WRITE_E_CB(WRITE8(alnchase_state, port_e_w))
208   MCFG_UCOM4_WRITE_F_CB(WRITE8(alnchase_state, display_w))
209   MCFG_UCOM4_WRITE_G_CB(WRITE8(alnchase_state, display_w))
210   MCFG_UCOM4_WRITE_H_CB(WRITE8(alnchase_state, display_w))
211   MCFG_UCOM4_WRITE_I_CB(WRITE8(alnchase_state, display_w))
57212
58213   MCFG_DEFAULT_LAYOUT(layout_alnchase)
59214
r243516r243517
79234ROM_END
80235
81236
82CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
237CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_NOT_WORKING )
trunk/src/mess/drivers/wildfire.c
r243516r243517
55  Parker Brothers Wildfire, by Bob and Holly Doyle (prototype), and Garry Kitchen
66  * AMI S2150, labeled C10641
77
8  x
8  This is an electronic handheld pinball game. It has dozens of small leds
9  to create the illusion of a moving ball, and even the flippers are leds.
10  A drawing of a pinball table is added as overlay.
911
12  NOTE!: MESS external artwork is required to be able to play
1013
14
1115  TODO:
1216  - no sound
1317  - flipper buttons aren't working correctly


Previous 199869 Revisions Next


© 1997-2024 The MAME Team