summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/i8008/i8008.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/i8008/i8008.cpp')
-rw-r--r--src/devices/cpu/i8008/i8008.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp
index c8e1f74195b..a323ed077c4 100644
--- a/src/devices/cpu/i8008/i8008.cpp
+++ b/src/devices/cpu/i8008/i8008.cpp
@@ -33,7 +33,7 @@ const device_type I8008 = &device_creator<i8008_device>;
//-------------------------------------------------
// i8008_device - constructor
//-------------------------------------------------
-i8008_device::i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+i8008_device::i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cpu_device(mconfig, I8008, "i8008", tag, owner, clock, "i8008", __FILE__),
m_program_config("program", ENDIANNESS_LITTLE, 8, 14),
m_io_config("io", ENDIANNESS_LITTLE, 8, 8),
@@ -102,7 +102,7 @@ void i8008_device::device_start()
void i8008_device::init_tables (void)
{
int i;
- UINT8 p;
+ uint8_t p;
for (i = 0; i < 256; i++)
{
p = 0;
@@ -206,7 +206,7 @@ void i8008_device::state_string_export(const device_state_entry &entry, std::str
// of the shortest instruction, in bytes
//-------------------------------------------------
-UINT32 i8008_device::disasm_min_opcode_bytes() const
+uint32_t i8008_device::disasm_min_opcode_bytes() const
{
return 1;
}
@@ -216,7 +216,7 @@ UINT32 i8008_device::disasm_min_opcode_bytes() const
// of the longest instruction, in bytes
//-------------------------------------------------
-UINT32 i8008_device::disasm_max_opcode_bytes() const
+uint32_t i8008_device::disasm_max_opcode_bytes() const
{
return 3;
}
@@ -226,7 +226,7 @@ UINT32 i8008_device::disasm_max_opcode_bytes() const
// helper function
//-------------------------------------------------
-offs_t i8008_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+offs_t i8008_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( i8008 );
return CPU_DISASSEMBLE_NAME(i8008)(this, buffer, pc, oprom, opram, options);
@@ -241,7 +241,7 @@ offs_t i8008_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
// cycles it takes for one instruction to execute
//-------------------------------------------------
-UINT32 i8008_device::execute_min_cycles() const
+uint32_t i8008_device::execute_min_cycles() const
{
return 8;
}
@@ -251,7 +251,7 @@ UINT32 i8008_device::execute_min_cycles() const
// cycles it takes for one instruction to execute
//-------------------------------------------------
-UINT32 i8008_device::execute_max_cycles() const
+uint32_t i8008_device::execute_max_cycles() const
{
return 16;
}
@@ -281,7 +281,7 @@ void i8008_device::execute_run()
} while (m_icount > 0);
}
-inline void i8008_device::illegal(UINT8 opcode)
+inline void i8008_device::illegal(uint8_t opcode)
{
if ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
{
@@ -302,7 +302,7 @@ void i8008_device::take_interrupt()
inline void i8008_device::execute_one(int opcode)
{
- UINT16 tmp;
+ uint16_t tmp;
switch (opcode >> 6)
{
@@ -618,17 +618,17 @@ inline void i8008_device::pop_stack()
m_pc_pos = (m_pc_pos - 1) & 7;
}
-inline UINT8 i8008_device::rop()
+inline uint8_t i8008_device::rop()
{
- UINT8 retVal = m_direct->read_byte(GET_PC.w.l);
+ uint8_t retVal = m_direct->read_byte(GET_PC.w.l);
GET_PC.w.l = (GET_PC.w.l + 1) & 0x3fff;
m_PC = GET_PC;
return retVal;
}
-inline UINT8 i8008_device::get_reg(UINT8 reg)
+inline uint8_t i8008_device::get_reg(uint8_t reg)
{
- UINT8 retVal;
+ uint8_t retVal;
switch(reg) {
case 0 : retVal = m_A; break;
case 1 : retVal = m_B; break;
@@ -642,7 +642,7 @@ inline UINT8 i8008_device::get_reg(UINT8 reg)
return retVal;
}
-inline void i8008_device::set_reg(UINT8 reg, UINT8 val)
+inline void i8008_device::set_reg(uint8_t reg, uint8_t val)
{
switch(reg) {
case 0 : m_A = val; break;
@@ -656,25 +656,25 @@ inline void i8008_device::set_reg(UINT8 reg, UINT8 val)
}
}
-inline UINT8 i8008_device::arg()
+inline uint8_t i8008_device::arg()
{
- UINT8 retVal = m_direct->read_byte(GET_PC.w.l);
+ uint8_t retVal = m_direct->read_byte(GET_PC.w.l);
GET_PC.w.l = (GET_PC.w.l + 1) & 0x3fff;
m_PC = GET_PC;
return retVal;
}
-inline void i8008_device::update_flags(UINT8 val)
+inline void i8008_device::update_flags(uint8_t val)
{
m_ZF = (val == 0) ? 1 : 0;
m_SF = (val & 0x80) ? 1 : 0;
m_PF = m_PARITY[val];
}
-inline UINT8 i8008_device::do_condition(UINT8 val)
+inline uint8_t i8008_device::do_condition(uint8_t val)
{
- UINT8 v = (val >> 5) & 1;
- UINT8 cond = 0;
+ uint8_t v = (val >> 5) & 1;
+ uint8_t cond = 0;
switch((val>> 3) & 0x03) {
case 0 :
if (m_CF==v) cond = 1;
@@ -692,9 +692,9 @@ inline UINT8 i8008_device::do_condition(UINT8 val)
return cond;
}
-inline UINT16 i8008_device::get_addr()
+inline uint16_t i8008_device::get_addr()
{
- UINT8 lo = arg();
- UINT8 hi = arg();
+ uint8_t lo = arg();
+ uint8_t hi = arg();
return ((hi & 0x3f) << 8) + lo;
}