hh_tms1k: fonas baseball WIP (nw)

This commit is contained in:
hap 2017-01-26 00:40:25 +01:00
parent c50ddac28b
commit 4537068e29
6 changed files with 137 additions and 22 deletions

View File

@ -220,6 +220,8 @@ void tms1k_base_device::device_reset()
m_eac = 0;
m_bl = 0;
m_add = 0;
m_status = 0;
m_clatch = 0;
m_opcode = 0;
m_micro = 0;

View File

@ -770,7 +770,6 @@ INPUT_CHANGED_MEMBER(funrlgl_state::reset_button)
m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE);
}
static MACHINE_CONFIG_START( funrlgl, funrlgl_state )
/* basic machine hardware */

View File

@ -698,7 +698,6 @@ INPUT_CHANGED_MEMBER(bfriskyt_state::input_changed)
update_int1();
}
static MACHINE_CONFIG_START( bfriskyt, bfriskyt_state )
/* basic machine hardware */
@ -944,7 +943,6 @@ INPUT_CHANGED_MEMBER(msthawk_state::input_changed)
update_int0();
}
static MACHINE_CONFIG_START( msthawk, msthawk_state )
/* basic machine hardware */
@ -1066,7 +1064,6 @@ INPUT_CHANGED_MEMBER(bzaxxon_state::input_changed)
update_int1();
}
static MACHINE_CONFIG_START( bzaxxon, bzaxxon_state )
/* basic machine hardware */
@ -1183,7 +1180,6 @@ INPUT_CHANGED_MEMBER(zackman_state::input_changed)
update_int0();
}
static MACHINE_CONFIG_START( zackman, zackman_state )
/* basic machine hardware */
@ -1311,7 +1307,6 @@ INPUT_CHANGED_MEMBER(bpengo_state::input_changed)
update_int0();
}
static MACHINE_CONFIG_START( bpengo, bpengo_state )
/* basic machine hardware */
@ -1437,7 +1432,6 @@ INPUT_CHANGED_MEMBER(bbtime_state::input_changed)
update_int0();
}
static MACHINE_CONFIG_START( bbtime, bbtime_state )
/* basic machine hardware */
@ -2248,7 +2242,6 @@ INPUT_CHANGED_MEMBER(cgalaxn_state::player_switch)
prepare_display();
}
static MACHINE_CONFIG_START( cgalaxn, cgalaxn_state )
/* basic machine hardware */
@ -2988,7 +2981,6 @@ INPUT_CHANGED_MEMBER(eturtles_state::input_changed)
update_int();
}
void eturtles_state::machine_start()
{
hh_hmcs40_state::machine_start();
@ -3360,7 +3352,6 @@ INPUT_CHANGED_MEMBER(gckong_state::input_changed)
update_int1();
}
static MACHINE_CONFIG_START( gckong, gckong_state )
/* basic machine hardware */
@ -3480,7 +3471,6 @@ INPUT_CHANGED_MEMBER(gdigdug_state::input_changed)
update_int1();
}
static MACHINE_CONFIG_START( gdigdug, gdigdug_state )
/* basic machine hardware */
@ -3856,7 +3846,6 @@ INPUT_CHANGED_MEMBER(kingman_state::input_changed)
update_int0();
}
static MACHINE_CONFIG_START( kingman, kingman_state )
/* basic machine hardware */
@ -3978,7 +3967,6 @@ INPUT_CHANGED_MEMBER(tmtron_state::input_changed)
update_int1();
}
static MACHINE_CONFIG_START( tmtron, tmtron_state )
/* basic machine hardware */

View File

