mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
added cartslot
This commit is contained in:
parent
02027ddfcc
commit
d3767f4c10
19
hash/snspell.xml
Normal file
19
hash/snspell.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
|
||||
|
||||
<softwarelist name="snspell" description="Speak & Spell modules">
|
||||
|
||||
|
||||
<software name="vpower">
|
||||
<description>Vowel Power</description>
|
||||
<year>1978</year>
|
||||
<publisher>Texas Instruments</publisher>
|
||||
<info name="serial" value="CD2302"/>
|
||||
<part name="cart" interface="snspell">
|
||||
<dataarea name="rom" size="0x4000">
|
||||
<rom name="cd2302.vsm" size="0x4000" crc="e4135cff" sha1="eab92188fb19545f677ede926c2c0b6af26b7e25" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
@ -161,6 +161,7 @@ const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP,
|
||||
// - 64-term microinstructions PLA between the RAM and ROM, supporting 20 microinstructions plus optional separate lines for custom opcode handling
|
||||
// - 48-term output PLA above the RAM (rotate opla 90 degrees)
|
||||
const device_type TMS0270 = &device_creator<tms0270_cpu_device>; // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O)
|
||||
// newer TMS0270 chips (eg. Speak & Math) have 42 pins
|
||||
// TMS0260 is similar? except opla is 32 instead of 48 terms
|
||||
|
||||
|
||||
|
@ -10,9 +10,18 @@
|
||||
#include "cpu/tms0980/tms0980.h"
|
||||
#include "sound/tms5110.h"
|
||||
#include "machine/tms6100.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
#include "tispeak.lh"
|
||||
|
||||
// The master clock is a single stage RC oscillator into TMS5100 RCOSC:
|
||||
// C is 68pf, R is a 50kohm trimpot wich is set to 33.6kohm. CPUCLK is this/2, ROMCLK is this/4.
|
||||
// The osc freq curve is unknown. Let's assume it is set to the default frequency,
|
||||
// which is 640kHz according to the TMS5100 documentation.
|
||||
|
||||
#define MASTER_CLOCK (640000)
|
||||
|
||||
|
||||
class tispeak_state : public driver_device
|
||||
{
|
||||
@ -22,6 +31,7 @@ public:
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_tms5100(*this, "tms5100"),
|
||||
m_tms6100(*this, "tms6100"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_filoff_timer(*this, "filoff"),
|
||||
m_button_matrix(*this, "IN")
|
||||
{ }
|
||||
@ -29,6 +39,7 @@ public:
|
||||
required_device<tms0270_cpu_device> m_maincpu;
|
||||
required_device<tms5100_device> m_tms5100;
|
||||
required_device<tms6100_device> m_tms6100;
|
||||
optional_device<generic_slot_device> m_cart;
|
||||
required_device<timer_device> m_filoff_timer;
|
||||
required_ioport_array<9> m_button_matrix;
|
||||
|
||||
@ -50,12 +61,38 @@ public:
|
||||
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();
|
||||
};
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
File Handling
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge)
|
||||
{
|
||||
UINT32 size = m_cart->common_get_size("rom");
|
||||
|
||||
// max size is 16KB
|
||||
if (size > 0x4000)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
|
||||
m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
VFD Display
|
||||
@ -188,12 +225,12 @@ INPUT_CHANGED_MEMBER(tispeak_state::power_button)
|
||||
{
|
||||
int on = (int)(FPTR)param;
|
||||
|
||||
if (on)
|
||||
if (on && !m_power_on)
|
||||
{
|
||||
m_power_on = 1;
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
else if (m_power_on)
|
||||
else if (!on && m_power_on)
|
||||
power_off();
|
||||
}
|
||||
|
||||
@ -345,15 +382,24 @@ void tispeak_state::machine_start()
|
||||
save_item(NAME(m_o));
|
||||
save_item(NAME(m_filament_on));
|
||||
save_item(NAME(m_power_on));
|
||||
|
||||
// init cartridge
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( snspell, tispeak_state )
|
||||
static MACHINE_CONFIG_START( snmath, tispeak_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", TMS0270, XTAL_640kHz/2)
|
||||
MCFG_CPU_ADD("maincpu", TMS0270, MASTER_CLOCK/2)
|
||||
MCFG_TMS1XXX_READ_K_CB(READ8(tispeak_state, snspell_read_k))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o))
|
||||
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))
|
||||
|
||||
@ -367,10 +413,10 @@ static MACHINE_CONFIG_START( snspell, tispeak_state )
|
||||
/* no video! */
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_DEVICE_ADD("tms6100", TMS6100, 0)
|
||||
MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("tms5100", TMS5100, XTAL_640kHz)
|
||||
MCFG_SOUND_ADD("tms5100", TMS5100, MASTER_CLOCK)
|
||||
MCFG_TMS5110_M0_CB(DEVWRITELINE("tms6100", tms6100_device, tms6100_m0_w))
|
||||
MCFG_TMS5110_M1_CB(DEVWRITELINE("tms6100", tms6100_device, tms6100_m1_w))
|
||||
MCFG_TMS5110_ADDR_CB(DEVWRITE8("tms6100", tms6100_device, tms6100_addr_w))
|
||||
@ -379,11 +425,18 @@ static MACHINE_CONFIG_START( snspell, tispeak_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( snmath, snspell )
|
||||
static MACHINE_CONFIG_DERIVED( snspell, snmath )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_MODIFY("maincpu")
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snmath_write_o))
|
||||
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, snspell_write_o))
|
||||
|
||||
/* cartridge */
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "snspell")
|
||||
MCFG_GENERIC_EXTENSIONS("vsm")
|
||||
MCFG_GENERIC_LOAD(tispeak_state, tispeak_cartridge)
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "snspell")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -405,14 +458,16 @@ ROM_START( snspell )
|
||||
ROM_REGION( 1246, "maincpu:opla", 0 )
|
||||
ROM_LOAD( "tms0270_tmc0271_opla.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) )
|
||||
|
||||
ROM_REGION( 0x8000, "tms6100", 0 )
|
||||
ROM_REGION( 0xc000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge
|
||||
ROM_LOAD( "tmc0351.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) )
|
||||
ROM_LOAD( "tmc0352.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( snmath )
|
||||
ROM_REGION( 0x1000, "maincpu", 0 )
|
||||
ROM_LOAD( "us4946391_t2074", 0x0000, 0x1000, BAD_DUMP CRC(011f0c2d) SHA1(d2e14d72e03ca864abd51da78ffb71a9da82f624) ) // 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 (mark BAD_DUMP just to be unsure)
|
||||
// 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_REGION( 1246, "maincpu:ipla", 0 )
|
||||
ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) )
|
||||
|
Loading…
Reference in New Issue
Block a user