diff options
Diffstat (limited to 'src/devices/cpu/cop400/cop400.cpp')
-rw-r--r-- | src/devices/cpu/cop400/cop400.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/devices/cpu/cop400/cop400.cpp b/src/devices/cpu/cop400/cop400.cpp index 885f00d34cf..58a5c672a35 100644 --- a/src/devices/cpu/cop400/cop400.cpp +++ b/src/devices/cpu/cop400/cop400.cpp @@ -168,7 +168,7 @@ ADDRESS_MAP_END #endif -cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, UINT8 program_addr_bits, UINT8 data_addr_bits, UINT8 featuremask, UINT8 g_mask, UINT8 d_mask, UINT8 in_mask, bool has_counter, bool has_inil, address_map_constructor internal_map_program, address_map_constructor internal_map_data) +cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source, uint8_t program_addr_bits, uint8_t data_addr_bits, uint8_t featuremask, uint8_t g_mask, uint8_t d_mask, uint8_t in_mask, bool has_counter, bool has_inil, address_map_constructor internal_map_program, address_map_constructor internal_map_data) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) , m_program_config("program", ENDIANNESS_LITTLE, 8, program_addr_bits, 0, internal_map_program) , m_data_config("data", ENDIANNESS_LITTLE, 8, data_addr_bits, 0, internal_map_data) // data width is really 4 @@ -230,67 +230,67 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type } } -cop401_cpu_device::cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop401_cpu_device::cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP401, "COP401", tag, owner, clock, "cop401", __FILE__, 9, 5, COP410_FEATURE, 0xf, 0xf, 0, false, false, nullptr, ADDRESS_MAP_NAME(data_32b)) { } -cop410_cpu_device::cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop410_cpu_device::cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP410, "COP410", tag, owner, clock, "cop410", __FILE__, 9, 5, COP410_FEATURE, 0xf, 0xf, 0, false, false, ADDRESS_MAP_NAME(program_512b), ADDRESS_MAP_NAME(data_32b)) { } -cop411_cpu_device::cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop411_cpu_device::cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP411, "COP411", tag, owner, clock, "cop411", __FILE__, 9, 5, COP410_FEATURE, 0x7, 0x3, 0, false, false, ADDRESS_MAP_NAME(program_512b), ADDRESS_MAP_NAME(data_32b)) { } -cop402_cpu_device::cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop402_cpu_device::cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP402, "COP402", tag, owner, clock, "cop402", __FILE__, 10, 6, COP420_FEATURE, 0xf, 0xf, 0xf, true, true, nullptr, ADDRESS_MAP_NAME(data_64b)) { } -cop420_cpu_device::cop420_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop420_cpu_device::cop420_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP420, "COP420", tag, owner, clock, "cop420", __FILE__, 10, 6, COP420_FEATURE, 0xf, 0xf, 0xf, true, true, ADDRESS_MAP_NAME(program_1kb), ADDRESS_MAP_NAME(data_64b)) { } -cop421_cpu_device::cop421_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop421_cpu_device::cop421_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP421, "COP421", tag, owner, clock, "cop421", __FILE__, 10, 6, COP420_FEATURE, 0xf, 0xf, 0, true, false, ADDRESS_MAP_NAME(program_1kb), ADDRESS_MAP_NAME(data_64b)) { } -cop422_cpu_device::cop422_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop422_cpu_device::cop422_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP422, "COP422", tag, owner, clock, "cop422", __FILE__, 10, 6, COP420_FEATURE, 0xe, 0xe, 0, true, false, ADDRESS_MAP_NAME(program_1kb), ADDRESS_MAP_NAME(data_64b)) { } -cop404_cpu_device::cop404_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop404_cpu_device::cop404_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP404, "COP404", tag, owner, clock, "cop404", __FILE__, 11, 7, COP444_FEATURE, 0xf, 0xf, 0xf, true, true, nullptr, ADDRESS_MAP_NAME(data_128b)) { } -cop424_cpu_device::cop424_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop424_cpu_device::cop424_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP424, "COP424", tag, owner, clock, "cop424", __FILE__, 10, 6, COP444_FEATURE, 0xf, 0xf, 0xf, true, true, ADDRESS_MAP_NAME(program_1kb), ADDRESS_MAP_NAME(data_64b)) { } -cop425_cpu_device::cop425_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop425_cpu_device::cop425_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP425, "COP425", tag, owner, clock, "cop425", __FILE__, 10, 6, COP444_FEATURE, 0xf, 0xf, 0, true, false, ADDRESS_MAP_NAME(program_1kb), ADDRESS_MAP_NAME(data_64b)) { } -cop426_cpu_device::cop426_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop426_cpu_device::cop426_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP426, "COP426", tag, owner, clock, "cop426", __FILE__, 10, 6, COP444_FEATURE, 0xe, 0xe, 0xf, true, true, ADDRESS_MAP_NAME(program_1kb), ADDRESS_MAP_NAME(data_64b)) { } -cop444_cpu_device::cop444_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop444_cpu_device::cop444_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP444, "COP444", tag, owner, clock, "cop444", __FILE__, 11, 7, COP444_FEATURE, 0xf, 0xf, 0xf, true, true, ADDRESS_MAP_NAME(program_2kb), ADDRESS_MAP_NAME(data_128b)) { } -cop445_cpu_device::cop445_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +cop445_cpu_device::cop445_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cop400_cpu_device(mconfig, COP445, "COP445", tag, owner, clock, "cop445", __FILE__, 11, 7, COP444_FEATURE, 0x7, 0x3, 0, true, false, ADDRESS_MAP_NAME(program_2kb), ADDRESS_MAP_NAME(data_128b)) { } @@ -300,7 +300,7 @@ cop445_cpu_device::cop445_cpu_device(const machine_config &mconfig, const char * ***************************************************************************/ -void cop400_cpu_device::PUSH(UINT16 data) +void cop400_cpu_device::PUSH(uint16_t data) { if (m_featuremask != COP410_FEATURE) { @@ -322,7 +322,7 @@ void cop400_cpu_device::POP() } } -void cop400_cpu_device::WRITE_Q(UINT8 data) +void cop400_cpu_device::WRITE_Q(uint8_t data) { Q = data; @@ -332,7 +332,7 @@ void cop400_cpu_device::WRITE_Q(UINT8 data) } } -void cop400_cpu_device::WRITE_G(UINT8 data) +void cop400_cpu_device::WRITE_G(uint8_t data) { G = data; @@ -343,7 +343,7 @@ void cop400_cpu_device::WRITE_G(UINT8 data) OPCODE HANDLERS ***************************************************************************/ -#define INSTRUCTION(mnemonic) void (cop400_cpu_device::mnemonic)(UINT8 opcode) +#define INSTRUCTION(mnemonic) void (cop400_cpu_device::mnemonic)(uint8_t opcode) #define INST(mnemonic) &cop400_cpu_device::mnemonic INSTRUCTION(illegal) @@ -396,9 +396,9 @@ const cop400_cpu_device::cop400_opcode_map cop400_cpu_device::COP410_OPCODE_23_M {1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) } }; -void cop400_cpu_device::cop410_op23(UINT8 opcode) +void cop400_cpu_device::cop410_op23(uint8_t opcode) { - UINT8 opcode23 = ROM(PC++); + uint8_t opcode23 = ROM(PC++); (this->*COP410_OPCODE_23_MAP[opcode23].function)(opcode23); } @@ -442,9 +442,9 @@ const cop400_cpu_device::cop400_opcode_map cop400_cpu_device::COP410_OPCODE_33_M {1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) } }; -void cop400_cpu_device::cop410_op33(UINT8 opcode) +void cop400_cpu_device::cop410_op33(uint8_t opcode) { - UINT8 opcode33 = ROM(PC++); + uint8_t opcode33 = ROM(PC++); (this->*COP410_OPCODE_33_MAP[opcode33].function)(opcode33); } @@ -527,9 +527,9 @@ const cop400_cpu_device::cop400_opcode_map cop400_cpu_device::COP420_OPCODE_23_M {1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) } }; -void cop400_cpu_device::cop420_op23(UINT8 opcode) +void cop400_cpu_device::cop420_op23(uint8_t opcode) { - UINT8 opcode23 = ROM(PC++); + uint8_t opcode23 = ROM(PC++); (this->*COP420_OPCODE_23_MAP[opcode23].function)(opcode23); } @@ -573,9 +573,9 @@ const cop400_cpu_device::cop400_opcode_map cop400_cpu_device::COP420_OPCODE_33_M {1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) },{1, INST(illegal) } }; -void cop400_cpu_device::cop420_op33(UINT8 opcode) +void cop400_cpu_device::cop420_op33(uint8_t opcode) { - UINT8 opcode33 = ROM(PC++); + uint8_t opcode33 = ROM(PC++); (this->*COP420_OPCODE_33_MAP[opcode33].function)(opcode33); } @@ -658,9 +658,9 @@ const cop400_cpu_device::cop400_opcode_map cop400_cpu_device::COP444_OPCODE_23_M {1, INST(xad) },{1, INST(xad) },{1, INST(xad) },{1, INST(xad) },{1, INST(xad) },{1, INST(xad) },{1, INST(xad) },{1, INST(xad) }, }; -void cop400_cpu_device::cop444_op23(UINT8 opcode) +void cop400_cpu_device::cop444_op23(uint8_t opcode) { - UINT8 opcode23 = ROM(PC++); + uint8_t opcode23 = ROM(PC++); (this->*COP444_OPCODE_23_MAP[opcode23].function)(opcode23); } @@ -704,9 +704,9 @@ const cop400_cpu_device::cop400_opcode_map cop400_cpu_device::COP444_OPCODE_33_M {1, INST(lbi) },{1, INST(lbi) },{1, INST(lbi) },{1, INST(lbi) },{1, INST(lbi) },{1, INST(lbi) },{1, INST(lbi) },{1, INST(lbi) }, }; -void cop400_cpu_device::cop444_op33(UINT8 opcode) +void cop400_cpu_device::cop444_op33(uint8_t opcode) { - UINT8 opcode33 = ROM(PC++); + uint8_t opcode33 = ROM(PC++); (this->*COP444_OPCODE_33_MAP[opcode33].function)(opcode33); } @@ -845,7 +845,7 @@ void cop400_cpu_device::counter_tick() void cop400_cpu_device::inil_tick() { - UINT8 in; + uint8_t in; int i; in = IN_IN(); @@ -1072,7 +1072,7 @@ void cop400_cpu_device::execute_run() continue; } - UINT8 opcode = ROM(PC); + uint8_t opcode = ROM(PC); int inst_cycles = m_opcode_map[opcode].cycles; PC++; @@ -1171,7 +1171,7 @@ void cop400_cpu_device::state_string_export(const device_state_entry &entry, std } -offs_t cop400_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t cop400_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( cop410 ); extern CPU_DISASSEMBLE( cop420 ); |