Add support for M58819 'VSM-emulator', fixes speech in Radar Scope TRS01 set. [Lord Nightmare]

This commit is contained in:
Lord-Nightmare 2015-08-13 17:58:43 -04:00
parent 4b47b71f22
commit a27a536928
2 changed files with 18 additions and 8 deletions

View File

@ -88,6 +88,11 @@
#define TMS6100_READ_PENDING 0x01
#define TMS6100_NEXT_READ_IS_DUMMY 0x02
/* Variants */
#define TMS6110_IS_TMS6100 (1)
#define TMS6110_IS_M58819 (2)
const device_type TMS6100 = &device_creator<tms6100_device>;
@ -136,15 +141,15 @@ void tms6100_device::device_start()
save_item(NAME(m_m0));
save_item(NAME(m_m1));
save_item(NAME(m_state));
//save_item(NAME(m_variant));
//tms6100_set_variant(tms, TMS6110_IS_TMS6100);
save_item(NAME(m_variant));
set_variant(TMS6110_IS_TMS6100);
}
void m58819_device::device_start()
{
tms6100_device::device_start();
//tms6100_set_variant(tms, TMS6110_IS_M58819);
set_variant(TMS6110_IS_M58819);
}
//-------------------------------------------------
@ -165,6 +170,11 @@ void tms6100_device::device_reset()
m_data = 0;
}
void tms6100_device::set_variant(int variant)
{
m_variant = variant;
}
WRITE_LINE_MEMBER(tms6100_device::tms6100_m0_w)
{
if (state != m_m0)
@ -199,15 +209,14 @@ WRITE_LINE_MEMBER(tms6100_device::tms6100_romclock_w)
else
{
/* read bit at address */
/* if (m_variant == TMS6110_IS_M58819)
if (m_variant == TMS6110_IS_M58819)
{
m_data = (m_rom[m_address >> 3] >> (7-(m_address & 0x07))) & 1;
}
else // m_variant == (TMS6110_IS_TMS6100 || TMS6110_IS_TMS6125)
{
*/
m_data = (m_rom[m_address >> 3] >> (m_address & 0x07)) & 1;
/* } */
m_data = (m_rom[m_address >> 3] >> (m_address & 0x07)) & 1;
}
m_address++;
}
m_state &= ~TMS6100_READ_PENDING;

View File

@ -25,6 +25,7 @@ protected:
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
void set_variant(int variant);
private:
// internal state
required_region_ptr<UINT8> m_rom;
@ -37,7 +38,7 @@ private:
UINT8 m_tms_clock;
UINT8 m_data;
UINT8 m_state;
//UINT8 m_variant;
UINT8 m_variant;
};