segaufo layout file placeholder

This commit is contained in:
happppp 2014-10-29 16:59:32 +01:00
parent 084b66dfd8
commit 092528e18a
4 changed files with 74 additions and 16 deletions

View File

@ -47,6 +47,9 @@
#include "machine/pit8253.h"
#include "machine/315_5296.h"
#include "sound/2612intf.h"
#include "sound/upd7759.h"
#include "segaufo.lh"
/* simulation parameters */
@ -69,10 +72,12 @@ class ufo_state : public driver_device
public:
ufo_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu")
m_maincpu(*this, "maincpu"),
m_upd(*this, "upd")
{ }
required_device<cpu_device> m_maincpu;
optional_device<upd7759_device> m_upd;
struct Player
{
@ -103,6 +108,7 @@ public:
virtual void machine_reset();
virtual void machine_start();
TIMER_DEVICE_CALLBACK_MEMBER(simulate_xyz);
TIMER_DEVICE_CALLBACK_MEMBER(update_info);
};
@ -123,7 +129,6 @@ void ufo_state::motor_tick(int p, int m)
m_player[p].motor[m].position = 1;
}
TIMER_DEVICE_CALLBACK_MEMBER(ufo_state::simulate_xyz)
{
for (int p = 0; p < 2; p++)
@ -131,6 +136,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(ufo_state::simulate_xyz)
motor_tick(p, m);
}
TIMER_DEVICE_CALLBACK_MEMBER(ufo_state::update_info)
{
;
}
/***************************************************************************
I/O
@ -144,14 +156,14 @@ WRITE_LINE_MEMBER(ufo_state::pit_out0)
WRITE_LINE_MEMBER(ufo_state::pit_out1)
{
// ?
// NMI?
if (state)
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
WRITE_LINE_MEMBER(ufo_state::pit_out2)
{
// NMI?
if (state)
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
// ?
}
@ -370,20 +382,31 @@ void ufo_state::machine_reset()
void ufo_state::machine_start()
{
// init/zerofill
// init/zerofill/register for savestates
static const float motor_speeds[4] =
{ 1.0f/CABINET_WIDTH, 1.0f/CABINET_DEPTH, 1.0f/CABINET_HEIGHT, 1.0f/CRANE_SIZE };
for (int p = 0; p < 2; p++)
for (int m = 0; m < 4; m++)
{
for (int m = 0; m < 4; m++)
for (int p = 0; p < 2; p++)
{
m_player[p].motor[m].running = 0;
m_player[p].motor[m].direction = 0;
m_player[p].motor[m].position = 0.5;
m_player[p].motor[m].speed = motor_speeds[m];
}
save_item(NAME(m_player[0].motor[m].running), m);
save_item(NAME(m_player[0].motor[m].direction), m);
save_item(NAME(m_player[0].motor[m].position), m);
save_item(NAME(m_player[1].motor[m].running), m);
save_item(NAME(m_player[1].motor[m].direction), m);
save_item(NAME(m_player[1].motor[m].position), m);
}
m_stepper = 0;
save_item(NAME(m_stepper));
}
WRITE_LINE_MEMBER(ufo_state::ym3438_irq)
@ -399,6 +422,7 @@ static MACHINE_CONFIG_START( ufo, ufo_state )
MCFG_CPU_IO_MAP(ufo_portmap)
MCFG_TIMER_DRIVER_ADD_PERIODIC("motor_timer", ufo_state, simulate_xyz, attotime::from_hz(MOTOR_SPEED))
MCFG_TIMER_DRIVER_ADD_PERIODIC("update_timer", ufo_state, update_info, attotime::from_hz(60))
MCFG_DEVICE_ADD("io1", SEGA_315_5296, 16000000)
// all ports set to input
@ -490,10 +514,10 @@ ROM_START( ufo800 )
ROM_END
GAME (1991, newufo, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (standard)", GAME_MECHANICAL )
GAME (1991, newufo_sonic, newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Sonic The Hedgehog)", GAME_MECHANICAL )
GAME (1991, newufo_nfl, newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Team NFL)", GAME_MECHANICAL )
GAME (1991, newufo_xmas, newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Christmas season ROM kit)", GAME_MECHANICAL )
GAME (1991, ufomini, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher Mini", GAME_NOT_WORKING | GAME_MECHANICAL )
GAME (1996, ufo21, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 21", GAME_NOT_WORKING | GAME_MECHANICAL )
GAME (1998, ufo800, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 800", GAME_NOT_WORKING | GAME_MECHANICAL )
GAMEL( 1991, newufo, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (standard)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
GAMEL( 1991, newufo_sonic, newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Sonic The Hedgehog)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
GAMEL( 1991, newufo_nfl, newufo, ufo, ufo, driver_device, 0, ROT0, "Sega", "New UFO Catcher (Team NFL)", GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
GAMEL( 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 )
GAMEL( 1991, ufomini, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher Mini", GAME_NOT_WORKING | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
GAMEL( 1996, ufo21, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 21", GAME_NOT_WORKING | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )
GAMEL( 1998, ufo800, 0, ufo, ufo, driver_device, 0, ROT0, "Sega", "UFO Catcher 800", GAME_NOT_WORKING | GAME_MECHANICAL | GAME_SUPPORTS_SAVE, layout_segaufo )

View File

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<mamelayout version="2">
<!-- define elements -->
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
<element name="digit" defstate="0">
<led7seg>
<color red="1.0" green="0.3" blue="0.2" />
</led7seg>
</element>
<view name="Internal Layout">
<bounds left="0" right="100" top="0" bottom="50" />
<bezel element="static_black">
<bounds left="0" right="100" top="0" bottom="50" />
</bezel>
<bezel name="digit0" element="digit">
<bounds x="10" y="10" width="10" height="15" />
</bezel>
<bezel name="digit1" element="digit">
<bounds x="20" y="10" width="10" height="15" />
</bezel>
</view>
</mamelayout>

View File

@ -100,6 +100,8 @@ public:
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
UINT8 debug_peek_output(offs_t offset) { return m_output_latch[offset & 7]; }
protected:
// device-level overrides

View File

@ -2833,6 +2833,8 @@ $(DRIVERS)/segaorun.o: $(LAYOUT)/outrun.lh
$(DRIVERS)/segas32.o: $(LAYOUT)/radr.lh
$(DRIVERS)/segaufo.o: $(LAYOUT)/segaufo.lh
$(DRIVERS)/segaybd.o: $(LAYOUT)/pdrift.lh
$(DRIVERS)/sigmab52.o: $(LAYOUT)/sigmab52.lh