tms99xx: Introduced symbolic constants for interrupt lines. Added a

special RESET line handled by the CPU, not by the emulator core. 
tms9928a/v9938: Introduced dedicated RESET line. [Michael Zapf]
This commit is contained in:
Michael Zapf 2012-07-12 21:38:53 +00:00
parent d3764b38d2
commit 265249e1ae
6 changed files with 82 additions and 30 deletions

View File

@ -1154,7 +1154,7 @@ void tms99xx_device::execute_run()
}
}
}
} while (m_icount>0);
} while (m_icount>0 && !m_reset);
if (VERBOSE>6) LOG("tms99xx: cycles expired; will return soon.\n");
}
@ -1164,6 +1164,12 @@ void tms99xx_device::execute_run()
Interrupt input
*/
void tms99xx_device::execute_set_input(int irqline, int state)
{
if (irqline==INPUT_LINE_99XX_RESET && state==ASSERT_LINE)
{
m_reset = true;
}
else
{
if (irqline == INPUT_LINE_NMI)
{
@ -1184,6 +1190,7 @@ void tms99xx_device::execute_set_input(int irqline, int state)
}
}
}
}
/*
This can be overloaded by variants of TMS99xx.
@ -2543,7 +2550,7 @@ UINT32 tms99xx_device::execute_max_cycles() const
UINT32 tms99xx_device::execute_input_lines() const
{
return 1;
return 2;
}
// clocks to cycles, cycles to clocks = id

View File

@ -47,6 +47,22 @@
#include "emu.h"
#include "debugger.h"
/*
Define symbols for interrupt lines.
We use a separate RESET signal which is not captured by the core.
Caution: Check irqline in set_input_line of each driver using this CPU.
Values have changed. Use these symbols instead.
*/
enum
{
INPUT_LINE_99XX_RESET = 0,
INPUT_LINE_99XX_INTREQ = 1,
INPUT_LINE_99XX_INT1 = 2,
INPUT_LINE_99XX_INT4 = 3
};
enum
{
LOAD_INT = -1,

View File

@ -1118,7 +1118,7 @@ void tms9995_device::execute_run()
}
}
}
} while (m_icount>0);
} while (m_icount>0 && !m_reset);
if (VERBOSE>5) LOG("tms9995: cycles expired; will return soon.\n");
}
@ -1132,6 +1132,12 @@ void tms9995_device::execute_run()
flag[2], flag[4]
*/
void tms9995_device::execute_set_input(int irqline, int state)
{
if (irqline==INPUT_LINE_99XX_RESET && state==ASSERT_LINE)
{
m_reset = true;
}
else
{
if (irqline == INPUT_LINE_NMI)
{
@ -1140,14 +1146,14 @@ void tms9995_device::execute_set_input(int irqline, int state)
}
else
{
if (irqline == 1)
if (irqline == INPUT_LINE_99XX_INT1)
{
m_int1_active = m_flag[2] = (state==ASSERT_LINE);
if (VERBOSE>3) LOG("tms9995: Line INT1 state=%d\n", state);
}
else
{
if (irqline == 4)
if (irqline == INPUT_LINE_99XX_INT4)
{
if (VERBOSE>3) LOG("tms9995: Line INT4/EC state=%d\n", state);
if (m_flag[0]==false)
@ -1168,6 +1174,7 @@ void tms9995_device::execute_set_input(int irqline, int state)
}
}
}
}
/*
Issue a pulse on the clock line.

View File

@ -11,6 +11,22 @@
#include "emu.h"
#include "debugger.h"
/*
Define symbols for interrupt lines.
We use a separate RESET signal which is not captured by the core.
Caution: Check irqline in set_input_line of each driver using this CPU.
Values have changed. Use these symbols instead.
*/
enum
{
INPUT_LINE_99XX_RESET = 0,
INPUT_LINE_99XX_INTREQ = 1,
INPUT_LINE_99XX_INT1 = 2,
INPUT_LINE_99XX_INT4 = 3
};
enum
{
TI990_10_ID = 1,

View File

@ -107,6 +107,9 @@ public:
UINT32 screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
bitmap_ind16 &get_bitmap() { return m_tmpbmp; }
/* RESET pin */
void reset_line(int state) { if (state==ASSERT_LINE) device_reset(); }
protected:
// device-level overrides
virtual void device_config_complete();

View File

@ -96,6 +96,9 @@ public:
static void static_set_vram_size(device_t &device, UINT32 vram_size);
static void static_set_interrupt_callback(device_t &device, v99x8_interrupt_delegate callback, const char *device_name);
/* RESET pin */
void reset_line(int state) { if (state==ASSERT_LINE) device_reset(); }
protected:
const address_space_config m_space_config;
address_space* m_vram_space;