summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/tms34010/tms34010.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/tms34010/tms34010.cpp')
-rw-r--r--src/devices/cpu/tms34010/tms34010.cpp220
1 files changed, 110 insertions, 110 deletions
diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp
index c2e67ccee7c..7cea0c14032 100644
--- a/src/devices/cpu/tms34010/tms34010.cpp
+++ b/src/devices/cpu/tms34010/tms34010.cpp
@@ -33,7 +33,7 @@ const device_type TMS34020 = &device_creator<tms34020_device>;
GLOBAL VARIABLES
***************************************************************************/
-tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname)
+tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
, device_video_interface(mconfig, *this)
, m_program_config("program", ENDIANNESS_LITTLE, 16, 32, 3), m_pc(0), m_ppc(0), m_st(0), m_pixel_write(nullptr), m_pixel_read(nullptr), m_raster_op(nullptr), m_pixel_op(nullptr), m_pixel_op_timing(0), m_convsp(0), m_convdp(0), m_convmp(0), m_gfxcycles(0), m_pixelshift(0), m_is_34020(0), m_reset_deferred(false)
@@ -45,14 +45,14 @@ tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type
}
-tms34010_device::tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+tms34010_device::tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: tms340x0_device(mconfig, TMS34010, "TMS34010", tag, owner, clock, "tms34010")
{
m_is_34020 = 0;
}
-tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: tms340x0_device(mconfig, TMS34020, "TMS34020", tag, owner, clock, "tms34020")
{
m_is_34020 = 1;
@@ -108,7 +108,7 @@ tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag,
#define SKIP_LONG() (m_pc += (4 << 3))
#define PARAM_K(O) (((O) >> 5) & 0x1f)
#define PARAM_N(O) ((O) & 0x1f)
-#define PARAM_REL8(O) ((INT8)(O))
+#define PARAM_REL8(O) ((int8_t)(O))
/* memory I/O */
#define WFIELD0(a,b) (this->*s_wfield_functions[FW(0)])(a,b)
@@ -156,7 +156,7 @@ tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag,
***************************************************************************/
/* Break up Status Register into indiviual flags */
-inline void tms340x0_device::SET_ST(UINT32 st)
+inline void tms340x0_device::SET_ST(uint32_t st)
{
m_st = st;
/* interrupts might have been enabled, check it */
@@ -170,74 +170,74 @@ inline void tms340x0_device::RESET_ST()
}
/* shortcuts for reading opcodes */
-inline UINT32 tms340x0_device::ROPCODE()
+inline uint32_t tms340x0_device::ROPCODE()
{
- UINT32 pc = TOBYTE(m_pc);
+ uint32_t pc = TOBYTE(m_pc);
m_pc += 2 << 3;
return m_direct->read_word(pc);
}
-inline INT16 tms340x0_device::PARAM_WORD()
+inline int16_t tms340x0_device::PARAM_WORD()
{
- UINT32 pc = TOBYTE(m_pc);
+ uint32_t pc = TOBYTE(m_pc);
m_pc += 2 << 3;
return m_direct->read_word(pc);
}
-inline INT32 tms340x0_device::PARAM_LONG()
+inline int32_t tms340x0_device::PARAM_LONG()
{
- UINT32 pc = TOBYTE(m_pc);
+ uint32_t pc = TOBYTE(m_pc);
m_pc += 4 << 3;
- return (UINT16)m_direct->read_word(pc) | (m_direct->read_word(pc + 2) << 16);
+ return (uint16_t)m_direct->read_word(pc) | (m_direct->read_word(pc + 2) << 16);
}
-inline INT16 tms340x0_device::PARAM_WORD_NO_INC()
+inline int16_t tms340x0_device::PARAM_WORD_NO_INC()
{
return m_direct->read_word(TOBYTE(m_pc));
}
-inline INT32 tms340x0_device::PARAM_LONG_NO_INC()
+inline int32_t tms340x0_device::PARAM_LONG_NO_INC()
{
- UINT32 pc = TOBYTE(m_pc);
- return (UINT16)m_direct->read_word(pc) | (m_direct->read_word(pc + 2) << 16);
+ uint32_t pc = TOBYTE(m_pc);
+ return (uint16_t)m_direct->read_word(pc) | (m_direct->read_word(pc + 2) << 16);
}
/* read memory byte */
-inline UINT32 tms340x0_device::RBYTE(offs_t offset)
+inline uint32_t tms340x0_device::RBYTE(offs_t offset)
{
- UINT32 ret;
+ uint32_t ret;
RFIELDMAC_8();
return ret;
}
/* write memory byte */
-inline void tms340x0_device::WBYTE(offs_t offset, UINT32 data)
+inline void tms340x0_device::WBYTE(offs_t offset, uint32_t data)
{
WFIELDMAC_8();
}
/* read memory long */
-inline UINT32 tms340x0_device::RLONG(offs_t offset)
+inline uint32_t tms340x0_device::RLONG(offs_t offset)
{
RFIELDMAC_32();
}
/* write memory long */
-inline void tms340x0_device::WLONG(offs_t offset, UINT32 data)
+inline void tms340x0_device::WLONG(offs_t offset, uint32_t data)
{
WFIELDMAC_32();
}
/* pushes/pops a value from the stack */
-inline void tms340x0_device::PUSH(UINT32 data)
+inline void tms340x0_device::PUSH(uint32_t data)
{
SP() -= 0x20;
WLONG(SP(), data);
}
-inline INT32 tms340x0_device::POP()
+inline int32_t tms340x0_device::POP()
{
- INT32 ret = RLONG(SP());
+ int32_t ret = RLONG(SP());
SP() += 0x20;
return ret;
}
@@ -252,23 +252,23 @@ inline INT32 tms340x0_device::POP()
/* TODO: Plane masking */ \
return (TMS34010_RDMEM_WORD(TOBYTE(offset & 0xfffffff0)) >> (offset & m1)) & m2;
-UINT32 tms340x0_device::read_pixel_1(offs_t offset) { RP(0x0f,0x01) }
-UINT32 tms340x0_device::read_pixel_2(offs_t offset) { RP(0x0e,0x03) }
-UINT32 tms340x0_device::read_pixel_4(offs_t offset) { RP(0x0c,0x0f) }
-UINT32 tms340x0_device::read_pixel_8(offs_t offset) { RP(0x08,0xff) }
-UINT32 tms340x0_device::read_pixel_16(offs_t offset)
+uint32_t tms340x0_device::read_pixel_1(offs_t offset) { RP(0x0f,0x01) }
+uint32_t tms340x0_device::read_pixel_2(offs_t offset) { RP(0x0e,0x03) }
+uint32_t tms340x0_device::read_pixel_4(offs_t offset) { RP(0x0c,0x0f) }
+uint32_t tms340x0_device::read_pixel_8(offs_t offset) { RP(0x08,0xff) }
+uint32_t tms340x0_device::read_pixel_16(offs_t offset)
{
/* TODO: Plane masking */
return TMS34010_RDMEM_WORD(TOBYTE(offset & 0xfffffff0));
}
-UINT32 tms340x0_device::read_pixel_32(offs_t offset)
+uint32_t tms340x0_device::read_pixel_32(offs_t offset)
{
/* TODO: Plane masking */
return TMS34010_RDMEM_DWORD(TOBYTE(offset & 0xffffffe0));
}
/* Shift register read */
-UINT32 tms340x0_device::read_pixel_shiftreg(offs_t offset)
+uint32_t tms340x0_device::read_pixel_shiftreg(offs_t offset)
{
if (!m_to_shiftreg_cb.isnull())
m_to_shiftreg_cb(*m_program, offset, &m_shiftreg[0]);
@@ -285,9 +285,9 @@ UINT32 tms340x0_device::read_pixel_shiftreg(offs_t offset)
/* No Raster Op + No Transparency */
#define WP(m1,m2) \
- UINT32 a = TOBYTE(offset & 0xfffffff0); \
- UINT32 pix = TMS34010_RDMEM_WORD(a); \
- UINT32 shiftcount = offset & m1; \
+ uint32_t a = TOBYTE(offset & 0xfffffff0); \
+ uint32_t pix = TMS34010_RDMEM_WORD(a); \
+ uint32_t shiftcount = offset & m1; \
\
/* TODO: plane masking */ \
data &= m2; \
@@ -300,9 +300,9 @@ UINT32 tms340x0_device::read_pixel_shiftreg(offs_t offset)
data &= m2; \
if (data) \
{ \
- UINT32 a = TOBYTE(offset & 0xfffffff0); \
- UINT32 pix = TMS34010_RDMEM_WORD(a); \
- UINT32 shiftcount = offset & m1; \
+ uint32_t a = TOBYTE(offset & 0xfffffff0); \
+ uint32_t pix = TMS34010_RDMEM_WORD(a); \
+ uint32_t shiftcount = offset & m1; \
\
/* TODO: plane masking */ \
pix = (pix & ~(m2 << shiftcount)) | (data << shiftcount); \
@@ -310,9 +310,9 @@ UINT32 tms340x0_device::read_pixel_shiftreg(offs_t offset)
}
/* Raster Op + No Transparency */
#define WP_R(m1,m2) \
- UINT32 a = TOBYTE(offset & 0xfffffff0); \
- UINT32 pix = TMS34010_RDMEM_WORD(a); \
- UINT32 shiftcount = offset & m1; \
+ uint32_t a = TOBYTE(offset & 0xfffffff0); \
+ uint32_t pix = TMS34010_RDMEM_WORD(a); \
+ uint32_t shiftcount = offset & m1; \
\
/* TODO: plane masking */ \
data = (this->*m_raster_op)(data & m2, (pix >> shiftcount) & m2) & m2; \
@@ -321,9 +321,9 @@ UINT32 tms340x0_device::read_pixel_shiftreg(offs_t offset)
/* Raster Op + Transparency */
#define WP_R_T(m1,m2) \
- UINT32 a = TOBYTE(offset & 0xfffffff0); \
- UINT32 pix = TMS34010_RDMEM_WORD(a); \
- UINT32 shiftcount = offset & m1; \
+ uint32_t a = TOBYTE(offset & 0xfffffff0); \
+ uint32_t pix = TMS34010_RDMEM_WORD(a); \
+ uint32_t shiftcount = offset & m1; \
\
/* TODO: plane masking */ \
data = (this->*m_raster_op)(data & m2, (pix >> shiftcount) & m2) & m2; \
@@ -334,33 +334,33 @@ UINT32 tms340x0_device::read_pixel_shiftreg(offs_t offset)
}
/* No Raster Op + No Transparency */
-void tms340x0_device::write_pixel_1(offs_t offset, UINT32 data) { WP(0x0f, 0x01); }
-void tms340x0_device::write_pixel_2(offs_t offset, UINT32 data) { WP(0x0e, 0x03); }
-void tms340x0_device::write_pixel_4(offs_t offset, UINT32 data) { WP(0x0c, 0x0f); }
-void tms340x0_device::write_pixel_8(offs_t offset, UINT32 data) { WP(0x08, 0xff); }
-void tms340x0_device::write_pixel_16(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_1(offs_t offset, uint32_t data) { WP(0x0f, 0x01); }
+void tms340x0_device::write_pixel_2(offs_t offset, uint32_t data) { WP(0x0e, 0x03); }
+void tms340x0_device::write_pixel_4(offs_t offset, uint32_t data) { WP(0x0c, 0x0f); }
+void tms340x0_device::write_pixel_8(offs_t offset, uint32_t data) { WP(0x08, 0xff); }
+void tms340x0_device::write_pixel_16(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
TMS34010_WRMEM_WORD(TOBYTE(offset & 0xfffffff0), data);
}
-void tms340x0_device::write_pixel_32(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_32(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
TMS34010_WRMEM_WORD(TOBYTE(offset & 0xffffffe0), data);
}
/* No Raster Op + Transparency */
-void tms340x0_device::write_pixel_t_1(offs_t offset, UINT32 data) { WP_T(0x0f, 0x01); }
-void tms340x0_device::write_pixel_t_2(offs_t offset, UINT32 data) { WP_T(0x0e, 0x03); }
-void tms340x0_device::write_pixel_t_4(offs_t offset, UINT32 data) { WP_T(0x0c, 0x0f); }
-void tms340x0_device::write_pixel_t_8(offs_t offset, UINT32 data) { WP_T(0x08, 0xff); }
-void tms340x0_device::write_pixel_t_16(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_t_1(offs_t offset, uint32_t data) { WP_T(0x0f, 0x01); }
+void tms340x0_device::write_pixel_t_2(offs_t offset, uint32_t data) { WP_T(0x0e, 0x03); }
+void tms340x0_device::write_pixel_t_4(offs_t offset, uint32_t data) { WP_T(0x0c, 0x0f); }
+void tms340x0_device::write_pixel_t_8(offs_t offset, uint32_t data) { WP_T(0x08, 0xff); }
+void tms340x0_device::write_pixel_t_16(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
if (data)
TMS34010_WRMEM_WORD(TOBYTE(offset & 0xfffffff0), data);
}
-void tms340x0_device::write_pixel_t_32(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_t_32(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
if (data)
@@ -368,41 +368,41 @@ void tms340x0_device::write_pixel_t_32(offs_t offset, UINT32 data)
}
/* Raster Op + No Transparency */
-void tms340x0_device::write_pixel_r_1(offs_t offset, UINT32 data) { WP_R(0x0f, 0x01); }
-void tms340x0_device::write_pixel_r_2(offs_t offset, UINT32 data) { WP_R(0x0e, 0x03); }
-void tms340x0_device::write_pixel_r_4(offs_t offset, UINT32 data) { WP_R(0x0c, 0x0f); }
-void tms340x0_device::write_pixel_r_8(offs_t offset, UINT32 data) { WP_R(0x08, 0xff); }
-void tms340x0_device::write_pixel_r_16(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_r_1(offs_t offset, uint32_t data) { WP_R(0x0f, 0x01); }
+void tms340x0_device::write_pixel_r_2(offs_t offset, uint32_t data) { WP_R(0x0e, 0x03); }
+void tms340x0_device::write_pixel_r_4(offs_t offset, uint32_t data) { WP_R(0x0c, 0x0f); }
+void tms340x0_device::write_pixel_r_8(offs_t offset, uint32_t data) { WP_R(0x08, 0xff); }
+void tms340x0_device::write_pixel_r_16(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
- UINT32 a = TOBYTE(offset & 0xfffffff0);
+ uint32_t a = TOBYTE(offset & 0xfffffff0);
TMS34010_WRMEM_WORD(a, (this->*m_raster_op)(data, TMS34010_RDMEM_WORD(a)));
}
-void tms340x0_device::write_pixel_r_32(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_r_32(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
- UINT32 a = TOBYTE(offset & 0xffffffe0);
+ uint32_t a = TOBYTE(offset & 0xffffffe0);
TMS34010_WRMEM_DWORD(a, (this->*m_raster_op)(data, TMS34010_RDMEM_DWORD(a)));
}
/* Raster Op + Transparency */
-void tms340x0_device::write_pixel_r_t_1(offs_t offset, UINT32 data) { WP_R_T(0x0f,0x01); }
-void tms340x0_device::write_pixel_r_t_2(offs_t offset, UINT32 data) { WP_R_T(0x0e,0x03); }
-void tms340x0_device::write_pixel_r_t_4(offs_t offset, UINT32 data) { WP_R_T(0x0c,0x0f); }
-void tms340x0_device::write_pixel_r_t_8(offs_t offset, UINT32 data) { WP_R_T(0x08,0xff); }
-void tms340x0_device::write_pixel_r_t_16(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_r_t_1(offs_t offset, uint32_t data) { WP_R_T(0x0f,0x01); }
+void tms340x0_device::write_pixel_r_t_2(offs_t offset, uint32_t data) { WP_R_T(0x0e,0x03); }
+void tms340x0_device::write_pixel_r_t_4(offs_t offset, uint32_t data) { WP_R_T(0x0c,0x0f); }
+void tms340x0_device::write_pixel_r_t_8(offs_t offset, uint32_t data) { WP_R_T(0x08,0xff); }
+void tms340x0_device::write_pixel_r_t_16(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
- UINT32 a = TOBYTE(offset & 0xfffffff0);
+ uint32_t a = TOBYTE(offset & 0xfffffff0);
data = (this->*m_raster_op)(data, TMS34010_RDMEM_WORD(a));
if (data)
TMS34010_WRMEM_WORD(a, data);
}
-void tms340x0_device::write_pixel_r_t_32(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_r_t_32(offs_t offset, uint32_t data)
{
/* TODO: plane masking */
- UINT32 a = TOBYTE(offset & 0xffffffe0);
+ uint32_t a = TOBYTE(offset & 0xffffffe0);
data = (this->*m_raster_op)(data, TMS34010_RDMEM_DWORD(a));
if (data)
@@ -410,7 +410,7 @@ void tms340x0_device::write_pixel_r_t_32(offs_t offset, UINT32 data)
}
/* Shift register write */
-void tms340x0_device::write_pixel_shiftreg(offs_t offset, UINT32 data)
+void tms340x0_device::write_pixel_shiftreg(offs_t offset, uint32_t data)
{
if (!m_from_shiftreg_cb.isnull())
m_from_shiftreg_cb(*m_program, offset, &m_shiftreg[0]);
@@ -425,32 +425,32 @@ void tms340x0_device::write_pixel_shiftreg(offs_t offset, UINT32 data)
***************************************************************************/
/* Raster operations */
-UINT32 tms340x0_device::raster_op_1(UINT32 newpix, UINT32 oldpix) { return newpix & oldpix; }
-UINT32 tms340x0_device::raster_op_2(UINT32 newpix, UINT32 oldpix) { return newpix & ~oldpix; }
-UINT32 tms340x0_device::raster_op_3(UINT32 newpix, UINT32 oldpix) { return 0; }
-UINT32 tms340x0_device::raster_op_4(UINT32 newpix, UINT32 oldpix) { return newpix | ~oldpix; }
-UINT32 tms340x0_device::raster_op_5(UINT32 newpix, UINT32 oldpix) { return ~(newpix ^ oldpix); }
-UINT32 tms340x0_device::raster_op_6(UINT32 newpix, UINT32 oldpix) { return ~oldpix; }
-UINT32 tms340x0_device::raster_op_7(UINT32 newpix, UINT32 oldpix) { return ~(newpix | oldpix); }
-UINT32 tms340x0_device::raster_op_8(UINT32 newpix, UINT32 oldpix) { return newpix | oldpix; }
-UINT32 tms340x0_device::raster_op_9(UINT32 newpix, UINT32 oldpix) { return oldpix; }
-UINT32 tms340x0_device::raster_op_10(UINT32 newpix, UINT32 oldpix) { return newpix ^ oldpix; }
-UINT32 tms340x0_device::raster_op_11(UINT32 newpix, UINT32 oldpix) { return ~newpix & oldpix; }
-UINT32 tms340x0_device::raster_op_12(UINT32 newpix, UINT32 oldpix) { return 0xffff; }
-UINT32 tms340x0_device::raster_op_13(UINT32 newpix, UINT32 oldpix) { return ~newpix | oldpix; }
-UINT32 tms340x0_device::raster_op_14(UINT32 newpix, UINT32 oldpix) { return ~(newpix & oldpix); }
-UINT32 tms340x0_device::raster_op_15(UINT32 newpix, UINT32 oldpix) { return ~newpix; }
-UINT32 tms340x0_device::raster_op_16(UINT32 newpix, UINT32 oldpix) { return newpix + oldpix; }
-UINT32 tms340x0_device::raster_op_17(UINT32 newpix, UINT32 oldpix)
+uint32_t tms340x0_device::raster_op_1(uint32_t newpix, uint32_t oldpix) { return newpix & oldpix; }
+uint32_t tms340x0_device::raster_op_2(uint32_t newpix, uint32_t oldpix) { return newpix & ~oldpix; }
+uint32_t tms340x0_device::raster_op_3(uint32_t newpix, uint32_t oldpix) { return 0; }
+uint32_t tms340x0_device::raster_op_4(uint32_t newpix, uint32_t oldpix) { return newpix | ~oldpix; }
+uint32_t tms340x0_device::raster_op_5(uint32_t newpix, uint32_t oldpix) { return ~(newpix ^ oldpix); }
+uint32_t tms340x0_device::raster_op_6(uint32_t newpix, uint32_t oldpix) { return ~oldpix; }
+uint32_t tms340x0_device::raster_op_7(uint32_t newpix, uint32_t oldpix) { return ~(newpix | oldpix); }
+uint32_t tms340x0_device::raster_op_8(uint32_t newpix, uint32_t oldpix) { return newpix | oldpix; }
+uint32_t tms340x0_device::raster_op_9(uint32_t newpix, uint32_t oldpix) { return oldpix; }
+uint32_t tms340x0_device::raster_op_10(uint32_t newpix, uint32_t oldpix) { return newpix ^ oldpix; }
+uint32_t tms340x0_device::raster_op_11(uint32_t newpix, uint32_t oldpix) { return ~newpix & oldpix; }
+uint32_t tms340x0_device::raster_op_12(uint32_t newpix, uint32_t oldpix) { return 0xffff; }
+uint32_t tms340x0_device::raster_op_13(uint32_t newpix, uint32_t oldpix) { return ~newpix | oldpix; }
+uint32_t tms340x0_device::raster_op_14(uint32_t newpix, uint32_t oldpix) { return ~(newpix & oldpix); }
+uint32_t tms340x0_device::raster_op_15(uint32_t newpix, uint32_t oldpix) { return ~newpix; }
+uint32_t tms340x0_device::raster_op_16(uint32_t newpix, uint32_t oldpix) { return newpix + oldpix; }
+uint32_t tms340x0_device::raster_op_17(uint32_t newpix, uint32_t oldpix)
{
- UINT32 max = (UINT32)0xffffffff >> (32 - IOREG(REG_PSIZE));
- UINT32 res = newpix + oldpix;
+ uint32_t max = (uint32_t)0xffffffff >> (32 - IOREG(REG_PSIZE));
+ uint32_t res = newpix + oldpix;
return (res > max) ? max : res;
}
-UINT32 tms340x0_device::raster_op_18(UINT32 newpix, UINT32 oldpix) { return oldpix - newpix; }
-UINT32 tms340x0_device::raster_op_19(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix - newpix : 0; }
-UINT32 tms340x0_device::raster_op_20(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? oldpix : newpix; }
-UINT32 tms340x0_device::raster_op_21(UINT32 newpix, UINT32 oldpix) { return (oldpix > newpix) ? newpix : oldpix; }
+uint32_t tms340x0_device::raster_op_18(uint32_t newpix, uint32_t oldpix) { return oldpix - newpix; }
+uint32_t tms340x0_device::raster_op_19(uint32_t newpix, uint32_t oldpix) { return (oldpix > newpix) ? oldpix - newpix : 0; }
+uint32_t tms340x0_device::raster_op_20(uint32_t newpix, uint32_t oldpix) { return (oldpix > newpix) ? oldpix : newpix; }
+uint32_t tms340x0_device::raster_op_21(uint32_t newpix, uint32_t oldpix) { return (oldpix > newpix) ? newpix : oldpix; }
@@ -731,7 +731,7 @@ void tms340x0_device::execute_run()
{
do
{
- UINT16 op;
+ uint16_t op;
m_ppc = m_pc;
op = ROPCODE();
(this->*s_opcode_table[op >> 4])(op);
@@ -741,7 +741,7 @@ void tms340x0_device::execute_run()
{
do
{
- UINT16 op;
+ uint16_t op;
m_ppc = m_pc;
debugger_instruction_hook(this, m_pc);
op = ROPCODE();
@@ -773,7 +773,7 @@ const tms340x0_device::pixel_read_func tms340x0_device::s_pixel_read_ops[6] =
void tms340x0_device::set_pixel_function()
{
- UINT32 i1,i2;
+ uint32_t i1,i2;
if (IOREG(REG_DPYCTL) & 0x0800)
{
@@ -939,7 +939,7 @@ TIMER_CALLBACK_MEMBER( tms340x0_device::scanline_callback )
/* 34010 increments by the DUDATE field in DPYCTL */
if (!m_is_34020)
{
- UINT16 dpyadr = IOREG(REG_DPYADR);
+ uint16_t dpyadr = IOREG(REG_DPYADR);
if ((dpyadr & 3) == 0)
dpyadr = ((dpyadr & 0xfffc) - (IOREG(REG_DPYCTL) & 0x03fc)) | (IOREG(REG_DPYSTRT) & 0x0003);
else
@@ -950,8 +950,8 @@ TIMER_CALLBACK_MEMBER( tms340x0_device::scanline_callback )
/* 34020 updates based on the DINC register, including zoom */
else
{
- UINT32 dpynx = IOREG(REG020_DPYNXL) | (IOREG(REG020_DPYNXH) << 16);
- UINT32 dinc = IOREG(REG020_DINCL) | (IOREG(REG020_DINCH) << 16);
+ uint32_t dpynx = IOREG(REG020_DPYNXL) | (IOREG(REG020_DPYNXH) << 16);
+ uint32_t dinc = IOREG(REG020_DINCL) | (IOREG(REG020_DINCH) << 16);
dpynx = (dpynx & 0xffffffe0) | ((dpynx + dinc) & 0x1f);
if ((dpynx & 0x1f) == 0)
dpynx += dinc & 0xffffffe0;
@@ -983,7 +983,7 @@ void tms340x0_device::get_display_params(tms34010_display_params *params)
/* 34010 gets its address from DPYADR and DPYTAP */
if (!m_is_34020)
{
- UINT16 dpyadr = IOREG(REG_DPYADR);
+ uint16_t dpyadr = IOREG(REG_DPYADR);
if (!(IOREG(REG_DPYCTL) & 0x0400))
dpyadr ^= 0xfffc;
params->rowaddr = dpyadr >> 4;
@@ -1002,7 +1002,7 @@ void tms340x0_device::get_display_params(tms34010_display_params *params)
}
}
-UINT32 tms340x0_device::tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t tms340x0_device::tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
pen_t blackpen = screen.palette().black_pen();
tms34010_display_params params;
@@ -1024,7 +1024,7 @@ UINT32 tms340x0_device::tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitm
params.heblnk = params.hsblnk = cliprect.max_x + 1;
/* blank out the blank regions */
- UINT16 *dest = &bitmap.pix16(cliprect.min_y);
+ uint16_t *dest = &bitmap.pix16(cliprect.min_y);
for (x = cliprect.min_x; x < params.heblnk; x++)
dest[x] = blackpen;
for (x = params.hsblnk; x <= cliprect.max_x; x++)
@@ -1033,7 +1033,7 @@ UINT32 tms340x0_device::tms340x0_ind16(screen_device &screen, bitmap_ind16 &bitm
}
-UINT32 tms340x0_device::tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+uint32_t tms340x0_device::tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
pen_t blackpen = rgb_t::black;
tms34010_display_params params;
@@ -1055,7 +1055,7 @@ UINT32 tms340x0_device::tms340x0_rgb32(screen_device &screen, bitmap_rgb32 &bitm
params.heblnk = params.hsblnk = cliprect.max_x + 1;
/* blank out the blank regions */
- UINT32 *dest = &bitmap.pix32(cliprect.min_y);
+ uint32_t *dest = &bitmap.pix32(cliprect.min_y);
for (x = cliprect.min_x; x < params.heblnk; x++)
dest[x] = blackpen;
for (x = params.hsblnk; x <= cliprect.max_x; x++)
@@ -1519,7 +1519,7 @@ WRITE16_MEMBER( tms340x0_device::host_w )
{
addr += 0x10;
IOREG(REG_HSTADRH) = addr >> 16;
- IOREG(REG_HSTADRL) = (UINT16)addr;
+ IOREG(REG_HSTADRL) = (uint16_t)addr;
}
break;
@@ -1579,7 +1579,7 @@ READ16_MEMBER( tms340x0_device::host_r )
{
addr += 0x10;
IOREG(REG_HSTADRH) = addr >> 16;
- IOREG(REG_HSTADRL) = (UINT16)addr;
+ IOREG(REG_HSTADRL) = (uint16_t)addr;
}
break;
@@ -1627,7 +1627,7 @@ void tms340x0_device::state_string_export(const device_state_entry &entry, std::
}
-offs_t tms34010_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+offs_t tms34010_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( tms34010 );
@@ -1635,7 +1635,7 @@ offs_t tms34010_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8
}
-offs_t tms34020_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+offs_t tms34020_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( tms34020 );