Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 91 additions & 46 deletions src/mame/handheld/hh_ht11xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ class hh_ht1130_state : public hh_ht11xx_state
hh_ht1130_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_ht11xx_state(mconfig, type, tag),
m_out_x(*this, "%u.%u", 0U, 0U),
m_in(*this, "IN%u", 1)
m_in_pm(*this, "PM"),
m_in_pp(*this, "PP"),
m_in_ps(*this, "PS")
{ }

void ht1130_common(machine_config &config);
void ga888(machine_config &config);
void kc55in1(machine_config &config);

protected:
virtual void machine_start() override ATTR_COLD;
Expand All @@ -92,7 +96,9 @@ class hh_ht1130_state : public hh_ht11xx_state

private:
output_finder<4, 32> m_out_x;
required_ioport_array<3> m_in;
required_ioport m_in_pm;
required_ioport m_in_pp;
required_ioport m_in_ps;
};

void hh_ht1130_state::machine_start()
Expand All @@ -107,6 +113,20 @@ void hh_ht1130_state::segment_w(offs_t offset, u64 data)
m_out_x[offset][i] = BIT(data, i);
}

void hh_ht1130_state::ht1130_common(machine_config &config)
{
HT1130(config, m_maincpu, 1000000/8); // frequency?
m_maincpu->segment_out_cb().set(FUNC(hh_ht1130_state::segment_w));

m_maincpu->ps_in_cb().set_ioport(m_in_ps);
m_maincpu->pp_in_cb().set_ioport(m_in_pp);
m_maincpu->pm_in_cb().set_ioport(m_in_pm);

SPEAKER(config, "speaker").front_center();

mcfg_svg_screen(config, 698, 1080);
}


// HT1190 class

Expand All @@ -116,7 +136,8 @@ class hh_ht1190_state : public hh_ht11xx_state
hh_ht1190_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_ht11xx_state(mconfig, type, tag),
m_out_x(*this, "%u.%u", 0U, 0U),
m_in(*this, "IN%u", 1)
m_in_pp(*this, "PP"),
m_in_ps(*this, "PS")
{ }

void brke23p2(machine_config &config);
Expand All @@ -128,7 +149,8 @@ class hh_ht1190_state : public hh_ht11xx_state

private:
output_finder<8, 40> m_out_x;
required_ioport_array<2> m_in;
required_ioport m_in_pp;
required_ioport m_in_ps;
};

void hh_ht1190_state::machine_start()
Expand Down Expand Up @@ -159,38 +181,34 @@ void hh_ht1190_state::segment_w(offs_t offset, u64 data)

*******************************************************************************/

// inputs

static INPUT_PORTS_START( brke23p2 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) PORT_NAME("Mute")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POWER_ON ) PORT_NAME("Power") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(hh_ht11xx_state::input_wakeup), 0)
PORT_START("PS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("START / PAUSE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) PORT_NAME("MUTE")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POWER_ON ) PORT_NAME("ON / OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(hh_ht11xx_state::input_wakeup), 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )

PORT_START("IN2") // not a joystick, but buttons are used for directional inputs in the snake game etc.
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Up / Rotate")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Down / Drop")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Right")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left")
PORT_START("PP") // not a joystick, but buttons are used for directional inputs in the snake game etc.
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("ROTATE / DIRECTION")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("DOWN / MODE")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("RIGHT / SPEED")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("LEFT / LEVEL")
INPUT_PORTS_END

// config

void hh_ht1190_state::brke23p2(machine_config &config)
{
HT1190(config, m_maincpu, 1000000/8); // frequency?
m_maincpu->segment_out_cb().set(FUNC(hh_ht1190_state::segment_w));

m_maincpu->ps_in_cb().set_ioport(m_in[0]);
m_maincpu->pp_in_cb().set_ioport(m_in[1]);
m_maincpu->ps_in_cb().set_ioport(m_in_ps);
m_maincpu->pp_in_cb().set_ioport(m_in_pp);

SPEAKER(config, "speaker").front_center();

mcfg_svg_screen(config, 755, 1080);
}

// roms

ROM_START( brke23p2 )
ROM_REGION( 0x1000, "maincpu", 0 )
Expand All @@ -205,8 +223,6 @@ ROM_END





/*******************************************************************************

Block Game & Echo Key GA888
Expand All @@ -215,45 +231,29 @@ ROM_END

*******************************************************************************/

// inputs

