diff options
Diffstat (limited to 'src/devices/cpu/ssem/ssem.cpp')
-rw-r--r-- | src/devices/cpu/ssem/ssem.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/devices/cpu/ssem/ssem.cpp b/src/devices/cpu/ssem/ssem.cpp index 1ea2584c33e..a76d9a44182 100644 --- a/src/devices/cpu/ssem/ssem.cpp +++ b/src/devices/cpu/ssem/ssem.cpp @@ -25,7 +25,7 @@ CPU_DISASSEMBLE( ssem ); // The de facto snapshot format for other SSEM simulators stores the data physically in that format as well. // Therefore, in MESS, every 32-bit word has its bits reversed, too, and as a result the values must be // un-reversed before being used. -static inline UINT32 reverse(UINT32 v) +static inline uint32_t reverse(uint32_t v) { // Taken from http://www-graphics.stanford.edu/~seander/bithacks.html#ReverseParallel // swap odd and even bits @@ -42,9 +42,9 @@ static inline UINT32 reverse(UINT32 v) return v; } -inline UINT32 ssem_device::program_read32(UINT32 address) +inline uint32_t ssem_device::program_read32(uint32_t address) { - UINT32 v = 0; + uint32_t v = 0; // The MAME core does not have a good way of specifying a minimum datum size that is more than // 8 bits in width. The minimum datum width on the SSEM is 32 bits, so we need to quadruple // the address value to get the appropriate byte index. @@ -58,9 +58,9 @@ inline UINT32 ssem_device::program_read32(UINT32 address) return reverse(v); } -inline void ssem_device::program_write32(UINT32 address, UINT32 data) +inline void ssem_device::program_write32(uint32_t address, uint32_t data) { - UINT32 v = reverse(data); + uint32_t v = reverse(data); // The MAME core does not have a good way of specifying a minimum datum size that is more than // 8 bits in width. The minimum datum width on the SSEM is 32 bits, so we need to quadruple @@ -82,7 +82,7 @@ const device_type SSEMCPU = &device_creator<ssem_device>; // ssem_device - constructor //------------------------------------------------- -ssem_device::ssem_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +ssem_device::ssem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cpu_device(mconfig, SSEMCPU, "SSEMCPU", tag, owner, clock, "ssem_cpu", __FILE__), m_program_config("program", ENDIANNESS_LITTLE, 8, 16), m_pc(1), @@ -166,7 +166,7 @@ void ssem_device::state_string_export(const device_state_entry &entry, std::stri // of the shortest instruction, in bytes //------------------------------------------------- -UINT32 ssem_device::disasm_min_opcode_bytes() const +uint32_t ssem_device::disasm_min_opcode_bytes() const { return 4; } @@ -177,7 +177,7 @@ UINT32 ssem_device::disasm_min_opcode_bytes() const // of the longest instruction, in bytes //------------------------------------------------- -UINT32 ssem_device::disasm_max_opcode_bytes() const +uint32_t ssem_device::disasm_max_opcode_bytes() const { return 4; } @@ -188,7 +188,7 @@ UINT32 ssem_device::disasm_max_opcode_bytes() const // helper function //------------------------------------------------- -offs_t ssem_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t ssem_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( ssem ); return CPU_DISASSEMBLE_NAME(ssem)(this, buffer, pc, oprom, opram, options); @@ -204,7 +204,7 @@ offs_t ssem_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *opr // cycles it takes for one instruction to execute //------------------------------------------------- -UINT32 ssem_device::execute_min_cycles() const +uint32_t ssem_device::execute_min_cycles() const { return 1; } @@ -215,7 +215,7 @@ UINT32 ssem_device::execute_min_cycles() const // cycles it takes for one instruction to execute //------------------------------------------------- -UINT32 ssem_device::execute_max_cycles() const +uint32_t ssem_device::execute_max_cycles() const { return 1; } @@ -226,7 +226,7 @@ UINT32 ssem_device::execute_max_cycles() const // input/interrupt lines //------------------------------------------------- -UINT32 ssem_device::execute_input_lines() const +uint32_t ssem_device::execute_input_lines() const { return 0; } @@ -249,7 +249,7 @@ void ssem_device::execute_set_input(int inputnum, int state) void ssem_device::execute_run() { - UINT32 op; + uint32_t op; m_pc &= 0x1f; m_shifted_pc = m_pc << 2; @@ -279,12 +279,12 @@ void ssem_device::execute_run() break; case 1: // JRP: Add the value at the specified address to the Program Counter. - m_pc += (INT32)program_read32(ADDR); + m_pc += (int32_t)program_read32(ADDR); m_shifted_pc = m_pc << 2; break; case 2: // LDN: Load the accumulator with the two's-complement negation of the value at the specified address. - m_a = (UINT32)(0 - (INT32)program_read32(ADDR)); + m_a = (uint32_t)(0 - (int32_t)program_read32(ADDR)); break; case 3: // STO: Store the value in the accumulator at the specified address. @@ -297,7 +297,7 @@ void ssem_device::execute_run() break; case 6: // CMP: If the accumulator is less than zero, skip the next opcode. - if((INT32)(m_a) < 0) + if((int32_t)(m_a) < 0) { m_pc++; m_shifted_pc = m_pc << 2; |