mirror of
https://github.com/holub/mame
synced 2025-04-27 18:53:05 +03:00
added Parker Bros bankshot to splitsec.c (preliminary)
This commit is contained in:
parent
f774c3fab6
commit
f08cee1db7
@ -16,8 +16,13 @@
|
||||
*: higher number indicates higher difficulty
|
||||
|
||||
|
||||
TODO:
|
||||
- MCU clock is unknown
|
||||
****************************************************************************
|
||||
|
||||
Parker Brothers Bank Shot (also released in other regions as Cue Ball)
|
||||
* TMS1400NLL MP7313-N2 (die labeled MP7313)
|
||||
|
||||
x
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -26,6 +31,7 @@
|
||||
#include "sound/speaker.h"
|
||||
|
||||
#include "splitsec.lh"
|
||||
#include "bankshot.lh"
|
||||
|
||||
// The master clock is a single stage RC oscillator: R=24K, C=100pf,
|
||||
// according to the TMS 1000 series data manual this is around 375kHz.
|
||||
@ -33,7 +39,7 @@
|
||||
// to recordings, maybe the RC osc curve is different for TMS1400?
|
||||
|
||||
// so for now, the value below is an approximation
|
||||
#define MASTER_CLOCK (485000)
|
||||
#define MASTER_CLOCK (475000)
|
||||
|
||||
|
||||
class splitsec_state : public driver_device
|
||||
@ -50,6 +56,7 @@ public:
|
||||
required_ioport_array<2> m_button_matrix;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
|
||||
UINT8 m_input_mux;
|
||||
UINT16 m_r;
|
||||
UINT16 m_o;
|
||||
|
||||
@ -59,7 +66,8 @@ public:
|
||||
|
||||
DECLARE_READ8_MEMBER(read_k);
|
||||
DECLARE_WRITE16_MEMBER(write_o);
|
||||
DECLARE_WRITE16_MEMBER(write_r);
|
||||
DECLARE_WRITE16_MEMBER(splitsec_write_r);
|
||||
DECLARE_WRITE16_MEMBER(bankshot_write_r);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick);
|
||||
void leds_update();
|
||||
@ -83,6 +91,8 @@ public:
|
||||
|
||||
/* display layout, where number xy is lamp R(x),O(y)
|
||||
|
||||
Split Second:
|
||||
|
||||
00 02 04
|
||||
10 01 12 03 14 05 16
|
||||
11 13 15
|
||||
@ -94,6 +104,12 @@ public:
|
||||
71 73 75
|
||||
50 60 52 62 54 64 56
|
||||
70 72 74
|
||||
|
||||
|
||||
Bank Shot:
|
||||
|
||||
x
|
||||
|
||||
*/
|
||||
|
||||
void splitsec_state::leds_update()
|
||||
@ -156,23 +172,12 @@ READ8_MEMBER(splitsec_state::read_k)
|
||||
|
||||
// read selected button rows
|
||||
for (int i = 0; i < 2; i++)
|
||||
if (m_r >> (i+9) & 1)
|
||||
if (m_input_mux >> i & 1)
|
||||
k |= m_button_matrix[i]->read();
|
||||
|
||||
return k;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(splitsec_state::write_r)
|
||||
{
|
||||
// R8: speaker out
|
||||
m_speaker->level_w(data >> 8 & 1);
|
||||
|
||||
// R9,R10: input mux
|
||||
// R0-R7: led columns
|
||||
m_r = data;
|
||||
leds_update();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(splitsec_state::write_o)
|
||||
{
|
||||
// O0-O6: led rows
|
||||
@ -181,6 +186,32 @@ WRITE16_MEMBER(splitsec_state::write_o)
|
||||
leds_update();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(splitsec_state::splitsec_write_r)
|
||||
{
|
||||
// R8: speaker out
|
||||
m_speaker->level_w(data >> 8 & 1);
|
||||
|
||||
// R9,R10: input mux
|
||||
m_input_mux = data >> 9 & 3;
|
||||
|
||||
// R0-R7: led columns
|
||||
m_r = data & 0xff;
|
||||
leds_update();
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(splitsec_state::bankshot_write_r)
|
||||
{
|
||||
// R0: speaker out
|
||||
m_speaker->level_w(data & 1);
|
||||
|
||||
// R2,R3: input mux
|
||||
m_input_mux = data >> 2 & 3;
|
||||
|
||||
// R2-R10: led columns
|
||||
m_r = data & ~3;
|
||||
leds_update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -203,6 +234,20 @@ static INPUT_PORTS_START( splitsec )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( bankshot )
|
||||
PORT_START("IN.0") // R2
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN.1") // R3
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON5 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON6 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -218,6 +263,7 @@ void splitsec_state::machine_start()
|
||||
memset(m_leds_cache, 0, sizeof(m_leds_cache));
|
||||
memset(m_leds_decay, 0, sizeof(m_leds_decay));
|
||||
|
||||
m_input_mux = 0;
|
||||
m_r = 0;
|
||||
m_o = 0;
|
||||
|
||||
@ -226,6 +272,7 @@ void splitsec_state::machine_start()
|
||||
save_item(NAME(m_leds_cache));
|
||||
save_item(NAME(m_leds_decay));
|
||||
|
||||
save_item(NAME(m_input_mux));
|
||||
save_item(NAME(m_r));
|
||||
save_item(NAME(m_o));
|
||||
}
|
||||
@ -237,7 +284,7 @@ static MACHINE_CONFIG_START( splitsec, splitsec_state )
|
||||
MCFG_CPU_ADD("maincpu", TMS1400, MASTER_CLOCK)
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(splitsec_state, read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(splitsec_state, write_o))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, write_r))
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, splitsec_write_r))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", splitsec_state, leds_decay_tick, attotime::from_msec(10))
|
||||
|
||||
@ -251,6 +298,15 @@ static MACHINE_CONFIG_START( splitsec, splitsec_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( bankshot, splitsec )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, bankshot_write_r))
|
||||
|
||||
MCFG_DEFAULT_LAYOUT(layout_bankshot)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -269,5 +325,16 @@ ROM_START( splitsec )
|
||||
ROM_LOAD( "tms1400_splitsec_opla.pla", 0, 557, CRC(7539283b) SHA1(f791fa98259fc10c393ff1961d4c93040f1a2932) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( bankshot )
|
||||
ROM_REGION( 0x1000, "maincpu", 0 )
|
||||
ROM_LOAD( "tms1400nll_mp7313", 0x0000, 0x1000, CRC(7a5016a9) SHA1(a8730dc8a282ffaa3d89e675f371d43eb39f39b4) )
|
||||
|
||||
ROM_REGION( 867, "maincpu:mpla", 0 )
|
||||
ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
|
||||
ROM_REGION( 557, "maincpu:opla", 0 )
|
||||
ROM_LOAD( "tms1400_bankshot_opla.pla", 0, 557, CRC(7539283b) SHA1(f791fa98259fc10c393ff1961d4c93040f1a2932) )
|
||||
ROM_END
|
||||
|
||||
|
||||
CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", GAME_SUPPORTS_SAVE )
|
||||
CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
|
||||
|
24
src/mess/layout/bankshot.lay
Normal file
24
src/mess/layout/bankshot.lay
Normal file
@ -0,0 +1,24 @@
|
||||
<?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="led" defstate="0">
|
||||
<disk state="1"><color red="1.0" green="0.24" blue="0.26" /></disk>
|
||||
<disk state="0"><color red="0.15" green="0.043" blue="0.047" /></disk>
|
||||
</element>
|
||||
|
||||
|
||||
<!-- build screen -->
|
||||
|
||||
<view name="Internal Layout">
|
||||
<bounds left="0" right="100" top="0" bottom="100" />
|
||||
<bezel element="static_black">
|
||||
<bounds left="0" right="100" top="0" bottom="100" />
|
||||
</bezel>
|
||||
|
||||
|
||||
</view>
|
||||
</mamelayout>
|
@ -2276,6 +2276,7 @@ starwbcp
|
||||
stopthie
|
||||
stopthiep
|
||||
splitsec
|
||||
bankshot
|
||||
amico2k
|
||||
jtc
|
||||
jtces88
|
||||
|
@ -2190,7 +2190,8 @@ $(MESS_DRIVERS)/simon.o: $(MESS_LAYOUT)/simon.lh
|
||||
$(MESS_DRIVERS)/sitcom.o: $(MESS_LAYOUT)/sitcom.lh
|
||||
$(MESS_DRIVERS)/slc1.o: $(MESS_LAYOUT)/slc1.lh
|
||||
$(MESS_DRIVERS)/sms.o: $(MESS_LAYOUT)/sms1.lh
|
||||
$(MESS_DRIVERS)/splitsec.o: $(MESS_LAYOUT)/splitsec.lh
|
||||
$(MESS_DRIVERS)/splitsec.o: $(MESS_LAYOUT)/bankshot.lh \
|
||||
$(MESS_LAYOUT)/splitsec.lh
|
||||
$(MESS_DRIVERS)/starwbc.o: $(MESS_LAYOUT)/starwbc.lh
|
||||
$(MESS_DRIVERS)/stopthie.o: $(MESS_LAYOUT)/stopthie.lh
|
||||
$(MESS_DRIVERS)/super80.o: $(MESS_LAYOUT)/super80.lh
|
||||
|
Loading…
Reference in New Issue
Block a user