mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
Added general read/write methods to 9928a, allowing address lines to select functions
This commit is contained in:
parent
c7aeff7d6d
commit
9eb11bdec7
@ -125,17 +125,7 @@ void ti99_datamux_device::read_all(address_space& space, UINT16 addr, UINT8 *val
|
||||
if ((addr & 0xf801)==0x8800)
|
||||
{
|
||||
// Forward to VDP unless we have an EVPC
|
||||
if (m_video != nullptr)
|
||||
{
|
||||
if ((addr & 2) != 0)
|
||||
{ // read VDP status
|
||||
*value = m_video->register_read(space, 0);
|
||||
}
|
||||
else
|
||||
{ // read VDP RAM
|
||||
*value = m_video->vram_read(space, 0);
|
||||
}
|
||||
}
|
||||
if (m_video != nullptr) *value = m_video->read(space, addr>>1); // A14 determines data or register read
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,17 +164,7 @@ void ti99_datamux_device::write_all(address_space& space, UINT16 addr, UINT8 val
|
||||
if ((addr & 0xf801)==0x8800)
|
||||
{
|
||||
// Forward to VDP unless we have an EVPC
|
||||
if (m_video != nullptr)
|
||||
{
|
||||
if ((addr & 2) != 0)
|
||||
{ // write VDP address/register
|
||||
m_video->register_write(space, 0, value);
|
||||
}
|
||||
else
|
||||
{ // write VDP data
|
||||
m_video->vram_write(space, 0, value);
|
||||
}
|
||||
}
|
||||
if (m_video != nullptr) m_video->write(space, addr>>1, value); // A14 determines data or register write
|
||||
}
|
||||
|
||||
// PEB gets all accesses
|
||||
|
@ -112,6 +112,25 @@ tms9929a_device::tms9929a_device(const machine_config &mconfig, const char *tag,
|
||||
: tms9928a_device( mconfig, TMS9929A, "TMS9929A", tag, owner, clock, true, true, true, "tms9929a", __FILE__)
|
||||
{ }
|
||||
|
||||
READ8_MEMBER( tms9928a_device::read )
|
||||
{
|
||||
UINT8 value = 0;
|
||||
|
||||
if ((offset & 1) == 0)
|
||||
value = vram_read(space, 0);
|
||||
else
|
||||
value = register_read(space, 0);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( tms9928a_device::write )
|
||||
{
|
||||
if ((offset & 1) == 0)
|
||||
vram_write(space, 0, data);
|
||||
else
|
||||
register_write(space, 0, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( tms9928a_device::vram_read )
|
||||
{
|
||||
|
@ -92,6 +92,9 @@ public:
|
||||
template<class _Object> static devcb_base &set_out_int_line_callback(device_t &device, _Object object) { return downcast<tms9928a_device &>(device).m_out_int_line_cb.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_out_gromclk_callback(device_t &device, _Object object) { return downcast<tms9928a_device &>(device).m_out_gromclk_cb.set_callback(object); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
DECLARE_READ8_MEMBER( vram_read );
|
||||
DECLARE_WRITE8_MEMBER( vram_write );
|
||||
DECLARE_READ8_MEMBER( register_read );
|
||||
|
Loading…
Reference in New Issue
Block a user