New systems marked not working

------------------------------
King Kong (Tiger, Quartz Game Clock) [hap, Sean Riddle]
Lucky Luke (Tiger, Double Wide Screen) [hap, Sean Riddle]
This commit is contained in:
hap 2023-04-21 17:09:55 +02:00
parent ecb897991e
commit 265d3f607c
11 changed files with 400 additions and 32 deletions

View File

@ -91,7 +91,7 @@ void tms0970_cpu_device::device_reset()
if (imask & 0x40 && (imask & 0x20) == 0)
msel = (op & 0xf) | (op >> 1 & 0x10);
msel = bitswap<8>(msel,7,6,5,0,1,2,3,4); // lines are reversed
msel = bitswap<5>(msel,0,1,2,3,4); // lines are reversed
u32 mmask = m_mpla->read(msel);
mmask ^= 0x09fe; // invert active-negative

View File

@ -81,12 +81,12 @@ protected:
optional_ioport_array<6> m_inputs; // max 6
// misc common
u8 m_l = 0; // MCU port L write data
u8 m_g = 0; // MCU port G write data
u8 m_d = 0; // MCU port D write data
int m_so = 0; // MCU SO line state
int m_sk = 0; // MCU SK line state
u16 m_inp_mux = ~0; // multiplexed inputs mask
u8 m_l = 0; // MCU port L write data
u8 m_g = 0; // MCU port G write data
u8 m_d = 0; // MCU port D write data
int m_so = 0; // MCU SO line state
int m_sk = 0; // MCU SK line state
u16 m_inp_mux = ~0; // multiplexed inputs mask
u16 read_inputs(int columns, u16 colmask = ~0);
void set_power(bool state);

View File

@ -175,13 +175,13 @@ protected:
optional_ioport_array<7> m_inputs; // max 7
// misc common
u8 m_r[8] = { }; // MCU R ports write data (optional)
u16 m_d = 0; // MCU D port write data (optional)
u8 m_int[2] = { }; // MCU INT0/1 pins state
u16 m_inp_mux = 0; // multiplexed inputs mask
u8 m_r[8] = { }; // MCU R ports write data (optional)
u16 m_d = 0; // MCU D port write data (optional)
u8 m_int[2] = { }; // MCU INT0/1 pins state
u16 m_inp_mux = 0; // multiplexed inputs mask
u32 m_grid = 0; // VFD current row data
u64 m_plate = 0; // VFD current column data
u32 m_grid = 0; // VFD current row data
u64 m_plate = 0; // VFD current column data
u16 read_inputs(int columns);
void refresh_interrupts(void);

View File

@ -49,10 +49,10 @@ protected:
optional_ioport_array<4> m_inputs; // max 4
// misc common
u16 m_inp_mux = 0; // multiplexed inputs mask
u16 m_inp_mux = 0; // multiplexed inputs mask
u32 m_grid = 0; // VFD current row data
u32 m_plate = 0; // VFD current column data
u32 m_grid = 0; // VFD current row data
u32 m_plate = 0; // VFD current column data
u8 read_inputs(int columns);
};

View File

@ -115,11 +115,11 @@ protected:
optional_ioport_array<6> m_inputs; // max 6
// misc common
u8 m_a = 0; // MCU port A write data
u8 m_b = 0; // " B
u8 m_c = 0; // " C
u8 m_d = 0; // " D
u16 m_inp_mux = ~0; // multiplexed inputs mask
u8 m_a = 0; // MCU port A write data
u8 m_b = 0; // " B
u8 m_c = 0; // " C
u8 m_d = 0; // " D
u16 m_inp_mux = ~0; // multiplexed inputs mask
u16 read_inputs(int columns, u16 colmask = ~0);
u8 read_rotated_inputs(int columns, u8 rowmask = ~0);

View File

