trunk/src/mame/drivers/segacoin.c
r0 | r241636 | |
| 1 | // license:BSD-3-Clause |
| 2 | // copyright-holders:hap |
| 3 | /*************************************************************************** |
| 4 | |
| 5 | Sega Z80 Coin Pusher hardware |
| 6 | |
| 7 | 1992 - Western Dream |
| 8 | * 2 x Z80 (prg, sound), 3 x YM3438 (6ch), .. |
| 9 | Hexagon shaped cab, with a toy train riding circles in the top compartment. |
| 10 | 6 players, each with a coin pusher, and a LED roulette on the back panel. |
| 11 | |
| 12 | more... |
| 13 | |
| 14 | |
| 15 | TODO: |
| 16 | - everything |
| 17 | |
| 18 | ***************************************************************************/ |
| 19 | |
| 20 | #include "emu.h" |
| 21 | #include "cpu/z80/z80.h" |
| 22 | //#include "sound/2612intf.h" |
| 23 | |
| 24 | |
| 25 | class segacoin_state : public driver_device |
| 26 | { |
| 27 | public: |
| 28 | segacoin_state(const machine_config &mconfig, device_type type, const char *tag) |
| 29 | : driver_device(mconfig, type, tag), |
| 30 | m_maincpu(*this, "maincpu"), |
| 31 | m_audiocpu(*this, "audiocpu") |
| 32 | { } |
| 33 | |
| 34 | required_device<cpu_device> m_maincpu; |
| 35 | required_device<cpu_device> m_audiocpu; |
| 36 | }; |
| 37 | |
| 38 | |
| 39 | /*************************************************************************** |
| 40 | |
| 41 | I/O |
| 42 | |
| 43 | ***************************************************************************/ |
| 44 | |
| 45 | /* Memory maps */ |
| 46 | |
| 47 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, segacoin_state ) |
| 48 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 49 | AM_RANGE(0xe000, 0xffff) AM_RAM |
| 50 | ADDRESS_MAP_END |
| 51 | |
| 52 | static ADDRESS_MAP_START( main_portmap, AS_IO, 8, segacoin_state ) |
| 53 | ADDRESS_MAP_UNMAP_HIGH |
| 54 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 55 | ADDRESS_MAP_END |
| 56 | |
| 57 | |
| 58 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, segacoin_state ) |
| 59 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 60 | AM_RANGE(0xe000, 0xffff) AM_RAM |
| 61 | ADDRESS_MAP_END |
| 62 | |
| 63 | static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, segacoin_state ) |
| 64 | ADDRESS_MAP_UNMAP_HIGH |
| 65 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 66 | ADDRESS_MAP_END |
| 67 | |
| 68 | |
| 69 | |
| 70 | /*************************************************************************** |
| 71 | |
| 72 | Inputs |
| 73 | |
| 74 | ***************************************************************************/ |
| 75 | |
| 76 | static INPUT_PORTS_START( westdrm ) |
| 77 | // just some test stuff |
| 78 | PORT_START("IN0") |
| 79 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| 80 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 81 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) |
| 82 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 83 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 84 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 85 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 86 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) |
| 87 | |
| 88 | PORT_START("IN1") |
| 89 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:1" ) |
| 90 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:2" ) |
| 91 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW1:3" ) |
| 92 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:4" ) |
| 93 | PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW1:5" ) |
| 94 | PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW1:6" ) |
| 95 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW1:7" ) |
| 96 | PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW1:8" ) |
| 97 | INPUT_PORTS_END |
| 98 | |
| 99 | |
| 100 | |
| 101 | /*************************************************************************** |
| 102 | |
| 103 | Machine Config |
| 104 | |
| 105 | ***************************************************************************/ |
| 106 | |
| 107 | static MACHINE_CONFIG_START( westdrm, segacoin_state ) |
| 108 | |
| 109 | /* basic machine hardware */ |
| 110 | MCFG_CPU_ADD("maincpu", Z80, 8000000) // clock frequency unknown |
| 111 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 112 | MCFG_CPU_IO_MAP(main_portmap) |
| 113 | |
| 114 | MCFG_CPU_ADD("audiocpu", Z80, 8000000) // clock frequency unknown |
| 115 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| 116 | MCFG_CPU_IO_MAP(sound_portmap) |
| 117 | |
| 118 | /* no video! */ |
| 119 | |
| 120 | /* sound hardware */ |
| 121 | //.. |
| 122 | MACHINE_CONFIG_END |
| 123 | |
| 124 | |
| 125 | |
| 126 | /*************************************************************************** |
| 127 | |
| 128 | Game drivers |
| 129 | |
| 130 | ***************************************************************************/ |
| 131 | |
| 132 | ROM_START( westdrm ) |
| 133 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 134 | ROM_LOAD( "epr-15151a.bin", 0x00000, 0x10000, CRC(b0911826) SHA1(77435d2b9c78275f2c21db994d2203528e69fe1f) ) |
| 135 | |
| 136 | ROM_REGION( 0x10000, "audiocpu", 0 ) |
| 137 | ROM_LOAD( "epr-15152.bin", 0x00000, 0x10000, CRC(565d6559) SHA1(2c7d961b6dc5020994cbd005efbfd27ccf59569d) ) // mostly empty |
| 138 | ROM_IGNORE( 0x10000 ) |
| 139 | ROM_END |
| 140 | |
| 141 | |
| 142 | GAME (1992, westdrm, 0, westdrm, westdrm, driver_device, 0, ROT0, "Sega", "Western Dream", GAME_IS_SKELETON_MECHANICAL ) |