ti99: Minor config changes, simplified ti99 config, use new cassette output.

This commit is contained in:
Michael Zapf 2018-08-19 21:37:11 +02:00
parent 7a2880f8ee
commit 88f1b0c21b
10 changed files with 86 additions and 176 deletions

View File

@ -165,10 +165,10 @@ WRITE_LINE_MEMBER(ioport_attached_device::set_ready)
m_ioport->m_console_ready(state);
}
void ioport_device::configure_slot(bool withevpc)
void ioport_device::configure_slot(int flags)
{
option_reset();
if (withevpc)
if ((flags & WITH_PEB_AND_EVPC)!=0)
{
option_add("peb", TI99_PERIBOX_EV);
set_default_option("peb");

View File

@ -52,6 +52,12 @@ private:
I/O port
********************************************************************/
enum
{
PLAIN=0,
WITH_PEB_AND_EVPC
};
class ioport_device : public device_t, public device_slot_interface
{
friend class ioport_attached_device;
@ -73,7 +79,7 @@ public:
auto extint_cb() { return m_console_extint.bind(); }
auto ready_cb() { return m_console_ready.bind(); }
void configure_slot(bool withevpc);
void configure_slot(int flags);
protected:
void device_start() override;

View File

@ -95,12 +95,12 @@ void joyport_device::device_config_complete()
m_connected = dynamic_cast<device_ti99_joyport_interface*>(subdevices().first());
}
void joyport_device::configure_slot(bool withmouse, bool withhandset)
void joyport_device::configure_slot(int flags)
{
option_reset();
option_add("twinjoy", TI99_JOYSTICK);
if (withmouse) option_add("mecmouse", TI99_MECMOUSE);
if (withhandset) option_add("handset", TI99_HANDSET);
if ((flags & MOUSE)!=0) option_add("mecmouse", TI99_MECMOUSE);
if ((flags & HANDSET)!=0) option_add("handset", TI99_HANDSET);
set_default_option("twinjoy");
set_fixed(false);
}

View File

@ -24,6 +24,13 @@
namespace bus { namespace ti99 { namespace joyport {
enum
{
PLAIN=0,
MOUSE,
HANDSET
};
class joyport_device;
/********************************************************************
@ -55,7 +62,7 @@ public:
void set_interrupt(int state);
void pulse_clock();
auto int_cb() { return m_interrupt.bind(); }
void configure_slot(bool withmouse, bool withhandset);
void configure_slot(int flags);
protected:
void device_start() override;

View File

@ -25,7 +25,6 @@
#include "spchsyn.h"
#include "machine/spchrom.h"
#include "sound/wave.h"
#include "speaker.h"
#define LOG_WARN (1U<<1) // Warnings

View File

@ -773,7 +773,7 @@ MACHINE_CONFIG_START(geneve_state::geneve_common)
// User interface devices
GENEVE_KEYBOARD(config, m_keyboard, 0).int_cb().set(FUNC(geneve_state::keyboard_interrupt));
TI99_JOYPORT(config, m_joyport, 0).configure_slot(false, false);
TI99_JOYPORT(config, m_joyport, 0).configure_slot(bus::ti99::joyport::PLAIN);
TI99_COLORBUS(config, m_colorbus, 0).configure_slot();
// PFM expansion

View File

@ -145,18 +145,14 @@
ROM dumps
---------
Hard to believe, but we have access to two people with one 24K and
one 32K version, and we were able to dumps the ROMs correctly.
Although these machines are extremely rare, we were lucky to get in
contact with users of both console variants and got dumps from
their machines.
The ROMs contain a stripped-down version of TI BASIC, but without
the specific graphics subprograms. Programs written on the 99/2 should
run on the 99/4A, but the opposite is not true.
TODO
----
* Fix cassette
* Add Hexbus
Original implementation: Raphael Nabet; December 1999, 2000
Michael Zapf, May 2018
@ -474,8 +470,8 @@ void ti99_2_state::ti99_2(machine_config& config)
RAM(config, TI992_RAM_TAG).set_default_size("4096").set_default_value(0);
// Cassette drives
// There is no route from the cassette to some audio output, so we don't hear it.
// Cassette drives
// There is no route from the cassette to some audio input,
// so we don't hear it.
CASSETTE(config, "cassette", 0);
// Hexbus

View File

@ -1049,12 +1049,10 @@ void ti99_4p_state::ti99_4p_60hz(machine_config& config)
// Cassette drives
SPEAKER(config, "cass_out").front_center();
CASSETTE(config, "cassette", 0);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25);
CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "cass_out", 0.25);
// Joystick port
TI99_JOYPORT(config, m_joyport, 0).configure_slot(false, false);
TI99_JOYPORT(config, m_joyport, 0).configure_slot(bus::ti99::joyport::PLAIN);
}

View File

@ -41,7 +41,6 @@
#include "emu.h"
#include "cpu/tms9900/tms9900.h"
#include "sound/wave.h"
#include "machine/tms9901.h"
#include "imagedev/cassette.h"
@ -93,7 +92,7 @@ public:
m_joyport(*this, TI_JOYPORT_TAG),
m_datamux(*this, TI99_DATAMUX_TAG),
m_video(*this, TI_VDP_TAG),
m_cassette1(*this, "cassette"),
m_cassette1(*this, "cassette1"),
m_cassette2(*this, "cassette2"),
m_keyboard(*this, "COL%u", 0U),
m_alpha(*this, "ALPHA"),
@ -102,6 +101,7 @@ public:
{ }
// Configurations
void ti99_4_common(machine_config &config);
void ti99_4(machine_config &config);
void ti99_4_50hz(machine_config &config);
void ti99_4ev_60hz(machine_config &config);
@ -627,6 +627,8 @@ WRITE_LINE_MEMBER( ti99_4x_state::cs2_motor )
with computer sound.
We do not really need to emulate this as the tape recorder generates sound
on its own.
TODO: Emulate a pop sound when turning on/off the audio gate; there are
some few programs that generate a sound with this feature
*/
WRITE_LINE_MEMBER( ti99_4x_state::audio_gate )
{
@ -824,7 +826,6 @@ WRITE_LINE_MEMBER( ti99_4x_state::notconnected )
void ti99_4x_state::driver_start()
{
m_nready_combined = 0;
logerror("model = %d\n", m_model);
// Removing the TMS9928a requires to add a replacement for the GROMCLK.
// In the real hardware this is a circuit (REPL99x) that fits into the VDP socket
if (m_model == MODEL_4EV)
@ -851,14 +852,11 @@ void ti99_4x_state::driver_reset()
m_gromclk_timer->adjust(attotime::zero, 0, attotime::from_hz(XTAL(10'738'635)/24));
}
/**********************************************************************
TI-99/4 - predecessor of the more popular TI-99/4A
***********************************************************************/
void ti99_4x_state::ti99_4(machine_config& config)
/**********************************************************
Common configuration
**********************************************************/
void ti99_4x_state::ti99_4_common(machine_config& config)
{
m_model = MODEL_4;
// CPU
TMS9900(config, m_cpu, 3000000);
m_cpu->set_addrmap(AS_PROGRAM, &ti99_4x_state::memmap);
@ -872,7 +870,6 @@ void ti99_4x_state::ti99_4(machine_config& config)
// Main board
TMS9901(config, m_tms9901, 3000000);
m_tms9901->read_cb().set(FUNC(ti99_4x_state::read_by_9901));
m_tms9901->p_out_cb(0).set(FUNC(ti99_4x_state::handset_ack));
m_tms9901->p_out_cb(2).set(FUNC(ti99_4x_state::keyC0));
m_tms9901->p_out_cb(3).set(FUNC(ti99_4x_state::keyC1));
m_tms9901->p_out_cb(4).set(FUNC(ti99_4x_state::keyC2));
@ -882,8 +879,10 @@ void ti99_4x_state::ti99_4(machine_config& config)
m_tms9901->p_out_cb(9).set(FUNC(ti99_4x_state::cassette_output));
m_tms9901->intlevel_cb().set(FUNC(ti99_4x_state::tms9901_interrupt));
// Databus multiplexer
TI99_DATAMUX(config, m_datamux, 0).ready_cb().set(FUNC(ti99_4x_state::console_ready_dmux));
// Cartridge port (aka GROMport)
TI99_GROMPORT(config, m_gromport, 0);
m_gromport->ready_cb().set(FUNC(ti99_4x_state::console_ready_cart));
m_gromport->reset_cb().set(FUNC(ti99_4x_state::console_reset));
@ -898,25 +897,16 @@ void ti99_4x_state::ti99_4(machine_config& config)
// Software list
SOFTWARE_LIST(config, "cart_list_ti99").set_type("ti99_cart", SOFTWARE_LIST_ORIGINAL_SYSTEM);
// Input/output port
// I/O port
TI99_IOPORT(config, m_ioport, 0);
m_ioport->configure_slot(false);
m_ioport->extint_cb().set(FUNC(ti99_4x_state::extint));
m_ioport->ready_cb().set(TI99_DATAMUX_TAG, FUNC(bus::ti99::internal::datamux_device::ready_line));
// Sound hardware
SPEAKER(config, "sound_out").front_center();
sn94624_device& soundgen(SN94624(config, TI_SOUNDCHIP_TAG, 3579545/8));
soundgen.ready_cb().set(FUNC(ti99_4x_state::console_ready_sound));
soundgen.add_route(ALL_OUTPUTS, "sound_out", 0.75);
// Cassette drives
// Cassette drives. Second drive is record-only.
SPEAKER(config, "cass_out").front_center();
CASSETTE(config, "cassette", 0);
CASSETTE(config, "cassette1", 0).add_route(ALL_OUTPUTS, "cass_out", 0.25);
CASSETTE(config, "cassette2", 0);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25);
// GROM devices
tmc0430_device& grom0(TMC0430(config, TI99_GROM0_TAG, 0));
grom0.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
@ -929,10 +919,34 @@ void ti99_4x_state::ti99_4(machine_config& config)
tmc0430_device& grom2(TMC0430(config, TI99_GROM2_TAG, 0));
grom2.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
grom2.set_region_and_ident(TI99_CONSOLEGROM, 0x4000, 2);
}
// Joystick port
/**********************************************************************
TI-99/4 - predecessor of the more popular TI-99/4A
***********************************************************************/
void ti99_4x_state::ti99_4(machine_config& config)
{
// Common configuration
ti99_4_common(config);
m_model = MODEL_4;
// Main board
// Add handset interrupt to 9901
m_tms9901->p_out_cb(0).set(FUNC(ti99_4x_state::handset_ack));
// Input/output port: normal config
m_ioport->configure_slot(bus::ti99::internal::PLAIN);
// Sound hardware (not in EVPC variant)
SPEAKER(config, "sound_out").front_center();
sn94624_device& soundgen(SN94624(config, TI_SOUNDCHIP_TAG, 3579545/8));
soundgen.ready_cb().set(FUNC(ti99_4x_state::console_ready_sound));
soundgen.add_route(ALL_OUTPUTS, "sound_out", 0.75);
// Joystick port. We can connect a joyport mouse or a handset (99/4-specific).
TI99_JOYPORT(config, m_joyport, 0);
m_joyport->configure_slot(true, true);
m_joyport->configure_slot(bus::ti99::joyport::MOUSE | bus::ti99::joyport::HANDSET);
m_joyport->int_cb().set(FUNC(ti99_4x_state::handset_interrupt_in));
}
@ -988,81 +1002,25 @@ void ti99_4x_state::ti99_4_50hz(machine_config& config)
void ti99_4x_state::ti99_4a(machine_config& config)
{
// Common configuration
ti99_4_common(config);
m_model = MODEL_4A;
// CPU
TMS9900(config, m_cpu, 3000000);
m_cpu->set_addrmap(AS_PROGRAM, &ti99_4x_state::memmap);
m_cpu->set_addrmap(AS_IO, &ti99_4x_state::crumap);
m_cpu->set_addrmap(tms99xx_device::AS_SETOFFSET, &ti99_4x_state::memmap_setoffset);
m_cpu->extop_cb().set(FUNC(ti99_4x_state::external_operation));
m_cpu->intlevel_cb().set(FUNC(ti99_4x_state::interrupt_level));
m_cpu->clkout_cb().set(FUNC(ti99_4x_state::clock_out));
m_cpu->dbin_cb().set(FUNC(ti99_4x_state::dbin_line));
// Main board
TMS9901(config, m_tms9901, 3000000);
m_tms9901->read_cb().set(FUNC(ti99_4x_state::read_by_9901));
m_tms9901->p_out_cb(2).set(FUNC(ti99_4x_state::keyC0));
m_tms9901->p_out_cb(3).set(FUNC(ti99_4x_state::keyC1));
m_tms9901->p_out_cb(4).set(FUNC(ti99_4x_state::keyC2));
// Add Alphalock to 9901
m_tms9901->p_out_cb(5).set(FUNC(ti99_4x_state::alphaW));
m_tms9901->p_out_cb(6).set(FUNC(ti99_4x_state::cs1_motor));
m_tms9901->p_out_cb(7).set(FUNC(ti99_4x_state::cs2_motor));
m_tms9901->p_out_cb(8).set(FUNC(ti99_4x_state::audio_gate));
m_tms9901->p_out_cb(9).set(FUNC(ti99_4x_state::cassette_output));
m_tms9901->intlevel_cb().set(FUNC(ti99_4x_state::tms9901_interrupt));
TI99_DATAMUX(config, m_datamux, 0).ready_cb().set(FUNC(ti99_4x_state::console_ready_dmux));
// Input/output port: Normal config
m_ioport->configure_slot(bus::ti99::internal::PLAIN);
TI99_GROMPORT(config, m_gromport, 0);
m_gromport->ready_cb().set(FUNC(ti99_4x_state::console_ready_cart));
m_gromport->reset_cb().set(FUNC(ti99_4x_state::console_reset));
m_gromport->configure_slot(false);
// Scratch pad RAM 256 bytes
RAM(config, TI99_PADRAM_TAG).set_default_size("256").set_default_value(0);
// Optional RAM expansion
RAM(config, TI99_EXPRAM_TAG).set_default_size("32K").set_default_value(0);
// Software list
SOFTWARE_LIST(config, "cart_list_ti99").set_type("ti99_cart", SOFTWARE_LIST_ORIGINAL_SYSTEM);
// Input/output port
TI99_IOPORT(config, m_ioport, 0);
m_ioport->configure_slot(false);
m_ioport->extint_cb().set(FUNC(ti99_4x_state::extint));
m_ioport->ready_cb().set(TI99_DATAMUX_TAG, FUNC(bus::ti99::internal::datamux_device::ready_line));
// Sound hardware
// Sound hardware (not in EVPC variant)
SPEAKER(config, "sound_out").front_center();
sn94624_device& soundgen(SN94624(config, TI_SOUNDCHIP_TAG, 3579545/8));
soundgen.ready_cb().set(FUNC(ti99_4x_state::console_ready_sound));
soundgen.add_route(ALL_OUTPUTS, "sound_out", 0.75);
// Cassette drives
SPEAKER(config, "cass_out").front_center();
CASSETTE(config, "cassette", 0);
CASSETTE(config, "cassette2", 0);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25);
// GROM devices
tmc0430_device& grom0(TMC0430(config, TI99_GROM0_TAG, 0));
grom0.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
grom0.set_region_and_ident(TI99_CONSOLEGROM, 0x0000, 0);
tmc0430_device& grom1(TMC0430(config, TI99_GROM1_TAG, 0));
grom1.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
grom1.set_region_and_ident(TI99_CONSOLEGROM, 0x2000, 1);
tmc0430_device& grom2(TMC0430(config, TI99_GROM2_TAG, 0));
grom2.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
grom2.set_region_and_ident(TI99_CONSOLEGROM, 0x4000, 2);
// Joystick port
TI99_JOYPORT(config, m_joyport, 0).configure_slot(true, false);
TI99_JOYPORT(config, m_joyport, 0).configure_slot(bus::ti99::joyport::MOUSE);
}
/*
@ -1156,78 +1114,25 @@ void ti99_4x_state::ti99_4qi_60hz(machine_config& config)
void ti99_4x_state::ti99_4ev_60hz(machine_config& config)
{
// Common configuration
ti99_4_common(config);
m_model = MODEL_4EV;
// CPU
TMS9900(config, m_cpu, 3000000);
m_cpu->set_addrmap(AS_PROGRAM, &ti99_4x_state::memmap);
m_cpu->set_addrmap(AS_IO, &ti99_4x_state::crumap);
m_cpu->set_addrmap(tms99xx_device::AS_SETOFFSET, &ti99_4x_state::memmap_setoffset);
m_cpu->extop_cb().set(FUNC(ti99_4x_state::external_operation));
m_cpu->intlevel_cb().set(FUNC(ti99_4x_state::interrupt_level));
m_cpu->clkout_cb().set(FUNC(ti99_4x_state::clock_out));
m_cpu->dbin_cb().set(FUNC(ti99_4x_state::dbin_line));
// Main board
TMS9901(config, m_tms9901, 3000000);
m_tms9901->read_cb().set(FUNC(ti99_4x_state::read_by_9901));
m_tms9901->p_out_cb(2).set(FUNC(ti99_4x_state::keyC0));
m_tms9901->p_out_cb(3).set(FUNC(ti99_4x_state::keyC1));
m_tms9901->p_out_cb(4).set(FUNC(ti99_4x_state::keyC2));
// Add Alphalock
m_tms9901->p_out_cb(5).set(FUNC(ti99_4x_state::alphaW));
m_tms9901->p_out_cb(6).set(FUNC(ti99_4x_state::cs1_motor));
m_tms9901->p_out_cb(7).set(FUNC(ti99_4x_state::cs2_motor));
m_tms9901->p_out_cb(8).set(FUNC(ti99_4x_state::audio_gate));
m_tms9901->p_out_cb(9).set(FUNC(ti99_4x_state::cassette_output));
m_tms9901->intlevel_cb().set(FUNC(ti99_4x_state::tms9901_interrupt));
TI99_DATAMUX(config, m_datamux, 0).ready_cb().set(FUNC(ti99_4x_state::console_ready_dmux));
TI99_GROMPORT(config, m_gromport, 0);
m_gromport->ready_cb().set(FUNC(ti99_4x_state::console_ready_cart));
m_gromport->reset_cb().set(FUNC(ti99_4x_state::console_reset));
m_gromport->configure_slot(false);
// Scratch pad RAM 256 bytes
RAM(config, TI99_PADRAM_TAG).set_default_size("256").set_default_value(0);
// Optional RAM expansion
RAM(config, TI99_EXPRAM_TAG).set_default_size("32K").set_default_value(0);
// EVPC connector
// This is needed for delivering the video interrupt from the
// EVPC expansion card into the console, after the video processor has been removed
TI99_EVPCCONN(config, TI99_EVPC_CONN_TAG, 0).vdpint_cb().set(FUNC(ti99_4x_state::video_interrupt_evpc_in));
// Software list
SOFTWARE_LIST(config, "cart_list_ti99").set_type("ti99_cart", SOFTWARE_LIST_ORIGINAL_SYSTEM);
// Input/output port
TI99_IOPORT(config, m_ioport, 0);
m_ioport->configure_slot(true);
m_ioport->extint_cb().set(FUNC(ti99_4x_state::extint));
m_ioport->ready_cb().set(TI99_DATAMUX_TAG, FUNC(bus::ti99::internal::datamux_device::ready_line));
// Cassette drives
SPEAKER(config, "cass_out").front_center();
CASSETTE(config, "cassette", 0);
CASSETTE(config, "cassette2", 0);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25);
// GROM devices
tmc0430_device& grom0(TMC0430(config, TI99_GROM0_TAG, 0));
grom0.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
grom0.set_region_and_ident(TI99_CONSOLEGROM, 0x0000, 0);
tmc0430_device& grom1(TMC0430(config, TI99_GROM1_TAG, 0));
grom1.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
grom1.set_region_and_ident(TI99_CONSOLEGROM, 0x2000, 1);
tmc0430_device& grom2(TMC0430(config, TI99_GROM2_TAG, 0));
grom2.ready_cb().set(FUNC(ti99_4x_state::console_ready_grom));
grom2.set_region_and_ident(TI99_CONSOLEGROM, 0x4000, 2);
// Input/output port: Configure for EVPC
m_ioport->configure_slot(bus::ti99::internal::WITH_PEB_AND_EVPC);
// Joystick port
TI99_JOYPORT(config, m_joyport, 0).configure_slot(false, false);
// No joyport mouse, since we have a bus mouse with the EVPC
TI99_JOYPORT(config, m_joyport, 0).configure_slot(bus::ti99::joyport::PLAIN);
}
/*****************************************************************************

View File

@ -782,7 +782,7 @@ void ti99_8_state::ti99_8(machine_config& config)
// I/O port
TI99_IOPORT(config, m_ioport, 0);
m_ioport->configure_slot(false);
m_ioport->configure_slot(bus::ti99::internal::PLAIN);
m_ioport->extint_cb().set(FUNC(ti99_8_state::extint));
m_ioport->ready_cb().set(TI998_MAINBOARD_TAG, FUNC(mainboard8_device::pbox_ready));
@ -807,8 +807,7 @@ void ti99_8_state::ti99_8(machine_config& config)
// Cassette drive
SPEAKER(config, "cass_out").front_center();
CASSETTE(config, "cassette", 0);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25);
CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "cass_out", 0.25);;
// GROM library
tmc0430_device& sgrom0(TMC0430(config, TI998_SYSGROM0_TAG, 0));
@ -903,7 +902,7 @@ void ti99_8_state::ti99_8(machine_config& config)
p3grom2.set_region_and_ident(TI998_GROMLIB3_REG, 0x4000, 2);
// Joystick port
TI99_JOYPORT(config, m_joyport, 0).configure_slot(true, false);
TI99_JOYPORT(config, m_joyport, 0).configure_slot(bus::ti99::joyport::MOUSE);
}
/*