diff --git a/hash/ggm.xml b/hash/ggm.xml
index 742b43017f5..3fb1411f69f 100644
--- a/hash/ggm.xml
+++ b/hash/ggm.xml
@@ -24,7 +24,7 @@ license:CC0-1.0
- Capablanca Edition - Master Chess Endgame
+ Capablanca Edition: Master Chess Endgame
1981
Applied Concepts
@@ -38,7 +38,7 @@ license:CC0-1.0
- Morphy Edition - Master Chess
+ Morphy Edition: Master Chess
1981
Applied Concepts
@@ -53,7 +53,7 @@ license:CC0-1.0
- Sandy Edition - Master Chess
+ Sandy Edition: Master Chess
1981
Sandy Electronic
@@ -68,7 +68,7 @@ license:CC0-1.0
- Steinitz Edition-4 - Master Chess
+ Steinitz Edition-4: Master Chess
1982
Applied Concepts
diff --git a/src/devices/video/pwm.h b/src/devices/video/pwm.h
index 48a04ec9756..ee1bf8239e8 100644
--- a/src/devices/video/pwm.h
+++ b/src/devices/video/pwm.h
@@ -56,8 +56,8 @@ public:
void clear_row(offs_t offset, u64 data = 0) { sync(); m_rowdata[offset] = 0; m_rowsel &= ~(u64(1) << offset); }
// directly handle element current brightness
- double read_element_bri(u8 y, u8 x) { return m_bri[y][x]; }
- void write_element_bri(u8 y, u8 x, double b) { m_bri[y][x] = b; }
+ double read_element_bri(u8 y, u8 x) { sync(); return m_bri[y][x]; }
+ void write_element_bri(u8 y, u8 x, double b) { sync(); m_bri[y][x] = b; }
bool element_on(u8 y, u8 x) { return (read_element_bri(y, x) > m_levels[m_level_min]); }
bool row_on(u8 y) { return element_on(y, m_width); }
diff --git a/src/mame/appliedconcepts/boris.cpp b/src/mame/appliedconcepts/boris.cpp
index f1730abd0fc..d41fd17bde6 100644
--- a/src/mame/appliedconcepts/boris.cpp
+++ b/src/mame/appliedconcepts/boris.cpp
@@ -201,7 +201,7 @@ INPUT_PORTS_END
void boris_state::boris(machine_config &config)
{
- /* basic machine hardware */
+ // basic machine hardware
F8(config, m_maincpu, 2_MHz_XTAL); // MK3850
m_maincpu->set_addrmap(AS_PROGRAM, &boris_state::main_map);
m_maincpu->set_addrmap(AS_IO, &boris_state::main_io);
@@ -210,7 +210,7 @@ void boris_state::boris(machine_config &config)
f3853_device &smi(F3853(config, "smi", 2_MHz_XTAL));
smi.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ);
- /* video hardware */
+ // video hardware
PWM_DISPLAY(config, m_display).set_size(8, 16);
m_display->set_segmask(0xff, 0xffff);
m_display->set_bri_levels(0.05);
diff --git a/src/mame/appliedconcepts/borisdpl.cpp b/src/mame/appliedconcepts/borisdpl.cpp
index f6bd43a8dc7..d0462c420a5 100644
--- a/src/mame/appliedconcepts/borisdpl.cpp
+++ b/src/mame/appliedconcepts/borisdpl.cpp
@@ -11,9 +11,9 @@ Hardware notes:
- 8-digit 7seg led panel
Two versions exist, a blue one(seen with SC80265P) and a brown one(seen with
-either MCU). The one emulated here is from a brown version with the SC80265P.
-Motorola SC80265P is a 3870 clone, it's assumed that the program is the same
-as SL90259.
+either SC80265P or SL90259). The one emulated here is from a brown version with
+the SC80265P. Motorola SC80265P is a 3870 clone, it's assumed that the program
+is the same as SL90259.
******************************************************************************/
@@ -182,7 +182,7 @@ INPUT_PORTS_END
void borisdpl_state::borisdpl(machine_config &config)
{
- /* basic machine hardware */
+ // basic machine hardware
F8(config, m_maincpu, 3000000/2); // frequency approximated from video reference
m_maincpu->set_addrmap(AS_PROGRAM, &borisdpl_state::main_map);
m_maincpu->set_addrmap(AS_IO, &borisdpl_state::main_io);
@@ -196,7 +196,7 @@ void borisdpl_state::borisdpl(machine_config &config)
psu.read_b().set(FUNC(borisdpl_state::ram_address_r));
psu.write_b().set(FUNC(borisdpl_state::ram_address_w));
- /* video hardware */
+ // video hardware
PWM_DISPLAY(config, m_display).set_size(8, 7);
m_display->set_segmask(0xff, 0x7f);
config.set_default_layout(layout_aci_borisdpl);
diff --git a/src/mame/appliedconcepts/ggm.cpp b/src/mame/appliedconcepts/ggm.cpp
index 29ede5277f6..c3c712435ec 100644
--- a/src/mame/appliedconcepts/ggm.cpp
+++ b/src/mame/appliedconcepts/ggm.cpp
@@ -18,22 +18,22 @@ There were also some standalone machines, eg. Morphy Encore, Odin Encore.
Cartridge pins are A0-A15, D0-D7, external RAM CS and RAM WR.
The opening/endgame cartridges are meant to be ejected/inserted while playing:
-switch power switch to MEM (internal RAM gets powered by rechargable battery),
-swap cartridge, switch power switch back to ON. In other words, don't power
-cycle the machine (or MAME).
+Press RANK, switch power switch to MEM (internal RAM gets powered by rechargable
+battery), swap cartridge, switch power switch back to ON. In other words, don't
+power cycle the machine (or MAME).
Known chess cartridges (*denotes not dumped):
- Chess/Boris 2.5 (aka Sargon 2.5)
-- *Gruenfeld Edition - Master Chess Openings
-- Morphy Edition - Master Chess
-- Capablanca Edition - Master Chess Endgame
-- Sandy Edition - Master Chess (German language version of Morphy)
-- Steinitz Edition-4 - Master Chess
-- *Monitor Edition - Master Kriegspiel
+- *Gruenfeld Edition: Master Chess Openings
+- Morphy Edition: Master Chess
+- Capablanca Edition: Master Chess Endgame
+- Sandy Edition: Master Chess (German language version of Morphy)
+- Steinitz Edition-4: Master Chess
+- *Monitor Edition: Master Kriegspiel
Other games:
-- *Borchek Edition - Master Checkers
-- *Odin Edition - Master Reversi
+- *Borchek Edition: Master Checkers
+- *Odin Edition: Master Reversi
- *Las Vegas 21
- *Wits End (unreleased?)
- *Lunar Lander (unreleased?)
@@ -134,6 +134,12 @@ void ggm_state::machine_start()
save_item(NAME(m_shift_clock));
}
+
+
+/******************************************************************************
+ Power
+******************************************************************************/
+
void ggm_state::machine_reset()
{
// it determines whether it's a cold boot or warm boot ("MEM" switch), with CA1
@@ -161,11 +167,9 @@ void ggm_state::update_reset(ioport_value state)
/******************************************************************************
- I/O
+ Cartridge
******************************************************************************/
-// cartridge
-
DEVICE_IMAGE_LOAD_MEMBER(ggm_state::load_cart)
{
u32 size = m_cart->common_get_size("rom");
@@ -206,7 +210,10 @@ void ggm_state::extram_w(offs_t offset, u8 data)
}
-// 6522 ports
+
+/******************************************************************************
+ I/O
+******************************************************************************/
void ggm_state::update_display()
{
@@ -240,7 +247,8 @@ void ggm_state::select_w(u8 data)
void ggm_state::control_w(u8 data)
{
- // PB0: DC/DC converter, toggles once per IRQ (probably for VFD, not needed for emulation)
+ // PB0: DC/DC converter, toggles once per IRQ
+ // (probably for VFD, not needed for emulation)
// PB7: speaker out
m_dac->write(BIT(data, 7));
@@ -434,7 +442,7 @@ INPUT_PORTS_END
void ggm_state::ggm(machine_config &config)
{
- /* basic machine hardware */
+ // basic machine hardware
M6502(config, m_maincpu, 2_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &ggm_state::main_map);
@@ -449,17 +457,17 @@ void ggm_state::ggm(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- /* video hardware */
+ // video hardware
PWM_DISPLAY(config, m_display).set_size(8, 16);
m_display->set_segmask(0xff, 0x3fff);
m_display->set_bri_levels(0.05);
config.set_default_layout(layout_aci_ggm);
- /* sound hardware */
+ // sound hardware
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
- /* cartridge */
+ // cartridge
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "ggm");
m_cart->set_device_load(FUNC(ggm_state::load_cart));
m_cart->set_device_unload(FUNC(ggm_state::unload_cart));
diff --git a/src/mame/appliedconcepts/prodigy.cpp b/src/mame/appliedconcepts/prodigy.cpp
index 8fc5530a496..de14b864cd1 100644
--- a/src/mame/appliedconcepts/prodigy.cpp
+++ b/src/mame/appliedconcepts/prodigy.cpp
@@ -254,7 +254,7 @@ INPUT_PORTS_END
void prodigy_state::prodigy(machine_config &config)
{
- /* basic machine hardware */
+ // basic machine hardware
M6502(config, m_maincpu, 2_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &prodigy_state::main_map);
@@ -270,12 +270,12 @@ void prodigy_state::prodigy(machine_config &config)
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
m_board->set_delay(attotime::from_msec(150));
- /* video hardware */
+ // video hardware
PWM_DISPLAY(config, m_display).set_size(6, 8);
m_display->set_segmask(0xf, 0xff);
config.set_default_layout(layout_aci_prodigy);
- /* sound hardware */
+ // sound hardware
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
}
diff --git a/src/mame/handheld/chessking.cpp b/src/mame/handheld/chessking.cpp
index 88f1b00e944..c3cc09dc511 100644
--- a/src/mame/handheld/chessking.cpp
+++ b/src/mame/handheld/chessking.cpp
@@ -130,7 +130,7 @@ uint32_t chessking_state::screen_update(screen_device &screen, bitmap_rgb32 &bit
uint8_t data2 = m_videoram[0x6000 + offset + x/8];
uint8_t pix = BIT(data, ~x & 7) | BIT(data2, ~x & 7) << 1;
- rgb_t pens[4] = { rgb_t::white(), rgb_t(0x55,0x55,0x55), rgb_t(0xaa,0xaa,0xaa), rgb_t::black() };
+ static const rgb_t pens[4] = { rgb_t::white(), rgb_t(0x55,0x55,0x55), rgb_t(0xaa,0xaa,0xaa), rgb_t::black() };
dst[x] = pens[pix];
}
}
@@ -353,8 +353,8 @@ void chessking_state::chesskng(machine_config &config)
******************************************************************************/
ROM_START( chesskng )
- ROM_REGION( 0x040000, "maincpu", 0 )
- ROM_LOAD( "etmate-cch.u6", 0x000000, 0x040000, CRC(a4d1764b) SHA1(ccfae1e985f6ad316ff192206fbc0f8bcd4e44d5) )
+ ROM_REGION( 0x40000, "maincpu", 0 )
+ ROM_LOAD( "etmate-cch.u6", 0x00000, 0x40000, CRC(a4d1764b) SHA1(ccfae1e985f6ad316ff192206fbc0f8bcd4e44d5) )
ROM_END
} // anonymous namespace
diff --git a/src/mame/handheld/gmaster.cpp b/src/mame/handheld/gmaster.cpp
index f40c3ce96a1..1d223c9748e 100644
--- a/src/mame/handheld/gmaster.cpp
+++ b/src/mame/handheld/gmaster.cpp
@@ -61,6 +61,7 @@ public:
gmaster_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
+ m_ram(*this, "ram"),
m_lcd(*this, "lcd%u", 0),
m_screen(*this, "screen"),
m_speaker(*this, "speaker")
@@ -73,6 +74,7 @@ protected:
private:
required_device m_maincpu;
+ required_shared_ptr m_ram;
required_device_array m_lcd;
required_device m_screen;
required_device m_speaker;
@@ -86,13 +88,11 @@ private:
void main_map(address_map &map);
- u8 m_ram[0x800] = { };
u8 m_chipsel = 0;
};
void gmaster_state::machine_start()
{
- save_item(NAME(m_ram));
save_item(NAME(m_chipsel));
}
@@ -171,7 +171,7 @@ void gmaster_state::io_w(offs_t offset, u8 data)
void gmaster_state::main_map(address_map &map)
{
// 0x0000-0x0fff is internal ROM
- map(0x4000, 0x47ff).mirror(0x3800).rw(FUNC(gmaster_state::io_r), FUNC(gmaster_state::io_w));
+ map(0x4000, 0x47ff).mirror(0x3800).rw(FUNC(gmaster_state::io_r), FUNC(gmaster_state::io_w)).share("ram");
map(0x8000, 0xfeff).r("cartslot", FUNC(generic_slot_device::read_rom));
// 0xff00-0xffff is internal RAM
}
diff --git a/src/mame/handheld/tispeak.cpp b/src/mame/handheld/tispeak.cpp
index 2a84fdf4182..fc940956630 100644
--- a/src/mame/handheld/tispeak.cpp
+++ b/src/mame/handheld/tispeak.cpp
@@ -681,7 +681,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::tntell_get_overlay)
// which one is active(if any). If it matches with the internal ROM or
// external module, the game continues.
- // pick overlay code from machine config, see comment section above for reference
+ // pick overlay code from input config, see comment section above for reference
m_overlay = m_inputs[10]->read();
// try to get it from (external) layout
diff --git a/src/mame/handheld/tispellb.cpp b/src/mame/handheld/tispellb.cpp
index de3a9597eef..750c8bb0ba6 100644
--- a/src/mame/handheld/tispellb.cpp
+++ b/src/mame/handheld/tispellb.cpp
@@ -3,86 +3,99 @@
// thanks-to:Sean Riddle
/***************************************************************************
- ** subclass of hh_tms1k_state (hh_tms1k.h, hh_tms1k.cpp) **
+Texas Instruments Spelling B hardware
- Texas Instruments Spelling B hardware
+The Spelling B was introduced together with the Speak & Spell. It is a
+handheld educational toy with booklet. Two revisions of the hardware exist.
- The Spelling B was introduced together with the Speak & Spell. It is a
- handheld educational toy with booklet. Two revisions of the hardware exist.
+1st version:
- 1st version:
+Spelling B (US), 1978
+- TMS0270 MCU TMC0272 (die label: 0272A T0270B)
+- TMS1980 MCU TMC1984 (die label: 1980A 84A)
+- 8-digit cyan VFD (seen with and without apostrophe)
- Spelling B (US), 1978
- - TMS0270 MCU TMC0272 (die label: 0272A T0270B)
- - TMS1980 MCU TMC1984 (die label: 1980A 84A)
- - 8-digit cyan VFD (seen with and without apostrophe)
+2nd version:
- 2nd version:
+Spelling B (US), 1980
+- TMS0270 MCU TMC0274
+- TMC0355 4KB VSM ROM CD2602
+- 8-digit cyan VFD
+- 1-bit sound (indicated by a music note symbol on the top-right of the casing)
+- note: much rarer than the 1978 version, not much luck finding one on eBay.
+ The words/indexes from the documentation are the same as the older version.
- Spelling B (US), 1980
- - TMS0270 MCU TMC0274
- - TMC0355 4KB VSM ROM CD2602
- - 8-digit cyan VFD
- - 1-bit sound (indicated by a music note symbol on the top-right of the casing)
- - note: much rarer than the 1978 version, not much luck finding one on eBay.
- The words/indexes from the documentation are the same as the older version.
+Spelling ABC (UK), 1980: exact same hardware as US 2nd version (the 1st version
+was also sold in the UK earlier, but not renamed)
- Spelling ABC (UK), 1980: exact same hardware as US 2nd version (the 1st version
- was also sold in the UK earlier, but not renamed)
+Spelling ABC (Germany), 1980: different VSM
+- TMC0355 4KB VSM ROM CD2607
- Spelling ABC (Germany), 1980: different VSM
- - TMC0355 4KB VSM ROM CD2607
+Mr. Challenger (US), 1979
+- TMS0270 MCU TMC0273
+- TMC0355 4KB VSM ROM CD2601
+- 8-digit cyan VFD
+- 1-bit sound
- Mr. Challenger (US), 1979
- - TMS0270 MCU TMC0273
- - TMC0355 4KB VSM ROM CD2601
- - 8-digit cyan VFD
- - 1-bit sound
+Letterlogic (UK), 1980: exact same hardware as US Mr. Challenger
+- note: stylized as "LETTERlogic", same for other language versions
- Letterlogic (UK), 1980: exact same hardware as US Mr. Challenger
- - note: stylized as "LETTERlogic", same for other language versions
+Letterlogic (France), 1980: different VSM
+- TMC0355 4KB VSM ROM CD2603
- Letterlogic (France), 1980: different VSM
- - TMC0355 4KB VSM ROM CD2603
-
- Letterlogic (Germany), 1980: different VSM
- - TMC0355 4KB VSM ROM CD2604
+Letterlogic (Germany), 1980: different VSM
+- TMC0355 4KB VSM ROM CD2604
***************************************************************************/
#include "emu.h"
-#include "hh_tms1k.h"
+#include "cpu/tms1000/tms0270.h"
+#include "cpu/tms1000/tms0980.h"
#include "machine/tms6100.h"
+#include "sound/spkrdev.h"
+#include "video/pwm.h"
+
#include "speaker.h"
// internal artwork
#include "spellb.lh"
+
namespace {
-class tispellb_state : public hh_tms1k_state
+class spellb_state : public driver_device
{
public:
- tispellb_state(const machine_config &mconfig, device_type type, const char *tag) :
- hh_tms1k_state(mconfig, type, tag),
+ spellb_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
m_subcpu(*this, "subcpu"),
- m_tms6100(*this, "tms6100")
+ m_tms6100(*this, "tms6100"),
+ m_display(*this, "display"),
+ m_speaker(*this, "speaker"),
+ m_inputs(*this, "IN.%u", 0)
{ }
void rev1(machine_config &config);
void rev2(machine_config &config);
+ DECLARE_INPUT_CHANGED_MEMBER(power_on);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
// devices
+ required_device m_maincpu;
optional_device m_subcpu;
optional_device m_tms6100;
+ required_device m_display;
+ optional_device m_speaker;
+ required_ioport_array<8> m_inputs;
- u8 m_rev1_ctl = 0;
- u16 m_sub_o = 0;
- u16 m_sub_r = 0;
-
- virtual void set_power(bool state) override;
+ void power_off();
void power_subcpu();
void update_display();
@@ -99,61 +112,87 @@ private:
void rev2_write_o(u16 data);
void rev2_write_r(u32 data);
- virtual void machine_start() override;
+ bool m_power_on = false;
+ u32 m_r = 0;
+ u16 m_grid = 0;
+ u16 m_plate = 0;
+ u16 m_sub_o = 0;
+ u16 m_sub_r = 0;
+ u8 m_rev1_ctl = 0;
};
-void tispellb_state::machine_start()
+void spellb_state::machine_start()
{
- hh_tms1k_state::machine_start();
-
// register for savestates
- save_item(NAME(m_rev1_ctl));
+ save_item(NAME(m_power_on));
+ save_item(NAME(m_r));
+ save_item(NAME(m_grid));
+ save_item(NAME(m_plate));
save_item(NAME(m_sub_o));
save_item(NAME(m_sub_r));
+ save_item(NAME(m_rev1_ctl));
}
-/***************************************************************************
+/******************************************************************************
+ Power
+******************************************************************************/
- I/O
+void spellb_state::machine_reset()
+{
+ m_power_on = true;
+ m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ power_subcpu();
+}
-***************************************************************************/
+INPUT_CHANGED_MEMBER(spellb_state::power_on)
+{
+ if (newval && !m_power_on)
+ machine_reset();
+}
-// common
+void spellb_state::power_off()
+{
+ m_power_on = false;
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ power_subcpu();
-void tispellb_state::power_subcpu()
+ m_display->clear();
+}
+
+void spellb_state::power_subcpu()
{
if (m_subcpu)
m_subcpu->set_input_line(INPUT_LINE_RESET, m_power_on ? CLEAR_LINE : ASSERT_LINE);
}
-void tispellb_state::set_power(bool state)
-{
- hh_tms1k_state::set_power(state);
- power_subcpu();
-}
-void tispellb_state::update_display()
+
+/******************************************************************************
+ I/O
+******************************************************************************/
+
+// common
+
+void spellb_state::update_display()
{
// almost same as snspell
u16 gridmask = m_display->row_on(15) ? 0xffff : 0x8000;
m_display->matrix(m_grid & gridmask, m_plate);
}
-void tispellb_state::main_write_o(u16 data)
+void spellb_state::main_write_o(u16 data)
{
// reorder opla to led14seg, plus DP as d14 and AP as d15, same as snspell
m_plate = bitswap<16>(data,12,15,10,7,8,9,11,6,13,3,14,0,1,2,4,5);
update_display();
}
-void tispellb_state::main_write_r(u32 data)
+void spellb_state::main_write_r(u32 data)
{
- // R0-R6: input mux
// R0-R7: select digit
// R15: filament on
- m_inp_mux = data & 0x7f;
m_grid = data & 0x80ff;
update_display();
@@ -161,25 +200,33 @@ void tispellb_state::main_write_r(u32 data)
if (~data & m_r & 0x2000)
power_off();
+ // R0-R6: input mux
m_r = data;
}
-u8 tispellb_state::main_read_k()
+u8 spellb_state::main_read_k()
{
- // K: multiplexed inputs (note: the Vss row is always on)
- return m_inputs[7]->read() | read_inputs(7);
+ u8 data = 0;
+
+ // K: multiplexed inputs
+ for (int i = 0; i < 7; i++)
+ if (BIT(m_r, i))
+ data |= m_inputs[i]->read();
+
+ // Vss row is always on
+ return data | m_inputs[7]->read();
}
// 1st revision mcu/mcu comms
-void tispellb_state::rev1_ctl_w(u8 data)
+void spellb_state::rev1_ctl_w(u8 data)
{
// main CTL write data
m_rev1_ctl = data & 0xf;
}
-u8 tispellb_state::sub_read_k()
+u8 spellb_state::sub_read_k()
{
// sub K8421 <- main CTL3210 (does not use external CS)
if (m_r & 0x1000)
@@ -188,19 +235,19 @@ u8 tispellb_state::sub_read_k()
return m_sub_o | (m_plate & 0xe) | (m_plate >> 6 & 1);
}
-void tispellb_state::sub_write_o(u16 data)
+void spellb_state::sub_write_o(u16 data)
{
// sub O write data
m_sub_o = bitswap<4>(data,6,0,4,3);
}
-u8 tispellb_state::rev1_ctl_r()
+u8 spellb_state::rev1_ctl_r()
{
// main CTL3210 <- sub O6043
return m_sub_o;
}
-void tispellb_state::sub_write_r(u16 data)
+void spellb_state::sub_write_r(u16 data)
{
// sub R: unused?
m_sub_r = data;
@@ -209,7 +256,7 @@ void tispellb_state::sub_write_r(u16 data)
// 2nd revision specifics
-void tispellb_state::rev2_write_o(u16 data)
+void spellb_state::rev2_write_o(u16 data)
{
// SEG DP: speaker out
m_speaker->level_w(data >> 15 & 1);
@@ -218,7 +265,7 @@ void tispellb_state::rev2_write_o(u16 data)
main_write_o(data & 0x6fff);
}
-void tispellb_state::rev2_write_r(u32 data)
+void spellb_state::rev2_write_r(u32 data)
{
// R12: TMC0355 CS
// R4: TMC0355 M1
@@ -235,11 +282,9 @@ void tispellb_state::rev2_write_r(u32 data)
-/***************************************************************************
-
- Inputs
-
-***************************************************************************/
+/******************************************************************************
+ Input Ports
+******************************************************************************/
static INPUT_PORTS_START( spellb )
PORT_START("IN.0") // R0
@@ -295,7 +340,7 @@ static INPUT_PORTS_START( spellb )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_NAME("Missing Letter")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_NAME("Mystery Word")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_NAME("Scramble")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Spelling B/On") PORT_CHANGED_MEMBER(DEVICE_SELF, tispellb_state, power_button, true)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Spelling B/On") PORT_CHANGED_MEMBER(DEVICE_SELF, spellb_state, power_on, 0)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_NAME("Starts With")
INPUT_PORTS_END
@@ -315,7 +360,7 @@ static INPUT_PORTS_START( spellabc )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_NAME("Was Fehlt?")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_NAME(u8"Wörter Rätsel")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_NAME("Wirr Warr")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Lerne ABC/On") PORT_CHANGED_MEMBER(DEVICE_SELF, tispellb_state, power_button, true)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Lerne ABC/On") PORT_CHANGED_MEMBER(DEVICE_SELF, spellb_state, power_on, 0)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_NAME("Anfang Mit")
INPUT_PORTS_END
@@ -331,7 +376,7 @@ static INPUT_PORTS_START( mrchalgr )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_NAME("Crazy Letters")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_NAME("Letter Guesser")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_NAME("Word Challenge")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Mystery Word/On") PORT_CHANGED_MEMBER(DEVICE_SELF, tispellb_state, power_button, true)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Mystery Word/On") PORT_CHANGED_MEMBER(DEVICE_SELF, spellb_state, power_on, 0)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_NAME("Replay")
INPUT_PORTS_END
@@ -351,7 +396,7 @@ static INPUT_PORTS_START( letterlf )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_NAME("Suite Folle")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_NAME("Devin")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_NAME("Duel")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Mot Mystere/On") PORT_CHANGED_MEMBER(DEVICE_SELF, tispellb_state, power_button, true)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME("Mot Mystere/On") PORT_CHANGED_MEMBER(DEVICE_SELF, spellb_state, power_on, 0)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_NAME("Rejouez")
INPUT_PORTS_END
@@ -371,32 +416,30 @@ static INPUT_PORTS_START( letterlg )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_NAME("Lettern Salat")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_NAME("Lettern Rater")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_NAME("Wettstreit")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME(u8"Wörter Rätsel/On") PORT_CHANGED_MEMBER(DEVICE_SELF, tispellb_state, power_button, true)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F1) PORT_CHAR('6') PORT_NAME(u8"Wörter Rätsel/On") PORT_CHANGED_MEMBER(DEVICE_SELF, spellb_state, power_on, 0)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_NAME("Wiedergabe")
INPUT_PORTS_END
-/***************************************************************************
+/******************************************************************************
+ Machine Configs
+******************************************************************************/
- Machine Config
-
-***************************************************************************/
-
-void tispellb_state::rev1(machine_config &config)
+void spellb_state::rev1(machine_config &config)
{
// basic machine hardware
TMS0270(config, m_maincpu, 320000); // approximation
- m_maincpu->read_k().set(FUNC(tispellb_state::main_read_k));
- m_maincpu->write_o().set(FUNC(tispellb_state::main_write_o));
- m_maincpu->write_r().set(FUNC(tispellb_state::main_write_r));
- m_maincpu->read_ctl().set(FUNC(tispellb_state::rev1_ctl_r));
- m_maincpu->write_ctl().set(FUNC(tispellb_state::rev1_ctl_w));
+ m_maincpu->read_k().set(FUNC(spellb_state::main_read_k));
+ m_maincpu->write_o().set(FUNC(spellb_state::main_write_o));
+ m_maincpu->write_r().set(FUNC(spellb_state::main_write_r));
+ m_maincpu->read_ctl().set(FUNC(spellb_state::rev1_ctl_r));
+ m_maincpu->write_ctl().set(FUNC(spellb_state::rev1_ctl_w));
TMS1980(config, m_subcpu, 320000); // approximation
- m_subcpu->read_k().set(FUNC(tispellb_state::sub_read_k));
- m_subcpu->write_o().set(FUNC(tispellb_state::sub_write_o));
- m_subcpu->write_r().set(FUNC(tispellb_state::sub_write_r));
+ m_subcpu->read_k().set(FUNC(spellb_state::sub_read_k));
+ m_subcpu->write_o().set(FUNC(spellb_state::sub_write_o));
+ m_subcpu->write_r().set(FUNC(spellb_state::sub_write_r));
config.set_perfect_quantum(m_maincpu);
@@ -408,13 +451,13 @@ void tispellb_state::rev1(machine_config &config)
// no sound!
}
-void tispellb_state::rev2(machine_config &config)
+void spellb_state::rev2(machine_config &config)
{
// basic machine hardware
TMS0270(config, m_maincpu, 320000); // approximation
- m_maincpu->read_k().set(FUNC(tispellb_state::main_read_k));
- m_maincpu->write_o().set(FUNC(tispellb_state::rev2_write_o));
- m_maincpu->write_r().set(FUNC(tispellb_state::rev2_write_r));
+ m_maincpu->read_k().set(FUNC(spellb_state::main_read_k));
+ m_maincpu->write_o().set(FUNC(spellb_state::rev2_write_o));
+ m_maincpu->write_r().set(FUNC(spellb_state::rev2_write_r));
m_maincpu->read_ctl().set(m_tms6100, FUNC(tms6100_device::data_r));
m_maincpu->write_ctl().set(m_tms6100, FUNC(tms6100_device::add_w));
@@ -433,11 +476,9 @@ void tispellb_state::rev2(machine_config &config)
-/***************************************************************************
-
- Game driver(s)
-
-***************************************************************************/
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
ROM_START( spellb )
ROM_REGION( 0x1000, "maincpu", 0 )
@@ -541,11 +582,15 @@ ROM_END
-// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
-COMP( 1980, spellb, 0, 0, rev2, spellb, tispellb_state, empty_init, "Texas Instruments", "Spelling B (US, 1980 version)", MACHINE_SUPPORTS_SAVE )
-COMP( 1978, spellba, spellb, 0, rev1, spellb, tispellb_state, empty_init, "Texas Instruments", "Spelling B (US, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
-COMP( 1980, spellabc, spellb, 0, rev2, spellabc, tispellb_state, empty_init, "Texas Instruments", "Spelling ABC (Germany)", MACHINE_SUPPORTS_SAVE )
+/******************************************************************************
+ Drivers
+******************************************************************************/
-COMP( 1979, mrchalgr, 0, 0, rev2, mrchalgr, tispellb_state, empty_init, "Texas Instruments", "Mr. Challenger (US)", MACHINE_SUPPORTS_SAVE )
-COMP( 1980, letterlf, mrchalgr, 0, rev2, letterlf, tispellb_state, empty_init, "Texas Instruments", "Letterlogic (France)", MACHINE_SUPPORTS_SAVE )
-COMP( 1980, letterlg, mrchalgr, 0, rev2, letterlg, tispellb_state, empty_init, "Texas Instruments", "Letterlogic (Germany)", MACHINE_SUPPORTS_SAVE )
+// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
+COMP( 1980, spellb, 0, 0, rev2, spellb, spellb_state, empty_init, "Texas Instruments", "Spelling B (US, 1980 version)", MACHINE_SUPPORTS_SAVE )
+COMP( 1978, spellba, spellb, 0, rev1, spellb, spellb_state, empty_init, "Texas Instruments", "Spelling B (US, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW )
+COMP( 1980, spellabc, spellb, 0, rev2, spellabc, spellb_state, empty_init, "Texas Instruments", "Spelling ABC (Germany)", MACHINE_SUPPORTS_SAVE )
+
+COMP( 1979, mrchalgr, 0, 0, rev2, mrchalgr, spellb_state, empty_init, "Texas Instruments", "Mr. Challenger (US)", MACHINE_SUPPORTS_SAVE )
+COMP( 1980, letterlf, mrchalgr, 0, rev2, letterlf, spellb_state, empty_init, "Texas Instruments", "Letterlogic (France)", MACHINE_SUPPORTS_SAVE )
+COMP( 1980, letterlg, mrchalgr, 0, rev2, letterlg, spellb_state, empty_init, "Texas Instruments", "Letterlogic (Germany)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/tiger/k28.cpp b/src/mame/tiger/k28.cpp
index 0c30952954d..8b8835a3b69 100644
--- a/src/mame/tiger/k28.cpp
+++ b/src/mame/tiger/k28.cpp
@@ -292,7 +292,7 @@ INPUT_PORTS_END
void k28_state::k28(machine_config &config)
{
- /* basic machine hardware */
+ // basic machine hardware
I8021(config, m_maincpu, 3.579545_MHz_XTAL);
m_maincpu->bus_out_cb().set(FUNC(k28_state::mcu_p0_w));
m_maincpu->p1_in_cb().set(FUNC(k28_state::mcu_p1_r));
@@ -305,13 +305,13 @@ void k28_state::k28(machine_config &config)
TIMER(config, "on_button").configure_generic(nullptr);
- /* video hardware */
+ // video hardware
MM5445(config, m_vfd).output_cb().set(FUNC(k28_state::vfd_output_w));
PWM_DISPLAY(config, m_display).set_size(9, 16);
m_display->set_segmask(0x1ff, 0x3fff);
config.set_default_layout(layout_k28);
- /* sound hardware */
+ // sound hardware
SPEAKER(config, "mono").front_center();
VOTRAX_SC01(config, "speech", 760000).add_route(ALL_OUTPUTS, "mono", 0.5); // measured 760kHz on its RC pin
}
diff --git a/src/mame/tiger/k28m2.cpp b/src/mame/tiger/k28m2.cpp
index 80451ff1a45..5bcb04f7fa7 100644
--- a/src/mame/tiger/k28m2.cpp
+++ b/src/mame/tiger/k28m2.cpp
@@ -7,15 +7,20 @@ Tiger Electronics K28 (model 7-232) Sold in Hong Kong, distributed in US as:
- Coleco: Talking Teacher
- Sears: Talkatron: Learning Computer
-K28 model 7-232 (HK), 1985
+1981 K28 models 7-230 and 7-231 are on different hardware, showing a different
+keyboard, VFD, and use the SC-01 speech chip. --> driver k28.cpp
+
+TODO:
+- emulate LCD
+
+-------------------------------------------------------------------------------
+
+Hardware notes:
- MCU: TMS1400 MP7324 (die label: TMS1400, MP7324, 28L 01D D000 R100)
- TMS51xx: TMS5110A
- VSM: 16KB CM62084
- LCD: SMOS SMC1112 MCU to 8*14-seg display
-1981 K28 models 7-230 and 7-231 are on different hardware, showing a different
-keyboard, VFD, and use the SC-01 speech chip. --> driver k28.cpp
-
K28 modules: (* denotes not dumped)
- Spelling I: VSM: 16KB CM62086
- Spelling II: VSM: 16KB CM62085?
@@ -29,9 +34,6 @@ K28 modules: (* denotes not dumped)
note: these won't work on the 1981 version(s)
-TODO:
-- emulate LCD
-
******************************************************************************/
#include "emu.h"
@@ -79,7 +81,6 @@ private:
optional_device m_cart;
required_ioport_array<9> m_inputs;
- void update_display(u8 old, u8 data);
u8 read_k();
void write_o(u16 data);
void write_r(u32 data);
@@ -152,11 +153,6 @@ DEVICE_IMAGE_LOAD_MEMBER(k28m2_state::cart_load)
I/O
******************************************************************************/
-void k28m2_state::update_display(u8 old, u8 data)
-{
- // ?
-}
-
void k28m2_state::write_r(u32 data)
{
// R1234: TMS5100 CTL8421
@@ -170,7 +166,7 @@ void k28m2_state::write_r(u32 data)
m_inp_mux = (m_inp_mux & 0xff) | (data << 3 & 0x100);
// R7-R10: LCD data
- update_display(m_r >> 7 & 0xf, data >> 7 & 0xf);
+ //TODO..
// R6: power-off request, on falling edge
if (~data & m_r & 0x40)