diff --git a/src/mess/drivers/cortex.c b/src/mess/drivers/cortex.c index 0ad6dde7630..2ae214ff03e 100644 --- a/src/mess/drivers/cortex.c +++ b/src/mess/drivers/cortex.c @@ -23,7 +23,7 @@ ****************************************************************************/ #include "emu.h" -#include "cpu/tms9900/tms9900l.h" +#include "cpu/tms9900/tms9995.h" #include "video/tms9928a.h" class cortex_state : public driver_device @@ -71,14 +71,18 @@ void cortex_state::machine_reset() { UINT8* ROM = memregion("maincpu")->base(); memcpy(m_p_ram, ROM, 0x6000); - m_maincpu->reset(); + static_cast(machine().device("maincpu"))->set_ready(ASSERT_LINE); } -static const struct tms9995reset_param cortex_processor_config = +static TMS9995_CONFIG( cpuconf95 ) { - 0, /* disable automatic wait state generation */ - 0, /* no IDLE callback */ - 0 /* no MP9537 mask */ + DEVCB_NULL, // external op + DEVCB_NULL, // Instruction acquisition + DEVCB_NULL, // clock out + DEVCB_NULL, // HOLDA + DEVCB_NULL, // DBIN + INTERNAL_RAM, // use internal RAM + NO_OVERFLOW_INT // The generally available versions of TMS9995 have a deactivated overflow interrupt }; static TMS9928A_INTERFACE(cortex_tms9929a_interface) @@ -90,10 +94,7 @@ static TMS9928A_INTERFACE(cortex_tms9929a_interface) static MACHINE_CONFIG_START( cortex, cortex_state ) /* basic machine hardware */ /* TMS9995 CPU @ 12.0 MHz */ - MCFG_CPU_ADD("maincpu", TMS9995L, 12000000) - MCFG_CPU_CONFIG(cortex_processor_config) - MCFG_CPU_PROGRAM_MAP(cortex_mem) - MCFG_CPU_IO_MAP(cortex_io) + MCFG_TMS99xx_ADD("maincpu", TMS9995, 12000000, cortex_mem, cortex_io, cpuconf95) /* video hardware */ MCFG_TMS9928A_ADD( "tms9928a", TMS9929A, cortex_tms9929a_interface ) diff --git a/src/mess/drivers/evmbug.c b/src/mess/drivers/evmbug.c index cad3c2f065f..9408614f19d 100644 --- a/src/mess/drivers/evmbug.c +++ b/src/mess/drivers/evmbug.c @@ -12,7 +12,7 @@ ****************************************************************************/ #include "emu.h" -#include "cpu/tms9900/tms9900l.h" +#include "cpu/tms9900/tms9995.h" #include "machine/terminal.h" class evmbug_state : public driver_device @@ -91,22 +91,25 @@ static GENERIC_TERMINAL_INTERFACE( terminal_intf ) void evmbug_state::machine_reset() { m_term_data = 0; + // Disable auto wait state generation by raising the READY line on reset + static_cast(machine().device("maincpu"))->set_ready(ASSERT_LINE); } -static const struct tms9995reset_param evmbug_processor_config = +static TMS9995_CONFIG( cpuconf95 ) { - 0, /* disable automatic wait state generation */ - 0, /* no IDLE callback */ - 0 /* no MP9537 mask */ + DEVCB_NULL, // external op + DEVCB_NULL, // Instruction acquisition + DEVCB_NULL, // clock out + DEVCB_NULL, // HOLDA + DEVCB_NULL, // DBIN + INTERNAL_RAM, // use internal RAM + NO_OVERFLOW_INT // The generally available versions of TMS9995 have a deactivated overflow interrupt }; static MACHINE_CONFIG_START( evmbug, evmbug_state ) /* basic machine hardware */ /* TMS9995 CPU @ 12.0 MHz */ - MCFG_CPU_ADD("maincpu", TMS9995L, 12000000) - MCFG_CPU_CONFIG(evmbug_processor_config) - MCFG_CPU_PROGRAM_MAP(evmbug_mem) - MCFG_CPU_IO_MAP(evmbug_io) + MCFG_TMS99xx_ADD("maincpu", TMS9995, 12000000, evmbug_mem, evmbug_io, cpuconf95) /* video hardware */ MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf) diff --git a/src/mess/drivers/ti99_2.c b/src/mess/drivers/ti99_2.c index ce15333a509..b58ee546246 100644 --- a/src/mess/drivers/ti99_2.c +++ b/src/mess/drivers/ti99_2.c @@ -79,7 +79,7 @@ would just have taken three extra tracks on the main board and a OR gate in an A #include "emu.h" #include "machine/tms9901.h" -#include "cpu/tms9900/tms9900l.h" +#include "cpu/tms9900/tms9995.h" class ti99_2_state : public driver_device @@ -131,11 +131,16 @@ void ti99_2_state::machine_reset() membank("bank1")->set_base(memregion("maincpu")->base()+0x4000); else membank("bank1")->set_base((memregion("maincpu")->base()+0x4000)); + + // Configure CPU to insert 1 wait state for each external memory access + // by lowering the READY line on reset + // TODO: Check with specs + static_cast(machine().device("maincpu"))->set_ready(CLEAR_LINE); } INTERRUPT_GEN_MEMBER(ti99_2_state::ti99_2_vblank_interrupt) { - device.execute().set_input_line(1, m_irq_state); + m_maincpu->set_input_line(INT_9995_INT1, m_irq_state); m_irq_state = (m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE; } @@ -364,26 +369,22 @@ static INPUT_PORTS_START(ti99_2) INPUT_PORTS_END -static const struct tms9995reset_param ti99_2_processor_config = +static TMS9995_CONFIG( cpuconf95 ) { -#if 0 - "maincpu",/* region for processor RAM */ - 0xf000, /* offset : this area is unused in our region, and matches the processor address */ - 0xf0fc, /* offset for the LOAD vector */ - NULL, /* no IDLE callback */ - 1, /* use fast IDLE */ -#endif - 1 /* enable automatic wait state generation */ + DEVCB_NULL, // external op + DEVCB_NULL, // Instruction acquisition + DEVCB_NULL, // clock out + DEVCB_NULL, // HOLDA + DEVCB_NULL, // DBIN + INTERNAL_RAM, // use internal RAM + NO_OVERFLOW_INT // The generally available versions of TMS9995 have a deactivated overflow interrupt }; static MACHINE_CONFIG_START( ti99_2, ti99_2_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS9995L, 10700000) - MCFG_CPU_CONFIG(ti99_2_processor_config) - MCFG_CPU_PROGRAM_MAP(ti99_2_memmap) - MCFG_CPU_IO_MAP(ti99_2_io) - MCFG_CPU_VBLANK_INT_DRIVER("screen", ti99_2_state, ti99_2_vblank_interrupt) + MCFG_TMS99xx_ADD("maincpu", TMS9995, 10700000, ti99_2_memmap, ti99_2_io, cpuconf95) + MCFG_CPU_VBLANK_INT_DRIVER("screen", ti99_2_state, ti99_2_vblank_interrupt) /* video hardware */ /*MCFG_TMS9928A( &tms9918_interface )*/ diff --git a/src/mess/drivers/tutor.c b/src/mess/drivers/tutor.c index 1c98fd9f52d..1abf30f3935 100644 --- a/src/mess/drivers/tutor.c +++ b/src/mess/drivers/tutor.c @@ -166,9 +166,14 @@ A=AMA, P=PRO, these keys don't exist, and so the games cannot be played. *********************************************************************************************************/ +#define MODERN 1 #include "emu.h" +#if MODERN +#include "cpu/tms9900/tms9995.h" +#else #include "cpu/tms9900/tms9900l.h" +#endif #include "sound/wave.h" #include "video/tms9928a.h" #include "imagedev/cartslot.h" @@ -262,6 +267,11 @@ void tutor_state::machine_reset() m_printer_data = 0; m_printer_strobe = 0; + +#if MODERN + // Disable auto wait states by lowering READY on reset + static_cast(machine().device("maincpu"))->set_ready(CLEAR_LINE); +#endif } /* @@ -405,7 +415,11 @@ WRITE8_MEMBER( tutor_state::tutor_mapper_w ) TIMER_CALLBACK_MEMBER(tutor_state::tape_interrupt_handler) { //assert(m_tape_interrupt_enable); +#if MODERN + m_maincpu->set_input_line(INT_9995_INT1, (m_cass->input() > 0.0) ? ASSERT_LINE : CLEAR_LINE); +#else m_maincpu->set_input_line(1, (m_cass->input() > 0.0) ? ASSERT_LINE : CLEAR_LINE); +#endif } /* CRU handler */ @@ -441,7 +455,11 @@ WRITE8_MEMBER( tutor_state::tutor_cassette_w ) else { m_tape_interrupt_timer->adjust(attotime::never); +#if MODERN + m_maincpu->set_input_line(INT_9995_INT1, CLEAR_LINE); +#else m_maincpu->set_input_line(1, CLEAR_LINE); +#endif } } break; @@ -729,7 +747,27 @@ static INPUT_PORTS_START(pyuutajr) PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END +//------------------------------------------------- +// sn76496_config psg_intf +//------------------------------------------------- +static const sn76496_config psg_intf = +{ + DEVCB_NULL +}; + +#if MODERN +static TMS9995_CONFIG( cpuconf95 ) +{ + DEVCB_NULL, // external op + DEVCB_NULL, // Instruction acquisition + DEVCB_NULL, // clock out + DEVCB_NULL, // HOLDA + DEVCB_NULL, // DBIN + INTERNAL_RAM, // use internal RAM + NO_OVERFLOW_INT // The generally available versions of TMS9995 have a deactivated overflow interrupt +}; +#else static const struct tms9995reset_param tutor_processor_config = { #if 0 @@ -741,26 +779,19 @@ static const struct tms9995reset_param tutor_processor_config = 1, /* enable automatic wait state generation */ NULL /* no IDLE callback */ }; - - -//------------------------------------------------- -// sn76496_config psg_intf -//------------------------------------------------- - -static const sn76496_config psg_intf = -{ - DEVCB_NULL -}; - +#endif static MACHINE_CONFIG_START( tutor, tutor_state ) /* basic machine hardware */ /* TMS9995 CPU @ 10.7 MHz */ +#if MODERN + MCFG_TMS99xx_ADD("maincpu", TMS9995, 10700000, tutor_memmap, tutor_io, cpuconf95) +#else MCFG_CPU_ADD("maincpu", TMS9995L, 10700000) MCFG_CPU_CONFIG(tutor_processor_config) MCFG_CPU_PROGRAM_MAP(tutor_memmap) MCFG_CPU_IO_MAP(tutor_io) - +#endif /* video hardware */ MCFG_TMS9928A_ADD( "tms9928a", TMS9928A, tutor_tms9928a_interface )