summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/tms7000/tms7000.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/tms7000/tms7000.h')
-rw-r--r--src/devices/cpu/tms7000/tms7000.h164
1 files changed, 82 insertions, 82 deletions
diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h
index 1097f86acad..1d7c04e024f 100644
--- a/src/devices/cpu/tms7000/tms7000.h
+++ b/src/devices/cpu/tms7000/tms7000.h
@@ -45,8 +45,8 @@ class tms7000_device : public cpu_device
{
public:
// construction/destruction
- tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms7000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, address_map_constructor internal, UINT32 info_flags, const char *shortname, const char *source);
+ tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms7000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal, uint32_t info_flags, const char *shortname, const char *source);
DECLARE_READ8_MEMBER(tms7000_unmapped_rf_r) { if (!space.debugger_access()) logerror("'%s' (%04X): unmapped_rf_r @ $%04x\n", tag(), m_pc, offset + 0x80); return 0; };
DECLARE_WRITE8_MEMBER(tms7000_unmapped_rf_w) { logerror("'%s' (%04X): unmapped_rf_w @ $%04x = $%02x\n", tag(), m_pc, offset + 0x80, data); };
@@ -57,7 +57,7 @@ public:
DECLARE_WRITE8_MEMBER(tms7002_pf_w) { tms7000_pf_w(space, offset + 0x10, data); }
bool chip_is_cmos() { return (m_info_flags & TMS7000_CHIP_IS_CMOS) ? true : false; }
- UINT32 chip_get_family() { return m_info_flags & TMS7000_CHIP_FAMILY_MASK; }
+ uint32_t chip_get_family() { return m_info_flags & TMS7000_CHIP_FAMILY_MASK; }
bool chip_is_family_70x0() { return chip_get_family() == TMS7000_CHIP_FAMILY_70X0; }
bool chip_is_family_70x2() { return chip_get_family() == TMS7000_CHIP_FAMILY_70X2; }
bool chip_is_family_70cx2() { return chip_get_family() == TMS7000_CHIP_FAMILY_70CX2; }
@@ -68,11 +68,11 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const override { return (clocks + 2 - 1) / 2; } // internal /2 divider
- virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const override { return (cycles * 2); } // internal /2 divider
- virtual UINT32 execute_min_cycles() const override { return 5; }
- virtual UINT32 execute_max_cycles() const override { return 49; }
- virtual UINT32 execute_input_lines() const override { return 2; }
+ virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return (clocks + 2 - 1) / 2; } // internal /2 divider
+ virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 2); } // internal /2 divider
+ virtual uint32_t execute_min_cycles() const override { return 5; }
+ virtual uint32_t execute_max_cycles() const override { return 49; }
+ virtual uint32_t execute_input_lines() const override { return 2; }
virtual void execute_run() override;
virtual void execute_set_input(int extline, int state) override;
@@ -83,16 +83,16 @@ 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 1; }
- 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 1; }
+ 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;
- virtual void execute_one(UINT8 op);
+ virtual void execute_one(uint8_t op);
address_space_config m_program_config;
address_space_config m_io_config;
- UINT32 m_info_flags;
+ uint32_t m_info_flags;
address_space *m_program;
direct_read_data *m_direct;
@@ -102,22 +102,22 @@ protected:
bool m_irq_state[2];
bool m_idle_state;
bool m_idle_halt;
- UINT16 m_pc;
- UINT8 m_sp;
- UINT8 m_sr;
- UINT8 m_op;
+ uint16_t m_pc;
+ uint8_t m_sp;
+ uint8_t m_sr;
+ uint8_t m_op;
- UINT8 m_io_control[3];
+ uint8_t m_io_control[3];
emu_timer *m_timer_handle[2];
- UINT8 m_timer_data[2];
- UINT8 m_timer_control[2];
+ uint8_t m_timer_data[2];
+ uint8_t m_timer_control[2];
int m_timer_decrementer[2];
int m_timer_prescaler[2];
- UINT16 m_timer_capture_latch[2];
+ uint16_t m_timer_capture_latch[2];
- UINT8 m_port_latch[4];
- UINT8 m_port_ddr[4];
+ uint8_t m_port_latch[4];
+ uint8_t m_port_ddr[4];
void flag_ext_interrupt(int extline);
void check_interrupts();
@@ -130,26 +130,26 @@ protected:
void timer_tick_low(int tmr);
// internal read/write
- inline UINT8 read_r8(UINT8 address) { return m_program->read_byte(address); }
- inline void write_r8(UINT8 address, UINT8 data) { m_program->write_byte(address, data); }
- inline UINT16 read_r16(UINT8 address) { return m_program->read_byte((address - 1) & 0xff) << 8 | m_program->read_byte(address); }
- inline void write_r16(UINT8 address, UINT16 data) { m_program->write_byte((address - 1) & 0xff, data >> 8 & 0xff); m_program->write_byte(address, data & 0xff); }
+ inline uint8_t read_r8(uint8_t address) { return m_program->read_byte(address); }
+ inline void write_r8(uint8_t address, uint8_t data) { m_program->write_byte(address, data); }
+ inline uint16_t read_r16(uint8_t address) { return m_program->read_byte((address - 1) & 0xff) << 8 | m_program->read_byte(address); }
+ inline void write_r16(uint8_t address, uint16_t data) { m_program->write_byte((address - 1) & 0xff, data >> 8 & 0xff); m_program->write_byte(address, data & 0xff); }
- inline UINT8 read_p(UINT8 address) { return m_program->read_byte(0x100 + address); }
- inline void write_p(UINT8 address, UINT8 data) { m_program->write_byte(0x100 + address, data); }
+ inline uint8_t read_p(uint8_t address) { return m_program->read_byte(0x100 + address); }
+ inline void write_p(uint8_t address, uint8_t data) { m_program->write_byte(0x100 + address, data); }
- inline UINT8 read_mem8(UINT16 address) { return m_program->read_byte(address); }
- inline void write_mem8(UINT16 address, UINT8 data) { m_program->write_byte(address, data); }
- inline UINT16 read_mem16(UINT16 address) { return m_program->read_byte(address) << 8 | m_program->read_byte((address + 1) & 0xffff); }
- inline void write_mem16(UINT16 address, UINT16 data) { m_program->write_byte(address, data >> 8 & 0xff); m_program->write_byte((address + 1) & 0xffff, data & 0xff); }
+ inline uint8_t read_mem8(uint16_t address) { return m_program->read_byte(address); }
+ inline void write_mem8(uint16_t address, uint8_t data) { m_program->write_byte(address, data); }
+ inline uint16_t read_mem16(uint16_t address) { return m_program->read_byte(address) << 8 | m_program->read_byte((address + 1) & 0xffff); }
+ inline void write_mem16(uint16_t address, uint16_t data) { m_program->write_byte(address, data >> 8 & 0xff); m_program->write_byte((address + 1) & 0xffff, data & 0xff); }
- inline UINT8 imm8() { return m_direct->read_byte(m_pc++); }
- inline UINT16 imm16() { UINT16 ret = m_direct->read_byte(m_pc++) << 8; return ret | m_direct->read_byte(m_pc++); }
+ inline uint8_t imm8() { return m_direct->read_byte(m_pc++); }
+ inline uint16_t imm16() { uint16_t ret = m_direct->read_byte(m_pc++) << 8; return ret | m_direct->read_byte(m_pc++); }
- inline UINT8 pull8() { return m_program->read_byte(m_sp--); }
- inline void push8(UINT8 data) { m_program->write_byte(++m_sp, data); }
- inline UINT16 pull16() { UINT16 ret = m_program->read_byte(m_sp--); return ret | m_program->read_byte(m_sp--) << 8; }
- inline void push16(UINT16 data) { m_program->write_byte(++m_sp, data >> 8 & 0xff); m_program->write_byte(++m_sp, data & 0xff); }
+ inline uint8_t pull8() { return m_program->read_byte(m_sp--); }
+ inline void push8(uint8_t data) { m_program->write_byte(++m_sp, data); }
+ inline uint16_t pull16() { uint16_t ret = m_program->read_byte(m_sp--); return ret | m_program->read_byte(m_sp--) << 8; }
+ inline void push16(uint16_t data) { m_program->write_byte(++m_sp, data >> 8 & 0xff); m_program->write_byte(++m_sp, data & 0xff); }
// statusreg flags
enum
@@ -199,39 +199,39 @@ protected:
void sta_inx();
void sta_ind();
void stsp();
- void trap(UINT8 address);
- void illegal(UINT8 op);
-
- typedef int (tms7000_device::*op_func)(UINT8, UINT8);
- int op_clr(UINT8 param1, UINT8 param2);
- int op_dec(UINT8 param1, UINT8 param2);
- int op_inc(UINT8 param1, UINT8 param2);
- int op_inv(UINT8 param1, UINT8 param2);
- int op_rl(UINT8 param1, UINT8 param2);
- int op_rlc(UINT8 param1, UINT8 param2);
- int op_rr(UINT8 param1, UINT8 param2);
- int op_rrc(UINT8 param1, UINT8 param2);
- int op_swap(UINT8 param1, UINT8 param2);
- int op_xchb(UINT8 param1, UINT8 param2);
-
- int op_adc(UINT8 param1, UINT8 param2);
- int op_add(UINT8 param1, UINT8 param2);
- int op_and(UINT8 param1, UINT8 param2);
- int op_cmp(UINT8 param1, UINT8 param2);
- int op_dac(UINT8 param1, UINT8 param2);
- int op_dsb(UINT8 param1, UINT8 param2);
- int op_mpy(UINT8 param1, UINT8 param2);
- int op_mov(UINT8 param1, UINT8 param2);
- int op_or(UINT8 param1, UINT8 param2);
- int op_sbb(UINT8 param1, UINT8 param2);
- int op_sub(UINT8 param1, UINT8 param2);
- int op_xor(UINT8 param1, UINT8 param2);
+ void trap(uint8_t address);
+ void illegal(uint8_t op);
+
+ typedef int (tms7000_device::*op_func)(uint8_t, uint8_t);
+ int op_clr(uint8_t param1, uint8_t param2);
+ int op_dec(uint8_t param1, uint8_t param2);
+ int op_inc(uint8_t param1, uint8_t param2);
+ int op_inv(uint8_t param1, uint8_t param2);
+ int op_rl(uint8_t param1, uint8_t param2);
+ int op_rlc(uint8_t param1, uint8_t param2);
+ int op_rr(uint8_t param1, uint8_t param2);
+ int op_rrc(uint8_t param1, uint8_t param2);
+ int op_swap(uint8_t param1, uint8_t param2);
+ int op_xchb(uint8_t param1, uint8_t param2);
+
+ int op_adc(uint8_t param1, uint8_t param2);
+ int op_add(uint8_t param1, uint8_t param2);
+ int op_and(uint8_t param1, uint8_t param2);
+ int op_cmp(uint8_t param1, uint8_t param2);
+ int op_dac(uint8_t param1, uint8_t param2);
+ int op_dsb(uint8_t param1, uint8_t param2);
+ int op_mpy(uint8_t param1, uint8_t param2);
+ int op_mov(uint8_t param1, uint8_t param2);
+ int op_or(uint8_t param1, uint8_t param2);
+ int op_sbb(uint8_t param1, uint8_t param2);
+ int op_sub(uint8_t param1, uint8_t param2);
+ int op_xor(uint8_t param1, uint8_t param2);
void shortbranch(bool check);
void jmp(bool check);
- int op_djnz(UINT8 param1, UINT8 param2);
- int op_btjo(UINT8 param1, UINT8 param2);
- int op_btjz(UINT8 param1, UINT8 param2);
+ int op_djnz(uint8_t param1, uint8_t param2);
+ int op_btjo(uint8_t param1, uint8_t param2);
+ int op_btjz(uint8_t param1, uint8_t param2);
void am_a(op_func op);
void am_b(op_func op);
@@ -259,17 +259,17 @@ protected:
class tms7020_device : public tms7000_device
{
public:
- tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms7020_exl_device : public tms7000_device
{
public:
- tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
- virtual void execute_one(UINT8 op) override;
+ virtual void execute_one(uint8_t op) override;
private:
void lvdp();
@@ -279,35 +279,35 @@ private:
class tms7040_device : public tms7000_device
{
public:
- tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms70c00_device : public tms7000_device
{
public:
- tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms70c20_device : public tms7000_device
{
public:
- tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms70c40_device : public tms7000_device
{
public:
- tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms70c46_device : public tms7000_device
{
public:
- tms70c46_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms70c46_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER(control_r);
DECLARE_WRITE8_MEMBER(control_w);
@@ -327,35 +327,35 @@ protected:
virtual void device_reset() override;
private:
- UINT8 m_control;
+ uint8_t m_control;
};
class tms7001_device : public tms7000_device
{
public:
- tms7001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms7001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms7041_device : public tms7000_device
{
public:
- tms7041_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms7041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms7002_device : public tms7000_device
{
public:
- tms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class tms7042_device : public tms7000_device
{
public:
- tms7042_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ tms7042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};