summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/tispeak.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/drivers/tispeak.c')
-rw-r--r--src/mess/drivers/tispeak.c148
1 files changed, 116 insertions, 32 deletions
diff --git a/src/mess/drivers/tispeak.c b/src/mess/drivers/tispeak.c
index feb6c423948..45876fa52d2 100644
--- a/src/mess/drivers/tispeak.c
+++ b/src/mess/drivers/tispeak.c
@@ -7,7 +7,6 @@
(still need to write notes here..)
Other stuff on similar hardware:
- - Language Tutor/Translator
- Touch & Tell, but it runs on a TMS1100!
- Speak & Spell Compact, Speak & Write (UK version), TMS1100? TMS0980?
- Speak & Read
@@ -21,6 +20,7 @@
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
+#include "lantutor.lh"
#include "tispeak.lh"
// The master clock is a single stage RC oscillator into TMS5100 RCOSC:
@@ -57,20 +57,25 @@ public:
int m_filament_on;
int m_power_on;
- UINT16 m_digit_state[9];
+ UINT16 m_digit_state[0x10];
void display_update();
TIMER_DEVICE_CALLBACK_MEMBER(delayed_filament_off);
+ UINT32 m_cart_max_size;
+ UINT8* m_cart_base;
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
+ DECLARE_DRIVER_INIT(snspell);
+ DECLARE_DRIVER_INIT(lantutor);
+
DECLARE_READ8_MEMBER(snspell_read_k);
DECLARE_WRITE16_MEMBER(snmath_write_o);
DECLARE_WRITE16_MEMBER(snspell_write_o);
DECLARE_WRITE16_MEMBER(snspell_write_r);
+ DECLARE_WRITE16_MEMBER(lantutor_write_r);
DECLARE_INPUT_CHANGED_MEMBER(power_button);
- DECLARE_WRITE_LINE_MEMBER(auto_power_off);
void power_off();
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
virtual void machine_reset();
virtual void machine_start();
};
@@ -87,8 +92,7 @@ DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge)
{
UINT32 size = m_cart->common_get_size("rom");
- // max size is 16KB
- if (size > 0x4000)
+ if (size > m_cart_max_size)
{
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size");
return IMAGE_INIT_FAIL;
@@ -101,6 +105,19 @@ DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge)
}
+DRIVER_INIT_MEMBER(tispeak_state, snspell)
+{
+ m_cart_max_size = 0x4000;
+ m_cart_base = memregion("tms6100")->base() + 0x8000;
+}
+
+DRIVER_INIT_MEMBER(tispeak_state, lantutor)
+{
+ m_cart_max_size = 0x10000;
+ m_cart_base = memregion("tms6100")->base();
+}
+
+
/***************************************************************************
@@ -136,12 +153,12 @@ void tispeak_state::display_update()
}
// update digit state
- for (int i = 0; i < 9; i++)
+ for (int i = 0; i < 0x10; i++)
if (m_r >> i & 1)
m_digit_state[i] = m_o;
// send to output
- for (int i = 0; i < 9; i++)
+ for (int i = 0; i < 0x10; i++)
{
// standard led14seg
output_set_digit_value(i, m_filament_on ? m_digit_state[i] & 0x3fff : 0);
@@ -178,7 +195,11 @@ READ8_MEMBER(tispeak_state::snspell_read_k)
WRITE16_MEMBER(tispeak_state::snspell_write_r)
{
// R0-R7: input mux and select digit (+R8 if the device has 9 digits)
- // R15: filament on
+ // R15: filament on (handled in display_update)
+ // R13: power-off request, on falling edge
+ if ((m_r >> 13 & 1) && !(data >> 13 & 1))
+ power_off();
+
// other bits: MCU internal use
m_r = data;
display_update();
@@ -203,13 +224,6 @@ void tispeak_state::power_off()
m_power_on = 0;
}
-WRITE_LINE_MEMBER(tispeak_state::auto_power_off)
-{
- // power-off request from the MCU, when [OFF] is pressed, also typically after a couple of minutes of idling
- if (state)
- power_off();
-}
-
// snmath specific
@@ -223,6 +237,16 @@ WRITE16_MEMBER(tispeak_state::snmath_write_o)
}
+// lantutor specific
+
+WRITE16_MEMBER(tispeak_state::lantutor_write_r)
+{
+ // same as default, except R13 is used for an extra digit
+ m_r = data;
+ display_update();
+}
+
+
/***************************************************************************
@@ -363,6 +387,36 @@ static INPUT_PORTS_START( snmath )
INPUT_PORTS_END
+static INPUT_PORTS_START( lantutor )
+ PORT_INCLUDE( snspell )
+
+ PORT_MODIFY("IN.5") // R5
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Diacritical")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Space")
+
+ PORT_MODIFY("IN.6") // R6
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("1")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME("2")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_NAME("3")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_NAME("4")
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_NAME("5")
+
+ PORT_MODIFY("IN.7") // R7
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_NAME("6")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_NAME("7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_NAME("8")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_NAME("9")
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_NAME("0")
+
+ PORT_MODIFY("IN.8") // Vss!
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_NAME("Translate")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("Learn")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("Phrase")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("Link")
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_NAME("Repeat")
+INPUT_PORTS_END
+
+
/***************************************************************************
@@ -398,10 +452,7 @@ void tispeak_state::machine_start()
astring region_tag;
memory_region *src = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
if (src)
- {
- UINT8 *dest_ptr = memregion("tms6100")->base() + 0x8000;
- memcpy(dest_ptr, src->base(), src->bytes());
- }
+ memcpy(m_cart_base, src->base(), src->bytes());
}
}
@@ -413,7 +464,6 @@ static MACHINE_CONFIG_START( snmath, tispeak_state )
MCFG_TMS1XXX_READ_K_CB(READ8(tispeak_state, snspell_read_k))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snmath_write_o))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tispeak_state, snspell_write_r))
- MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(tispeak_state, auto_power_off))
MCFG_TMS0270_READ_CTL_CB(DEVREAD8("tms5100", tms5100_device, ctl_r))
MCFG_TMS0270_WRITE_CTL_CB(DEVWRITE8("tms5100", tms5100_device, ctl_w))
@@ -451,6 +501,24 @@ static MACHINE_CONFIG_DERIVED( snspell, snmath )
MCFG_SOFTWARE_LIST_ADD("cart_list", "snspell")
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( lantutor, snmath )
+
+ /* basic machine hardware */
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o))
+ MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tispeak_state, lantutor_write_r))
+
+ MCFG_DEFAULT_LAYOUT(layout_lantutor)
+
+ /* cartridge */
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "lantutor")
+ MCFG_GENERIC_MANDATORY
+ MCFG_GENERIC_EXTENSIONS("vsm,bin")
+ MCFG_GENERIC_LOAD(tispeak_state, tispeak_cartridge)
+
+ MCFG_SOFTWARE_LIST_ADD("cart_list", "lantutor")
+MACHINE_CONFIG_END
+
/***************************************************************************
@@ -553,12 +621,11 @@ ROM_START( ladictee )
ROM_END
-
ROM_START( snmath )
ROM_REGION( 0x1000, "maincpu", 0 )
- // typed in from patent 4946391, verified with source code (mark BAD_DUMP just to be unsure)
+ // typed in from patent 4946391, verified with source code
// BTANB note: Mix It does not work at all, this is an original bug in the prototype. There are probably other minor bugs too.
- ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) )
+ ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) )
ROM_REGION( 1246, "maincpu:ipla", 0 )
ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
@@ -592,13 +659,30 @@ ROM_START( snmatha )
ROM_END
+ROM_START( lantutor )
+ ROM_REGION( 0x1000, "maincpu", 0 )
+ ROM_LOAD( "us4631748_tmc0275", 0x0000, 0x1000, CRC(22818845) SHA1(1a84f15fb18ca66b1f2bf7491d76fbc56068984d) ) // extracted visually from patent 4631748, verified with source code
+
+ ROM_REGION( 1246, "maincpu:ipla", 0 )
+ ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
+ ROM_REGION( 2127, "maincpu:mpla", 0 )
+ ROM_LOAD( "tms0270_cd2708_mpla.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // taken from cd2708, need to verify if it's same as tmc0275
+ ROM_REGION( 1246, "maincpu:opla", 0 )
+ ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, BAD_DUMP CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) // taken from snspell, mostly looks correct
+
+ ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // cartridge area
+ROM_END
+
+
+
+COMP( 1978, snspell, 0, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
+COMP( 1980, snspella, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
+COMP( 1978, snspelluk, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
+COMP( 1981, snspelluka, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // different voice actor
+COMP( 1979, snspelljp, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (Japan)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
+COMP( 1980, ladictee, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work due to missing CD2702 MCU dump, German version has CD2702 too
-COMP( 1978, snspell, 0, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
-COMP( 1980, snspella, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
-COMP( 1978, snspelluk, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
-COMP( 1981, snspelluka, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (UK set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // different voice actor
-COMP( 1979, snspelljp, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "Speak & Spell (Japan)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
-COMP( 1980, ladictee, snspell, 0, snspell, snspell, driver_device, 0, "Texas Instruments", "La Dictee Magique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work due to missing CD2702 MCU dump, German version has CD2702 too
+COMP( 1980, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
+COMP( 1986, snmatha, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
-COMP( 1980, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
-COMP( 1986, snmatha, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
+COMP( 1979, lantutor, 0, 0, lantutor, lantutor, tispeak_state, lantutor, "Texas Instruments", "Language Tutor (prototype)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )