1 // license:BSD-3-Clause
2 // copyright-holders:Luca Elia
3 /*************************************************************************************************************
4 
5                                         -= Andamiro's Midas hardware =-
6 
7                                             driver by Luca Elia
8 
9     a reengineered Neo-Geo, with a few differences: no Z80, better sound chip, serial eeprom and 256 color tiles.
10     Plus a PIC12C508A microcontroller, probably for the protection checks (I've patched them out for now).
11 
12     Hardware description:
13 
14     http://web.archive.org/web/20041018094226/http://www.andamiro.com/kor/business/hard_05.html
15 
16     CPU         MC68000
17 
18     VRAM        256kbyte (4Display/Access bank)
19 
20     PaletteRAM  96kbyte
21 
22     Display     320(x)*224(y)
23 
24     Sprite      16(x)*240(y(max))*380(max) (96 sprite/line(max))
25                 128 level y-axis scaling (or line control effect)
26                 16 level x-axis scale-down x,y fip
27                 255color/sprite(of 256 palette set)
28 
29     Text        8dot*8dot, 40(x)*28(y),
30                 255color/text(of 16 palette set)
31 
32     Color       32640 of 24bit True Color
33                 (255 colors/sprite)
34 
35     Sound       8 channel 44.1KHz(max) stereo
36                 4bit ADPCM, 8bit PCM, 16bit PCM
37 
38     Controller  4 direction,
39                 6 button joystick * 2 player (max. 4 playersupport)
40                 light-gun*2 player
41                 trackball*2 player
42 
43     Maximum ROM 2Gbit
44 
45     size  220(x)mm * 210(y)mm
46 
47 
48     Notes:
49 
50     - hammer: keep test button pressed during boot for hardware tests
51 
52 *************************************************************************************************************/
53 
54 #include "emu.h"
55 #include "includes/neogeo.h"
56 
57 #include "cpu/m68000/m68000.h"
58 #include "cpu/mcs51/mcs51.h"
59 #include "cpu/pic16c5x/pic16c5x.h"
60 #include "sound/ymz280b.h"
61 #include "machine/eepromser.h"
62 #include "machine/ticket.h"
63 #include "emupal.h"
64 #include "speaker.h"
65 
66 
67 class midas_state : public driver_device
68 {
69 public:
midas_state(const machine_config & mconfig,device_type type,const char * tag)70 	midas_state(const machine_config &mconfig, device_type type, const char *tag) :
71 		driver_device(mconfig, type, tag),
72 		m_maincpu(*this, "maincpu"),
73 		m_eeprom(*this, "eeprom"),
74 		m_gfxdecode(*this, "gfxdecode"),
75 		m_palette(*this, "palette"),
76 		m_sprgen(*this, "spritegen"),
77 		m_screen(*this, "screen"),
78 		m_prize(*this, "prize%u", 1),
79 		m_ticket(*this, "ticket"),
80 		m_zoomram(*this, "zoomtable"),
81 		m_zoomtable(*this, "spritegen:zoomy")
82 	{ }
83 
84 	void hammer(machine_config &config);
85 	void livequiz(machine_config &config);
86 
87 	void init_livequiz();
88 
89 protected:
90 	virtual void video_start() override;
91 	virtual void machine_start() override;
92 	virtual void machine_reset() override;
93 
94 private:
95 	uint16_t ret_ffff();
96 	void gfxregs_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
97 	void livequiz_coin_w(uint8_t data);
98 	uint16_t hammer_sensor_r();
99 	void hammer_coin_w(uint8_t data);
100 	void hammer_motor_w(uint8_t data);
101 	void eeprom_w(uint8_t data);
102 	void zoomtable_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
103 
104 	uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
105 	required_device<cpu_device> m_maincpu;
106 	required_device<eeprom_serial_93cxx_device> m_eeprom;
107 	required_device<gfxdecode_device> m_gfxdecode;
108 	required_device<palette_device> m_palette;
109 	required_device<neosprite_midas_device> m_sprgen;
110 	required_device<screen_device> m_screen;
111 	optional_device_array<ticket_dispenser_device, 2> m_prize;
112 	optional_device<ticket_dispenser_device> m_ticket;
113 	required_shared_ptr<uint16_t> m_zoomram;
114 	required_region_ptr<uint8_t> m_zoomtable;
115 
116 	DECLARE_WRITE_LINE_MEMBER(screen_vblank);
117 
118 	void hammer_map(address_map &map);
119 	void livequiz_map(address_map &map);
120 };
121 
122 
123 
124 
video_start()125 void midas_state::video_start()
126 {
127 }
128 
screen_update(screen_device & screen,bitmap_rgb32 & bitmap,const rectangle & cliprect)129 uint32_t midas_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
130 {
131 	// fill with background color first
132 	bitmap.fill(0x0, cliprect);
133 
134 	m_sprgen->draw_sprites(bitmap, cliprect.min_y);
135 
136 	m_sprgen->draw_fixed_layer(bitmap, cliprect.min_y);
137 
138 	return 0;
139 }
140 
eeprom_w(uint8_t data)141 void midas_state::eeprom_w(uint8_t data)
142 {
143 	// latch the bit
144 	m_eeprom->di_write((data & 0x04) >> 2);
145 
146 	// reset line asserted: reset.
147 	m_eeprom->cs_write((data & 0x01) ? ASSERT_LINE : CLEAR_LINE );
148 
149 	// clock line asserted: write latch or select next bit to read
150 	m_eeprom->clk_write((data & 0x02) ? ASSERT_LINE : CLEAR_LINE );
151 }
152 
ret_ffff()153 uint16_t midas_state::ret_ffff()
154 {
155 	return 0xffff;
156 }
157 
gfxregs_w(offs_t offset,uint16_t data,uint16_t mem_mask)158 void midas_state::gfxregs_w(offs_t offset, uint16_t data, uint16_t mem_mask)
159 {
160 	/* accessing the LSB only is not mapped */
161 	if (mem_mask != 0x00ff)
162 	{
163 		/* accessing the MSB only stores same data in MSB and LSB */
164 		if (mem_mask == 0xff00)
165 			data = (data & 0xff00) | (data >> 8);
166 
167 		switch (offset)
168 		{
169 		case 0x00: m_sprgen->set_videoram_offset(data); break;
170 		case 0x01: m_sprgen->set_videoram_data(data); break;
171 		case 0x02: m_sprgen->set_videoram_modulo(data); break;
172 		}
173 	}
174 }
175 
zoomtable_w(offs_t offset,uint16_t data,uint16_t mem_mask)176 void midas_state::zoomtable_w(offs_t offset, uint16_t data, uint16_t mem_mask)
177 {
178 	COMBINE_DATA(&m_zoomram[offset]);
179 
180 	if (ACCESSING_BITS_0_7)
181 	{
182 		m_zoomtable[offset+0x00000] = data & 0xff;
183 		m_zoomtable[offset+0x10000] = data & 0xff;
184 	}
185 
186 }
187 /***************************************************************************************
188                                        Live Quiz Show
189 ***************************************************************************************/
190 
livequiz_coin_w(uint8_t data)191 void midas_state::livequiz_coin_w(uint8_t data)
192 {
193 	machine().bookkeeping().coin_counter_w(0, data & 0x0001);
194 #ifdef MAME_DEBUG
195 //  popmessage("coin %04X", data);
196 #endif
197 }
198 
livequiz_map(address_map & map)199 void midas_state::livequiz_map(address_map &map)
200 {
201 	map(0x000000, 0x1fffff).rom();
202 
203 	map(0x900000, 0x900001).portr("DSW_PLAYER1");
204 	map(0x920000, 0x920001).portr("SERVICE");
205 	map(0x940000, 0x940001).portr("PLAYER2");
206 	map(0x980000, 0x980001).portr("START");
207 
208 	map(0x980001, 0x980001).w(FUNC(midas_state::livequiz_coin_w));
209 
210 	map(0x9a0001, 0x9a0001).w(FUNC(midas_state::eeprom_w));
211 
212 	map(0x9c0000, 0x9c0005).w(FUNC(midas_state::gfxregs_w));
213 	map(0x9c000c, 0x9c000d).nopw();    // IRQ Ack, temporary
214 
215 	map(0xa00000, 0xa3ffff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
216 	map(0xa40000, 0xa7ffff).ram();
217 
218 	map(0xb00000, 0xb00001).r(FUNC(midas_state::ret_ffff));
219 	map(0xb20000, 0xb20001).r(FUNC(midas_state::ret_ffff));
220 	map(0xb40000, 0xb40001).r(FUNC(midas_state::ret_ffff));
221 	map(0xb60000, 0xb60001).r(FUNC(midas_state::ret_ffff));
222 
223 	map(0xb80008, 0xb8000b).rw("ymz", FUNC(ymz280b_device::read), FUNC(ymz280b_device::write)).umask16(0x00ff);
224 
225 	map(0xba0000, 0xba0001).portr("START3");
226 	map(0xbc0000, 0xbc0001).portr("PLAYER3");
227 
228 	map(0xd00000, 0xd1ffff).ram().w(FUNC(midas_state::zoomtable_w)).share("zoomtable"); // zoom table?
229 
230 	map(0xe00000, 0xe3ffff).ram();
231 }
232 
233 /***************************************************************************************
234                                           Hammer
235 ***************************************************************************************/
236 
hammer_sensor_r()237 uint16_t midas_state::hammer_sensor_r()
238 {
239 	if (ioport("HAMMER")->read() & 0x80)
240 		return 0xffff;
241 
242 	return (ioport("SENSORY")->read() << 8) | ioport("SENSORX")->read();
243 }
244 
hammer_coin_w(uint8_t data)245 void midas_state::hammer_coin_w(uint8_t data)
246 {
247 	machine().bookkeeping().coin_counter_w(0, BIT(data, 0));
248 	machine().bookkeeping().coin_counter_w(1, BIT(data, 1));
249 #ifdef MAME_DEBUG
250 //  popmessage("coin %04X", data);
251 #endif
252 }
253 
hammer_motor_w(uint8_t data)254 void midas_state::hammer_motor_w(uint8_t data)
255 {
256 	m_prize[0]->motor_w(BIT(data, 0));
257 	m_prize[1]->motor_w(BIT(data, 1));
258 	m_ticket->motor_w(BIT(data, 4));
259 	// data & 0x0080 ?
260 #ifdef MAME_DEBUG
261 //  popmessage("motor %04X", data);
262 #endif
263 }
264 
hammer_map(address_map & map)265 void midas_state::hammer_map(address_map &map)
266 {
267 	map(0x000000, 0x1fffff).rom();
268 
269 	map(0x900000, 0x900001).portr("DSW");
270 	map(0x920000, 0x920001).portr("SERVICE");
271 	map(0x940000, 0x940001).portr("IN0");
272 	map(0x980000, 0x980001).portr("TILT");
273 
274 	map(0x980001, 0x980001).w(FUNC(midas_state::hammer_coin_w));
275 
276 	map(0x9a0001, 0x9a0001).w(FUNC(midas_state::eeprom_w));
277 
278 	map(0x9c0000, 0x9c0005).w(FUNC(midas_state::gfxregs_w));
279 	map(0x9c000c, 0x9c000d).nopw();    // IRQ Ack, temporary
280 
281 	map(0xa00000, 0xa3ffff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
282 	map(0xa40000, 0xa7ffff).ram();
283 
284 	map(0xb00000, 0xb00001).r(FUNC(midas_state::ret_ffff));
285 	map(0xb20000, 0xb20001).r(FUNC(midas_state::ret_ffff));
286 	map(0xb40000, 0xb40001).r(FUNC(midas_state::ret_ffff));
287 	map(0xb60000, 0xb60001).r(FUNC(midas_state::ret_ffff));
288 
289 	map(0xb80008, 0xb8000b).rw("ymz", FUNC(ymz280b_device::read), FUNC(ymz280b_device::write)).umask16(0x00ff);
290 
291 	map(0xba0000, 0xba0001).portr("IN1");
292 	map(0xbc0000, 0xbc0001).portr("HAMMER");
293 
294 	map(0xbc0003, 0xbc0003).w(FUNC(midas_state::hammer_motor_w));
295 
296 	map(0xbc0004, 0xbc0005).r(FUNC(midas_state::hammer_sensor_r));
297 
298 	map(0xd00000, 0xd1ffff).ram().w(FUNC(midas_state::zoomtable_w)).share("zoomtable"); // zoom table?
299 
300 	map(0xe00000, 0xe3ffff).ram();
301 }
302 
303 
304 static const gfx_layout layout16x16x8 =
305 {
306 	16,16,
307 	RGN_FRAC(1,1),
308 	8,
309 	{ 56,48,40,32,24,16,8,0 },
310 	{ 16*64+7,16*64+6,16*64+5,16*64+4,16*64+3,16*64+2,16*64+1,16*64, 7,6,5,4,3,2,1,0 },
311 	{ STEP16(0, 64) },
312 	16*128
313 };
314 
315 static const gfx_layout layout8x8x8_2 =
316 {
317 	8,8,
318 	RGN_FRAC(1,1),
319 	8,
320 	{ 8,9,10,11, 0,1,2,3 },
321 	{ (32*2+1)*4, 32*2*4, (48*2+1)*4, 48*2*4, (0+1)*4, 0*4, (16*2+1)*4, 16*2*4 },
322 	{ 0*8*2, 1*8*2, 2*8*2, 3*8*2, 4*8*2, 5*8*2, 6*8*2, 7*8*2 },
323 	32*8*2
324 };
325 
326 static GFXDECODE_START( gfx_midas )
327 	GFXDECODE_ENTRY( "sprites", 0, layout16x16x8, 0, 0x100 )
328 	GFXDECODE_ENTRY( "tiles",   0, layout8x8x8_2, 0,  0x80 )
329 GFXDECODE_END
330 
331 
INPUT_PORTS_START(livequiz)332 static INPUT_PORTS_START( livequiz )
333 
334 	PORT_START("DSW_PLAYER1")   // 900000
335 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
336 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
337 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
338 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
339 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
340 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
341 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
342 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
343 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
344 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
345 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
346 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
347 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
348 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
349 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
350 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
351 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
352 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
353 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
354 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
355 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
356 	PORT_DIPNAME( 0x80, 0x80, "Freeze" )
357 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
358 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
359 
360 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
361 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
362 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
363 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
364 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
365 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
366 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
367 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
368 
369 	PORT_START("SERVICE")   // 920000
370 	PORT_BIT( 0x0001, IP_ACTIVE_LOW,  IPT_COIN1   )
371 	PORT_BIT( 0x0002, IP_ACTIVE_LOW,  IPT_UNKNOWN )
372 	PORT_BIT( 0x0004, IP_ACTIVE_LOW,  IPT_UNKNOWN )
373 	PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM
374 	PORT_BIT( 0x0010, IP_ACTIVE_LOW,  IPT_UNKNOWN )
375 	PORT_BIT( 0x0020, IP_ACTIVE_LOW,  IPT_UNKNOWN )
376 	PORT_SERVICE_NO_TOGGLE( 0x0040,   IP_ACTIVE_LOW )
377 	PORT_BIT( 0x0080, IP_ACTIVE_LOW,  IPT_UNKNOWN )
378 
379 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
380 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
381 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
382 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
383 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
384 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
385 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
386 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
387 
388 	PORT_START("PLAYER2")   // 940000
389 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
390 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
391 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
392 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
393 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
394 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
395 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
396 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
397 
398 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
399 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
400 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
401 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
402 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
403 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
404 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
405 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
406 
407 	PORT_START("START") // 980000
408 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
409 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
410 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
411 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
412 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
413 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
414 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
415 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
416 
417 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1  )
418 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
419 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2  )
420 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
421 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
422 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
423 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
424 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
425 
426 	PORT_START("START3")    // ba0000
427 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START3  )
428 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
429 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
430 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
431 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
432 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
433 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
434 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
435 
436 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
437 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
438 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
439 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
440 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
441 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
442 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
443 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
444 
445 	PORT_START("PLAYER3")   // bc0000
446 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
447 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
448 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
449 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)
450 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
451 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
452 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
453 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
454 
455 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
456 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
457 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
458 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
459 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
460 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
461 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
462 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
463 
464 INPUT_PORTS_END
465 
466 static INPUT_PORTS_START( hammer )
467 
468 	PORT_START("DSW")   // 900000
469 	PORT_DIPNAME( 0x01, 0x01, "Debug Mode" )
470 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
471 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
472 	PORT_DIPNAME( 0x06, 0x06, "Game Mode" )
473 	PORT_DIPSETTING(    0x06, "Prize Game" )
474 	PORT_DIPSETTING(    0x00, "Ticket Game 1" ) // not in manual, does not work (it requires a toggleable ticket dispenser)
475 	PORT_DIPSETTING(    0x04, "Ticket Game 2" )
476 	PORT_DIPSETTING(    0x02, "Generic Game" )
477 	PORT_DIPNAME( 0x08, 0x08, "Warning Sound" )
478 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
479 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
480 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
481 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
482 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
483 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
484 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
485 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
486 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
487 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
488 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
489 	PORT_DIPNAME( 0x80, 0x80, "Freeze" )
490 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
491 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
492 
493 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
494 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
495 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
496 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
497 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
498 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
499 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
500 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
501 
502 	PORT_START("SERVICE")   // 920000
503 	PORT_BIT( 0x0001, IP_ACTIVE_LOW,  IPT_COIN1     )
504 	PORT_BIT( 0x0002, IP_ACTIVE_LOW,  IPT_COIN2     )
505 	PORT_BIT( 0x0004, IP_ACTIVE_LOW,  IPT_SERVICE1  )
506 	PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM   ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
507 	PORT_BIT( 0x0010, IP_ACTIVE_LOW,  IPT_UNKNOWN   )
508 	PORT_BIT( 0x0020, IP_ACTIVE_LOW,  IPT_UNKNOWN   )
509 	PORT_SERVICE_NO_TOGGLE( 0x0040,   IP_ACTIVE_LOW )
510 	PORT_BIT( 0x0080, IP_ACTIVE_LOW,  IPT_UNKNOWN   )
511 
512 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
513 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
514 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
515 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
516 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
517 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
518 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
519 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
520 
521 	PORT_START("IN0")   // 940000
522 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
523 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
524 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
525 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
526 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
527 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
528 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
529 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
530 
531 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
532 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
533 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
534 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
535 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
536 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
537 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
538 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
539 
540 	PORT_START("TILT")  // 980000
541 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
542 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
543 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
544 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
545 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
546 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
547 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
548 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
549 
550 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_TILT    )
551 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
552 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
553 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
554 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
555 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
556 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
557 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
558 
559 	PORT_START("IN1")   // ba0000
560 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
561 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
562 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
563 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
564 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
565 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
566 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
567 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
568 
569 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
570 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
571 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
572 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
573 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
574 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
575 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
576 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
577 
578 	PORT_START("HAMMER")    // bc0000
579 	PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("prize1", ticket_dispenser_device, line_r) // prize 1 sensor ("tejisw 1")
580 	PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("prize2", ticket_dispenser_device, line_r) // prize 2 sensor ("tejisw 2")
581 	PORT_BIT( 0x0004, IP_ACTIVE_LOW,  IPT_UNKNOWN )
582 	PORT_BIT( 0x0008, IP_ACTIVE_LOW,  IPT_UNKNOWN )
583 	PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
584 	PORT_BIT( 0x0020, IP_ACTIVE_LOW,  IPT_UNKNOWN )
585 	PORT_BIT( 0x0040, IP_ACTIVE_LOW,  IPT_UNKNOWN )
586 	PORT_BIT( 0x0080, IP_ACTIVE_LOW,  IPT_BUTTON1 ) PORT_IMPULSE(5) PORT_NAME( "Hammer" )
587 
588 	PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
589 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
590 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
591 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
592 	PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
593 	PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
594 	PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
595 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
596 
597 	PORT_START("SENSORX")
598 	PORT_BIT( 0xff, 0x20, IPT_LIGHTGUN_X ) PORT_MINMAX(0x00, 0x3f+1) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(8)
599 
600 	PORT_START("SENSORY")
601 	PORT_BIT( 0xff, 0x18, IPT_LIGHTGUN_Y ) PORT_MINMAX(0x00, 0x2f+1) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(8)
602 
603 INPUT_PORTS_END
604 
605 void midas_state::machine_start()
606 {
607 	m_sprgen->set_pens(m_palette->pens());
608 	m_sprgen->set_sprite_region(memregion("sprites")->base(), memregion("sprites")->bytes());
609 	m_sprgen->set_fixed_regions(memregion("tiles")->base(), memregion("tiles")->bytes(), memregion("tiles"));
610 	m_sprgen->neogeo_set_fixed_layer_source(0); // temporary: ensure banking is disabled
611 }
612 
machine_reset()613 void midas_state::machine_reset()
614 {
615 }
616 
WRITE_LINE_MEMBER(midas_state::screen_vblank)617 WRITE_LINE_MEMBER(midas_state::screen_vblank)
618 {
619 	if (state) m_sprgen->buffer_vram();
620 }
621 
622 
623 
livequiz(machine_config & config)624 void midas_state::livequiz(machine_config &config)
625 {
626 	/* basic machine hardware */
627 	M68000(config, m_maincpu, XTAL(24'000'000) / 2);
628 	m_maincpu->set_addrmap(AS_PROGRAM, &midas_state::livequiz_map);
629 	m_maincpu->set_vblank_int("screen", FUNC(midas_state::irq1_line_hold));
630 
631 	pic16c56_device &pic1(PIC16C56(config, "pic1", XTAL(24'000'000) / 6));  // !! PIC12C508 !! unknown MHz
632 	pic1.set_disable(); // Currently not hooked up
633 
634 	pic16c56_device &pic2(PIC16C56(config, "pic2", XTAL(24'000'000) / 6));  // !! PIC12C508 !! unknown MHz
635 	pic2.set_disable(); // Currently not hooked up
636 
637 	EEPROM_93C46_16BIT(config, m_eeprom);
638 
639 	/* video hardware */
640 	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
641 	m_screen->set_raw(NEOGEO_PIXEL_CLOCK, NEOGEO_HTOTAL, NEOGEO_HBEND, NEOGEO_HBSTART, NEOGEO_VTOTAL, NEOGEO_VBEND, NEOGEO_VBSTART);
642 	m_screen->set_screen_update(FUNC(midas_state::screen_update));
643 	m_screen->screen_vblank().set(FUNC(midas_state::screen_vblank));
644 
645 	NEOGEO_SPRITE_MIDAS(config, m_sprgen, 0).set_screen(m_screen);
646 
647 	GFXDECODE(config, m_gfxdecode, m_palette, gfx_midas);
648 	PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 0x10000);
649 
650 	/* sound hardware */
651 	SPEAKER(config, "lspeaker").front_left();
652 	SPEAKER(config, "rspeaker").front_right();
653 
654 	ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL(16'934'400)));
655 	ymz.add_route(0, "lspeaker", 0.80);
656 	ymz.add_route(1, "rspeaker", 0.80);
657 }
658 
hammer(machine_config & config)659 void midas_state::hammer(machine_config &config)
660 {
661 	/* basic machine hardware */
662 	M68000(config, m_maincpu, XTAL(28'000'000) / 2);
663 	m_maincpu->set_addrmap(AS_PROGRAM, &midas_state::hammer_map);
664 	m_maincpu->set_vblank_int("screen", FUNC(midas_state::irq1_line_hold));
665 
666 	at89c52_device &mcu(AT89C52(config, "mcu", XTAL(24'000'000) / 2)); // on top board, unknown MHz
667 	mcu.set_disable(); // Currently not hooked up
668 
669 	EEPROM_93C46_16BIT(config, m_eeprom);
670 
671 	TICKET_DISPENSER(config, m_prize[0], 0);
672 	m_prize[0]->set_period(attotime::from_msec(1000*5));
673 	m_prize[0]->set_senses(TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW, false);
674 
675 	TICKET_DISPENSER(config, m_prize[1], 0);
676 	m_prize[1]->set_period(attotime::from_msec(1000*5));
677 	m_prize[1]->set_senses(TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW, false);
678 
679 	TICKET_DISPENSER(config, m_ticket, 0);
680 	m_ticket->set_period(attotime::from_msec(200));
681 	m_ticket->set_senses(TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW, false);
682 
683 	/* video hardware */
684 	SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
685 	m_screen->set_raw(NEOGEO_PIXEL_CLOCK, NEOGEO_HTOTAL, NEOGEO_HBEND, NEOGEO_HBSTART, NEOGEO_VTOTAL, NEOGEO_VBEND, NEOGEO_VBSTART);
686 	m_screen->set_screen_update(FUNC(midas_state::screen_update));
687 	m_screen->screen_vblank().set(FUNC(midas_state::screen_vblank));
688 
689 	NEOGEO_SPRITE_MIDAS(config, m_sprgen, 0).set_screen(m_screen);
690 
691 	GFXDECODE(config, m_gfxdecode, m_palette, gfx_midas);
692 	PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 0x10000);
693 
694 	/* sound hardware */
695 	SPEAKER(config, "mono").front_center(); // stereo outputs aren't exists?
696 
697 	ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL(16'934'400)));
698 	ymz.add_route(ALL_OUTPUTS, "mono", 0.80);
699 }
700 
701 
702 /***************************************************************************************
703 
704 Live Quiz Show
705 1999, Andamiro Entertainment Co. Ltd.
706 
707 Main Board
708 ----------
709 
710 MIDAS
711 |----------------------------------------------------------|
712 |TDA1519A                        |-----ROM-BOARD(ABOVE)----|
713 |                  558   YAC516  |                         |
714 |    VOL     558                 |    YMZ280B              |
715 |SP1               558   12C508A |                         |
716 |                                |                         |
717 |         |---------|            |               16.9344MHz|
718 |         |         |    PAL     |    |--------|           |
719 |         | MIDAS-2 |            |    |TMP     |   KM681000|
720 |J        |         |            |    |68HC000 |           |
721 |A        |         |            |    |        |   KM681000|
722 |M        |---------|    KM681000|    |--------|           |
723 |M                               |                 KM681000|
724 |A                       KM681000|                         |
725 | DSW(8)                         |                         |
726 |                        KM681000|                         |
727 |                                |                         |
728 |         |---------|            |    |---------|          |
729 |PUSH_BTN |         |            |    |         |          |
730 |         | MIDAS-1 |            |    | MIDAS-3 |          |
731 |93C46    |         |            |    |         |          |
732 |CN1      |         |            |    |         |          |
733 |CN2      |---------|            |    |---------|          |
734 |  KM681000 341256               |                         |
735 |CN3                             |                    24MHz|
736 |  KM681000 341256               |-------------------------|
737 |----------------------------------------------------------|
738 Notes:
739       TMP68HC000   - Toshiba TMP68HC000 CPU clock - 12MHz [24/2] (PLCC68)
740       YMZ280 clock - 16.9344MHz
741       341256       - NKK N341256SJ-16 32k x8 SRAM (SOJ28)
742       KM681000     - Samsung KM681000 128k x8 SRAM (SOP32)
743       SP1          - 3 pin connector for stereo sound output
744       CN1/2/3      - Connectors for extra controls
745       MIDAS-1/2/3  - Custom chips, probably rebadged FPGAs (QFP208)
746       12C508A      - Microchip PIC12C508A Microcontroller (DIP8)
747       VSync        - 60Hz
748       HSync        - 15.21kHz
749 
750 ROM Board
751 ---------
752 
753 MIDAS
754 |-------------------------|
755 |                         |
756 |     27C4096.U23         |
757 |                         |
758 |  *U21        *U22       |
759 |                         |
760 |                         |
761 |  *U26        *U27       |
762 |                         |
763 |                         |
764 |   U19         U20       |
765 |                     CN15|
766 |                     CN13|
767 |  *U17        *U18       |
768 |                     CN12|
769 |                         |
770 |  *U24        *U25       |
771 |                         |
772 |                         |
773 |   U15         U16       |
774 |                         |
775 |                         |
776 |   U1         *U7        |
777 |                         |
778 |12C508A                  |
779 |   U5         *U6        |
780 |-------------------------|
781 Notes:
782       * Not populated
783       CN15/13/12 - Connectors for extra controls
784       12C508A    - Microchip PIC12C508A Microcontroller (DIP8)
785       U23        - 27C4096 EPROM
786       All other ROMs are MX29F1610 (SOP44)
787 
788 ***************************************************************************************/
789 
790 ROM_START( livequiz )
791 	ROM_REGION( 0x200000, "maincpu", 0 )
792 	ROM_LOAD16_WORD_SWAP( "flash.u1", 0x000000, 0x200000, CRC(8ec44493) SHA1(a987886cb87ac0a744f01f2e4a7cc6d12efeaa04) )
793 
794 	ROM_REGION( 0x000800, "pic1", 0 )
CRC(a84f0a7e)795 	ROM_LOAD( "main_pic12c508a.u27", 0x000000, 0x000400, CRC(a84f0a7e) SHA1(fb27c05fb27b98ca603697e1be214dc6c8d5f884) )
796 
797 	ROM_REGION( 0x000800, "pic2", 0 )
798 	ROM_LOAD( "sub_pic12c508a.u4",   0x000000, 0x000400, CRC(e52ebdc4) SHA1(0f3af66b5ea184e49188e74a873699324a3930f1) )
799 
800 	ROM_REGION( 0x800000, "sprites", 0 )
801 	ROM_LOAD64_WORD( "flash.u15", 0x000000, 0x200000, CRC(d6eb56f1) SHA1(52d67bb25dd968c79eccb05159a578516b27e557) )
802 	ROM_LOAD64_WORD( "flash.u19", 0x000002, 0x200000, CRC(daa81532) SHA1(9e66bb4639b92c3d76b7918535f55883f22f24b2) )
803 	ROM_LOAD64_WORD( "flash.u16", 0x000004, 0x200000, CRC(4c9fd873) SHA1(6e185304ce29771265d3c48b0ef0e840d8bed02d) )
804 	ROM_LOAD64_WORD( "flash.u20", 0x000006, 0x200000, CRC(b540a8c7) SHA1(25b9b30c7d5ff1e410ea30580017e45590542561) )
805 
806 	ROM_REGION( 0x080000, "tiles", 0 )
807 	ROM_LOAD( "27c4096.u23", 0x000000, 0x080000, CRC(25121de8) SHA1(edf24d87551639b871baf3243b452a4e2ba84107) )
808 
809 	ROM_REGION( 0x200000, "ymz", 0 )
810 	ROM_LOAD( "flash.u5", 0x000000, 0x200000, CRC(dc062792) SHA1(ec415c918c47ce9d181f014cde317af5717600e4) )
811 
812 	ROM_REGION( 0x20000, "spritegen:zoomy", ROMREGION_ERASE00 )
813 	/* uploaded */
814 ROM_END
815 
816 void midas_state::init_livequiz()
817 {
818 	uint16_t *rom = (uint16_t *) memregion("maincpu")->base();
819 
820 	// PROTECTION CHECKS
821 	rom[0x13345a/2] =   0x4e75;
822 }
823 
824 /***************************************************************************************
825 
826 Hammer
827 Andamiro 2000
828 
829 PCB Layout
830 ----------
831 
832 |------------------------------|-------------------|
833 |TDA1519 17358 YAC516 YMZ280B  |        CN1        |
834 |   17558    16.9344MHz   ATMEL_ATF1500            |
835 |  VOL   17358                 |                   |
836 |                              |   S0.U25          |
837 |                        MC68HC000CFN16            |
838 |TD62064                       |   S1.U26          |
839 |              MIDAS-2         |                   |
840 | DSW(8)                       |   P.U22    A0L.U44|
841 |J                             |  LP621024         |
842 |A                 LP621024    |            A0H.U46|
843 |M                             |  LP621024         |
844 |M                 LP621024    |            A1L.U48|
845 |A                             |  LP621024         |
846 |                  LP621024    |            A1H.U50|
847 |                              |                   |
848 |                              |            A2L.U45|
849 |                              |                   |
850 | TESTSW                       |            A2H.U47|
851 | 93C46        MIDAS-1     MIDAS-3                 |
852 | LP621024            28MHz    |            A3L.U49|
853 |           HM62H256           |                   |
854 | LP621024          HM62H256   |            A3H.U51|
855 |------------------------------|-------------------|
856 Notes:
857       68000 @ 14MHz [28/2]
858       YMZ280B @ 16.9344MHz
859       CN1 - connector for top board
860 
861 Top board
862 ---------
863 
864 HAMMER TOP PCB VER1.2
865 AMO30803
866 |------------------------------------------|
867 |CN19 CN14 CN15 CN13 CN22 CN23 CN20 CN21   |
868 |                                          |
869 |                                          |
870 |                                 17558    |
871 |   TD62064  TD62064              17393    |
872 |                                          |
873 |                            24MHz      CN2|
874 |                     AT89C52     17558    |
875 |PAL                              17393 CN1|
876 |                                          |
877 |                             MC7805       |
878 |------------------------------------------|
879 
880 ***************************************************************************************/
881 
882 ROM_START( hammer )
883 	ROM_REGION( 0x200000, "maincpu", 0 )
884 	ROM_LOAD16_WORD_SWAP( "p.u22", 0x000000, 0x200000, CRC(687f1596) SHA1(3dc5fb0af1e8c4f3a42ce4aad39635b1111831d8) )
885 
886 	ROM_REGION( 0x002000, "mcu", 0 )
887 	ROM_LOAD( "hammer_at89c52", 0x000000, 0x002000, NO_DUMP )
888 
889 	ROM_REGION( 0x1000000, "sprites", 0 )
890 	ROM_LOAD64_WORD( "a0l.u44", 0x000000, 0x200000, CRC(b9cafd81) SHA1(24698970d1aea0907e2963c872ce61077f44c3af) )
891 	ROM_LOAD64_WORD( "a0h.u46", 0x800000, 0x200000, CRC(f60f188b) SHA1(486f26c473b46efb402662b2f374e361cd7b4284) )
892 
893 	ROM_LOAD64_WORD( "a1l.u48", 0x000002, 0x200000, CRC(82129cf9) SHA1(6d68e943854bc9e8ea555bf03107dc9e836ca4d9) )
894 	ROM_LOAD64_WORD( "a1h.u50", 0x800002, 0x200000, CRC(76897c90) SHA1(aded60d3db834598cd54ad9140eee7be4129cb27) )
895 
896 	ROM_LOAD64_WORD( "a2l.u45", 0x000004, 0x200000, CRC(d8086ee5) SHA1(9d5f2b3a0f903a69cfd1108ddf5ea61b571c3fe3) )
897 	ROM_LOAD64_WORD( "a2h.u47", 0x800004, 0x200000, CRC(a64aa2df) SHA1(7e4eb049cd6a5971a455488a484f225763921614) )
898 
899 	ROM_LOAD64_WORD( "a3l.u49", 0x000006, 0x200000, CRC(4e83cf00) SHA1(e66a0b4eae0f46bf36126be3795cfac3ad3d4282) )
900 	ROM_LOAD64_WORD( "a3h.u51", 0x800006, 0x200000, CRC(834de39f) SHA1(6e9867180ca20e64f60bad5cad82674ce8f45b7b) )
901 
902 	ROM_REGION( 0x080000, "tiles", ROMREGION_ERASE00 )
903 	// Use the tiles rom from livequiz (not present in this set) to show some debug text
904 //  ROM_LOAD( "27c4096.u23", 0x000000, 0x080000, CRC(25121de8) SHA1(edf24d87551639b871baf3243b452a4e2ba84107) )
905 
906 	ROM_REGION( 0x400000, "ymz", 0 )
907 	ROM_LOAD( "s0.u25", 0x000000, 0x200000, CRC(c049a3e0) SHA1(0c7016c3128c170a84ad3f92fad1165775210e3d) )
908 	ROM_LOAD( "s1.u26", 0x200000, 0x200000, CRC(9cc4b3ec) SHA1(b91a8747074a1032eb7f70a015d394fe8e896d7e) )
909 
910 	ROM_REGION( 0x20000, "spritegen:zoomy", ROMREGION_ERASE00 )
911 	/* uploaded */
912 ROM_END
913 
914 GAME( 1999, livequiz, 0, livequiz, livequiz, midas_state, init_livequiz, ROT0, "Andamiro", "Live Quiz Show", 0 )
915 GAME( 2000, hammer,   0, hammer,   hammer,   midas_state, empty_init,    ROT0, "Andamiro", "Hammer",         0 )
916