@ -0,0 +1,328 @@
// license:BSD-3-Clause
// copyright-holders:hap
// thanks-to:Sean Riddle
/*******************************************************************************
Suwa Seikosha (S-MOS) SMC11xx handhelds
Some LCD games with this MCU, and perhaps early-80s Seiko wristwatches too.
Before Tiger's 78-xxx series (hh_sm510.cpp), they released their games in Europe
through different publishers, eg. Orlitronic in France, Virca in Italy.
TODO:
- add common mcfg (like hh_sm510) when more games are added?
- add svg for: tkkongq, tlluke2
*******************************************************************************/
#include "emu.h"
#include "cpu/tms1000/smc1102.h"
#include "sound/spkrdev.h"
#include "screen.h"
#include "speaker.h"
#include "hh_smc1k_test.lh" // common test-layout - no svg artwork(yet), use external artwork
namespace {
class hh_smc1k_state : public driver_device
{
public:
hh_smc1k_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_speaker(*this, "speaker"),
m_inputs(*this, "IN.%u", 0),
m_out_x(*this, "%u.%u", 0U, 0U)
{ }
virtual DECLARE_INPUT_CHANGED_MEMBER(acl_button);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
// devices
required_device<smc1102_cpu_device> m_maincpu;
optional_device<speaker_sound_device> m_speaker;
optional_ioport_array<4> m_inputs; // max 4
output_finder<4, 32> m_out_x;
virtual void write_segs(offs_t offset, u32 data);
u8 read_inputs(int columns);
u8 m_inp_mux = 0;
};
// machine start/reset
void hh_smc1k_state::machine_start()
{
// resolve handlers
m_out_x.resolve();
// register for savestates
save_item(NAME(m_inp_mux));
}
void hh_smc1k_state::machine_reset()
{
}
/*******************************************************************************
Helper Functions
*******************************************************************************/
// LCD screen
void hh_smc1k_state::write_segs(offs_t offset, u32 data)
{
for (int i = 0; i < 32; i++)
{
// 4*32 segments
m_out_x[offset & 3][i] = data & 1;
data >>= 1;
}
}
// generic input handlers
u8 hh_smc1k_state::read_inputs(int columns)
{
u8 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
if (m_inp_mux >> i & 1)
ret |= m_inputs[i]->read();
return ret;
}
INPUT_CHANGED_MEMBER(hh_smc1k_state::acl_button)
{
// for when an input is directly tied to MCU INIT pin
m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE);
}
/*******************************************************************************
Minidrivers (subclass, I/O, Inputs, Machine Config, ROM Defs)
*******************************************************************************/
/*******************************************************************************
Tiger King Kong (model 7-721)
* PCB label: TG-LC003
* SMC1112 under epoxy (die label: SMC1112 D0W0)
* lcd screen with custom segments, 1-bit sound
Pyramid is suspected to have the same ROM as this.
This is the "Quartz Game Clock" version. Tiger also released King Kong on
several older LCD series.
*******************************************************************************/
class tkkongq_state : public hh_smc1k_state
{
public:
tkkongq_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_smc1k_state(mconfig, type, tag)
{ }
void tkkongq(machine_config &config);
private:
void write_r(u32 data);
void write_o(u16 data);
u8 read_k();
};
// handlers
void tkkongq_state::write_r(u32 data)
{
// R0,R1: input mux
m_inp_mux = data & 3;
// R7: speaker out
m_speaker->level_w(BIT(data, 7));
}
u8 tkkongq_state::read_k()
{
// K: multiplexed inputs
return read_inputs(2);
}
// inputs
static INPUT_PORTS_START( tkkongq )
PORT_START("IN.0") // R0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_16WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_16WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_16WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_16WAY
PORT_START("IN.1") // R1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Mode")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Game A")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Game B")
PORT_START("ACL")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tkkongq_state, acl_button, 0) PORT_NAME("Set")
INPUT_PORTS_END
// config
void tkkongq_state::tkkongq(machine_config &config)
{
// basic machine hardware
SMC1112(config, m_maincpu, 32.768_kHz_XTAL);
m_maincpu->write_r().set(FUNC(tkkongq_state::write_r));
m_maincpu->read_k().set(FUNC(tkkongq_state::read_k));
m_maincpu->write_segs().set(FUNC(tkkongq_state::write_segs));
// video hardware
config.set_default_layout(layout_hh_smc1k_test);
// sound hardware
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
}
// roms
ROM_START( tkkongq )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "smc1112_d0w0", 0x0000, 0x0800, CRC(77ff7a01) SHA1(ed5dc860e400dc11518b0a32f13879e143c17953) )
ROM_END
/*******************************************************************************
Tiger Lucky Luke (model 7-???)
* PCB label: REV 0, ET820, MM
* SMC1112 under epoxy (die label: SMC1112 D2A0)
* lcd screen with custom segments, 1-bit sound
Mickey Mouse is suspected to have the same ROM as this.
This is the "Double Wide Screen" version, there's also a "Large Screen" one.
*******************************************************************************/
class tlluke2_state : public hh_smc1k_state
{
public:
tlluke2_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_smc1k_state(mconfig, type, tag)
{ }
void tlluke2(machine_config &config);
private:
void write_r(u32 data);
void write_o(u16 data);
u8 read_k();
};
// handlers
void tlluke2_state::write_r(u32 data)
{
// R0-R2: input mux
m_inp_mux = data & 7;
// R7: speaker out
m_speaker->level_w(BIT(data, 7));
}
u8 tlluke2_state::read_k()
{
// K: multiplexed inputs
return read_inputs(3);
}
// inputs
static INPUT_PORTS_START( tlluke2 )
PORT_START("IN.0") // R0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Mode")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Game A")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Game B")
PORT_START("IN.1") // R1
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Jump/Open
PORT_START("IN.2") // R2
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_START("ACL")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tlluke2_state, acl_button, 0) PORT_NAME("ACL")
INPUT_PORTS_END
// config
void tlluke2_state::tlluke2(machine_config &config)
{
// basic machine hardware
SMC1112(config, m_maincpu, 32.768_kHz_XTAL);
m_maincpu->write_r().set(FUNC(tlluke2_state::write_r));
m_maincpu->read_k().set(FUNC(tlluke2_state::read_k));
m_maincpu->write_segs().set(FUNC(tlluke2_state::write_segs));
// video hardware
config.set_default_layout(layout_hh_smc1k_test);
// sound hardware
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
}
// roms
ROM_START( tlluke2 )
ROM_REGION( 0x0800, "maincpu", 0 )
ROM_LOAD( "smc1112_d2a0", 0x0000, 0x0800, CRC(73df08ff) SHA1(8ddf058e74e07364ab702e01f1cecb5fdb22133f) )
ROM_END
} // anonymous namespace
/*******************************************************************************
Game driver(s)
*******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
// Tiger Quartz Game Clock
SYST( 1982, tkkongq, 0, 0, tkkongq, tkkongq, tkkongq_state, empty_init, "Tiger Electronics", "King Kong (Tiger, Quartz Game Clock)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )
// Tiger Double Wide Screen
SYST( 1984, tlluke2, 0, 0, tlluke2, tlluke2, tlluke2_state, empty_init, "Tiger Electronics", "Lucky Luke (Tiger, Double Wide Screen)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING )

View File

@ -383,13 +383,13 @@ protected:
output_finder<> m_out_power; // power state, eg. led
// misc common
u32 m_r = 0U; // MCU R-pins data
u16 m_o = 0U; // MCU O-pins data
u32 m_inp_mux = 0U; // multiplexed inputs mask
u32 m_r = 0U; // MCU R-pins data
u16 m_o = 0U; // MCU O-pins data
u32 m_inp_mux = 0U; // multiplexed inputs mask
bool m_power_on = false;
u32 m_grid = 0U; // VFD/LED current row data
u32 m_plate = 0U; // VFD/LED current column data
u32 m_grid = 0U; // VFD/LED current row data
u32 m_plate = 0U; // VFD/LED current column data
u8 read_inputs(int columns);
u8 read_rotated_inputs(int columns, u8 rowmask = 0xf);

View File

@ -143,12 +143,12 @@ protected:
optional_ioport_array<6> m_inputs; // max 6
// misc common
u8 m_port[9] = { }; // MCU port A-I write data (optional)
u8 m_int = 0; // MCU INT pin state
u16 m_inp_mux = 0; // multiplexed inputs mask
u8 m_port[9] = { }; // MCU port A-I write data (optional)
u8 m_int = 0; // MCU INT pin state
u16 m_inp_mux = 0; // multiplexed inputs mask
u32 m_grid = 0; // VFD current row data
u32 m_plate = 0; // VFD current column data
u32 m_grid = 0; // VFD current row data
u32 m_plate = 0; // VFD current column data
u8 read_inputs(int columns);
void refresh_interrupts(void);

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
-->
<mamelayout version="2">
<!-- define elements -->
<!-- not really black, and not really leds either, but let's just keep the same naming as the other hh test layouts -->
<element name="static_black"><rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect></element>
<element name="led" defstate="0">
<disk state="0"><color red="0.5412" green="0.57255" blue="0.5804" /></disk>
<disk state="1"><color red="0.361" green="0.326" blue="0.346" /></disk>
</element>
<!-- build screen -->
<view name="Test Layout">
<bounds left="0" right="32" top="0" bottom="8" />
<element ref="static_black">
<bounds left="0" right="32" top="0" bottom="8" />
</element>
<!-- max 4*32 matrix -->
<repeat count="4">
<param name="y" start="0" increment="1" />
<repeat count="32">
<param name="x" start="0" increment="1" />
<element name="~y~.~x~" ref="led"><bounds x="~x~" y="~y~" width="0.5" height="0.5" /></element>
</repeat>
</repeat>
</view>
</mamelayout>

View File

@ -18905,6 +18905,10 @@ txmenpx // Tiger
vespovar // Elektronika
vfutbol // Elektronika
@source:handheld/hh_smc1k.cpp
tkkongq // Tiger
tlluke2 // Tiger
@source:handheld/hh_tms1k.cpp
alphie // Playskool
arcmania // Milton Bradley

View File

@ -5425,7 +5425,7 @@ ROM_START( alpines )
ROM_LOAD( "af1wavea.2l", 0x000000, 0x400000, CRC(28cca494) SHA1(4ff87ab85fd17bf8dbee5b03d99cc5c31dd6349a) )
ROM_END
ROM_START( alpinesa ) // only 4 different DWORDs at 0x700, pretty certain it's the serial number
ROM_START( alpinesa ) // only 4 different DWORDs at 0x700, it's either a serial number, or a log from when Namco serviced the cabinet
ROM_REGION( 0x800000, "maincpu", 0 ) /* main program */
ROM_LOAD32_BYTE( "af2ver-a_ll.ic2", 0x000003, 0x200000, CRC(d8025e98) SHA1(e1c08557e70d632bf1e99356d6c6f76b5f407b8f) )
ROM_LOAD32_BYTE( "af2ver-a_lm.ic3", 0x000002, 0x200000, CRC(5f805d51) SHA1(b7fa9028deeaf1c549e9c2d6099925a0d0ad1598) )