summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/alph8201/alph8201.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/alph8201/alph8201.h')
-rw-r--r--src/devices/cpu/alph8201/alph8201.h116
1 files changed, 58 insertions, 58 deletions
diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h
index 432f8193c69..d9b34389e69 100644
--- a/src/devices/cpu/alph8201/alph8201.h
+++ b/src/devices/cpu/alph8201/alph8201.h
@@ -50,8 +50,8 @@ class alpha8201_cpu_device : public cpu_device
{
public:
// construction/destruction
- alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- alpha8201_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);
+ alpha8201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ alpha8201_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);
protected:
// device-level overrides
@@ -59,9 +59,9 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT32 execute_min_cycles() const override { return 1; }
- virtual UINT32 execute_max_cycles() const override { return 16; }
- virtual UINT32 execute_input_lines() const override { return 1; }
+ virtual uint32_t execute_min_cycles() const override { return 1; }
+ virtual uint32_t execute_max_cycles() const override { return 16; }
+ virtual uint32_t execute_input_lines() const override { return 1; }
virtual void execute_run() override;
virtual void execute_set_input(int inputnum, int state) override;
@@ -74,25 +74,25 @@ 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;
- UINT8 M_RDMEM(UINT16 A) { return m_program->read_byte(A); }
- void M_WRMEM(UINT16 A,UINT8 V) { m_program->write_byte(A, V); }
- UINT8 M_RDOP(UINT16 A) { return m_direct->read_byte(A); }
- UINT8 M_RDOP_ARG(UINT16 A) { return m_direct->read_byte(A); }
- UINT8 RD_REG(UINT8 x) { return m_RAM[(m_regPtr<<3)+(x)]; }
- void WR_REG(UINT8 x, UINT8 d) { m_RAM[(m_regPtr<<3)+(x)]=(d); }
+ uint8_t M_RDMEM(uint16_t A) { return m_program->read_byte(A); }
+ void M_WRMEM(uint16_t A,uint8_t V) { m_program->write_byte(A, V); }
+ uint8_t M_RDOP(uint16_t A) { return m_direct->read_byte(A); }
+ uint8_t M_RDOP_ARG(uint16_t A) { return m_direct->read_byte(A); }
+ uint8_t RD_REG(uint8_t x) { return m_RAM[(m_regPtr<<3)+(x)]; }
+ void WR_REG(uint8_t x, uint8_t d) { m_RAM[(m_regPtr<<3)+(x)]=(d); }
unsigned M_RDMEM_OPCODE();
- void M_ADD(UINT8 dat);
- void M_ADDB(UINT8 dat);
- void M_SUB(UINT8 dat);
- void M_AND(UINT8 dat);
- void M_OR(UINT8 dat);
- void M_XOR(UINT8 dat);
- void M_JMP(UINT8 dat);
+ void M_ADD(uint8_t dat);
+ void M_ADDB(uint8_t dat);
+ void M_SUB(uint8_t dat);
+ void M_AND(uint8_t dat);
+ void M_OR(uint8_t dat);
+ void M_XOR(uint8_t dat);
+ void M_JMP(uint8_t dat);
void M_UNDEFINED();
void M_UNDEFINED2();
@@ -290,26 +290,26 @@ protected:
void ld_lp2_n() { m_lp2 = M_RDMEM_OPCODE(); }
void ld_b_n() { m_B = M_RDMEM_OPCODE(); }
- void djnz_lp0() { UINT8 i=M_RDMEM_OPCODE(); m_lp0--; if (m_lp0 != 0) M_JMP(i); }
- void djnz_lp1() { UINT8 i=M_RDMEM_OPCODE(); m_lp1--; if (m_lp1 != 0) M_JMP(i); }
- void djnz_lp2() { UINT8 i=M_RDMEM_OPCODE(); m_lp2--; if (m_lp2 != 0) M_JMP(i); }
- void jnz() { UINT8 i=M_RDMEM_OPCODE(); if (!m_zf) M_JMP(i); }
- void jnc() { UINT8 i=M_RDMEM_OPCODE(); if (!m_cf) M_JMP(i);}
- void jz() { UINT8 i=M_RDMEM_OPCODE(); if ( m_zf) M_JMP(i); }
- void jc() { UINT8 i=M_RDMEM_OPCODE(); if ( m_cf) M_JMP(i);}
+ void djnz_lp0() { uint8_t i=M_RDMEM_OPCODE(); m_lp0--; if (m_lp0 != 0) M_JMP(i); }
+ void djnz_lp1() { uint8_t i=M_RDMEM_OPCODE(); m_lp1--; if (m_lp1 != 0) M_JMP(i); }
+ void djnz_lp2() { uint8_t i=M_RDMEM_OPCODE(); m_lp2--; if (m_lp2 != 0) M_JMP(i); }
+ void jnz() { uint8_t i=M_RDMEM_OPCODE(); if (!m_zf) M_JMP(i); }
+ void jnc() { uint8_t i=M_RDMEM_OPCODE(); if (!m_cf) M_JMP(i);}
+ void jz() { uint8_t i=M_RDMEM_OPCODE(); if ( m_zf) M_JMP(i); }
+ void jc() { uint8_t i=M_RDMEM_OPCODE(); if ( m_cf) M_JMP(i);}
void jmp() { M_JMP(M_RDMEM_OPCODE() ); }
void stop();
/* ALPHA 8301 : added instruction */
- void exg_a_ix0() { UINT8 t=m_A; m_A = m_ix0.b.l; m_ix0.b.l = t; }
- void exg_a_ix1() { UINT8 t=m_A; m_A = m_ix1.b.l; m_ix1.b.l = t; }
- void exg_a_ix2() { UINT8 t=m_A; m_A = m_ix2.b.l; m_ix2.b.l = t; }
- void exg_a_lp0() { UINT8 t=m_A; m_A = m_lp0; m_lp0 = t; }
- void exg_a_lp1() { UINT8 t=m_A; m_A = m_lp1; m_lp1 = t; }
- void exg_a_lp2() { UINT8 t=m_A; m_A = m_lp2; m_lp2 = t; }
- void exg_a_b() { UINT8 t=m_A; m_A = m_B; m_B = t; }
- void exg_a_rb() { UINT8 t=m_A; m_A = m_regPtr; m_regPtr = t; }
+ void exg_a_ix0() { uint8_t t=m_A; m_A = m_ix0.b.l; m_ix0.b.l = t; }
+ void exg_a_ix1() { uint8_t t=m_A; m_A = m_ix1.b.l; m_ix1.b.l = t; }
+ void exg_a_ix2() { uint8_t t=m_A; m_A = m_ix2.b.l; m_ix2.b.l = t; }
+ void exg_a_lp0() { uint8_t t=m_A; m_A = m_lp0; m_lp0 = t; }
+ void exg_a_lp1() { uint8_t t=m_A; m_A = m_lp1; m_lp1 = t; }
+ void exg_a_lp2() { uint8_t t=m_A; m_A = m_lp2; m_lp2 = t; }
+ void exg_a_b() { uint8_t t=m_A; m_A = m_B; m_B = t; }
+ void exg_a_rb() { uint8_t t=m_A; m_A = m_regPtr; m_regPtr = t; }
void ld_ix0_a() { m_ix0.b.l = m_A; }
void ld_ix1_a() { m_ix1.b.l = m_A; }
@@ -320,8 +320,8 @@ protected:
void ld_b_a() { m_B = m_A; }
void ld_rb_a() { m_regPtr = m_A; }
- void exg_ix0_ix1() { UINT8 t=m_ix1.b.l; m_ix1.b.l = m_ix0.b.l; m_ix0.b.l = t; }
- void exg_ix0_ix2() { UINT8 t=m_ix2.b.l; m_ix2.b.l = m_ix0.b.l; m_ix0.b.l = t; }
+ void exg_ix0_ix1() { uint8_t t=m_ix1.b.l; m_ix1.b.l = m_ix0.b.l; m_ix0.b.l = t; }
+ void exg_ix0_ix2() { uint8_t t=m_ix2.b.l; m_ix2.b.l = m_ix0.b.l; m_ix0.b.l = t; }
void op_d4() { m_A = M_RDMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE() ); }
void op_d5() { M_WRMEM( ((m_RAM[(7<<3)+7] & 3) << 8) | M_RDMEM_OPCODE(), m_A ); }
@@ -337,16 +337,16 @@ protected:
void op_rep_ld_b_ix0() { do { m_RAM[(m_B>>1)&0x3f] = M_RDMEM(m_ix0.w.l); m_ix0.b.l++; m_B+=2; m_lp0--; } while (m_lp0 != 0); }
void ld_rxb_a() { m_RAM[(m_B>>1)&0x3f] = m_A; }
void ld_a_rxb() { m_A = m_RAM[(m_B>>1)&0x3f]; }
- void cmp_a_rxb() { UINT8 i=m_RAM[(m_B>>1)&0x3f]; m_zf = (m_A==i); m_cf = (m_A>=i); }
+ void cmp_a_rxb() { uint8_t i=m_RAM[(m_B>>1)&0x3f]; m_zf = (m_A==i); m_cf = (m_A>=i); }
void xor_a_rxb() { M_XOR(m_RAM[(m_B>>1)&0x3f] ); }
void add_a_cf() { if (m_cf) inc_a(); }
void sub_a_cf() { if (m_cf) dec_a(); }
void tst_a() { m_zf = (m_A==0); }
void clr_a() { m_A = 0; m_zf = (m_A==0); }
- void cmp_a_n() { UINT8 i=M_RDMEM_OPCODE(); m_zf = (m_A==i); m_cf = (m_A>=i); }
+ void cmp_a_n() { uint8_t i=M_RDMEM_OPCODE(); m_zf = (m_A==i); m_cf = (m_A>=i); }
void xor_a_n() { M_XOR(M_RDMEM_OPCODE() ); }
- void call() { UINT8 i=M_RDMEM_OPCODE(); m_retptr.w.l = m_pc.w.l; M_JMP(i); };
+ void call() { uint8_t i=M_RDMEM_OPCODE(); m_retptr.w.l = m_pc.w.l; M_JMP(i); };
void ld_a_ix0_a() { m_A = M_RDMEM(m_ix0.w.l+m_A); }
void ret() { m_mb = m_retptr.b.h; M_JMP( m_retptr.b.l ); };
void save_zc() { m_savez = m_zf; m_savec = m_cf; };
@@ -366,27 +366,27 @@ protected:
address_space_config m_program_config;
address_space_config m_io_config;
- UINT8 m_RAM[8*8]; /* internal GP register 8 * 8bank */
+ uint8_t m_RAM[8*8]; /* internal GP register 8 * 8bank */
unsigned m_PREVPC;
PAIR m_retptr; /* for 8301, return address of CALL */
PAIR m_pc; /* 2bit+8bit program counter */
- UINT8 m_regPtr; /* RB register base */
- UINT8 m_mb; /* MB memory bank reg. latch after Branch */
- UINT8 m_cf; /* C flag */
- UINT8 m_zf; /* Z flag */
- UINT8 m_savec; /* for 8301, save flags */
- UINT8 m_savez; /* for 8301, save flags */
+ uint8_t m_regPtr; /* RB register base */
+ uint8_t m_mb; /* MB memory bank reg. latch after Branch */
+ uint8_t m_cf; /* C flag */
+ uint8_t m_zf; /* Z flag */
+ uint8_t m_savec; /* for 8301, save flags */
+ uint8_t m_savez; /* for 8301, save flags */
//
PAIR m_ix0; /* 8bit memory read index reg. */
PAIR m_ix1; /* 8bitmemory read index reg. */
PAIR m_ix2; /* 8bitmemory write index reg. */
- UINT8 m_lp0; /* 8bit loop reg. */
- UINT8 m_lp1; /* 8bit loop reg. */
- UINT8 m_lp2; /* 8bit loop reg. */
- UINT8 m_A; /* 8bit accumerator */
- UINT8 m_B; /* 8bit regiser */
+ uint8_t m_lp0; /* 8bit loop reg. */
+ uint8_t m_lp1; /* 8bit loop reg. */
+ uint8_t m_lp2; /* 8bit loop reg. */
+ uint8_t m_A; /* 8bit accumerator */
+ uint8_t m_B; /* 8bit regiser */
//
- UINT8 m_halt; /* halt input line */
+ uint8_t m_halt; /* halt input line */
address_space *m_program;
direct_read_data *m_direct;
@@ -396,9 +396,9 @@ protected:
const s_opcode *m_opmap;
// Used for import/export only
- UINT8 m_sp;
- UINT8 m_R[8];
- UINT8 m_flags;
+ uint8_t m_sp;
+ uint8_t m_R[8];
+ uint8_t m_flags;
};
@@ -406,7 +406,7 @@ class alpha8301_cpu_device : public alpha8201_cpu_device
{
public:
// construction/destruction
- alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ alpha8301_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};