mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
ti99: Removed GROMCLK generator from wrapper
This commit is contained in:
parent
4b7752e64e
commit
535bc44330
@ -124,16 +124,7 @@ void ti99_datamux_device::read_all(address_space& space, UINT16 addr, UINT8 *val
|
|||||||
// Video
|
// Video
|
||||||
if ((addr & 0xf801)==0x8800)
|
if ((addr & 0xf801)==0x8800)
|
||||||
{
|
{
|
||||||
if (addr & 2)
|
m_video->readz(space, addr, value);
|
||||||
{
|
|
||||||
// Read VDP status
|
|
||||||
*value = m_video->register_read(space, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Read VDP RAM
|
|
||||||
*value = m_video->vram_read(space, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,15 +157,7 @@ void ti99_datamux_device::write_all(address_space& space, UINT16 addr, UINT8 val
|
|||||||
// Video
|
// Video
|
||||||
if ((addr & 0xf801)==0x8800)
|
if ((addr & 0xf801)==0x8800)
|
||||||
{
|
{
|
||||||
if (addr & 2)
|
m_video->write(space, addr, value);
|
||||||
{
|
|
||||||
// Write VDP address
|
|
||||||
m_video->register_write(space, 0, value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ // Write VDP data
|
|
||||||
m_video->vram_write(space, 0, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PEB gets all accesses
|
// PEB gets all accesses
|
||||||
@ -577,7 +560,7 @@ void ti99_datamux_device::device_reset(void)
|
|||||||
|
|
||||||
void ti99_datamux_device::device_config_complete()
|
void ti99_datamux_device::device_config_complete()
|
||||||
{
|
{
|
||||||
m_video = downcast<tms9928a_device*>(owner()->subdevice(VDP_TAG));
|
m_video = downcast<bus8z_device*>(owner()->subdevice(VIDEO_SYSTEM_TAG));
|
||||||
m_sound = downcast<sn76496_base_device*>(owner()->subdevice(TISOUNDCHIP_TAG));
|
m_sound = downcast<sn76496_base_device*>(owner()->subdevice(TISOUNDCHIP_TAG));
|
||||||
m_gromport = downcast<gromport_device*>(owner()->subdevice(GROMPORT_TAG));
|
m_gromport = downcast<gromport_device*>(owner()->subdevice(GROMPORT_TAG));
|
||||||
m_peb = downcast<peribox_device*>(owner()->subdevice(PERIBOX_TAG));
|
m_peb = downcast<peribox_device*>(owner()->subdevice(PERIBOX_TAG));
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "bus/ti99_peb/peribox.h"
|
#include "bus/ti99_peb/peribox.h"
|
||||||
#include "sound/sn76496.h"
|
#include "sound/sn76496.h"
|
||||||
#include "video/tms9928a.h"
|
#include "video/tms9928a.h"
|
||||||
|
#include "bus/ti99x/videowrp.h"
|
||||||
|
|
||||||
extern const device_type DATAMUX;
|
extern const device_type DATAMUX;
|
||||||
|
|
||||||
@ -55,7 +56,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Link to the video processor
|
// Link to the video processor
|
||||||
tms9928a_device* m_video;
|
bus8z_device* m_video;
|
||||||
|
|
||||||
// Link to the sound processor
|
// Link to the sound processor
|
||||||
sn76496_base_device* m_sound;
|
sn76496_base_device* m_sound;
|
||||||
|
@ -34,8 +34,7 @@ ti_std_video_device::ti_std_video_device(const machine_config &mconfig, const ch
|
|||||||
|
|
||||||
ti_exp_video_device::ti_exp_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
ti_exp_video_device::ti_exp_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
: ti_video_device(mconfig, V9938VIDEO, "TI99 EXP Video subsystem", tag, owner, clock, "v9938_video", __FILE__),
|
: ti_video_device(mconfig, V9938VIDEO, "TI99 EXP Video subsystem", tag, owner, clock, "v9938_video", __FILE__),
|
||||||
m_v9938(nullptr),
|
m_v9938(nullptr)
|
||||||
m_out_gromclk_cb(*this)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,13 +87,6 @@ WRITE16_MEMBER( ti_exp_video_device::write16 )
|
|||||||
m_v9938->write(space, offset, (data>>8)&0xff);
|
m_v9938->write(space, offset, (data>>8)&0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ti_exp_video_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
|
||||||
{
|
|
||||||
// Pulse it
|
|
||||||
m_out_gromclk_cb(ASSERT_LINE);
|
|
||||||
m_out_gromclk_cb(CLEAR_LINE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
@ -121,13 +113,6 @@ void ti_video_device::device_start(void)
|
|||||||
void ti_exp_video_device::device_start(void)
|
void ti_exp_video_device::device_start(void)
|
||||||
{
|
{
|
||||||
m_v9938 = static_cast<v9938_device*>(machine().device(VDP_TAG));
|
m_v9938 = static_cast<v9938_device*>(machine().device(VDP_TAG));
|
||||||
m_out_gromclk_cb.resolve();
|
|
||||||
m_gromclk_timer = timer_alloc(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ti_exp_video_device::device_reset(void)
|
|
||||||
{
|
|
||||||
if (!m_out_gromclk_cb.isnull()) m_gromclk_timer->adjust(attotime::zero, 0, attotime::from_hz(XTAL_10_738635MHz/24));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
@ -43,7 +43,6 @@ public:
|
|||||||
ti_std_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
ti_std_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
DECLARE_READ8Z_MEMBER(readz) override;
|
DECLARE_READ8Z_MEMBER(readz) override;
|
||||||
DECLARE_WRITE8_MEMBER(write) override;
|
DECLARE_WRITE8_MEMBER(write) override;
|
||||||
|
|
||||||
void reset_vdp(int state) override { m_tms9928a->reset_line(state); }
|
void reset_vdp(int state) override { m_tms9928a->reset_line(state); }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,8 +53,6 @@ class ti_exp_video_device : public ti_video_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ti_exp_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
ti_exp_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
template<class _Object> static devcb_base &set_out_gromclk_callback(device_t &device, _Object object) { return downcast<ti_exp_video_device &>(device).m_out_gromclk_cb.set_callback(object); }
|
|
||||||
|
|
||||||
DECLARE_READ8Z_MEMBER(readz) override;
|
DECLARE_READ8Z_MEMBER(readz) override;
|
||||||
DECLARE_WRITE8_MEMBER(write) override;
|
DECLARE_WRITE8_MEMBER(write) override;
|
||||||
DECLARE_READ16_MEMBER(read16);
|
DECLARE_READ16_MEMBER(read16);
|
||||||
@ -63,20 +60,12 @@ public:
|
|||||||
void reset_vdp(int state) override { m_v9938->reset_line(state); }
|
void reset_vdp(int state) override { m_v9938->reset_line(state); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_start(void) override;
|
virtual void device_start(void) override;
|
||||||
virtual void device_reset(void) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
|
||||||
v9938_device *m_v9938;
|
v9938_device *m_v9938;
|
||||||
devcb_write_line m_out_gromclk_cb; // GROMCLK line is optional; if present, pulse it by XTAL/24 rate
|
|
||||||
emu_timer *m_gromclk_timer;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MCFG_ADD_GROMCLK_CB(_devcb) \
|
|
||||||
devcb = &ti_exp_video_device::set_out_gromclk_callback(*device, DEVCB_##_devcb);
|
|
||||||
|
|
||||||
|
|
||||||
extern const device_type TI99VIDEO;
|
extern const device_type TI99VIDEO;
|
||||||
extern const device_type V9938VIDEO;
|
extern const device_type V9938VIDEO;
|
||||||
|
|
||||||
|
@ -82,8 +82,11 @@ public:
|
|||||||
DECLARE_MACHINE_START(ti99_4);
|
DECLARE_MACHINE_START(ti99_4);
|
||||||
DECLARE_MACHINE_START(ti99_4a);
|
DECLARE_MACHINE_START(ti99_4a);
|
||||||
DECLARE_MACHINE_START(ti99_4qi);
|
DECLARE_MACHINE_START(ti99_4qi);
|
||||||
|
DECLARE_MACHINE_START(ti99_4ev);
|
||||||
|
|
||||||
DECLARE_MACHINE_RESET(ti99_4);
|
DECLARE_MACHINE_RESET(ti99_4);
|
||||||
DECLARE_MACHINE_RESET(ti99_4a);
|
DECLARE_MACHINE_RESET(ti99_4a);
|
||||||
|
DECLARE_MACHINE_RESET(ti99_4ev);
|
||||||
|
|
||||||
// Processor connections with the main board
|
// Processor connections with the main board
|
||||||
DECLARE_READ8_MEMBER( cruread );
|
DECLARE_READ8_MEMBER( cruread );
|
||||||
@ -126,6 +129,9 @@ public:
|
|||||||
// Interrupt triggers
|
// Interrupt triggers
|
||||||
DECLARE_INPUT_CHANGED_MEMBER( load_interrupt );
|
DECLARE_INPUT_CHANGED_MEMBER( load_interrupt );
|
||||||
|
|
||||||
|
// Used by EVPC
|
||||||
|
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void set_keyboard_column(int number, int data);
|
void set_keyboard_column(int number, int data);
|
||||||
int m_keyboard_column;
|
int m_keyboard_column;
|
||||||
@ -154,6 +160,9 @@ private:
|
|||||||
required_device<ti_video_device> m_video;
|
required_device<ti_video_device> m_video;
|
||||||
required_device<cassette_image_device> m_cassette1;
|
required_device<cassette_image_device> m_cassette1;
|
||||||
required_device<cassette_image_device> m_cassette2;
|
required_device<cassette_image_device> m_cassette2;
|
||||||
|
|
||||||
|
// Timer for EVPC (provided by the TMS9929A, but EVPC replaces that VDP)
|
||||||
|
emu_timer *m_gromclk_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -631,6 +640,18 @@ WRITE_LINE_MEMBER( ti99_4x_state::gromclk_in )
|
|||||||
m_datamux->gromclk_in(state);
|
m_datamux->gromclk_in(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Used by the EVPC
|
||||||
|
*/
|
||||||
|
void ti99_4x_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||||
|
{
|
||||||
|
// Pulse it
|
||||||
|
if (m_datamux != nullptr)
|
||||||
|
{
|
||||||
|
gromclk_in(ASSERT_LINE);
|
||||||
|
gromclk_in(CLEAR_LINE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
@ -990,6 +1011,27 @@ MACHINE_CONFIG_END
|
|||||||
replacing the console video processor.
|
replacing the console video processor.
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
MACHINE_START_MEMBER(ti99_4x_state, ti99_4ev)
|
||||||
|
{
|
||||||
|
m_peribox->senila(CLEAR_LINE);
|
||||||
|
m_peribox->senilb(CLEAR_LINE);
|
||||||
|
m_nready_combined = 0;
|
||||||
|
m_model = MODEL_4A;
|
||||||
|
// 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
|
||||||
|
m_gromclk_timer = timer_alloc(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
MACHINE_RESET_MEMBER(ti99_4x_state, ti99_4ev)
|
||||||
|
{
|
||||||
|
m_cpu->set_ready(ASSERT_LINE);
|
||||||
|
m_cpu->set_hold(CLEAR_LINE);
|
||||||
|
m_int1 = CLEAR_LINE;
|
||||||
|
m_int2 = CLEAR_LINE;
|
||||||
|
m_int12 = CLEAR_LINE;
|
||||||
|
m_gromclk_timer->adjust(attotime::zero, 0, attotime::from_hz(XTAL_10_738635MHz/24));
|
||||||
|
}
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
|
static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
|
||||||
/* CPU */
|
/* CPU */
|
||||||
MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map)
|
MCFG_TMS99xx_ADD("maincpu", TMS9900, 3000000, memmap, cru_map)
|
||||||
@ -998,14 +1040,11 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state )
|
|||||||
MCFG_TMS99xx_CLKOUT_HANDLER( WRITELINE(ti99_4x_state, clock_out) )
|
MCFG_TMS99xx_CLKOUT_HANDLER( WRITELINE(ti99_4x_state, clock_out) )
|
||||||
MCFG_TMS99xx_DBIN_HANDLER( WRITELINE(ti99_4x_state, dbin_line) )
|
MCFG_TMS99xx_DBIN_HANDLER( WRITELINE(ti99_4x_state, dbin_line) )
|
||||||
|
|
||||||
MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4a )
|
MCFG_MACHINE_START_OVERRIDE(ti99_4x_state, ti99_4ev )
|
||||||
|
MCFG_MACHINE_RESET_OVERRIDE(ti99_4x_state, ti99_4ev )
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_DEVICE_ADD(VIDEO_SYSTEM_TAG, V9938VIDEO, 0)
|
MCFG_DEVICE_ADD(VIDEO_SYSTEM_TAG, V9938VIDEO, 0)
|
||||||
// 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
|
|
||||||
MCFG_ADD_GROMCLK_CB( WRITELINE(ti99_4x_state, gromclk_in) )
|
|
||||||
|
|
||||||
MCFG_V9938_ADD(VDP_TAG, SCREEN_TAG, 0x20000, XTAL_21_4772MHz) /* typical 9938 clock, not verified */
|
MCFG_V9938_ADD(VDP_TAG, SCREEN_TAG, 0x20000, XTAL_21_4772MHz) /* typical 9938 clock, not verified */
|
||||||
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(ti99_4x_state, video_interrupt_in))
|
MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(ti99_4x_state, video_interrupt_in))
|
||||||
MCFG_V99X8_SCREEN_ADD_NTSC(SCREEN_TAG, VDP_TAG, XTAL_21_4772MHz)
|
MCFG_V99X8_SCREEN_ADD_NTSC(SCREEN_TAG, VDP_TAG, XTAL_21_4772MHz)
|
||||||
|
Loading…
Reference in New Issue
Block a user