diff options
Diffstat (limited to 'src/devices/cpu/i86/i86.h')
-rw-r--r-- | src/devices/cpu/i86/i86.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h index 8fba839409a..626246c8dde 100644 --- a/src/devices/cpu/i86/i86.h +++ b/src/devices/cpu/i86/i86.h @@ -1,13 +1,15 @@ // license:BSD-3-Clause // copyright-holders:Carl -#ifndef __I8086_H__ -#define __I8086_H__ +#ifndef MAME_CPU_I86_I86_H +#define MAME_CPU_I86_I86_H + +#pragma once ///////////////////////////////////////////////////////////////// -extern const device_type I8086; -extern const device_type I8088; +DECLARE_DEVICE_TYPE(I8086, i8086_cpu_device) +DECLARE_DEVICE_TYPE(I8088, i8088_cpu_device) #define INPUT_LINE_INT0 INPUT_LINE_IRQ0 #define INPUT_LINE_TEST 20 @@ -29,11 +31,8 @@ enum class i8086_common_cpu_device : public cpu_device { public: - // construction/destruction - i8086_common_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source); - - template<class _Object> static devcb_base &set_lock_handler(device_t &device, _Object object) - { return downcast<i8086_common_cpu_device &>(device).m_lock_handler.set_callback(object); } + template <class Object> static devcb_base &set_lock_handler(device_t &device, Object &&cb) + { return downcast<i8086_common_cpu_device &>(device).m_lock_handler.set_callback(std::forward<Object>(cb)); } protected: enum @@ -111,6 +110,9 @@ protected: enum SREGS { ES=0, CS, SS, DS }; enum WREGS { AX=0, CX, DX, BX, SP, BP, SI, DI }; + // construction/destruction + i8086_common_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + // device-level overrides virtual void device_start() override; virtual void device_reset() override; @@ -246,8 +248,6 @@ protected: inline void ADJ4(int8_t param1, int8_t param2); inline void ADJB(int8_t param1, int8_t param2); -protected: - union { /* eight general registers */ uint16_t w[8]; /* viewed as 16 bits registers */ @@ -342,12 +342,13 @@ class i8086_cpu_device : public i8086_common_cpu_device public: // construction/destruction i8086_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - i8086_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source, int data_bus_size); // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override; protected: + i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size); + virtual void execute_run() override; virtual void device_start() override; virtual uint32_t execute_input_lines() const override { return 1; } @@ -369,4 +370,4 @@ public: }; -#endif /* __I8086_H__ */ +#endif // MAME_CPU_I86_I86_H |