mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
tmpacman preliminary i/o
This commit is contained in:
parent
8b96fd4e3f
commit
835aa9ea5d
@ -11,9 +11,9 @@
|
||||
|
||||
serial device etc.
|
||||
--------------------------------------------------------------------
|
||||
@MP0904A TMS0970 1977, Milton Bradley Comp IV
|
||||
@CP0904A TMS0970 1977, Milton Bradley Comp IV
|
||||
@MP0905B TMS0970 1977, Parker Brothers Codename Sector
|
||||
@MP0914 TMS1000 1979, Entex Baseball
|
||||
@MP0914 TMS1000 1978, Entex Baseball 1
|
||||
@MP1030 TMS1100 1980, APF Mathemagician
|
||||
@MP3226 TMS1000 1978, Milton Bradley Simon
|
||||
@MP3403 TMS1100 1978, unknown
|
||||
@ -371,8 +371,8 @@ INPUT_CHANGED_MEMBER(hh_tms1k_state::tms0980_power_button)
|
||||
|
||||
void hh_tms1k_state::mathmagi_display()
|
||||
{
|
||||
m_display_maxy = 11;
|
||||
m_display_maxx = 8;
|
||||
m_display_maxy = 11;
|
||||
|
||||
// R0-R7: 7seg leds
|
||||
for (int y = 0; y < 8; y++)
|
||||
@ -535,8 +535,8 @@ MACHINE_CONFIG_END
|
||||
|
||||
void hh_tms1k_state::amaztron_display()
|
||||
{
|
||||
m_display_maxy = 3;
|
||||
m_display_maxx = 8;
|
||||
m_display_maxy = 3;
|
||||
|
||||
// R8,R9: select digit
|
||||
for (int y = 0; y < 2; y++)
|
||||
@ -1347,8 +1347,8 @@ READ8_MEMBER(hh_tms1k_state::cnsector_read_k)
|
||||
|
||||
WRITE16_MEMBER(hh_tms1k_state::cnsector_write_r)
|
||||
{
|
||||
m_display_maxy = 7;
|
||||
m_display_maxx = 8;
|
||||
m_display_maxy = 7;
|
||||
|
||||
// R0-R5: select digit (right-to-left)
|
||||
for (int y = 0; y < 6; y++)
|
||||
@ -1555,8 +1555,8 @@ READ8_MEMBER(hh_tms1k_state::stopthief_read_k)
|
||||
|
||||
WRITE16_MEMBER(hh_tms1k_state::stopthief_write_r)
|
||||
{
|
||||
m_display_maxy = 3;
|
||||
m_display_maxx = 7;
|
||||
m_display_maxy = 3;
|
||||
|
||||
// R0-R2: select digit
|
||||
UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f;
|
||||
@ -2294,7 +2294,7 @@ CONS( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electroni
|
||||
CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", GAME_SUPPORTS_SAVE )
|
||||
CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", GAME_SUPPORTS_SAVE )
|
||||
|
||||
CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Baseball (Entex)", GAME_SUPPORTS_SAVE )
|
||||
CONS( 1978, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", GAME_SUPPORTS_SAVE )
|
||||
|
||||
CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ideal", "Electronic Detective", GAME_SUPPORTS_SAVE )
|
||||
|
||||
|
@ -86,6 +86,10 @@ public:
|
||||
void tmtennis_set_clock();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(tmtennis_difficulty_switch);
|
||||
DECLARE_MACHINE_RESET(tmtennis);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(tmpacman_grid_w);
|
||||
DECLARE_WRITE8_MEMBER(tmpacman_plate_w);
|
||||
DECLARE_WRITE8_MEMBER(tmpacman_port_e_w);
|
||||
|
||||
DECLARE_READ8_MEMBER(alnchase_input_r);
|
||||
DECLARE_WRITE8_MEMBER(alnchase_display_w);
|
||||
@ -232,7 +236,7 @@ UINT8 hh_ucom4_state::read_inputs(int columns)
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::edracula_grid_w)
|
||||
{
|
||||
// port C/D: vfd matrix grid
|
||||
// ports C,D: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
@ -241,7 +245,7 @@ WRITE8_MEMBER(hh_ucom4_state::edracula_grid_w)
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w)
|
||||
{
|
||||
// port E/F/G/H/I01: vfd matrix plate
|
||||
// ports E-H,I01: vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTE) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
@ -258,13 +262,13 @@ WRITE8_MEMBER(hh_ucom4_state::edracula_port_i_w)
|
||||
|
||||
|
||||
static INPUT_PORTS_START( edracula )
|
||||
PORT_START("IN.0")
|
||||
PORT_START("IN.0") // port A
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
||||
PORT_START("IN.1")
|
||||
PORT_START("IN.1") // port B
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
|
||||
@ -321,22 +325,22 @@ MACHINE_CONFIG_END
|
||||
|
||||
READ8_MEMBER(hh_ucom4_state::tmtennis_input_r)
|
||||
{
|
||||
// port A/B: buttons
|
||||
// ports A,B: buttons
|
||||
return ~read_inputs(2) >> (offset*4);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w)
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w)
|
||||
{
|
||||
// E0/E1: input mux
|
||||
// E2: speaker out
|
||||
// E3: N/C
|
||||
m_inp_mux = data & 3;
|
||||
m_speaker->level_w(data >> 2 & 1);
|
||||
// ports G-I: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTG) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(12, 12, m_plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_plate_w)
|
||||
{
|
||||
// port C/D/F: vfd matrix plate
|
||||
// ports C-F: vfd matrix plate
|
||||
if (offset == NEC_UCOM4_PORTF) offset--;
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
@ -344,17 +348,16 @@ WRITE8_MEMBER(hh_ucom4_state::tmtennis_plate_w)
|
||||
display_matrix(12, 12, m_plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_grid_w)
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmtennis_port_e_w)
|
||||
{
|
||||
// port G/H/I: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTG) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(12, 12, m_plate, m_grid);
|
||||
// E0,E1: input mux
|
||||
// E2: speaker out
|
||||
// E3: N/C
|
||||
m_inp_mux = data & 3;
|
||||
m_speaker->level_w(data >> 2 & 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Pro-Tennis physical button layout and labels is like this:
|
||||
|
||||
[SERVE] [1] [2] [3] [3] [2] [1] [SERVE]
|
||||
@ -456,7 +459,45 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmpacman_grid_w)
|
||||
{
|
||||
// ports C,D: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(19, 8, m_plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmpacman_plate_w)
|
||||
{
|
||||
// ports E-I: vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTE) * 4;
|
||||
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
display_matrix(19, 8, m_plate, m_grid);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::tmpacman_port_e_w)
|
||||
{
|
||||
// E1: speaker out
|
||||
m_speaker->level_w(data >> 1 & 1);
|
||||
|
||||
tmpacman_plate_w(space, offset, data);
|
||||
}
|
||||
|
||||
|
||||
static INPUT_PORTS_START( tmpacman )
|
||||
PORT_START("IN.0") // port A
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // 4 separate directional buttons, hence 16way
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY
|
||||
|
||||
PORT_START("IN.1") // port B
|
||||
PORT_CONFNAME( 0x00, 0x00, DEF_STR( Difficulty ) )
|
||||
PORT_CONFSETTING( 0x00, "Amateur" )
|
||||
PORT_CONFSETTING( 0x01, "Professional" )
|
||||
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -464,7 +505,17 @@ static MACHINE_CONFIG_START( tmpacman, hh_ucom4_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_430kHz)
|
||||
MCFG_UCOM4_READ_A_CB(IOPORT("IN.0"))
|
||||
MCFG_UCOM4_READ_B_CB(IOPORT("IN.1"))
|
||||
MCFG_UCOM4_WRITE_C_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w))
|
||||
MCFG_UCOM4_WRITE_D_CB(WRITE8(hh_ucom4_state, tmpacman_grid_w))
|
||||
MCFG_UCOM4_WRITE_E_CB(WRITE8(hh_ucom4_state, tmpacman_port_e_w))
|
||||
MCFG_UCOM4_WRITE_F_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_G_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_H_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
MCFG_UCOM4_WRITE_I_CB(WRITE8(hh_ucom4_state, tmpacman_plate_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_tmpacman)
|
||||
|
||||
/* no video! */
|
||||
@ -495,8 +546,6 @@ MACHINE_CONFIG_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
READ8_MEMBER(hh_ucom4_state::alnchase_input_r)
|
||||
{
|
||||
// port A: buttons
|
||||
@ -507,7 +556,7 @@ WRITE8_MEMBER(hh_ucom4_state::alnchase_display_w)
|
||||
{
|
||||
if (offset <= NEC_UCOM4_PORTE)
|
||||
{
|
||||
// C/D/E0: vfd matrix grid
|
||||
// ports C,D,E0: vfd matrix grid
|
||||
int shift = (offset - NEC_UCOM4_PORTC) * 4;
|
||||
m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
|
||||
|
||||
@ -518,7 +567,7 @@ WRITE8_MEMBER(hh_ucom4_state::alnchase_display_w)
|
||||
|
||||
if (offset >= NEC_UCOM4_PORTE)
|
||||
{
|
||||
// E23/F/G/H/I: vfd matrix plate
|
||||
// ports F-I,E23: vfd matrix plate
|
||||
int shift = (offset - NEC_UCOM4_PORTE) * 4;
|
||||
m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2;
|
||||
}
|
||||
@ -528,10 +577,10 @@ WRITE8_MEMBER(hh_ucom4_state::alnchase_display_w)
|
||||
|
||||
WRITE8_MEMBER(hh_ucom4_state::alnchase_port_e_w)
|
||||
{
|
||||
alnchase_display_w(space, offset, data);
|
||||
|
||||
// E1: speaker out
|
||||
m_speaker->level_w(data >> 1 & 1);
|
||||
|
||||
alnchase_display_w(space, offset, data);
|
||||
}
|
||||
|
||||
/* physical button layout and labels is like this:
|
||||
|
Loading…
Reference in New Issue
Block a user