summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ariane Fugmann <sailorsat@t-online.de>2017-01-02 01:34:01 +0100
committer Ariane Fugmann <sailorsat@t-online.de>2017-01-02 01:34:01 +0100
commit7c9934c5c83f23c3695e561c3cf9f8b1761afd4b (patch)
tree69d835af5a819fd90ea86a4423254db7f7752dcc
parent9ee3c958d524a93da27e6ac270d321427188949a (diff)
harddriv: hook up outputs and add "single screen"-layouts for race drivin' panorama (nw)
-rw-r--r--src/mame/includes/harddriv.h6
-rw-r--r--src/mame/layout/racedrivpan.lay18
-rw-r--r--src/mame/machine/harddriv.cpp51
3 files changed, 68 insertions, 7 deletions
diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h
index 24797461b21..24cee21b4b1 100644
--- a/src/mame/includes/harddriv.h
+++ b/src/mame/includes/harddriv.h
@@ -393,6 +393,12 @@ protected:
uint8_t m_st68k_sloop_bank;
offs_t m_st68k_last_alt_sloop_offset;
+ uint8_t m_sel_select;
+ uint8_t m_sel1_data;
+ uint8_t m_sel2_data;
+ uint8_t m_sel3_data;
+ uint8_t m_sel4_data;
+
#define MAX_MSP_SYNC 16
uint32_t * m_dataptr[MAX_MSP_SYNC];
uint32_t m_dataval[MAX_MSP_SYNC];
diff --git a/src/mame/layout/racedrivpan.lay b/src/mame/layout/racedrivpan.lay
index 3ca77bae895..a3fe28eb987 100644
--- a/src/mame/layout/racedrivpan.lay
+++ b/src/mame/layout/racedrivpan.lay
@@ -13,4 +13,22 @@
</screen>
</view>
+ <view name="Left Screen">
+ <screen index="1">
+ <bounds x="0" y="0" width="4" height="3" />
+ </screen>
+ </view>
+
+ <view name="Center Screen">
+ <screen index="0">
+ <bounds x="0" y="0" width="4" height="3" />
+ </screen>
+ </view>
+
+ <view name="Right Screen">
+ <screen index="2">
+ <bounds x="0" y="0" width="4" height="3" />
+ </screen>
+ </view>
+
</mamelayout>
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index 22a50214cf7..9d41af07fe8 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -342,36 +342,70 @@ WRITE16_MEMBER( harddriv_state::hd68k_wr0_write )
/* low 3 bits select the function */
offset &= 7;
+
+ m_sel_select = 0;
+
switch (offset)
{
case 1: /* SEL1 */
case 2: /* SEL2 */
case 3: /* SEL3 */
case 4: /* SEL4 */
- default:
- /* just ignore */
+ m_sel_select = offset;
break;
case 6: /* CC1 */
case 7: /* CC2 */
space.machine().bookkeeping().coin_counter_w(offset - 6, data);
break;
+
+ default:
+ /* just ignore */
+ break;
}
}
WRITE16_MEMBER( harddriv_state::hd68k_wr1_write )
{
- if (offset == 0) { // logerror("Shifter Interface Latch = %02X\n", data);
- } else { logerror("/WR1(%04X)=%02X\n", offset, data);
+ if (offset == 0) {
+ // logerror("Shifter Interface Latch = %02X\n", data);
+ data = data >> 8;
+ switch (m_sel_select)
+ {
+ case 1: /* SEL1 */
+ m_sel1_data = data;
+ machine().output().set_value("SEL1", m_sel1_data);
+ break;
+
+ case 2: /* SEL2 */
+ m_sel2_data = data;
+ machine().output().set_value("SEL2", m_sel2_data);
+ break;
+
+ case 3: /* SEL3 */
+ m_sel3_data = data;
+ machine().output().set_value("SEL3", m_sel3_data);
+ break;
+
+ case 4: /* SEL4 */
+ m_sel4_data = data;
+ machine().output().set_value("SEL4", m_sel4_data);
+ break;
+ }
+ } else {
+ logerror("/WR1(%04X)=%02X\n", offset, data);
}
}
WRITE16_MEMBER( harddriv_state::hd68k_wr2_write )
{
- if (offset == 0) { // logerror("Steering Wheel Latch = %02X\n", data);
- } else { logerror("/WR2(%04X)=%02X\n", offset, data);
+ if (offset == 0) {
+ // logerror("Steering Wheel Latch = %02X\n", data);
+ machine().output().set_value("wheel", data >> 8);
+ } else {
+ logerror("/WR2(%04X)=%02X\n", offset, data);
}
}
@@ -387,11 +421,14 @@ WRITE16_MEMBER( harddriv_state::hd68k_nwr_w )
{
case 0: /* CR2 */
case 1: /* CR1 */
- machine().output().set_led_value(offset, data);
break;
case 2: /* LC1 */
+ // used for seat locking on harddriv
+ machine().output().set_led_value(1, data);
break;
case 3: /* LC2 */
+ // used for "abort" button lamp
+ machine().output().set_led_value(2, data);
break;
case 4: /* ZP1 */
m_m68k_zp1 = data;