@ -19,7 +19,7 @@
@CP0904A TMS0970 1977, Milton Bradley Comp IV
@MP0905B TMS0970 1977, Parker Brothers Codename Sector
*MP0057 TMS1000 1978, APH Student Speech+ (same ROM contents as TSI Speech+?)
*MP0154 TMS1000 1979, Fonas 2 Player Baseball
@MP0154 TMS1000 1979, Fonas 2 Player Baseball
@MP0158 TMS1000 1979, Entex Soccer (6003)
@MP0163 TMS1000 1979, A-One LSI Match Number/LJN Electronic Concentration
@MP0168 TMS1000 1979, Conic Multisport/Tandy Sports Arena (model 60-2158)
@ -167,6 +167,7 @@
#include "elecdet.lh"
#include "esbattle.lh"
#include "esoccer.lh"
//#include "f2pbball.lh"
#include "fxmcr165.lh" // clickable
#include "gjackpot.lh"
#include "gpoker.lh"
@ -1467,7 +1468,6 @@ INPUT_CHANGED_MEMBER(h2hbaseb_state::skill_switch)
set_clock();
}
void h2hbaseb_state::set_clock()
{
// MCU clock is from an RC circuit with C=47pF, and R value is depending on
@ -2749,7 +2749,6 @@ INPUT_CHANGED_MEMBER(ebball3_state::skill_switch)
set_clock();
}
void ebball3_state::set_clock()
{
// MCU clock is from an RC circuit(R=47K, C=33pF) oscillating by default at ~340kHz,
@ -2970,7 +2969,6 @@ INPUT_CHANGED_MEMBER(einvader_state::skill_switch)
set_clock();
}
void einvader_state::set_clock()
{
// MCU clock is from an RC circuit(R=47K, C=56pF) oscillating by default at ~320kHz,
@ -3348,7 +3346,6 @@ INPUT_CHANGED_MEMBER(raisedvl_state::skill_switch)
set_clock();
}
void raisedvl_state::set_clock()
{
// MCU clock is from an RC circuit with C=47pF, R=47K by default. Skills
@ -3387,6 +3384,125 @@ MACHINE_CONFIG_END
/***************************************************************************
Fonas 2 Player Baseball
* TMS1000NLL MP0154 (die label 1000B, MP0154)
* 4 7seg LEDs, 37 other LEDs, 1-bit sound
known releases:
- World: 2 Player Baseball
- USA: 2 Player Baseball, distributed by Sears
- Canada: 2 Player Baseball, distributed by Talbot Electronics
***************************************************************************/
class f2pbball_state : public hh_tms1k_state
{
public:
f2pbball_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_tms1k_state(mconfig, type, tag)
{ }
void prepare_display();
DECLARE_WRITE16_MEMBER(write_r);
DECLARE_WRITE16_MEMBER(write_o);
DECLARE_READ8_MEMBER(read_k);
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
};
// handlers
void f2pbball_state::prepare_display()
{
// R5-R8 are 7segs
set_display_segmask(0x1e0, 0xff);
display_matrix(8, 9, m_o, m_r);
}
WRITE16_MEMBER(f2pbball_state::write_r)
{
// R4,R9,R10: input mux
m_inp_mux = (data >> 4 & 1) | (data >> 8 & 6);
// R9,R10(ANDed together): speaker out
m_speaker->level_w(data >> 10 & data >> 9 & 1);
// R0-R8: led select
m_r = data;
prepare_display();
}
WRITE16_MEMBER(f2pbball_state::write_o)
{
// O0-O7: led state
m_o = BITSWAP8(data,0,7,2,6,5,4,3,1);
prepare_display();
}
READ8_MEMBER(f2pbball_state::read_k)
{
// K: multiplexed inputs
return read_inputs(3);
}
// config
static INPUT_PORTS_START( f2pbball )
PORT_START("IN.0") // R4
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("Pick Off")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_CONFNAME( 0x0c, 0x04, "Players" )
PORT_CONFSETTING( 0x04, "1" )
PORT_CONFSETTING( 0x00, "Practice" )
PORT_CONFSETTING( 0x08, "2" )
PORT_START("IN.1") // R9
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Score")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Steal")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pitch")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing")
PORT_START("IN.2") // R10
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_COCKTAIL PORT_NAME("Curve Left")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("Slow")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("Curve Right")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_COCKTAIL PORT_NAME("Fast")
PORT_START("RESET")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Reset") PORT_CHANGED_MEMBER(DEVICE_SELF, f2pbball_state, reset_button, 0)
INPUT_PORTS_END
INPUT_CHANGED_MEMBER(f2pbball_state::reset_button)
{
// reset button is directly wired to TMS1000 INIT pin
m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE);
}
static MACHINE_CONFIG_START( f2pbball, f2pbball_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", TMS1000, 325000) // approximation - RC osc. R=51K, C=39pF
MCFG_TMS1XXX_READ_K_CB(READ8(f2pbball_state, read_k))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(f2pbball_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(f2pbball_state, write_o))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
MCFG_DEFAULT_LAYOUT(layout_hh_tms1k_test)
//MCFG_DEFAULT_LAYOUT(layout_f2pbball)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
/***************************************************************************
Gakken Poker
@ -5350,7 +5466,6 @@ INPUT_CHANGED_MEMBER(ssimon_state::speed_switch)
set_clock();
}
void ssimon_state::set_clock()
{
// MCU clock is from an RC circuit with C=100pF, R=x depending on speed switch:
@ -7664,7 +7779,6 @@ INPUT_CHANGED_MEMBER(tbreakup_state::skill_switch)
set_clock();
}
void tbreakup_state::set_clock()
{
// MCU clock is from an analog circuit with resistor of 73K, PRO2 adds 100K
@ -7817,7 +7931,6 @@ INPUT_CHANGED_MEMBER(phpball_state::flipper_button)
output().set_lamp_value(90 + (int)(uintptr_t)param, newval);
}
static MACHINE_CONFIG_START( phpball, phpball_state )
/* basic machine hardware */
@ -8237,6 +8350,17 @@ ROM_START( raisedvl )
ROM_END
ROM_START( f2pbball )
ROM_REGION( 0x0400, "maincpu", 0 )
ROM_LOAD( "mp0154", 0x0000, 0x0400, CRC(c5b45ace) SHA1(b2de32e83ab447b22d6828f0081843f364040b01) )
ROM_REGION( 867, "maincpu:mpla", 0 )
ROM_LOAD( "tms1000_common2_micro.pla", 0, 867, CRC(d33da3cf) SHA1(13c4ebbca227818db75e6db0d45b66ba5e207776) )
ROM_REGION( 365, "maincpu:opla", 0 )
ROM_LOAD( "tms1000_f2pbball_output.pla", 0, 365, CRC(30c2f28f) SHA1(db969b22475f37f083c3594f5e4f5759048377b8) )
ROM_END
ROM_START( gpoker )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "mp2105", 0x0000, 0x0800, CRC(95a8f5b4) SHA1(d14f00ba9f57e437264d972baa14a14a28ff8719) )
@ -8707,6 +8831,8 @@ CONS( 1980, efootb4 , 0, 0, efootb4, efootb4, driver_device, 0, "Ent
CONS( 1980, ebaskb2 , 0, 0, ebaskb2, ebaskb2, driver_device, 0, "Entex", "Electronic Basketball 2 (Entex)", MACHINE_SUPPORTS_SAVE )
CONS( 1980, raisedvl, 0, 0, raisedvl, raisedvl, driver_device, 0, "Entex", "Raise The Devil", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK )
CONS( 1979, f2pbball, 0, 0, f2pbball, f2pbball, driver_device, 0, "Fonas", "2 Player Baseball (Fonas)", MACHINE_SUPPORTS_SAVE )
CONS( 1979, gpoker, 0, 0, gpoker, gpoker, driver_device, 0, "Gakken", "Poker (Gakken, 1979 version)", MACHINE_SUPPORTS_SAVE )
CONS( 1980, gjackpot, 0, 0, gjackpot, gjackpot, driver_device, 0, "Gakken", "Jackpot: Gin Rummy & Black Jack", MACHINE_SUPPORTS_SAVE )
CONS( 1982, ginv1000, 0, 0, ginv1000, ginv1000, driver_device, 0, "Gakken", "Galaxy Invader 1000", MACHINE_SUPPORTS_SAVE )

View File

@ -2167,7 +2167,6 @@ INPUT_CHANGED_MEMBER(tmtennis_state::difficulty_switch)
set_clock();
}
void tmtennis_state::set_clock()
{
// MCU clock is from an LC circuit oscillating by default at ~360kHz,

View File

@ -14298,6 +14298,7 @@ elecbowl // Marx
elecdet // Ideal
esbattle // Entex
esoccer // Entex
f2pbball // Fonas
fxmcr165 // Gakken
ginv1000 // Gakken
gjackpot // Gakken