summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/tms9900/tms9995.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/tms9900/tms9995.h')
-rw-r--r--src/devices/cpu/tms9900/tms9995.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/devices/cpu/tms9900/tms9995.h b/src/devices/cpu/tms9900/tms9995.h
index 1231de40196..f1867d5b0b1 100644
--- a/src/devices/cpu/tms9900/tms9995.h
+++ b/src/devices/cpu/tms9900/tms9995.h
@@ -48,8 +48,8 @@ enum
class tms9995_device : public cpu_device
{
public:
- tms9995_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- tms9995_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ tms9995_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms9995_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);
// READY input line. When asserted (high), the memory is ready for data exchange.
// We chose to use a direct method instead of a delegate to keep performance
@@ -73,7 +73,7 @@ public:
template<class _Object> static devcb_base &static_set_dbin_callback(device_t &device, _Object object) { return downcast<tms9995_device &>(device).m_dbin_line.set_callback(object); }
// For debugger access
- UINT8 debug_read_onchip_memory(offs_t addr) { return m_onchip_memory[addr & 0xff]; };
+ uint8_t debug_read_onchip_memory(offs_t addr) { return m_onchip_memory[addr & 0xff]; };
bool is_onchip(offs_t addrb) { return (((addrb & 0xff00)==0xf000 && (addrb < 0xf0fc)) || ((addrb & 0xfffc)==0xfffc)) && !m_mp9537; }
void set_overflow_interrupt( int enable ) { m_check_overflow = (enable!=0); }
@@ -85,46 +85,46 @@ protected:
virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT32 execute_min_cycles() const override;
- virtual UINT32 execute_max_cycles() const override;
- virtual UINT32 execute_input_lines() const override;
+ virtual uint32_t execute_min_cycles() const override;
+ virtual uint32_t execute_max_cycles() const override;
+ virtual uint32_t execute_input_lines() const override;
virtual void execute_set_input(int irqline, int state) override;
virtual void execute_run() override;
// device_disasm_interface overrides
- virtual UINT32 disasm_min_opcode_bytes() const override;
- virtual UINT32 disasm_max_opcode_bytes() const override;
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
+ virtual uint32_t disasm_min_opcode_bytes() const override;
+ virtual uint32_t disasm_max_opcode_bytes() const override;
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
const address_space_config* memory_space_config(address_spacenum spacenum) const override;
- UINT64 execute_clocks_to_cycles(UINT64 clocks) const override { return clocks / 4.0; }
- UINT64 execute_cycles_to_clocks(UINT64 cycles) const override { return cycles * 4.0; }
+ uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return clocks / 4.0; }
+ uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return cycles * 4.0; }
// Variant of the TMS9995 without internal RAM and decrementer
bool m_mp9537;
private:
// State / debug management
- UINT16 m_state_any;
+ uint16_t m_state_any;
static const char* s_statename[];
void state_import(const device_state_entry &entry) override;
void state_export(const device_state_entry &entry) override;
void state_string_export(const device_state_entry &entry, std::string &str) const override;
- UINT16 read_workspace_register_debug(int reg);
- void write_workspace_register_debug(int reg, UINT16 data);
+ uint16_t read_workspace_register_debug(int reg);
+ void write_workspace_register_debug(int reg, uint16_t data);
// TMS9995 hardware registers
- UINT16 WP; // Workspace pointer
- UINT16 PC; // Program counter
- UINT16 ST; // Status register
+ uint16_t WP; // Workspace pointer
+ uint16_t PC; // Program counter
+ uint16_t ST; // Status register
// The TMS9995 has a prefetch feature which causes a wrong display of the PC.
// We use this additional member for the debugger only.
- UINT16 PC_debug;
+ uint16_t PC_debug;
// 256 bytes of onchip memory
- UINT8 m_onchip_memory[256];
+ uint8_t m_onchip_memory[256];
const address_space_config m_program_config;
const address_space_config m_io_config;
@@ -213,7 +213,7 @@ private:
// Decode the given 16-bit value which has been retrieved by a prefetch or
// during an X operation.
- void decode(UINT16 inst);
+ void decode(uint16_t inst);
// Store the interrupt mask part of the ST. This is used when processing
// an interrupt, passing the new mask from the service_interrupt part to
@@ -221,26 +221,26 @@ private:
int m_intmask;
// Stored address
- UINT16 m_address;
+ uint16_t m_address;
// Stores the recently read word or the word to be written
- UINT16 m_current_value;
+ uint16_t m_current_value;
// Stores the value of the source operand in multi-operand instructions
- UINT16 m_source_value;
+ uint16_t m_source_value;
// During indexed addressing, this value is added to get the final address value.
- UINT16 m_address_add;
+ uint16_t m_address_add;
// During indirect/auto-increment addressing, this copy of the address must
// be preserved while writing the new value to the register.
- UINT16 m_address_saved;
+ uint16_t m_address_saved;
// Another copy of the address
- UINT16 m_address_copy;
+ uint16_t m_address_copy;
// Copy of the value
- UINT16 m_value_copy;
+ uint16_t m_value_copy;
// Stores the recent register number. Only used to pass the register
// number during the operand address derivation.
@@ -253,18 +253,18 @@ private:
void trigger_decrementer();
// Start value
- UINT16 m_starting_count_storage_register;
+ uint16_t m_starting_count_storage_register;
// Current decrementer value.
- UINT16 m_decrementer_value;
+ uint16_t m_decrementer_value;
// ============== CRU support ======================
- UINT16 m_cru_address;
- UINT16 m_cru_value;
+ uint16_t m_cru_address;
+ uint16_t m_cru_value;
bool m_cru_first_read;
int m_cru_bits_left;
- UINT32 m_cru_read;
+ uint32_t m_cru_read;
// CPU-internal CRU flags
bool m_flag[16];
@@ -275,13 +275,13 @@ private:
// the decoded commands. When the next instruction shall be started,
// the contents from the pre* members are copied to the main members.
- UINT16 IR;
- UINT16 m_command;
+ uint16_t IR;
+ uint16_t m_command;
int m_index;
bool m_byteop;
- UINT16 m_pre_IR;
- UINT16 m_pre_command;
+ uint16_t m_pre_IR;
+ uint16_t m_pre_command;
int m_pre_index;
bool m_pre_byteop;
@@ -294,7 +294,7 @@ private:
void build_command_lookup_table();
// Sequence of micro-operations
- typedef const UINT8* microprogram;
+ typedef const uint8_t* microprogram;
// Method pointer
typedef void (tms9995_device::*ophandler)(void);
@@ -302,7 +302,7 @@ private:
// Opcode list entry
struct tms_instruction
{
- UINT16 opcode;
+ uint16_t opcode;
int id;
int format;
microprogram prog; // Microprogram
@@ -344,8 +344,8 @@ private:
// Status register update
inline void set_status_bit(int bit, bool state);
- inline void compare_and_set_lae(UINT16 value1, UINT16 value2);
- void set_status_parity(UINT8 value);
+ inline void compare_and_set_lae(uint16_t value1, uint16_t value2);
+ void set_status_parity(uint8_t value);
// Micro-operation declarations
void int_prefetch_and_decode();
@@ -438,7 +438,7 @@ private:
class tms9995_mp9537_device : public tms9995_device
{
public:
- tms9995_mp9537_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ tms9995_mp9537_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: tms9995_device(mconfig, TMS9995_MP9537, "TMS9995-MP9537", tag, owner, clock, "tms9995_mp9537", __FILE__)
{
m_mp9537 = true;