Merge pull request #2509 from Risugami/master

Improved wheel board on flagstaff and vegas
This commit is contained in:
R. Belmont 2017-07-22 19:34:33 -04:00 committed by GitHub
commit 260c25c409
5 changed files with 196 additions and 53 deletions

View File

@ -332,6 +332,7 @@ public:
DECLARE_WRITE32_MEMBER(output_w);
DECLARE_READ32_MEMBER(widget_r);
DECLARE_WRITE32_MEMBER(widget_w);
DECLARE_WRITE32_MEMBER(wheel_board_w);
DECLARE_WRITE_LINE_MEMBER(ide_interrupt);
@ -451,6 +452,35 @@ WRITE_LINE_MEMBER(seattle_state::ioasic_irq)
m_maincpu->set_input_line(IOASIC_IRQ_NUM, state);
}
WRITE32_MEMBER(seattle_state::wheel_board_w)
{
//logerror("wheel_board_w: data = %08x\n", data);
/* two writes in pairs. flag off first, on second. arg remains the same. */
bool flag = (data & (1 << 11));
uint8_t op = (data >> 8) & 0x7;
uint8_t arg = data & 0xff;
if (flag)
{
switch (op)
{
case 0x0:
machine().output().set_value("wheel", arg); // target wheel angle. signed byte.
break;
case 0x4:
for (uint8_t bit = 0; bit < 8; bit++)
machine().output().set_lamp_value(bit, (arg >> bit) & 0x1);
break;
case 0x5:
for (uint8_t bit = 0; bit < 8; bit++)
machine().output().set_lamp_value(8 + bit, (arg >> bit) & 0x1);
break;
}
}
}
/*************************************
*
* Configurable interrupts
@ -1870,6 +1900,7 @@ static MACHINE_CONFIG_DERIVED( sfrush, flagstaff )
MCFG_MIDWAY_IOASIC_UPPER(315/* no alternates */)
MCFG_MIDWAY_IOASIC_YEAR_OFFS(100)
MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(seattle_state, ioasic_irq))
MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(seattle_state, wheel_board_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sfrushrk, flagstaff )
@ -1882,6 +1913,7 @@ static MACHINE_CONFIG_DERIVED( sfrushrk, flagstaff )
MCFG_MIDWAY_IOASIC_UPPER(331/* unknown */)
MCFG_MIDWAY_IOASIC_YEAR_OFFS(100)
MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(seattle_state, ioasic_irq))
MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(seattle_state, wheel_board_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sfrushrkw, sfrushrk )

View File

