summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/jpmimpct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/jpmimpct.cpp')
-rw-r--r--src/mame/drivers/jpmimpct.cpp220
1 files changed, 139 insertions, 81 deletions
diff --git a/src/mame/drivers/jpmimpct.cpp b/src/mame/drivers/jpmimpct.cpp
index 29ffb2f52af..574fe28152f 100644
--- a/src/mame/drivers/jpmimpct.cpp
+++ b/src/mame/drivers/jpmimpct.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Philip Bennett
+// copyright-holders:Philip Bennett, David Haywood
// thanks-to:Tony Friery
/***************************************************************************
@@ -20,8 +20,6 @@
* Snakes and Ladders
Known issues:
- * I/O documentation for lamps, reels, meters etc is possibly incorrect.
- * DUART emulation is very simplistic, in progress.
* Digital volume control is not emulated.
Mechanical games note:
@@ -258,13 +256,10 @@ void jpmimpct_state::machine_reset()
/* Reset states */
if (m_vfd)
m_vfd->reset();
+
+ m_coinstate = 0xffff;
}
-/*************************************
- *
- * MC68681 DUART 1 simulation hack
- *
- *************************************/
/*
* IP0: MC1489P U7 pin 8
@@ -288,14 +283,7 @@ void jpmimpct_state::machine_reset()
* TxDB/TxDB: Data retrieval unit
*/
-void jpmimpct_state::set_duart_1_hack_ip(bool state)
-{
-// TODO restore this with real duart
-// if (state)
-// m_duart_1.IP |= 0x10;
-// else
-// m_duart_1.IP &= ~0x10;
-}
+
/*************************************
*
@@ -468,11 +456,11 @@ void jpmimpct_state::slides_non_video_w(offs_t offset, uint16_t data, uint16_t m
if (combined_meter)
{
- set_duart_1_hack_ip(false);
+ m_duart->ip4_w(1);
}
else
{
- set_duart_1_hack_ip(true);
+ m_duart->ip4_w(0);
}
}
@@ -495,7 +483,7 @@ void jpmimpct_video_state::slides_video_w(offs_t offset, uint16_t data, uint16_t
}
m_meters->update(0, data >> 10);
- set_duart_1_hack_ip(false);
+ //set_duart_1_hack_ip(false);
}
@@ -536,7 +524,8 @@ void jpmimpct_state::common_map(address_map& map)
map(0x0048002a, 0x0048002b).portr("J9_0");
map(0x0048002c, 0x0048002d).portr("J9_1");
map(0x0048002e, 0x0048002f).portr("J9_2");
- map(0x00480032, 0x00480033).portr("COINS");
+ map(0x00480030, 0x00480031).portr("unk30");
+ map(0x00480032, 0x00480033).portr("COIN_SENSE");
map(0x00480034, 0x00480035).r(FUNC(jpmimpct_state::ump_r));
map(0x00480060, 0x00480067).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0x00ff);
@@ -555,6 +544,11 @@ void jpmimpct_state::common_map(address_map& map)
map(0x004800a8, 0x004800a9).w(FUNC(jpmimpct_state::lamps_w));
map(0x004800aa, 0x004800ab).w(FUNC(jpmimpct_state::digits_w));
map(0x004800ae, 0x004800af).w(FUNC(jpmimpct_state::lampstrobe_w));
+
+ // many later sets, eg. Roller Coaster Classic will no accept coins, and run too fast depending
+ // on what gets read here, what is it?
+ map(0x004801d8, 0x004801d9).r(FUNC(jpmimpct_video_state::unk_r));
+ map(0x004801da, 0x004801db).r(FUNC(jpmimpct_video_state::unk_r));
}
void jpmimpct_video_state::impact_video_map(address_map &map)
@@ -630,6 +624,37 @@ static INPUT_PORTS_START( touchscreen )
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15)
INPUT_PORTS_END
+INPUT_PORTS_START( jpmimpct_coins )
+
+ PORT_START("COIN_SENSE")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmimpct_state, coinsense_r<0>)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmimpct_state, coinsense_r<1>)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmimpct_state, coinsense_r<2>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmimpct_state, coinsense_r<3>)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmimpct_state, coinsense_r<4>)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jpmimpct_state, coinsense_r<5>)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("COINS")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME( "Coin: 1 pound" ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmimpct_state, coin_changed, 0)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME( "Coin: 50p" ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmimpct_state, coin_changed, 1)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME( "Coin: 20p" ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmimpct_state, coin_changed, 2)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME( "Coin: 10p" ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmimpct_state, coin_changed, 3)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN5 ) PORT_NAME( "Token: 20" ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmimpct_state, coin_changed, 4)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN6 ) PORT_NAME( "Coin: 5p" ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmimpct_state, coin_changed, 5)
+INPUT_PORTS_END
+
+INPUT_CHANGED_MEMBER(jpmimpct_state::coin_changed)
+{
+ if (newval)
+ {
+ logerror("coin inserted %d\n", param+1);
+ m_coinstate &= ~(1 << param);
+ m_cointimer[param]->adjust(attotime::from_msec(40));
+ }
+}
+
INPUT_PORTS_START( jpmimpct_inputs )
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, "DSW 0")
@@ -790,9 +815,13 @@ INPUT_PORTS_START( jpmimpct_inputs )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("J10_2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_INTERLOCK) PORT_NAME("Back Door") PORT_CODE(KEYCODE_Q) PORT_TOGGLE
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_INTERLOCK) PORT_NAME("Cashbox Door") PORT_CODE(KEYCODE_W) PORT_TOGGLE
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_INTERLOCK) PORT_NAME("Back Door") PORT_CODE(KEYCODE_Q) PORT_TOGGLE // always?
+ PORT_DIPNAME( 0x02, 0x02, "J10_2: 1")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, "J10_2: 2")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "J10_2: 3")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -825,7 +854,7 @@ INPUT_PORTS_START( jpmimpct_inputs )
PORT_DIPNAME( 0x10, 0x10, "J9_2: 4")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, "J9_2: 5")
+ PORT_DIPNAME( 0x20, 0x20, "J9_2: 5") // seems to be cashbox door on a number of non-video games
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "J9_2: 6")
@@ -835,33 +864,49 @@ INPUT_PORTS_START( jpmimpct_inputs )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_START("unk30")
+ PORT_DIPNAME( 0x01, 0x00, "unk30: 0 (Payout related)") // must be ON or you get an IOU message in j6roller instead of payout
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x02, "unk30: 1")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x04, "unk30: 2")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x08, "unk30: 3")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, "unk30: 4")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, "unk30: 5")
+ PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, "unk30: 6")
+ PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, "unk30: 7")
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+
PORT_START("TEST_DEMO")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Test/Demo" )
- PORT_START("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 1 pound" )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 50p" )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 20p" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 10p" )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN5 ) PORT_IMPULSE(2) PORT_NAME( "Token: 20" )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN6 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 5p" )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-INPUT_PORTS_END
+ PORT_INCLUDE( jpmimpct_coins )
+INPUT_PORTS_END
-static INPUT_PORTS_START( hngmnjpm )
+INPUT_PORTS_START( jpmimpct_video_inputs )
PORT_INCLUDE( jpmimpct_inputs )
- PORT_MODIFY("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 1 pound" )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 50p" )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 20p" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 10p" )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN5 ) PORT_IMPULSE(2) PORT_NAME( "Token: 20" )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN6 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 5p" )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("J10_2")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_INTERLOCK) PORT_NAME("Cashbox Door") PORT_CODE(KEYCODE_W) PORT_TOGGLE // not always, probably shouldn't be defined here
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( hngmnjpm )
+ PORT_INCLUDE( jpmimpct_video_inputs )
PORT_MODIFY("J10_0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Collect" )
@@ -871,17 +916,7 @@ static INPUT_PORTS_START( hngmnjpm )
INPUT_PORTS_END
static INPUT_PORTS_START( coronatn )
- PORT_INCLUDE( jpmimpct_inputs )
-
- PORT_MODIFY("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 1 pound" )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 50p" )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 20p" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 10p" )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN5 ) PORT_IMPULSE(2) PORT_NAME( "Token: 20" )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN6 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 5p" )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_INCLUDE( jpmimpct_video_inputs )
PORT_MODIFY("J10_0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Ask Ken" )
@@ -893,15 +928,11 @@ static INPUT_PORTS_START( coronatn )
INPUT_PORTS_END
static INPUT_PORTS_START( cluedo )
- PORT_INCLUDE( jpmimpct_inputs )
+ PORT_INCLUDE( jpmimpct_video_inputs )
PORT_INCLUDE( touchscreen )
PORT_MODIFY("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 1 pound" )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 50p" )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 20p" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 10p" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -912,15 +943,11 @@ static INPUT_PORTS_START( cluedo )
INPUT_PORTS_END
static INPUT_PORTS_START( trivialp )
- PORT_INCLUDE( jpmimpct_inputs )
+ PORT_INCLUDE( jpmimpct_video_inputs )
PORT_INCLUDE( touchscreen )
PORT_MODIFY("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 1 pound" )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 50p" )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 20p" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 10p" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -932,13 +959,9 @@ static INPUT_PORTS_START( trivialp )
INPUT_PORTS_END
static INPUT_PORTS_START( tqst )
- PORT_INCLUDE( jpmimpct_inputs )
+ PORT_INCLUDE( jpmimpct_video_inputs )
PORT_MODIFY("COINS") // TODO: check coinage
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 1 pound" )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 50p" )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 20p" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 10p" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -956,17 +979,12 @@ static INPUT_PORTS_START( tqst )
INPUT_PORTS_END
static INPUT_PORTS_START( scrabble )
- PORT_INCLUDE( jpmimpct_inputs )
+ PORT_INCLUDE( jpmimpct_video_inputs )
PORT_INCLUDE( touchscreen )
PORT_MODIFY("COINS")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 1 pound" )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 50p" )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 20p" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 10p" )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN6 ) PORT_IMPULSE(2) PORT_NAME( "Coin: 5p" )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -999,7 +1017,7 @@ WRITE_LINE_MEMBER(jpmimpct_video_state::tms_irq)
uint8_t jpmimpct_state::hopper_b_r()
{
int retval;
- // B0 = 100p Hopper Out Verif
+ // B0 = 100p Hopper Opto
// B1 = Hopper High
// B2 = Hopper Low
// B3 = 20p Hopper Opto
@@ -1018,6 +1036,13 @@ uint8_t jpmimpct_state::hopper_b_r()
retval &= ~0x08;
}
}
+ else
+ {
+ // if payout is inhibited these must be 0, no coin detected? otherwise many sets will give 5.7 error
+ // when they test the hoppers
+ retval &= ~0x01;
+ retval &= ~0x08;
+ }
return retval;
}
@@ -1063,9 +1088,11 @@ void jpmimpct_state::payen_a_w(uint8_t data)
{
m_motor[0] = (data & 0x01);
m_payen = (data & 0x10);
- m_slidesout = (data & 0x10);
m_motor[1] = (data & 0x40);
- m_hopinhibit = (data & 0x80);
+ m_hopinhibit = (data & 0x80); // prevents coin out
+
+ // same bit as m_payen?
+ m_slidesout = (data & 0x10);
}
void jpmimpct_state::display_c_w(uint8_t data)
@@ -1106,7 +1133,6 @@ uint16_t jpmimpct_state::ump_r()
return 0xff;//0xffff;
}
-
TIMER_DEVICE_CALLBACK_MEMBER(jpmimpct_state::duart_set_ip5)
{
auto state = m_testdemo->read() ? 1 : 0;
@@ -1127,6 +1153,7 @@ WRITE_LINE_MEMBER(jpmimpct_state::duart_irq_handler)
m_maincpu->set_input_line(5, state);
}
+
// Note 68k is on a sub-card, as is the UPD, so these things can change
// TODO: work out exactly which components are on each card and full list of motherboard components
@@ -1148,6 +1175,12 @@ void jpmimpct_state::base(machine_config &config)
m_ppi->in_pc_callback().set(FUNC(jpmimpct_state::hopper_c_r));
m_ppi->out_pc_callback().set(FUNC(jpmimpct_state::display_c_w));
+ TIMER(config, "cointimer0").configure_generic(FUNC(jpmimpct_state::coinoff<0>));
+ TIMER(config, "cointimer1").configure_generic(FUNC(jpmimpct_state::coinoff<1>));
+ TIMER(config, "cointimer2").configure_generic(FUNC(jpmimpct_state::coinoff<2>));
+ TIMER(config, "cointimer3").configure_generic(FUNC(jpmimpct_state::coinoff<3>));
+ TIMER(config, "cointimer4").configure_generic(FUNC(jpmimpct_state::coinoff<4>));
+ TIMER(config, "cointimer5").configure_generic(FUNC(jpmimpct_state::coinoff<5>));
SPEAKER(config, "mono").front_center();
UPD7759(config, m_upd7759).add_route(ALL_OUTPUTS, "mono", 0.50);
@@ -1160,7 +1193,7 @@ void jpmimpct_state::base(machine_config &config)
m_datalogger->rxd_handler().set(m_duart, FUNC(mc68681_device::rx_a_w));
}
-void jpmimpct_state::impact_nonvideo(machine_config &config)
+void jpmimpct_state::impact_nonvideo_base(machine_config & config)
{
base(config);
@@ -1170,6 +1203,11 @@ void jpmimpct_state::impact_nonvideo(machine_config &config)
S16LF01(config, m_vfd);
config.set_default_layout(layout_jpmimpct);
+}
+
+void jpmimpct_state::impact_nonvideo(machine_config &config)
+{
+ impact_nonvideo_base(config);
REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
m_reel[0]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<0>));
@@ -1185,6 +1223,26 @@ void jpmimpct_state::impact_nonvideo(machine_config &config)
m_reel[5]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<5>));
}
+void jpmimpct_state::impact_nonvideo_altreels(machine_config &config)
+{
+ impact_nonvideo_base(config);
+
+ // TODO: This is probably incorrect, but j6kungfu startup checks are looking
+ // for different reel types than the other games
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<5>));
+}
+
void jpmimpct_video_state::impact_video(machine_config &config)
{