summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2017-01-16 17:03:06 +0100
committer hap <happppp@users.noreply.github.com>2017-01-16 17:03:06 +0100
commit408a8fceb44684f221214e74ab7c86983405a7b5 (patch)
treec68a4ffb7a7d0c72670c2e43d9233c9afe47f977
parent1d4bc8025a2b16529f209f797b40c1a95ffc77f4 (diff)
change some of my files to use abbreviated integer types (nw)
-rw-r--r--src/devices/cpu/amis2000/amis2000.cpp8
-rw-r--r--src/devices/cpu/amis2000/amis2000.h80
-rw-r--r--src/devices/cpu/amis2000/amis2000d.cpp12
-rw-r--r--src/devices/cpu/amis2000/amis2000op.cpp50
-rw-r--r--src/devices/cpu/e0c6200/e0c6200.cpp2
-rw-r--r--src/devices/cpu/e0c6200/e0c6200.h92
-rw-r--r--src/devices/cpu/e0c6200/e0c6200d.cpp12
-rw-r--r--src/devices/cpu/e0c6200/e0c6200op.cpp52
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.cpp26
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.h66
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.cpp54
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.h130
-rw-r--r--src/devices/cpu/hmcs40/hmcs40d.cpp16
-rw-r--r--src/devices/cpu/hmcs40/hmcs40op.cpp28
-rw-r--r--src/devices/cpu/sm510/kb1013vk1-2.h4
-rw-r--r--src/devices/cpu/sm510/kb1013vk1-2core.cpp4
-rw-r--r--src/devices/cpu/sm510/sm500.h6
-rw-r--r--src/devices/cpu/sm510/sm500core.cpp6
-rw-r--r--src/devices/cpu/sm510/sm510.cpp16
-rw-r--r--src/devices/cpu/sm510/sm510.h78
-rw-r--r--src/devices/cpu/sm510/sm510core.cpp4
-rw-r--r--src/devices/cpu/sm510/sm510d.cpp38
-rw-r--r--src/devices/cpu/sm510/sm510op.cpp22
-rw-r--r--src/devices/cpu/sm510/sm511core.cpp8
-rw-r--r--src/devices/cpu/tms1000/tms0270.cpp6
-rw-r--r--src/devices/cpu/tms1000/tms0270.h24
-rw-r--r--src/devices/cpu/tms1000/tms0970.cpp26
-rw-r--r--src/devices/cpu/tms1000/tms0970.h10
-rw-r--r--src/devices/cpu/tms1000/tms0980.cpp42
-rw-r--r--src/devices/cpu/tms1000/tms0980.h24
-rw-r--r--src/devices/cpu/tms1000/tms1000.cpp26
-rw-r--r--src/devices/cpu/tms1000/tms1000.h16
-rw-r--r--src/devices/cpu/tms1000/tms1100.cpp12
-rw-r--r--src/devices/cpu/tms1000/tms1100.h12
-rw-r--r--src/devices/cpu/tms1000/tms1400.cpp12
-rw-r--r--src/devices/cpu/tms1000/tms1400.h12
-rw-r--r--src/devices/cpu/tms1000/tms1k_base.cpp6
-rw-r--r--src/devices/cpu/tms1000/tms1k_base.h126
-rw-r--r--src/devices/cpu/tms1000/tms1k_dasm.cpp24
-rw-r--r--src/devices/cpu/tms1000/tp0320.cpp14
-rw-r--r--src/devices/cpu/tms1000/tp0320.h8
-rw-r--r--src/devices/cpu/ucom4/ucom4.cpp20
-rw-r--r--src/devices/cpu/ucom4/ucom4.h84
-rw-r--r--src/devices/cpu/ucom4/ucom4d.cpp14
-rw-r--r--src/devices/cpu/ucom4/ucom4op.cpp34
-rw-r--r--src/devices/machine/tms1024.cpp6
-rw-r--r--src/devices/machine/tms1024.h12
-rw-r--r--src/devices/machine/tms6100.cpp14
-rw-r--r--src/devices/machine/tms6100.h32
-rw-r--r--src/mame/drivers/cc40.cpp36
-rw-r--r--src/mame/drivers/fidel6502.cpp34
-rw-r--r--src/mame/drivers/fidel68k.cpp6
-rw-r--r--src/mame/drivers/fidelz80.cpp28
-rw-r--r--src/mame/drivers/hh_amis2k.cpp18
-rw-r--r--src/mame/drivers/hh_cop400.cpp56
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp172
-rw-r--r--src/mame/drivers/hh_melps4.cpp44
-rw-r--r--src/mame/drivers/hh_pic16.cpp30
-rw-r--r--src/mame/drivers/hh_sm510.cpp14
-rw-r--r--src/mame/drivers/hh_tms1k.cpp76
-rw-r--r--src/mame/drivers/hh_ucom4.cpp68
-rw-r--r--src/mame/drivers/k28.cpp42
-rw-r--r--src/mame/drivers/microvsn.cpp4
-rw-r--r--src/mame/drivers/novag6502.cpp44
-rw-r--r--src/mame/drivers/tb303.cpp6
-rw-r--r--src/mame/drivers/ti74.cpp14
-rw-r--r--src/mame/drivers/ticalc1x.cpp10
-rw-r--r--src/mame/drivers/tispeak.cpp18
-rw-r--r--src/mame/drivers/tispellb.cpp8
-rw-r--r--src/mame/includes/fidelz80.h34
-rw-r--r--src/mame/includes/hh_tms1k.h32
-rw-r--r--src/mame/includes/hh_ucom4.h28
-rw-r--r--src/mame/machine/alpha8201.cpp6
-rw-r--r--src/mame/machine/alpha8201.h12
74 files changed, 1135 insertions, 1135 deletions
diff --git a/src/devices/cpu/amis2000/amis2000.cpp b/src/devices/cpu/amis2000/amis2000.cpp
index a9b45e865b3..c79c858780c 100644
--- a/src/devices/cpu/amis2000/amis2000.cpp
+++ b/src/devices/cpu/amis2000/amis2000.cpp
@@ -55,15 +55,15 @@ ADDRESS_MAP_END
// device definitions
-amis2000_cpu_device::amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+amis2000_cpu_device::amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: amis2000_base_device(mconfig, AMI_S2000, "AMI S2000", tag, owner, clock, 2, 10, 3, 13, ADDRESS_MAP_NAME(program_1k), 6, ADDRESS_MAP_NAME(data_64x4), "amis2000", __FILE__)
{ }
-amis2150_cpu_device::amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+amis2150_cpu_device::amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: amis2000_base_device(mconfig, AMI_S2150, "AMI S2150", tag, owner, clock, 3, 11, 3, 13, ADDRESS_MAP_NAME(program_1_5k), 7, ADDRESS_MAP_NAME(data_80x4), "amis2150", __FILE__)
{ }
-amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: amis2000_base_device(mconfig, AMI_S2152, "AMI S2152", tag, owner, clock, 3, 11, 3, 13, ADDRESS_MAP_NAME(program_1_5k), 7, ADDRESS_MAP_NAME(data_80x4), "amis2152", __FILE__)
{ }
@@ -89,7 +89,7 @@ void amis2000_base_device::state_string_export(const device_state_entry &entry,
}
}
-offs_t amis2000_base_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t amis2000_base_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(amis2000);
return CPU_DISASSEMBLE_NAME(amis2000)(this, stream, pc, oprom, opram, options);
diff --git a/src/devices/cpu/amis2000/amis2000.h b/src/devices/cpu/amis2000/amis2000.h
index 76190cb3090..021ebb3f795 100644
--- a/src/devices/cpu/amis2000/amis2000.h
+++ b/src/devices/cpu/amis2000/amis2000.h
@@ -44,7 +44,7 @@ class amis2000_base_device : public cpu_device
{
public:
// construction/destruction
- amis2000_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t bu_bits, uint8_t callstack_bits, uint8_t callstack_depth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ amis2000_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 bu_bits, u8 callstack_bits, u8 callstack_depth, 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_BIG, 8, prgwidth, 0, program)
, m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
@@ -67,7 +67,7 @@ public:
template<class _Object> static devcb_base &set_write_d_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_write_d.set_callback(object); }
template<class _Object> static devcb_base &set_write_a_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_write_a.set_callback(object); }
template<class _Object> static devcb_base &set_write_f_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_write_f.set_callback(object); }
- static void set_7seg_table(device_t &device, const uint8_t *ptr) { downcast<amis2000_base_device &>(device).m_7seg_table = ptr; }
+ static void set_7seg_table(device_t &device, const u8 *ptr) { downcast<amis2000_base_device &>(device).m_7seg_table = ptr; }
protected:
// device-level overrides
@@ -75,20 +75,20 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- 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 1; }
+ virtual u64 execute_clocks_to_cycles(u64 clocks) const override { return (clocks + 4 - 1) / 4; } // 4 cycles per machine cycle
+ virtual u64 execute_cycles_to_clocks(u64 cycles) const override { return (cycles * 4); } // "
+ virtual u32 execute_min_cycles() const override { return 1; }
+ virtual u32 execute_max_cycles() const override { return 2; }
+ virtual u32 execute_input_lines() const override { return 1; }
virtual void execute_run() override;
// device_memory_interface overrides
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_t disasm_min_opcode_bytes() const override { return 1; }
- virtual uint32_t disasm_max_opcode_bytes() const override { return 1; }
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual u32 disasm_min_opcode_bytes() const override { return 1; }
+ virtual u32 disasm_max_opcode_bytes() const override { return 1; }
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
@@ -98,33 +98,33 @@ protected:
address_space *m_program;
address_space *m_data;
- uint8_t m_bu_bits;
- uint16_t m_bu_mask;
- uint8_t m_callstack_bits; // number of program counter bits held in callstack
- uint16_t m_callstack_mask;
- uint8_t m_callstack_depth; // callstack levels: 3 on 2000/2150, 5 on 2200/2400
- uint16_t m_callstack[5]; // max 5
+ u8 m_bu_bits;
+ u16 m_bu_mask;
+ u8 m_callstack_bits; // number of program counter bits held in callstack
+ u16 m_callstack_mask;
+ u8 m_callstack_depth; // callstack levels: 3 on 2000/2150, 5 on 2200/2400
+ u16 m_callstack[5]; // max 5
int m_icount;
- uint16_t m_pc; // 13-bit program counter
- uint8_t m_ppr; // prepared page register (PP 1)
- uint8_t m_pbr; // prepared bank register (PP 2)
- bool m_skip; // skip next opcode, including PP prefixes
- uint8_t m_op;
- uint8_t m_prev_op; // previous opcode, needed for PP, LAI, LB*
- uint8_t m_f; // generic flags: 2 on 2000/2150, 6 on 2200/2400
- uint8_t m_carry; // carry flag
- uint8_t m_bl; // 4-bit ram index x
- uint8_t m_bu; // 2/3-bit ram index y
- uint8_t m_acc; // 4-bit accumulator
- uint8_t m_e; // 4-bit generic register
- uint8_t m_ki_mask; // 4-bit k/i-pins select latch
- uint8_t m_d; // 8-bit d-pins latch
- bool m_d_active; // d-pins available for direct i/o(floating), or outputting d-latch
- uint8_t m_d_polarity; // invert d-latch output
- uint16_t m_a; // 13-bit a-pins latch (master strobe latch)
+ u16 m_pc; // 13-bit program counter
+ u8 m_ppr; // prepared page register (PP 1)
+ u8 m_pbr; // prepared bank register (PP 2)
+ bool m_skip; // skip next opcode, including PP prefixes
+ u8 m_op;
+ u8 m_prev_op; // previous opcode, needed for PP, LAI, LB*
+ u8 m_f; // generic flags: 2 on 2000/2150, 6 on 2200/2400
+ u8 m_carry; // carry flag
+ u8 m_bl; // 4-bit ram index x
+ u8 m_bu; // 2/3-bit ram index y
+ u8 m_acc; // 4-bit accumulator
+ u8 m_e; // 4-bit generic register
+ u8 m_ki_mask; // 4-bit k/i-pins select latch
+ u8 m_d; // 8-bit d-pins latch
+ bool m_d_active; // d-pins available for direct i/o(floating), or outputting d-latch
+ u8 m_d_polarity; // invert d-latch output
+ u16 m_a; // 13-bit a-pins latch (master strobe latch)
// i/o handlers
- const uint8_t *m_7seg_table;
+ const u8 *m_7seg_table;
devcb_read8 m_read_k;
devcb_read8 m_read_i;
devcb_read8 m_read_d;
@@ -133,8 +133,8 @@ protected:
devcb_write_line m_write_f;
// misc internal helpers
- uint8_t ram_r();
- void ram_w(uint8_t data);
+ u8 ram_r();
+ void ram_w(u8 data);
void pop_callstack();
void push_callstack();
void d_latch_out(bool active);
@@ -203,21 +203,21 @@ protected:
class amis2000_cpu_device : public amis2000_base_device
{
public:
- amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class amis2150_cpu_device : public amis2000_base_device
{
public:
- amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class amis2152_cpu_device : public amis2000_base_device
{
public:
- amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
@@ -225,7 +225,7 @@ protected:
virtual void device_reset() override;
// digital-to-frequency converter
- uint8_t m_d2f_latch;
+ u8 m_d2f_latch;
emu_timer *m_d2f_timer;
int m_fout_state;
diff --git a/src/devices/cpu/amis2000/amis2000d.cpp b/src/devices/cpu/amis2000/amis2000d.cpp
index 2dd3433718f..adf5e2ed338 100644
--- a/src/devices/cpu/amis2000/amis2000d.cpp
+++ b/src/devices/cpu/amis2000/amis2000d.cpp
@@ -32,7 +32,7 @@ static const char *const s_mnemonics[] =
};
// number of bits per opcode parameter, negative indicates complement
-static const int8_t s_bits[] =
+static const s8 s_bits[] =
{
0, 0, 4, 2, 2, 2, 2, 0, 0, 0,
-2, -2, -2, -2, 2, 2,
@@ -45,7 +45,7 @@ static const int8_t s_bits[] =
#define _OVER DASMFLAG_STEP_OVER
#define _OUT DASMFLAG_STEP_OUT
-static const uint32_t s_flags[] =
+static const u32 s_flags[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
@@ -56,7 +56,7 @@ static const uint32_t s_flags[] =
};
-static const uint8_t s2000_mnemonic[0x100] =
+static const u8 s2000_mnemonic[0x100] =
{
/* 0x00 */
mNOP, mHALT, mRT, mRTS, mPSH, mPSL, mAND, mSOS,
@@ -103,8 +103,8 @@ static const uint8_t s2000_mnemonic[0x100] =
CPU_DISASSEMBLE(amis2000)
{
int pos = 0;
- uint8_t op = oprom[pos++];
- uint8_t instr = s2000_mnemonic[op];
+ u8 op = oprom[pos++];
+ u8 instr = s2000_mnemonic[op];
util::stream_format(stream, "%-5s ", s_mnemonics[instr]);
@@ -117,7 +117,7 @@ CPU_DISASSEMBLE(amis2000)
if (mask != 0)
{
- uint8_t param = op;
+ u8 param = op;
if (complement)
param = ~param;
param &= mask;
diff --git a/src/devices/cpu/amis2000/amis2000op.cpp b/src/devices/cpu/amis2000/amis2000op.cpp
index 2962f5327cc..685be166c3e 100644
--- a/src/devices/cpu/amis2000/amis2000op.cpp
+++ b/src/devices/cpu/amis2000/amis2000op.cpp
@@ -8,15 +8,15 @@
// internal helpers
-inline uint8_t amis2000_base_device::ram_r()
+inline u8 amis2000_base_device::ram_r()
{
- uint16_t address = m_bu << 4 | m_bl;
+ u16 address = m_bu << 4 | m_bl;
return m_data->read_byte(address) & 0xf;
}
-inline void amis2000_base_device::ram_w(uint8_t data)
+inline void amis2000_base_device::ram_w(u8 data)
{
- uint16_t address = m_bu << 4 | m_bl;
+ u16 address = m_bu << 4 | m_bl;
m_data->write_byte(address, data & 0xf);
}
@@ -49,7 +49,7 @@ void amis2000_base_device::op_lai()
// note: only execute the first one in a sequence of LAI
if ((m_prev_op & 0xf0) != (m_op & 0xf0))
{
- uint8_t param = m_op & 0x0f;
+ u8 param = m_op & 0x0f;
m_acc = param;
m_ki_mask = param;
}
@@ -70,7 +70,7 @@ void amis2000_base_device::op_lae()
void amis2000_base_device::op_xab()
{
// XAB: exchange ACC with BL
- uint8_t old_acc = m_acc;
+ u8 old_acc = m_acc;
m_acc = m_bl;
m_bl = old_acc;
}
@@ -78,7 +78,7 @@ void amis2000_base_device::op_xab()
void amis2000_base_device::op_xabu()
{
// XABU: exchange ACC with BU
- uint8_t old_acc = m_acc;
+ u8 old_acc = m_acc;
m_acc = (m_acc & ~m_bu_mask) | (m_bu & m_bu_mask);
m_bu = old_acc & m_bu_mask;
}
@@ -86,7 +86,7 @@ void amis2000_base_device::op_xabu()
void amis2000_base_device::op_xae()
{
// XAE: exchange ACC with E
- uint8_t old_acc = m_acc;
+ u8 old_acc = m_acc;
m_acc = m_e;
m_e = old_acc;
}
@@ -97,7 +97,7 @@ void amis2000_base_device::op_lbe()
// note: only execute the first one in a sequence of LB*
if ((m_prev_op & 0xf0) != (m_op & 0xf0))
{
- uint8_t param = m_op & 0x03;
+ u8 param = m_op & 0x03;
m_bu = param & m_bu_mask;
m_bl = m_e;
}
@@ -109,7 +109,7 @@ void amis2000_base_device::op_lbep()
// note: only execute the first one in a sequence of LB*
if ((m_prev_op & 0xf0) != (m_op & 0xf0))
{
- uint8_t param = m_op & 0x03;
+ u8 param = m_op & 0x03;
m_bu = param & m_bu_mask;
m_bl = (m_e + 1) & 0xf;
}
@@ -121,7 +121,7 @@ void amis2000_base_device::op_lbz()
// note: only execute the first one in a sequence of LB*
if ((m_prev_op & 0xf0) != (m_op & 0xf0))
{
- uint8_t param = m_op & 0x03;
+ u8 param = m_op & 0x03;
m_bu = param & m_bu_mask;
m_bl = 0;
}
@@ -133,7 +133,7 @@ void amis2000_base_device::op_lbf()
// note: only execute the first one in a sequence of LB*
if ((m_prev_op & 0xf0) != (m_op & 0xf0))
{
- uint8_t param = m_op & 0x03;
+ u8 param = m_op & 0x03;
m_bu = param & m_bu_mask;
m_bl = 0xf;
}
@@ -146,17 +146,17 @@ void amis2000_base_device::op_lam()
{
// LAM _Y: load ACC with RAM, xor BU with _Y
m_acc = ram_r();
- uint8_t param = ~m_op & 0x03;
+ u8 param = ~m_op & 0x03;
m_bu ^= (param & m_bu_mask);
}
void amis2000_base_device::op_xc()
{
// XC _Y: exchange ACC with RAM, xor BU with _Y
- uint8_t old_acc = m_acc;
+ u8 old_acc = m_acc;
m_acc = ram_r();
ram_w(old_acc);
- uint8_t param = ~m_op & 0x03;
+ u8 param = ~m_op & 0x03;
m_bu ^= (param & m_bu_mask);
}
@@ -179,14 +179,14 @@ void amis2000_base_device::op_xcd()
void amis2000_base_device::op_stm()
{
// STM Z: set RAM bit Z
- uint8_t param = 1 << (m_op & 0x03);
+ u8 param = 1 << (m_op & 0x03);
ram_w(ram_r() | param);
}
void amis2000_base_device::op_rsm()
{
// RSM Z: reset RAM bit Z
- uint8_t param = 1 << (m_op & 0x03);
+ u8 param = 1 << (m_op & 0x03);
ram_w(ram_r() & ~param);
}
@@ -196,7 +196,7 @@ void amis2000_base_device::op_rsm()
void amis2000_base_device::op_inp()
{
// INP: input D-pins to ACC and RAM
- uint8_t in = m_d_active ? m_d : m_read_d(0, 0xff);
+ u8 in = m_d_active ? m_d : m_read_d(0, 0xff);
m_acc = in & 0xf;
ram_w(in >> 4 & 0xf);
}
@@ -217,12 +217,12 @@ void amis2000_base_device::op_disb()
void amis2000_base_device::op_disn()
{
// DISN: set D-latch to ACC+carry via on-die segment decoder
- static const uint8_t lut_segment_decoder[0x10] =
+ static const u8 lut_segment_decoder[0x10] =
{
// 0-F digits in bit order [DP]abcdefg
0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b, 0x77, 0x1f, 0x4e, 0x3d, 0x4f, 0x47
};
- const uint8_t *ptr = (m_7seg_table != nullptr) ? m_7seg_table : lut_segment_decoder;
+ const u8 *ptr = (m_7seg_table != nullptr) ? m_7seg_table : lut_segment_decoder;
m_d = ptr[m_acc] | (m_carry ? 0x80 : 0x00);
d_latch_out(true);
}
@@ -301,7 +301,7 @@ void amis2000_base_device::op_eur()
void amis2000_base_device::op_pp()
{
// PP _X: prepare page/bank with _X
- uint8_t param = ~m_op & 0x0f;
+ u8 param = ~m_op & 0x0f;
if ((m_prev_op & 0xf0) != (m_op & 0xf0))
m_ppr = param;
else
@@ -311,8 +311,8 @@ void amis2000_base_device::op_pp()
void amis2000_base_device::op_jmp()
{
// JMP X: jump to X(+PP)
- uint16_t mask = 0x3f;
- uint16_t param = m_op & mask;
+ u16 mask = 0x3f;
+ u16 param = m_op & mask;
// if previous opcode was PP, change PC high bits too
if ((m_prev_op & 0xf0) == 0x60)
@@ -371,7 +371,7 @@ void amis2000_base_device::op_szc()
void amis2000_base_device::op_szm()
{
// SZM Z: skip next on zero RAM bit Z
- uint8_t param = 1 << (m_op & 0x03);
+ u8 param = 1 << (m_op & 0x03);
m_skip = !(ram_r() & param);
}
@@ -432,7 +432,7 @@ void amis2000_base_device::op_adcs()
void amis2000_base_device::op_adis()
{
// ADIS X: add X to ACC, skip next on not carry
- uint8_t param = m_op & 0x0f;
+ u8 param = m_op & 0x0f;
m_acc += param;
m_skip = !(m_acc & 0x10);
m_acc &= 0xf;
diff --git a/src/devices/cpu/e0c6200/e0c6200.cpp b/src/devices/cpu/e0c6200/e0c6200.cpp
index a7ccf514438..e78351b19aa 100644
--- a/src/devices/cpu/e0c6200/e0c6200.cpp
+++ b/src/devices/cpu/e0c6200/e0c6200.cpp
@@ -40,7 +40,7 @@ void e0c6200_cpu_device::state_string_export(const device_state_entry &entry, st
}
}
-offs_t e0c6200_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t e0c6200_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(e0c6200);
return CPU_DISASSEMBLE_NAME(e0c6200)(this, stream, pc, oprom, opram, options);
diff --git a/src/devices/cpu/e0c6200/e0c6200.h b/src/devices/cpu/e0c6200/e0c6200.h
index bf43c80ad2b..4a38ae8fbf8 100644
--- a/src/devices/cpu/e0c6200/e0c6200.h
+++ b/src/devices/cpu/e0c6200/e0c6200.h
@@ -16,7 +16,7 @@ class e0c6200_cpu_device : public cpu_device
{
public:
// construction/destruction
- e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program, address_map_constructor data, const char *shortname, const char *source)
+ e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, address_map_constructor program, 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_BIG, 16, 13, -1, program)
, m_data_config("data", ENDIANNESS_BIG, 8, 12, 0, data), m_program(nullptr), m_data(nullptr), m_op(0), m_prev_op(0), m_irq_vector(0), m_irq_id(0), m_possible_irq(false), m_halt(false),
@@ -29,9 +29,9 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual uint32_t execute_min_cycles() const override { return 5; }
- virtual uint32_t execute_max_cycles() const override { return 14; } // longest opcode is 12 cycles, but interrupt service takes up to 14
- virtual uint32_t execute_input_lines() const override { return 1; }
+ virtual u32 execute_min_cycles() const override { return 5; }
+ virtual u32 execute_max_cycles() const override { return 14; } // longest opcode is 12 cycles, but interrupt service takes up to 14
+ virtual u32 execute_input_lines() const override { return 1; }
virtual void execute_run() override;
virtual void execute_one();
virtual bool check_interrupt() { return false; } // nothing to do by default
@@ -41,9 +41,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_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(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual u32 disasm_min_opcode_bytes() const override { return 2; }
+ virtual u32 disasm_max_opcode_bytes() const override { return 2; }
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
@@ -51,27 +51,27 @@ protected:
address_space *m_program;
address_space *m_data;
- uint16_t m_op;
- uint16_t m_prev_op;
- uint8_t m_irq_vector; // low 4 bits for new programcounter after interrupt
- int m_irq_id; // for standard_irq_callback(id)
- bool m_possible_irq; // indicates interrupts need to be re-checked
- bool m_halt; // cpu halt state
- bool m_sleep; // cpu sleep state
+ u16 m_op;
+ u16 m_prev_op;
+ u8 m_irq_vector; // low 4 bits for new programcounter after interrupt
+ int m_irq_id; // for standard_irq_callback(id)
+ bool m_possible_irq; // indicates interrupts need to be re-checked
+ bool m_halt; // cpu halt state
+ bool m_sleep; // cpu sleep state
int m_icount;
- uint16_t m_pc; // 13-bit programcounter: 1-bit bank, 4-bit page, 8-bit 'step'
- uint16_t m_prev_pc;
- uint16_t m_npc; // new bank/page prepared by pset
- uint16_t m_jpc; // actual bank/page destination for jumps
+ u16 m_pc; // 13-bit programcounter: 1-bit bank, 4-bit page, 8-bit 'step'
+ u16 m_prev_pc;
+ u16 m_npc; // new bank/page prepared by pset
+ u16 m_jpc; // actual bank/page destination for jumps
// all work registers are 4-bit
- uint8_t m_a; // accumulator
- uint8_t m_b; // generic
- uint8_t m_xp, m_xh, m_xl; // 12-bit index register when combined
- uint8_t m_yp, m_yh, m_yl; // "
- uint8_t m_sp; // stackpointer (SPH, SPL)
- uint8_t m_f; // flags
+ u8 m_a; // accumulator
+ u8 m_b; // generic
+ u8 m_xp, m_xh, m_xl; // 12-bit index register when combined
+ u8 m_yp, m_yh, m_yl; // "
+ u8 m_sp; // stackpointer (SPH, SPL)
+ u8 m_f; // flags
enum
{
C_FLAG = 1,
@@ -81,39 +81,39 @@ protected:
};
// internal data memory read/write
- uint8_t read_mx();
- uint8_t read_my();
- uint8_t read_mn();
- void write_mx(uint8_t data);
- void write_my(uint8_t data);
- void write_mn(uint8_t data);
+ u8 read_mx();
+ u8 read_my();
+ u8 read_mn();
+ void write_mx(u8 data);
+ void write_my(u8 data);
+ void write_mn(u8 data);
// common stack ops
- void push(uint8_t data);
- uint8_t pop();
+ void push(u8 data);
+ u8 pop();
void push_pc();
void pop_pc();
// misc internal helpers
- void set_cf(uint8_t data);
- void set_zf(uint8_t data);
+ void set_cf(u8 data);
+ void set_zf(u8 data);
void inc_x();
void inc_y();
void do_branch(int condition = 1);
// opcode handlers
- uint8_t op_inc(uint8_t x);
- uint8_t op_dec(uint8_t x);
- uint8_t op_add(uint8_t x, uint8_t y, int decimal = 0);
- uint8_t op_adc(uint8_t x, uint8_t y, int decimal = 0);
- uint8_t op_sub(uint8_t x, uint8_t y, int decimal = 0);
- uint8_t op_sbc(uint8_t x, uint8_t y, int decimal = 0);
-
- uint8_t op_and(uint8_t x, uint8_t y);
- uint8_t op_or(uint8_t x, uint8_t y);
- uint8_t op_xor(uint8_t x, uint8_t y);
- uint8_t op_rlc(uint8_t x);
- uint8_t op_rrc(uint8_t x);
+ u8 op_inc(u8 x);
+ u8 op_dec(u8 x);
+ u8 op_add(u8 x, u8 y, int decimal = 0);
+ u8 op_adc(u8 x, u8 y, int decimal = 0);
+ u8 op_sub(u8 x, u8 y, int decimal = 0);
+ u8 op_sbc(u8 x, u8 y, int decimal = 0);
+
+ u8 op_and(u8 x, u8 y);
+ u8 op_or(u8 x, u8 y);
+ u8 op_xor(u8 x, u8 y);
+ u8 op_rlc(u8 x);
+ u8 op_rrc(u8 x);
};
diff --git a/src/devices/cpu/e0c6200/e0c6200d.cpp b/src/devices/cpu/e0c6200/e0c6200d.cpp
index eb8c4d55091..fde754ef051 100644
--- a/src/devices/cpu/e0c6200/e0c6200d.cpp
+++ b/src/devices/cpu/e0c6200/e0c6200d.cpp
@@ -34,7 +34,7 @@ static const char *const em_name[] =
#define _OVER DASMFLAG_STEP_OVER
#define _OUT DASMFLAG_STEP_OUT
-static const uint32_t em_flags[] =
+static const u32 em_flags[] =
{
0, _OUT, _OVER, _OVER,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -56,7 +56,7 @@ enum e_params
// 0-digit is number of bits per opcode parameter, 0 bits is literal,
// 0x10-digit is for shift-right, 0x100-digit is special flag for r/q param
-static const uint16_t ep_bits[] =
+static const u16 ep_bits[] =
{
8, 8, 4, 0x102, 0x122, 0x142, 0x102,
0, 0, 0, 0,
@@ -65,7 +65,7 @@ static const uint16_t ep_bits[] =
};
// redirect for r/q param
-static const uint8_t ep_redirect_r[4] = { ep_A, ep_B, ep_MX, ep_MY };
+static const u8 ep_redirect_r[4] = { ep_A, ep_B, ep_MX, ep_MY };
// literal opcode parameter
static const char *const ep_name[] =
@@ -77,11 +77,11 @@ static const char *const ep_name[] =
};
-static char* decode_param(uint16_t opcode, int param, char* buffer)
+static char* decode_param(u16 opcode, int param, char* buffer)
{
int bits = ep_bits[param] & 0xf;
int shift = ep_bits[param] >> 4 & 0xf;
- uint16_t opmask = opcode >> shift & ((1 << bits) - 1);
+ u16 opmask = opcode >> shift & ((1 << bits) - 1);
// redirect r/q to A/B/MX/MY
if (ep_bits[param] & 0x100)
@@ -112,7 +112,7 @@ static char* decode_param(uint16_t opcode, int param, char* buffer)
CPU_DISASSEMBLE(e0c6200)
{
- uint16_t op = (oprom[1] | oprom[0] << 8) & 0xfff;
+ u16 op = (oprom[1] | oprom[0] << 8) & 0xfff;
int m;
int p1 = -1;
diff --git a/src/devices/cpu/e0c6200/e0c6200op.cpp b/src/devices/cpu/e0c6200/e0c6200op.cpp
index ed2d4a06031..94295e43889 100644
--- a/src/devices/cpu/e0c6200/e0c6200op.cpp
+++ b/src/devices/cpu/e0c6200/e0c6200op.cpp
@@ -10,38 +10,38 @@
// MX/MY
-uint8_t e0c6200_cpu_device::read_mx()
+u8 e0c6200_cpu_device::read_mx()
{
- uint16_t address = m_xp << 8 | m_xh << 4 | m_xl;
+ u16 address = m_xp << 8 | m_xh << 4 | m_xl;
return m_data->read_byte(address) & 0xf;
}
-uint8_t e0c6200_cpu_device::read_my()
+u8 e0c6200_cpu_device::read_my()
{
- uint16_t address = m_yp << 8 | m_yh << 4 | m_yl;
+ u16 address = m_yp << 8 | m_yh << 4 | m_yl;
return m_data->read_byte(address) & 0xf;
}
-void e0c6200_cpu_device::write_mx(uint8_t data)
+void e0c6200_cpu_device::write_mx(u8 data)
{
- uint16_t address = m_xp << 8 | m_xh << 4 | m_xl;
+ u16 address = m_xp << 8 | m_xh << 4 | m_xl;
m_data->write_byte(address, data);
}
-void e0c6200_cpu_device::write_my(uint8_t data)
+void e0c6200_cpu_device::write_my(u8 data)
{
- uint16_t address = m_yp << 8 | m_yh << 4 | m_yl;
+ u16 address = m_yp << 8 | m_yh << 4 | m_yl;
m_data->write_byte(address, data);
}
// Mn(RP)
-uint8_t e0c6200_cpu_device::read_mn()
+u8 e0c6200_cpu_device::read_mn()
{
return m_data->read_byte(m_op & 0xf) & 0xf;
}
-void e0c6200_cpu_device::write_mn(uint8_t data)
+void e0c6200_cpu_device::write_mn(u8 data)
{
m_data->write_byte(m_op & 0xf, data);
}
@@ -49,12 +49,12 @@ void e0c6200_cpu_device::write_mn(uint8_t data)
// common stack ops
-void e0c6200_cpu_device::push(uint8_t data)
+void e0c6200_cpu_device::push(u8 data)
{
m_data->write_byte(--m_sp, data);
}
-uint8_t e0c6200_cpu_device::pop()
+u8 e0c6200_cpu_device::pop()
{
return m_data->read_byte(m_sp++) & 0xf;
}
@@ -70,7 +70,7 @@ void e0c6200_cpu_device::push_pc()
void e0c6200_cpu_device::pop_pc()
{
// the highest bit(bank bit) is unchanged
- uint16_t bank = m_pc & 0x1000;
+ u16 bank = m_pc & 0x1000;
m_pc = pop();
m_pc |= pop() << 4;
m_pc |= pop() << 8;
@@ -80,13 +80,13 @@ void e0c6200_cpu_device::pop_pc()
// misc internal helpers
-void e0c6200_cpu_device::set_cf(uint8_t data)
+void e0c6200_cpu_device::set_cf(u8 data)
{
// set carry flag if bit 4 is set, reset otherwise
m_f = (m_f & ~C_FLAG) | ((data & 0x10) ? C_FLAG : 0);
}
-void e0c6200_cpu_device::set_zf(uint8_t data)
+void e0c6200_cpu_device::set_zf(u8 data)
{
// set zero flag if 4-bit data is 0, reset otherwise
m_f = (m_f & ~Z_FLAG) | ((data & 0xf) ? 0 : Z_FLAG);
@@ -121,7 +121,7 @@ void e0c6200_cpu_device::do_branch(int condition)
// arithmetic instructions
-uint8_t e0c6200_cpu_device::op_inc(uint8_t x)
+u8 e0c6200_cpu_device::op_inc(u8 x)
{
// INC x: increment x (flags: C, Z)
m_icount -= 2;
@@ -130,7 +130,7 @@ uint8_t e0c6200_cpu_device::op_inc(uint8_t x)
return x & 0xf;
}
-uint8_t e0c6200_cpu_device::op_dec(uint8_t x)
+u8 e0c6200_cpu_device::op_dec(u8 x)
{
// DEC x: decrement x (flags: C, Z)
m_icount -= 2;
@@ -139,7 +139,7 @@ uint8_t e0c6200_cpu_device::op_dec(uint8_t x)
return x & 0xf;
}
-uint8_t e0c6200_cpu_device::op_add(uint8_t x, uint8_t y, int decimal)
+u8 e0c6200_cpu_device::op_add(u8 x, u8 y, int decimal)
{
// ADD x,y: add y to x (flags: C, Z)
m_icount -= 2;
@@ -157,13 +157,13 @@ uint8_t e0c6200_cpu_device::op_add(uint8_t x, uint8_t y, int decimal)
return x & 0xf;
}
-uint8_t e0c6200_cpu_device::op_adc(uint8_t x, uint8_t y, int decimal)
+u8 e0c6200_cpu_device::op_adc(u8 x, u8 y, int decimal)
{
// ADC x,y: add with carry y to x (flags: C, Z)
return op_add(x, y + (m_f & 1), decimal);
}
-uint8_t e0c6200_cpu_device::op_sub(uint8_t x, uint8_t y, int decimal)
+u8 e0c6200_cpu_device::op_sub(u8 x, u8 y, int decimal)
{
// SUB x,y: subtract y from x (flags: C, Z)
m_icount -= 2;
@@ -178,7 +178,7 @@ uint8_t e0c6200_cpu_device::op_sub(uint8_t x, uint8_t y, int decimal)
return x & 0xf;
}
-uint8_t e0c6200_cpu_device::op_sbc(uint8_t x, uint8_t y, int decimal)
+u8 e0c6200_cpu_device::op_sbc(u8 x, u8 y, int decimal)
{
// SBC x,y: subtract with carry y from x (flags: C, Z)
return op_sub(x, y + (m_f & 1), decimal);
@@ -187,7 +187,7 @@ uint8_t e0c6200_cpu_device::op_sbc(uint8_t x, uint8_t y, int decimal)
// logical instructions
-uint8_t e0c6200_cpu_device::op_and(uint8_t x, uint8_t y)
+u8 e0c6200_cpu_device::op_and(u8 x, u8 y)
{
// AND x,y: logical AND x with y (flags: Z)
m_icount -= 2;
@@ -196,7 +196,7 @@ uint8_t e0c6200_cpu_device::op_and(uint8_t x, uint8_t y)
return x;
}
-uint8_t e0c6200_cpu_device::op_or(uint8_t x, uint8_t y)
+u8 e0c6200_cpu_device::op_or(u8 x, u8 y)
{
// OR x,y: logical OR x with y (flags: Z)
m_icount -= 2;
@@ -205,7 +205,7 @@ uint8_t e0c6200_cpu_device::op_or(uint8_t x, uint8_t y)
return x;
}
-uint8_t e0c6200_cpu_device::op_xor(uint8_t x, uint8_t y)
+u8 e0c6200_cpu_device::op_xor(u8 x, u8 y)
{
// XOR x,y: exclusive-OR x with y (flags: Z)
m_icount -= 2;
@@ -214,7 +214,7 @@ uint8_t e0c6200_cpu_device::op_xor(uint8_t x, uint8_t y)
return x;
}
-uint8_t e0c6200_cpu_device::op_rlc(uint8_t x)
+u8 e0c6200_cpu_device::op_rlc(u8 x)
{
// RLC x: rotate x left through carry (flags: C, Z)
m_icount -= 2;
@@ -223,7 +223,7 @@ uint8_t e0c6200_cpu_device::op_rlc(uint8_t x)
return x & 0xf;
}
-uint8_t e0c6200_cpu_device::op_rrc(uint8_t x)
+u8 e0c6200_cpu_device::op_rrc(u8 x)
{
// RRC x: rotate x right through carry (flags: C, Z)
// note: RRC only takes 5 clock cycles
diff --git a/src/devices/cpu/e0c6200/e0c6s46.cpp b/src/devices/cpu/e0c6200/e0c6s46.cpp
index 4feed3f4e32..49a754adf33 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.cpp
+++ b/src/devices/cpu/e0c6200/e0c6s46.cpp
@@ -45,7 +45,7 @@ ADDRESS_MAP_END
// device definitions
-e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: e0c6200_cpu_device(mconfig, E0C6S46, "E0C6S46", tag, owner, clock, ADDRESS_MAP_NAME(e0c6s46_program), ADDRESS_MAP_NAME(e0c6s46_data), "e0c6s46", __FILE__)
, m_vram1(*this, "vram1")
, m_vram2(*this, "vram2"), m_osc(0), m_svd(0), m_lcd_control(0), m_lcd_contrast(0)
@@ -279,7 +279,7 @@ void e0c6s46_device::execute_set_input(int line, int state)
state = (state) ? 1 : 0;
int port = line >> 2 & 1;
- uint8_t bit = 1 << (line & 3);
+ u8 bit = 1 << (line & 3);
m_port_k[port] = (m_port_k[port] & ~bit) | (state ? bit : 0);
}
@@ -292,13 +292,13 @@ void e0c6s46_device::execute_set_input(int line, int state)
// R output ports
-void e0c6s46_device::write_r(uint8_t port, uint8_t data)
+void e0c6s46_device::write_r(u8 port, u8 data)
{
data &= 0xf;
m_port_r[port] = data;
// ports R0x-R3x can be high-impedance
- uint8_t out = data;
+ u8 out = data;
if (port < 4 && !(m_r_dir >> port & 1))
out = 0xf;
@@ -327,14 +327,14 @@ void e0c6s46_device::write_r4_out()
// R40: _FOUT(clock inverted output)
// R42: FOUT or _BZ
// R43: BZ(buzzer)
- uint8_t out = (m_port_r[4] & 2) | (m_bz_pulse << 3) | (m_bz_pulse << 2 ^ 4);
+ u8 out = (m_port_r[4] & 2) | (m_bz_pulse << 3) | (m_bz_pulse << 2 ^ 4);
m_write_r4(4, out, 0xff);
}
// P I/O ports
-void e0c6s46_device::write_p(uint8_t port, uint8_t data)
+void e0c6s46_device::write_p(u8 port, u8 data)
{
data &= 0xf;
m_port_p[port] = data;
@@ -352,7 +352,7 @@ void e0c6s46_device::write_p(uint8_t port, uint8_t data)
}
}
-uint8_t e0c6s46_device::read_p(uint8_t port)
+u8 e0c6s46_device::read_p(u8 port)
{
// return written value if port direction is set to output
if (m_p_dir >> port & 1)
@@ -416,7 +416,7 @@ void e0c6s46_device::clock_clktimer()
m_clktimer_count++;
// irq on falling edge of 32, 8, 2, 1hz
- uint8_t flag = 0;
+ u8 flag = 0;
if ((m_clktimer_count & 0x07) == 0)
flag |= 1;
if ((m_clktimer_count & 0x1f) == 0)
@@ -488,7 +488,7 @@ void e0c6s46_device::clock_prgtimer()
bool e0c6s46_device::prgtimer_reset_prescaler()
{
// only 2 to 7 are clock dividers
- uint8_t sel = m_prgtimer_select & 7;
+ u8 sel = m_prgtimer_select & 7;
if (sel >= 2)
m_prgtimer_handle->adjust(attotime::from_ticks(2 << (sel ^ 7), unscaled_clock()));
@@ -572,12 +572,12 @@ void e0c6s46_device::clock_bz_1shot()
// LCD Driver
//-------------------------------------------------
-uint32_t e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// call this 32 times per second (osc1/1024: 32hz at default clock of 32768hz)
for (int bank = 0; bank < 2; bank++)
{
- const uint8_t* vram = bank ? m_vram2 : m_vram1;
+ const u8* vram = bank ? m_vram2 : m_vram1;
// determine operating mode
bool lcd_on = false;
@@ -626,7 +626,7 @@ READ8_MEMBER(e0c6s46_device::io_r)
case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05:
{
// irq flags are reset(acked) when read
- uint8_t flag = m_irqflag[offset];
+ u8 flag = m_irqflag[offset];
if (!space.debugger_access())
m_irqflag[offset] = 0;
return flag;
@@ -719,7 +719,7 @@ WRITE8_MEMBER(e0c6s46_device::io_w)
// irq masks
case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15:
{
- static const uint8_t maskmask[6] = { 0xf, 3, 1, 1, 0xf, 0xf };
+ static const u8 maskmask[6] = { 0xf, 3, 1, 1, 0xf, 0xf };
m_irqmask[offset-0x10] = data & maskmask[offset-0x10];
m_possible_irq = true;
break;
diff --git a/src/devices/cpu/e0c6200/e0c6s46.h b/src/devices/cpu/e0c6200/e0c6s46.h
index 0d3ad7c250c..53de2dab486 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.h
+++ b/src/devices/cpu/e0c6200/e0c6s46.h
@@ -66,7 +66,7 @@ typedef void (*e0c6s46_pixel_update_func)(device_t &device, bitmap_ind16 &bitmap
class e0c6s46_device : public e0c6200_cpu_device
{
public:
- e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// static configuration helpers
template<class _Object> static devcb_base &set_write_r0_callback(device_t &device, _Object object) { return downcast<e0c6s46_device &>(device).m_write_r0.set_callback(object); }
@@ -89,7 +89,7 @@ public:
DECLARE_READ8_MEMBER(io_r);
DECLARE_WRITE8_MEMBER(io_w);
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
@@ -97,40 +97,40 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual uint32_t execute_input_lines() const override { return 8; }
+ virtual u32 execute_input_lines() const override { return 8; }
virtual void execute_set_input(int line, int state) override;
virtual void execute_one() override;
virtual bool check_interrupt() override;
private:
- required_shared_ptr<uint8_t> m_vram1;
- required_shared_ptr<uint8_t> m_vram2;
+ required_shared_ptr<u8> m_vram1;
+ required_shared_ptr<u8> m_vram2;
- uint8_t m_irqflag[6];
- uint8_t m_irqmask[6];
- uint8_t m_osc;
- uint8_t m_svd;
+ u8 m_irqflag[6];
+ u8 m_irqmask[6];
+ u8 m_osc;
+ u8 m_svd;
- uint8_t m_lcd_control;
- uint8_t m_lcd_contrast;
+ u8 m_lcd_control;
+ u8 m_lcd_contrast;
e0c6s46_pixel_update_func m_pixel_update_handler;
// i/o ports
devcb_write8 m_write_r0, m_write_r1, m_write_r2, m_write_r3, m_write_r4;
devcb_read8 m_read_p0, m_read_p1, m_read_p2, m_read_p3;
devcb_write8 m_write_p0, m_write_p1, m_write_p2, m_write_p3;
- void write_r(uint8_t port, uint8_t data);
+ void write_r(u8 port, u8 data);
void write_r4_out();
- void write_p(uint8_t port, uint8_t data);
- uint8_t read_p(uint8_t port);
+ void write_p(u8 port, u8 data);
+ u8 read_p(u8 port);
- uint8_t m_port_r[5];
- uint8_t m_r_dir;
- uint8_t m_port_p[4];
- uint8_t m_p_dir;
- uint8_t m_p_pullup;
- uint8_t m_port_k[2];
- uint8_t m_dfk0;
+ u8 m_port_r[5];
+ u8 m_r_dir;
+ u8 m_port_p[4];
+ u8 m_p_dir;
+ u8 m_p_pullup;
+ u8 m_port_k[2];
+ u8 m_dfk0;
// timers
int m_256_src_pulse;
@@ -139,34 +139,34 @@ private:
int m_watchdog_count;
void clock_watchdog();
- uint8_t m_clktimer_count;
+ u8 m_clktimer_count;
void clock_clktimer();
- uint8_t m_stopwatch_on;
+ u8 m_stopwatch_on;
int m_swl_cur_pulse;
int m_swl_slice;
int m_swl_count;
int m_swh_count;
void clock_stopwatch();
- uint8_t m_prgtimer_select;
- uint8_t m_prgtimer_on;
+ u8 m_prgtimer_select;
+ u8 m_prgtimer_on;
int m_prgtimer_src_pulse;
int m_prgtimer_cur_pulse;
- uint8_t m_prgtimer_count;
- uint8_t m_prgtimer_reload;
+ u8 m_prgtimer_count;
+ u8 m_prgtimer_reload;
emu_timer *m_prgtimer_handle;
TIMER_CALLBACK_MEMBER(prgtimer_cb);
bool prgtimer_reset_prescaler();
void clock_prgtimer();
- uint8_t m_bz_43_on;
- uint8_t m_bz_freq;
- uint8_t m_bz_envelope;
- uint8_t m_bz_duty_ratio;
- uint8_t m_bz_1shot_on;
+ u8 m_bz_43_on;
+ u8 m_bz_freq;
+ u8 m_bz_envelope;
+ u8 m_bz_duty_ratio;
+ u8 m_bz_1shot_on;
bool m_bz_1shot_running;
- uint8_t m_bz_1shot_count;
+ u8 m_bz_1shot_count;
int m_bz_pulse;
emu_timer *m_buzzer_handle;
TIMER_CALLBACK_MEMBER(buzzer_cb);
diff --git a/src/devices/cpu/hmcs40/hmcs40.cpp b/src/devices/cpu/hmcs40/hmcs40.cpp
index a15b7cc907c..fcc61b40fe7 100644
--- a/src/devices/cpu/hmcs40/hmcs40.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40.cpp
@@ -78,56 +78,56 @@ ADDRESS_MAP_END
// device definitions
-hmcs43_cpu_device::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)
+hmcs43_cpu_device::hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u16 polarity, const char *shortname)
: hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, HMCS40_FAMILY_HMCS43, polarity, 3 /* stack levels */, 10 /* pc width */, 11 /* prg width */, ADDRESS_MAP_NAME(program_1k), 7 /* data width */, ADDRESS_MAP_NAME(data_80x4), shortname, __FILE__)
{ }
-hd38750_device::hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd38750_device::hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs43_cpu_device(mconfig, HD38750, "HD38750", tag, owner, clock, IS_PMOS, "hd38750")
{ }
-hd38755_device::hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd38755_device::hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs43_cpu_device(mconfig, HD38755, "HD38755", tag, owner, clock, IS_PMOS, "hd38755")
{ }
-hd44750_device::hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd44750_device::hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs43_cpu_device(mconfig, HD44750, "HD44750", tag, owner, clock, IS_CMOS, "hd44750")
{ }
-hd44758_device::hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd44758_device::hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs43_cpu_device(mconfig, HD44758, "HD44758", tag, owner, clock, IS_CMOS, "hd44758")
{ }
-hmcs44_cpu_device::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)
+hmcs44_cpu_device::hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u16 polarity, const char *shortname)
: hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, HMCS40_FAMILY_HMCS44, polarity, 4, 11, 12, ADDRESS_MAP_NAME(program_2k), 8, ADDRESS_MAP_NAME(data_160x4), shortname, __FILE__)
{ }
-hd38800_device::hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd38800_device::hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs44_cpu_device(mconfig, HD38800, "HD38800", tag, owner, clock, IS_PMOS, "hd38800")
{ }
-hd38805_device::hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd38805_device::hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs44_cpu_device(mconfig, HD38805, "HD38805", tag, owner, clock, IS_PMOS, "hd38805")
{ }
-hd44801_device::hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd44801_device::hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs44_cpu_device(mconfig, HD44801, "HD44801", tag, owner, clock, IS_CMOS, "hd44801")
{ }
-hd44808_device::hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd44808_device::hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs44_cpu_device(mconfig, HD44808, "HD44808", tag, owner, clock, IS_CMOS, "hd44808")
{ }
-hmcs45_cpu_device::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)
+hmcs45_cpu_device::hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u16 polarity, const char *shortname)
: hmcs40_cpu_device(mconfig, type, name, tag, owner, clock, HMCS40_FAMILY_HMCS45, polarity, 4, 11, 12, ADDRESS_MAP_NAME(program_2k), 8, ADDRESS_MAP_NAME(data_160x4), shortname, __FILE__)
{ }
-hd38820_device::hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd38820_device::hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs45_cpu_device(mconfig, HD38820, "HD38820", tag, owner, clock, IS_PMOS, "hd38820")
{ }
-hd38825_device::hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd38825_device::hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs45_cpu_device(mconfig, HD38825, "HD38825", tag, owner, clock, IS_PMOS, "hd38825")
{ }
-hd44820_device::hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd44820_device::hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs45_cpu_device(mconfig, HD44820, "HD44820", tag, owner, clock, IS_CMOS, "hd44820")
{ }
-hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: hmcs45_cpu_device(mconfig, HD44828, "HD44828", tag, owner, clock, IS_CMOS, "hd44828")
{ }
@@ -148,7 +148,7 @@ void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std
}
}
-offs_t hmcs40_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t hmcs40_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(hmcs40);
return CPU_DISASSEMBLE_NAME(hmcs40)(this, stream, pc, oprom, opram, options);
@@ -306,10 +306,10 @@ void hmcs40_cpu_device::device_reset()
// i/o handling
//-------------------------------------------------
-uint8_t hmcs40_cpu_device::read_r(int index)
+u8 hmcs40_cpu_device::read_r(int index)
{
index &= 7;
- uint8_t inp = 0;
+ u8 inp = 0;
switch (index)
{
@@ -329,7 +329,7 @@ uint8_t hmcs40_cpu_device::read_r(int index)
return (inp | m_r[index]) & 0xf;
}
-void hmcs40_cpu_device::write_r(int index, uint8_t data)
+void hmcs40_cpu_device::write_r(int index, u8 data)
{
index &= 7;
data &= 0xf;
@@ -371,7 +371,7 @@ void hmcs40_cpu_device::write_d(int index, int state)
// R0 is input-only, R1 is i/o, R2,R3 are output-only, no R4-R7
// D0-D3 are i/o, D4-D15 are output-only
-uint8_t hmcs43_cpu_device::read_r(int index)
+u8 hmcs43_cpu_device::read_r(int index)
{
index &= 7;
@@ -381,7 +381,7 @@ uint8_t hmcs43_cpu_device::read_r(int index)
return hmcs40_cpu_device::read_r(index);
}
-void hmcs43_cpu_device::write_r(int index, uint8_t data)
+void hmcs43_cpu_device::write_r(int index, u8 data)
{
index &= 7;
@@ -405,7 +405,7 @@ int hmcs43_cpu_device::read_d(int index)
// R0-R3 are i/o, R4,R5 are extra registers, no R6,R7
// D0-D15 are i/o
-uint8_t hmcs44_cpu_device::read_r(int index)
+u8 hmcs44_cpu_device::read_r(int index)
{
index &= 7;
@@ -415,7 +415,7 @@ uint8_t hmcs44_cpu_device::read_r(int index)
return hmcs40_cpu_device::read_r(index);
}
-void hmcs44_cpu_device::write_r(int index, uint8_t data)
+void hmcs44_cpu_device::write_r(int index, u8 data)
{
index &= 7;
@@ -429,7 +429,7 @@ void hmcs44_cpu_device::write_r(int index, uint8_t data)
// R0-R5 are i/o, R6 is output-only, no R7
// D0-D15 are i/o
-uint8_t hmcs45_cpu_device::read_r(int index)
+u8 hmcs45_cpu_device::read_r(int index)
{
index &= 7;
@@ -439,7 +439,7 @@ uint8_t hmcs45_cpu_device::read_r(int index)
return hmcs40_cpu_device::read_r(index);
}
-void hmcs45_cpu_device::write_r(int index, uint8_t data)
+void hmcs45_cpu_device::write_r(int index, u8 data)
{
index &= 7;
@@ -553,8 +553,8 @@ void hmcs40_cpu_device::increment_tc()
inline void hmcs40_cpu_device::increment_pc()
{
// PC lower bits is a LFSR identical to TI TMS1000
- uint8_t mask = 0x3f;
- uint8_t low = m_pc & mask;
+ u8 mask = 0x3f;
+ u8 low = m_pc & mask;
int fb = (low << 1 & 0x20) == (low & 0x20);
if (low == (mask >> 1))
diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h
index 38a6d20169d..43ea2035ad4 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_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)
+ hmcs40_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, int family, u16 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_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 u64 execute_clocks_to_cycles(u64 clocks) const override { return (clocks + 4 - 1) / 4; } // 4 cycles per machine cycle
+ virtual u64 execute_cycles_to_clocks(u64 cycles) const override { return (cycles * 4); } // "
+ virtual u32 execute_min_cycles() const override { return 1; }
+ virtual u32 execute_max_cycles() const override { return 2; }
+ virtual u32 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_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(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual u32 disasm_min_opcode_bytes() const override { return 2; }
+ virtual u32 disasm_max_opcode_bytes() const override { return 2; }
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
address_space_config m_program_config;
@@ -182,46 +182,46 @@ protected:
address_space *m_program;
address_space *m_data;
- int m_pcwidth; // Program Counter bit-width
+ int m_pcwidth; // Program Counter bit-width
int m_prgwidth;
int m_datawidth;
int m_pcmask;
int m_prgmask;
int m_datamask;
- int m_family; // MCU family (42-47)
- uint16_t m_polarity; // i/o polarity (pmos vs cmos)
- int m_stack_levels; // number of callstack levels
- 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
+ int m_family; // MCU family (42-47)
+ u16 m_polarity; // i/o polarity (pmos vs cmos)
+ int m_stack_levels; // number of callstack levels
+ u16 m_stack[4]; // max 4
+ u16 m_op; // current opcode
+ u16 m_prev_op;
+ u8 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
+ int m_halt; // internal HLT state
attotime m_timer_halted_remain;
int m_icount;
- 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
+ u16 m_pc; // Program Counter
+ u16 m_prev_pc;
+ u8 m_page; // LPU prepared page
+ u8 m_a; // 4-bit Accumulator
+ u8 m_b; // 4-bit B register
+ u8 m_x; // 1/3/4-bit X register
+ u8 m_spx; // 1/3/4-bit SPX register
+ u8 m_y; // 4-bit Y register
+ u8 m_spy; // 4-bit SPY register
+ u8 m_s; // Status F/F (F/F = flip-flop)
+ u8 m_c; // Carry F/F
+ u8 m_tc; // Timer/Counter
+ u8 m_cf; // CF F/F (timer mode or counter mode)
+ u8 m_ie; // I/E(Interrupt Enable) F/F
+ u8 m_iri; // external interrupt pending I/RI F/F
+ u8 m_irt; // timer interrupt pending I/RT F/F
+ u8 m_if[2]; // external interrupt mask IF0,1 F/F
+ u8 m_tf; // timer interrupt mask TF F/F
+ u8 m_int[2]; // INT0/1 pins state
+ u8 m_r[8]; // R outputs state
+ u16 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_t ram_r();
- void ram_w(uint8_t data);
+ u8 ram_r();
+ void ram_w(u8 data);
void pop_stack();
void push_stack();
- virtual uint8_t read_r(int index);
- virtual void write_r(int index, uint8_t data);
+ virtual u8 read_r(int index);
+ virtual void write_r(int index, u8 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_t clock, uint16_t polarity, const char *shortname);
+ hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u16 polarity, const char *shortname);
protected:
// overrides
- virtual uint8_t read_r(int index) override;
- virtual void write_r(int index, uint8_t data) override;
+ virtual u8 read_r(int index) override;
+ virtual void write_r(int index, u8 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_t clock);
+ hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd38755_device : public hmcs43_cpu_device
{
public:
- hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd44750_device : public hmcs43_cpu_device
{
public:
- hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd44758_device : public hmcs43_cpu_device
{
public:
- hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 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_t clock, uint16_t polarity, const char *shortname);
+ hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u16 polarity, const char *shortname);
protected:
// overrides
- virtual uint8_t read_r(int index) override;
- virtual void write_r(int index, uint8_t data) override;
+ virtual u8 read_r(int index) override;
+ virtual void write_r(int index, u8 data) override;
};
class hd38800_device : public hmcs44_cpu_device
{
public:
- hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd38805_device : public hmcs44_cpu_device
{
public:
- hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd44801_device : public hmcs44_cpu_device
{
public:
- hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd44808_device : public hmcs44_cpu_device
{
public:
- hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 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_t clock, uint16_t polarity, const char *shortname);
+ hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u16 polarity, const char *shortname);
protected:
// overrides
- virtual uint8_t read_r(int index) override;
- virtual void write_r(int index, uint8_t data) override;
+ virtual u8 read_r(int index) override;
+ virtual void write_r(int index, u8 data) override;
};
class hd38820_device : public hmcs45_cpu_device
{
public:
- hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd38825_device : public hmcs45_cpu_device
{
public:
- hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd44820_device : public hmcs45_cpu_device
{
public:
- hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class hd44828_device : public hmcs45_cpu_device
{
public:
- hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/cpu/hmcs40/hmcs40d.cpp b/src/devices/cpu/hmcs40/hmcs40d.cpp
index 867972d82db..0b05d8b3f76 100644
--- a/src/devices/cpu/hmcs40/hmcs40d.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40d.cpp
@@ -46,7 +46,7 @@ static const char *const s_mnemonics[] =
};
// number of bits per opcode parameter, 99 means (XY) parameter, negative means reversed bit-order
-static const int8_t s_bits[] =
+static const s8 s_bits[] =
{
0,
0, 0, 0, 0, 0, 4,
@@ -65,7 +65,7 @@ static const int8_t s_bits[] =
#define _OVER DASMFLAG_STEP_OVER
#define _OUT DASMFLAG_STEP_OUT
-static const uint32_t s_flags[] =
+static const u32 s_flags[] =
{
0,
0, 0, 0, 0, 0, 0,
@@ -82,7 +82,7 @@ static const uint32_t s_flags[] =
};
// next program counter in sequence (relative)
-static const int8_t s_next_pc[0x40] =
+static const s8 s_next_pc[0x40] =
{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32+0x40 /* rollback */,
@@ -91,7 +91,7 @@ static const int8_t s_next_pc[0x40] =
};
-static const uint8_t hmcs40_mnemonic[0x400] =
+static const u8 hmcs40_mnemonic[0x400] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/* 0x000 */
@@ -186,9 +186,9 @@ static const uint8_t hmcs40_mnemonic[0x400] =
CPU_DISASSEMBLE(hmcs40)
{
- uint16_t op = (oprom[0] | oprom[1] << 8) & 0x3ff;
- uint8_t instr = hmcs40_mnemonic[op];
- int8_t bits = s_bits[instr];
+ u16 op = (oprom[0] | oprom[1] << 8) & 0x3ff;
+ u8 instr = hmcs40_mnemonic[op];
+ s8 bits = s_bits[instr];
// special case for (XY) opcode
if (bits == 99)
@@ -207,7 +207,7 @@ CPU_DISASSEMBLE(hmcs40)
// opcode parameter
if (bits != 0)
{
- uint8_t param = op;
+ u8 param = op;
// reverse bits
if (bits < 0)
diff --git a/src/devices/cpu/hmcs40/hmcs40op.cpp b/src/devices/cpu/hmcs40/hmcs40op.cpp
index 31a74d76905..da89ff44fe7 100644
--- a/src/devices/cpu/hmcs40/hmcs40op.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40op.cpp
@@ -8,15 +8,15 @@
// internal helpers
-inline uint8_t hmcs40_cpu_device::ram_r()
+inline u8 hmcs40_cpu_device::ram_r()
{
- uint8_t address = (m_x << 4 | m_y) & m_datamask;
+ u8 address = (m_x << 4 | m_y) & m_datamask;
return m_data->read_byte(address) & 0xf;
}
-inline void hmcs40_cpu_device::ram_w(uint8_t data)
+inline void hmcs40_cpu_device::ram_w(u8 data)
{
- uint8_t address = (m_x << 4 | m_y) & m_datamask;
+ u8 address = (m_x << 4 | m_y) & m_datamask;
m_data->write_byte(address, data & 0xf);
}
@@ -81,7 +81,7 @@ void hmcs40_cpu_device::op_xamr()
// XAMR m: Exchange A and MR(m)
// determine MR(Memory Register) location
- uint8_t address = m_op & 0xf;
+ u8 address = m_op & 0xf;
// HMCS42: MR0 on file 0, MR4-MR15 on file 4 (there is no file 1-3)
// HMCS43: MR0-MR3 on file 0-3, MR4-MR15 on file 4
@@ -93,7 +93,7 @@ void hmcs40_cpu_device::op_xamr()
address |= 0xf0;
address &= m_datamask;
- uint8_t old_a = m_a;
+ u8 old_a = m_a;
m_a = m_data->read_byte(address) & 0xf;
m_data->write_byte(address, old_a & 0xf);
}
@@ -160,13 +160,13 @@ void hmcs40_cpu_device::op_xsp()
// XSP (XY): Exchange X and SPX, Y and SPY, or NOP if 0
if (m_op & 1)
{
- uint8_t old_x = m_x;
+ u8 old_x = m_x;
m_x = m_spx;
m_spx = old_x;
}
if (m_op & 2)
{
- uint8_t old_y = m_y;
+ u8 old_y = m_y;
m_y = m_spy;
m_spy = old_y;
}
@@ -192,7 +192,7 @@ void hmcs40_cpu_device::op_lbm()
void hmcs40_cpu_device::op_xma()
{
// XMA (XY): Exchange Memory and A
- uint8_t old_a = m_a;
+ u8 old_a = m_a;
m_a = ram_r();
ram_w(old_a);
op_xsp();
@@ -201,7 +201,7 @@ void hmcs40_cpu_device::op_xma()
void hmcs40_cpu_device::op_xmb()
{
// XMB (XY): Exchange Memory and B
- uint8_t old_b = m_b;
+ u8 old_b = m_b;
m_b = ram_r();
ram_w(old_b);
op_xsp();
@@ -357,7 +357,7 @@ void hmcs40_cpu_device::op_rotl()
void hmcs40_cpu_device::op_rotr()
{
// ROTR: Rotate Right A with Carry
- uint8_t c = m_a & 1;
+ u8 c = m_a & 1;
m_a = m_a >> 1 | m_c << 3;
m_c = c;
}
@@ -470,7 +470,7 @@ void hmcs40_cpu_device::op_lpu()
void hmcs40_cpu_device::op_tbr()
{
// TBR p: Table Branch
- uint16_t address = m_a | m_b << 4 | m_c << 8 | (m_op & 7) << 9 | (m_pc & ~0x3f);
+ u16 address = m_a | m_b << 4 | m_c << 8 | (m_op & 7) << 9 | (m_pc & ~0x3f);
m_pc = address & m_pcmask;
}
@@ -661,8 +661,8 @@ void hmcs40_cpu_device::op_p()
{
// P p: Pattern Generation
m_icount--;
- uint16_t address = m_a | m_b << 4 | m_c << 8 | (m_op & 7) << 9 | (m_pc & ~0x3f);
- uint16_t o = m_program->read_word((address & m_prgmask) << 1);
+ u16 address = m_a | m_b << 4 | m_c << 8 | (m_op & 7) << 9 | (m_pc & ~0x3f);
+ u16 o = m_program->read_word((address & m_prgmask) << 1);
// destination is determined by the 2 highest bits
if (o & 0x100)
diff --git a/src/devices/cpu/sm510/kb1013vk1-2.h b/src/devices/cpu/sm510/kb1013vk1-2.h
index 56896c940ac..031fa1d6bcf 100644
--- a/src/devices/cpu/sm510/kb1013vk1-2.h
+++ b/src/devices/cpu/sm510/kb1013vk1-2.h
@@ -23,10 +23,10 @@
class kb1013vk12_device : public sm500_device
{
public:
- kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual void execute_one() override;
// opcode handlers
diff --git a/src/devices/cpu/sm510/kb1013vk1-2core.cpp b/src/devices/cpu/sm510/kb1013vk1-2core.cpp
index b7286e97401..a6848bb7696 100644
--- a/src/devices/cpu/sm510/kb1013vk1-2core.cpp
+++ b/src/devices/cpu/sm510/kb1013vk1-2core.cpp
@@ -28,13 +28,13 @@ static ADDRESS_MAP_START(data_5x13x4, AS_DATA, 8, sm510_base_device)
ADDRESS_MAP_END
// device definitions
-kb1013vk12_device::kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+kb1013vk12_device::kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: sm500_device(mconfig, KB1013VK12, "KB1013VK1-2", tag, owner, clock, 1 /* stack levels */, 11 /* prg width */, ADDRESS_MAP_NAME(program_1_8k), 7 /* data width */, ADDRESS_MAP_NAME(data_5x13x4), "kb1013vk1-2", __FILE__)
{ }
// disasm
-offs_t kb1013vk12_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t kb1013vk12_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(kb1013vk12);
return CPU_DISASSEMBLE_NAME(kb1013vk12)(this, stream, pc, oprom, opram, options);
diff --git a/src/devices/cpu/sm510/sm500.h b/src/devices/cpu/sm510/sm500.h
index 262c75fc29b..8c6cc5bd4e5 100644
--- a/src/devices/cpu/sm510/sm500.h
+++ b/src/devices/cpu/sm510/sm500.h
@@ -46,11 +46,11 @@ O36 48 | * | 13 K2
class sm500_device : public sm510_base_device
{
public:
- sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- sm500_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ sm500_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
protected:
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual void execute_one() override;
virtual void get_opcode_param() override;
diff --git a/src/devices/cpu/sm510/sm500core.cpp b/src/devices/cpu/sm510/sm500core.cpp
index 84c1c557eb6..370a4c14ebd 100644
--- a/src/devices/cpu/sm510/sm500core.cpp
+++ b/src/devices/cpu/sm510/sm500core.cpp
@@ -28,17 +28,17 @@ ADDRESS_MAP_END
// device definitions
-sm500_device::sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sm500_device::sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: sm510_base_device(mconfig, SM500, "SM500", tag, owner, clock, 1 /* stack levels */, 11 /* prg width */, ADDRESS_MAP_NAME(program_1_2k), 6 /* data width */, ADDRESS_MAP_NAME(data_4x10x4), "sm500", __FILE__)
{ }
-sm500_device::sm500_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+sm500_device::sm500_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: sm510_base_device(mconfig, type, name, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data, shortname, source)
{ }
// disasm
-offs_t sm500_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t sm500_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(sm500);
return CPU_DISASSEMBLE_NAME(sm500)(this, stream, pc, oprom, opram, options);
diff --git a/src/devices/cpu/sm510/sm510.cpp b/src/devices/cpu/sm510/sm510.cpp
index decfcce4e56..6fcd0fe21b5 100644
--- a/src/devices/cpu/sm510/sm510.cpp
+++ b/src/devices/cpu/sm510/sm510.cpp
@@ -148,13 +148,13 @@ void sm510_base_device::device_reset()
// lcd driver
//-------------------------------------------------
-inline uint16_t sm510_base_device::get_lcd_row(int column, uint8_t* ram)
+inline u16 sm510_base_device::get_lcd_row(int column, u8* ram)
{
// output 0 if lcd blackpate/bleeder is off, or in case row doesn't exist
if (ram == nullptr || m_bc || !m_bp)
return 0;
- uint16_t rowdata = 0;
+ u16 rowdata = 0;
for (int i = 0; i < 0x10; i++)
rowdata |= (ram[i] >> column & 1) << i;
@@ -172,7 +172,7 @@ TIMER_CALLBACK_MEMBER(sm510_base_device::lcd_timer_cb)
m_write_segc(h | SM510_PORT_SEGC, get_lcd_row(h, m_lcd_ram_c), 0xffff);
// bs output from L/X and Y regs
- uint8_t bs = (m_l >> h & 1) | ((m_x*2) >> h & 2);
+ u8 bs = (m_l >> h & 1) | ((m_x*2) >> h & 2);
m_write_segbs(h | SM510_PORT_SEGBS, (m_bc || !m_bp) ? 0 : bs, 0xffff);
}
@@ -200,7 +200,7 @@ void sm510_base_device::clock_melody()
// tone cycle table (SM511/SM512 datasheet fig.5)
// cmd 0 = cmd, 1 = stop, > 13 = illegal(unknown)
- static const uint8_t lut_tone_cycles[4*16] =
+ static const u8 lut_tone_cycles[4*16] =
{
0, 0, 7, 8, 8, 9, 9, 10,11,11,12,13,14,14, 7*2, 8*2,
0, 0, 8, 8, 9, 9, 10,11,11,12,13,13,14,15, 8*2, 8*2,
@@ -208,8 +208,8 @@ void sm510_base_device::clock_melody()
0, 0, 8, 9, 9, 10,10,11,11,12,13,14,14,15, 8*2, 9*2
};
- uint8_t cmd = m_melody_rom[m_melody_address] & 0x3f;
- uint8_t out = 0;
+ u8 cmd = m_melody_rom[m_melody_address] & 0x3f;
+ u8 out = 0;
// clock duty cycle if tone is active
if ((cmd & 0xf) > 1)
@@ -234,7 +234,7 @@ void sm510_base_device::clock_melody()
// clock time base on F8(d7)
if ((m_div & 0x7f) == 0)
{
- uint8_t mask = (cmd & 0x20) ? 0x1f : 0x0f;
+ u8 mask = (cmd & 0x20) ? 0x1f : 0x0f;
m_melody_step_count = (m_melody_step_count + 1) & mask;
if (m_melody_step_count == 0)
@@ -257,7 +257,7 @@ void sm510_base_device::init_melody()
// verify melody rom
for (int i = 0; i < 0x100; i++)
{
- uint8_t data = m_melody_rom[i];
+ u8 data = m_melody_rom[i];
if (data & 0xc0 || (data & 0x0f) > 13)
logerror("%s unknown melody ROM data $%02X at $%02X\n", tag(), data, i);
}
diff --git a/src/devices/cpu/sm510/sm510.h b/src/devices/cpu/sm510/sm510.h
index c60b0395af2..2bfab3f2284 100644
--- a/src/devices/cpu/sm510/sm510.h
+++ b/src/devices/cpu/sm510/sm510.h
@@ -92,7 +92,7 @@ class sm510_base_device : public cpu_device
{
public:
// construction/destruction
- sm510_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ sm510_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, int stack_levels, 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, 8, prgwidth, 0, program)
, m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data)
@@ -126,11 +126,11 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return (clocks + 2 - 1) / 2; } // default 2 cycles per machine cycle
- virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 2); } // "
- 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 1; }
+ virtual u64 execute_clocks_to_cycles(u64 clocks) const override { return (clocks + 2 - 1) / 2; } // default 2 cycles per machine cycle
+ virtual u64 execute_cycles_to_clocks(u64 cycles) const override { return (cycles * 2); } // "
+ virtual u32 execute_min_cycles() const override { return 1; }
+ virtual u32 execute_max_cycles() const override { return 2; }
+ virtual u32 execute_input_lines() const override { return 1; }
virtual void execute_set_input(int line, int state) override;
virtual void execute_run() override;
virtual void execute_one() { } // -> child class
@@ -139,8 +139,8 @@ 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_t disasm_min_opcode_bytes() const override { return 1; }
- virtual uint32_t disasm_max_opcode_bytes() const override { return 0x40; } // actually 2, but debugger doesn't like non-linear pc
+ virtual u32 disasm_min_opcode_bytes() const override { return 1; }
+ virtual u32 disasm_max_opcode_bytes() const override { return 0x40; } // actually 2, but debugger doesn't like non-linear pc
address_space_config m_program_config;
address_space_config m_data_config;
@@ -152,51 +152,51 @@ protected:
int m_prgmask;
int m_datamask;
- uint16_t m_pc, m_prev_pc;
- uint16_t m_op, m_prev_op;
- uint8_t m_param;
+ u16 m_pc, m_prev_pc;
+ u16 m_op, m_prev_op;
+ u8 m_param;
int m_stack_levels;
- uint16_t m_stack[2];
+ u16 m_stack[2];
int m_icount;
- uint8_t m_acc;
- uint8_t m_bl;
- uint8_t m_bm;
+ u8 m_acc;
+ u8 m_bl;
+ u8 m_bm;
bool m_sbm;
- uint8_t m_c;
+ u8 m_c;
bool m_skip;
- uint8_t m_w;
- uint8_t m_r;
+ u8 m_w;
+ u8 m_r;
bool m_k_active;
bool m_halt;
// lcd driver
- optional_shared_ptr<uint8_t> m_lcd_ram_a, m_lcd_ram_b, m_lcd_ram_c;
+ optional_shared_ptr<u8> m_lcd_ram_a, m_lcd_ram_b, m_lcd_ram_c;
devcb_write16 m_write_sega, m_write_segb, m_write_segc, m_write_segbs;
emu_timer *m_lcd_timer;
- uint8_t m_l, m_x;
- uint8_t m_y;
+ u8 m_l, m_x;
+ u8 m_y;
bool m_bp;
bool m_bc;
- uint16_t get_lcd_row(int column, uint8_t* ram);
+ u16 get_lcd_row(int column, u8* ram);
TIMER_CALLBACK_MEMBER(lcd_timer_cb);
virtual void init_lcd_driver();
// melody controller
- optional_region_ptr<uint8_t> m_melody_rom;
- uint8_t m_melody_rd;
- uint8_t m_melody_step_count;
- uint8_t m_melody_duty_count;
- uint8_t m_melody_duty_index;
- uint8_t m_melody_address;
+ optional_region_ptr<u8> m_melody_rom;
+ u8 m_melody_rd;
+ u8 m_melody_step_count;
+ u8 m_melody_duty_count;
+ u8 m_melody_duty_index;
+ u8 m_melody_address;
void clock_melody();
void init_melody();
// interrupt/divider
emu_timer *m_div_timer;
- uint16_t m_div;
+ u16 m_div;
bool m_1s;
bool wake_me_up();
@@ -215,12 +215,12 @@ protected:
virtual void get_opcode_param() { }
virtual void update_w_latch() { }
- uint8_t ram_r();
- void ram_w(uint8_t data);
+ u8 ram_r();
+ void ram_w(u8 data);
void pop_stack();
void push_stack();
- void do_branch(uint8_t pu, uint8_t pm, uint8_t pl);
- uint8_t bitmask(uint16_t param);
+ void do_branch(u8 pu, u8 pm, u8 pl);
+ u8 bitmask(u16 param);
// opcode handlers
virtual void op_lb();
@@ -295,10 +295,10 @@ protected:
class sm510_device : public sm510_base_device
{
public:
- sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual void execute_one() override;
virtual void get_opcode_param() override;
@@ -309,11 +309,11 @@ protected:
class sm511_device : public sm510_base_device
{
public:
- sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- sm511_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ sm511_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
protected:
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual void execute_one() override;
virtual void get_opcode_param() override;
};
@@ -321,7 +321,7 @@ protected:
class sm512_device : public sm511_device
{
public:
- sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/cpu/sm510/sm510core.cpp b/src/devices/cpu/sm510/sm510core.cpp
index de503fcbc54..c886c178cfa 100644
--- a/src/devices/cpu/sm510/sm510core.cpp
+++ b/src/devices/cpu/sm510/sm510core.cpp
@@ -30,13 +30,13 @@ ADDRESS_MAP_END
// device definitions
-sm510_device::sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sm510_device::sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: sm510_base_device(mconfig, SM510, "SM510", tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, ADDRESS_MAP_NAME(program_2_7k), 7 /* data width */, ADDRESS_MAP_NAME(data_96_32x4), "sm510", __FILE__)
{ }
// disasm
-offs_t sm510_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t sm510_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(sm510);
return CPU_DISASSEMBLE_NAME(sm510)(this, stream, pc, oprom, opram, options);
diff --git a/src/devices/cpu/sm510/sm510d.cpp b/src/devices/cpu/sm510/sm510d.cpp
index 3929c52a82f..030b2157f63 100644
--- a/src/devices/cpu/sm510/sm510d.cpp
+++ b/src/devices/cpu/sm510/sm510d.cpp
@@ -69,7 +69,7 @@ static const char *const s_mnemonics[] =
};
// number of bits per opcode parameter, 8 or larger means 2-byte opcode
-static const uint8_t s_bits[] =
+static const u8 s_bits[] =
{
0, 8,
4, 8, 0, 0, 0, 0,
@@ -99,7 +99,7 @@ static const uint8_t s_bits[] =
#define _OVER DASMFLAG_STEP_OVER
#define _OUT DASMFLAG_STEP_OUT
-static const uint32_t s_flags[] =
+static const u32 s_flags[] =
{
0, 0,
0, 0, 0, 0, 0, 0,
@@ -127,7 +127,7 @@ static const uint32_t s_flags[] =
};
// next program counter in sequence (relative)
-static const int8_t s_next_pc[0x40] =
+static const s8 s_next_pc[0x40] =
{
32, -1 /* rollback */, -1, 30, 30, -3, -3, 28, 28, -5, -5, 26, 26, -7, -7, 24,
24, -9, -9, 22, 22, -11, -11, 20, 20, -13, -13, 18, 18, -15, -15, 16,
@@ -139,16 +139,16 @@ static const int8_t s_next_pc[0x40] =
// common disasm
-static offs_t sm510_common_disasm(const uint8_t *lut_mnemonic, const uint8_t *lut_extended, std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram)
+static offs_t sm510_common_disasm(const u8 *lut_mnemonic, const u8 *lut_extended, std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram)
{
// get raw opcode
- uint8_t op = oprom[0];
- uint8_t instr = lut_mnemonic[op];
+ u8 op = oprom[0];
+ u8 instr = lut_mnemonic[op];
int len = 1;
int bits = s_bits[instr];
- uint8_t mask = op & ((1 << (bits & 7)) - 1);
- uint16_t param = mask;
+ u8 mask = op & ((1 << (bits & 7)) - 1);
+ u16 param = mask;
if (bits >= 8)
{
// note: disasm view shows correct parameter, but raw view does not
@@ -180,7 +180,7 @@ static offs_t sm510_common_disasm(const uint8_t *lut_mnemonic, const uint8_t *lu
}
else
{
- uint16_t address = (param << 4 & 0xc00) | (mask << 6 & 0x3c0) | (param & 0x03f);
+ u16 address = (param << 4 & 0xc00) | (mask << 6 & 0x3c0) | (param & 0x03f);
util::stream_format(stream, "$%03X", address);
}
@@ -195,7 +195,7 @@ static offs_t sm510_common_disasm(const uint8_t *lut_mnemonic, const uint8_t *lu
// SM510 disasm
-static const uint8_t sm510_mnemonic[0x100] =
+static const u8 sm510_mnemonic[0x100] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
mSKIP, mATBP, mSBM, mATPL, mRM, mRM, mRM, mRM, mADD, mADD11,mCOMA, mEXBLA,mSM, mSM, mSM, mSM, // 0
@@ -227,7 +227,7 @@ CPU_DISASSEMBLE(sm510)
// SM511 disasm
-static const uint8_t sm511_mnemonic[0x100] =
+static const u8 sm511_mnemonic[0x100] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
mROT, mDTA, mSBM, mATPL, mRM, mRM, mRM, mRM, mADD, mADD11,mCOMA, mEXBLA,mSM, mSM, mSM, mSM, // 0
@@ -251,7 +251,7 @@ static const uint8_t sm511_mnemonic[0x100] =
mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM, mTM // F
};
-static const uint8_t sm511_extended[0x10] =
+static const u8 sm511_extended[0x10] =
{
mRME, mSME, mTMEL, mATFC, mBDC, mATBP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 60 3
};
@@ -259,7 +259,7 @@ static const uint8_t sm511_extended[0x10] =
CPU_DISASSEMBLE(sm511)
{
// create extended opcode table
- uint8_t ext[0x100];
+ u8 ext[0x100];
memset(ext, 0, 0x100);
memcpy(ext + 0x30, sm511_extended, 0x10);
@@ -269,7 +269,7 @@ CPU_DISASSEMBLE(sm511)
// SM500 disasm
-static const uint8_t sm500_mnemonic[0x100] =
+static const u8 sm500_mnemonic[0x100] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
mSKIP, mATR, mEXKSA,mATBP, mRM, mRM, mRM, mRM, mADD, mADDC, mCOMA, mEXBLA,mSM, mSM, mSM, mSM, // 0
@@ -293,7 +293,7 @@ static const uint8_t sm500_mnemonic[0x100] =
mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS, mTRS // F
};
-static const uint8_t sm500_extended[0x10] =
+static const u8 sm500_extended[0x10] =
{
mCEND, 0, 0, 0, mDTA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 5E 0
};
@@ -301,7 +301,7 @@ static const uint8_t sm500_extended[0x10] =
CPU_DISASSEMBLE(sm500)
{
// create extended opcode table
- uint8_t ext[0x100];
+ u8 ext[0x100];
memset(ext, 0, 0x100);
memcpy(ext + 0x00, sm500_extended, 0x10);
@@ -311,7 +311,7 @@ CPU_DISASSEMBLE(sm500)
// KB1013VK1-2 disasm
-static const uint8_t kb1013vk12_mnemonic[0x100] =
+static const u8 kb1013vk12_mnemonic[0x100] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
mNOP, mOAR, mBS1, mEN, mBM0, mBM0, mBM0, mBM0, mAM, mAC, mCOM, mXL, mBM1, mBM1, mBM1, mBM1, // 0
@@ -335,7 +335,7 @@ static const uint8_t kb1013vk12_mnemonic[0x100] =
mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR, mCBR // F
};
-static const uint8_t kb1013vk12_extended[0x10] =
+static const u8 kb1013vk12_extended[0x10] =
{
mHLT, 0, 0, 0, mLDF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 5E 0
};
@@ -343,7 +343,7 @@ static const uint8_t kb1013vk12_extended[0x10] =
CPU_DISASSEMBLE(kb1013vk12)
{
// create extended opcode table
- uint8_t ext[0x100];
+ u8 ext[0x100];
memset(ext, 0, 0x100);
memcpy(ext + 0x00, kb1013vk12_extended, 0x10);
diff --git a/src/devices/cpu/sm510/sm510op.cpp b/src/devices/cpu/sm510/sm510op.cpp
index a18e39bac67..01ab9eee9d9 100644
--- a/src/devices/cpu/sm510/sm510op.cpp
+++ b/src/devices/cpu/sm510/sm510op.cpp
@@ -8,17 +8,17 @@
// internal helpers
-inline uint8_t sm510_base_device::ram_r()
+inline u8 sm510_base_device::ram_r()
{
int bmh = (m_sbm) ? (1 << (m_datawidth-1)) : 0; // from SBM
- uint8_t address = (bmh | m_bm << 4 | m_bl) & m_datamask;
+ u8 address = (bmh | m_bm << 4 | m_bl) & m_datamask;
return m_data->read_byte(address) & 0xf;
}
-inline void sm510_base_device::ram_w(uint8_t data)
+inline void sm510_base_device::ram_w(u8 data)
{
int bmh = (m_sbm) ? (1 << (m_datawidth-1)) : 0; // from SBM
- uint8_t address = (bmh | m_bm << 4 | m_bl) & m_datamask;
+ u8 address = (bmh | m_bm << 4 | m_bl) & m_datamask;
m_data->write_byte(address, data & 0xf);
}
@@ -36,13 +36,13 @@ void sm510_base_device::push_stack()
m_stack[0] = m_pc;
}
-void sm510_base_device::do_branch(uint8_t pu, uint8_t pm, uint8_t pl)
+void sm510_base_device::do_branch(u8 pu, u8 pm, u8 pl)
{
// set new PC(Pu/Pm/Pl)
m_pc = ((pu << 10 & 0xc00) | (pm << 6 & 0x3c0) | (pl & 0x03f)) & m_prgmask;
}
-inline uint8_t sm510_base_device::bitmask(uint16_t param)
+inline u8 sm510_base_device::bitmask(u16 param)
{
// bitmask from immediate opcode param
return 1 << (param & 3);
@@ -64,7 +64,7 @@ void sm510_base_device::op_lb()
m_bl = (m_op >> 2 & 3);
// bl(high) is still unclear, official doc is confusing
- uint8_t hi = 0;
+ u8 hi = 0;
switch (m_bl)
{
case 0: hi = 0; break;
@@ -90,7 +90,7 @@ void sm510_base_device::op_sbm()
void sm510_base_device::op_exbla()
{
// EXBLA: exchange BL with ACC
- uint8_t a = m_acc;
+ u8 a = m_acc;
m_acc = m_bl;
m_bl = a;
}
@@ -155,7 +155,7 @@ void sm510_base_device::op_tm()
// TM x: indirect subroutine call, pointers(IDX) are in page 0
m_icount--;
push_stack();
- uint8_t idx = m_program->read_byte(m_op & 0x3f);
+ u8 idx = m_program->read_byte(m_op & 0x3f);
do_branch(idx >> 6 & 3, 4, idx & 0x3f);
}
@@ -166,7 +166,7 @@ void sm510_base_device::op_tm()
void sm510_base_device::op_exc()
{
// EXC x: exchange ACC with RAM, xor BM with x
- uint8_t a = m_acc;
+ u8 a = m_acc;
m_acc = ram_r();
ram_w(a);
m_bm ^= (m_op & 3);
@@ -304,7 +304,7 @@ void sm510_base_device::op_coma()
void sm510_base_device::op_rot()
{
// ROT: rotate ACC right through carry
- uint8_t c = m_acc & 1;
+ u8 c = m_acc & 1;
m_acc = m_acc >> 1 | m_c << 3;
m_c = c;
}
diff --git a/src/devices/cpu/sm510/sm511core.cpp b/src/devices/cpu/sm510/sm511core.cpp
index ce134b24588..a241ef09b52 100644
--- a/src/devices/cpu/sm510/sm511core.cpp
+++ b/src/devices/cpu/sm510/sm511core.cpp
@@ -35,7 +35,7 @@ ADDRESS_MAP_END
// disasm
-offs_t sm511_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t sm511_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(sm511);
return CPU_DISASSEMBLE_NAME(sm511)(this, stream, pc, oprom, opram, options);
@@ -43,15 +43,15 @@ offs_t sm511_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u
// device definitions
-sm511_device::sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sm511_device::sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: sm510_base_device(mconfig, SM511, "SM511", tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, ADDRESS_MAP_NAME(program_4k), 7 /* data width */, ADDRESS_MAP_NAME(data_96_32x4), "sm511", __FILE__)
{ }
-sm511_device::sm511_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+sm511_device::sm511_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: sm510_base_device(mconfig, type, name, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data, shortname, source)
{ }
-sm512_device::sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sm512_device::sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: sm511_device(mconfig, SM512, "SM512", tag, owner, clock, 2, 12, ADDRESS_MAP_NAME(program_4k), 7, ADDRESS_MAP_NAME(data_80_48x4), "sm512", __FILE__)
{ }
diff --git a/src/devices/cpu/tms1000/tms0270.cpp b/src/devices/cpu/tms1000/tms0270.cpp
index edb9512518d..8c09fa49bea 100644
--- a/src/devices/cpu/tms1000/tms0270.cpp
+++ b/src/devices/cpu/tms1000/tms0270.cpp
@@ -32,7 +32,7 @@ ADDRESS_MAP_END
// device definitions
-tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0980_cpu_device(mconfig, TMS0270, "TMS0270", tag, owner, clock, 16 /* o pins */, 16 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_144x4), "tms0270", __FILE__)
, m_read_ctl(*this)
, m_write_ctl(*this)
@@ -145,14 +145,14 @@ void tms0270_cpu_device::dynamic_output()
}
}
-uint8_t tms0270_cpu_device::read_k_input()
+u8 tms0270_cpu_device::read_k_input()
{
// external: TMS5100 CTL port via SEG G,B,C,D
if (m_chipsel)
return (m_ctl_dir) ? m_ctl_out : m_read_ctl(0, 0xff) & 0xf;
// standard K-input otherwise
- uint8_t k = m_read_k(0, 0xff) & 0x1f;
+ u8 k = m_read_k(0, 0xff) & 0x1f;
return (k & 0x10) ? 0xf : k; // the TMS0270 KF line asserts all K-inputs
}
diff --git a/src/devices/cpu/tms1000/tms0270.h b/src/devices/cpu/tms1000/tms0270.h
index 77f596cda84..3d0a8c06098 100644
--- a/src/devices/cpu/tms1000/tms0270.h
+++ b/src/devices/cpu/tms1000/tms0270.h
@@ -26,7 +26,7 @@
class tms0270_cpu_device : public tms0980_cpu_device
{
public:
- tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// static configuration helpers
template<class _Object> static devcb_base &set_read_ctl_callback(device_t &device, _Object object) { return downcast<tms0270_cpu_device &>(device).m_read_ctl.set_callback(object); }
@@ -40,8 +40,8 @@ protected:
virtual machine_config_constructor device_mconfig_additions() const override;
- virtual void write_o_output(uint8_t index) override { tms1k_base_device::write_o_output(index); }
- virtual uint8_t read_k_input() override;
+ virtual void write_o_output(u8 index) override { tms1k_base_device::write_o_output(index); }
+ virtual u8 read_k_input() override;
virtual void dynamic_output() override;
virtual void op_setr() override;
@@ -50,15 +50,15 @@ protected:
private:
// state specific to interface with TMS5100
- uint16_t m_r_prev;
- uint8_t m_chipsel;
- uint8_t m_ctl_out;
- uint8_t m_ctl_dir;
- int m_pdc;
-
- uint8_t m_o_latch_low;
- uint8_t m_o_latch;
- uint8_t m_o_latch_prev;
+ u16 m_r_prev;
+ u8 m_chipsel;
+ u8 m_ctl_out;
+ u8 m_ctl_dir;
+ int m_pdc;
+
+ u8 m_o_latch_low;
+ u8 m_o_latch;
+ u8 m_o_latch_prev;
devcb_read8 m_read_ctl;
devcb_write8 m_write_ctl;
diff --git a/src/devices/cpu/tms1000/tms0970.cpp b/src/devices/cpu/tms1000/tms0970.cpp
index b24f1ba6774..116c197e996 100644
--- a/src/devices/cpu/tms1000/tms0970.cpp
+++ b/src/devices/cpu/tms1000/tms0970.cpp
@@ -36,19 +36,19 @@ ADDRESS_MAP_END
// device definitions
-tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS0970, "TMS0970", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, ADDRESS_MAP_NAME(program_10bit_8), 6 /* data width */, ADDRESS_MAP_NAME(data_64x4), "tms0970", __FILE__)
{ }
-tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
{ }
-tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0970_cpu_device(mconfig, TMS0950, "TMS0950", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms0950", __FILE__)
{ }
-tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0970_cpu_device(mconfig, TMS1990, "TMS1990", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1990", __FILE__)
{ }
@@ -97,9 +97,9 @@ void tms0970_cpu_device::device_reset()
// pre-decode instructionset
m_fixed_decode.resize(0x100);
- memset(&m_fixed_decode[0], 0, 0x100*sizeof(uint32_t));
+ memset(&m_fixed_decode[0], 0, 0x100*sizeof(u32));
m_micro_decode.resize(0x100);
- memset(&m_micro_decode[0], 0, 0x100*sizeof(uint32_t));
+ memset(&m_micro_decode[0], 0, 0x100*sizeof(u32));
for (int op = 0; op < 0x100; op++)
{
@@ -108,26 +108,26 @@ void tms0970_cpu_device::device_reset()
m_fixed_decode[op] = (op & 0x40) ? F_CALL: F_BR;
// 5 output bits select a microinstruction index
- uint32_t imask = m_ipla->read(op);
- uint8_t msel = imask & 0x1f;
+ u32 imask = m_ipla->read(op);
+ u8 msel = imask & 0x1f;
// but if (from bottom to top) term 1 is active and output bit 5 is 0, R2,R4-R7 directly select a microinstruction index
if (imask & 0x40 && (imask & 0x20) == 0)
msel = (op & 0xf) | (op >> 1 & 0x10);
msel = BITSWAP8(msel,7,6,5,0,1,2,3,4); // lines are reversed
- uint32_t mmask = m_mpla->read(msel);
+ u32 mmask = m_mpla->read(msel);
mmask ^= 0x09fe; // invert active-negative
- // _____ _____ _____ _____ ______ _____ ______ _____ _____
- const uint32_t md[15] = { M_CKM, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_CIN, M_AUTA, M_AUTY, M_STO };
+ // _____ _____ _____ _____ ______ _____ ______ _____ _____
+ const u32 md[15] = { M_CKM, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_CIN, M_AUTA, M_AUTY, M_STO };
for (int bit = 0; bit < 15; bit++)
if (mmask & (1 << bit))
m_micro_decode[op] |= md[bit];
// the other ipla terms each select a fixed instruction
- const uint32_t id[8] = { F_LDP, F_TDO, F_COMX, F_LDX, F_SBIT, F_RBIT, F_SETR, F_RETN };
+ const u32 id[8] = { F_LDP, F_TDO, F_COMX, F_LDX, F_SBIT, F_RBIT, F_SETR, F_RETN };
for (int bit = 0; bit < 8; bit++)
if (imask & (0x80 << bit))
@@ -137,7 +137,7 @@ void tms0970_cpu_device::device_reset()
// i/o handling
-void tms0970_cpu_device::write_o_output(uint8_t index)
+void tms0970_cpu_device::write_o_output(u8 index)
{
m_o_index = index;
m_o = m_spla->read(index);
diff --git a/src/devices/cpu/tms1000/tms0970.h b/src/devices/cpu/tms1000/tms0970.h
index 360e30a42cb..ca436163374 100644
--- a/src/devices/cpu/tms1000/tms0970.h
+++ b/src/devices/cpu/tms1000/tms0970.h
@@ -15,15 +15,15 @@
class tms0970_cpu_device : public tms1000_cpu_device
{
public:
- tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
protected:
// overrides
virtual void device_reset() override;
virtual machine_config_constructor device_mconfig_additions() const override;
- virtual void write_o_output(uint8_t index) override;
+ virtual void write_o_output(u8 index) override;
virtual void op_setr() override;
virtual void op_tdo() override;
@@ -32,7 +32,7 @@ protected:
class tms0950_cpu_device : public tms0970_cpu_device
{
public:
- tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// overrides
@@ -46,7 +46,7 @@ protected:
class tms1990_cpu_device : public tms0970_cpu_device
{
public:
- tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/cpu/tms1000/tms0980.cpp b/src/devices/cpu/tms1000/tms0980.cpp
index 5e9ea00d178..cb4a00adbde 100644
--- a/src/devices/cpu/tms1000/tms0980.cpp
+++ b/src/devices/cpu/tms1000/tms0980.cpp
@@ -40,15 +40,15 @@ ADDRESS_MAP_END
// device definitions
-tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0970_cpu_device(mconfig, TMS0980, "TMS0980", tag, owner, clock, 8 /* o pins */, 9 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_144x4), "tms0980", __FILE__)
{ }
-tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: tms0970_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
{ }
-tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0980_cpu_device(mconfig, TMS1980, "TMS1980", tag, owner, clock, 7, 10, 7, 9, 4, 12, ADDRESS_MAP_NAME(program_11bit_9), 8, ADDRESS_MAP_NAME(data_144x4), "tms1980", __FILE__)
{ }
@@ -90,7 +90,7 @@ machine_config_constructor tms1980_cpu_device::device_mconfig_additions() const
// disasm
-offs_t tms0980_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t tms0980_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(tms0980);
return CPU_DISASSEMBLE_NAME(tms0980)(this, stream, pc, oprom, opram, options);
@@ -98,13 +98,13 @@ offs_t tms0980_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, c
// device_reset
-uint32_t tms0980_cpu_device::decode_fixed(uint16_t op)
+u32 tms0980_cpu_device::decode_fixed(u16 op)
{
- uint32_t decode = 0;
- uint32_t mask = m_ipla->read(op);
+ u32 decode = 0;
+ u32 mask = m_ipla->read(op);
// 1 line per PLA row, no OR-mask
- const uint32_t id[15] = { F_LDP, F_SBL, F_OFF, F_RBIT, F_SAL, F_XDA, F_REAC, F_SETR, F_RETN, F_SBIT, F_TDO, F_COMX8, F_COMX, F_LDX, F_SEAC };
+ const u32 id[15] = { F_LDP, F_SBL, F_OFF, F_RBIT, F_SAL, F_XDA, F_REAC, F_SETR, F_RETN, F_SBIT, F_TDO, F_COMX8, F_COMX, F_LDX, F_SEAC };
for (int bit = 0; bit < 15; bit++)
if (mask & (0x80 << bit))
@@ -113,17 +113,17 @@ uint32_t tms0980_cpu_device::decode_fixed(uint16_t op)
return decode;
}
-uint32_t tms0980_cpu_device::decode_micro(uint8_t sel)
+u32 tms0980_cpu_device::decode_micro(u8 sel)
{
- uint32_t decode = 0;
+ u32 decode = 0;
sel = BITSWAP8(sel,7,6,0,1,2,3,4,5); // lines are reversed
- uint32_t mask = m_mpla->read(sel);
+ u32 mask = m_mpla->read(sel);
mask ^= 0x43fc3; // invert active-negative
// M_RSTR is specific to TMS02x0/TMS1980, it redirects to F_RSTR
// M_UNK1 is specific to TMS0270, unknown/unused yet and apparently not connected on every TMS0270
- // _______ ______ _____ _____ _____ _____ ______ _____ ______ _____ _____
- const uint32_t md[22] = { M_NDMTP, M_DMTP, M_AUTY, M_AUTA, M_CKM, M_SSE, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_SSS, M_CME, M_CIN, M_STO, M_RSTR, M_UNK1 };
+ // _______ ______ _____ _____ _____ _____ ______ _____ ______ _____ _____
+ const u32 md[22] = { M_NDMTP, M_DMTP, M_AUTY, M_AUTA, M_CKM, M_SSE, M_CKP, M_YTP, M_MTP, M_ATN, M_NATN, M_MTN, M_15TN, M_CKN, M_NE, M_C8, M_SSS, M_CME, M_CIN, M_STO, M_RSTR, M_UNK1 };
for (int bit = 0; bit < 22 && bit < m_mpla->outputs(); bit++)
if (mask & (1 << bit))
@@ -139,11 +139,11 @@ void tms0980_cpu_device::device_reset()
// pre-decode instructionset
m_fixed_decode.resize(0x200);
- memset(&m_fixed_decode[0], 0, 0x200*sizeof(uint32_t));
+ memset(&m_fixed_decode[0], 0, 0x200*sizeof(u32));
m_micro_decode.resize(0x200);
- memset(&m_micro_decode[0], 0, 0x200*sizeof(uint32_t));
+ memset(&m_micro_decode[0], 0, 0x200*sizeof(u32));
- for (uint16_t op = 0; op < 0x200; op++)
+ for (u16 op = 0; op < 0x200; op++)
{
// upper half of the opcodes is always branch/call
if (op & 0x100)
@@ -159,7 +159,7 @@ void tms0980_cpu_device::device_reset()
// like on TMS0970, one of the terms directly select a microinstruction index (via R4-R8),
// but it can't be pre-determined when it's active
m_micro_direct.resize(0x40);
- memset(&m_micro_decode[0], 0, 0x40*sizeof(uint32_t));
+ memset(&m_micro_decode[0], 0, 0x40*sizeof(u32));
for (int op = 0; op < 0x40; op++)
m_micro_direct[op] = decode_micro(op);
@@ -167,7 +167,7 @@ void tms0980_cpu_device::device_reset()
// program counter/opcode decode
-uint32_t tms0980_cpu_device::read_micro()
+u32 tms0980_cpu_device::read_micro()
{
// if ipla term 0 is active, R4-R8 directly select a microinstruction index when R0 or R0^BL is 0
int r0 = m_opcode >> 8 & 1;
@@ -195,10 +195,10 @@ void tms0980_cpu_device::read_opcode()
// i/o handling
-uint8_t tms0980_cpu_device::read_k_input()
+u8 tms0980_cpu_device::read_k_input()
{
- uint8_t k = m_read_k(0, 0xff) & 0x1f;
- uint8_t k3 = (k & 0x10) ? 3: 0; // the TMS0980 K3 line is simply K1|K2
+ u8 k = m_read_k(0, 0xff) & 0x1f;
+ u8 k3 = (k & 0x10) ? 3: 0; // the TMS0980 K3 line is simply K1|K2
return (k & 0xf) | k3;
}
diff --git a/src/devices/cpu/tms1000/tms0980.h b/src/devices/cpu/tms1000/tms0980.h
index afbcaa3647d..24ef6c000ad 100644
--- a/src/devices/cpu/tms1000/tms0980.h
+++ b/src/devices/cpu/tms1000/tms0980.h
@@ -15,24 +15,24 @@
class tms0980_cpu_device : public tms0970_cpu_device
{
public:
- tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
protected:
// overrides
- virtual uint32_t decode_fixed(uint16_t op);
- virtual uint32_t decode_micro(uint8_t sel);
+ virtual u32 decode_fixed(u16 op);
+ virtual u32 decode_micro(u8 sel);
virtual void device_reset() override;
virtual machine_config_constructor device_mconfig_additions() const 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(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual u32 disasm_min_opcode_bytes() const override { return 2; }
+ virtual u32 disasm_max_opcode_bytes() const override { return 2; }
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
- virtual uint8_t read_k_input() override;
+ virtual u8 read_k_input() override;
virtual void set_cki_bus() override;
- virtual uint32_t read_micro();
+ virtual u32 read_micro();
virtual void read_opcode() override;
virtual void op_comx() override;
@@ -41,14 +41,14 @@ protected:
class tms1980_cpu_device : public tms0980_cpu_device
{
public:
- tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// overrides
virtual machine_config_constructor device_mconfig_additions() const override;
- virtual void write_o_output(uint8_t index) override { tms1k_base_device::write_o_output(index); }
- virtual uint8_t read_k_input() override { return tms1k_base_device::read_k_input(); }
+ virtual void write_o_output(u8 index) override { tms1k_base_device::write_o_output(index); }
+ virtual u8 read_k_input() override { return tms1k_base_device::read_k_input(); }
virtual void op_setr() override { tms1k_base_device::op_setr(); }
virtual void op_tdo() override;
diff --git a/src/devices/cpu/tms1000/tms1000.cpp b/src/devices/cpu/tms1000/tms1000.cpp
index 05ff12e03c6..a971b3e01b8 100644
--- a/src/devices/cpu/tms1000/tms1000.cpp
+++ b/src/devices/cpu/tms1000/tms1000.cpp
@@ -47,31 +47,31 @@ ADDRESS_MAP_END
// device definitions
-tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1k_base_device(mconfig, TMS1000, "TMS1000", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 10 /* prg width */, ADDRESS_MAP_NAME(program_10bit_8), 6 /* data width */, ADDRESS_MAP_NAME(data_64x4), "tms1000", __FILE__)
{ }
-tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: tms1k_base_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
{ }
-tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1070, "TMS1070", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1070", __FILE__)
{ }
-tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1040, "TMS1040", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1040", __FILE__)
{ }
-tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1200, "TMS1200", tag, owner, clock, 8, 13, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms1200", __FILE__)
{ }
-tms1700_cpu_device::tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1700_cpu_device::tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1700, "TMS1700", tag, owner, clock, 8, 9, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_9bit_8), 6, ADDRESS_MAP_NAME(data_32x4), "tms1700", __FILE__)
{ }
-tms1730_cpu_device::tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1730_cpu_device::tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1730, "TMS1730", tag, owner, clock, 8, 9, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_9bit_8), 6, ADDRESS_MAP_NAME(data_32x4), "tms1730", __FILE__)
{ }
@@ -93,7 +93,7 @@ machine_config_constructor tms1000_cpu_device::device_mconfig_additions() const
// disasm
-offs_t tms1000_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t tms1000_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(tms1000);
return CPU_DISASSEMBLE_NAME(tms1000)(this, stream, pc, oprom, opram, options);
@@ -108,15 +108,15 @@ void tms1000_cpu_device::device_reset()
// pre-decode instructionset
m_fixed_decode.resize(0x100);
- memset(&m_fixed_decode[0], 0, 0x100*sizeof(uint32_t));
+ memset(&m_fixed_decode[0], 0, 0x100*sizeof(u32));
m_micro_decode.resize(0x100);
- memset(&m_micro_decode[0], 0, 0x100*sizeof(uint32_t));
+ memset(&m_micro_decode[0], 0, 0x100*sizeof(u32));
for (int op = 0; op < 0x100; op++)
{
- // _____ _____ ______ _____ ______ _____ _____ _____ _____
- const uint32_t md[16] = { M_STSL, M_AUTY, M_AUTA, M_CIN, M_C8, M_NE, M_CKN, M_15TN, M_MTN, M_NATN, M_ATN, M_MTP, M_YTP, M_CKP, M_CKM, M_STO };
- uint16_t mask = m_mpla->read(op);
+ // _____ _____ ______ _____ ______ _____ _____ _____ _____
+ const u32 md[16] = { M_STSL, M_AUTY, M_AUTA, M_CIN, M_C8, M_NE, M_CKN, M_15TN, M_MTN, M_NATN, M_ATN, M_MTP, M_YTP, M_CKP, M_CKM, M_STO };
+ u16 mask = m_mpla->read(op);
mask ^= 0x3fc8; // invert active-negative
for (int bit = 0; bit < 16; bit++)
diff --git a/src/devices/cpu/tms1000/tms1000.h b/src/devices/cpu/tms1000/tms1000.h
index 049b24873fd..7e2ac9c0822 100644
--- a/src/devices/cpu/tms1000/tms1000.h
+++ b/src/devices/cpu/tms1000/tms1000.h
@@ -15,8 +15,8 @@
class tms1000_cpu_device : public tms1k_base_device
{
public:
- tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
protected:
// overrides
@@ -24,39 +24,39 @@ protected:
virtual machine_config_constructor device_mconfig_additions() const override;
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
};
class tms1070_cpu_device : public tms1000_cpu_device
{
public:
- tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class tms1040_cpu_device : public tms1000_cpu_device
{
public:
- tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class tms1200_cpu_device : public tms1000_cpu_device
{
public:
- tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class tms1700_cpu_device : public tms1000_cpu_device
{
public:
- tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class tms1730_cpu_device : public tms1000_cpu_device
{
public:
- tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/cpu/tms1000/tms1100.cpp b/src/devices/cpu/tms1000/tms1100.cpp
index 93c7c07a69c..f896f60d9eb 100644
--- a/src/devices/cpu/tms1000/tms1100.cpp
+++ b/src/devices/cpu/tms1000/tms1100.cpp
@@ -27,29 +27,29 @@ ADDRESS_MAP_END
// device definitions
-tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1000_cpu_device(mconfig, TMS1100, "TMS1100", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 11 /* prg width */, ADDRESS_MAP_NAME(program_11bit_8), 7 /* data width */, ADDRESS_MAP_NAME(data_128x4), "tms1100", __FILE__)
{ }
-tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: tms1000_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
{ }
-tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1170, "TMS1170", tag, owner, clock, 8, 11, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1170", __FILE__)
{ }
-tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1300, "TMS1300", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1300", __FILE__)
{ }
-tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1370, "TMS1370", tag, owner, clock, 8, 16, 6, 8, 3, 11, ADDRESS_MAP_NAME(program_11bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1370", __FILE__)
{ }
// disasm
-offs_t tms1100_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t tms1100_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(tms1100);
return CPU_DISASSEMBLE_NAME(tms1100)(this, stream, pc, oprom, opram, options);
diff --git a/src/devices/cpu/tms1000/tms1100.h b/src/devices/cpu/tms1000/tms1100.h
index b5df68e40cc..be0b6a70f10 100644
--- a/src/devices/cpu/tms1000/tms1100.h
+++ b/src/devices/cpu/tms1000/tms1100.h
@@ -15,14 +15,14 @@
class tms1100_cpu_device : public tms1000_cpu_device
{
public:
- tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
protected:
// overrides
virtual void device_reset() override;
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual void op_setr() override;
virtual void op_rstr() override;
@@ -31,19 +31,19 @@ protected:
class tms1170_cpu_device : public tms1100_cpu_device
{
public:
- tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class tms1300_cpu_device : public tms1100_cpu_device
{
public:
- tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class tms1370_cpu_device : public tms1100_cpu_device
{
public:
- tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/cpu/tms1000/tms1400.cpp b/src/devices/cpu/tms1000/tms1400.cpp
index 550911a9752..d8f12700289 100644
--- a/src/devices/cpu/tms1000/tms1400.cpp
+++ b/src/devices/cpu/tms1000/tms1400.cpp
@@ -36,28 +36,28 @@ ADDRESS_MAP_END
// device definitions
-tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1100_cpu_device(mconfig, TMS1400, "TMS1400", tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_12bit_8), 7 /* data width */, ADDRESS_MAP_NAME(data_128x4), "tms1400", __FILE__)
{ }
-tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: tms1100_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
{ }
-tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1400_cpu_device(mconfig, TMS1470, "TMS1470", tag, owner, clock, 8, 10, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1470", __FILE__)
{ }
-tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1400_cpu_device(mconfig, TMS1600, "TMS1600", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1600", __FILE__)
{ }
-tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
: tms1400_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source)
{ }
-tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1600_cpu_device(mconfig, TMS1670, "TMS1670", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1670", __FILE__)
{ }
diff --git a/src/devices/cpu/tms1000/tms1400.h b/src/devices/cpu/tms1000/tms1400.h
index 1bfb59a821e..af8498ad28b 100644
--- a/src/devices/cpu/tms1000/tms1400.h
+++ b/src/devices/cpu/tms1000/tms1400.h
@@ -15,8 +15,8 @@
class tms1400_cpu_device : public tms1100_cpu_device
{
public:
- tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
protected:
// overrides
@@ -34,21 +34,21 @@ protected:
class tms1470_cpu_device : public tms1400_cpu_device
{
public:
- tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class tms1600_cpu_device : public tms1400_cpu_device
{
public:
- tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
};
class tms1670_cpu_device : public tms1600_cpu_device
{
public:
- tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/cpu/tms1000/tms1k_base.cpp b/src/devices/cpu/tms1000/tms1k_base.cpp
index b8afaa75246..43d86a49fae 100644
--- a/src/devices/cpu/tms1000/tms1k_base.cpp
+++ b/src/devices/cpu/tms1000/tms1k_base.cpp
@@ -274,7 +274,7 @@ void tms1k_base_device::read_opcode()
// i/o handling
//-------------------------------------------------
-void tms1k_base_device::write_o_output(uint8_t index)
+void tms1k_base_device::write_o_output(u8 index)
{
// a hardcoded table is supported if the output pla is unknown
m_o_index = index;
@@ -282,7 +282,7 @@ void tms1k_base_device::write_o_output(uint8_t index)
m_write_o(0, m_o & m_o_mask, 0xffff);
}
-uint8_t tms1k_base_device::read_k_input()
+u8 tms1k_base_device::read_k_input()
{
// K1,2,4,8 (KC test pin is not emulated)
return m_read_k(0, 0xff) & 0xf;
@@ -343,7 +343,7 @@ void tms1k_base_device::op_call()
// CALL/CALLL: conditional call
if (m_status)
{
- uint8_t prev_pa = m_pa;
+ u8 prev_pa = m_pa;
if (m_clatch == 0)
{
diff --git a/src/devices/cpu/tms1000/tms1k_base.h b/src/devices/cpu/tms1000/tms1k_base.h
index 39ccbf31ea1..42b2cb4c1b8 100644
--- a/src/devices/cpu/tms1000/tms1k_base.h
+++ b/src/devices/cpu/tms1000/tms1k_base.h
@@ -84,7 +84,7 @@ class tms1k_base_device : public cpu_device
{
public:
// construction/destruction
- tms1k_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, uint8_t o_pins, uint8_t r_pins, uint8_t pc_bits, uint8_t byte_bits, uint8_t x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ tms1k_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, 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_BIG, byte_bits > 8 ? 16 : 8, prgwidth, 0, program)
, m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
@@ -109,9 +109,9 @@ public:
template<class _Object> static devcb_base &set_write_o_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_write_o.set_callback(object); }
template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_write_r.set_callback(object); }
template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1k_base_device &>(device).m_power_off.set_callback(object); }
- static void set_output_pla(device_t &device, const uint16_t *output_pla) { downcast<tms1k_base_device &>(device).m_output_pla_table = output_pla; }
+ static void set_output_pla(device_t &device, const u16 *output_pla) { downcast<tms1k_base_device &>(device).m_output_pla_table = output_pla; }
- uint8_t debug_peek_o_index() { return m_o_index; } // get output PLA index, for debugging (don't use in emulation)
+ u8 debug_peek_o_index() { return m_o_index; } // get output PLA index, for debugging (don't use in emulation)
// microinstructions
enum
@@ -177,25 +177,25 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual uint32_t execute_min_cycles() const override { return 1; }
- virtual uint32_t execute_max_cycles() const override { return 6; }
- virtual uint32_t execute_input_lines() const override { return 1; }
+ virtual u32 execute_min_cycles() const override { return 1; }
+ virtual u32 execute_max_cycles() const override { return 6; }
+ virtual u32 execute_input_lines() const override { return 1; }
virtual void execute_run() override;
// device_memory_interface overrides
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_t disasm_min_opcode_bytes() const override { return 1; }
- virtual uint32_t disasm_max_opcode_bytes() const override { return 1; }
+ virtual u32 disasm_min_opcode_bytes() const override { return 1; }
+ virtual u32 disasm_max_opcode_bytes() const override { return 1; }
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
void next_pc();
- virtual void write_o_output(uint8_t index);
- virtual uint8_t read_k_input();
+ virtual void write_o_output(u8 index);
+ virtual u8 read_k_input();
virtual void set_cki_bus();
virtual void dynamic_output() { ; } // not used by default
virtual void read_opcode();
@@ -232,70 +232,70 @@ protected:
optional_device<pla_device> m_opla;
optional_device<pla_device> m_spla;
- uint8_t m_pc; // 6 or 7-bit program counter
- uint32_t m_sr; // 6 or 7-bit subroutine return register(s)
- uint8_t m_pa; // 4-bit page address register
- uint8_t m_pb; // 4-bit page buffer register
- uint16_t m_ps; // 4-bit page subroutine register(s)
- uint8_t m_a; // 4-bit accumulator
- uint8_t m_x; // 2,3,or 4-bit RAM X register
- uint8_t m_y; // 4-bit RAM Y register
- uint8_t m_ca; // chapter address register
- uint8_t m_cb; // chapter buffer register
- uint16_t m_cs; // chapter subroutine register(s)
- uint16_t m_r;
- uint16_t m_o;
- uint8_t m_cki_bus;
- uint8_t m_c4;
- uint8_t m_p; // 4-bit adder p(lus)-input
- uint8_t m_n; // 4-bit adder n(egative)-input
- uint8_t m_adder_out; // adder result
- uint8_t m_carry_in; // adder carry-in bit
- uint8_t m_carry_out; // adder carry-out bit
- uint8_t m_status;
- uint8_t m_status_latch;
- uint8_t m_eac; // end around carry bit
- uint8_t m_clatch; // call latch bit(s)
- uint8_t m_add; // add latch bit
- uint8_t m_bl; // branch latch bit
-
- uint8_t m_ram_in;
- uint8_t m_dam_in;
- int m_ram_out; // signed!
- uint8_t m_ram_address;
- uint16_t m_rom_address;
- uint16_t m_opcode;
- uint32_t m_fixed;
- uint32_t m_micro;
- int m_subcycle;
- int m_icount;
- uint8_t m_o_index;
-
- uint8_t m_o_pins; // how many O pins
- uint8_t m_r_pins; // how many R pins
- uint8_t m_pc_bits; // how many program counter bits
- uint8_t m_byte_bits; // how many bits per 'byte'
- uint8_t m_x_bits; // how many X register bits
+ u8 m_pc; // 6 or 7-bit program counter
+ u32 m_sr; // 6 or 7-bit subroutine return register(s)
+ u8 m_pa; // 4-bit page address register
+ u8 m_pb; // 4-bit page buffer register
+ u16 m_ps; // 4-bit page subroutine register(s)
+ u8 m_a; // 4-bit accumulator
+ u8 m_x; // 2,3,or 4-bit RAM X register
+ u8 m_y; // 4-bit RAM Y register
+ u8 m_ca; // chapter address register
+ u8 m_cb; // chapter buffer register
+ u16 m_cs; // chapter subroutine register(s)
+ u16 m_r;
+ u16 m_o;
+ u8 m_cki_bus;
+ u8 m_c4;
+ u8 m_p; // 4-bit adder p(lus)-input
+ u8 m_n; // 4-bit adder n(egative)-input
+ u8 m_adder_out; // adder result
+ u8 m_carry_in; // adder carry-in bit
+ u8 m_carry_out; // adder carry-out bit
+ u8 m_status;
+ u8 m_status_latch;
+ u8 m_eac; // end around carry bit
+ u8 m_clatch; // call latch bit(s)
+ u8 m_add; // add latch bit
+ u8 m_bl; // branch latch bit
+
+ u8 m_ram_in;
+ u8 m_dam_in;
+ int m_ram_out; // signed!
+ u8 m_ram_address;
+ u16 m_rom_address;
+ u16 m_opcode;
+ u32 m_fixed;
+ u32 m_micro;
+ int m_subcycle;
+ int m_icount;
+ u8 m_o_index;
+
+ u8 m_o_pins; // how many O pins
+ u8 m_r_pins; // how many R pins
+ u8 m_pc_bits; // how many program counter bits
+ u8 m_byte_bits; // how many bits per 'byte'
+ u8 m_x_bits; // how many X register bits
address_space *m_program;
address_space *m_data;
- const uint16_t *m_output_pla_table;
+ const u16 *m_output_pla_table;
devcb_read8 m_read_k;
devcb_write16 m_write_o;
devcb_write16 m_write_r;
devcb_write_line m_power_off;
- uint32_t m_o_mask;
- uint32_t m_r_mask;
- uint32_t m_k_mask;
- uint32_t m_pc_mask;
- uint32_t m_x_mask;
+ u32 m_o_mask;
+ u32 m_r_mask;
+ u32 m_k_mask;
+ u32 m_pc_mask;
+ u32 m_x_mask;
// lookup tables
- std::vector<uint32_t> m_fixed_decode;
- std::vector<uint32_t> m_micro_decode;
- std::vector<uint32_t> m_micro_direct;
+ std::vector<u32> m_fixed_decode;
+ std::vector<u32> m_micro_decode;
+ std::vector<u32> m_micro_direct;
};
diff --git a/src/devices/cpu/tms1000/tms1k_dasm.cpp b/src/devices/cpu/tms1000/tms1k_dasm.cpp
index 8987a666726..f0afd660470 100644
--- a/src/devices/cpu/tms1000/tms1k_dasm.cpp
+++ b/src/devices/cpu/tms1000/tms1k_dasm.cpp
@@ -39,7 +39,7 @@ static const char *const s_mnemonic[] =
#define _OVER DASMFLAG_STEP_OVER
#define _OUT DASMFLAG_STEP_OUT
-static const uint32_t s_flags[] =
+static const u32 s_flags[] =
{
0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _OVER, 0,
@@ -57,7 +57,7 @@ enum e_addressing
zB0 = 0, zI2, zI3, zI4, zB7
};
-static const uint8_t s_addressing[] =
+static const u8 s_addressing[] =
{
zB0,
zB0, zB0, zB0, zI4, zI4, zI4, zI4, zB0, zB0, zB7, zB7, zB0,
@@ -73,7 +73,7 @@ static const uint8_t s_addressing[] =
// opcode luts
-static const uint8_t tms1000_mnemonic[256] =
+static const u8 tms1000_mnemonic[256] =
{
/* 0x00 */
zCOMX, zA8AAC, zYNEA, zTAM, zTAMZA, zA10AAC, zA6AAC, zDAN, zTKA, zKNEZ, zTDO, zCLO, zRSTR, zSETR, zIA, zRETN, // 0
@@ -97,7 +97,7 @@ static const uint8_t tms1000_mnemonic[256] =
};
-static const uint8_t tms1100_mnemonic[256] =
+static const u8 tms1100_mnemonic[256] =
{
/* 0x00 */
zMNEA, zALEM, zYNEA, zXMA, zDYN, zIYC, zAMAAC, zDMAN, zTKA, zCOMX, zTDO, zCOMC, zRSTR, zSETR, zKNEZ, zRETN, // 0
@@ -121,7 +121,7 @@ static const uint8_t tms1100_mnemonic[256] =
};
-static const uint8_t tms0980_mnemonic[512] =
+static const u8 tms0980_mnemonic[512] =
{
/* 0x000 */
zCOMX, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN, zTKA, zMNEA, zTKM, 0, 0, zSETR, zKNEZ, 0, // 0
@@ -163,7 +163,7 @@ static const uint8_t tms0980_mnemonic[512] =
};
-static const uint8_t tp0320_mnemonic[512] =
+static const u8 tp0320_mnemonic[512] =
{
/* 0x000 */
0, zALEM, zYNEA, zXMA, zDYN, zIYC, zCLA, zDMAN, zTKA, zMNEA, zTKM, 0, 0, zSETR, zKNEZ, 0, // 0
@@ -208,31 +208,31 @@ static const uint8_t tp0320_mnemonic[512] =
// disasm
-static const uint8_t i2_value[4] =
+static const u8 i2_value[4] =
{
0, 2, 1, 3
};
-static const uint8_t i3_value[8] =
+static const u8 i3_value[8] =
{
0, 4, 2, 6, 1, 5, 3, 7
};
-static const uint8_t i4_value[16] =
+static const u8 i4_value[16] =
{
0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
};
-static offs_t tms1k_dasm(std::ostream &stream, const uint8_t *oprom, const uint8_t *lut_mnemonic, uint16_t opcode_mask)
+static offs_t tms1k_dasm(std::ostream &stream, const u8 *oprom, const u8 *lut_mnemonic, u16 opcode_mask)
{
// get current opcode
int pos = 0;
- uint16_t op = oprom[pos++];
+ u16 op = oprom[pos++];
if (opcode_mask & 0x100)
op = (op << 8 | oprom[pos++]) & 0x1ff;
// convert to mnemonic/param
- uint16_t instr = lut_mnemonic[op];
+ u16 instr = lut_mnemonic[op];
util::stream_format(stream, "%-8s ", s_mnemonic[instr]);
switch( s_addressing[instr] )
diff --git a/src/devices/cpu/tms1000/tp0320.cpp b/src/devices/cpu/tms1000/tp0320.cpp
index cf427cda589..03c66c87e7f 100644
--- a/src/devices/cpu/tms1000/tp0320.cpp
+++ b/src/devices/cpu/tms1000/tp0320.cpp
@@ -36,7 +36,7 @@ ADDRESS_MAP_END
// device definitions
-tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms0980_cpu_device(mconfig, TP0320, "TP0320", tag, owner, clock, 7 /* o pins */, 10 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 12 /* prg width */, ADDRESS_MAP_NAME(program_11bit_9), 8 /* data width */, ADDRESS_MAP_NAME(data_192x4), "tp0320", __FILE__)
{ }
@@ -58,7 +58,7 @@ machine_config_constructor tp0320_cpu_device::device_mconfig_additions() const
// disasm
-offs_t tp0320_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t tp0320_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(tp0320);
return CPU_DISASSEMBLE_NAME(tp0320)(this, stream, pc, oprom, opram, options);
@@ -66,16 +66,16 @@ offs_t tp0320_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, co
// device_reset
-uint32_t tp0320_cpu_device::decode_micro(uint8_t sel)
+u32 tp0320_cpu_device::decode_micro(u8 sel)
{
- uint32_t decode = 0;
+ u32 decode = 0;
sel = BITSWAP8(sel,7,6,0,1,2,3,4,5); // lines are reversed
- uint32_t mask = m_mpla->read(sel);
+ u32 mask = m_mpla->read(sel);
mask ^= 0x0bff0; // invert active-negative
- // _____ _______ ______ _____ _____ ______ _____ _____ ______ _____ _____
- const uint32_t md[22] = { M_AUTA, M_AUTY, M_SSS, M_STO, M_YTP, M_NDMTP, M_DMTP, M_MTP, M_CKP, M_15TN, M_CKN, M_MTN, M_NATN, M_ATN, M_CME, M_CIN, M_SSE, M_CKM, M_NE, M_C8, M_SETR, M_RSTR };
+ // _____ _______ ______ _____ _____ ______ _____ _____ ______ _____ _____
+ const u32 md[22] = { M_AUTA, M_AUTY, M_SSS, M_STO, M_YTP, M_NDMTP, M_DMTP, M_MTP, M_CKP, M_15TN, M_CKN, M_MTN, M_NATN, M_ATN, M_CME, M_CIN, M_SSE, M_CKM, M_NE, M_C8, M_SETR, M_RSTR };
for (int bit = 0; bit < 22 && bit < m_mpla->outputs(); bit++)
if (mask & (1 << bit))
diff --git a/src/devices/cpu/tms1000/tp0320.h b/src/devices/cpu/tms1000/tp0320.h
index fcff112a900..d5675f0e011 100644
--- a/src/devices/cpu/tms1000/tp0320.h
+++ b/src/devices/cpu/tms1000/tp0320.h
@@ -15,16 +15,16 @@
class tp0320_cpu_device : public tms0980_cpu_device
{
public:
- tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// overrides
//virtual void device_start() override;
- virtual uint32_t decode_fixed(uint16_t op) override { return 0; } // not yet
- virtual uint32_t decode_micro(uint8_t sel) override;
+ virtual u32 decode_fixed(u16 op) override { return 0; } // not yet
+ virtual u32 decode_micro(u8 sel) override;
virtual void device_reset() override;
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
virtual machine_config_constructor device_mconfig_additions() const override;
};
diff --git a/src/devices/cpu/ucom4/ucom4.cpp b/src/devices/cpu/ucom4/ucom4.cpp
index 7b804c4c4f3..aca4996b5fa 100644
--- a/src/devices/cpu/ucom4/ucom4.cpp
+++ b/src/devices/cpu/ucom4/ucom4.cpp
@@ -58,19 +58,19 @@ ADDRESS_MAP_END
// device definitions
-upd553_cpu_device::upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd553_cpu_device::upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: ucom4_cpu_device(mconfig, NEC_D553, "uPD553", tag, owner, clock, NEC_UCOM43, 3 /* stack levels */, 11 /* prg width */, ADDRESS_MAP_NAME(program_2k), 7 /* data width */, ADDRESS_MAP_NAME(data_96x4), "upd553", __FILE__)
{ }
-upd557l_cpu_device::upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd557l_cpu_device::upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: ucom4_cpu_device(mconfig, NEC_D557L, "uPD557L", tag, owner, clock, NEC_UCOM43, 3, 11, ADDRESS_MAP_NAME(program_2k), 7, ADDRESS_MAP_NAME(data_96x4), "upd557l", __FILE__)
{ }
-upd650_cpu_device::upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd650_cpu_device::upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: ucom4_cpu_device(mconfig, NEC_D650, "uPD650", tag, owner, clock, NEC_UCOM43, 3, 11, ADDRESS_MAP_NAME(program_2k), 7, ADDRESS_MAP_NAME(data_96x4), "upd650", __FILE__)
{ }
-upd552_cpu_device::upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd552_cpu_device::upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: ucom4_cpu_device(mconfig, NEC_D552, "uPD552", tag, owner, clock, NEC_UCOM44, 1, 10, ADDRESS_MAP_NAME(program_1k), 6, ADDRESS_MAP_NAME(data_64x4), "upd552", __FILE__)
{ }
@@ -95,7 +95,7 @@ void ucom4_cpu_device::state_string_export(const device_state_entry &entry, std:
}
}
-offs_t ucom4_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
+offs_t ucom4_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options)
{
extern CPU_DISASSEMBLE(ucom4);
return CPU_DISASSEMBLE_NAME(ucom4)(this, stream, pc, oprom, opram, options);
@@ -220,10 +220,10 @@ void ucom4_cpu_device::device_reset()
// default:
// A,B are inputs, C,D are input/output, E,F,G,H,I are output
-uint8_t ucom4_cpu_device::input_r(int index)
+u8 ucom4_cpu_device::input_r(int index)
{
index &= 0xf;
- uint8_t inp = 0;
+ u8 inp = 0;
switch (index)
{
@@ -240,7 +240,7 @@ uint8_t ucom4_cpu_device::input_r(int index)
return inp & 0xf;
}
-void ucom4_cpu_device::output_w(int index, uint8_t data)
+void ucom4_cpu_device::output_w(int index, u8 data)
{
index &= 0xf;
data &= 0xf;
@@ -266,7 +266,7 @@ void ucom4_cpu_device::output_w(int index, uint8_t data)
// uPD557L:
// ports B,H,I are stripped, port G is reduced to 1 pin
-uint8_t upd557l_cpu_device::input_r(int index)
+u8 upd557l_cpu_device::input_r(int index)
{
index &= 0xf;
@@ -278,7 +278,7 @@ uint8_t upd557l_cpu_device::input_r(int index)
return 0;
}
-void upd557l_cpu_device::output_w(int index, uint8_t data)
+void upd557l_cpu_device::output_w(int index, u8 data)
{
index &= 0xf;
data &= 0xf;
diff --git a/src/devices/cpu/ucom4/ucom4.h b/src/devices/cpu/ucom4/ucom4.h
index ca0701734fb..1fb5af93b5a 100644
--- a/src/devices/cpu/ucom4/ucom4.h
+++ b/src/devices/cpu/ucom4/ucom4.h
@@ -100,7 +100,7 @@ class ucom4_cpu_device : public cpu_device
{
public:
// construction/destruction
- ucom4_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, int family, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ ucom4_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, int family, int stack_levels, 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_BIG, 8, prgwidth, 0, program)
, m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
@@ -141,11 +141,11 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- 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 1; }
+ virtual u64 execute_clocks_to_cycles(u64 clocks) const override { return (clocks + 4 - 1) / 4; } // 4 cycles per machine cycle
+ virtual u64 execute_cycles_to_clocks(u64 cycles) const override { return (cycles * 4); } // "
+ virtual u32 execute_min_cycles() const override { return 1; }
+ virtual u32 execute_max_cycles() const override { return 2; }
+ virtual u32 execute_input_lines() const override { return 1; }
virtual void execute_set_input(int line, int state) override;
virtual void execute_run() override;
@@ -153,9 +153,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_t disasm_min_opcode_bytes() const override { return 1; }
- virtual uint32_t disasm_max_opcode_bytes() const override { return 2; }
- virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
+ virtual u32 disasm_min_opcode_bytes() const override { return 1; }
+ virtual u32 disasm_max_opcode_bytes() const override { return 2; }
+ virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const u8 *oprom, const u8 *opram, u32 options) override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
@@ -169,30 +169,30 @@ protected:
int m_datawidth;
int m_prgmask;
int m_datamask;
- int m_family; // MCU family (43/44/45)
- int m_stack_levels; // number of callstack levels
- uint16_t m_stack[3]; // max 3
- uint8_t m_port_out[0x10]; // last value written to output port
- uint8_t m_op;
- uint8_t m_prev_op; // previous opcode
- uint8_t m_arg; // opcode argument for 2-byte opcodes
- uint8_t m_bitmask; // opcode bit argument
- bool m_skip; // skip next opcode
+ int m_family; // MCU family (43/44/45)
+ int m_stack_levels; // number of callstack levels
+ u16 m_stack[3]; // max 3
+ u8 m_port_out[0x10]; // last value written to output port
+ u8 m_op;
+ u8 m_prev_op; // previous opcode
+ u8 m_arg; // opcode argument for 2-byte opcodes
+ u8 m_bitmask; // opcode bit argument
+ bool m_skip; // skip next opcode
int m_icount;
emu_timer *m_timer;
- uint16_t m_pc; // program counter
- uint16_t m_prev_pc;
- uint8_t m_acc; // 4-bit accumulator
- uint8_t m_dpl; // 4-bit data pointer low (RAM x)
- uint8_t m_dph; // 4-bit(?) data pointer high (RAM y)
- uint8_t m_dph_mask;
- uint8_t m_carry_f; // carry flag
- uint8_t m_carry_s_f; // carry save flag
- uint8_t m_timer_f; // timer out flag
- uint8_t m_int_f; // interrupt flag
- uint8_t m_inte_f; // interrupt enable flag
- int m_int_line; // interrupt pin state
+ u16 m_pc; // program counter
+ u16 m_prev_pc;
+ u8 m_acc; // 4-bit accumulator
+ u8 m_dpl; // 4-bit data pointer low (RAM x)
+ u8 m_dph; // 4-bit(?) data pointer high (RAM y)
+ u8 m_dph_mask;
+ u8 m_carry_f; // carry flag
+ u8 m_carry_s_f; // carry save flag
+ u8 m_timer_f; // timer out flag
+ u8 m_int_f; // interrupt flag
+ u8 m_inte_f; // interrupt enable flag
+ int m_int_line; // interrupt pin state
// i/o handlers
devcb_read8 m_read_a;
@@ -208,23 +208,23 @@ protected:
devcb_write8 m_write_h;
devcb_write8 m_write_i;
- virtual uint8_t input_r(int index);
- virtual void output_w(int index, uint8_t data);
+ virtual u8 input_r(int index);
+ virtual void output_w(int index, u8 data);
// misc internal helpers
void increment_pc();
void fetch_arg();
void do_interrupt();
- uint8_t ram_r();
- void ram_w(uint8_t data);
+ u8 ram_r();
+ void ram_w(u8 data);
void pop_stack();
void push_stack();
bool check_op_43();
TIMER_CALLBACK_MEMBER( simple_timer_cb );
- uint8_t ucom43_reg_r(int index);
- void ucom43_reg_w(int index, uint8_t data);
+ u8 ucom43_reg_r(int index);
+ void ucom43_reg_w(int index, u8 data);
// opcode handlers
void op_illegal();
@@ -316,32 +316,32 @@ protected:
class upd553_cpu_device : public ucom4_cpu_device
{
public:
- upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class upd557l_cpu_device : public ucom4_cpu_device
{
public:
- upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual uint8_t input_r(int index) override;
- virtual void output_w(int index, uint8_t data) override;
+ virtual u8 input_r(int index) override;
+ virtual void output_w(int index, u8 data) override;
};
class upd650_cpu_device : public ucom4_cpu_device
{
public:
- upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
class upd552_cpu_device : public ucom4_cpu_device
{
public:
- upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/cpu/ucom4/ucom4d.cpp b/src/devices/cpu/ucom4/ucom4d.cpp
index 4b29439b5e9..f83801813ee 100644
--- a/src/devices/cpu/ucom4/ucom4d.cpp
+++ b/src/devices/cpu/ucom4/ucom4d.cpp
@@ -38,7 +38,7 @@ static const char *const s_mnemonics[] =
};
// number of bits per opcode parameter, 2 digits means opcode is 2 bytes
-static const uint8_t s_bits[] =
+static const u8 s_bits[] =
{
4, 0, 2, 80, 4, 0, 0, 0,
0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0,
@@ -54,7 +54,7 @@ static const uint8_t s_bits[] =
#define _OVER DASMFLAG_STEP_OVER
#define _OUT DASMFLAG_STEP_OUT
-static const uint32_t s_flags[] =
+static const u32 s_flags[] =
{
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -68,7 +68,7 @@ static const uint32_t s_flags[] =
};
-static const uint8_t ucom4_mnemonic[0x100] =
+static const u8 ucom4_mnemonic[0x100] =
{
/* 0x00 */
mNOP, mDI, mS, mTIT, mTC, mTTM, mDAA, mTAL,
@@ -116,8 +116,8 @@ static const uint8_t ucom4_mnemonic[0x100] =
CPU_DISASSEMBLE(ucom4)
{
int pos = 0;
- uint8_t op = oprom[pos++];
- uint8_t instr = ucom4_mnemonic[op];
+ u8 op = oprom[pos++];
+ u8 instr = ucom4_mnemonic[op];
util::stream_format(stream,"%-4s ", s_mnemonics[instr]);
@@ -125,10 +125,10 @@ CPU_DISASSEMBLE(ucom4)
int bits = s_bits[instr];
if (bits)
{
- uint16_t param = op & ((1 << (bits % 10)) - 1);
+ u16 param = op & ((1 << (bits % 10)) - 1);
if (bits / 10)
{
- uint8_t op2 = oprom[pos++];
+ u8 op2 = oprom[pos++];
param = (param << (bits / 10)) | (op2 & ((1 << (bits / 10)) - 1));
bits = (bits % 10) + (bits / 10);
}
diff --git a/src/devices/cpu/ucom4/ucom4op.cpp b/src/devices/cpu/ucom4/ucom4op.cpp
index 8c8e69f9ed4..67d12a95dad 100644
--- a/src/devices/cpu/ucom4/ucom4op.cpp
+++ b/src/devices/cpu/ucom4/ucom4op.cpp
@@ -8,15 +8,15 @@
// internal helpers
-inline uint8_t ucom4_cpu_device::ram_r()
+inline u8 ucom4_cpu_device::ram_r()
{
- uint16_t address = m_dph << 4 | m_dpl;
+ u16 address = m_dph << 4 | m_dpl;
return m_data->read_byte(address & m_datamask) & 0xf;
}
-inline void ucom4_cpu_device::ram_w(uint8_t data)
+inline void ucom4_cpu_device::ram_w(u8 data)
{
- uint16_t address = m_dph << 4 | m_dpl;
+ u16 address = m_dph << 4 | m_dpl;
m_data->write_byte(address & m_datamask, data & 0xf);
}
@@ -105,7 +105,7 @@ void ucom4_cpu_device::op_tla()
void ucom4_cpu_device::op_xm()
{
// XM X: Exchange ACC with RAM, xor DPh with X
- uint8_t old_acc = m_acc;
+ u8 old_acc = m_acc;
m_acc = ram_r();
ram_w(old_acc);
m_dph ^= (m_op & 0x03);
@@ -468,12 +468,12 @@ enum
UCOM43_F
};
-inline uint8_t ucom4_cpu_device::ucom43_reg_r(int index)
+inline u8 ucom4_cpu_device::ucom43_reg_r(int index)
{
return m_data->read_byte(m_datamask - index) & 0xf;
}
-inline void ucom4_cpu_device::ucom43_reg_w(int index, uint8_t data)
+inline void ucom4_cpu_device::ucom43_reg_w(int index, u8 data)
{
m_data->write_byte(m_datamask - index, data & 0xf);
}
@@ -527,7 +527,7 @@ void ucom4_cpu_device::op_xaw()
// XAW: Exchange ACC with W
m_icount--;
- uint8_t old_acc = m_acc;
+ u8 old_acc = m_acc;
m_acc = ucom43_reg_r(UCOM43_W);
ucom43_reg_w(UCOM43_W, old_acc);
}
@@ -538,7 +538,7 @@ void ucom4_cpu_device::op_xaz()
// XAZ: Exchange ACC with Z
m_icount--;
- uint8_t old_acc = m_acc;
+ u8 old_acc = m_acc;
m_acc = ucom43_reg_r(UCOM43_Z);
ucom43_reg_w(UCOM43_Z, old_acc);
}
@@ -549,7 +549,7 @@ void ucom4_cpu_device::op_xhr()
// XHR: Exchange DPh with R
m_icount--;
- uint8_t old_dph = m_dph;
+ u8 old_dph = m_dph;
m_dph = ucom43_reg_r(UCOM43_R);
ucom43_reg_w(UCOM43_R, old_dph);
}
@@ -560,7 +560,7 @@ void ucom4_cpu_device::op_xhx()
// XHX: Exchange DPh with X
m_icount--;
- uint8_t old_dph = m_dph;
+ u8 old_dph = m_dph;
m_dph = ucom43_reg_r(UCOM43_X);
ucom43_reg_w(UCOM43_X, old_dph);
}
@@ -571,7 +571,7 @@ void ucom4_cpu_device::op_xls()
// XLS: Exchange DPl with S
m_icount--;
- uint8_t old_dpl = m_dpl;
+ u8 old_dpl = m_dpl;
m_dpl = ucom43_reg_r(UCOM43_S);
ucom43_reg_w(UCOM43_S, old_dpl);
}
@@ -582,7 +582,7 @@ void ucom4_cpu_device::op_xly()
// XLY: Exchange DPl with Y
m_icount--;
- uint8_t old_dpl = m_dpl;
+ u8 old_dpl = m_dpl;
m_dpl = ucom43_reg_r(UCOM43_Y);
ucom43_reg_w(UCOM43_Y, old_dpl);
}
@@ -592,7 +592,7 @@ void ucom4_cpu_device::op_xc()
if (!check_op_43()) return;
// XC: Exchange Carry F/F with Carry Save F/F
- uint8_t c = m_carry_f;
+ u8 c = m_carry_f;
m_carry_f = m_carry_s_f;
m_carry_s_f = c;
}
@@ -644,7 +644,7 @@ void ucom4_cpu_device::op_rar()
if (!check_op_43()) return;
// RAR: Rotate ACC Right through Carry F/F
- uint8_t c = m_acc & 1;
+ u8 c = m_acc & 1;
m_acc = m_acc >> 1 | m_carry_f << 3;
m_carry_f = c;
}
@@ -657,7 +657,7 @@ void ucom4_cpu_device::op_inm()
if (!check_op_43()) return;
// INM: Increment RAM, skip next on carry
- uint8_t val = (ram_r() + 1) & 0xf;
+ u8 val = (ram_r() + 1) & 0xf;
ram_w(val);
m_skip = (val == 0);
}
@@ -667,7 +667,7 @@ void ucom4_cpu_device::op_dem()
if (!check_op_43()) return;
// DEM: Decrement RAM, skip next on carry
- uint8_t val = (ram_r() - 1) & 0xf;
+ u8 val = (ram_r() - 1) & 0xf;
ram_w(val);
m_skip = (val == 0xf);
}
diff --git a/src/devices/machine/tms1024.cpp b/src/devices/machine/tms1024.cpp
index d9a268a1280..a1d4cd551db 100644
--- a/src/devices/machine/tms1024.cpp
+++ b/src/devices/machine/tms1024.cpp
@@ -24,19 +24,19 @@ const device_type TMS1025 = &device_creator<tms1025_device>;
// constructor
//-------------------------------------------------
-tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, TMS1024, "TMS1024 I/O Expander", tag, owner, clock, "tms1024", __FILE__), m_h(0), m_s(0), m_std(0),
m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_write_port5(*this), m_write_port6(*this), m_write_port7(*this)
{
}
-tms1024_device::tms1024_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)
+tms1024_device::tms1024_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_h(0), m_s(0), m_std(0),
m_write_port1(*this), m_write_port2(*this), m_write_port3(*this), m_write_port4(*this), m_write_port5(*this), m_write_port6(*this), m_write_port7(*this)
{
}
-tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms1024_device(mconfig, TMS1025, "TMS1025 I/O Expander", tag, owner, clock, "tms1025", __FILE__)
{
}
diff --git a/src/devices/machine/tms1024.h b/src/devices/machine/tms1024.h
index 323b083e841..af1a428d9f1 100644
--- a/src/devices/machine/tms1024.h
+++ b/src/devices/machine/tms1024.h
@@ -64,8 +64,8 @@ enum
class tms1024_device : public device_t
{
public:
- tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms1024_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);
+ tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms1024_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, const char *shortname, const char *source);
// static configuration helpers
template<class _Object> static devcb_base &set_write_port1_callback(device_t &device, _Object object) { return downcast<tms1024_device &>(device).m_write_port1.set_callback(object); }
@@ -85,9 +85,9 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- uint8_t m_h; // 4-bit data latch
- uint8_t m_s; // 3-bit port select
- uint8_t m_std; // strobe pin
+ u8 m_h; // 4-bit data latch
+ u8 m_s; // 3-bit port select
+ u8 m_std; // strobe pin
// callbacks
devcb_write8 m_write_port1, m_write_port2, m_write_port3, m_write_port4, m_write_port5, m_write_port6, m_write_port7;
@@ -98,7 +98,7 @@ protected:
class tms1025_device : public tms1024_device
{
public:
- tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
diff --git a/src/devices/machine/tms6100.cpp b/src/devices/machine/tms6100.cpp
index fd28ffeae2d..6068a5865aa 100644
--- a/src/devices/machine/tms6100.cpp
+++ b/src/devices/machine/tms6100.cpp
@@ -27,7 +27,7 @@
const device_type TMS6100 = &device_creator<tms6100_device>;
-tms6100_device::tms6100_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)
+tms6100_device::tms6100_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
m_rom(*this, DEVICE_SELF),
m_reverse_bits(false),
@@ -35,7 +35,7 @@ tms6100_device::tms6100_device(const machine_config &mconfig, device_type type,
{
}
-tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, TMS6100, "TMS6100", tag, owner, clock, "tms6100", __FILE__),
m_rom(*this, DEVICE_SELF),
m_reverse_bits(false),
@@ -45,7 +45,7 @@ tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, d
const device_type M58819 = &device_creator<m58819_device>;
-m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: tms6100_device(mconfig, M58819, "M58819S", tag, owner, clock, "m58819s", __FILE__)
{
}
@@ -144,7 +144,7 @@ WRITE_LINE_MEMBER(tms6100_device::clk_w)
if (m_cs)
{
// new command enabled on rising edge of m0/m1
- uint8_t m = m_m1 << 1 | m_m0;
+ u8 m = m_m1 << 1 | m_m0;
if ((m & ~m_prev_m & 1) || (m & ~m_prev_m & 2))
handle_command(m);
@@ -158,7 +158,7 @@ WRITE_LINE_MEMBER(tms6100_device::clk_w)
// m0/m1 commands
-void tms6100_device::handle_command(uint8_t cmd)
+void tms6100_device::handle_command(u8 cmd)
{
enum
{
@@ -229,7 +229,7 @@ void tms6100_device::handle_command(uint8_t cmd)
// the 8-step counter PLA is shared between LA and TB
if (m_count < 4)
{
- const uint8_t shift = 4 * (m_count+1);
+ const u8 shift = 4 * (m_count+1);
m_address = (m_address & ~(0xf << shift)) | (m_add << shift);
}
@@ -245,7 +245,7 @@ void tms6100_device::handle_command(uint8_t cmd)
m_count = 0;
// load new address bits (14 bits on TMS6100)
- uint16_t rb = m_rom[m_address & m_rommask];
+ u16 rb = m_rom[m_address & m_rommask];
m_address++;
rb |= (m_rom[m_address & m_rommask] << 8);
m_address = (m_address & ~0x3fff) | (rb & 0x3fff);
diff --git a/src/devices/machine/tms6100.h b/src/devices/machine/tms6100.h
index 93a4f06826f..e36cf12615e 100644
--- a/src/devices/machine/tms6100.h
+++ b/src/devices/machine/tms6100.h
@@ -94,8 +94,8 @@
class tms6100_device : public device_t
{
public:
- tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- tms6100_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);
+ tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tms6100_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, u32 clock, const char *shortname, const char *source);
static void enable_4bit_mode(device_t &device) { downcast<tms6100_device &>(device).m_4bit_mode = true; }
@@ -113,34 +113,34 @@ protected:
// device-level overrides
virtual void device_start() override;
- void handle_command(uint8_t cmd);
+ void handle_command(u8 cmd);
// internal state
- required_region_ptr<uint8_t> m_rom;
+ required_region_ptr<u8> m_rom;
bool m_reverse_bits;
bool m_4bit_mode;
- uint32_t m_rommask;
- uint32_t m_address; // internal address + chipselect
- uint8_t m_sa; // romdata shift register
- uint8_t m_count; // TB/LA counter (-> PLA)
- uint8_t m_prev_cmd; // previous handled command
- uint8_t m_prev_m; // previous valid m0/m1 state
+ u32 m_rommask;
+ u32 m_address; // internal address + chipselect
+ u8 m_sa; // romdata shift register
+ u8 m_count; // TB/LA counter (-> PLA)
+ u8 m_prev_cmd; // previous handled command
+ u8 m_prev_m; // previous valid m0/m1 state
- uint8_t m_add; // ADD/DATA pins input
- uint8_t m_data; // ADD/DATA pins output
+ u8 m_add; // ADD/DATA pins input
+ u8 m_data; // ADD/DATA pins output
int m_m0;
int m_m1;
- int m_cs; // chipselect pin
- int m_clk; // CLK pin
- int m_rck; // RCK pin (mask/gate to CLK?)
+ int m_cs; // chipselect pin
+ int m_clk; // CLK pin
+ int m_rck; // RCK pin (mask/gate to CLK?)
};
class m58819_device : public tms6100_device
{
public:
- m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
// device-level overrides
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index d17b7ffca90..e6b97398ebd 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -108,21 +108,21 @@ public:
memory_region *m_cart_rom;
- uint8_t m_bus_control;
- uint8_t m_power;
- uint8_t m_banks;
- uint8_t m_clock_control;
- uint8_t m_clock_divider;
- uint8_t m_key_select;
-
- std::unique_ptr<uint8_t[]> m_sysram[2];
- uint16_t m_sysram_size[2];
- uint16_t m_sysram_end[2];
- uint16_t m_sysram_mask[2];
+ u8 m_bus_control;
+ u8 m_power;
+ u8 m_banks;
+ u8 m_clock_control;
+ u8 m_clock_divider;
+ u8 m_key_select;
+
+ std::unique_ptr<u8[]> m_sysram[2];
+ u16 m_sysram_size[2];
+ u16 m_sysram_end[2];
+ u16 m_sysram_mask[2];
void postload();
- void init_sysram(int chip, uint16_t size);
- void update_lcd_indicator(uint8_t y, uint8_t x, int state);
+ void init_sysram(int chip, u16 size);
+ void update_lcd_indicator(u8 y, u8 x, int state);
void update_clock_divider();
DECLARE_READ8_MEMBER(sysram_r);
@@ -156,7 +156,7 @@ public:
DEVICE_IMAGE_LOAD_MEMBER(cc40_state, cc40_cartridge)
{
- uint32_t size = m_cart->common_get_size("rom");
+ u32 size = m_cart->common_get_size("rom");
// max size is 4*32KB
if (size > 0x20000)
@@ -186,7 +186,7 @@ PALETTE_INIT_MEMBER(cc40_state, cc40)
palette.set_pen_color(2, rgb_t(131, 136, 139)); // lcd pixel off
}
-void cc40_state::update_lcd_indicator(uint8_t y, uint8_t x, int state)
+void cc40_state::update_lcd_indicator(u8 y, u8 x, int state)
{
// reference _________________...
// output# |10 11 12 13 14 0 1 2 3 4
@@ -336,7 +336,7 @@ WRITE8_MEMBER(cc40_state::clock_control_w)
READ8_MEMBER(cc40_state::keyboard_r)
{
- uint8_t ret = 0;
+ u8 ret = 0;
// read selected keyboard rows
for (int i = 0; i < 8; i++)
@@ -510,12 +510,12 @@ void cc40_state::machine_reset()
bankswitch_w(space, 0, 0);
}
-void cc40_state::init_sysram(int chip, uint16_t size)
+void cc40_state::init_sysram(int chip, u16 size)
{
if (m_sysram[chip] == nullptr)
{
// init to largest possible
- m_sysram[chip] = std::make_unique<uint8_t[]>(0x2000);
+ m_sysram[chip] = std::make_unique<u8[]>(0x2000);
save_pointer(NAME(m_sysram[chip].get()), 0x2000, chip);
save_item(NAME(m_sysram_size[chip]), chip);
diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp
index 08b725beed3..abe4c23a684 100644
--- a/src/mame/drivers/fidel6502.cpp
+++ b/src/mame/drivers/fidel6502.cpp
@@ -535,7 +535,7 @@ WRITE8_MEMBER(fidel6502_state::csc_pia0_pb_w)
READ8_MEMBER(fidel6502_state::csc_pia0_pb_r)
{
// d2: printer?
- uint8_t data = 0x04;
+ u8 data = 0x04;
// d3: TSI BUSY line
if (m_speech->busy_r())
@@ -679,7 +679,7 @@ WRITE8_MEMBER(fidel6502_state::eas_ppi_portc_w)
READ8_MEMBER(fidel6502_state::eas_ppi_portb_r)
{
// d0: printer? white wire from LED pcb
- uint8_t data = 1;
+ u8 data = 1;
// d1: TSI BUSY line
data |= (m_speech->busy_r()) ? 2 : 0;
@@ -712,7 +712,7 @@ WRITE8_MEMBER(fidel6502_state::sc9_control_w)
{
// d0-d3: 74245 P0-P3
// 74245 Q0-Q8: input mux, led select
- uint16_t sel = 1 << (data & 0xf) & 0x3ff;
+ u16 sel = 1 << (data & 0xf) & 0x3ff;
m_inp_mux = sel & 0x1ff;
sc9_prepare_display();
@@ -748,7 +748,7 @@ WRITE8_MEMBER(fidel6502_state::sc12_control_w)
{
// d0-d3: 7442 a0-a3
// 7442 0-8: led data, input mux
- uint16_t sel = 1 << (data & 0xf) & 0x3ff;
+ u16 sel = 1 << (data & 0xf) & 0x3ff;
m_inp_mux = sel & 0x1ff;
// 7442 9: speaker out
@@ -803,24 +803,24 @@ READ8_MEMBER(fidel6502_state::fexcelv_speech_r)
WRITE8_MEMBER(fidel6502_state::fexcel_ttl_w)
{
// a0-a2,d0: 74259(1)
- uint8_t mask = 1 << offset;
+ u8 mask = 1 << offset;
m_led_select = (m_led_select & ~mask) | ((data & 1) ? mask : 0);
// 74259 Q0-Q3: 7442 a0-a3
// 7442 0-8: led data, input mux
- uint16_t sel = 1 << (m_led_select & 0xf) & 0x3ff;
- uint8_t led_data = sel & 0xff;
+ u16 sel = 1 << (m_led_select & 0xf) & 0x3ff;
+ u8 led_data = sel & 0xff;
m_inp_mux = sel & 0x1ff;
// 7442 9: speaker out
m_dac->write(BIT(sel, 9));
// 74259 Q4-Q7,Q2,Q1: digit/led select (active low)
- uint8_t led_sel = ~BITSWAP8(m_led_select,0,3,1,2,7,6,5,4) & 0x3f;
+ u8 led_sel = ~BITSWAP8(m_led_select,0,3,1,2,7,6,5,4) & 0x3f;
// a0-a2,d1: digit segment data (model 6093)
m_7seg_data = (m_7seg_data & ~mask) | ((data & 2) ? mask : 0);
- uint8_t seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
+ u8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
// update display: 4 7seg leds, 2*8 chessboard leds
for (int i = 0; i < 6; i++)
@@ -850,7 +850,7 @@ WRITE8_MEMBER(fidel6502_state::fexcel_ttl_w)
READ8_MEMBER(fidel6502_state::fexcelb_ttl_r)
{
// a0-a2,d6: from speech board: language switches and TSI BUSY line, otherwise tied to VCC
- uint8_t d6 = (m_inp_matrix[9].read_safe(0xff) >> offset & 1) ? 0x40 : 0;
+ u8 d6 = (m_inp_matrix[9].read_safe(0xff) >> offset & 1) ? 0x40 : 0;
// a0-a2,d7: multiplexed inputs (active low)
return d6 | ((read_inputs(9) >> offset & 1) ? 0 : 0x80);
@@ -858,7 +858,7 @@ READ8_MEMBER(fidel6502_state::fexcelb_ttl_r)
READ8_MEMBER(fidel6502_state::fexcel_ttl_r)
{
- uint8_t d7 = 0x80;
+ u8 d7 = 0x80;
// 74259(1) Q7 + 74251 I0: battery status
if (m_inp_mux == 1 && ~m_led_select & 0x80)
@@ -878,15 +878,15 @@ READ8_MEMBER(fidel6502_state::fexcel_ttl_r)
WRITE8_MEMBER(fidel6502_state::fdesdis_control_w)
{
- uint8_t q3_old = m_led_select & 8;
+ u8 q3_old = m_led_select & 8;
// a0-a2,d7: 74259
- uint8_t mask = 1 << offset;
+ u8 mask = 1 << offset;
m_led_select = (m_led_select & ~mask) | ((data & 0x80) ? mask : 0);
// 74259 Q4-Q7: 7442 a0-a3
// 7442 0-8: led data, input mux
- uint16_t sel = 1 << (m_led_select >> 4 & 0xf) & 0x3ff;
+ u16 sel = 1 << (m_led_select >> 4 & 0xf) & 0x3ff;
m_inp_mux = sel & 0x1ff;
// 7442 9: speaker out
@@ -913,7 +913,7 @@ WRITE8_MEMBER(fidel6502_state::fdesdis_control_w)
WRITE8_MEMBER(fidel6502_state::fdesdis_lcd_w)
{
// a0-a2,d0-d3: 4*74259 to lcd digit segments
- uint32_t mask = BITSWAP8(1 << offset,3,7,6,0,1,2,4,5);
+ u32 mask = BITSWAP8(1 << offset,3,7,6,0,1,2,4,5);
for (int i = 0; i < 4; i++)
{
m_7seg_data = (m_7seg_data & ~mask) | ((data >> i & 1) ? 0 : mask);
@@ -943,12 +943,12 @@ DRIVER_INIT_MEMBER(fidel6502_state, fdesdis)
WRITE8_MEMBER(fidel6502_state::chesster_control_w)
{
// a0-a2,d7: 74259(1)
- uint8_t mask = 1 << offset;
+ u8 mask = 1 << offset;
m_led_select = (m_led_select & ~mask) | ((data & 0x80) ? mask : 0);
// 74259 Q4-Q7: 7442 a0-a3
// 7442 0-8: led data, input mux
- uint16_t sel = 1 << (m_led_select >> 4 & 0xf) & 0x3ff;
+ u16 sel = 1 << (m_led_select >> 4 & 0xf) & 0x3ff;
m_inp_mux = sel & 0x1ff;
// 74259 Q0,Q1: led select (active low)
diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp
index fd59a10968c..0eb4796735f 100644
--- a/src/mame/drivers/fidel68k.cpp
+++ b/src/mame/drivers/fidel68k.cpp
@@ -203,7 +203,7 @@ public:
WRITE8_MEMBER(fidel68k_state::fexcel68k_mux_w)
{
// a1-a3,d0: 74259
- uint8_t mask = 1 << offset;
+ u8 mask = 1 << offset;
m_led_select = (m_led_select & ~mask) | ((data & 1) ? mask : 0);
// 74259 Q0-Q3: 74145 A-D (Q4-Q7 N/C)
@@ -222,7 +222,7 @@ void fidel68k_state::eag_prepare_display()
{
// Excel 68000: 4*7seg leds, 8*8 chessboard leds
// EAG: 8*7seg leds(2 panels), (8+1)*8 chessboard leds
- uint8_t seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
+ u8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
set_display_segmask(0x1ff, 0x7f);
display_matrix(16, 9, m_led_data << 8 | seg_data, m_inp_mux);
}
@@ -258,7 +258,7 @@ WRITE8_MEMBER(fidel68k_state::eag_mux_w)
// d0-d3: 74145 A-D
// 74145 0-8: input mux, digit/led select
// 74145 9: speaker out
- uint16_t sel = 1 << (data & 0xf);
+ u16 sel = 1 << (data & 0xf);
m_dac->write(BIT(sel, 9));
m_inp_mux = sel & 0x1ff;
eag_prepare_display();
diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp
index c468c229d32..52199a6b4b2 100644
--- a/src/mame/drivers/fidelz80.cpp
+++ b/src/mame/drivers/fidelz80.cpp
@@ -620,7 +620,7 @@ void fidelz80base_state::machine_reset()
void fidelz80base_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -633,7 +633,7 @@ void fidelz80base_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -688,7 +688,7 @@ void fidelz80base_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void fidelz80base_state::set_display_segmask(uint32_t digits, uint32_t mask)
+void fidelz80base_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
@@ -699,12 +699,12 @@ void fidelz80base_state::set_display_segmask(uint32_t digits, uint32_t mask)
}
}
-void fidelz80base_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void fidelz80base_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -715,9 +715,9 @@ void fidelz80base_state::display_matrix(int maxx, int maxy, uint32_t setx, uint3
// generic input handlers
-uint16_t fidelz80base_state::read_inputs(int columns)
+u16 fidelz80base_state::read_inputs(int columns)
{
- uint16_t ret = 0;
+ u16 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -741,7 +741,7 @@ INPUT_CHANGED_MEMBER(fidelz80_state::reset_button)
DEVICE_IMAGE_LOAD_MEMBER(fidelz80base_state, scc_cartridge)
{
- uint32_t size = m_cart->common_get_size("rom");
+ u32 size = m_cart->common_get_size("rom");
// max size is 16KB?
if (size > 0x4000)
@@ -769,7 +769,7 @@ DEVICE_IMAGE_LOAD_MEMBER(fidelz80base_state, scc_cartridge)
void fidelz80_state::vcc_prepare_display()
{
// 4 7seg leds (note: sel d0 for extra leds)
- uint8_t outdata = (m_7seg_data & 0x7f) | (m_led_select << 7 & 0x80);
+ u8 outdata = (m_7seg_data & 0x7f) | (m_led_select << 7 & 0x80);
set_display_segmask(0xf, 0x7f);
display_matrix(8, 4, outdata, m_led_select >> 2 & 0xf);
}
@@ -836,7 +836,7 @@ WRITE8_MEMBER(fidelz80_state::vcc_ppi_portb_w)
READ8_MEMBER(fidelz80_state::vcc_ppi_portc_r)
{
// d0-d3: multiplexed inputs (active low), also language switches
- uint8_t lan = (~m_led_select & 0x40) ? m_inp_matrix[4]->read() : 0;
+ u8 lan = (~m_led_select & 0x40) ? m_inp_matrix[4]->read() : 0;
return ~(lan | read_inputs(4)) & 0xf;
}
@@ -879,7 +879,7 @@ WRITE8_MEMBER(fidelz80_state::cc10_ppi_porta_w)
WRITE8_MEMBER(fidelz80_state::bcc_control_w)
{
// a0-a2,d7: digit segment data via NE591, Q7 is speaker out
- uint8_t mask = 1 << (offset & 7);
+ u8 mask = 1 << (offset & 7);
m_7seg_data = (m_7seg_data & ~mask) | ((data & 0x80) ? mask : 0);
m_dac->write(BIT(m_7seg_data, 7));
@@ -951,7 +951,7 @@ READ8_MEMBER(fidelz80_state::vsc_pio_porta_r)
READ8_MEMBER(fidelz80_state::vsc_pio_portb_r)
{
- uint8_t data = 0;
+ u8 data = 0;
// d4: TSI BUSY line
data |= (m_speech->busy_r()) ? 0 : 0x10;
@@ -987,7 +987,7 @@ WRITE8_MEMBER(fidelz80_state::vsc_pio_portb_w)
void fidelz80_state::vbrc_prepare_display()
{
// 14seg led segments, d15 is extra led, d14 is unused (tone on prototype?)
- uint16_t outdata = BITSWAP16(m_7seg_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8);
+ u16 outdata = BITSWAP16(m_7seg_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8);
set_display_segmask(0xff, 0x3fff);
display_matrix(16, 8, outdata, m_led_select);
}
@@ -1093,7 +1093,7 @@ ADDRESS_MAP_END
// VSC io: A2 is 8255 _CE, A3 is Z80 PIO _CE - in theory, both chips can be accessed simultaneously
READ8_MEMBER(fidelz80_state::vsc_io_trampoline_r)
{
- uint8_t data = 0xff; // open bus
+ u8 data = 0xff; // open bus
if (~offset & 4)
data &= m_ppi8255->read(space, offset & 3);
if (~offset & 8)
diff --git a/src/mame/drivers/hh_amis2k.cpp b/src/mame/drivers/hh_amis2k.cpp
index 92ddc8343df..c08b8a0f448 100644
--- a/src/mame/drivers/hh_amis2k.cpp
+++ b/src/mame/drivers/hh_amis2k.cpp
@@ -48,14 +48,14 @@ public:
required_device<speaker_sound_device> m_speaker;
required_device<timer_device> m_a12_decay_timer;
- uint8_t m_d;
- uint16_t m_a;
- uint8_t m_q2;
- uint8_t m_q3;
+ u8 m_d;
+ u16 m_a;
+ u8 m_q2;
+ u8 m_q3;
- uint16_t m_display_state[0x10];
- uint16_t m_display_cache[0x10];
- uint8_t m_display_decay[0x100];
+ u16 m_display_state[0x10];
+ u16 m_display_cache[0x10];
+ u8 m_display_decay[0x100];
DECLARE_WRITE8_MEMBER(write_d);
DECLARE_WRITE16_MEMBER(write_a);
@@ -110,7 +110,7 @@ inline bool wildfire_state::index_is_7segled(int index)
void wildfire_state::display_update()
{
- uint16_t active_state[0x10];
+ u16 active_state[0x10];
for (int i = 0; i < 0x10; i++)
{
@@ -292,7 +292,7 @@ enum
lG = 0x01
};
-static const uint8_t wildfire_7seg_table[0x10] =
+static const u8 wildfire_7seg_table[0x10] =
{
0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b, // 0-9 unaltered
0x77, // A -> unused?
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 1795c35e368..0452712afae 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -45,30 +45,30 @@ public:
optional_ioport_array<5> m_inp_matrix; // max 5
// misc common
- uint8_t m_l; // MCU port L write data
- uint8_t m_g; // MCU port G write data
- uint8_t m_d; // MCU port D write data
- int m_so; // MCU SO line state
- int m_sk; // MCU SK line state
- uint16_t m_inp_mux; // multiplexed inputs mask
+ u8 m_l; // MCU port L write data
+ u8 m_g; // MCU port G write data
+ u8 m_d; // MCU port D write data
+ int m_so; // MCU SO line state
+ int m_sk; // MCU SK line state
+ u16 m_inp_mux; // multiplexed inputs mask
- uint16_t read_inputs(int columns);
+ u16 read_inputs(int columns);
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(uint32_t digits, uint32_t mask);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void set_display_segmask(u32 digits, u32 mask);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
@@ -128,7 +128,7 @@ void hh_cop400_state::machine_reset()
void hh_cop400_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -141,7 +141,7 @@ void hh_cop400_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -196,7 +196,7 @@ void hh_cop400_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_cop400_state::set_display_segmask(uint32_t digits, uint32_t mask)
+void hh_cop400_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
@@ -207,12 +207,12 @@ void hh_cop400_state::set_display_segmask(uint32_t digits, uint32_t mask)
}
}
-void hh_cop400_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void hh_cop400_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -223,10 +223,10 @@ void hh_cop400_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t
// generic input handlers
-uint16_t hh_cop400_state::read_inputs(int columns)
+u16 hh_cop400_state::read_inputs(int columns)
{
// active low
- uint16_t ret = 0xffff;
+ u16 ret = 0xffff;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -379,8 +379,8 @@ WRITE8_MEMBER(h2hbaskb_state::write_g)
WRITE8_MEMBER(h2hbaskb_state::write_l)
{
// D2,D3 double as multiplexer
- uint16_t mask = ((m_d >> 2 & 1) * 0x00ff) | ((m_d >> 3 & 1) * 0xff00);
- uint16_t sel = (m_g | m_d << 4 | m_g << 8 | m_d << 12) & mask;
+ u16 mask = ((m_d >> 2 & 1) * 0x00ff) | ((m_d >> 3 & 1) * 0xff00);
+ u16 sel = (m_g | m_d << 4 | m_g << 8 | m_d << 12) & mask;
// D2+G0,G1 are 7segs
set_display_segmask(3, 0x7f);
@@ -498,8 +498,8 @@ void einvaderc_state::prepare_display()
set_display_segmask(7, 0x7f);
// update display
- uint8_t l = BITSWAP8(m_l,7,6,0,1,2,3,4,5);
- uint16_t grid = (m_d | m_g << 4 | m_sk << 8 | m_so << 9) ^ 0x0ff;
+ u8 l = BITSWAP8(m_l,7,6,0,1,2,3,4,5);
+ u16 grid = (m_d | m_g << 4 | m_sk << 8 | m_so << 9) ^ 0x0ff;
display_matrix(8, 10, l, grid);
}
@@ -898,7 +898,7 @@ public:
void lightfgt_state::prepare_display()
{
- uint8_t grid = (m_so | m_d << 1) ^ 0x1f;
+ u8 grid = (m_so | m_d << 1) ^ 0x1f;
display_matrix(5, 5, m_l, grid);
}
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index 4cd7736585a..4f6f357d1f3 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -122,34 +122,34 @@ public:
optional_device<speaker_sound_device> m_speaker;
// misc common
- uint8_t m_r[8]; // MCU R ports write data (optional)
- uint16_t m_d; // MCU D port write data (optional)
- uint8_t m_int[2]; // MCU INT0/1 pins state
- uint16_t m_inp_mux; // multiplexed inputs mask
+ u8 m_r[8]; // MCU R ports write data (optional)
+ u16 m_d; // MCU D port write data (optional)
+ u8 m_int[2]; // MCU INT0/1 pins state
+ u16 m_inp_mux; // multiplexed inputs mask
- uint16_t read_inputs(int columns);
+ u16 read_inputs(int columns);
void refresh_interrupts(void);
void set_interrupt(int line, int state);
DECLARE_INPUT_CHANGED_MEMBER(single_interrupt_line);
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 47 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 47 for now)
- uint32_t m_grid; // VFD current row data
- uint64_t m_plate; // VFD current column data
+ u32 m_grid; // VFD current row data
+ u64 m_plate; // VFD current column data
- uint64_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint64_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x40]; // (internal use)
+ u64 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u64 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x40]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(uint32_t digits, uint32_t mask);
- void display_matrix(int maxx, int maxy, uint64_t setx, uint32_t sety, bool update = true);
+ void set_display_segmask(u32 digits, u32 mask);
+ void display_matrix(int maxx, int maxy, u64 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
@@ -210,7 +210,7 @@ void hh_hmcs40_state::machine_reset()
void hh_hmcs40_state::display_update()
{
- uint64_t active_state[0x20];
+ u64 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -223,7 +223,7 @@ void hh_hmcs40_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint64_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u64 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -278,7 +278,7 @@ void hh_hmcs40_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_hmcs40_state::set_display_segmask(uint32_t digits, uint32_t mask)
+void hh_hmcs40_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
@@ -289,12 +289,12 @@ void hh_hmcs40_state::set_display_segmask(uint32_t digits, uint32_t mask)
}
}
-void hh_hmcs40_state::display_matrix(int maxx, int maxy, uint64_t setx, uint32_t sety, bool update)
+void hh_hmcs40_state::display_matrix(int maxx, int maxy, u64 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint64_t mask = (u64(1) << maxx) - 1;
+ u64 mask = (u64(1) << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (u64(1) << maxx)) : 0;
@@ -305,9 +305,9 @@ void hh_hmcs40_state::display_matrix(int maxx, int maxy, uint64_t setx, uint32_t
// generic input handlers
-uint16_t hh_hmcs40_state::read_inputs(int columns)
+u16 hh_hmcs40_state::read_inputs(int columns)
{
- uint16_t ret = 0;
+ u16 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -382,7 +382,7 @@ WRITE8_MEMBER(bambball_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t plate = BITSWAP16(m_plate,13,8,4,12,9,10,14,1,7,0,15,11,6,3,5,2);
+ u16 plate = BITSWAP16(m_plate,13,8,4,12,9,10,14,1,7,0,15,11,6,3,5,2);
display_matrix(16, 9, plate, m_grid);
}
@@ -491,8 +491,8 @@ public:
void bmboxing_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
- uint32_t plate = BITSWAP16(m_plate,15,14,13,12,1,2,0,3,11,4,10,7,5,6,9,8);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
+ u32 plate = BITSWAP16(m_plate,15,14,13,12,1,2,0,3,11,4,10,7,5,6,9,8);
display_matrix(12, 9, plate, grid);
}
@@ -630,8 +630,8 @@ public:
void bfriskyt_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,0,1,2,3,4,5,6,7);
- uint32_t plate = BITSWAP24(m_plate,23,22,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,0,1,2,3,4,5,6,7);
+ u32 plate = BITSWAP24(m_plate,23,22,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21);
display_matrix(22, 8, plate, grid);
}
@@ -649,7 +649,7 @@ WRITE16_MEMBER(bfriskyt_state::grid_w)
m_speaker->level_w(data >> 6 & 1);
// D11-D15: input mux
- uint8_t inp_mux = data >> 11 & 0x1f;
+ u8 inp_mux = data >> 11 & 0x1f;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -763,8 +763,8 @@ WRITE8_MEMBER(packmon_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,0,1,2,3,4,5,6,19,18,17,16,15,14,13,12,11,10,9,8,7);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,0,1,2,3,4,5,6,19,18,17,16,15,14,13,12,11,10,9,8,7);
display_matrix(20, 10, plate, grid);
}
@@ -873,8 +873,8 @@ public:
void msthawk_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,19,20,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
+ u32 plate = BITSWAP24(m_plate,23,22,21,19,20,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
display_matrix(21, 10, plate, grid);
}
@@ -892,7 +892,7 @@ WRITE16_MEMBER(msthawk_state::grid_w)
m_speaker->level_w(data >> 5 & 1);
// D10-D15: input mux
- uint8_t inp_mux = data >> 10 & 0x3f;
+ u8 inp_mux = data >> 10 & 0x3f;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -1006,8 +1006,8 @@ WRITE8_MEMBER(bzaxxon_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,6,7,8,9,10,5,4,3,2,1,0);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,5,7,0,1,2,3,4,6,19,16,17,18,15,14,13,12,10,8,9,11) | 0x800;
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,6,7,8,9,10,5,4,3,2,1,0);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,5,7,0,1,2,3,4,6,19,16,17,18,15,14,13,12,10,8,9,11) | 0x800;
display_matrix(20, 11, plate, grid);
}
@@ -1017,7 +1017,7 @@ WRITE16_MEMBER(bzaxxon_state::grid_w)
m_speaker->level_w(data >> 4 & 1);
// D7-D10: input mux
- uint8_t inp_mux = data >> 7 & 0xf;
+ u8 inp_mux = data >> 7 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -1127,8 +1127,8 @@ WRITE8_MEMBER(zackman_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint8_t grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
- uint32_t plate = BITSWAP32(m_plate,31,30,27,0,1,2,3,4,5,6,7,8,9,10,11,24,25,26,29,28,23,22,21,20,19,18,17,16,15,14,13,12);
+ u8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
+ u32 plate = BITSWAP32(m_plate,31,30,27,0,1,2,3,4,5,6,7,8,9,10,11,24,25,26,29,28,23,22,21,20,19,18,17,16,15,14,13,12);
display_matrix(29, 8, plate, grid);
}
@@ -1138,7 +1138,7 @@ WRITE16_MEMBER(zackman_state::grid_w)
m_speaker->level_w(data >> 2 & 1);
// D11-D14: input mux
- uint8_t inp_mux = data >> 11 & 0xf;
+ u8 inp_mux = data >> 11 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -1243,8 +1243,8 @@ public:
void bpengo_state::prepare_display()
{
- uint8_t grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
- uint32_t plate = BITSWAP32(m_plate,31,30,29,28,23,22,21,16,17,18,19,20,27,26,25,24,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
+ u8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
+ u32 plate = BITSWAP32(m_plate,31,30,29,28,23,22,21,16,17,18,19,20,27,26,25,24,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
display_matrix(25, 8, plate, grid);
}
@@ -1262,7 +1262,7 @@ WRITE16_MEMBER(bpengo_state::grid_w)
m_speaker->level_w(data >> 10 & 1);
// D12-D15: input mux
- uint8_t inp_mux = data >> 12 & 0xf;
+ u8 inp_mux = data >> 12 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -1372,8 +1372,8 @@ public:
void bbtime_state::prepare_display()
{
- uint8_t grid = BITSWAP8(m_grid,7,6,0,1,2,3,4,5);
- uint32_t plate = BITSWAP32(m_plate,31,30,29,28,25,24,26,27,22,23,15,14,12,11,10,8,7,6,4,1,5,9,13,3,2,16,17,18,19,20,0,21) | 0x1;
+ u8 grid = BITSWAP8(m_grid,7,6,0,1,2,3,4,5);
+ u32 plate = BITSWAP32(m_plate,31,30,29,28,25,24,26,27,22,23,15,14,12,11,10,8,7,6,4,1,5,9,13,3,2,16,17,18,19,20,0,21) | 0x1;
display_matrix(28, 6, plate, grid);
}
@@ -1391,7 +1391,7 @@ WRITE16_MEMBER(bbtime_state::grid_w)
m_speaker->level_w(data >> 3 & 1);
// D10-D14: input mux
- uint8_t inp_mux = data >> 10 & 0x1f;
+ u8 inp_mux = data >> 10 & 0x1f;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -1498,8 +1498,8 @@ WRITE8_MEMBER(bdoramon_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint8_t grid = BITSWAP8(m_grid,0,1,2,3,4,5,7,6);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,11,19,18,17,16,15,14,13,12,10,9,8,7,6,5,4,3,2,1,0);
+ u8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,7,6);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,11,19,18,17,16,15,14,13,12,10,9,8,7,6,5,4,3,2,1,0);
display_matrix(19, 8, plate, grid);
}
@@ -1597,8 +1597,8 @@ WRITE8_MEMBER(bultrman_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint8_t grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,0,18,17,16,15,14,13,12,3,11,10,9,8,7,6,5,4,1,2);
+ u8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,0,18,17,16,15,14,13,12,3,11,10,9,8,7,6,5,4,1,2);
display_matrix(18, 8, plate, grid);
}
@@ -1684,7 +1684,7 @@ public:
void machiman_state::prepare_display()
{
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);
display_matrix(19, 5, plate, m_grid);
}
@@ -1938,7 +1938,7 @@ WRITE8_MEMBER(alnattck_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,16,11,9,8,10,7,2,0,1,3,4,5,6,12,13,14,15);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,16,11,9,8,10,7,2,0,1,3,4,5,6,12,13,14,15);
display_matrix(20, 10, plate, m_grid);
}
@@ -2065,7 +2065,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(cdkong_state::speaker_decay_sim)
void cdkong_state::prepare_display()
{
- uint32_t plate = BITSWAP32(m_plate,31,30,29,24,0,16,8,1,23,17,9,2,18,10,25,27,26,3,15,27,11,11,14,22,6,13,21,5,19,12,20,4) | 0x800800;
+ u32 plate = BITSWAP32(m_plate,31,30,29,24,0,16,8,1,23,17,9,2,18,10,25,27,26,3,15,27,11,11,14,22,6,13,21,5,19,12,20,4) | 0x800800;
display_matrix(29, 11, plate, m_grid);
}
@@ -2183,8 +2183,8 @@ public:
void cgalaxn_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,1,2,0,11,10,9,8,7,6,5,4,3);
- uint16_t plate = BITSWAP16(m_plate,15,14,6,5,4,3,2,1,7,8,9,10,11,0,12,13);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,1,2,0,11,10,9,8,7,6,5,4,3);
+ u16 plate = BITSWAP16(m_plate,15,14,6,5,4,3,2,1,7,8,9,10,11,0,12,13);
display_matrix(15, 12, plate, grid);
}
@@ -2319,8 +2319,8 @@ WRITE8_MEMBER(cpacman_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,0,1,2,3,4,5,6,7,8,9,10);
- uint32_t plate = BITSWAP32(m_plate,31,30,29,28,27,0,1,2,3,8,9,10,11,16,17,18,19,25,26,23,22,21,20,24,15,14,13,12,4,5,6,7);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,0,1,2,3,4,5,6,7,8,9,10);
+ u32 plate = BITSWAP32(m_plate,31,30,29,28,27,0,1,2,3,8,9,10,11,16,17,18,19,25,26,23,22,21,20,24,15,14,13,12,4,5,6,7);
display_matrix(27, 11, plate, grid);
}
@@ -2436,8 +2436,8 @@ WRITE8_MEMBER(cmspacmn_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t grid = BITSWAP16(m_grid,15,14,13,11,10,9,8,7,6,5,4,3,2,1,0,1);
- uint64_t plate = BIT(m_plate,15)<<32 | BITSWAP32(m_plate,14,13,12,4,5,6,7,24,23,25,22,21,20,13,24,3,19,14,12,11,24,2,10,8,7,25,0,9,1,18,17,16) | 0x1004080;
+ u16 grid = BITSWAP16(m_grid,15,14,13,11,10,9,8,7,6,5,4,3,2,1,0,1);
+ u64 plate = BIT(m_plate,15)<<32 | BITSWAP32(m_plate,14,13,12,4,5,6,7,24,23,25,22,21,20,13,24,3,19,14,12,11,24,2,10,8,7,25,0,9,1,18,17,16) | 0x1004080;
display_matrix(33, 12, plate, grid);
}
@@ -2552,7 +2552,7 @@ void sag_state::prepare_display()
// grid 8-11 are 7segs
set_display_segmask(0xf00, 0x7f);
- uint8_t seg = BITSWAP8(m_plate,3,4,5,6,7,8,9,10);
+ u8 seg = BITSWAP8(m_plate,3,4,5,6,7,8,9,10);
for (int y = 8; y < 12; y++)
m_display_state[y] = (m_grid >> y & 1) ? seg : 0;
@@ -2682,8 +2682,8 @@ public:
void egalaxn2_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,15,14,13,12,7,6,5,4,3,2,1,0,19,18,17,16,11,10,9,8);
+ u16 grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,15,14,13,12,7,6,5,4,3,2,1,0,19,18,17,16,11,10,9,8);
display_matrix(24, 15, plate, grid);
}
@@ -2865,7 +2865,7 @@ public:
DECLARE_WRITE8_MEMBER(plate_w);
DECLARE_WRITE16_MEMBER(grid_w);
- uint8_t m_cop_irq;
+ u8 m_cop_irq;
DECLARE_WRITE_LINE_MEMBER(speaker_w);
DECLARE_WRITE8_MEMBER(cop_irq_w);
DECLARE_READ8_MEMBER(cop_latch_r);
@@ -2882,8 +2882,8 @@ protected:
void eturtles_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,1,14,13,12,11,10,9,8,7,6,5,4,3,2,0);
- uint32_t plate = BITSWAP32(m_plate,31,30,11,12,18,19,16,17,22,15,20,21,27,26,23,25,24,2,3,1,0,6,4,5,10,9,2,8,7,14,1,13);
+ u16 grid = BITSWAP16(m_grid,15,1,14,13,12,11,10,9,8,7,6,5,4,3,2,0);
+ u32 plate = BITSWAP32(m_plate,31,30,11,12,18,19,16,17,22,15,20,21,27,26,23,25,24,2,3,1,0,6,4,5,10,9,2,8,7,14,1,13);
display_matrix(30, 15, plate | (grid >> 5 & 8), grid); // grid 8 also forces plate 3 high
}
@@ -2902,7 +2902,7 @@ WRITE16_MEMBER(eturtles_state::grid_w)
m_d = data;
// D1-D6: input mux
- uint8_t inp_mux = data >> 1 & 0x3f;
+ u8 inp_mux = data >> 1 & 0x3f;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -2917,7 +2917,7 @@ WRITE16_MEMBER(eturtles_state::grid_w)
void eturtles_state::update_int()
{
// INT0/1 on multiplexed inputs, and from COP D0
- uint8_t inp = read_inputs(6);
+ u8 inp = read_inputs(6);
set_interrupt(0, (inp & 1) | m_cop_irq);
set_interrupt(1, inp & 2);
}
@@ -3062,8 +3062,8 @@ public:
void estargte_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,0,14,13,12,11,10,9,8,7,6,5,4,3,2,1);
- uint32_t plate = BITSWAP32(m_plate,31,30,29,15,17,19,21,23,25,27,26,24,3,22,20,18,16,14,12,10,8,6,4,2,0,1,3,5,7,9,11,13);
+ u16 grid = BITSWAP16(m_grid,15,0,14,13,12,11,10,9,8,7,6,5,4,3,2,1);
+ u32 plate = BITSWAP32(m_plate,31,30,29,15,17,19,21,23,25,27,26,24,3,22,20,18,16,14,12,10,8,6,4,2,0,1,3,5,7,9,11,13);
display_matrix(29, 14, plate, grid);
}
@@ -3179,8 +3179,8 @@ WRITE8_MEMBER(ghalien_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,14,12,10,8,9,13,15,2,0,1,3,11,7,5,4,6,19,17,16,18);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,14,12,10,8,9,13,15,2,0,1,3,11,7,5,4,6,19,17,16,18);
display_matrix(20, 10, plate, grid);
}
@@ -3298,8 +3298,8 @@ WRITE8_MEMBER(gckong_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,0,1,2,3,4,5,6,7,8,9,10);
- uint32_t plate = BITSWAP32(m_plate,31,30,29,28,27,26,25,6,7,8,12,13,14,15,16,17,18,17,16,12,11,10,9,8,7,6,5,4,3,2,1,0) | 0x8000;
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,0,1,2,3,4,5,6,7,8,9,10);
+ u32 plate = BITSWAP32(m_plate,31,30,29,28,27,26,25,6,7,8,12,13,14,15,16,17,18,17,16,12,11,10,9,8,7,6,5,4,3,2,1,0) | 0x8000;
display_matrix(32, 11, plate, grid);
}
@@ -3309,7 +3309,7 @@ WRITE16_MEMBER(gckong_state::grid_w)
m_speaker->level_w(data >> 2 & 1);
// D5-D8: input mux
- uint8_t inp_mux = data >> 5 & 0xf;
+ u8 inp_mux = data >> 5 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -3422,7 +3422,7 @@ WRITE8_MEMBER(gdigdug_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint32_t plate = BITSWAP32(m_plate,30,31,0,1,2,3,4,5,6,7,20,21,22,27,26,25,28,29,24,23,15,14,13,12,8,9,10,11,19,18,17,16);
+ u32 plate = BITSWAP32(m_plate,30,31,0,1,2,3,4,5,6,7,20,21,22,27,26,25,28,29,24,23,15,14,13,12,8,9,10,11,19,18,17,16);
display_matrix(32, 9, plate, m_grid);
}
@@ -3432,7 +3432,7 @@ WRITE16_MEMBER(gdigdug_state::grid_w)
m_speaker->level_w(data >> 6 & 1);
// D11-D15: input mux
- uint8_t inp_mux = data >> 11 & 0x1f;
+ u8 inp_mux = data >> 11 & 0x1f;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -3543,7 +3543,7 @@ public:
void mwcbaseb_state::prepare_display()
{
- uint8_t grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
+ u8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
display_matrix(16, 8, m_plate, grid);
}
@@ -3641,7 +3641,7 @@ static INPUT_PORTS_START( mwcbaseb )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("P1 1")
INPUT_PORTS_END
-static const int16_t mwcbaseb_speaker_levels[] = { 0, 0x3fff, -0x4000, 0, -0x4000, 0, -0x8000, -0x4000 };
+static const s16 mwcbaseb_speaker_levels[] = { 0, 0x3fff, -0x4000, 0, -0x4000, 0, -0x8000, -0x4000 };
static MACHINE_CONFIG_START( mwcbaseb, mwcbaseb_state )
@@ -3703,7 +3703,7 @@ WRITE8_MEMBER(pbqbert_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint32_t plate = BITSWAP32(m_plate,31,30,24,25,26,27,28,15,14,29,13,12,11,10,9,8,7,6,5,4,3,2,1,0,16,17,18,19,20,21,22,23) | 0x400000;
+ u32 plate = BITSWAP32(m_plate,31,30,24,25,26,27,28,15,14,29,13,12,11,10,9,8,7,6,5,4,3,2,1,0,16,17,18,19,20,21,22,23) | 0x400000;
display_matrix(30, 8, plate, m_grid);
}
@@ -3791,8 +3791,8 @@ public:
void kingman_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
- uint32_t plate = BITSWAP24(m_plate,23,6,7,5,4,3,2,1,0,13,12,20,19,18,17,16,10,11,9,8,14,15,13,12);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
+ u32 plate = BITSWAP24(m_plate,23,6,7,5,4,3,2,1,0,13,12,20,19,18,17,16,10,11,9,8,14,15,13,12);
display_matrix(23, 9, plate, grid);
}
@@ -3810,7 +3810,7 @@ WRITE16_MEMBER(kingman_state::grid_w)
m_speaker->level_w(data >> 6 & 1);
// D12-D15: input mux
- uint8_t inp_mux = data >> 12 & 0xf;
+ u8 inp_mux = data >> 12 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -3913,8 +3913,8 @@ public:
void tmtron_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,1,2,3,4,5,6,7,8,9,0);
- uint32_t plate = BITSWAP24(m_plate,23,5,2,21,1,6,7,9,10,11,21,0,19,3,4,8,3,18,17,16,12,13,14,15);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,1,2,3,4,5,6,7,8,9,0);
+ u32 plate = BITSWAP24(m_plate,23,5,2,21,1,6,7,9,10,11,21,0,19,3,4,8,3,18,17,16,12,13,14,15);
display_matrix(23, 10, plate, grid);
}
@@ -3932,7 +3932,7 @@ WRITE16_MEMBER(tmtron_state::grid_w)
m_speaker->level_w(data >> 4 & 1);
// D12-D15: input mux
- uint8_t inp_mux = data >> 12 & 0xf;
+ u8 inp_mux = data >> 12 & 0xf;
if (inp_mux != m_inp_mux)
{
m_inp_mux = inp_mux;
@@ -4040,7 +4040,7 @@ WRITE8_MEMBER(vinvader_state::plate_w)
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- uint16_t plate = BITSWAP16(m_plate,15,11,7,3,10,6,14,2,9,5,13,1,8,4,12,0);
+ u16 plate = BITSWAP16(m_plate,15,11,7,3,10,6,14,2,9,5,13,1,8,4,12,0);
display_matrix(12, 9, plate, m_grid);
}
diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp
index 0e557ee6b58..f337c6def02 100644
--- a/src/mame/drivers/hh_melps4.cpp
+++ b/src/mame/drivers/hh_melps4.cpp
@@ -34,28 +34,28 @@ public:
optional_device<speaker_sound_device> m_speaker;
// misc common
- uint16_t m_inp_mux; // multiplexed inputs mask
+ u16 m_inp_mux; // multiplexed inputs mask
- uint8_t read_inputs(int columns);
+ u8 read_inputs(int columns);
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
- uint32_t m_grid; // VFD current row data
- uint32_t m_plate; // VFD current column data
+ u32 m_grid; // VFD current row data
+ u32 m_plate; // VFD current column data
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
@@ -109,7 +109,7 @@ void hh_melps4_state::machine_reset()
void hh_melps4_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -122,7 +122,7 @@ void hh_melps4_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -177,12 +177,12 @@ void hh_melps4_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_melps4_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void hh_melps4_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -193,9 +193,9 @@ void hh_melps4_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t
// generic input handlers
-uint8_t hh_melps4_state::read_inputs(int columns)
+u8 hh_melps4_state::read_inputs(int columns)
{
- uint8_t ret = 0;
+ u8 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -246,8 +246,8 @@ public:
void cfrogger_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,0,1,2,3,4,5,6,7,8,9,10,11);
- uint16_t plate = BITSWAP16(m_plate,12,4,13,5,14,6,15,7,3,11,2,10,1,9,0,8);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,0,1,2,3,4,5,6,7,8,9,10,11);
+ u16 plate = BITSWAP16(m_plate,12,4,13,5,14,6,15,7,3,11,2,10,1,9,0,8);
display_matrix(16, 12, plate, grid);
}
@@ -362,8 +362,8 @@ public:
void gjungler_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,7,6,5,4,3,2,0,1);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,18,8,9,10,11,13,16,15,14,13,12,7,0,6,1,5,2,4,3) | 0x2000;
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,7,6,5,4,3,2,0,1);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,8,9,10,11,13,16,15,14,13,12,7,0,6,1,5,2,4,3) | 0x2000;
display_matrix(18, 12, plate, grid);
}
diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp
index c8b013ecd12..8d50186f349 100644
--- a/src/mame/drivers/hh_pic16.cpp
+++ b/src/mame/drivers/hh_pic16.cpp
@@ -50,23 +50,23 @@ public:
optional_device<speaker_sound_device> m_speaker;
// misc common
- uint8_t m_b; // MCU port B data
- uint8_t m_c; // MCU port C data
+ u8 m_b; // MCU port B data
+ u8 m_c; // MCU port C data
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
@@ -118,7 +118,7 @@ void hh_pic16_state::machine_reset()
void hh_pic16_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -131,7 +131,7 @@ void hh_pic16_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -186,12 +186,12 @@ void hh_pic16_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_pic16_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void hh_pic16_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -258,7 +258,7 @@ static INPUT_PORTS_START( maniac )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) // upper-left
INPUT_PORTS_END
-static const int16_t maniac_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 maniac_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( maniac, maniac_state )
diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp
index 92fc2c56e06..a0edf5bc8b8 100644
--- a/src/mame/drivers/hh_sm510.cpp
+++ b/src/mame/drivers/hh_sm510.cpp
@@ -34,11 +34,11 @@ public:
optional_device<speaker_sound_device> m_speaker;
// misc common
- uint16_t m_inp_mux; // multiplexed inputs mask
- int m_inp_lines; // number of input mux columns
- uint8_t m_lcd_output_cache[0x100];
+ u16 m_inp_mux; // multiplexed inputs mask
+ int m_inp_lines; // number of input mux columns
+ u8 m_lcd_output_cache[0x100];
- uint8_t read_inputs(int columns);
+ u8 read_inputs(int columns);
virtual void update_k_line();
virtual DECLARE_INPUT_CHANGED_MEMBER(input_changed);
@@ -87,7 +87,7 @@ WRITE16_MEMBER(hh_sm510_state::lcd_segment_w)
for (int seg = 0; seg < 0x10; seg++)
{
int index = offset << 4 | seg;
- uint8_t state = data >> seg & 1;
+ u8 state = data >> seg & 1;
if (state != m_lcd_output_cache[index])
{
@@ -107,9 +107,9 @@ WRITE16_MEMBER(hh_sm510_state::lcd_segment_w)
// generic input handlers - usually S output is input mux, and K input for buttons
-uint8_t hh_sm510_state::read_inputs(int columns)
+u8 hh_sm510_state::read_inputs(int columns)
{
- uint8_t ret = 0;
+ u8 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index e14282582f9..5c908fdbb50 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -250,7 +250,7 @@ void hh_tms1k_state::machine_reset()
void hh_tms1k_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -263,7 +263,7 @@ void hh_tms1k_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -325,7 +325,7 @@ void hh_tms1k_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_tms1k_state::set_display_segmask(uint32_t digits, uint32_t mask)
+void hh_tms1k_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
@@ -336,12 +336,12 @@ void hh_tms1k_state::set_display_segmask(uint32_t digits, uint32_t mask)
}
}
-void hh_tms1k_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void hh_tms1k_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -352,9 +352,9 @@ void hh_tms1k_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t
// generic input handlers
-uint8_t hh_tms1k_state::read_inputs(int columns)
+u8 hh_tms1k_state::read_inputs(int columns)
{
- uint8_t ret = 0;
+ u8 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -364,10 +364,10 @@ uint8_t hh_tms1k_state::read_inputs(int columns)
return ret;
}
-uint8_t hh_tms1k_state::read_rotated_inputs(int columns, uint8_t rowmask)
+u8 hh_tms1k_state::read_rotated_inputs(int columns, u8 rowmask)
{
- uint8_t ret = 0;
- uint16_t colmask = (1 << columns) - 1;
+ u8 ret = 0;
+ u16 colmask = (1 << columns) - 1;
// read selected input columns
for (int i = 0; i < 8; i++)
@@ -510,7 +510,7 @@ static INPUT_PORTS_START( matchnum )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Square 1")
INPUT_PORTS_END
-static const int16_t matchnum_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 matchnum_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( matchnum, matchnum_state )
@@ -656,7 +656,7 @@ static INPUT_PORTS_START( mathmagi )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t mathmagi_output_pla[0x20] =
+static const u16 mathmagi_output_pla[0x20] =
{
lA+lB+lC+lD+lE+lF, // 0
lB+lC, // 1
@@ -873,7 +873,7 @@ WRITE16_MEMBER(amaztron_state::write_o)
READ8_MEMBER(amaztron_state::read_k)
{
// K: multiplexed inputs
- uint8_t k = read_inputs(6);
+ u8 k = read_inputs(6);
// the 5th column is tied to K4+K8
if (k & 0x10) k |= 0xc;
@@ -1066,7 +1066,7 @@ static INPUT_PORTS_START( zodiac )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t zodiac_output_pla[0x20] =
+static const u16 zodiac_output_pla[0x20] =
{
0x80, // empty/led 1/7
lC, // i/led 2/8
@@ -1154,7 +1154,7 @@ public:
void cqback_state::prepare_display()
{
// R9 selects between segments B/C or A'/D'
- uint16_t seg = m_o;
+ u16 seg = m_o;
if (m_r & 0x200)
seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
@@ -2087,7 +2087,7 @@ static INPUT_PORTS_START( cnfball )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
INPUT_PORTS_END
-static const int16_t cnfball_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 cnfball_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( cnfball, cnfball_state )
@@ -2143,7 +2143,7 @@ public:
void cnfball2_state::prepare_display()
{
// R1 selects between segments B/C or A'/D'
- uint16_t seg = m_o;
+ u16 seg = m_o;
if (~m_r & 2)
seg = (m_o << 7 & 0x300) | (m_o & 0xf9);
@@ -2205,7 +2205,7 @@ static INPUT_PORTS_START( cnfball2 )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t cnfball2_output_pla[0x20] =
+static const u16 cnfball2_output_pla[0x20] =
{
// first half was dumped electronically
0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x40, 0x01, 0x08, 0x02, 0x04, 0x00,
@@ -3346,7 +3346,7 @@ void raisedvl_state::set_clock()
// 0: R=47K -> ~350kHz
// 2,3: R=35K8 -> ~425kHz (combined)
// 4: R=32K -> ~465kHz (combined)
- uint8_t inp = m_inp_matrix[1]->read();
+ u8 inp = m_inp_matrix[1]->read();
m_maincpu->set_unscaled_clock((inp & 0x20) ? 465000 : ((inp & 0x10) ? 425000 : 350000));
}
@@ -3665,8 +3665,8 @@ public:
void ginv1000_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,9,8,7);
- uint16_t plate = BITSWAP16(m_plate,15,14,13,12,3,4,7,8,9,10,11,2,6,5,1,0);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,9,8,7);
+ u16 plate = BITSWAP16(m_plate,15,14,13,12,3,4,7,8,9,10,11,2,6,5,1,0);
display_matrix(12, 10, plate, grid);
}
@@ -3987,7 +3987,7 @@ static INPUT_PORTS_START( elecdet )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
INPUT_PORTS_END
-static const int16_t elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff };
+static const s16 elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff };
static MACHINE_CONFIG_START( elecdet, elecdet_state )
@@ -4313,8 +4313,8 @@ void elecbowl_state::prepare_display()
}
// lamp muxes
- uint8_t mask = 1 << (m_o & 7);
- uint8_t d = (m_r & 2) ? mask : 0;
+ u8 mask = 1 << (m_o & 7);
+ u8 d = (m_r & 2) ? mask : 0;
if (~m_r & 1)
m_display_state[5] = (m_display_state[5] & ~mask) | d;
if (~m_r & 4)
@@ -4391,7 +4391,7 @@ static INPUT_PORTS_START( elecbowl )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t elecbowl_output_pla[0x20] =
+static const u16 elecbowl_output_pla[0x20] =
{
lA+lB+lC+lD+lE+lF, // 0
lB+lC, // 1
@@ -5197,7 +5197,7 @@ void ssimon_state::set_clock()
// 0 Simple: R=51K -> ~200kHz
// 1 Normal: R=37K -> ~275kHz
// 2 Super: R=22K -> ~400kHz
- uint8_t inp = m_inp_matrix[6]->read();
+ u8 inp = m_inp_matrix[6]->read();
m_maincpu->set_unscaled_clock((inp & 2) ? 400000 : ((inp & 1) ? 275000 : 200000));
}
@@ -5385,7 +5385,7 @@ void bigtrak_state::machine_start()
save_item(NAME(m_gearbox_pos));
}
-static const int16_t bigtrak_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
+static const s16 bigtrak_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
static MACHINE_CONFIG_START( bigtrak, bigtrak_state )
@@ -5509,7 +5509,7 @@ void mbdtower_state::prepare_display()
// update current state
if (~m_r & 0x10)
{
- uint8_t o = BITSWAP8(m_o,7,0,4,3,2,1,6,5) & 0x7f;
+ u8 o = BITSWAP8(m_o,7,0,4,3,2,1,6,5) & 0x7f;
m_display_state[2] = (m_o & 0x80) ? o : 0;
m_display_state[1] = (m_o & 0x80) ? 0 : o;
m_display_state[0] = (m_r >> 8 & 1) | (m_r >> 4 & 0xe);
@@ -5851,7 +5851,7 @@ static INPUT_PORTS_START( merlin )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("New Game")
INPUT_PORTS_END
-static const int16_t merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
+static const s16 merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff };
static MACHINE_CONFIG_START( merlin, merlin_state )
@@ -6030,7 +6030,7 @@ static INPUT_PORTS_START( stopthief )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
INPUT_PORTS_END
-static const int16_t stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff };
+static const s16 stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff };
static MACHINE_CONFIG_START( stopthief, stopthief_state )
@@ -6364,7 +6364,7 @@ static INPUT_PORTS_START( lostreas )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("Up")
INPUT_PORTS_END
-static const int16_t lostreas_speaker_levels[16] =
+static const s16 lostreas_speaker_levels[16] =
{
0, 0x7fff/15, 0x7fff/14, 0x7fff/13, 0x7fff/12, 0x7fff/11, 0x7fff/10, 0x7fff/9,
0x7fff/8, 0x7fff/7, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff/1
@@ -6422,8 +6422,8 @@ public:
void tcfball_state::prepare_display()
{
// R8 enables leds, R9 enables digits
- uint16_t mask = ((m_r >> 9 & 1) * 0x7f) | ((m_r >> 8 & 1) * 0x780);
- uint16_t sel = ((m_r & 0x7f) | (m_r << 7 & 0x780)) & mask;
+ u16 mask = ((m_r >> 9 & 1) * 0x7f) | ((m_r >> 8 & 1) * 0x780);
+ u16 sel = ((m_r & 0x7f) | (m_r << 7 & 0x780)) & mask;
set_display_segmask(0x77, 0x7f);
set_display_segmask(0x08, 0xff); // R3 has DP
@@ -6538,7 +6538,7 @@ static INPUT_PORTS_START( tcfballa )
INPUT_PORTS_END
// output PLA is not decapped, dumped electronically
-static const uint16_t tcfballa_output_pla[0x20] =
+static const u16 tcfballa_output_pla[0x20] =
{
0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x00, 0x46, 0x70, 0x00, 0x00, 0x00,
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -6696,7 +6696,7 @@ static INPUT_PORTS_START( tandy12 )
INPUT_PORTS_END
// output PLA is not decapped
-static const uint16_t tandy12_output_pla[0x20] =
+static const u16 tandy12_output_pla[0x20] =
{
// these are certain
0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40,
@@ -7069,7 +7069,7 @@ static INPUT_PORTS_START( copycat )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-static const int16_t copycat_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 copycat_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( copycat, copycat_state )
@@ -7398,7 +7398,7 @@ public:
{ }
required_device<tms1024_device> m_expander;
- uint8_t m_exp_port[7];
+ u8 m_exp_port[7];
DECLARE_WRITE8_MEMBER(expander_w);
void prepare_display();
@@ -7787,7 +7787,7 @@ static INPUT_PORTS_START( ssports4 )
INPUT_PORTS_END
// output PLA is not decapped, dumped electronically
-static const uint16_t ssports4_output_pla[0x20] =
+static const u16 ssports4_output_pla[0x20] =
{
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40
diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp
index 7d96935a0e1..6a537bec409 100644
--- a/src/mame/drivers/hh_ucom4.cpp
+++ b/src/mame/drivers/hh_ucom4.cpp
@@ -129,7 +129,7 @@ void hh_ucom4_state::machine_reset()
void hh_ucom4_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -142,7 +142,7 @@ void hh_ucom4_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -197,12 +197,12 @@ void hh_ucom4_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void hh_ucom4_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void hh_ucom4_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -213,9 +213,9 @@ void hh_ucom4_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t
// generic input handlers
-uint8_t hh_ucom4_state::read_inputs(int columns)
+u8 hh_ucom4_state::read_inputs(int columns)
{
- uint8_t ret = 0;
+ u8 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
@@ -294,8 +294,8 @@ public:
void ufombs_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,3,2,1,0,4,5,6,7,8);
- uint16_t plate = BITSWAP16(m_plate,15,14,13,12,11,7,10,6,9,5,8,4,0,1,2,3);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,3,2,1,0,4,5,6,7,8);
+ u16 plate = BITSWAP16(m_plate,15,14,13,12,11,7,10,6,9,5,8,4,0,1,2,3);
display_matrix(10, 9, plate, grid);
}
@@ -339,7 +339,7 @@ static INPUT_PORTS_START( ufombs )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-static const int16_t ufombs_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 ufombs_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( ufombs, ufombs_state )
@@ -406,7 +406,7 @@ public:
void ssfball_state::prepare_display()
{
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,10,9,8,0,1,2,4,5,6);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,10,9,8,0,1,2,4,5,6);
display_matrix(16, 9, plate, m_grid);
}
@@ -485,7 +485,7 @@ static INPUT_PORTS_START( ssfball )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
INPUT_PORTS_END
-static const int16_t ssfball_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 ssfball_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( ssfball, ssfball_state )
@@ -550,7 +550,7 @@ public:
void bmsoccer_state::prepare_display()
{
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,8,4,0,9,5,1,10,6,2);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,8,4,0,9,5,1,10,6,2);
display_matrix(16, 9, plate, m_grid);
}
@@ -673,8 +673,8 @@ public:
void bmsafari_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
- uint16_t plate = BITSWAP16(m_plate,15,14,13,12,11,7,10,2,9,5,8,4,0,1,6,3);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
+ u16 plate = BITSWAP16(m_plate,15,14,13,12,11,7,10,2,9,5,8,4,0,1,6,3);
display_matrix(10, 9, plate, grid);
}
@@ -783,7 +783,7 @@ public:
void splasfgt_state::prepare_display()
{
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,13,1,0,8,6,0,10,11,14,15,16,9,5,7,4,2,3);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,13,1,0,8,6,0,10,11,14,15,16,9,5,7,4,2,3);
display_matrix(16, 9, plate, m_grid);
}
@@ -871,7 +871,7 @@ static INPUT_PORTS_START( splasfgt )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-static const int16_t splasfgt_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
+static const s16 splasfgt_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 };
static MACHINE_CONFIG_START( splasfgt, splasfgt_state )
@@ -935,8 +935,8 @@ public:
void bcclimbr_state::prepare_display()
{
- uint8_t grid = BITSWAP8(m_grid,7,6,0,1,2,3,4,5);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,16,17,18,19,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
+ u8 grid = BITSWAP8(m_grid,7,6,0,1,2,3,4,5);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,16,17,18,19,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
display_matrix(20, 6, plate, grid);
}
@@ -1153,8 +1153,8 @@ public:
void invspace_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,8,9,7,6,5,4,3,2,1,0);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,9,14,13,8,15,11,10,7,11,3,2,6,10,1,5,9,0,4,8);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,8,9,7,6,5,4,3,2,1,0);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,9,14,13,8,15,11,10,7,11,3,2,6,10,1,5,9,0,4,8);
display_matrix(19, 9, plate, grid);
}
@@ -1257,7 +1257,7 @@ public:
void efball_state::prepare_display()
{
- uint16_t plate = BITSWAP16(m_plate,15,14,13,12,11,4,3,0,2,1,6,10,9,5,8,7);
+ u16 plate = BITSWAP16(m_plate,15,14,13,12,11,4,3,0,2,1,6,10,9,5,8,7);
display_matrix(11, 10, plate, m_grid);
}
@@ -1370,8 +1370,8 @@ public:
void galaxy2_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
- uint16_t plate = BITSWAP16(m_plate,15,3,2,6,1,5,4,0,11,10,7,12,14,13,8,9);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
+ u16 plate = BITSWAP16(m_plate,15,3,2,6,1,5,4,0,11,10,7,12,14,13,8,9);
display_matrix(15, 10, plate, grid);
}
@@ -1481,8 +1481,8 @@ public:
void astrocmd_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,3,2,12,13,14,15,16,17,18,0,1,4,8,5,9,7,11,6,10);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,3,2,12,13,14,15,16,17,18,0,1,4,8,5,9,7,11,6,10);
display_matrix(17, 9, plate, grid);
}
@@ -1759,8 +1759,8 @@ public:
void mvbfree_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
- uint16_t plate = BITSWAP16(m_plate,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
+ u16 grid = BITSWAP16(m_grid,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
+ u16 plate = BITSWAP16(m_plate,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
display_matrix(10, 14, plate, grid);
}
@@ -1980,8 +1980,8 @@ public:
void tccombat_state::prepare_display()
{
- uint16_t grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,3,2,1,0,7,6,5,4);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,11,15,3,10,14,2,9,13,1,0,12,8,15,1,5,0,3,7,2,6);
+ u16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,3,2,1,0,7,6,5,4);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,11,15,3,10,14,2,9,13,1,0,12,8,15,1,5,0,3,7,2,6);
display_matrix(20, 9, plate, grid);
}
@@ -2243,8 +2243,8 @@ public:
void tmpacman_state::prepare_display()
{
- uint8_t grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15) | 0x100;
+ u8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15) | 0x100;
display_matrix(19, 8, plate, grid);
}
@@ -2348,7 +2348,7 @@ public:
void tmscramb_state::prepare_display()
{
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,3,15,2,14,1,13,16,0,12,8,4,9,5,10,6,11,7) | 0x400;
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,3,15,2,14,1,13,16,0,12,8,4,9,5,10,6,11,7) | 0x400;
display_matrix(17, 10, plate, m_grid);
}
@@ -2450,8 +2450,8 @@ public:
void tcaveman_state::prepare_display()
{
- uint8_t grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
- uint32_t plate = BITSWAP24(m_plate,23,22,21,20,19,10,11,5,6,7,8,0,9,2,18,17,16,3,15,14,13,12,4,1) | 0x40;
+ u8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
+ u32 plate = BITSWAP24(m_plate,23,22,21,20,19,10,11,5,6,7,8,0,9,2,18,17,16,3,15,14,13,12,4,1) | 0x40;
display_matrix(19, 8, plate, grid);
}
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
index c68620e1d1c..50420033dde 100644
--- a/src/mame/drivers/k28.cpp
+++ b/src/mame/drivers/k28.cpp
@@ -50,30 +50,30 @@ public:
required_ioport_array<7> m_inp_matrix;
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(uint32_t digits, uint32_t mask);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void set_display_segmask(u32 digits, u32 mask);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
bool m_power_on;
- uint8_t m_inp_mux;
- uint8_t m_phoneme;
+ u8 m_inp_mux;
+ u8 m_phoneme;
int m_speech_strobe;
int m_vfd_data_enable;
int m_vfd_data_in;
int m_vfd_clock;
- uint64_t m_vfd_shiftreg;
- uint64_t m_vfd_shiftreg_out;
+ u64 m_vfd_shiftreg;
+ u64 m_vfd_shiftreg_out;
int m_vfd_shiftcount;
DECLARE_WRITE8_MEMBER(mcu_p0_w);
@@ -168,7 +168,7 @@ void k28_state::power_off()
void k28_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -181,7 +181,7 @@ void k28_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -236,7 +236,7 @@ void k28_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void k28_state::set_display_segmask(uint32_t digits, uint32_t mask)
+void k28_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
@@ -247,12 +247,12 @@ void k28_state::set_display_segmask(uint32_t digits, uint32_t mask)
}
}
-void k28_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void k28_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -297,7 +297,7 @@ WRITE8_MEMBER(k28_state::mcu_p0_w)
READ8_MEMBER(k28_state::mcu_p1_r)
{
- uint8_t data = 0;
+ u8 data = 0;
// multiplexed inputs (active low)
for (int i = 0; i < 7; i++)
@@ -352,11 +352,11 @@ WRITE8_MEMBER(k28_state::mcu_prog_w)
m_vfd_shiftcount = 0;
// output 0-15: digit segment data
- uint16_t seg_data = (uint16_t)(m_vfd_shiftreg >> 19);
+ u16 seg_data = (u16)(m_vfd_shiftreg >> 19);
seg_data = BITSWAP16(seg_data,0,1,13,9,10,12,14,8,3,4,5,2,15,11,6,7);
// output 16-24: digit select
- uint16_t digit_sel = (uint16_t)(m_vfd_shiftreg >> 10) & 0x1ff;
+ u16 digit_sel = (u16)(m_vfd_shiftreg >> 10) & 0x1ff;
set_display_segmask(0x1ff, 0x3fff);
display_matrix(16, 9, seg_data, digit_sel);
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index 038ecbeba7f..be32aecb1a1 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -481,7 +481,7 @@ WRITE16_MEMBER( microvision_state::tms1100_write_r )
}
-static const uint16_t microvision_output_pla_0[0x20] =
+static const u16 microvision_output_pla_0[0x20] =
{
/* O output PLA configuration currently unknown */
0x00, 0x08, 0x04, 0x0C, 0x02, 0x0A, 0x06, 0x0E,
@@ -491,7 +491,7 @@ static const uint16_t microvision_output_pla_0[0x20] =
};
-static const uint16_t microvision_output_pla_1[0x20] =
+static const u16 microvision_output_pla_1[0x20] =
{
/* O output PLA configuration currently unknown */
/* Reversed bit order */
diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp
index 2aff0a8543b..265174cafc2 100644
--- a/src/mame/drivers/novag6502.cpp
+++ b/src/mame/drivers/novag6502.cpp
@@ -90,29 +90,29 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); }
// misc common
- uint16_t m_inp_mux; // multiplexed keypad mask
- uint16_t m_led_select;
- uint16_t m_led_data;
+ u16 m_inp_mux; // multiplexed keypad mask
+ u16 m_led_select;
+ u16 m_led_data;
- uint16_t read_inputs(int columns);
+ u16 read_inputs(int columns);
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
-
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
+
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
- uint8_t m_lcd_control;
+ u8 m_lcd_control;
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(uint32_t digits, uint32_t mask);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void set_display_segmask(u32 digits, u32 mask);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
// Super Constellation
DECLARE_WRITE8_MEMBER(supercon_mux_w);
@@ -192,7 +192,7 @@ void novag6502_state::machine_reset()
void novag6502_state::display_update()
{
- uint32_t active_state[0x20];
+ u32 active_state[0x20];
for (int y = 0; y < m_display_maxy; y++)
{
@@ -205,7 +205,7 @@ void novag6502_state::display_update()
m_display_decay[y][x] = m_display_wait;
// determine active state
- uint32_t ds = (m_display_decay[y][x] != 0) ? 1 : 0;
+ u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state[y] |= (ds << x);
}
}
@@ -260,7 +260,7 @@ void novag6502_state::set_display_size(int maxx, int maxy)
m_display_maxy = maxy;
}
-void novag6502_state::set_display_segmask(uint32_t digits, uint32_t mask)
+void novag6502_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
@@ -271,12 +271,12 @@ void novag6502_state::set_display_segmask(uint32_t digits, uint32_t mask)
}
}
-void novag6502_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update)
+void novag6502_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
- uint32_t mask = (1 << maxx) - 1;
+ u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
@@ -287,9 +287,9 @@ void novag6502_state::display_matrix(int maxx, int maxy, uint32_t setx, uint32_t
// generic input handlers
-uint16_t novag6502_state::read_inputs(int columns)
+u16 novag6502_state::read_inputs(int columns)
{
- uint16_t ret = 0;
+ u16 ret = 0;
// read selected input rows
for (int i = 0; i < columns; i++)
diff --git a/src/mame/drivers/tb303.cpp b/src/mame/drivers/tb303.cpp
index f76c39e5dc0..c15c61e1dab 100644
--- a/src/mame/drivers/tb303.cpp
+++ b/src/mame/drivers/tb303.cpp
@@ -26,8 +26,8 @@ public:
: hh_ucom4_state(mconfig, type, tag)
{ }
- uint8_t m_ram[0xc00];
- uint16_t m_ram_address;
+ u8 m_ram[0xc00];
+ u16 m_ram_address;
bool m_ram_ce;
bool m_ram_we;
@@ -67,7 +67,7 @@ void tb303_state::refresh_ram()
// MCU E2,E3 goes through a 4556 IC(pin 14,13) to one of uPD444 _CE:
// _Q0: N/C, _Q1: IC-5, _Q2: IC-3, _Q3: IC-4
m_ram_ce = true;
- uint8_t hi = 0;
+ u8 hi = 0;
switch (m_port[NEC_UCOM4_PORTE] >> 2 & 3)
{
case 0: m_ram_ce = false; break;
diff --git a/src/mame/drivers/ti74.cpp b/src/mame/drivers/ti74.cpp
index 3307a0d3473..7ae4ab0b623 100644
--- a/src/mame/drivers/ti74.cpp
+++ b/src/mame/drivers/ti74.cpp
@@ -97,10 +97,10 @@ public:
required_ioport_array<8> m_key_matrix;
required_ioport m_battery_inp;
- uint8_t m_key_select;
- uint8_t m_power;
+ u8 m_key_select;
+ u8 m_power;
- void update_lcd_indicator(uint8_t y, uint8_t x, int state);
+ void update_lcd_indicator(u8 y, u8 x, int state);
void update_battery_status(int state);
DECLARE_READ8_MEMBER(keyboard_r);
@@ -126,7 +126,7 @@ public:
DEVICE_IMAGE_LOAD_MEMBER(ti74_state, ti74_cartridge)
{
- uint32_t size = m_cart->common_get_size("rom");
+ u32 size = m_cart->common_get_size("rom");
// max size is 32KB
if (size > 0x8000)
@@ -156,7 +156,7 @@ PALETTE_INIT_MEMBER(ti74_state, ti74)
palette.set_pen_color(2, rgb_t(131, 136, 139)); // lcd pixel off
}
-void ti74_state::update_lcd_indicator(uint8_t y, uint8_t x, int state)
+void ti74_state::update_lcd_indicator(u8 y, u8 x, int state)
{
// TI-74 ref._________________...
// output# |10 11 12 13 14 2 3 4
@@ -229,7 +229,7 @@ HD44780_PIXEL_UPDATE(ti74_state::ti95_pixel_update)
READ8_MEMBER(ti74_state::keyboard_r)
{
- uint8_t ret = 0;
+ u8 ret = 0;
// read selected keyboard rows
for (int i = 0; i < 8; i++)
@@ -266,7 +266,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, ti74_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE("hd44780", hd44780_device, read, write)
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("sysram.ic3")
- //AM_RANGE(0x4000, 0xbfff) // mapped by the cartslot
+ //AM_RANGE(0x4000, 0xbfff) // mapped by the cartslot
AM_RANGE(0xc000, 0xdfff) AM_ROMBANK("sysbank")
ADDRESS_MAP_END
diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp
index 5a56e557238..2eec28f1d22 100644
--- a/src/mame/drivers/ticalc1x.cpp
+++ b/src/mame/drivers/ticalc1x.cpp
@@ -76,11 +76,11 @@ void cmulti8_state::prepare_display()
set_display_segmask(0xfffff, 0xff);
// M-digit is on in memory mode, upper row is off in single mode
- uint32_t m = (m_inp_matrix[10]->read() & 0x10) ? 0x100000 : 0;
- uint32_t mask = (m_inp_matrix[10]->read() & 0x20) ? 0xfffff : 0xffc00;
+ u32 m = (m_inp_matrix[10]->read() & 0x10) ? 0x100000 : 0;
+ u32 mask = (m_inp_matrix[10]->read() & 0x20) ? 0xfffff : 0xffc00;
// R10 selects display row
- uint32_t sel = (m_r & 0x400) ? (m_r & 0x3ff) : (m_r << 10 & 0xffc00);
+ u32 sel = (m_r & 0x400) ? (m_r & 0x3ff) : (m_r << 10 & 0xffc00);
display_matrix(8, 21, m_o, (sel & mask) | m);
}
@@ -865,8 +865,8 @@ public:
WRITE16_MEMBER(lilprof78_state::write_r)
{
// update leds state
- uint8_t seg = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f;
- uint16_t r = (data & 7) | (data << 1 & 0x1f0);
+ u8 seg = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f;
+ u16 r = (data & 7) | (data << 1 & 0x1f0);
set_display_segmask(0x1ff, 0x7f);
display_matrix(7, 9, seg, r, false);
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index d51c44dee0e..e5fe4410109 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -452,21 +452,21 @@ public:
DECLARE_WRITE16_MEMBER(snspellc_write_r);
DECLARE_READ8_MEMBER(tntell_read_k);
- void k28_prepare_display(uint8_t old, uint8_t data);
+ void k28_prepare_display(u8 old, u8 data);
DECLARE_READ8_MEMBER(k28_read_k);
DECLARE_WRITE16_MEMBER(k28_write_o);
DECLARE_WRITE16_MEMBER(k28_write_r);
// cartridge
- uint32_t m_cart_max_size;
- uint8_t* m_cart_base;
+ u32 m_cart_max_size;
+ u8* m_cart_base;
void init_cartridge();
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
DECLARE_DRIVER_INIT(snspell);
DECLARE_DRIVER_INIT(tntell);
DECLARE_DRIVER_INIT(lantutor);
- uint8_t m_overlay;
+ u8 m_overlay;
TIMER_DEVICE_CALLBACK_MEMBER(tntell_get_overlay);
protected:
@@ -504,7 +504,7 @@ void tispeak_state::init_cartridge()
DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge)
{
- uint32_t size = m_cart->common_get_size("rom");
+ u32 size = m_cart->common_get_size("rom");
if (size > m_cart_max_size)
{
@@ -549,7 +549,7 @@ DRIVER_INIT_MEMBER(tispeak_state, lantutor)
void tispeak_state::prepare_display()
{
- uint16_t gridmask = vfd_filament_on() ? 0xffff : 0x8000;
+ u16 gridmask = vfd_filament_on() ? 0xffff : 0x8000;
set_display_segmask(0x21ff, 0x3fff);
display_matrix(16+1, 16, m_plate | 1<<16, m_grid & gridmask);
}
@@ -640,7 +640,7 @@ WRITE16_MEMBER(tispeak_state::snspellc_write_o)
READ8_MEMBER(tispeak_state::snspellc_read_k)
{
// K4: TMS5100 CTL1
- uint8_t k4 = m_tms5100->ctl_r(space, 0) << 2 & 4;
+ u8 k4 = m_tms5100->ctl_r(space, 0) << 2 & 4;
// K: multiplexed inputs (note: the Vss row is always on)
return k4 | m_inp_matrix[9]->read() | read_inputs(9);
@@ -652,7 +652,7 @@ READ8_MEMBER(tispeak_state::snspellc_read_k)
READ8_MEMBER(tispeak_state::tntell_read_k)
{
// K8: overlay code from R5,O4-O7
- uint8_t k8 = (((m_r >> 1 & 0x10) | (m_o >> 4 & 0xf)) & m_overlay) ? 8 : 0;
+ u8 k8 = (((m_r >> 1 & 0x10) | (m_o >> 4 & 0xf)) & m_overlay) ? 8 : 0;
// rest is same as snpellc
return k8 | snspellc_read_k(space, offset);
@@ -678,7 +678,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::tntell_get_overlay)
// k28 specific
-void tispeak_state::k28_prepare_display(uint8_t old, uint8_t data)
+void tispeak_state::k28_prepare_display(u8 old, u8 data)
{
// ?
}
diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp
index 40936b78e14..dfe0439207c 100644
--- a/src/mame/drivers/tispellb.cpp
+++ b/src/mame/drivers/tispellb.cpp
@@ -76,9 +76,9 @@ public:
optional_device<cpu_device> m_subcpu;
optional_device<tms6100_device> m_tms6100;
- uint8_t m_rev1_ctl;
- uint16_t m_sub_o;
- uint16_t m_sub_r;
+ u8 m_rev1_ctl;
+ u16 m_sub_o;
+ u16 m_sub_r;
virtual DECLARE_INPUT_CHANGED_MEMBER(power_button) override;
void power_off();
@@ -140,7 +140,7 @@ void tispellb_state::power_off()
void tispellb_state::prepare_display()
{
// almost same as snspell
- uint16_t gridmask = vfd_filament_on() ? 0xffff : 0x8000;
+ u16 gridmask = vfd_filament_on() ? 0xffff : 0x8000;
set_display_segmask(0xff, 0x3fff);
display_matrix(16+1, 16, m_plate | 1<<16, m_grid & gridmask);
}
diff --git a/src/mame/includes/fidelz80.h b/src/mame/includes/fidelz80.h
index c6a7764adad..68ea9b08f00 100644
--- a/src/mame/includes/fidelz80.h
+++ b/src/mame/includes/fidelz80.h
@@ -33,36 +33,36 @@ public:
required_device<cpu_device> m_maincpu;
optional_ioport_array<11> m_inp_matrix; // max 11
optional_device<s14001a_device> m_speech;
- optional_region_ptr<uint8_t> m_speech_rom;
+ optional_region_ptr<u8> m_speech_rom;
optional_device<dac_bit_interface> m_dac;
optional_device<generic_slot_device> m_cart;
// misc common
- uint16_t m_inp_mux; // multiplexed keypad/leds mask
- uint16_t m_led_select;
- uint32_t m_7seg_data; // data for seg leds
- uint16_t m_led_data;
- uint8_t m_speech_data;
- uint8_t m_speech_bank; // speech rom higher address bits
+ u16 m_inp_mux; // multiplexed keypad/leds mask
+ u16 m_led_select;
+ u32 m_7seg_data; // data for seg leds
+ u16 m_led_data;
+ u8 m_speech_data;
+ u8 m_speech_bank; // speech rom higher address bits
- uint16_t read_inputs(int columns);
+ u16 read_inputs(int columns);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(scc_cartridge);
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(uint32_t digits, uint32_t mask);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void set_display_segmask(u32 digits, u32 mask);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/hh_tms1k.h b/src/mame/includes/hh_tms1k.h
index 4dbefa176bd..35b27a579ab 100644
--- a/src/mame/includes/hh_tms1k.h
+++ b/src/mame/includes/hh_tms1k.h
@@ -39,35 +39,35 @@ public:
optional_device<speaker_sound_device> m_speaker;
// misc common
- uint16_t m_r; // MCU R-pins data
- uint16_t m_o; // MCU O-pins data
- uint32_t m_inp_mux; // multiplexed inputs mask
+ u16 m_r; // MCU R-pins data
+ u16 m_o; // MCU O-pins data
+ u32 m_inp_mux; // multiplexed inputs mask
bool m_power_on;
bool m_power_led;
- uint8_t read_inputs(int columns);
- uint8_t read_rotated_inputs(int columns, uint8_t rowmask = 0xf);
+ u8 read_inputs(int columns);
+ u8 read_rotated_inputs(int columns, u8 rowmask = 0xf);
virtual DECLARE_INPUT_CHANGED_MEMBER(power_button);
virtual DECLARE_WRITE_LINE_MEMBER(auto_power_off);
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
- uint32_t m_grid; // VFD/LED current row data
- uint32_t m_plate; // VFD/LED current column data
+ u32 m_grid; // VFD/LED current row data
+ u32 m_plate; // VFD/LED current column data
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void set_display_segmask(uint32_t digits, uint32_t mask);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void set_display_segmask(u32 digits, u32 mask);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/hh_ucom4.h b/src/mame/includes/hh_ucom4.h
index 577a0dfa9da..8328809c09a 100644
--- a/src/mame/includes/hh_ucom4.h
+++ b/src/mame/includes/hh_ucom4.h
@@ -35,32 +35,32 @@ public:
optional_device<speaker_sound_device> m_speaker;
// misc common
- uint8_t m_port[9]; // MCU port A-I write data (optional)
- uint8_t m_int; // MCU INT pin state
- uint16_t m_inp_mux; // multiplexed inputs mask
+ u8 m_port[9]; // MCU port A-I write data (optional)
+ u8 m_int; // MCU INT pin state
+ u16 m_inp_mux; // multiplexed inputs mask
- uint8_t read_inputs(int columns);
+ u8 read_inputs(int columns);
void refresh_interrupts(void);
void set_interrupt(int state);
DECLARE_INPUT_CHANGED_MEMBER(single_interrupt_line);
// display common
- int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
- int m_display_maxy; // display matrix number of rows
- int m_display_maxx; // display matrix number of columns (max 31 for now)
+ int m_display_wait; // led/lamp off-delay in microseconds (default 33ms)
+ int m_display_maxy; // display matrix number of rows
+ int m_display_maxx; // display matrix number of columns (max 31 for now)
- uint32_t m_grid; // VFD current row data
- uint32_t m_plate; // VFD current column data
+ u32 m_grid; // VFD current row data
+ u32 m_plate; // VFD current column data
- uint32_t m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
- uint16_t m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
- uint32_t m_display_cache[0x20]; // (internal use)
- uint8_t m_display_decay[0x20][0x20]; // (internal use)
+ u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
+ u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
+ u32 m_display_cache[0x20]; // (internal use)
+ u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
void set_display_size(int maxx, int maxy);
- void display_matrix(int maxx, int maxy, uint32_t setx, uint32_t sety, bool update = true);
+ void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
diff --git a/src/mame/machine/alpha8201.cpp b/src/mame/machine/alpha8201.cpp
index 852d4eaadd0..1acaf966405 100644
--- a/src/mame/machine/alpha8201.cpp
+++ b/src/mame/machine/alpha8201.cpp
@@ -282,7 +282,7 @@ const device_type ALPHA_8201 = &device_creator<alpha_8201_device>;
// alpha_8201_device - constructor
//-------------------------------------------------
-alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, ALPHA_8201, "ALPHA-8201", tag, owner, clock, "alpha8201", __FILE__),
m_mcu(*this, "mcu")
{
@@ -295,7 +295,7 @@ alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *
void alpha_8201_device::device_start()
{
- m_shared_ram = make_unique_clear<uint8_t[]>(0x400);
+ m_shared_ram = make_unique_clear<u8[]>(0x400);
// zerofill
m_bus = 0;
@@ -364,7 +364,7 @@ void alpha_8201_device::mcu_update_address()
READ8_MEMBER(alpha_8201_device::mcu_data_r)
{
- uint8_t ret = 0;
+ u8 ret = 0;
if (m_bus && ~m_mcu_d & 4)
ret = m_shared_ram[m_mcu_address];
diff --git a/src/mame/machine/alpha8201.h b/src/mame/machine/alpha8201.h
index 241a6d1c3bb..9d13dba6d96 100644
--- a/src/mame/machine/alpha8201.h
+++ b/src/mame/machine/alpha8201.h
@@ -14,7 +14,7 @@
class alpha_8201_device : public device_t
{
public:
- alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
~alpha_8201_device() {}
DECLARE_READ8_MEMBER(mcu_data_r);
@@ -38,11 +38,11 @@ private:
required_device<cpu_device> m_mcu;
// internal state
- int m_bus; // shared RAM bus direction
- uint16_t m_mcu_address; // MCU side RAM address
- uint16_t m_mcu_d; // MCU D output data
- uint8_t m_mcu_r[4]; // MCU R0-R3 output data
- std::unique_ptr<uint8_t[]> m_shared_ram; // 1KB RAM
+ int m_bus; // shared RAM bus direction
+ u16 m_mcu_address; // MCU side RAM address
+ u16 m_mcu_d; // MCU D output data
+ u8 m_mcu_r[4]; // MCU R0-R3 output data
+ std::unique_ptr<u8[]> m_shared_ram; // 1KB RAM
void mcu_update_address();
void mcu_writeram();