Previous 199869 Revisions Next

r33937 Thursday 18th December, 2014 at 03:02:47 UTC by Jürgen Buchmüller
A try at adding switch matrix inputs. Use just part numbers for device tags. (nw)
[src/emu/machine]r10788.c ra17xx.c
[src/mame/drivers]gts1.c

trunk/src/emu/machine/r10788.c
r242448r242449
4141#include "emu.h"
4242#include "machine/r10788.h"
4343
44#define   VERBOSE   1
44#define   VERBOSE   0
4545#if VERBOSE
4646#define LOG(x) logerror x
4747#else
trunk/src/emu/machine/ra17xx.c
r242448r242449
104104        // SOS command
105105        if (data & (1 << 3)) {
106106            m_line[m_bl] = 1;   // enable output
107            if (m_enable)
108                m_iowr(m_bl, 1);
107//          if (m_enable)
108                m_iowr(m_bl, 1, 1);
109109        } else {
110110            m_line[m_bl] = 0;   // disable output
111            if (m_enable)
112                m_iowr(m_bl, 0);
111//          if (m_enable)
112                m_iowr(m_bl, 0, 1);
113113        }
114114    } else {
115115        // SES command
trunk/src/mame/drivers/gts1.c
r242448r242449
8787    gts1_state(const machine_config &mconfig, device_type type, const char *tag)
8888        : genpin_class(mconfig, type, tag)
8989        , m_maincpu(*this, "maincpu")
90        , m_switches(*this, "X")
9091    { }
9192
9293    DECLARE_DRIVER_INIT(gts1);
r242448r242449
108109private:
109110    virtual void machine_reset();
110111    required_device<cpu_device> m_maincpu;
111    UINT8 m_io[256];            //!< dummy I/O values of undefined ranges (will be removed)
112    required_ioport_array<5> m_switches;
113    UINT8 m_strobe;             //!< switches strobe lines (5 lower bits used)
112114    UINT8 m_nvram_addr;         //!< NVRAM address
113115    bool m_nvram_e2;            //!< NVRWAM enable (E2 line)
114116    bool m_nvram_wr;            //!< NVRWAM write (W/R line)
115    UINT16 m_6351_addr;
116    UINT16 m_z30_out;
117    UINT16 m_6351_addr;         //!< ROM MM6351 address (12 bits)
118    UINT16 m_z30_out;           //!< 4-to-16 decoder outputs
117119};
118120
119121static ADDRESS_MAP_START( gts1_map, AS_PROGRAM, 8, gts1_state )
r242448r242449
121123ADDRESS_MAP_END
122124
123125static ADDRESS_MAP_START( gts1_data, AS_DATA, 8, gts1_state )
124    AM_RANGE(0x0000, 0x00ff) AM_RAM // not correct
126    AM_RANGE(0x0000, 0x00ff) AM_RAM
127    AM_RANGE(0x0100, 0x01ff) AM_RAM AM_SHARE("nvram")
125128ADDRESS_MAP_END
126129
127130static ADDRESS_MAP_START( gts1_io, AS_IO, 8, gts1_state )
128    AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE ( "ra17xx_u4", ra17xx_device, io_r, io_w ) // (U4) solenoid
129    AM_RANGE(0x0030, 0x003f) AM_DEVREADWRITE ( "r10696_u3", r10696_device, io_r, io_w ) // (U3) solenoid + dips
130    AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE ( "ra17xx_u5", ra17xx_device, io_r, io_w ) // (U5) switch matrix
131    AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE ( "r10696_u2", r10696_device, io_r, io_w ) // (U2) NVRAM io chip
132    AM_RANGE(0x00d0, 0x00df) AM_DEVREADWRITE ( "r10788_u6", r10788_device, io_r, io_w ) // (U6) display chip
133    AM_RANGE(0x0000, 0x00ff) AM_READ ( gts1_io_r ) AM_WRITE( gts1_io_w )             // catch undecoded I/O accesss
134    AM_RANGE(0x0100, 0x0100) AM_READ ( gts1_pa_r ) AM_WRITE( gts1_pa_w )             // CPU I/O port A (input/output)
135    AM_RANGE(0x0101, 0x0101) AM_WRITE( gts1_pb_w )                                   // CPU I/O port B (output only)
131    AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE ( "u4", ra17xx_device, io_r, io_w ) // (U4) solenoid
132    AM_RANGE(0x0030, 0x003f) AM_DEVREADWRITE ( "u3", r10696_device, io_r, io_w ) // (U3) solenoid + dips
133    AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE ( "u5", ra17xx_device, io_r, io_w ) // (U5) switch matrix
134    AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE ( "u2", r10696_device, io_r, io_w ) // (U2) NVRAM io chip
135    AM_RANGE(0x00d0, 0x00df) AM_DEVREADWRITE ( "u6", r10788_device, io_r, io_w ) // (U6) display chip
136    AM_RANGE(0x0000, 0x00ff) AM_READ ( gts1_io_r ) AM_WRITE( gts1_io_w )         // catch undecoded I/O accesss
137    AM_RANGE(0x0100, 0x0100) AM_READ ( gts1_pa_r ) AM_WRITE( gts1_pa_w )         // CPU I/O port A (input/output)
138    AM_RANGE(0x0101, 0x0101) AM_WRITE( gts1_pb_w )                               // CPU I/O port B (output only)
136139ADDRESS_MAP_END
137140
141#define DSW_GTS1                                    \
142    PORT_START("DSW0")                              \
143    PORT_DIPNAME( 0x01, 0x00, "S01")                \
144    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
145    PORT_DIPSETTING(    0x01, DEF_STR( On ))        \
146    PORT_DIPNAME( 0x02, 0x00, "S02")                \
147    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
148    PORT_DIPSETTING(    0x02, DEF_STR( On ))        \
149    PORT_DIPNAME( 0x04, 0x00, "S03")                \
150    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
151    PORT_DIPSETTING(    0x04, DEF_STR( On ))        \
152    PORT_DIPNAME( 0x08, 0x00, "S04")                \
153    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
154    PORT_DIPSETTING(    0x08, DEF_STR( On ))        \
155    PORT_DIPNAME( 0x10, 0x00, "S05")                \
156    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
157    PORT_DIPSETTING(    0x10, DEF_STR( On ))        \
158    PORT_DIPNAME( 0x20, 0x20, "S06")                \
159    PORT_DIPSETTING(    0x00, DEF_STR( No ))        \
160    PORT_DIPSETTING(    0x20, DEF_STR( Yes ))       \
161    PORT_DIPNAME( 0x40, 0x40, "S07")                \
162    PORT_DIPSETTING(    0x00, DEF_STR( No ))        \
163    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))       \
164    PORT_DIPNAME( 0x80, 0x80, "S08")                \
165    PORT_DIPSETTING(    0x00, DEF_STR( No ))        \
166    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))       \
167    \
168    PORT_START("DSW1")                              \
169    PORT_DIPNAME( 0x01, 0x00, "S09")                \
170    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
171    PORT_DIPSETTING(    0x01, DEF_STR( On ))        \
172    PORT_DIPNAME( 0x02, 0x00, "S10")                \
173    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
174    PORT_DIPSETTING(    0x02, DEF_STR( On ))        \
175    PORT_DIPNAME( 0x04, 0x00, "S11")                \
176    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
177    PORT_DIPSETTING(    0x04, DEF_STR( On ))        \
178    PORT_DIPNAME( 0x08, 0x00, "S12")                \
179    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
180    PORT_DIPSETTING(    0x08, DEF_STR( On ))        \
181    PORT_DIPNAME( 0x10, 0x00, "S13")                \
182    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
183    PORT_DIPSETTING(    0x10, DEF_STR( On ))        \
184    PORT_DIPNAME( 0x20, 0x00, "S14")                \
185    PORT_DIPSETTING(    0x00, DEF_STR( Yes ))       \
186    PORT_DIPSETTING(    0x20, DEF_STR( No ))        \
187    PORT_DIPNAME( 0x40, 0x40, "S15")                \
188    PORT_DIPSETTING(    0x00, DEF_STR( No ))        \
189    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))       \
190    PORT_DIPNAME( 0x80, 0x00, "S16")                \
191    PORT_DIPSETTING(    0x00, DEF_STR( No ))        \
192    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))       \
193    \
194    PORT_START("DSW2")                              \
195    PORT_DIPNAME( 0x01, 0x00, "S17")                \
196    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
197    PORT_DIPSETTING(    0x01, DEF_STR( On ))        \
198    PORT_DIPNAME( 0x02, 0x00, "S18")                \
199    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
200    PORT_DIPSETTING(    0x02, DEF_STR( On ))        \
201    PORT_DIPNAME( 0x04, 0x00, "S19")                \
202    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
203    PORT_DIPSETTING(    0x04, DEF_STR( On ))        \
204    PORT_DIPNAME( 0x08, 0x00, "S20")                \
205    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
206    PORT_DIPSETTING(    0x08, DEF_STR( On ))        \
207    PORT_DIPNAME( 0x10, 0x00, "S21")                \
208    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
209    PORT_DIPSETTING(    0x10, DEF_STR( On ))        \
210    PORT_DIPNAME( 0x20, 0x00, "S22")                \
211    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
212    PORT_DIPSETTING(    0x20, DEF_STR( On ))        \
213    PORT_DIPNAME( 0x40, 0x00, "S23")                \
214    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
215    PORT_DIPSETTING(    0x40, DEF_STR( On ))        \
216    PORT_DIPNAME( 0x80, 0x00, "S24")                \
217    PORT_DIPSETTING(    0x00, DEF_STR( Off ))       \
218    PORT_DIPSETTING(    0x80, DEF_STR( On ))
219
220#define SWITCHES_GTS1 \
221    PORT_START("X.0")                        \
222    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \
223    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \
224    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \
225    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \
226    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \
227    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \
228    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \
229    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \
230    PORT_START("X.1")                        \
231    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \
232    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \
233    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \
234    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \
235    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \
236    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \
237    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \
238    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \
239    PORT_START("X.2")                        \
240    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \
241    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \
242    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \
243    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \
244    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \
245    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \
246    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \
247    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \
248    PORT_START("X.3")                        \
249    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \
250    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \
251    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \
252    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \
253    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \
254    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \
255    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \
256    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \
257    PORT_START("X.4")                        \
258    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \
259    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \
260    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \
261    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \
262    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \
263    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \
264    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \
265    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \
266
138267static INPUT_PORTS_START( gts1 )
139    PORT_START("DSW0")
140    PORT_DIPNAME( 0x01, 0x00, "S01")
141    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
142    PORT_DIPSETTING(    0x01, DEF_STR( On ))
143    PORT_DIPNAME( 0x02, 0x00, "S02")
144    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
145    PORT_DIPSETTING(    0x02, DEF_STR( On ))
146    PORT_DIPNAME( 0x04, 0x00, "S03")
147    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
148    PORT_DIPSETTING(    0x04, DEF_STR( On ))
149    PORT_DIPNAME( 0x08, 0x00, "S04")
150    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
151    PORT_DIPSETTING(    0x08, DEF_STR( On ))
152    PORT_DIPNAME( 0x10, 0x00, "S05")
153    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
154    PORT_DIPSETTING(    0x10, DEF_STR( On ))
155    PORT_DIPNAME( 0x20, 0x20, "S06")
156    PORT_DIPSETTING(    0x00, DEF_STR( No ))
157    PORT_DIPSETTING(    0x20, DEF_STR( Yes ))
158    PORT_DIPNAME( 0x40, 0x40, "S07")
159    PORT_DIPSETTING(    0x00, DEF_STR( No ))
160    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
161    PORT_DIPNAME( 0x80, 0x80, "S08")
162    PORT_DIPSETTING(    0x00, DEF_STR( No ))
163    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
268    DSW_GTS1
164269
165    PORT_START("DSW1")
166    PORT_DIPNAME( 0x01, 0x00, "S09")
167    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
168    PORT_DIPSETTING(    0x01, DEF_STR( On ))
169    PORT_DIPNAME( 0x02, 0x00, "S10")
170    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
171    PORT_DIPSETTING(    0x02, DEF_STR( On ))
172    PORT_DIPNAME( 0x04, 0x00, "S11")
173    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
174    PORT_DIPSETTING(    0x04, DEF_STR( On ))
175    PORT_DIPNAME( 0x08, 0x00, "S12")
176    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
177    PORT_DIPSETTING(    0x08, DEF_STR( On ))
178    PORT_DIPNAME( 0x10, 0x00, "S13")
179    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
180    PORT_DIPSETTING(    0x10, DEF_STR( On ))
181    PORT_DIPNAME( 0x20, 0x00, "S14")
182    PORT_DIPSETTING(    0x00, DEF_STR( Yes ))
183    PORT_DIPSETTING(    0x20, DEF_STR( No ))
184    PORT_DIPNAME( 0x40, 0x40, "S15")
185    PORT_DIPSETTING(    0x00, DEF_STR( No ))
186    PORT_DIPSETTING(    0x40, DEF_STR( Yes ))
187    PORT_DIPNAME( 0x80, 0x00, "S16")
188    PORT_DIPSETTING(    0x00, DEF_STR( No ))
189    PORT_DIPSETTING(    0x80, DEF_STR( Yes ))
270    SWITCHES_GTS1
271INPUT_PORTS_END
190272
191    PORT_START("DSW2")
192    PORT_DIPNAME( 0x01, 0x00, "S17")
193    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
194    PORT_DIPSETTING(    0x01, DEF_STR( On ))
195    PORT_DIPNAME( 0x02, 0x00, "S18")
196    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
197    PORT_DIPSETTING(    0x02, DEF_STR( On ))
198    PORT_DIPNAME( 0x04, 0x00, "S19")
199    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
200    PORT_DIPSETTING(    0x04, DEF_STR( On ))
201    PORT_DIPNAME( 0x08, 0x00, "S20")
202    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
203    PORT_DIPSETTING(    0x08, DEF_STR( On ))
204    PORT_DIPNAME( 0x10, 0x00, "S21")
205    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
206    PORT_DIPSETTING(    0x10, DEF_STR( On ))
207    PORT_DIPNAME( 0x20, 0x00, "S22")
208    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
209    PORT_DIPSETTING(    0x20, DEF_STR( On ))
210    PORT_DIPNAME( 0x40, 0x00, "S23")
211    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
212    PORT_DIPSETTING(    0x40, DEF_STR( On ))
213    PORT_DIPNAME( 0x80, 0x00, "S24")
214    PORT_DIPSETTING(    0x00, DEF_STR( Off ))
215    PORT_DIPSETTING(    0x80, DEF_STR( On ))
273static INPUT_PORTS_START( jokrpokr )
274    DSW_GTS1
275
276    PORT_START("X.0")
277    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PLAY/TEST")
278    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("POP/BUMBER")
279    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("EXTRA BALL TARGET")
280    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SPECIAL ROLLOVER")
281    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("10 POINT CONTACTS")
282    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
283    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
284    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
285
286    PORT_START("X.1")
287    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#1 COIN CHUTE")
288    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" ROLLOVER")
289    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"10\" DROP TARGET")
290    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"Q\" DROP TARGET (red)")
291    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET (black)")
292    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (black)")
293    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
294    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
295
296    PORT_START("X.2")
297    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#2 COIN CHUTE")
298    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"B\" ROLLOVER")
299    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (black)")
300    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (black)")
301    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
302    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("JOKER DROP TARGET")
303    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
304    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
305
306    PORT_START("X.3")
307    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("REPLAY BUTTON")
308    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"C\" ROLLOVER")
309    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (red)")
310    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (red)")
311    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
312    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
313    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
314    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
315
316    PORT_START("X.4")
317    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TILT PANEL")
318    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER)
319    PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER)
320    PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER)
321    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET")
322    PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)")
323    PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER)
324    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER)
216325INPUT_PORTS_END
217326
218327void gts1_state::machine_reset()
219328{
329    m_strobe = 0;
220330    m_nvram_addr = 0;
221331    m_nvram_e2 = false;
222332    m_nvram_wr = false;
r242448r242449
237347
238348WRITE8_MEMBER(gts1_state::gts1_solenoid_w)
239349{
240    switch (offset) {
350    switch (offset)
351    {
241352    case  0:
242353        LOG(("%s: outhole <- %x\n", __FUNCTION__, data));
243354        break;
r242448r242449
262373    case  7:
263374        LOG(("%s: no. 8 <- %x\n", __FUNCTION__, data));
264375        break;
265    case  8:
266    case  9:
267    case 10:
268    case 11:
376    case  8: case  9: case 10: case 11:
269377        LOG(("%s: not used [%x] <- %x\n", __FUNCTION__, offset, data));
270378        break;
271379    case 12:    // spare
r242448r242449
287395
288396READ8_MEMBER (gts1_state::gts1_switches_r)
289397{
290    UINT8 data = 0;
291    LOG(("%s: switches[%02x] -> %x\n", __FUNCTION__, offset, data));
398    UINT8 data = 1;
399    if (offset >= 8 && offset < 16) {
400        const int bit = offset - 8;
401        for (int i = 0; i < 5; i++) {
402            if (m_strobe & (1 << i)) {
403                data &= BIT(m_switches[i]->read(), bit);
404            }
405        }
406    }
407    LOG(("%s: switches[%x,%x] -> %x\n", __FUNCTION__, m_strobe, offset, data));
292408    return data;
293409}
294410
295411WRITE8_MEMBER(gts1_state::gts1_switches_w)
296412{
297    LOG(("%s: switches[%02x] <- %x\n", __FUNCTION__, offset, data));
413    LOG(("%s: switches[%x] <- %x\n", __FUNCTION__, offset, data));
414    if (offset < 5) {
415        // outputs O-0 to O-4 are the 5 strobe lines
416        m_strobe = (m_strobe & ~(1 << offset)) | ((data & 1) << offset);
417    }
298418}
299419
300420/**
r242448r242449
337457    };
338458    UINT8 a = ttl7448_mod[(data >> 0) & 15];
339459    UINT8 b = ttl7448_mod[(data >> 4) & 15];
340    LOG(("%s: offset:%d data:%02x a:%02x b:%02x\n", __FUNCTION__, offset, data, a, b));
460    // LOG(("%s: offset:%d data:%02x a:%02x b:%02x\n", __FUNCTION__, offset, data, a, b));
341461    if ((offset % 8) < 7) {
342462        output_set_indexed_value("digit8_", offset, a);
343463        output_set_indexed_value("digit8_", offset + 16, b);
r242448r242449
377497        case 0: // group A
378498            // FIXME: Schematics says TO Z5
379499            if (!m_nvram_wr && m_nvram_e2) {
380                // FIXME: read generic NVRAM data
500                UINT8* nvram = memregion("nvram")->base();
501                assert(nvram != NULL);
502                data = nvram[m_nvram_addr];
503                LOG(("%s: nvram[%02x] -> %x\n", __FUNCTION__, m_nvram_addr, data));
381504            }
382505            break;
383506        case 1: // group B
r242448r242449
406529        case 2: // group C - data bits 3:0 of NVRAM
407530            if (m_nvram_wr && m_nvram_e2) {
408531                LOG(("%s: nvram[%02x] <- %x\n", __FUNCTION__, m_nvram_addr, data & 15));
409                // FIXME: write generic NVRAM data
532                UINT8* nvram = memregion("nvram")->base();
533                assert(nvram != NULL);
534                nvram[m_nvram_addr] = data & 15;
410535            }
411536            break;
412537    }
r242448r242449
523648
524649READ8_MEMBER (gts1_state::gts1_io_r)
525650{
526    UINT8 data = m_io[offset] & 0x0f;
527    LOG(("%s: io[%02x] -> %x\n", __FUNCTION__, offset, data));
651    const UINT8 data = 0x0f;
652    LOG(("%s: unmapped io[%02x] -> %x\n", __FUNCTION__, offset, data));
528653    return data;
529654}
530655
531656WRITE8_MEMBER(gts1_state::gts1_io_w)
532657{
533    LOG(("%s: io[%02x] <- %x\n", __FUNCTION__, offset, data));
534    m_io[offset] = data;
658    LOG(("%s: unmapped io[%02x] <- %x\n", __FUNCTION__, offset, data));
535659}
536660
537661READ8_MEMBER (gts1_state::gts1_pa_r)
r242448r242449
565689    MCFG_CPU_DATA_MAP(gts1_data)
566690    MCFG_CPU_IO_MAP(gts1_io)
567691
568    //MCFG_NVRAM_ADD_0FILL("nvram")
692    MCFG_NVRAM_ADD_0FILL("nvram")
569693
570694    /* A1753CE 2048 x 8 ROM (000-7ff), 128 x 4 RAM (00-7f) and 16 I/O lines (20 ... 2f) */
571    MCFG_DEVICE_ADD( "ra17xx_u5", RA17XX, 0 )
695    MCFG_DEVICE_ADD( "u5", RA17XX, 0 )
572696    MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_switches_r) )
573697    MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_switches_w) )
574698
575699    /* A1752CF 2048 x 8 ROM (800-fff), 128 x 4 RAM (80-ff) and 16 I/O lines (40 ... 4f) */
576    MCFG_DEVICE_ADD( "ra17xx_u4", RA17XX, 0 )
700    MCFG_DEVICE_ADD( "u4", RA17XX, 0 )
577701    MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_solenoid_r) )
578702    MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_solenoid_w) )
579703
580704    /* 10696 General Purpose Input/Output */
581    MCFG_DEVICE_ADD( "r10696_u2", R10696, 0 )
705    MCFG_DEVICE_ADD( "u2", R10696, 0 )
582706    MCFG_R10696_IO( READ8 (gts1_state,gts1_nvram_r),
583707                    WRITE8(gts1_state,gts1_nvram_w) )
584708
585709    /* 10696 General Purpose Input/Output */
586    MCFG_DEVICE_ADD( "r10696_u3", R10696, 0 )
710    MCFG_DEVICE_ADD( "u3", R10696, 0 )
587711    MCFG_R10696_IO( READ8 (gts1_state,gts1_lamp_apm_r),
588712                    WRITE8(gts1_state,gts1_lamp_apm_w) )
589713
590714    /* 10788 General Purpose Display and Keyboard */
591    MCFG_DEVICE_ADD( "r10788_u6", R10788, XTAL_3_579545MHz / 18 )  // divided in the circuit
715    MCFG_DEVICE_ADD( "u6", R10788, XTAL_3_579545MHz / 18 )  // divided in the circuit
592716    MCFG_R10788_UPDATE( WRITE8(gts1_state,gts1_display_w) )
593717
594718    /* Video */
r242448r242449
849973ROM_END
850974
851975
852GAME(1977,  gts1,       0,          gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "System 1", GAME_IS_BIOS_ROOT)
976GAME(1977,  gts1,       0,          gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "System 1", GAME_IS_BIOS_ROOT)
853977
854978//Exact same roms as gts1 with added hardware we'll likely need roms for to emulate properly
855GAME(1979,  gts1s,      gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "System 1 with sound board", GAME_IS_BIOS_ROOT)
856GAME(19??,  sys1test,   gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "System 1 Test prom",                   GAME_IS_SKELETON_MECHANICAL)
979GAME(1979,  gts1s,      gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "System 1 with sound board", GAME_IS_BIOS_ROOT)
980GAME(19??,  sys1test,   gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "System 1 Test prom",                   GAME_IS_SKELETON_MECHANICAL)
857981
858982// chimes
859GAME(1977,  cleoptra,   gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Cleopatra",                            GAME_IS_SKELETON_MECHANICAL)
860GAME(1978,  sinbad,     gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Sinbad",                               GAME_IS_SKELETON_MECHANICAL)
861GAME(1978,  sinbadn,    sinbad,     gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Sinbad (Norway)",                      GAME_IS_SKELETON_MECHANICAL)
862GAME(1978,  jokrpokr,   gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Joker Poker",                          GAME_IS_SKELETON_MECHANICAL)
863GAME(1978,  dragon,     gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Dragon",                               GAME_IS_SKELETON_MECHANICAL)
864GAME(1979,  solaride,   gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Solar Ride",                           GAME_IS_SKELETON_MECHANICAL)
865GAME(1979,  countdwn,   gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Count-Down",                           GAME_IS_SKELETON_MECHANICAL)
983GAME(1977,  cleoptra,   gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Cleopatra",                            GAME_IS_SKELETON_MECHANICAL)
984GAME(1978,  sinbad,     gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Sinbad",                               GAME_IS_SKELETON_MECHANICAL)
985GAME(1978,  sinbadn,    sinbad,     gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Sinbad (Norway)",                      GAME_IS_SKELETON_MECHANICAL)
986GAME(1978,  jokrpokr,   gts1,       gts1,   jokrpokr, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Joker Poker",                          GAME_IS_SKELETON_MECHANICAL)
987GAME(1978,  dragon,     gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Dragon",                               GAME_IS_SKELETON_MECHANICAL)
988GAME(1979,  solaride,   gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Solar Ride",                           GAME_IS_SKELETON_MECHANICAL)
989GAME(1979,  countdwn,   gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Count-Down",                           GAME_IS_SKELETON_MECHANICAL)
866990
867991// NE555 beeper
868GAME(1978,  closeenc,   gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Close Encounters of the Third Kind",   GAME_IS_SKELETON_MECHANICAL)
869GAME(1978,  charlies,   gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Charlie's Angels",                     GAME_IS_SKELETON_MECHANICAL)
870GAME(1979,  pinpool,    gts1,       gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Pinball Pool",                         GAME_IS_SKELETON_MECHANICAL)
992GAME(1978,  closeenc,   gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Close Encounters of the Third Kind",   GAME_IS_SKELETON_MECHANICAL)
993GAME(1978,  charlies,   gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Charlie's Angels",                     GAME_IS_SKELETON_MECHANICAL)
994GAME(1979,  pinpool,    gts1,       gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Pinball Pool",                         GAME_IS_SKELETON_MECHANICAL)
871995
872996// sound card
873GAME(1979,  totem,      gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Totem",                                GAME_IS_SKELETON_MECHANICAL)
874GAME(1979,  hulk,       gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "The Incredible Hulk",                  GAME_IS_SKELETON_MECHANICAL)
875GAME(1979,  geniep,     gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Genie (Pinball)",                      GAME_IS_SKELETON_MECHANICAL)
876GAME(1980,  buckrgrs,   gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Buck Rogers",                          GAME_IS_SKELETON_MECHANICAL)
877GAME(1980,  torch,      gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Torch",                                GAME_IS_SKELETON_MECHANICAL)
878GAME(1980,  roldisco,   gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Roller Disco",                         GAME_IS_SKELETON_MECHANICAL)
879GAME(1980,  astannie,   gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Gottlieb",     "Asteroid Annie and the Aliens",        GAME_IS_SKELETON_MECHANICAL)
997GAME(1979,  totem,      gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Totem",                                GAME_IS_SKELETON_MECHANICAL)
998GAME(1979,  hulk,       gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "The Incredible Hulk",                  GAME_IS_SKELETON_MECHANICAL)
999GAME(1979,  geniep,     gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Genie (Pinball)",                      GAME_IS_SKELETON_MECHANICAL)
1000GAME(1980,  buckrgrs,   gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Buck Rogers",                          GAME_IS_SKELETON_MECHANICAL)
1001GAME(1980,  torch,      gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Torch",                                GAME_IS_SKELETON_MECHANICAL)
1002GAME(1980,  roldisco,   gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Roller Disco",                         GAME_IS_SKELETON_MECHANICAL)
1003GAME(1980,  astannie,   gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Gottlieb",     "Asteroid Annie and the Aliens",        GAME_IS_SKELETON_MECHANICAL)
8801004
8811005// homebrew
882GAME(1986,  hexagone,   gts1s,      gts1,   gts1, gts1_state,   gts1,   ROT0,   "Christian Tabart",        "L'Hexagone (France)",       GAME_IS_SKELETON_MECHANICAL)
1006GAME(1986,  hexagone,   gts1s,      gts1,   gts1,     gts1_state,   gts1,   ROT0,   "Christian Tabart",        "L'Hexagone (France)",       GAME_IS_SKELETON_MECHANICAL)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team