trunk/src/mame/drivers/segaufo.c
r241601 | r241602 | |
23 | 23 | - # School Kids (1993) |
24 | 24 | |
25 | 25 | 4th gen - EX brd |
26 | | * Z80, 2 Sega 315-5296(I/O), YM3438, NEC uPD71054C, optional NEC uPD7759C |
| 26 | * Z80, 2 Sega 315-5296(I/O), 315-5338A, YM3438, NEC uPD71054C, optional NEC uPD7759C |
27 | 27 | - # Dream Palace (1992) |
28 | 28 | - # Dream Kitchen (1994) |
29 | 29 | - # UFO Catcher Excellent (1994) |
r241601 | r241602 | |
35 | 35 | |
36 | 36 | More games were released after 2000, assumed to be on more modern hardware. |
37 | 37 | |
38 | | |
39 | 38 | TODO: |
40 | | - why doesn't ufo800 work? |
41 | | - add layout |
42 | 39 | - add dipswitches |
43 | | - add upd sound for ufo21 |
| 40 | - prize sensor for ufo21/ufo800 |
44 | 41 | |
45 | 42 | ***************************************************************************/ |
46 | 43 | |
r241601 | r241602 | |
51 | 48 | #include "sound/2612intf.h" |
52 | 49 | #include "sound/upd7759.h" |
53 | 50 | |
54 | | #include "segaufo.lh" |
| 51 | // the layouts are very similar to eachother |
| 52 | #include "newufo.lh" |
| 53 | #include "ufomini.lh" |
| 54 | #include "ufo21.lh" |
| 55 | #include "ufo800.lh" |
55 | 56 | |
56 | 57 | |
57 | 58 | /* simulation parameters */ |
58 | 59 | // x/y/z cabinet dimensions per player (motor range) |
59 | 60 | #define CABINET_WIDTH 400 |
60 | 61 | #define CABINET_DEPTH 400 |
61 | | #define CABINET_HEIGHT 250 |
| 62 | #define CABINET_HEIGHT 300 |
62 | 63 | |
63 | 64 | // x/y/z motor speed in hertz |
64 | 65 | #define MOTOR_SPEED 100 |
r241601 | r241602 | |
104 | 105 | DECLARE_WRITE_LINE_MEMBER(pit_out1); |
105 | 106 | DECLARE_WRITE_LINE_MEMBER(pit_out2); |
106 | 107 | DECLARE_WRITE_LINE_MEMBER(ym3438_irq); |
107 | | DECLARE_READ8_MEMBER(ufo_0_r) { return 0; } |
108 | 108 | DECLARE_READ8_MEMBER(crane_limits_r); |
109 | | DECLARE_READ8_MEMBER(ex_crane_limits_r); |
110 | | DECLARE_READ8_MEMBER(ex_crane_open_r); |
111 | 109 | DECLARE_WRITE8_MEMBER(stepper_w); |
112 | | DECLARE_WRITE8_MEMBER(ex_stepper_w); |
113 | 110 | DECLARE_WRITE8_MEMBER(cp_lamps_w); |
114 | 111 | DECLARE_WRITE8_MEMBER(cp_digits_w); |
115 | 112 | DECLARE_WRITE8_MEMBER(crane_xyz_w); |
| 113 | DECLARE_WRITE8_MEMBER(ufo_lamps_w); |
| 114 | |
| 115 | DECLARE_READ8_MEMBER(ex_crane_limits_r); |
| 116 | DECLARE_READ8_MEMBER(ex_crane_open_r); |
| 117 | DECLARE_WRITE8_MEMBER(ex_stepper_w); |
| 118 | DECLARE_WRITE8_MEMBER(ex_cp_lamps_w); |
116 | 119 | DECLARE_WRITE8_MEMBER(ex_crane_xyz_w); |
117 | | DECLARE_WRITE8_MEMBER(ufo_lamps_w); |
| 120 | DECLARE_WRITE8_MEMBER(ex_ufo21_lamps_w); |
| 121 | DECLARE_WRITE8_MEMBER(ex_ufo800_lamps_w); |
| 122 | DECLARE_READ8_MEMBER(ex_upd_busy_r); |
| 123 | DECLARE_WRITE8_MEMBER(ex_upd_start_w); |
118 | 124 | |
119 | 125 | virtual void machine_reset(); |
120 | 126 | virtual void machine_start(); |
r241601 | r241602 | |
149 | 155 | |
150 | 156 | TIMER_DEVICE_CALLBACK_MEMBER(ufo_state::update_info) |
151 | 157 | { |
| 158 | // output ufo motor positions |
| 159 | // 0 X: 000 = right, 100 = left (player 1) |
| 160 | // 1 Y: 000 = front, 100 = back |
| 161 | // 2 Z: 000 = up, 100 = down |
| 162 | // 3 C: 000 = closed, 100 = open |
| 163 | for (int p = 0; p < 2; p++) |
| 164 | for (int m = 0; m < 4; m++) |
| 165 | output_set_indexed_value("counter", p*4 + m, (UINT8)(m_player[p].motor[m].position * 100)); |
| 166 | |
152 | 167 | #if 0 |
153 | | char msg1[0x100]={0}; |
154 | | char msg2[0x100]={0}; |
| 168 | char msg1[0x100] = {0}; |
| 169 | char msg2[0x100] = {0}; |
155 | 170 | for (int i = 0; i < 8; i++) |
156 | 171 | { |
157 | 172 | sprintf(msg2, "%02X ", m_io2->debug_peek_output(i)); |
158 | 173 | strcat(msg1, msg2); |
159 | 174 | } |
160 | | for (int i = 0; i < 4; i++) |
161 | | { |
162 | | sprintf(msg2, "\n%d %05f", i, m_player[0].motor[i].position); |
163 | | strcat(msg1, msg2); |
164 | | } |
165 | 175 | popmessage("%s", msg1); |
166 | 176 | #endif |
167 | 177 | } |
r241601 | r241602 | |
194 | 204 | |
195 | 205 | /* generic / UFO board handlers */ |
196 | 206 | |
| 207 | /* io1 */ |
| 208 | |
| 209 | READ8_MEMBER(ufo_state::crane_limits_r) |
| 210 | { |
| 211 | int p = offset & 1; |
| 212 | UINT8 ret = 0x7f; |
| 213 | |
| 214 | // d0: left limit sw (right for p2) |
| 215 | // d1: right limit sw (left for p2) |
| 216 | // d2: back limit sw |
| 217 | // d3: front limit sw |
| 218 | // d4: down limit sw |
| 219 | // d5: up limit sw |
| 220 | for (int m = 0; m < 3; m++) |
| 221 | { |
| 222 | ret ^= (m_player[p].motor[m].position >= 1) << (m*2 + 0); |
| 223 | ret ^= (m_player[p].motor[m].position <= 0) << (m*2 + 1); |
| 224 | } |
| 225 | |
| 226 | // d6: crane open sensor (reflective sticker on the stepper motor rotation disc) |
| 227 | if (m_player[p].motor[3].position >= 0.97) |
| 228 | ret ^= 0x40; |
| 229 | |
| 230 | // d7: prize sensor (mirror?) |
| 231 | ret |= (ioport(p ? "IN2" : "IN1")->read() & 0x80); |
| 232 | |
| 233 | return ret; |
| 234 | } |
| 235 | |
| 236 | /* io2 */ |
| 237 | |
197 | 238 | WRITE8_MEMBER(ufo_state::stepper_w) |
198 | 239 | { |
199 | 240 | for (int p = 0; p < 2; p++) |
r241601 | r241602 | |
266 | 307 | |
267 | 308 | WRITE8_MEMBER(ufo_state::ufo_lamps_w) |
268 | 309 | { |
269 | | ; |
| 310 | // d0-d3: ufo leds (2 bits per player) |
| 311 | // 3 sets of two red/green leds, each set is wired to the same control 2 bits |
| 312 | // 00 = off, off |
| 313 | // 11 = red, red |
| 314 | // 01 = green, red |
| 315 | // 10 = red, green |
| 316 | output_set_lamp_value(10, data & 3); |
| 317 | output_set_lamp_value(11, data >> 2 & 3); |
| 318 | |
| 319 | // d4,d5: ? |
| 320 | // d6,d7: coincounters |
| 321 | coin_counter_w(machine(), 0, data & 0x40); // 100 Y |
| 322 | coin_counter_w(machine(), 1, data & 0x80); // 500 Y |
270 | 323 | } |
271 | 324 | |
272 | 325 | |
273 | | READ8_MEMBER(ufo_state::crane_limits_r) |
| 326 | /* EX board specific handlers */ |
| 327 | |
| 328 | /* io1 */ |
| 329 | |
| 330 | READ8_MEMBER(ufo_state::ex_crane_limits_r) |
274 | 331 | { |
275 | 332 | int p = offset & 1; |
276 | | UINT8 ret = 0x7f; |
| 333 | UINT8 ret = 0xf0; |
277 | 334 | |
278 | | // d0: left limit sw (right for p2) |
279 | | // d1: right limit sw (left for p2) |
280 | | // d2: back limit sw |
281 | | // d3: front limit sw |
282 | | // d4: down limit sw |
283 | | // d5: up limit sw |
284 | | for (int i = 0; i < 3; i++) |
| 335 | // d0: left limit sw (invert) |
| 336 | // d1: right limit sw (invert) |
| 337 | // d2: back limit sw (invert) |
| 338 | // d3: front limit sw (invert) |
| 339 | // d4: ? |
| 340 | // d5: down limit sw |
| 341 | // d6: up limit sw |
| 342 | // d7: ? |
| 343 | for (int m = 0; m < 3; m++) |
285 | 344 | { |
286 | | ret ^= (m_player[p].motor[i].position >= 1) << (i*2 + 0); |
287 | | ret ^= (m_player[p].motor[i].position <= 0) << (i*2 + 1); |
| 345 | int shift = (m*2) + (m == 2); |
| 346 | ret ^= (m_player[p].motor[m].position >= 1) << shift; |
| 347 | ret ^= (m_player[p].motor[m].position <= 0) << (shift+1); |
288 | 348 | } |
| 349 | |
| 350 | return ret; |
| 351 | } |
289 | 352 | |
290 | | // d6: crane open sensor (reflective sticker on the stepper motor rotation disc) |
291 | | if (m_player[p].motor[3].position >= 0.97) |
292 | | ret ^= 0x40; |
| 353 | READ8_MEMBER(ufo_state::ex_crane_open_r) |
| 354 | { |
| 355 | // d0-d3: p1, d4-d7: p2 |
| 356 | UINT8 ret = 0xff; |
293 | 357 | |
294 | | // d7: prize sensor (mirror?) |
295 | | ret |= (ioport(p ? "IN2" : "IN1")->read() & 0x80); |
296 | | |
| 358 | for (int p = 0; p < 2; p++) |
| 359 | { |
| 360 | // d0: crane open sensor |
| 361 | if (m_player[p].motor[3].position >= 0.97) |
| 362 | ret ^= (1 << (p*4)); |
| 363 | |
| 364 | // d1: coincounter is plugged in (ufo800 gives error 14 otherwise) |
| 365 | // d2,d3: ? |
| 366 | } |
| 367 | |
297 | 368 | return ret; |
298 | 369 | } |
299 | 370 | |
| 371 | /* io2 */ |
300 | 372 | |
301 | | /* EX board specific handlers */ |
302 | | |
303 | 373 | WRITE8_MEMBER(ufo_state::ex_stepper_w) |
304 | 374 | { |
305 | 375 | // stepper motor sequence is: 6 c 9 3 6 c 9 3.. |
r241601 | r241602 | |
307 | 377 | stepper_w(space, offset, BITSWAP8(data,4,6,5,7,0,2,1,3)); |
308 | 378 | } |
309 | 379 | |
| 380 | WRITE8_MEMBER(ufo_state::ex_cp_lamps_w) |
| 381 | { |
| 382 | // d0,d1,d4,d5: p1/p2 button lamps |
| 383 | for (int i = 0; i < 4; i++) |
| 384 | output_set_lamp_value(i, ~data >> ((i&1) + (i&2) * 2) & 1); |
| 385 | |
| 386 | // d2,d3,d6,d7: p1/p2 coincounters |
| 387 | for (int i = 0; i < 4; i++) |
| 388 | coin_counter_w(machine(), i, data >> (2 + (i&1) + (i&2) * 2) & 1); |
| 389 | } |
| 390 | |
310 | 391 | WRITE8_MEMBER(ufo_state::ex_crane_xyz_w) |
311 | 392 | { |
312 | 393 | int p = offset & 1; |
r241601 | r241602 | |
318 | 399 | // d3: move front |
319 | 400 | // d4: move down |
320 | 401 | // d5: move up |
321 | | for (int i = 0; i < 3; i++) |
| 402 | for (int m = 0; m < 3; m++) |
322 | 403 | { |
323 | | int bits = data >> (i*2) & 3; |
324 | | m_player[p].motor[i].running = (bits == 1 || bits == 2) ? 1 : 0; |
325 | | m_player[p].motor[i].direction = bits & 2; |
| 404 | int bits = data >> (m*2) & 3; |
| 405 | m_player[p].motor[m].running = (bits == 1 || bits == 2) ? 1 : 0; |
| 406 | m_player[p].motor[m].direction = bits & 2; |
326 | 407 | } |
327 | 408 | } |
328 | 409 | |
| 410 | WRITE8_MEMBER(ufo_state::ex_ufo800_lamps_w) |
| 411 | { |
| 412 | // d0-d4: 5 red leds on ufo |
| 413 | // other bits: ? |
| 414 | for (int i = 0; i < 5; i++) |
| 415 | output_set_lamp_value(10 + i, data >> i & 1); |
| 416 | } |
329 | 417 | |
330 | | READ8_MEMBER(ufo_state::ex_crane_limits_r) |
| 418 | /* 315-5338A */ |
| 419 | |
| 420 | WRITE8_MEMBER(ufo_state::ex_ufo21_lamps_w) |
331 | 421 | { |
332 | | int p = offset & 1; |
333 | | UINT8 ret = 0xf0; |
| 422 | // d0: ? (ufo21 reads from it too, but value is discarded) |
| 423 | // d1-d6 are the 6 red leds on each ufo |
| 424 | // d7: ? |
| 425 | for (int i = 1; i < 7; i++) |
| 426 | output_set_lamp_value(10 + offset * 10 + i, data >> i & 1); |
| 427 | } |
334 | 428 | |
335 | | // d0: left limit sw (invert) |
336 | | // d1: right limit sw (invert) |
337 | | // d2: back limit sw (invert) |
338 | | // d3: front limit sw (invert) |
339 | | // d4: .. |
340 | | // d5: down limit sw |
341 | | // d6: up limit sw |
342 | | for (int i = 0; i < 3; i++) |
343 | | { |
344 | | int shift = (i*2) + (i == 2); |
345 | | ret ^= (m_player[p].motor[i].position >= 1) << (shift + 0); |
346 | | ret ^= (m_player[p].motor[i].position <= 0) << (shift + 1); |
347 | | } |
348 | | |
349 | | // d4: crane open or closed sensor |
350 | | // d7: crane open or closed sensor (another one?) |
351 | | if (m_player[p].motor[3].position >= 0.97) |
352 | | ret ^= 0x10; |
353 | | if (m_player[p].motor[3].position <= 0.03) |
354 | | ret ^= 0x80; |
355 | | |
356 | | return ret; |
| 429 | WRITE8_MEMBER(ufo_state::ex_upd_start_w) |
| 430 | { |
| 431 | // d0: upd7759c start sample |
| 432 | // other bits: unused? |
| 433 | m_upd->start_w(~data & 1); |
357 | 434 | } |
358 | 435 | |
359 | | READ8_MEMBER(ufo_state::ex_crane_open_r) |
| 436 | READ8_MEMBER(ufo_state::ex_upd_busy_r) |
360 | 437 | { |
361 | | // d0-d3: p1, d4-d7: p2 |
362 | | UINT8 ret = 0xff; |
363 | | |
364 | | for (int p = 0; p < 2; p++) |
365 | | { |
366 | | // unlike ex_crane_limits_r, this sensor can determine whether the crane is open or closed |
367 | | if (m_player[p].motor[3].position >= 0.97) |
368 | | ret ^= (1 << (p*4)); |
369 | | if (m_player[p].motor[3].position <= 0.03) |
370 | | ret ^= (2 << (p*4)); |
371 | | |
372 | | // d2,d3: ? |
373 | | } |
374 | | |
375 | | return ret; |
| 438 | // d0: upd7759c busy |
| 439 | // other bits: unused? |
| 440 | int d0 = m_upd->busy_r() ? 1 : 0; |
| 441 | return 0xfe | d0; |
376 | 442 | } |
377 | 443 | |
378 | 444 | |
379 | | /* memory maps */ |
| 445 | /* Memory maps */ |
380 | 446 | |
381 | 447 | static ADDRESS_MAP_START( ufo_map, AS_PROGRAM, 8, ufo_state ) |
382 | 448 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
r241601 | r241602 | |
393 | 459 | ADDRESS_MAP_END |
394 | 460 | |
395 | 461 | |
| 462 | static ADDRESS_MAP_START( ex_ufo21_portmap, AS_IO, 8, ufo_state ) |
| 463 | AM_RANGE(0x20, 0x20) AM_DEVWRITE("upd", upd7759_device, port_w) |
| 464 | AM_RANGE(0x60, 0x60) AM_WRITE(ex_upd_start_w) AM_READNOP |
| 465 | AM_RANGE(0x61, 0x61) AM_READ(ex_upd_busy_r) |
| 466 | AM_RANGE(0x64, 0x65) AM_WRITE(ex_ufo21_lamps_w) AM_READNOP |
| 467 | // AM_RANGE(0x68, 0x68) AM_WRITENOP // ? |
| 468 | AM_IMPORT_FROM( ufo_portmap ) |
| 469 | ADDRESS_MAP_END |
396 | 470 | |
| 471 | static ADDRESS_MAP_START( ex_ufo800_portmap, AS_IO, 8, ufo_state ) |
| 472 | // AM_RANGE(0x60, 0x67) AM_NOP // unused? |
| 473 | // AM_RANGE(0x68, 0x68) AM_WRITENOP // ? |
| 474 | AM_IMPORT_FROM( ufo_portmap ) |
| 475 | ADDRESS_MAP_END |
| 476 | |
| 477 | |
| 478 | |
397 | 479 | /*************************************************************************** |
398 | 480 | |
399 | 481 | Inputs |
r241601 | r241602 | |
402 | 484 | |
403 | 485 | static INPUT_PORTS_START( newufo ) |
404 | 486 | PORT_START("IN1") |
405 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("P1 Coin 1") |
406 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("P1 Coin 2") |
| 487 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("P1 Coin 1") // 100 Y |
| 488 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("P1 Coin 2") // 500 Y |
407 | 489 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("P1 Test") |
408 | 490 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("P1 Service Coin") |
409 | 491 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("P1 Credit Clear") |
410 | 492 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
411 | 493 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
412 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Prize Fell") |
| 494 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Prize Sensor") |
413 | 495 | |
414 | 496 | PORT_START("IN2") |
415 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("P2 Coin 1") |
416 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("P2 Coin 2") |
| 497 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("P2 Coin 1") // 100 Y |
| 498 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("P2 Coin 2") // 500 Y |
417 | 499 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Test") PORT_CODE(KEYCODE_F1) |
418 | 500 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("P2 Service Coin") |
419 | 501 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("P2 Credit Clear") |
420 | 502 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
421 | 503 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
422 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Prize Fell") |
| 504 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Prize Sensor") |
423 | 505 | |
424 | 506 | PORT_START("DSW1") // coinage |
425 | 507 | PORT_DIPNAME( 0x01, 0x01, "UNK1-01" ) |
r241601 | r241602 | |
673 | 755 | static MACHINE_CONFIG_START( newufo, ufo_state ) |
674 | 756 | |
675 | 757 | /* basic machine hardware */ |
676 | | MCFG_CPU_ADD("maincpu", Z80, 8000000) |
| 758 | MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) |
677 | 759 | MCFG_CPU_PROGRAM_MAP(ufo_map) |
678 | 760 | MCFG_CPU_IO_MAP(ufo_portmap) |
679 | 761 | |
680 | 762 | MCFG_TIMER_DRIVER_ADD_PERIODIC("motor_timer", ufo_state, simulate_xyz, attotime::from_hz(MOTOR_SPEED)) |
681 | 763 | MCFG_TIMER_DRIVER_ADD_PERIODIC("update_timer", ufo_state, update_info, attotime::from_hz(60)) |
682 | 764 | |
683 | | MCFG_DEVICE_ADD("io1", SEGA_315_5296, 16000000) |
| 765 | MCFG_DEVICE_ADD("io1", SEGA_315_5296, XTAL_16MHz) |
684 | 766 | // all ports set to input |
685 | 767 | MCFG_315_5296_IN_PORTA_CB(READ8(ufo_state, crane_limits_r)) |
686 | 768 | MCFG_315_5296_IN_PORTB_CB(READ8(ufo_state, crane_limits_r)) |
r241601 | r241602 | |
689 | 771 | MCFG_315_5296_IN_PORTG_CB(IOPORT("DSW2")) |
690 | 772 | MCFG_315_5296_IN_PORTH_CB(IOPORT("IN2")) |
691 | 773 | |
692 | | MCFG_DEVICE_ADD("io2", SEGA_315_5296, 16000000) |
| 774 | MCFG_DEVICE_ADD("io2", SEGA_315_5296, XTAL_16MHz) |
693 | 775 | // all ports set to output |
694 | 776 | MCFG_315_5296_OUT_PORTA_CB(WRITE8(ufo_state, stepper_w)) |
695 | 777 | MCFG_315_5296_OUT_PORTB_CB(WRITE8(ufo_state, cp_lamps_w)) |
r241601 | r241602 | |
699 | 781 | MCFG_315_5296_OUT_PORTF_CB(WRITE8(ufo_state, crane_xyz_w)) |
700 | 782 | MCFG_315_5296_OUT_PORTG_CB(WRITE8(ufo_state, ufo_lamps_w)) |
701 | 783 | |
702 | | MCFG_DEVICE_ADD("pit", PIT8254, 0) // uPD71054C, configuration is unknown |
703 | | MCFG_PIT8253_CLK0(8000000/256) |
| 784 | MCFG_DEVICE_ADD("pit", PIT8254, XTAL_16MHz/2) // uPD71054C, configuration is unknown |
| 785 | MCFG_PIT8253_CLK0(XTAL_16MHz/2/256) |
704 | 786 | MCFG_PIT8253_OUT0_HANDLER(WRITELINE(ufo_state, pit_out0)) |
705 | | MCFG_PIT8253_CLK1(8000000/256) |
| 787 | MCFG_PIT8253_CLK1(XTAL_16MHz/2/256) |
706 | 788 | MCFG_PIT8253_OUT1_HANDLER(WRITELINE(ufo_state, pit_out1)) |
707 | | MCFG_PIT8253_CLK2(8000000/256) |
| 789 | MCFG_PIT8253_CLK2(XTAL_16MHz/2/256) |
708 | 790 | MCFG_PIT8253_OUT2_HANDLER(WRITELINE(ufo_state, pit_out2)) |
709 | 791 | |
710 | 792 | /* no video! */ |
r241601 | r241602 | |
712 | 794 | /* sound hardware */ |
713 | 795 | MCFG_SPEAKER_STANDARD_MONO("mono") |
714 | 796 | |
715 | | MCFG_SOUND_ADD("ym", YM3438, 8000000) |
| 797 | MCFG_SOUND_ADD("ym", YM3438, XTAL_16MHz/2) |
716 | 798 | MCFG_YM2612_IRQ_HANDLER(WRITELINE(ufo_state, ym3438_irq)) |
717 | 799 | MCFG_SOUND_ROUTE(0, "mono", 0.40) |
718 | 800 | MCFG_SOUND_ROUTE(1, "mono", 0.40) |
r241601 | r241602 | |
731 | 813 | static MACHINE_CONFIG_DERIVED( ufo21, newufo ) |
732 | 814 | |
733 | 815 | /* basic machine hardware */ |
| 816 | MCFG_CPU_MODIFY("maincpu") |
| 817 | MCFG_CPU_IO_MAP(ex_ufo21_portmap) |
| 818 | |
734 | 819 | MCFG_DEVICE_MODIFY("io1") |
735 | 820 | MCFG_315_5296_IN_PORTA_CB(READ8(ufo_state, ex_crane_limits_r)) |
736 | 821 | MCFG_315_5296_IN_PORTB_CB(READ8(ufo_state, ex_crane_limits_r)) |
r241601 | r241602 | |
738 | 823 | |
739 | 824 | MCFG_DEVICE_MODIFY("io2") |
740 | 825 | MCFG_315_5296_OUT_PORTA_CB(WRITE8(ufo_state, ex_stepper_w)) |
| 826 | MCFG_315_5296_OUT_PORTB_CB(WRITE8(ufo_state, ex_cp_lamps_w)) |
741 | 827 | MCFG_315_5296_OUT_PORTE_CB(WRITE8(ufo_state, ex_crane_xyz_w)) |
742 | 828 | MCFG_315_5296_OUT_PORTF_CB(WRITE8(ufo_state, ex_crane_xyz_w)) |
| 829 | MCFG_315_5296_OUT_PORTG_CB(NULL) |
| 830 | |
| 831 | /* sound hardware */ |
| 832 | MCFG_SOUND_ADD("upd", UPD7759, UPD7759_STANDARD_CLOCK) |
| 833 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
743 | 834 | MACHINE_CONFIG_END |
744 | 835 | |
745 | | static MACHINE_CONFIG_DERIVED( ufo800, ufo21 ) |
| 836 | static MACHINE_CONFIG_DERIVED( ufo800, newufo ) |
746 | 837 | |
747 | 838 | /* basic machine hardware */ |
| 839 | MCFG_CPU_MODIFY("maincpu") |
| 840 | MCFG_CPU_IO_MAP(ex_ufo800_portmap) |
| 841 | |
748 | 842 | MCFG_DEVICE_MODIFY("io1") |
| 843 | MCFG_315_5296_IN_PORTA_CB(READ8(ufo_state, ex_crane_limits_r)) |
749 | 844 | MCFG_315_5296_IN_PORTB_CB(IOPORT("IN2")) |
| 845 | MCFG_315_5296_IN_PORTC_CB(READ8(ufo_state, ex_crane_open_r)) |
750 | 846 | MCFG_315_5296_IN_PORTD_CB(IOPORT("IN1")) |
751 | 847 | MCFG_315_5296_IN_PORTE_CB(NULL) |
752 | 848 | MCFG_315_5296_IN_PORTH_CB(NULL) |
753 | 849 | |
754 | 850 | MCFG_DEVICE_MODIFY("io2") |
755 | | MCFG_315_5296_OUT_PORTF_CB(NULL) // ufo lamps? |
| 851 | MCFG_315_5296_OUT_PORTA_CB(WRITE8(ufo_state, ex_stepper_w)) |
| 852 | MCFG_315_5296_OUT_PORTB_CB(WRITE8(ufo_state, ex_cp_lamps_w)) |
| 853 | MCFG_315_5296_OUT_PORTE_CB(WRITE8(ufo_state, ex_crane_xyz_w)) |
| 854 | MCFG_315_5296_OUT_PORTF_CB(WRITE8(ufo_state, ex_ufo800_lamps_w)) |
| 855 | MCFG_315_5296_OUT_PORTG_CB(NULL) |
756 | 856 | MACHINE_CONFIG_END |
757 | 857 | |
758 | 858 | |
r241601 | r241602 | |
804 | 904 | ROM_END |
805 | 905 | |
806 | 906 | |
807 | | GAMEL( 1991, newufo, 0, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (standard)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo ) |
808 | | GAMEL( 1991, newufo_sonic, newufo, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Sonic The Hedgehog)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo ) |
809 | | GAMEL( 1991, newufo_nfl, newufo, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Team NFL)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo ) |
810 | | GAMEL( 1991, newufo_xmas, newufo, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Christmas season ROM kit)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo ) |
811 | | GAMEL( 1991, ufomini, 0, ufomini, ufomini, driver_device, 0, ROT0, "Sega", "UFO Catcher Mini", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo ) |
812 | | GAMEL( 1996, ufo21, 0, ufo21, ufo21, driver_device, 0, ROT0, "Sega", "UFO Catcher 21", GAME_IMPERFECT_SOUND | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo ) |
813 | | GAMEL( 1998, ufo800, 0, ufo800, ufo800, driver_device, 0, ROT0, "Sega", "UFO Catcher 800", GAME_NOT_WORKING | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo ) |
| 907 | GAMEL( 1991, newufo, 0, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (standard)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_newufo ) |
| 908 | GAMEL( 1991, newufo_sonic, newufo, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Sonic The Hedgehog)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_newufo ) |
| 909 | GAMEL( 1991, newufo_nfl, newufo, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Team NFL)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_newufo ) |
| 910 | GAMEL( 1991, newufo_xmas, newufo, newufo, newufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Christmas season ROM kit)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_newufo ) |
| 911 | GAMEL( 1991, ufomini, 0, ufomini, ufomini, driver_device, 0, ROT0, "Sega", "UFO Catcher Mini", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_ufomini ) |
| 912 | GAMEL( 1996, ufo21, 0, ufo21, ufo21, driver_device, 0, ROT0, "Sega", "UFO Catcher 21", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_ufo21 ) |
| 913 | GAMEL( 1998, ufo800, 0, ufo800, ufo800, driver_device, 0, ROT0, "Sega", "UFO Catcher 800", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_ufo800 ) |
trunk/src/mame/layout/newufo.lay
r0 | r241602 | |
| 1 | <?xml version="1.0"?> |
| 2 | <mamelayout version="2"> |
| 3 | |
| 4 | |
| 5 | <!-- define elements --> |
| 6 | |
| 7 | <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> |
| 8 | <element name="static_grey"><rect><color red="0.6" green="0.6" blue="0.6" /></rect></element> |
| 9 | <element name="static_pink"><rect><color red="0.9" green="0.55" blue="0.75" /></rect></element> |
| 10 | |
| 11 | <element name="text_ufored"> |
| 12 | <text string="~UFO~"> |
| 13 | <color red="1.0" green="0.3" blue="0.2" /> |
| 14 | </text> |
| 15 | </element> |
| 16 | <element name="text_ufoblue"> |
| 17 | <text string="~UFO~"> |
| 18 | <color red="0.2" green="0.3" blue="1.0" /> |
| 19 | </text> |
| 20 | </element> |
| 21 | |
| 22 | <element name="text_x"> |
| 23 | <text string="X:" align="1"> |
| 24 | <color red="0.85" green="0.85" blue="0.85" /> |
| 25 | </text> |
| 26 | </element> |
| 27 | <element name="text_y"> |
| 28 | <text string="Y:" align="1"> |
| 29 | <color red="0.85" green="0.85" blue="0.85" /> |
| 30 | </text> |
| 31 | </element> |
| 32 | <element name="text_z"> |
| 33 | <text string="Z:" align="1"> |
| 34 | <color red="0.85" green="0.85" blue="0.85" /> |
| 35 | </text> |
| 36 | </element> |
| 37 | <element name="text_c"> |
| 38 | <text string="C:" align="1"> |
| 39 | <color red="0.85" green="0.85" blue="0.85" /> |
| 40 | </text> |
| 41 | </element> |
| 42 | |
| 43 | <element name="digit" defstate="0"> |
| 44 | <led7seg> |
| 45 | <color red="1.0" green="0.3" blue="0.2" /> |
| 46 | </led7seg> |
| 47 | </element> |
| 48 | |
| 49 | <element name="counter" defstate="0"> |
| 50 | <simplecounter maxstate="999" digits="3" align="1"> |
| 51 | <color red="0.95" green="0.95" blue="0.95" /> |
| 52 | </simplecounter> |
| 53 | </element> |
| 54 | |
| 55 | <element name="lamp_b1" defstate="0"> |
| 56 | <disk><color red="0.0" green="0.0" blue="0.0" /></disk> |
| 57 | <disk state="1"> |
| 58 | <color red="1.0" green="1.0" blue="1.0" /> |
| 59 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 60 | </disk> |
| 61 | <disk state="0"> |
| 62 | <color red="0.7" green="0.7" blue="0.7" /> |
| 63 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 64 | </disk> |
| 65 | <text string="1"> |
| 66 | <color red="0.0" green="0.0" blue="0.0" /> |
| 67 | <bounds x="0" y="0.2" width="1.0" height="0.6" /> |
| 68 | </text> |
| 69 | </element> |
| 70 | <element name="lamp_b2" defstate="0"> |
| 71 | <disk><color red="0.0" green="0.0" blue="0.0" /></disk> |
| 72 | <disk state="1"> |
| 73 | <color red="1.0" green="1.0" blue="1.0" /> |
| 74 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 75 | </disk> |
| 76 | <disk state="0"> |
| 77 | <color red="0.7" green="0.7" blue="0.7" /> |
| 78 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 79 | </disk> |
| 80 | <text string="2"> |
| 81 | <color red="0.0" green="0.0" blue="0.0" /> |
| 82 | <bounds x="0" y="0.2" width="1.0" height="0.6" /> |
| 83 | </text> |
| 84 | </element> |
| 85 | |
| 86 | <element name="lamp_rg0" defstate="0"> |
| 87 | <disk state="0"> |
| 88 | <color red="0.2" green="0.05" blue="0.0" /> |
| 89 | </disk> |
| 90 | <disk state="1"> |
| 91 | <color red="0.4" green="1.0" blue="0.3" /> |
| 92 | </disk> |
| 93 | <disk state="2"> |
| 94 | <color red="1.0" green="0.4" blue="0.3" /> |
| 95 | </disk> |
| 96 | <disk state="3"> |
| 97 | <color red="1.0" green="0.4" blue="0.3" /> |
| 98 | </disk> |
| 99 | </element> |
| 100 | <element name="lamp_rg1" defstate="0"> |
| 101 | <disk state="0"> |
| 102 | <color red="0.2" green="0.05" blue="0.0" /> |
| 103 | </disk> |
| 104 | <disk state="1"> |
| 105 | <color red="1.0" green="0.4" blue="0.3" /> |
| 106 | </disk> |
| 107 | <disk state="2"> |
| 108 | <color red="0.4" green="1.0" blue="0.3" /> |
| 109 | </disk> |
| 110 | <disk state="3"> |
| 111 | <color red="1.0" green="0.4" blue="0.3" /> |
| 112 | </disk> |
| 113 | </element> |
| 114 | |
| 115 | |
| 116 | <!-- build screen --> |
| 117 | |
| 118 | <view name="Internal Layout"> |
| 119 | <bounds left="0" right="200" top="0" bottom="90" /> |
| 120 | <bezel element="static_black"> |
| 121 | <bounds left="0" right="200" top="0" bottom="90" /> |
| 122 | </bezel> |
| 123 | |
| 124 | <bezel element="static_grey"> |
| 125 | <bounds x="99" y="0" width="2" height="80" /> |
| 126 | </bezel> |
| 127 | |
| 128 | <!-- control panel --> |
| 129 | |
| 130 | <bezel element="static_pink"> |
| 131 | <bounds x="0" y="60" width="200" height="30" /> |
| 132 | </bezel> |
| 133 | |
| 134 | <bezel name="lamp0" element="lamp_b1" inputtag="IN1" inputmask="0x20" > |
| 135 | <bounds x="30" y="70" width="10" height="10"/> |
| 136 | </bezel> |
| 137 | <bezel name="lamp1" element="lamp_b2" inputtag="IN1" inputmask="0x40" > |
| 138 | <bounds x="43" y="70" width="10" height="10"/> |
| 139 | </bezel> |
| 140 | |
| 141 | <bezel name="lamp2" element="lamp_b1" inputtag="IN2" inputmask="0x20" > |
| 142 | <bounds x="147" y="70" width="10" height="10"/> |
| 143 | </bezel> |
| 144 | <bezel name="lamp3" element="lamp_b2" inputtag="IN2" inputmask="0x40" > |
| 145 | <bounds x="160" y="70" width="10" height="10"/> |
| 146 | </bezel> |
| 147 | |
| 148 | <bezel element="static_black"> |
| 149 | <bounds x="60" y="70" width="12" height="17" /> |
| 150 | </bezel> |
| 151 | <bezel name="digit0" element="digit"> |
| 152 | <bounds x="61" y="71" width="10" height="15" /> |
| 153 | </bezel> |
| 154 | |
| 155 | <bezel element="static_black"> |
| 156 | <bounds x="128" y="70" width="12" height="17" /> |
| 157 | </bezel> |
| 158 | <bezel name="digit1" element="digit"> |
| 159 | <bounds x="129" y="71" width="10" height="15" /> |
| 160 | </bezel> |
| 161 | |
| 162 | |
| 163 | <!-- left ufo info --> |
| 164 | |
| 165 | <bezel element="text_x"> |
| 166 | <bounds x="5" y="5" width="10" height="4" /> |
| 167 | </bezel> |
| 168 | <bezel element="text_y"> |
| 169 | <bounds x="5" y="10" width="10" height="4" /> |
| 170 | </bezel> |
| 171 | <bezel element="text_z"> |
| 172 | <bounds x="5" y="15" width="10" height="4" /> |
| 173 | </bezel> |
| 174 | <bezel element="text_c"> |
| 175 | <bounds x="5" y="20" width="10" height="4" /> |
| 176 | </bezel> |
| 177 | |
| 178 | <bezel name="counter0" element="counter"> |
| 179 | <bounds x="12" y="5" width="20" height="4" /> |
| 180 | </bezel> |
| 181 | <bezel name="counter1" element="counter"> |
| 182 | <bounds x="12" y="10" width="20" height="4" /> |
| 183 | </bezel> |
| 184 | <bezel name="counter2" element="counter"> |
| 185 | <bounds x="12" y="15" width="20" height="4" /> |
| 186 | </bezel> |
| 187 | <bezel name="counter3" element="counter"> |
| 188 | <bounds x="12" y="20" width="20" height="4" /> |
| 189 | </bezel> |
| 190 | |
| 191 | <bezel element="text_ufored"> |
| 192 | <bounds x="25" y="25" width="50" height="14" /> |
| 193 | </bezel> |
| 194 | |
| 195 | <bezel name="lamp10" element="lamp_rg0"> |
| 196 | <bounds x="31" y="44" width="3" height="3" /> |
| 197 | </bezel> |
| 198 | <bezel name="lamp10" element="lamp_rg1"> |
| 199 | <bounds x="38" y="44" width="3" height="3" /> |
| 200 | </bezel> |
| 201 | <bezel name="lamp10" element="lamp_rg0"> |
| 202 | <bounds x="45" y="44" width="3" height="3" /> |
| 203 | </bezel> |
| 204 | <bezel name="lamp10" element="lamp_rg1"> |
| 205 | <bounds x="52" y="44" width="3" height="3" /> |
| 206 | </bezel> |
| 207 | <bezel name="lamp10" element="lamp_rg0"> |
| 208 | <bounds x="59" y="44" width="3" height="3" /> |
| 209 | </bezel> |
| 210 | <bezel name="lamp10" element="lamp_rg1"> |
| 211 | <bounds x="66" y="44" width="3" height="3" /> |
| 212 | </bezel> |
| 213 | |
| 214 | <!-- right ufo info --> |
| 215 | |
| 216 | <bezel element="text_x"> |
| 217 | <bounds x="105" y="5" width="10" height="4" /> |
| 218 | </bezel> |
| 219 | <bezel element="text_y"> |
| 220 | <bounds x="105" y="10" width="10" height="4" /> |
| 221 | </bezel> |
| 222 | <bezel element="text_z"> |
| 223 | <bounds x="105" y="15" width="10" height="4" /> |
| 224 | </bezel> |
| 225 | <bezel element="text_c"> |
| 226 | <bounds x="105" y="20" width="10" height="4" /> |
| 227 | </bezel> |
| 228 | |
| 229 | <bezel name="counter4" element="counter"> |
| 230 | <bounds x="112" y="5" width="20" height="4" /> |
| 231 | </bezel> |
| 232 | <bezel name="counter5" element="counter"> |
| 233 | <bounds x="112" y="10" width="20" height="4" /> |
| 234 | </bezel> |
| 235 | <bezel name="counter6" element="counter"> |
| 236 | <bounds x="112" y="15" width="20" height="4" /> |
| 237 | </bezel> |
| 238 | <bezel name="counter7" element="counter"> |
| 239 | <bounds x="112" y="20" width="20" height="4" /> |
| 240 | </bezel> |
| 241 | |
| 242 | <bezel element="text_ufoblue"> |
| 243 | <bounds x="125" y="25" width="50" height="14" /> |
| 244 | </bezel> |
| 245 | |
| 246 | <bezel name="lamp11" element="lamp_rg0"> |
| 247 | <bounds x="131" y="44" width="3" height="3" /> |
| 248 | </bezel> |
| 249 | <bezel name="lamp11" element="lamp_rg1"> |
| 250 | <bounds x="138" y="44" width="3" height="3" /> |
| 251 | </bezel> |
| 252 | <bezel name="lamp11" element="lamp_rg0"> |
| 253 | <bounds x="145" y="44" width="3" height="3" /> |
| 254 | </bezel> |
| 255 | <bezel name="lamp11" element="lamp_rg1"> |
| 256 | <bounds x="152" y="44" width="3" height="3" /> |
| 257 | </bezel> |
| 258 | <bezel name="lamp11" element="lamp_rg0"> |
| 259 | <bounds x="159" y="44" width="3" height="3" /> |
| 260 | </bezel> |
| 261 | <bezel name="lamp11" element="lamp_rg1"> |
| 262 | <bounds x="166" y="44" width="3" height="3" /> |
| 263 | </bezel> |
| 264 | |
| 265 | |
| 266 | </view> |
| 267 | </mamelayout> |
trunk/src/mame/layout/ufo21.lay
r0 | r241602 | |
| 1 | <?xml version="1.0"?> |
| 2 | <mamelayout version="2"> |
| 3 | |
| 4 | |
| 5 | <!-- define elements --> |
| 6 | |
| 7 | <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> |
| 8 | <element name="static_grey"><rect><color red="0.6" green="0.6" blue="0.6" /></rect></element> |
| 9 | <element name="static_pink"><rect><color red="0.9" green="0.55" blue="0.75" /></rect></element> |
| 10 | |
| 11 | <element name="text_ufored"> |
| 12 | <text string="~UFO~"> |
| 13 | <color red="1.0" green="0.3" blue="0.2" /> |
| 14 | </text> |
| 15 | </element> |
| 16 | <element name="text_ufoblue"> |
| 17 | <text string="~UFO~"> |
| 18 | <color red="0.2" green="0.3" blue="1.0" /> |
| 19 | </text> |
| 20 | </element> |
| 21 | |
| 22 | <element name="text_x"> |
| 23 | <text string="X:" align="1"> |
| 24 | <color red="0.85" green="0.85" blue="0.85" /> |
| 25 | </text> |
| 26 | </element> |
| 27 | <element name="text_y"> |
| 28 | <text string="Y:" align="1"> |
| 29 | <color red="0.85" green="0.85" blue="0.85" /> |
| 30 | </text> |
| 31 | </element> |
| 32 | <element name="text_z"> |
| 33 | <text string="Z:" align="1"> |
| 34 | <color red="0.85" green="0.85" blue="0.85" /> |
| 35 | </text> |
| 36 | </element> |
| 37 | <element name="text_c"> |
| 38 | <text string="C:" align="1"> |
| 39 | <color red="0.85" green="0.85" blue="0.85" /> |
| 40 | </text> |
| 41 | </element> |
| 42 | |
| 43 | <element name="digit" defstate="0"> |
| 44 | <led7seg> |
| 45 | <color red="1.0" green="0.3" blue="0.2" /> |
| 46 | </led7seg> |
| 47 | </element> |
| 48 | |
| 49 | <element name="counter" defstate="0"> |
| 50 | <simplecounter maxstate="999" digits="3" align="1"> |
| 51 | <color red="0.95" green="0.95" blue="0.95" /> |
| 52 | </simplecounter> |
| 53 | </element> |
| 54 | |
| 55 | <element name="lamp_b1" defstate="0"> |
| 56 | <disk><color red="0.0" green="0.0" blue="0.0" /></disk> |
| 57 | <disk state="1"> |
| 58 | <color red="1.0" green="1.0" blue="1.0" /> |
| 59 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 60 | </disk> |
| 61 | <disk state="0"> |
| 62 | <color red="0.7" green="0.7" blue="0.7" /> |
| 63 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 64 | </disk> |
| 65 | <text string="1"> |
| 66 | <color red="0.0" green="0.0" blue="0.0" /> |
| 67 | <bounds x="0" y="0.2" width="1.0" height="0.6" /> |
| 68 | </text> |
| 69 | </element> |
| 70 | <element name="lamp_b2" defstate="0"> |
| 71 | <disk><color red="0.0" green="0.0" blue="0.0" /></disk> |
| 72 | <disk state="1"> |
| 73 | <color red="1.0" green="1.0" blue="1.0" /> |
| 74 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 75 | </disk> |
| 76 | <disk state="0"> |
| 77 | <color red="0.7" green="0.7" blue="0.7" /> |
| 78 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 79 | </disk> |
| 80 | <text string="2"> |
| 81 | <color red="0.0" green="0.0" blue="0.0" /> |
| 82 | <bounds x="0" y="0.2" width="1.0" height="0.6" /> |
| 83 | </text> |
| 84 | </element> |
| 85 | |
| 86 | <element name="lamp_red" defstate="0"> |
| 87 | <disk state="0"> |
| 88 | <color red="0.2" green="0.05" blue="0.0" /> |
| 89 | </disk> |
| 90 | <disk state="1"> |
| 91 | <color red="1.0" green="0.4" blue="0.3" /> |
| 92 | </disk> |
| 93 | </element> |
| 94 | |
| 95 | |
| 96 | <!-- build screen --> |
| 97 | |
| 98 | <view name="Internal Layout"> |
| 99 | <bounds left="0" right="200" top="0" bottom="90" /> |
| 100 | <bezel element="static_black"> |
| 101 | <bounds left="0" right="200" top="0" bottom="90" /> |
| 102 | </bezel> |
| 103 | |
| 104 | <bezel element="static_grey"> |
| 105 | <bounds x="99" y="0" width="2" height="80" /> |
| 106 | </bezel> |
| 107 | |
| 108 | <!-- control panel --> |
| 109 | |
| 110 | <bezel element="static_pink"> |
| 111 | <bounds x="0" y="60" width="200" height="30" /> |
| 112 | </bezel> |
| 113 | |
| 114 | <bezel name="lamp0" element="lamp_b1" inputtag="IN2" inputmask="0x01" > |
| 115 | <bounds x="30" y="70" width="10" height="10"/> |
| 116 | </bezel> |
| 117 | <bezel name="lamp1" element="lamp_b2" inputtag="IN2" inputmask="0x02" > |
| 118 | <bounds x="43" y="70" width="10" height="10"/> |
| 119 | </bezel> |
| 120 | |
| 121 | <bezel name="lamp2" element="lamp_b1" inputtag="IN2" inputmask="0x10" > |
| 122 | <bounds x="147" y="70" width="10" height="10"/> |
| 123 | </bezel> |
| 124 | <bezel name="lamp3" element="lamp_b2" inputtag="IN2" inputmask="0x20" > |
| 125 | <bounds x="160" y="70" width="10" height="10"/> |
| 126 | </bezel> |
| 127 | |
| 128 | <bezel element="static_black"> |
| 129 | <bounds x="60" y="70" width="12" height="17" /> |
| 130 | </bezel> |
| 131 | <bezel name="digit0" element="digit"> |
| 132 | <bounds x="61" y="71" width="10" height="15" /> |
| 133 | </bezel> |
| 134 | |
| 135 | <bezel element="static_black"> |
| 136 | <bounds x="128" y="70" width="12" height="17" /> |
| 137 | </bezel> |
| 138 | <bezel name="digit1" element="digit"> |
| 139 | <bounds x="129" y="71" width="10" height="15" /> |
| 140 | </bezel> |
| 141 | |
| 142 | |
| 143 | <!-- left ufo info --> |
| 144 | |
| 145 | <bezel element="text_x"> |
| 146 | <bounds x="5" y="5" width="10" height="4" /> |
| 147 | </bezel> |
| 148 | <bezel element="text_y"> |
| 149 | <bounds x="5" y="10" width="10" height="4" /> |
| 150 | </bezel> |
| 151 | <bezel element="text_z"> |
| 152 | <bounds x="5" y="15" width="10" height="4" /> |
| 153 | </bezel> |
| 154 | <bezel element="text_c"> |
| 155 | <bounds x="5" y="20" width="10" height="4" /> |
| 156 | </bezel> |
| 157 | |
| 158 | <bezel name="counter0" element="counter"> |
| 159 | <bounds x="12" y="5" width="20" height="4" /> |
| 160 | </bezel> |
| 161 | <bezel name="counter1" element="counter"> |
| 162 | <bounds x="12" y="10" width="20" height="4" /> |
| 163 | </bezel> |
| 164 | <bezel name="counter2" element="counter"> |
| 165 | <bounds x="12" y="15" width="20" height="4" /> |
| 166 | </bezel> |
| 167 | <bezel name="counter3" element="counter"> |
| 168 | <bounds x="12" y="20" width="20" height="4" /> |
| 169 | </bezel> |
| 170 | |
| 171 | <bezel element="text_ufored"> |
| 172 | <bounds x="25" y="25" width="50" height="14" /> |
| 173 | </bezel> |
| 174 | |
| 175 | <bezel name="lamp11" element="lamp_red"> |
| 176 | <bounds x="31" y="44" width="3" height="3" /> |
| 177 | </bezel> |
| 178 | <bezel name="lamp12" element="lamp_red"> |
| 179 | <bounds x="38" y="44" width="3" height="3" /> |
| 180 | </bezel> |
| 181 | <bezel name="lamp13" element="lamp_red"> |
| 182 | <bounds x="45" y="44" width="3" height="3" /> |
| 183 | </bezel> |
| 184 | <bezel name="lamp14" element="lamp_red"> |
| 185 | <bounds x="52" y="44" width="3" height="3" /> |
| 186 | </bezel> |
| 187 | <bezel name="lamp15" element="lamp_red"> |
| 188 | <bounds x="59" y="44" width="3" height="3" /> |
| 189 | </bezel> |
| 190 | <bezel name="lamp16" element="lamp_red"> |
| 191 | <bounds x="66" y="44" width="3" height="3" /> |
| 192 | </bezel> |
| 193 | |
| 194 | <!-- right ufo info --> |
| 195 | |
| 196 | <bezel element="text_x"> |
| 197 | <bounds x="105" y="5" width="10" height="4" /> |
| 198 | </bezel> |
| 199 | <bezel element="text_y"> |
| 200 | <bounds x="105" y="10" width="10" height="4" /> |
| 201 | </bezel> |
| 202 | <bezel element="text_z"> |
| 203 | <bounds x="105" y="15" width="10" height="4" /> |
| 204 | </bezel> |
| 205 | <bezel element="text_c"> |
| 206 | <bounds x="105" y="20" width="10" height="4" /> |
| 207 | </bezel> |
| 208 | |
| 209 | <bezel name="counter4" element="counter"> |
| 210 | <bounds x="112" y="5" width="20" height="4" /> |
| 211 | </bezel> |
| 212 | <bezel name="counter5" element="counter"> |
| 213 | <bounds x="112" y="10" width="20" height="4" /> |
| 214 | </bezel> |
| 215 | <bezel name="counter6" element="counter"> |
| 216 | <bounds x="112" y="15" width="20" height="4" /> |
| 217 | </bezel> |
| 218 | <bezel name="counter7" element="counter"> |
| 219 | <bounds x="112" y="20" width="20" height="4" /> |
| 220 | </bezel> |
| 221 | |
| 222 | <bezel element="text_ufoblue"> |
| 223 | <bounds x="125" y="25" width="50" height="14" /> |
| 224 | </bezel> |
| 225 | |
| 226 | <bezel name="lamp21" element="lamp_red"> |
| 227 | <bounds x="131" y="44" width="3" height="3" /> |
| 228 | </bezel> |
| 229 | <bezel name="lamp22" element="lamp_red"> |
| 230 | <bounds x="138" y="44" width="3" height="3" /> |
| 231 | </bezel> |
| 232 | <bezel name="lamp23" element="lamp_red"> |
| 233 | <bounds x="145" y="44" width="3" height="3" /> |
| 234 | </bezel> |
| 235 | <bezel name="lamp24" element="lamp_red"> |
| 236 | <bounds x="152" y="44" width="3" height="3" /> |
| 237 | </bezel> |
| 238 | <bezel name="lamp25" element="lamp_red"> |
| 239 | <bounds x="159" y="44" width="3" height="3" /> |
| 240 | </bezel> |
| 241 | <bezel name="lamp26" element="lamp_red"> |
| 242 | <bounds x="166" y="44" width="3" height="3" /> |
| 243 | </bezel> |
| 244 | |
| 245 | |
| 246 | </view> |
| 247 | </mamelayout> |
trunk/src/mame/layout/ufomini.lay
r0 | r241602 | |
| 1 | <?xml version="1.0"?> |
| 2 | <mamelayout version="2"> |
| 3 | |
| 4 | |
| 5 | <!-- define elements --> |
| 6 | |
| 7 | <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> |
| 8 | <element name="static_grey"><rect><color red="0.6" green="0.6" blue="0.6" /></rect></element> |
| 9 | <element name="static_pink"><rect><color red="0.9" green="0.55" blue="0.75" /></rect></element> |
| 10 | |
| 11 | <element name="text_ufored"> |
| 12 | <text string="~UFO~"> |
| 13 | <color red="1.0" green="0.3" blue="0.2" /> |
| 14 | </text> |
| 15 | </element> |
| 16 | <element name="text_ufoblue"> |
| 17 | <text string="~UFO~"> |
| 18 | <color red="0.2" green="0.3" blue="1.0" /> |
| 19 | </text> |
| 20 | </element> |
| 21 | |
| 22 | <element name="text_x"> |
| 23 | <text string="X:" align="1"> |
| 24 | <color red="0.85" green="0.85" blue="0.85" /> |
| 25 | </text> |
| 26 | </element> |
| 27 | <element name="text_y"> |
| 28 | <text string="Y:" align="1"> |
| 29 | <color red="0.85" green="0.85" blue="0.85" /> |
| 30 | </text> |
| 31 | </element> |
| 32 | <element name="text_z"> |
| 33 | <text string="Z:" align="1"> |
| 34 | <color red="0.85" green="0.85" blue="0.85" /> |
| 35 | </text> |
| 36 | </element> |
| 37 | <element name="text_c"> |
| 38 | <text string="C:" align="1"> |
| 39 | <color red="0.85" green="0.85" blue="0.85" /> |
| 40 | </text> |
| 41 | </element> |
| 42 | |
| 43 | <element name="digit" defstate="0"> |
| 44 | <led7seg> |
| 45 | <color red="1.0" green="0.3" blue="0.2" /> |
| 46 | </led7seg> |
| 47 | </element> |
| 48 | |
| 49 | <element name="counter" defstate="0"> |
| 50 | <simplecounter maxstate="999" digits="3" align="1"> |
| 51 | <color red="0.95" green="0.95" blue="0.95" /> |
| 52 | </simplecounter> |
| 53 | </element> |
| 54 | |
| 55 | <element name="lamp_b1" defstate="0"> |
| 56 | <disk><color red="0.0" green="0.0" blue="0.0" /></disk> |
| 57 | <disk state="1"> |
| 58 | <color red="1.0" green="1.0" blue="1.0" /> |
| 59 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 60 | </disk> |
| 61 | <disk state="0"> |
| 62 | <color red="0.7" green="0.7" blue="0.7" /> |
| 63 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 64 | </disk> |
| 65 | <text string="1"> |
| 66 | <color red="0.0" green="0.0" blue="0.0" /> |
| 67 | <bounds x="0" y="0.2" width="1.0" height="0.6" /> |
| 68 | </text> |
| 69 | </element> |
| 70 | <element name="lamp_b2" defstate="0"> |
| 71 | <disk><color red="0.0" green="0.0" blue="0.0" /></disk> |
| 72 | <disk state="1"> |
| 73 | <color red="1.0" green="1.0" blue="1.0" /> |
| 74 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 75 | </disk> |
| 76 | <disk state="0"> |
| 77 | <color red="0.7" green="0.7" blue="0.7" /> |
| 78 | <bounds x="0.05" y="0.05" width="0.9" height="0.9" /> |
| 79 | </disk> |
| 80 | <text string="2"> |
| 81 | <color red="0.0" green="0.0" blue="0.0" /> |
| 82 | <bounds x="0" y="0.2" width="1.0" height="0.6" /> |
| 83 | </text> |
| 84 | </element> |
| 85 | |
| 86 | <element name="lamp_rg0" defstate="0"> |
| 87 | <disk state="0"> |
| 88 | <color red="0.2" green="0.05" blue="0.0" /> |
| 89 | </disk> |
| 90 | <disk state="1"> |
| 91 | <color red="0.4" green="1.0" blue="0.3" /> |
| 92 | </disk> |
| 93 | <disk state="2"> |
| 94 | <color red="1.0" green="0.4" blue="0.3" /> |
| 95 | </disk> |
| 96 | <disk state="3"> |
| 97 | <color red="1.0" green="0.4" blue="0.3" /> |
| 98 | </disk> |
| 99 | </element> |
| 100 | <element name="lamp_rg1" defstate="0"> |
| 101 | <disk state="0"> |
| 102 | <color red="0.2" green="0.05" blue="0.0" /> |
| 103 | </disk> |
| 104 | <disk state="1"> |
| 105 | <color red="1.0" green="0.4" blue="0.3" /> |
| 106 | </disk> |
| 107 | <disk state="2"> |
| 108 | <color red="0.4" green="1.0" blue="0.3" /> |
| 109 | </disk> |
| 110 | <disk state="3"> |
| 111 | <color red="1.0" green="0.4" blue="0.3" /> |
| 112 | </disk> |
| 113 | </element> |
| 114 | |
| 115 | |
| 116 | <!-- build screen --> |
| 117 | |
| 118 | <view name="Internal Layout"> |
| 119 | <bounds left="0" right="100" top="0" bottom="90" /> |
| 120 | <bezel element="static_black"> |
| 121 | <bounds left="0" right="100" top="0" bottom="90" /> |
| 122 | </bezel> |
| 123 | |
| 124 | <!-- control panel --> |
| 125 | |
| 126 | <bezel element="static_pink"> |
| 127 | <bounds x="0" y="60" width="100" height="30" /> |
| 128 | </bezel> |
| 129 | |
| 130 | <bezel name="lamp0" element="lamp_b1" inputtag="IN1" inputmask="0x20" > |
| 131 | <bounds x="30" y="70" width="10" height="10"/> |
| 132 | </bezel> |
| 133 | <bezel name="lamp1" element="lamp_b2" inputtag="IN1" inputmask="0x40" > |
| 134 | <bounds x="43" y="70" width="10" height="10"/> |
| 135 | </bezel> |
| 136 | |
| 137 | <bezel element="static_black"> |
| 138 | <bounds x="60" y="70" width="12" height="17" /> |
| 139 | </bezel> |
| 140 | <bezel name="digit0" element="digit"> |
| 141 | <bounds x="61" y="71" width="10" height="15" /> |
| 142 | </bezel> |
| 143 | |
| 144 | |
| 145 | <!-- left ufo info --> |
| 146 | |
| 147 | <bezel element="text_x"> |
| 148 | <bounds x="5" y="5" width="10" height="4" /> |
| 149 | </bezel> |
| 150 | <bezel element="text_y"> |
| 151 | <bounds x="5" y="10" width="10" height="4" /> |
| 152 | </bezel> |
| 153 | <bezel element="text_z"> |
| 154 | <bounds x="5" y="15" width="10" height="4" /> |
| 155 | </bezel> |
| 156 | <bezel element="text_c"> |
| 157 | <bounds x="5" y="20" width="10" height="4" /> |
| 158 | </bezel> |
| 159 | |
| 160 | <bezel name="counter0" element="counter"> |
| 161 | <bounds x="12" y="5" width="20" height="4" /> |
| 162 | </bezel> |
| 163 | <bezel name="counter1" element="counter"> |
| 164 | <bounds x="12" y="10" width="20" height="4" /> |
| 165 | </bezel> |
| 166 | <bezel name="counter2" element="counter"> |
| 167 | <bounds x="12" y="15" width="20" height="4" /> |
| 168 | </bezel> |
| 169 | <bezel name="counter3" element="counter"> |
| 170 | <bounds x="12" y="20" width="20" height="4" /> |
| 171 | </bezel> |
| 172 | |
| 173 | <bezel element="text_ufored"> |
| 174 | <bounds x="25" y="25" width="50" height="14" /> |
| 175 | </bezel> |
| 176 | |
| 177 | <bezel name="lamp10" element="lamp_rg0"> |
| 178 | <bounds x="31" y="44" width="3" height="3" /> |
| 179 | </bezel> |
| 180 | <bezel name="lamp10" element="lamp_rg1"> |
| 181 | <bounds x="38" y="44" width="3" height="3" /> |
| 182 | </bezel> |
| 183 | <bezel name="lamp10" element="lamp_rg0"> |
| 184 | <bounds x="45" y="44" width="3" height="3" /> |
| 185 | </bezel> |
| 186 | <bezel name="lamp10" element="lamp_rg1"> |
| 187 | <bounds x="52" y="44" width="3" height="3" /> |
| 188 | </bezel> |
| 189 | <bezel name="lamp10" element="lamp_rg0"> |
| 190 | <bounds x="59" y="44" width="3" height="3" /> |
| 191 | </bezel> |
| 192 | <bezel name="lamp10" element="lamp_rg1"> |
| 193 | <bounds x="66" y="44" width="3" height="3" /> |
| 194 | </bezel> |
| 195 | |
| 196 | |
| 197 | </view> |
| 198 | </mamelayout> |