Previous 199869 Revisions Next

r18512 Sunday 14th October, 2012 at 06:34:18 UTC by Robbbert
videodens : wip
[src/mame]mame.mak
[src/mame/drivers]vd.c
[src/mame/machine]genpin.h

trunk/src/mame/drivers/vd.c
r18511r18512
11/**************************************************************************************
22
3Pinball
4Videodens
3    Pinball
4    Videodens
55
6    PinMAME used as reference (unable to find any info at all on the net).
7
8    Nothing in this driver is confirmed except where noted.
9
610***************************************************************************************/
711
812
9#include "emu.h"
13#include "machine/genpin.h"
1014#include "cpu/z80/z80.h"
15#include "sound/ay8910.h"
16#include "vd.lh"
1117
1218class vd_state : public driver_device
1319{
1420public:
1521   vd_state(const machine_config &mconfig, device_type type, const char *tag)
1622      : driver_device(mconfig, type, tag),
17        m_maincpu(*this, "maincpu")
23   m_maincpu(*this, "maincpu")
1824   { }
1925
26   DECLARE_READ8_MEMBER(dsw_r) { return 0; }
27   DECLARE_WRITE8_MEMBER(col_w);
28   DECLARE_WRITE8_MEMBER(disp_w);
29   DECLARE_WRITE8_MEMBER(lamp_w) { };
30   DECLARE_WRITE8_MEMBER(sol_w) { };
31   TIMER_DEVICE_CALLBACK_MEMBER(irq);
2032protected:
2133
2234   // devices
r18511r18512
2436
2537   // driver_device overrides
2638   virtual void machine_reset();
27public:
28   DECLARE_DRIVER_INIT(vd);
39private:
40   UINT8 m_t_c;
41   UINT8 segment[5];
2942};
3043
3144
3245static ADDRESS_MAP_START( vd_map, AS_PROGRAM, 8, vd_state )
3346   AM_RANGE(0x0000, 0x5fff) AM_ROM
34   AM_RANGE(0x6000, 0x67ff) AM_RAM
47   AM_RANGE(0x6000, 0x62ff) AM_RAM
48   AM_RANGE(0x6700, 0x67ff) AM_RAM
3549ADDRESS_MAP_END
3650
3751static ADDRESS_MAP_START( vd_io, AS_IO, 8, vd_state )
3852   ADDRESS_MAP_GLOBAL_MASK(0xff)
39   //AM_RANGE(0x00,0x05) AM_READ(sw_r)
40   //AM_RANGE(0x20,0x27) AM_WRITE(lamp_w)
41   //AM_RANGE(0x28,0x28) AM_WRITE(sol_w)
42   //AM_RANGE(0x40,0x44) AM_WRITE(disp_w)
43   //AM_RANGE(0x60,0x60) AM_WRITE(AY8910_control_port_0_w)
44   //AM_RANGE(0x61,0x61) AM_READ(sw0_r)
45   //AM_RANGE(0x62,0x62) AM_WRITE(AY8910_write_port_0_w)
46   //AM_RANGE(0x80,0x80) AM_WRITE(AY8910_control_port_1_w)
47   //AM_RANGE(0x82,0x82) AM_WRITE(AY8910_write_port_1_w)
48   //AM_RANGE(0xa0,0xa0) AM_READ(AY8910_read_port_1_r)
49   //AM_RANGE(0xc0,0xc0) AM_WRITE(col_w)
53   AM_RANGE(0x00,0x00) AM_READ_PORT("X0")
54   AM_RANGE(0x01,0x01) AM_READ_PORT("X1")
55   AM_RANGE(0x02,0x02) AM_READ_PORT("X2")
56   AM_RANGE(0x03,0x03) AM_READ_PORT("X3")
57   AM_RANGE(0x04,0x04) AM_READ_PORT("X4")
58   AM_RANGE(0x05,0x05) AM_READ_PORT("X5")
59   AM_RANGE(0x20,0x27) AM_WRITE(lamp_w)
60   AM_RANGE(0x28,0x28) AM_WRITE(sol_w)
61   AM_RANGE(0x40,0x44) AM_WRITE(disp_w)
62   AM_RANGE(0x60,0x60) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w)
63   AM_RANGE(0x61,0x61) AM_READ_PORT("DSW") //AM_READ(dsw_r)
64   AM_RANGE(0x62,0x62) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w)
65   AM_RANGE(0x80,0x80) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w)
66   AM_RANGE(0x82,0x82) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w)
67   AM_RANGE(0xa0,0xa0) AM_DEVREAD_LEGACY("ay2", ay8910_r)
68   AM_RANGE(0xc0,0xc0) AM_WRITE(col_w)
5069ADDRESS_MAP_END
5170
5271static INPUT_PORTS_START( vd )
72   PORT_START("DSW")
73   PORT_DIPNAME( 0x0001, 0x0000, "Accounting #1")
74   PORT_DIPSETTING(0x0000, DEF_STR(Off))
75   PORT_DIPSETTING(0x0001, DEF_STR(On))
76   PORT_DIPNAME( 0x0002, 0x0000, "Accounting #2")
77   PORT_DIPSETTING(0x0000, DEF_STR(Off))
78   PORT_DIPSETTING(0x0002, DEF_STR(On))
79   PORT_DIPNAME( 0x0004, 0x0000, "Accounting #3")
80   PORT_DIPSETTING(0x0000, DEF_STR(Off))
81   PORT_DIPSETTING(0x0004, DEF_STR(On))
82   PORT_DIPNAME( 0x0018, 0x0000, "Credits per coin (chute #1/#2)")
83   PORT_DIPSETTING(0x0018, "0.5/3" )
84   PORT_DIPSETTING(0x0000, "1/5" )
85   PORT_DIPSETTING(0x0008, "1/6" )
86   PORT_DIPSETTING(0x0010, "2/8" )
87   PORT_DIPNAME( 0x0020, 0x0000, "S6")
88   PORT_DIPSETTING(0x0000, "0" )
89   PORT_DIPSETTING(0x0020, "1" )
90   PORT_DIPNAME( 0x0040, 0x0000, "Match feature")
91   PORT_DIPSETTING(0x0040, DEF_STR(Off))
92   PORT_DIPSETTING(0x0000, DEF_STR(On))
93   PORT_DIPNAME( 0x0080, 0x0000, "S8")
94   PORT_DIPSETTING(0x0000, "0" )
95   PORT_DIPSETTING(0x0080, "1" )
96
97   PORT_START("X0")
98   PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_START1)
99   PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_COIN1)
100   PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_COIN2)
101   PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_TILT)
102
103   PORT_START("X1")
104   PORT_START("X2")
105   PORT_START("X3")
106   PORT_START("X4")
107   PORT_START("X5")
53108INPUT_PORTS_END
54109
55void vd_state::machine_reset()
110TIMER_DEVICE_CALLBACK_MEMBER( vd_state::irq )
56111{
112   if (m_t_c > 40)
113      m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
114   else
115      m_t_c++;
57116}
58117
59DRIVER_INIT_MEMBER(vd_state,vd)
118WRITE8_MEMBER( vd_state::disp_w )
60119{
120   segment[offset] = data;
121   if (!offset)
122      m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
61123}
62124
125WRITE8_MEMBER( vd_state::col_w )
126{
127   if (data != 0x3f)
128   {
129      data &= 7;
130      output_set_digit_value(data + 11, segment[0]);
131      output_set_digit_value(data + 21, segment[1]);
132      output_set_digit_value(data + 31, segment[2]);
133      output_set_digit_value(data + 41, segment[3]);
134      output_set_digit_value(data + 51, segment[4]);
135   }
136}
137
138void vd_state::machine_reset()
139{
140   m_t_c = 0;
141}
142
63143static MACHINE_CONFIG_START( vd, vd_state )
64144   /* basic machine hardware */
65145   MCFG_CPU_ADD("maincpu", Z80, 4000000)
66146   MCFG_CPU_PROGRAM_MAP(vd_map)
67147   MCFG_CPU_IO_MAP(vd_io)
148   MCFG_TIMER_DRIVER_ADD_PERIODIC("irq", vd_state, irq, attotime::from_hz(484))
149
150   /* Sound */
151   MCFG_FRAGMENT_ADD( genpin_audio )
152   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
153   MCFG_SOUND_ADD("ay1", AY8910, 2000000) //?
154   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.33/3)
155   MCFG_SOUND_ADD("ay2", AY8910, 2000000) //?
156   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33/3)
157
158   /* Video */
159   MCFG_DEFAULT_LAYOUT(layout_vd)
68160MACHINE_CONFIG_END
69161
70162/*-------------------------------------------------------------------
r18511r18512
99191ROM_END
100192#endif
101193
102GAME(1986,  break86,  0,    vd,  vd, vd_state,  vd,  ROT0,  "Videodens",    "Break '86", GAME_IS_SKELETON_MECHANICAL)
103GAME(1986,  papillon, 0,    vd,  vd, vd_state,  vd,  ROT0,  "Videodens",    "Papillon",  GAME_IS_SKELETON_MECHANICAL)
104//GAME(19??,  ator,     0,    vd,  vd, vd_state,  vd,  ROT0,  "Videodens",    "Ator",      GAME_IS_SKELETON_MECHANICAL)
194GAME(1986, break86,  0,    vd,  vd, driver_device, 0,  ROT0,  "Videodens", "Break '86", GAME_IS_SKELETON_MECHANICAL)
195GAME(1986, papillon, 0,    vd,  vd, driver_device, 0,  ROT0,  "Videodens", "Papillon", GAME_IS_SKELETON_MECHANICAL)
196//GAME(19??, ator,     0,    vd,  vd, driver_device, 0,  ROT0,  "Videodens", "Ator", GAME_IS_SKELETON_MECHANICAL)
trunk/src/mame/machine/genpin.h
r18511r18512
44
55#include "emu.h"
66#include "sound/samples.h"
7#include "machine/nvram.h"
78
89
9
1010static const char *const genpin_sample_names[] =
1111{
1212   "*genpin",
trunk/src/mame/mame.mak
r18511r18512
22702270
22712271$(DRIVERS)/undrfire.o:   $(LAYOUT)/cbombers.lh
22722272
2273$(DRIVERS)/vd.o:   $(LAYOUT)/vd.lh
2274
22732275$(DRIVERS)/vicdual.o:   $(LAYOUT)/depthch.lh
22742276
22752277$(DRIVERS)/videopin.o:   $(LAYOUT)/videopin.lh

Previous 199869 Revisions Next


© 1997-2024 The MAME Team