Previous 199869 Revisions Next

r33054 Wednesday 29th October, 2014 at 15:59:32 UTC by hap
segaufo layout file placeholder
[src/mame]mame.mak
[src/mame/drivers]segaufo.c
[src/mame/layout]segaufo.lay*
[src/mame/machine]315_5296.h

trunk/src/mame/drivers/segaufo.c
r241565r241566
4747#include "machine/pit8253.h"
4848#include "machine/315_5296.h"
4949#include "sound/2612intf.h"
50#include "sound/upd7759.h"
5051
52#include "segaufo.lh"
5153
54
5255/* simulation parameters */
5356// x/y/z cabinet dimensions per player (motor range)
5457#define CABINET_WIDTH   400
r241565r241566
6972public:
7073   ufo_state(const machine_config &mconfig, device_type type, const char *tag)
7174      : driver_device(mconfig, type, tag),
72      m_maincpu(*this, "maincpu")
75      m_maincpu(*this, "maincpu"),
76      m_upd(*this, "upd")
7377   { }
7478
7579   required_device<cpu_device> m_maincpu;
80   optional_device<upd7759_device> m_upd;
7681   
7782   struct Player
7883   {
r241565r241566
103108   virtual void machine_reset();
104109   virtual void machine_start();
105110   TIMER_DEVICE_CALLBACK_MEMBER(simulate_xyz);
111   TIMER_DEVICE_CALLBACK_MEMBER(update_info);
106112};
107113
108114
r241565r241566
123129      m_player[p].motor[m].position = 1;
124130}
125131
126
127132TIMER_DEVICE_CALLBACK_MEMBER(ufo_state::simulate_xyz)
128133{
129134   for (int p = 0; p < 2; p++)
r241565r241566
131136         motor_tick(p, m);
132137}
133138
139
140TIMER_DEVICE_CALLBACK_MEMBER(ufo_state::update_info)
141{
142   ;
143}
144
145
134146/***************************************************************************
135147
136148  I/O
r241565r241566
144156
145157WRITE_LINE_MEMBER(ufo_state::pit_out1)
146158{
147   // ?
159   // NMI?
160   if (state)
161      m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
148162}
149163
150164WRITE_LINE_MEMBER(ufo_state::pit_out2)
151165{
152   // NMI?
153   if (state)
154      m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
166   // ?
155167}
156168
157169
r241565r241566
370382
371383void ufo_state::machine_start()
372384{
373   // init/zerofill
385   // init/zerofill/register for savestates
374386   static const float motor_speeds[4] =
375387      { 1.0f/CABINET_WIDTH, 1.0f/CABINET_DEPTH, 1.0f/CABINET_HEIGHT, 1.0f/CRANE_SIZE };
376388   
377   for (int p = 0; p < 2; p++)
389   for (int m = 0; m < 4; m++)
378390   {
379      for (int m = 0; m < 4; m++)
391      for (int p = 0; p < 2; p++)
380392      {
381393         m_player[p].motor[m].running = 0;
382394         m_player[p].motor[m].direction = 0;
383395         m_player[p].motor[m].position = 0.5;
384396         m_player[p].motor[m].speed = motor_speeds[m];
385397      }
398
399      save_item(NAME(m_player[0].motor[m].running), m);
400      save_item(NAME(m_player[0].motor[m].direction), m);
401      save_item(NAME(m_player[0].motor[m].position), m);
402
403      save_item(NAME(m_player[1].motor[m].running), m);
404      save_item(NAME(m_player[1].motor[m].direction), m);
405      save_item(NAME(m_player[1].motor[m].position), m);
386406   }
407   
408   m_stepper = 0;
409   save_item(NAME(m_stepper));
387410}
388411
389412WRITE_LINE_MEMBER(ufo_state::ym3438_irq)
r241565r241566
399422   MCFG_CPU_IO_MAP(ufo_portmap)
400423
401424   MCFG_TIMER_DRIVER_ADD_PERIODIC("motor_timer", ufo_state, simulate_xyz, attotime::from_hz(MOTOR_SPEED))
425   MCFG_TIMER_DRIVER_ADD_PERIODIC("update_timer", ufo_state, update_info, attotime::from_hz(60))
402426   
403427   MCFG_DEVICE_ADD("io1", SEGA_315_5296, 16000000)
404428   // all ports set to input
r241565r241566
490514ROM_END
491515
492516
493GAME (1991, newufo,       0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (standard)", GAME_MECHANICAL )
494GAME (1991, newufo_sonic, newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Sonic The Hedgehog)", GAME_MECHANICAL )
495GAME (1991, newufo_nfl,   newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Team NFL)", GAME_MECHANICAL )
496GAME (1991, newufo_xmas,  newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Christmas season ROM kit)", GAME_MECHANICAL )
497GAME (1991, ufomini,      0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher Mini", GAME_NOT_WORKING | GAME_MECHANICAL )
498GAME (1996, ufo21,        0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 21", GAME_NOT_WORKING | GAME_MECHANICAL )
499GAME (1998, ufo800,       0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 800", GAME_NOT_WORKING | GAME_MECHANICAL )
517GAMEL( 1991, newufo,       0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (standard)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
518GAMEL( 1991, newufo_sonic, newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Sonic The Hedgehog)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
519GAMEL( 1991, newufo_nfl,   newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Team NFL)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
520GAMEL( 1991, newufo_xmas,  newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Christmas season ROM kit)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
521GAMEL( 1991, ufomini,      0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher Mini", GAME_NOT_WORKING | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
522GAMEL( 1996, ufo21,        0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 21", GAME_NOT_WORKING | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
523GAMEL( 1998, ufo800,       0,      ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 800", GAME_NOT_WORKING | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
trunk/src/mame/layout/segaufo.lay
r0r241566
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
9   <element name="digit" defstate="0">
10      <led7seg>
11         <color red="1.0" green="0.3" blue="0.2" />
12      </led7seg>
13   </element>
14
15
16   <view name="Internal Layout">
17      <bounds left="0" right="100" top="0" bottom="50" />
18      <bezel element="static_black">
19         <bounds left="0" right="100" top="0" bottom="50" />
20      </bezel>
21
22      <bezel name="digit0" element="digit">
23         <bounds x="10" y="10" width="10" height="15" />
24      </bezel>
25      <bezel name="digit1" element="digit">
26         <bounds x="20" y="10" width="10" height="15" />
27      </bezel>
28
29   </view>
30</mamelayout>
trunk/src/mame/machine/315_5296.h
r241565r241566
100100
101101   DECLARE_READ8_MEMBER( read );
102102   DECLARE_WRITE8_MEMBER( write );
103   
104   UINT8 debug_peek_output(offs_t offset) { return m_output_latch[offset & 7]; }
103105
104106protected:
105107   // device-level overrides
trunk/src/mame/mame.mak
r241565r241566
28332833
28342834$(DRIVERS)/segas32.o:   $(LAYOUT)/radr.lh
28352835
2836$(DRIVERS)/segaufo.o:   $(LAYOUT)/segaufo.lh
2837
28362838$(DRIVERS)/segaybd.o:   $(LAYOUT)/pdrift.lh
28372839
28382840$(DRIVERS)/sigmab52.o:  $(LAYOUT)/sigmab52.lh


Previous 199869 Revisions Next


© 1997-2024 The MAME Team