Skip to content

Commit 60c9a1e

Browse files
Elaut Megacrane (#14441)
New systems marked not working ------------------------------ Elaut Megacrane [stonedDiscord]
1 parent a47e3a2 commit 60c9a1e

File tree

2 files changed

+154
-0
lines changed

2 files changed

+154
-0
lines changed

src/mame/mame.lst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43790,6 +43790,9 @@ madmoney2
4379043790
apvm110
4379143791
apvm110a
4379243792

43793+
@source:skeleton/megacrane.cpp
43794+
megacrane
43795+
4379343796
@source:skeleton/mes.cpp
4379443797
mes
4379543798

src/mame/skeleton/megacrane.cpp

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
// license:BSD-3-Clause
2+
// copyright-holders:stonedDiscord
3+
/****************************************************************************
4+
5+
Skeleton driver for Elaut Megacrane
6+
7+
This is the control board for a crane game.
8+
It plays music during gameplay and voice effects when inserting a coin or
9+
when the game is over.
10+
11+
________________________________________
12+
| ELAUT PCB 0220 REV02 |
13+
D Relay L6203 BD243 |
14+
B Relay TBAB10S |
15+
1 Relay J5 |
16+
5 |
17+
| HEF4021 ISD1420P |
18+
D HEF4021 4116R-1 L6506 |
19+
B ULN2003 4094 PM99BH YMZ284 |
20+
2 4094 W27E512 |
21+
5 JP2 74HCT573 74HCT00 |
22+
| HEF4021 HEF4010 XTAL |
23+
IE 68HC11E1CFN2 |
24+
C JP3 TLP521 DIPSW1 |
25+
10 HEF4511 HEF4094 FM25040 LED |
26+
| EUROGRIJPER REV02 |
27+
________________________________________|
28+
29+
****************************************************************************/
30+
31+
#include "emu.h"
32+
33+
#include "cpu/mc68hc11/mc68hc11.h"
34+
#include "machine/generic_spi_flash.h"
35+
#include "sound/ay8910.h"
36+
37+
#include "speaker.h"
38+
39+
namespace {
40+
41+
class megacrane_state : public driver_device
42+
{
43+
public:
44+
megacrane_state(const machine_config &mconfig, device_type type, const char *tag)
45+
: driver_device(mconfig, type, tag)
46+
, m_maincpu(*this, "maincpu")
47+
, m_spi(*this, "nvram")
48+
, m_ymz(*this, "ymz")
49+
{
50+
}
51+
52+
void megacrane(machine_config &config) ATTR_COLD;
53+
54+
private:
55+
void mem_map(address_map &map) ATTR_COLD;
56+
57+
required_device<mc68hc11_cpu_device> m_maincpu;
58+
required_device<generic_spi_flash_device> m_spi;
59+
required_device<ymz284_device> m_ymz;
60+
};
61+
62+
63+
void megacrane_state::mem_map(address_map &map)
64+
{
65+
map(0x8000, 0xffff).rom().region("maincpu", 0x8000);
66+
67+
map(0x8000, 0x8000).w(m_ymz, FUNC(ymz284_device::address_w));
68+
map(0x8001, 0x8001).w(m_ymz, FUNC(ymz284_device::data_w));
69+
}
70+
71+
72+
static INPUT_PORTS_START(megacrane)
73+
PORT_START("SW1")
74+
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1")
75+
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
76+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
77+
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2")
78+
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
79+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
80+
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
81+
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
82+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
83+
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
84+
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
85+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
86+
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5")
87+
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
88+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
89+
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6")
90+
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
91+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
92+
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7")
93+
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
94+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
95+
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8")
96+
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
97+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
98+
99+
PORT_START("IN1") // (Port A)
100+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
101+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
102+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN)
103+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN)
104+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN)
105+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
106+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN)
107+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
108+
109+
PORT_START("IN2") // (Port D)
110+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
111+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
112+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN) //MISO
113+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN) //MOSI
114+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN) //SCK
115+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN) //CS
116+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN)
117+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
118+
INPUT_PORTS_END
119+
120+
121+
void megacrane_state::megacrane(machine_config &config)
122+
{
123+
MC68HC11E1(config, m_maincpu, 8_MHz_XTAL);
124+
m_maincpu->set_addrmap(AS_PROGRAM, &megacrane_state::mem_map);
125+
m_maincpu->in_pa_callback().set_ioport("IN1");
126+
m_maincpu->in_pd_callback().set_ioport("IN2");
127+
m_maincpu->in_pe_callback().set_ioport("SW1");
128+
129+
GENERIC_SPI_FLASH(config, m_spi, 0);
130+
131+
SPEAKER(config, "mono").front_center();
132+
133+
YMZ284(config, m_ymz, 4000000).add_route(ALL_OUTPUTS, "mono", 1.0);
134+
}
135+
136+
137+
ROM_START(megacrane)
138+
ROM_REGION(0x10000, "maincpu", 0)
139+
ROM_LOAD("elaut_2001_eu_mg_i_02.39.07.u5", 0x0000, 0x10000, CRC(feb5cfa1) SHA1(3c091543c0419ea15a5d66d2b9602668e7c35b10))
140+
141+
ROM_REGION(0x2000, "voice", 0)
142+
ROM_LOAD("elaut_2001_sound_megacrane.u5", 0x0000, 0x2000, NO_DUMP) //ISD1420P
143+
144+
ROM_REGION(0x200, "nvram", 0)
145+
ROM_LOAD("fm25040.u4", 0x0000, 0x200, CRC(b77297fe) SHA1(c404f7a254395412d8ee3a7090a2d67848923409))
146+
ROM_END
147+
148+
} // anonymous namespace
149+
150+
151+
GAME( 1997, megacrane, 0, megacrane, megacrane, megacrane_state, empty_init, ROT0, "Elaut", "Megacrane", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_MECHANICAL)

0 commit comments

Comments
 (0)