@ -290,6 +290,7 @@
#include "video/voodoo_pci.h"
#include "screen.h"
#include "sf2049.lh"
/*************************************
*
@ -974,8 +975,27 @@ WRITE32_MEMBER(vegas_state::wheel_board_w)
uint8_t op = (data >> 8) & 0x3;
uint8_t arg = data & 0xff;
if (valid && flag && op == 2)
m_keypad_select = arg;
if (valid && flag)
{
switch (op)
{
case 0x0:
machine().output().set_value("wheel", arg); // target wheel angle. signed byte.
break;
case 0x1:
for (uint8_t bit = 0; bit < 8; bit++)
machine().output().set_lamp_value(bit, (arg >> bit) & 0x1);
/* leader lamp bit is included in every write, for some reason. */
machine().output().set_lamp_value(8, (data >> 12) & 0x1);
break;
case 0x2:
m_keypad_select = arg;
break;
}
}
}
CUSTOM_INPUT_MEMBER(vegas_state::keypad_r)
@ -2186,9 +2206,9 @@ GAME( 2000, nbagold , 0, nbagold, nbashowt, vegas_state, nbanfl, ROT
/* Durango + Denver SIO + Voodoo 3 */
GAME( 1998, sf2049, 0, sf2049, sf2049, vegas_state, sf2049, ROT0, "Atari Games", "San Francisco Rush 2049", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
GAME( 1998, sf2049se, sf2049, sf2049se, sf2049se, vegas_state, sf2049se, ROT0, "Atari Games", "San Francisco Rush 2049: Special Edition", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
GAME( 1998, sf2049te, sf2049, sf2049te, sf2049, vegas_state, sf2049te, ROT0, "Atari Games", "San Francisco Rush 2049: Tournament Edition", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE)
GAMEL( 1998, sf2049, 0, sf2049, sf2049, vegas_state, sf2049, ROT0, "Atari Games", "San Francisco Rush 2049", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_sf2049 )
GAMEL( 1998, sf2049se, sf2049, sf2049se, sf2049se, vegas_state, sf2049se, ROT0, "Atari Games", "San Francisco Rush 2049: Special Edition", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_sf2049 )
GAMEL( 1998, sf2049te, sf2049, sf2049te, sf2049, vegas_state, sf2049te, ROT0, "Atari Games", "San Francisco Rush 2049: Tournament Edition", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_sf2049 )
/* Durango + Vegas SIO + Voodoo 3 */
GAME( 2000, cartfury, 0, cartfury, cartfury, vegas_state, cartfury, ROT0, "Midway Games", "Cart Fury", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )

136
src/mame/layout/sf2049.lay Normal file
View File

@ -0,0 +1,136 @@
<?xml version="1.0"?>
<mamelayout version="2">
<element name="abort" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.443" green="0.086" blue="0.008" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.882" green="0.208" blue="0.024" />
</disk>
<text string="ABORT" state="0">
<color red="0.388" green="0.353" blue="0.357" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
<text string="ABORT" state="1">
<color red="1.000" green="0.843" blue="0.824" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
</element>
<element name="music" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.408" green="0.306" blue="0.000" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.855" green="0.643" blue="0.000" />
</disk>
<text string="MUSIC">
<color red="0.000" green="0.000" blue="0.000" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
</element>
<element name="view1" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.004" green="0.161" blue="0.447" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.027" green="0.278" blue="0.886" />
</disk>
<text string="VIEW 1" state="0">
<color red="0.294" green="0.353" blue="0.388" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
<text string="VIEW 1" state="1">
<color red="0.824" green="0.886" blue="1.000" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
</element>
<element name="view2" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.004" green="0.161" blue="0.447" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.027" green="0.278" blue="0.886" />
</disk>
<text string="VIEW 2" state="0">
<color red="0.294" green="0.353" blue="0.388" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
<text string="VIEW 2" state="1">
<color red="0.824" green="0.886" blue="1.000" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
</element>
<element name="view3" defstate="0">
<disk state="0">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.004" green="0.161" blue="0.447" />
</disk>
<disk state="1">
<bounds x="0.0" y="0.0" width="2.444444444" height="1.0" />
<color red="0.027" green="0.278" blue="0.886" />
</disk>
<text string="VIEW 3" state="0">
<color red="0.294" green="0.353" blue="0.388" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
<text string="VIEW 3" state="1">
<color red="0.824" green="0.886" blue="1.000" />
<bounds x="0.222222222" y="0.222222222" width="2" height="0.555555556" />
</text>
</element>
<element name="leader" defstate="0">
<rect>
<bounds x="0" y="0" width="3.0" height="1.75" />
<color red="0.05" green="0.05" blue="0.05" />
</rect>
<text string="LEADER" state="0">
<color red="0.1" green="0.1" blue="0.0" />
<bounds x="0.5" y="0.3" width="2.0" height="1.15" />
</text>
<text string="LEADER" state="1">
<color red="1.0" green="1.0" blue="0.0" />
<bounds x="0.5" y="0.3" width="2.0" height="1.15" />
</text>
</element>
<view name="Dashboard">
<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="abort" inputtag="SYSTEM" inputmask="0x04">
<bounds x="3.696222222" y="3.323888889" width="0.268666667" height="0.134333333" />
</bezel>
<bezel name="lamp5" element="music" inputtag="IN1" inputmask="0x08">
<bounds x="0.512222222" y="3.323888889" width="0.268666667" height="0.134333333" />
</bezel>
<bezel name="lamp3" element="view3" inputtag="IN1" inputmask="0x04">
<bounds x="0.386666667" y="3.041388889" width="0.268666667" height="0.134333333" />
</bezel>
<bezel name="lamp2" element="view2" inputtag="IN1" inputmask="0x02">
<bounds x="0.160666667" y="3.160666667" width="0.268666667" height="0.134333333" />
</bezel>
<bezel name="lamp1" element="view1" inputtag="IN1" inputmask="0x01">
<bounds x="0.035111111" y="3.323888889" width="0.268666667" height="0.134333333" />
</bezel>
<bezel name="lamp8" element="leader">
<bounds x="1.75" y="3.1" width="0.5" height="0.23" />
</bezel>
</view>
</mamelayout>

View File

@ -932,52 +932,6 @@ void midway_ioasic_device::fifo_full_w(uint16_t data)
}
/* need to check if device callback is required instead of hardcode here */
void midway_ioasic_device::output_w(uint32_t data)
{
if (!m_aux_output_cb.isnull()) {
// This is P15 on vegas boards
m_aux_output_cb(data);
}
else {
/* two writes in pairs. flag off first, on second. arg remains the same. */
uint8_t flag = (data >> 8) & 0x8;
uint8_t op = (data >> 8) & 0x7;
uint8_t arg = data & 0xFF;
switch (op)
{
default:
logerror("Unknown output (%02X) = %02X\n", flag | op, arg);
break;
case 0x0:
if (flag)
{
machine().output().set_value("wheel", arg); // wheel motor delta. signed byte.
}
break;
case 0x4:
if (flag)
{
for (uint8_t bit = 0; bit < 8; bit++)
machine().output().set_lamp_value(bit, (arg >> bit) & 0x1);
}
break;
case 0x5:
if (flag)
{
for (uint8_t bit = 0; bit < 8; bit++)
machine().output().set_lamp_value(8 + bit, (arg >> bit) & 0x1);
}
break;
}
}
}
/*************************************
*
@ -1216,7 +1170,9 @@ WRITE32_MEMBER( midway_ioasic_device::write )
break;
case IOASIC_PICIN:
output_w(data);
/* This is P15 on vegas boards */
if (!m_aux_output_cb.isnull())
m_aux_output_cb(data);
break;
case IOASIC_INTCTL:

View File

@ -165,7 +165,6 @@ public:
void set_shuffle_state(int state);
void fifo_w(uint16_t data);
void fifo_full_w(uint16_t data);
void output_w(uint32_t data);
DECLARE_WRITE_LINE_MEMBER(fifo_reset_w);
DECLARE_READ16_MEMBER(fifo_r);