This commit is contained in:
couriersud 2015-01-09 17:03:34 +01:00
commit 9ea47be08f
15 changed files with 243 additions and 77 deletions

View File

@ -775,12 +775,6 @@ void tms0970_cpu_device::write_o_output(UINT8 index)
void tms0270_cpu_device::dynamic_output()
{
// R15: filament on (handled in the driver)
// R14: N/C by default
// R13: power off, trigger on falling edge
if ((m_r_prev >> 13 & 1) && !(m_r >> 13 & 1))
m_power_off(1);
// R11: TMS5100 CTL port direction (0=read from TMS5100, 1=write to TMS5100)
m_ctl_dir = m_r >> 11 & 1;
@ -1084,11 +1078,6 @@ void tms0270_cpu_device::op_tdo()
// write to output is done in dynamic_output
}
void tms0270_cpu_device::op_off()
{
// OFF was moved to R13, handled in dynamic_output
}
//-------------------------------------------------

View File

@ -320,7 +320,6 @@ protected:
virtual void op_setr();
virtual void op_rstr();
virtual void op_tdo();
virtual void op_off();
private:
// state specific to interface with TMS5100

View File

@ -1,7 +1,6 @@
/*******************************************************************
tms0980d.c
TMS0980 disassembly
TMS0980 disassembly
*******************************************************************/
@ -17,7 +16,7 @@ TMS0980 disassembly
enum e_mnemonics {
zA10AAC=0, zA6AAC, zA8AAC, zAC1AC, zACACC, zACNAA, zALEC, zALEM, zAMAAC, zBRANCH, zCALL, zCCLA,
zCLA, zCLO, zCOMC, zCOMX, zCOMX8, zCPAIZ, zCTMDYN, zDAN, zDMAN, zDMEA, zDNAA,
zDYN, zIA, zIMAC, zIYC, zKNE, zKNEZ, zLDP, zLDX, zLDX3, zLDX4, zMNEA, zMNEZ,
zDYN, zIA, zIMAC, zIYC, zKNEZ, zLDP, zLDX, zLDX3, zLDX4, zMNEA, zMNEZ,
zNDMEA, zOFF, zRBIT, zREAC, zRETN, zRSTR, zSAL, zSAMAN, zSBIT,
zSBL, zSEAC, zSETR, zTAM, zTAMACS, zTAMDYN, zTAMIY, zTAMIYC, zTAMZA,
zTAY, zTBIT, zTCMIY, zTCY, zTDO, zTKA, zTKM, zTMA,
@ -27,14 +26,14 @@ enum e_mnemonics {
enum e_addressing {
zB0=0, zB2, zI2, zI3, zI4, zB7
zB0=0, zI2, zI3, zI4, zB7
};
static const char *const s_mnemonic[] = {
"a10aac", "a6aac", "a8aac", "ac1ac", "acacc", "acnaa", "alec", "alem", "amaac", "branch", "call", "ccla",
"cla", "clo", "comc", "comx", "comx8", "cpaiz", "ctmdyn", "dan", "dman", "dmea", "dnaa",
"dyn", "ia", "imac", "iyc", "kne", "knez", "ldp", "ldx", "ldx", "ldx", "mnea", "mnez",
"dyn", "ia", "imac", "iyc", "knez", "ldp", "ldx", "ldx", "ldx", "mnea", "mnez",
"ndmea", "off", "rbit", "reac", "retn", "rstr", "sal", "saman", "sbit",
"sbl", "seac", "setr", "tam", "tamacs", "tamdyn", "tamiy", "tamiyc", "tamza",
"tay", "tbit", "tcmiy", "tcy", "tdo", "tka", "tkm", "tma",
@ -46,7 +45,7 @@ static const char *const s_mnemonic[] = {
static const UINT32 s_flags[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OVER, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, _OUT, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@ -58,10 +57,10 @@ static const UINT32 s_flags[] = {
static const UINT8 s_addressing[] = {
zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0,
zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0,
zB0, zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0,
zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0, zB0,
zB0, zB0, zB0, zB0, zI4, zB0, zB0, zB0, zB2,
zB0, zB2, zI4, zI4, zB0, zB0, zB0, zB0,
zB0, zB0, zB0, zB0, zB0, zI4, zI2, zI3, zI4, zB0, zB0,
zB0, zB0, zI2, zB0, zB0, zB0, zB0, zB0, zI2,
zB0, zB0, zB0, zB0, zI4, zB0, zB0, zB0, zB0,
zB0, zI2, zI4, zI4, zB0, zB0, zB0, zB0,
zB0, zB0, zB0, zB0, zI4, zB0, zI4,
zB0
};
@ -70,7 +69,7 @@ static const UINT8 s_addressing[] = {
static const UINT8 tms0980_mnemonic[512] = {
/* 0x000 */
zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN,
zTKA, zMNEA, zTKM, zILL, zILL, zSETR, zKNE, zILL,
zTKA, zMNEA, zTKM, zILL, zILL, zSETR, zKNEZ, zILL,
/* 0x010 */
zDMEA, zDNAA, zCCLA, zNDMEA, zILL, zAMAAC, zILL, zILL,
zCTMDYN, zXDA, zILL, zILL, zILL, zILL, zILL, zILL,
@ -234,6 +233,7 @@ static const UINT8 tms1100_mnemonic[256] = {
zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL, zCALL,
};
static const UINT8 tms0980_i2_value[4] =
{
0x00, 0x02, 0x01, 0x03
@ -246,7 +246,6 @@ static const UINT8 tms0980_i4_value[16] =
{
0x00, 0x08, 0x04, 0x0C, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x0B, 0x07, 0x0F
};
static const UINT8 tms0980_bit_value[4] = { 1, 4, 2, 8 };
CPU_DISASSEMBLE( tms0980 ) {
@ -262,11 +261,9 @@ CPU_DISASSEMBLE( tms0980 ) {
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
switch( s_addressing[instr] ) {
default:
case zB0:
break;
case zB2:
dst += sprintf( dst, "%d", tms0980_bit_value[ op & 3 ] );
break;
case zI2:
dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
break;
@ -295,11 +292,9 @@ CPU_DISASSEMBLE( tms1000 ) {
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
switch( s_addressing[instr] ) {
default:
case zB0:
break;
case zB2:
dst += sprintf( dst, "%d", tms0980_bit_value[ op & 3 ] );
break;
case zI2:
dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
break;
@ -328,11 +323,9 @@ CPU_DISASSEMBLE( tms1100 ) {
dst += sprintf( dst, "%-8s ", s_mnemonic[instr] );
switch( s_addressing[instr] ) {
default:
case zB0:
break;
case zB2:
dst += sprintf( dst, "%d", tms0980_bit_value[ op & 3 ] );
break;
case zI2:
dst += sprintf( dst, "%d", tms0980_i2_value[ op & 0x03 ] );
break;

View File

@ -4189,6 +4189,7 @@ ROM_START( crakndj2 )
ROM_LOAD( "rom6.ic6s", 0x3000000, 0x800000, CRC(6832dd9f) SHA1(753c1fc998ef4522fae3e93b64f8c442d94e3e97) )
// note: this fails the ROM test on hardware with the same CRC, so it's not a "bad dump" in the traditional sense.
// we need someone with a second cartridge to verify if this is a Sega screwup or simply a damaged chip on this cart.
// ROM test passes good with last two zero bytes replaced by 0x09 0x51
ROM_LOAD( "rom7.ic7s", 0x3800000, 0x800000, BAD_DUMP CRC(9b59e856) SHA1(7da728695cac132bb0ac59116ca400fff913f966) )
ROM_LOAD( "rom8.ic8s", 0x4000000, 0x800000, CRC(9bea71f4) SHA1(fa3734b072404612e29ed96b3bcb8d416fbe86e3) )
ROM_LOAD( "rom9.ic9s", 0x4800000, 0x800000, CRC(6029839d) SHA1(04c078e9422bf34a02f0b618a54981cd615da47d) )
@ -7371,6 +7372,18 @@ ROM_START( confmiss )
ROM_LOAD("317-0298-com.pic", 0x00, 0x4000, CRC(15971bf6) SHA1(815152ab05edb1789a26898cfd66b5a7c4a1f765) )
ROM_END
ROM_START( shaktam )
NAOMIGD_BIOS
NAOMI_DEFAULT_EEPROM
DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gds-0002b", 0, SHA1(c656497b44d5ca4743aa1a8d836af2bfa3484dd5) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
// key PIC is missing
ROM_LOAD("317-xxxx-com.pic", 0x00, 0x4000, BAD_DUMP CRC(034b7299) SHA1(45118d5f65b21ae599e3ca8e35df847135708d44) )
ROM_END
ROM_START( sprtjam )
NAOMIGD_BIOS
NAOMI_DEFAULT_EEPROM
@ -7378,11 +7391,9 @@ ROM_START( sprtjam )
DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gds-0003", 0, SHA1(79a0d8e1aa3e6f660ef4f302d9d54c1a6d2057e3) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
//PIC16C622A (317-0300-COM)
//(sticker 253-5508-0300)
//ROM_LOAD("317-0300-com.data", 0x00, 0x50, CRC(9a08413f) SHA1(d57649dcc3af578d55a93dd7a3f41da62d580f54) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
ROM_LOAD("317-0300-com.pic", 0x00, 0x4000, CRC(19a97214) SHA1(bcee1af2c16daabc7a0f723e1f9281a7c95600c6) )
ROM_END
@ -9087,12 +9098,12 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 0001 */ GAME( 2000, confmiss, naomigd, naomigd, hotd2, naomi_state, naomigd, ROT0, "Sega", "Confidential Mission (GDS-0001)", GAME_FLAGS )
// 0002 Shakatto Tambourine (GDS-0002)
// 0002A Shakatto Tambourine (Rev A) (GDS-0002A)
// 0002B Shakatto Tambourine (Rev B) (GDS-0002B)
/* 0002B */ GAME( 2000, shaktam, naomigd, naomigd, shaktamb, naomi_state, naomigd, ROT0, "Sega", "Shakatto Tambourine (Rev B) (GDS-0002B)", GAME_FLAGS )
/* 0003 */ GAME( 2000, sprtjam, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Sports Jam (GDS-0003)", GAME_FLAGS )
/* 0004 */ GAME( 2000, slashout, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Slashout (GDS-0004)", GAME_FLAGS )
/* 0005 */ GAME( 2001, spkrbtl, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Spikers Battle (GDS-0005)", GAME_FLAGS )
/* 0006 */ GAME( 2001, vstrik3, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Striker 3 Ver. 2002 (GDS-0006)", GAME_FLAGS )
// 0007 Shakatto Tambourine Motto Norinori Shinkyoku Tsuika
// 0007
/* 0008 */ GAME( 2001, monkeyba, naomigd, naomigd, monkeyba,naomi_state, naomigd, ROT0, "Sega", "Monkey Ball (GDS-0008)", GAME_FLAGS )
// 0009 Dynamic Golf / Virtua Golf
/* 0009A */ GAME( 2001, dygolf, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Dynamic Golf / Virtua Golf (Rev A) (GDS-0009A)", GAME_FLAGS )
@ -9102,11 +9113,11 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
// 0012A Virtua Fighter 4 (Rev A)
/* 0012B */ GAME( 2001, vf4b, vf4, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Fighter 4 (Rev B) (GDS-0012B)", GAME_FLAGS )
/* 0012C */ GAME( 2001, vf4c, vf4, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Fighter 4 (Rev C) (GDS-0012C)", GAME_FLAGS )
/* 0013 */ GAME( 2001, shaktmsp, naomigd, naomigd, shaktamb, naomi_state, naomigd, ROT0, "Sega", "Shakatto Tambourine 2K1 SPR (GDS-0013)", GAME_FLAGS )
/* 0013 */ GAME( 2001, shaktmsp, naomigd, naomigd, shaktamb, naomi_state, naomigd, ROT0, "Sega", "Shakatto Tambourine Motto Norinori Shinkyoku Tsuika (2K1 SPR) (GDS-0013)", GAME_FLAGS )
/* 0014 */ GAME( 2001, beachspi, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Beach Spikers (GDS-0014)", GAME_FLAGS )
// 0015 Virtua Tennis 2 / Power Smash 2
/* 0015A */ GAME( 2001, vtennis2, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Virtua Tennis 2 / Power Smash 2 (Rev A) (GDS-0015A)", GAME_FLAGS )
/* 0016 */ GAME( 2001, shaktamb, naomigd, naomigd, shaktamb, naomi_state, naomigd, ROT0, "Sega", "Shakatto Tambourine Cho Powerup Chu 2K1 AUT (GDS-0016)", GAME_FLAGS )
/* 0016 */ GAME( 2001, shaktamb, naomigd, naomigd, shaktamb, naomi_state, naomigd, ROT0, "Sega", "Shakatto Tambourine Cho Powerup Chu (2K1 AUT) (GDS-0016)", GAME_FLAGS )
/* 0017 */ GAME( 2001, keyboard, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "La Keyboard (GDS-0017)", GAME_FLAGS )
/* 0018 */ GAME( 2001, lupinsho, naomigd, naomigd, hotd2, naomi_state, naomigd, ROT0, "Sega / Eighting", "Lupin The Third - The Shooting (GDS-0018)", GAME_FLAGS )
// 0018A Lupin The Third - The Shooting (Rev A)

View File

@ -5374,11 +5374,11 @@ ninjaslt1 // 2000.11 Ninja Assault (NJA1 Ver. A)
ninjaslt2 // 2000.11 Ninja Assault (NJA2 Ver. A)
ninjaslt // 2000.11 Ninja Assault (NJA3 Ver. A)
ninjaslt4 // 2000.11 Ninja Assault (NJA4 Ver. A)
// 2000.11 Shakatto Tambourine (Rev B)
wwfroyal // 2000.11 WWF Royal Rumble
sprtjam // 2000.11.13 Sports Jam
pjustic // 2000.12 Moero Justice Gakuen / Project Justice
samba2k // 2000.12 Samba de Amigo Ver.2000
shaktam // 2000.12.28 Shakatto Tambourine (Rev B)
// 2000.?? Boat Race Ocean Heats
csmash // 2000.?? Cosmic Smash
csmasho // 2000.?? Cosmic Smash (original)
@ -5388,9 +5388,8 @@ f355twn2 // 2001.01 F355 Challenge 2 Twin
sfz3ugd // 2001.02 Street Fighter ZERO3 Upper
gundmgd // 2001.03 Mobile Suit Gundam: Federation Vs. Zeon (GD-ROM)
gundmct // 2001.03 Mobile Suit Gundam: Federation Vs. Zeon (cartridge)
shaktmsp // 2001.04.04 Shakatto Tambourine Motto Norinori Shinkyoku Tsuika (2K1 SPR)
dygolf // 2001.04.27 Dynamic Golf / Virtua Golf (Rev A)
// 2001.04 Shakatto Tambourine Motto Norinori Shinkyoku Tsuika
shaktmsp // 2001.04.04 Shakatto Tambourine 2K1 SPR
monkeyba // 2001.05 Monkey Ball
zerogu2 // 2001.05 Zero Gunner 2
cvsgd // 2001.06 Capcom Vs. SNK Millennium Fight 2000 Pro
@ -5410,7 +5409,7 @@ gundmxgd // 2001.09 Mobile Suit Gundam: Federation Vs. Zeon DX
derbyoc2 // 2001.10 Derby Owners Club II (Rev B)
inunoos // 2001.10 Inu No Osanpo / Dog Walking (Rev A)
vtenis2c // 2001.10 Virtua Tennis 2 / Power Smash 2 (cartridge)
shaktamb // 2001.10.17 Shakatto Tambourine Cho Powerup Chu 2K1 AUT
shaktamb // 2001.10.17 Shakatto Tambourine Cho Powerup Chu (2K1 AUT)
keyboard // 2001.11 La Keyboard
ikaruga // 2001.12 Ikaruga
lupinsho // 2001.12 Lupin the Third: the Shooting

View File

@ -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
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
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
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 )
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( 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 )

View File

@ -0,0 +1,46 @@
<?xml version="1.0"?>
<mamelayout version="2">
<!-- define elements -->
<!-- note: the TI Language Tutor 14seg digits look different from MAME's default, most notably the right half is wider -->
<element name="digit" defstate="0">
<led14seg><color red="0.2" green="1.0" blue="0.85" /></led14seg>
</element>
<element name="triangle_mark" defstate="0">
<text state="0" string="v"><color red="0.0235" green="0.1255" blue="0.1059" /></text>
<text state="1" string="v"><color red="0.2" green="1.0" blue="0.85" /></text>
</element>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="0" right="111" top="0" bottom="19" />
<bezel name="digit0" element="digit"><bounds x="0" y="4" width="10" height="15" /></bezel>
<bezel name="digit1" element="digit"><bounds x="11" y="4" width="10" height="15" /></bezel>
<bezel name="digit2" element="digit"><bounds x="22" y="4" width="10" height="15" /></bezel>
<bezel name="digit3" element="digit"><bounds x="33" y="4" width="10" height="15" /></bezel>
<bezel name="digit4" element="digit"><bounds x="44" y="4" width="10" height="15" /></bezel>
<bezel name="digit5" element="digit"><bounds x="55" y="4" width="10" height="15" /></bezel>
<bezel name="digit6" element="digit"><bounds x="66" y="4" width="10" height="15" /></bezel>
<bezel name="digit7" element="digit"><bounds x="77" y="4" width="10" height="15" /></bezel>
<bezel name="digit8" element="digit"><bounds x="88" y="4" width="10" height="15" /></bezel>
<bezel name="digit13" element="digit"><bounds x="99" y="4" width="10" height="15" /></bezel>
<bezel name="lamp0" element="triangle_mark"><bounds x="4" y="0" width="4" height="3" /></bezel>
<bezel name="lamp10" element="triangle_mark"><bounds x="15" y="0" width="4" height="3" /></bezel>
<bezel name="lamp20" element="triangle_mark"><bounds x="26" y="0" width="4" height="3" /></bezel>
<bezel name="lamp30" element="triangle_mark"><bounds x="37" y="0" width="4" height="3" /></bezel>
<bezel name="lamp40" element="triangle_mark"><bounds x="48" y="0" width="4" height="3" /></bezel>
<bezel name="lamp50" element="triangle_mark"><bounds x="59" y="0" width="4" height="3" /></bezel>
<bezel name="lamp60" element="triangle_mark"><bounds x="70" y="0" width="4" height="3" /></bezel>
<bezel name="lamp70" element="triangle_mark"><bounds x="81" y="0" width="4" height="3" /></bezel>
<bezel name="lamp80" element="triangle_mark"><bounds x="92" y="0" width="4" height="3" /></bezel>
<bezel name="lamp130" element="triangle_mark"><bounds x="103" y="0" width="4" height="3" /></bezel>
</view>
</mamelayout>

View File

@ -1073,6 +1073,7 @@ snspelljp
ladictee
snmath
snmatha
lantutor
// Texas Instruments Calculators
tisr16 // 1974 SR-16

View File

@ -2184,7 +2184,8 @@ $(MESS_DRIVERS)/ticalc1x.o: $(MESS_LAYOUT)/ti1270.lh \
$(MESS_LAYOUT)/ti30.lh \
$(MESS_LAYOUT)/tisr16.lh \
$(MESS_LAYOUT)/wizatron.lh
$(MESS_DRIVERS)/tispeak.o: $(MESS_LAYOUT)/tispeak.lh
$(MESS_DRIVERS)/tispeak.o: $(MESS_LAYOUT)/lantutor.lh \
$(MESS_LAYOUT)/tispeak.lh
$(MESS_DRIVERS)/tk80.o: $(MESS_LAYOUT)/tk80.lh
$(MESS_DRIVERS)/tm990189.o: $(MESS_LAYOUT)/tm990189.lh \
$(MESS_LAYOUT)/tm990189v.lh

View File

@ -7,7 +7,9 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#ifndef _MSC_VER
#include <unistd.h>
#endif
// MAME headers
#include "osdlib.h"

View File

@ -91,6 +91,8 @@ osd_scalable_lock *osd_scalable_lock_alloc(void)
osd_scalable_lock *lock;
lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
if (lock == NULL)
return NULL;
memset(lock, 0, sizeof(*lock));
lock->slot[0].haslock = TRUE;
@ -208,6 +210,8 @@ osd_lock *osd_lock_alloc(void)
osd_lock *lock;
lock = (osd_lock *)calloc(1, sizeof(osd_lock));
if (lock == NULL)
return NULL;
lock->holder = 0;
lock->count = 0;
@ -347,6 +351,8 @@ osd_event *osd_event_alloc(int manualreset, int initialstate)
pthread_mutexattr_t mtxattr;
ev = (osd_event *)calloc(1, sizeof(osd_event));
if (ev == NULL)
return NULL;
pthread_mutexattr_init(&mtxattr);
pthread_mutex_init(&ev->mutex, &mtxattr);
@ -472,6 +478,8 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
pthread_attr_t attr;
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
if (thread == NULL)
return NULL;
pthread_attr_init(&attr);
#ifndef SDLMAME_HAIKU
pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);

View File

@ -80,6 +80,8 @@ osd_scalable_lock *osd_scalable_lock_alloc(void)
osd_scalable_lock *lock;
lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
if (lock == NULL)
return NULL;
memset(lock, 0, sizeof(*lock));
lock->slot[0].haslock = TRUE;
@ -197,6 +199,8 @@ osd_lock *osd_lock_alloc(void)
osd_lock *lock;
lock = (osd_lock *)calloc(1, sizeof(osd_lock));
if (lock == NULL)
return NULL;
lock->holder = 0;
lock->count = 0;
@ -335,6 +339,8 @@ osd_event *osd_event_alloc(int manualreset, int initialstate)
osd_event *ev;
ev = (osd_event *)calloc(1, sizeof(osd_event));
if (ev == NULL)
return NULL;
DosCreateMutexSem(NULL, &ev->hmtx, 0, FALSE);
DosCreateEventSem(NULL, &ev->hev, 0, initialstate);
@ -422,6 +428,8 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
osd_thread *thread;
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
if (thread == NULL)
return NULL;
thread->callback = callback;
thread->param = cbparam;
thread->thread = _beginthread(worker_thread_entry, NULL, 65535, thread);

View File

@ -67,6 +67,8 @@ osd_scalable_lock *osd_scalable_lock_alloc(void)
osd_scalable_lock *lock;
lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
if (lock == NULL)
return NULL;
lock->mutex = SDL_CreateMutex();
return lock;
@ -100,6 +102,8 @@ osd_lock *osd_lock_alloc(void)
hidden_mutex_t *mutex;
mutex = (hidden_mutex_t *)calloc(1, sizeof(hidden_mutex_t));
if (mutex == NULL)
return NULL;
mutex->id = SDL_CreateMutex();
@ -191,6 +195,8 @@ osd_event *osd_event_alloc(int manualreset, int initialstate)
osd_event *ev;
ev = (osd_event *)calloc(1, sizeof(osd_event));
if (ev == NULL)
return NULL;
ev->mutex = SDL_CreateMutex();
ev->cond = SDL_CreateCond();
@ -315,6 +321,8 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
osd_thread *thread;
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
if (thread == NULL)
return NULL;
thread->callback = callback;
thread->param = cbparam;
#ifdef SDLMAME_SDL2

View File

@ -73,6 +73,8 @@ osd_scalable_lock *osd_scalable_lock_alloc(void)
osd_scalable_lock *lock;
lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
if (lock == NULL)
return NULL;
lock->lock = osd_lock_alloc();
return lock;
@ -108,6 +110,8 @@ osd_lock *osd_lock_alloc(void)
pthread_mutexattr_t mtxattr;
mutex = (hidden_mutex_t *)calloc(1, sizeof(hidden_mutex_t));
if (mutex == NULL)
return NULL;
pthread_mutexattr_init(&mtxattr);
pthread_mutexattr_settype(&mtxattr, PTHREAD_MUTEX_RECURSIVE);
@ -182,6 +186,8 @@ osd_event *osd_event_alloc(int manualreset, int initialstate)
pthread_mutexattr_t mtxattr;
ev = (osd_event *)calloc(1, sizeof(osd_event));
if (ev == NULL)
return NULL;
pthread_mutexattr_init(&mtxattr);
pthread_mutex_init(&ev->mutex, &mtxattr);
@ -307,6 +313,8 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
pthread_attr_t attr;
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
if (thread == NULL)
return NULL;
pthread_attr_init(&attr);
pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
if ( pthread_create(&thread->thread, &attr, callback, cbparam) != 0 )

View File

@ -271,9 +271,16 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
uintptr_t handle;
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
if (thread == NULL)
return NULL;
thread->callback = callback;
thread->param = cbparam;
handle = _beginthreadex(NULL, 0, worker_thread_entry, thread, 0, NULL);
if (handle == 0)
{
free(thread);
return NULL;
}
thread->handle = (HANDLE) handle;
return thread;
}
@ -320,6 +327,8 @@ osd_scalable_lock *osd_scalable_lock_alloc(void)
osd_scalable_lock *lock;
lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
if (lock == NULL)
return NULL;
memset(lock, 0, sizeof(*lock));
#if USE_SCALABLE_LOCKS