summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/ssp1601
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/ssp1601')
-rw-r--r--src/devices/cpu/ssp1601/ssp1601.cpp42
-rw-r--r--src/devices/cpu/ssp1601/ssp1601.h52
-rw-r--r--src/devices/cpu/ssp1601/ssp1601d.cpp6
3 files changed, 50 insertions, 50 deletions
diff --git a/src/devices/cpu/ssp1601/ssp1601.cpp b/src/devices/cpu/ssp1601/ssp1601.cpp
index e37939f34f4..1d38f5981a9 100644
--- a/src/devices/cpu/ssp1601/ssp1601.cpp
+++ b/src/devices/cpu/ssp1601/ssp1601.cpp
@@ -101,14 +101,14 @@
}
#define OP_CMPA(x) { \
- UINT32 t = rA32 - ((x) << 16); \
+ uint32_t t = rA32 - ((x) << 16); \
rST &= ~(SSP_FLAG_L|SSP_FLAG_Z|SSP_FLAG_V|SSP_FLAG_N); \
if (!t) rST |= SSP_FLAG_Z; \
else rST |= (t>>16)&SSP_FLAG_N; \
}
#define OP_CMPA32(x) { \
- UINT32 t = rA32 - (x); \
+ uint32_t t = rA32 - (x); \
rST &= ~(SSP_FLAG_L|SSP_FLAG_Z|SSP_FLAG_V|SSP_FLAG_N); \
if (!t) rST |= SSP_FLAG_Z; \
else rST |= (t>>16)&SSP_FLAG_N; \
@@ -192,7 +192,7 @@
const device_type SSP1601 = &device_creator<ssp1601_device>;
-ssp1601_device::ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ssp1601_device::ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cpu_device(mconfig, SSP1601, "SSP1601", tag, owner, clock, "ssp1601", __FILE__)
, m_program_config("program", ENDIANNESS_BIG, 16, 16, -1)
, m_io_config("io", ENDIANNESS_BIG, 16, 4, 0)
@@ -200,7 +200,7 @@ ssp1601_device::ssp1601_device(const machine_config &mconfig, const char *tag, d
}
-offs_t ssp1601_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+offs_t ssp1601_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( ssp1601 );
return CPU_DISASSEMBLE_NAME(ssp1601)(this, buffer, pc, oprom, opram, options);
@@ -217,39 +217,39 @@ void ssp1601_device::update_P()
rP.d = (m1 * m2 * 2);
}
-UINT32 ssp1601_device::read_unknown(int reg)
+uint32_t ssp1601_device::read_unknown(int reg)
{
logerror("%s:%i FIXME\n", __FILE__, __LINE__);
return 0;
}
-void ssp1601_device::write_unknown(int reg, UINT32 d)
+void ssp1601_device::write_unknown(int reg, uint32_t d)
{
logerror("%s:%i FIXME\n", __FILE__, __LINE__);
}
/* map EXT regs to virtual I/O range of 0x00-0x0f */
-UINT32 ssp1601_device::read_ext(int reg)
+uint32_t ssp1601_device::read_ext(int reg)
{
reg &= 7;
return m_io->read_word((reg << 1));
}
-void ssp1601_device::write_ext(int reg, UINT32 d)
+void ssp1601_device::write_ext(int reg, uint32_t d)
{
reg &= 7;
m_io->write_word((reg << 1), d);
}
// 4
-void ssp1601_device::write_ST(int reg, UINT32 d)
+void ssp1601_device::write_ST(int reg, uint32_t d)
{
CHECK_ST(d);
rST = d;
}
// 5
-UINT32 ssp1601_device::read_STACK(int reg)
+uint32_t ssp1601_device::read_STACK(int reg)
{
--rSTACK;
if ((signed short)rSTACK < 0) {
@@ -259,7 +259,7 @@ UINT32 ssp1601_device::read_STACK(int reg)
return m_stack[rSTACK];
}
-void ssp1601_device::write_STACK(int reg, UINT32 d)
+void ssp1601_device::write_STACK(int reg, uint32_t d)
{
if (rSTACK >= 6) {
logerror(__FILE__ " FIXME: stack overflow! (%i) @ %04x\n", rSTACK, GET_PPC_OFFS());
@@ -269,33 +269,33 @@ void ssp1601_device::write_STACK(int reg, UINT32 d)
}
// 6
-UINT32 ssp1601_device::read_PC(int reg)
+uint32_t ssp1601_device::read_PC(int reg)
{
return rPC;
}
-void ssp1601_device::write_PC(int reg, UINT32 d)
+void ssp1601_device::write_PC(int reg, uint32_t d)
{
rPC = d;
m_g_cycles--;
}
// 7
-UINT32 ssp1601_device::read_P(int reg)
+uint32_t ssp1601_device::read_P(int reg)
{
update_P();
return rP.w.h;
}
// 15
-UINT32 ssp1601_device::read_AL(int reg)
+uint32_t ssp1601_device::read_AL(int reg)
{
/* apparently reading AL causes some effect on EXT bus, VR depends on that.. */
read_ext(reg);
return rAL;
}
-void ssp1601_device::write_AL(int reg, UINT32 d)
+void ssp1601_device::write_AL(int reg, uint32_t d)
{
write_ext(reg, d);
rAL = d;
@@ -343,10 +343,10 @@ const ssp1601_device::write_func_t ssp1601_device::reg_write_handlers[16] =
//
#define ptr1_read(op) ptr1_read_(op&3,(op>>6)&4,(op<<1)&0x18)
-UINT32 ssp1601_device::ptr1_read_(int ri, int isj2, int modi3)
+uint32_t ssp1601_device::ptr1_read_(int ri, int isj2, int modi3)
{
//int t = (op&3) | ((op>>6)&4) | ((op<<1)&0x18);
- UINT32 mask, add = 0, t = ri | isj2 | modi3;
+ uint32_t mask, add = 0, t = ri | isj2 | modi3;
unsigned char *rp = nullptr;
switch (t)
{
@@ -404,7 +404,7 @@ modulo:
return t;
}
-void ssp1601_device::ptr1_write(int op, UINT32 d)
+void ssp1601_device::ptr1_write(int op, uint32_t d)
{
int t = (op&3) | ((op>>6)&4) | ((op<<1)&0x18);
switch (t)
@@ -449,7 +449,7 @@ void ssp1601_device::ptr1_write(int op, UINT32 d)
}
}
-UINT32 ssp1601_device::ptr2_read(int op)
+uint32_t ssp1601_device::ptr2_read(int op)
{
int mv, t = (op&3) | ((op>>6)&4) | ((op<<1)&0x18);
switch (t)
@@ -576,7 +576,7 @@ void ssp1601_device::execute_run()
while (m_g_cycles > 0)
{
int op;
- UINT32 tmpv;
+ uint32_t tmpv;
PPC = rPC;
diff --git a/src/devices/cpu/ssp1601/ssp1601.h b/src/devices/cpu/ssp1601/ssp1601.h
index 1917af79adb..b59fff81e4f 100644
--- a/src/devices/cpu/ssp1601/ssp1601.h
+++ b/src/devices/cpu/ssp1601/ssp1601.h
@@ -22,7 +22,7 @@ class ssp1601_device : public cpu_device
{
public:
// construction/destruction
- ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
@@ -30,9 +30,9 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT32 execute_min_cycles() const override { return 1; }
- virtual UINT32 execute_max_cycles() const override { return 4; }
- virtual UINT32 execute_input_lines() const override { return 3; }
+ virtual uint32_t execute_min_cycles() const override { return 1; }
+ virtual uint32_t execute_max_cycles() const override { return 4; }
+ virtual uint32_t execute_input_lines() const override { return 3; }
virtual void execute_run() override;
virtual void execute_set_input(int inputnum, int state) override;
@@ -43,9 +43,9 @@ protected:
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_disasm_interface overrides
- virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
- virtual UINT32 disasm_max_opcode_bytes() const override { return 4; }
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+ virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
+ virtual uint32_t disasm_max_opcode_bytes() const override { return 4; }
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
private:
address_space_config m_program_config;
@@ -66,7 +66,7 @@ private:
unsigned short m_RAM1[256];
} mem;
};
- UINT16 m_stack[6]; /* 6-level hardware stack */
+ uint16_t m_stack[6]; /* 6-level hardware stack */
PAIR m_ppc;
int m_g_cycles;
@@ -76,24 +76,24 @@ private:
address_space *m_io;
void update_P();
- UINT32 read_unknown(int reg);
- void write_unknown(int reg, UINT32 d);
- UINT32 read_ext(int reg);
- void write_ext(int reg, UINT32 d);
- void write_ST(int reg, UINT32 d);
- UINT32 read_STACK(int reg);
- void write_STACK(int reg, UINT32 d);
- UINT32 read_PC(int reg);
- void write_PC(int reg, UINT32 d);
- UINT32 read_P(int reg);
- UINT32 read_AL(int reg);
- void write_AL(int reg, UINT32 d);
- UINT32 ptr1_read_(int ri, int isj2, int modi3);
- void ptr1_write(int op, UINT32 d);
- UINT32 ptr2_read(int op);
-
- typedef UINT32 (ssp1601_device::*read_func_t)(int reg);
- typedef void (ssp1601_device::*write_func_t)(int reg, UINT32 d);
+ uint32_t read_unknown(int reg);
+ void write_unknown(int reg, uint32_t d);
+ uint32_t read_ext(int reg);
+ void write_ext(int reg, uint32_t d);
+ void write_ST(int reg, uint32_t d);
+ uint32_t read_STACK(int reg);
+ void write_STACK(int reg, uint32_t d);
+ uint32_t read_PC(int reg);
+ void write_PC(int reg, uint32_t d);
+ uint32_t read_P(int reg);
+ uint32_t read_AL(int reg);
+ void write_AL(int reg, uint32_t d);
+ uint32_t ptr1_read_(int ri, int isj2, int modi3);
+ void ptr1_write(int op, uint32_t d);
+ uint32_t ptr2_read(int op);
+
+ typedef uint32_t (ssp1601_device::*read_func_t)(int reg);
+ typedef void (ssp1601_device::*write_func_t)(int reg, uint32_t d);
static const read_func_t reg_read_handlers[16];
static const write_func_t reg_write_handlers[16];
diff --git a/src/devices/cpu/ssp1601/ssp1601d.cpp b/src/devices/cpu/ssp1601/ssp1601d.cpp
index dfc8f3ae366..55161853a32 100644
--- a/src/devices/cpu/ssp1601/ssp1601d.cpp
+++ b/src/devices/cpu/ssp1601/ssp1601d.cpp
@@ -79,10 +79,10 @@ static char *get_cond(int op)
}
-static unsigned dasm_ssp1601(char *buffer, unsigned pc, const UINT8 *oprom)
+static unsigned dasm_ssp1601(char *buffer, unsigned pc, const uint8_t *oprom)
{
- const UINT8 *base_oprom;
- UINT16 op;
+ const uint8_t *base_oprom;
+ uint16_t op;
int size = 1;
int flags = 0;