summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/hmcs40/hmcs40.h
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/cpu/hmcs40/hmcs40.h
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/devices/cpu/hmcs40/hmcs40.h')
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.h120
1 files changed, 60 insertions, 60 deletions
diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h
index d9e30a92f72..225d5790b68 100644
--- a/src/devices/cpu/hmcs40/hmcs40.h
+++ b/src/devices/cpu/hmcs40/hmcs40.h
@@ -116,7 +116,7 @@ class hmcs40_cpu_device : public cpu_device
{
public:
// construction/destruction
- hmcs40_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int family, UINT16 polarity, int stack_levels, int pcwidth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ hmcs40_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, int family, uint16_t polarity, int stack_levels, int pcwidth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
, m_program_config("program", ENDIANNESS_LITTLE, 16, prgwidth, -1, program)
, m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data)
@@ -160,11 +160,11 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const override { return (clocks + 4 - 1) / 4; } // 4 cycles per machine cycle
- virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const override { return (cycles * 4); } // "
- virtual UINT32 execute_min_cycles() const override { return 1; }
- virtual UINT32 execute_max_cycles() const override { return 2; }
- virtual UINT32 execute_input_lines() const override { return 2+1; } // 3rd one is internal
+ virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return (clocks + 4 - 1) / 4; } // 4 cycles per machine cycle
+ virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 4); } // "
+ virtual uint32_t execute_min_cycles() const override { return 1; }
+ virtual uint32_t execute_max_cycles() const override { return 2; }
+ virtual uint32_t execute_input_lines() const override { return 2+1; } // 3rd one is internal
virtual void execute_set_input(int line, int state) override;
virtual void execute_run() override;
@@ -172,9 +172,9 @@ protected:
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
- virtual UINT32 disasm_min_opcode_bytes() const override { return 2; }
- virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
- 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 2; }
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
@@ -189,39 +189,39 @@ protected:
int m_prgmask;
int m_datamask;
int m_family; // MCU family (42-47)
- UINT16 m_polarity; // i/o polarity (pmos vs cmos)
+ uint16_t m_polarity; // i/o polarity (pmos vs cmos)
int m_stack_levels; // number of callstack levels
- UINT16 m_stack[4]; // max 4
- UINT16 m_op; // current opcode
- UINT16 m_prev_op;
- UINT8 m_i; // 4-bit immediate opcode param
+ uint16_t m_stack[4]; // max 4
+ uint16_t m_op; // current opcode
+ uint16_t m_prev_op;
+ uint8_t m_i; // 4-bit immediate opcode param
int m_eint_line; // which input_line caused an interrupt
emu_timer *m_timer;
int m_halt; // internal HLT state
attotime m_timer_halted_remain;
int m_icount;
- UINT16 m_pc; // Program Counter
- UINT16 m_prev_pc;
- UINT8 m_page; // LPU prepared page
- UINT8 m_a; // 4-bit Accumulator
- UINT8 m_b; // 4-bit B register
- UINT8 m_x; // 1/3/4-bit X register
- UINT8 m_spx; // 1/3/4-bit SPX register
- UINT8 m_y; // 4-bit Y register
- UINT8 m_spy; // 4-bit SPY register
- UINT8 m_s; // Status F/F (F/F = flip-flop)
- UINT8 m_c; // Carry F/F
- UINT8 m_tc; // Timer/Counter
- UINT8 m_cf; // CF F/F (timer mode or counter mode)
- UINT8 m_ie; // I/E(Interrupt Enable) F/F
- UINT8 m_iri; // external interrupt pending I/RI F/F
- UINT8 m_irt; // timer interrupt pending I/RT F/F
- UINT8 m_if[2]; // external interrupt mask IF0,1 F/F
- UINT8 m_tf; // timer interrupt mask TF F/F
- UINT8 m_int[2]; // INT0/1 pins state
- UINT8 m_r[8]; // R outputs state
- UINT16 m_d; // D pins state
+ uint16_t m_pc; // Program Counter
+ uint16_t m_prev_pc;
+ uint8_t m_page; // LPU prepared page
+ uint8_t m_a; // 4-bit Accumulator
+ uint8_t m_b; // 4-bit B register
+ uint8_t m_x; // 1/3/4-bit X register
+ uint8_t m_spx; // 1/3/4-bit SPX register
+ uint8_t m_y; // 4-bit Y register
+ uint8_t m_spy; // 4-bit SPY register
+ uint8_t m_s; // Status F/F (F/F = flip-flop)
+ uint8_t m_c; // Carry F/F
+ uint8_t m_tc; // Timer/Counter
+ uint8_t m_cf; // CF F/F (timer mode or counter mode)
+ uint8_t m_ie; // I/E(Interrupt Enable) F/F
+ uint8_t m_iri; // external interrupt pending I/RI F/F
+ uint8_t m_irt; // timer interrupt pending I/RT F/F
+ uint8_t m_if[2]; // external interrupt mask IF0,1 F/F
+ uint8_t m_tf; // timer interrupt mask TF F/F
+ uint8_t m_int[2]; // INT0/1 pins state
+ uint8_t m_r[8]; // R outputs state
+ uint16_t m_d; // D pins state
// i/o handlers
devcb_read8 m_read_r0, m_read_r1, m_read_r2, m_read_r3, m_read_r4, m_read_r5, m_read_r6, m_read_r7;
@@ -232,13 +232,13 @@ protected:
// misc internal helpers
void increment_pc();
- UINT8 ram_r();
- void ram_w(UINT8 data);
+ uint8_t ram_r();
+ void ram_w(uint8_t data);
void pop_stack();
void push_stack();
- virtual UINT8 read_r(int index);
- virtual void write_r(int index, UINT8 data);
+ virtual uint8_t read_r(int index);
+ virtual void write_r(int index, uint8_t data);
virtual int read_d(int index);
virtual void write_d(int index, int state);
@@ -349,109 +349,109 @@ protected:
class hmcs43_cpu_device : public hmcs40_cpu_device
{
public:
- hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT16 polarity, const char *shortname);
+ hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint16_t polarity, const char *shortname);
protected:
// overrides
- virtual UINT8 read_r(int index) override;
- virtual void write_r(int index, UINT8 data) override;
+ virtual uint8_t read_r(int index) override;
+ virtual void write_r(int index, uint8_t data) override;
virtual int read_d(int index) override;
};
class hd38750_device : public hmcs43_cpu_device
{
public:
- hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd38755_device : public hmcs43_cpu_device
{
public:
- hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd44750_device : public hmcs43_cpu_device
{
public:
- hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd44758_device : public hmcs43_cpu_device
{
public:
- hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hmcs44_cpu_device : public hmcs40_cpu_device
{
public:
- hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT16 polarity, const char *shortname);
+ hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint16_t polarity, const char *shortname);
protected:
// overrides
- virtual UINT8 read_r(int index) override;
- virtual void write_r(int index, UINT8 data) override;
+ virtual uint8_t read_r(int index) override;
+ virtual void write_r(int index, uint8_t data) override;
};
class hd38800_device : public hmcs44_cpu_device
{
public:
- hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd38805_device : public hmcs44_cpu_device
{
public:
- hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd44801_device : public hmcs44_cpu_device
{
public:
- hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd44808_device : public hmcs44_cpu_device
{
public:
- hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hmcs45_cpu_device : public hmcs40_cpu_device
{
public:
- hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT16 polarity, const char *shortname);
+ hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint16_t polarity, const char *shortname);
protected:
// overrides
- virtual UINT8 read_r(int index) override;
- virtual void write_r(int index, UINT8 data) override;
+ virtual uint8_t read_r(int index) override;
+ virtual void write_r(int index, uint8_t data) override;
};
class hd38820_device : public hmcs45_cpu_device
{
public:
- hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd38825_device : public hmcs45_cpu_device
{
public:
- hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd44820_device : public hmcs45_cpu_device
{
public:
- hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
class hd44828_device : public hmcs45_cpu_device
{
public:
- hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};