static INPUT_PORTS_START( ga888 ) // the unit also has an up button, and a reset button, is 'up' connected to anything?
PORT_START("IN1")
PORT_START("PS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) PORT_NAME("Pause / Power") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(hh_ht11xx_state::input_wakeup), 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )

PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("PP")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )

PORT_START("IN3")
PORT_START("PM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start / Rotate")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Down / Drop")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Right / Sound")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left")
INPUT_PORTS_END

// config

void hh_ht1130_state::ga888(machine_config &config)
{
HT1130(config, m_maincpu, 1000000/8); // frequency?
m_maincpu->segment_out_cb().set(FUNC(hh_ht1130_state::segment_w));

m_maincpu->ps_in_cb().set_ioport(m_in[0]);
m_maincpu->pp_in_cb().set_ioport(m_in[1]);
m_maincpu->pm_in_cb().set_ioport(m_in[2]);

SPEAKER(config, "speaker").front_center();

mcfg_svg_screen(config, 698, 1080);
ht1130_common(config);
}

// roms

ROM_START( ga888 )
ROM_REGION( 0x1000, "maincpu", 0 )
Expand All @@ -266,17 +266,62 @@ ROM_START( ga888 )
ROM_LOAD( "ga888.svg", 0, 85508, CRC(9ab6dd67) SHA1(a4365a00204bf4e376f28600c0b87289bda0cbb0) )
ROM_END

} // anonymous namespace


/*******************************************************************************

Keychain 55 in 1
* Holtek HT1130
* 8*12 LCD screen + 8 custom segments, 1-bit sound

*******************************************************************************/

static INPUT_PORTS_START( kc55in1 )
PORT_START("PS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) PORT_NAME("ON / PAUSE") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(hh_ht11xx_state::input_wakeup), 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )

PORT_START("PP")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )

PORT_START("PM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("START / ROTATE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Down / GAME")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Right")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Left / SELECT")
INPUT_PORTS_END


void hh_ht1130_state::kc55in1(machine_config &config)
{
ht1130_common(config);
}


ROM_START( kc55in1 )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD( "keychain55in1.bin", 0x0000, 0x1000, CRC(c8623cf2) SHA1(27fe405a8a866bfc6a857af886ed00f64083c2cc) ) // visual decap

ROM_REGION( 0x280, "melody", 0 )
ROM_LOAD( "keychain55in1.srom", 0x000, 0x280, CRC(5667eb80) SHA1(4aee372f87a988ae46790538f4435c4a249e3686) )

ROM_REGION( 85508, "screen", 0)
ROM_LOAD( "keychain55in1.svg", 0, 85508, CRC(9ab6dd67) SHA1(a4365a00204bf4e376f28600c0b87289bda0cbb0) )
ROM_END


} // anonymous namespace


/*******************************************************************************

Game driver(s)

*******************************************************************************/

// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
CONS( 1993, brke23p2, 0, 0, brke23p2, brke23p2, hh_ht1190_state, empty_init, "E-Star", "Brick Game 96 in 1 (E-23 Plus Mark II)", MACHINE_IMPERFECT_TIMING | MACHINE_NO_SOUND ) // some other dieshots have 1996 on them, it is also possible the software is from Holtek

// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
CONS( 1993, brke23p2, 0, 0, brke23p2, brke23p2, hh_ht1190_state, empty_init, "E-Star", "Brick Game 96 in 1 (E-23 Plus Mark II)", MACHINE_IMPERFECT_TIMING | MACHINE_NO_SOUND ) // some other dieshots have 1996 on them, it is also possible the software is from Holtek
CONS( 199?, ga888, 0, 0, ga888, ga888, hh_ht1130_state, empty_init, "<unknown>", "Block Game & Echo Key GA888", MACHINE_IMPERFECT_TIMING | MACHINE_NO_SOUND ) // clone of Tetris Jr?
CONS( 199?, kc55in1, 0, 0, kc55in1, kc55in1, hh_ht1130_state, empty_init, "<unknown>", "Brick game: Keychain 55 in 1", MACHINE_IMPERFECT_TIMING | MACHINE_NO_SOUND )
1 change: 1 addition & 0 deletions src/mame/mame.lst
Original file line number Diff line number Diff line change
Expand Up @@ -19555,6 +19555,7 @@ zackman
@source:handheld/hh_ht11xx.cpp
brke23p2
ga888
kc55in1

@source:handheld/hh_melps4.cpp
cfrogger
Expand Down