Added layout for California Speed.

This commit is contained in:
Risugami 2016-08-31 14:26:17 -05:00
parent f5b4df5a7b
commit 4b22e9211f
2 changed files with 159 additions and 3 deletions

View File

@ -194,6 +194,7 @@
#include "machine/smc91c9x.h"
#include "video/voodoo.h"
#include "machine/nvram.h"
#include "calspeed.lh"
@ -368,6 +369,7 @@
/* Widget registers */
#define WREG_ETHER_ADDR (0x00/4)
#define WREG_INTERRUPT (0x04/4)
#define WREG_OUTPUT (0x0C/4)
#define WREG_ANALOG (0x10/4)
#define WREG_ETHER_DATA (0x14/4)
@ -469,6 +471,8 @@ public:
UINT8 m_pending_analog_read;
UINT8 m_status_leds;
UINT32 m_cmos_write_enabled;
UINT32 m_output;
UINT8 m_output_mode;
DECLARE_READ32_MEMBER(interrupt_state_r);
DECLARE_READ32_MEMBER(interrupt_state2_r);
DECLARE_WRITE32_MEMBER(interrupt_config_w);
@ -492,6 +496,8 @@ public:
DECLARE_WRITE32_MEMBER(status_leds_w);
DECLARE_READ32_MEMBER(ethernet_r);
DECLARE_WRITE32_MEMBER(ethernet_w);
DECLARE_READ32_MEMBER(output_r);
DECLARE_WRITE32_MEMBER(output_w);
DECLARE_READ32_MEMBER(widget_r);
DECLARE_WRITE32_MEMBER(widget_w);
DECLARE_READ32_MEMBER(seattle_ide_r);
@ -599,6 +605,8 @@ void seattle_state::machine_start()
save_item(NAME(m_pending_analog_read));
save_item(NAME(m_status_leds));
save_item(NAME(m_cmos_write_enabled));
save_item(NAME(m_output));
save_item(NAME(m_output_mode));
}
@ -1563,6 +1571,29 @@ void seattle_state::update_widget_irq()
}
READ32_MEMBER(seattle_state::output_r)
{
return m_output;
}
WRITE32_MEMBER(seattle_state::output_w)
{
UINT8 bit;
UINT8 op = (data >> 8) & 0xFF;
UINT8 arg = data & 0xFF;
switch (op) {
case 0xF7: m_output_mode = arg; break;
case 0xFB:
switch (m_output_mode) {
case 0x04: output().set_value("wheel", arg); break; //wheel motor delta. signed byte.
case 0x05: for (bit = 0; bit < 8; bit++) output().set_lamp_value(bit, (arg >> bit) & 0x1); break;
}
break;
}
}
READ32_MEMBER(seattle_state::widget_r)
{
UINT32 result = ~0;
@ -1577,6 +1608,10 @@ READ32_MEMBER(seattle_state::widget_r)
result = m_ethernet_irq_state << WINT_ETHERNET_SHIFT;
result = ~result;
break;
case WREG_OUTPUT:
result = output_r(m_maincpu->space(AS_PROGRAM), 0, mem_mask);
break;
case WREG_ANALOG:
result = analog_port_r(m_maincpu->space(AS_PROGRAM), 0, mem_mask);
@ -1608,6 +1643,10 @@ WRITE32_MEMBER(seattle_state::widget_w)
m_widget.irq_mask = data;
update_widget_irq();
break;
case WREG_OUTPUT:
output_w(m_maincpu->space(AS_PROGRAM), 0, data, mem_mask);
break;
case WREG_ANALOG:
analog_port_w(m_maincpu->space(AS_PROGRAM), 0, data, mem_mask);
@ -3231,9 +3270,9 @@ GAME( 1996, mace, 0, mace, mace, seattle_state, mace
GAME( 1997, macea, mace, mace, mace, seattle_state, mace, ROT0, "Atari Games", "Mace: The Dark Age (HDD 1.0a)", MACHINE_SUPPORTS_SAVE )
GAME( 1996, sfrush, 0, sfrush, sfrush, seattle_state, sfrush, ROT0, "Atari Games", "San Francisco Rush", MACHINE_SUPPORTS_SAVE )
GAME( 1996, sfrushrk, 0, sfrushrk, sfrushrk, seattle_state, sfrushrk, ROT0, "Atari Games", "San Francisco Rush: The Rock", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
GAME( 1998, calspeed, 0, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 2.1a Apr 17 1998, GUTS 1.25 Apr 17 1998 / MAIN Apr 17 1998)", MACHINE_SUPPORTS_SAVE )
GAME( 1998, calspeeda,calspeed, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 1.0r8 Mar 10 1998, GUTS Mar 10 1998 / MAIN Mar 10 1998)", MACHINE_SUPPORTS_SAVE )
GAME( 1998, calspeedb,calspeed, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 1.0r7a Mar 4 1998, GUTS Mar 3 1998 / MAIN Jan 19 1998)", MACHINE_SUPPORTS_SAVE )
GAMEL( 1998, calspeed, 0, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 2.1a Apr 17 1998, GUTS 1.25 Apr 17 1998 / MAIN Apr 17 1998)", MACHINE_SUPPORTS_SAVE, layout_calspeed )
GAMEL( 1998, calspeeda,calspeed, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 1.0r8 Mar 10 1998, GUTS Mar 10 1998 / MAIN Mar 10 1998)", MACHINE_SUPPORTS_SAVE, layout_calspeed )
GAMEL( 1998, calspeedb,calspeed, calspeed, calspeed, seattle_state, calspeed, ROT0, "Atari Games", "California Speed (Version 1.0r7a Mar 4 1998, GUTS Mar 3 1998 / MAIN Jan 19 1998)", MACHINE_SUPPORTS_SAVE, layout_calspeed )

View File

@ -0,0 +1,117 @@
<?xml version="1.0"?>
<mamelayout version="2">
<element name="lamp" defstate="0">
<rect state="0">
<color red="0.1" green="0.1" blue="0.0" />
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
</rect>
<rect state="1">
<color red="1.0" green="1.0" blue="0.0" />
<bounds x="0.0" y="0.0" width="1.0" height="1.0" />
</rect>
</element>
<element name="start" defstate="0">
<disk state="0">
<bounds x="0" y="0" width="2.0" height="2.0" />
<color red="0.0" green="0.1" blue="0.061" />
</disk>
<disk state="1">
<bounds x="0" y="0" width="2.0" height="2.0" />
<color red="0.0" green="1.0" blue="0.61" />
</disk>
<text string="START">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="0.25" y="0.5" width="1.5" height="1.0" />
</text>
</element>
<element name="view1" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="170.0" height="90.0" />
<color red="0.1" green="0.01137" blue="0.02314" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="170.0" height="90.0" />
<color red="1.0" green="0.1137" blue="0.2314" />
</disk>
<text string="ROAD CAM">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="10.0" y="10.0" width="150.0" height="70.0" />
</text>
</element>
<element name="view2" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="170.0" height="90.0" />
<color red="0.1" green="0.09294" blue="0.00078" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="170.0" height="90.0" />
<color red="1.0" green="0.9294" blue="0.0078" />
</disk>
<text string="TAILGATE CAM">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="10.0" y="10.0" width="150.0" height="70.0" />
</text>
</element>
<element name="view3" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="170.0" height="90.0" />
<color red="0.0" green="0.1" blue="0.03686" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="170.0" height="90.0" />
<color red="0.0" green="1.0" blue="0.3686" />
</disk>
<text string="SKY CAM">
<color red="0.0" green="0.0" blue="0.0" />
<bounds x="10.0" y="10.0" width="150.0" height="70.0" />
</text>
</element>
<element name="counter" defstate="0">
<simplecounter digits="3">
<color red="1.0" green="1.0" blue="1.0" />
</simplecounter>
</element>
<view name="Simple LEDs">
<bounds left="0" top="0" right="4" bottom="3.472" />
<screen index="0">
<bounds left="0" top="0" right="4" bottom="3" />
</screen>
<bezel name="lamp0" element="start">
<bounds x="3.60" y="3.1" width="0.3" height="0.3" />
</bezel>
<bezel name="lamp1" element="view1">
<bounds x="0.025" y="3.025" width="0.472" height="0.125" />
</bezel>
<bezel name="lamp2" element="view2">
<bounds x="0.025" y="3.175" width="0.472" height="0.125" />
</bezel>
<bezel name="lamp3" element="view3">
<bounds x="0.025" y="3.325" width="0.472" height="0.125" />
</bezel>
<bezel name="lamp4" element="lamp">
<bounds x="1.785" y="3.2" width="0.1" height="0.1" />
</bezel>
<bezel name="lamp5" element="lamp">
<bounds x="1.895" y="3.2" width="0.1" height="0.1" />
</bezel>
<bezel name="lamp6" element="lamp">
<bounds x="2.005" y="3.2" width="0.1" height="0.1" />
</bezel>
<bezel name="lamp7" element="lamp">
<bounds x="2.115" y="3.2" width="0.1" height="0.1" />
</bezel>
<bezel name="wheel" element="counter">
<bounds x="1.9" y="3.0" width="0.2" height="0.1" />
</bezel>
</view>
</mamelayout>