mirror of
https://github.com/holub/mame
synced 2025-06-22 20:38:50 +03:00
seicopbl: Removed machine().device, nw
This commit is contained in:
parent
22ba8d40dd
commit
c88b846931
@ -563,7 +563,7 @@ MACHINE_CONFIG_START(seicupbl_state::cupsocbl)
|
|||||||
MCFG_DEVICE_PROGRAM_MAP(cupsocbl_mem)
|
MCFG_DEVICE_PROGRAM_MAP(cupsocbl_mem)
|
||||||
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seicupbl_state, irq4_line_hold) /* VBL */
|
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seicupbl_state, irq4_line_hold) /* VBL */
|
||||||
|
|
||||||
MCFG_DEVICE_SEIBUCOP_BOOTLEG_ADD("seibucop_boot")
|
MCFG_DEVICE_ADD("seibucop_boot", SEIBU_COP_BOOTLEG, "maincpu")
|
||||||
|
|
||||||
/*Different Sound hardware*/
|
/*Different Sound hardware*/
|
||||||
MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4)
|
MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4)
|
||||||
|
@ -405,8 +405,9 @@ void seibu_cop_bootleg_device::seibucopbl_map(address_map &map)
|
|||||||
|
|
||||||
seibu_cop_bootleg_device::seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
seibu_cop_bootleg_device::seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: device_t(mconfig, SEIBU_COP_BOOTLEG, tag, owner, clock),
|
: device_t(mconfig, SEIBU_COP_BOOTLEG, tag, owner, clock),
|
||||||
device_memory_interface(mconfig, *this),
|
device_memory_interface(mconfig, *this),
|
||||||
m_space_config("regs", ENDIANNESS_BIG, 16, 9, 0, address_map_constructor(), address_map_constructor(FUNC(seibu_cop_bootleg_device::seibucopbl_map), this))
|
m_host_cpu(*this, finder_base::DUMMY_TAG),
|
||||||
|
m_space_config("regs", ENDIANNESS_BIG, 16, 9, 0, address_map_constructor(), address_map_constructor(FUNC(seibu_cop_bootleg_device::seibucopbl_map), this))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +436,6 @@ void seibu_cop_bootleg_device::device_start()
|
|||||||
|
|
||||||
void seibu_cop_bootleg_device::device_reset()
|
void seibu_cop_bootleg_device::device_reset()
|
||||||
{
|
{
|
||||||
m_host_cpu = machine().device<cpu_device>("maincpu");
|
|
||||||
m_host_space = &m_host_cpu->space(AS_PROGRAM);
|
m_host_space = &m_host_cpu->space(AS_PROGRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,13 @@
|
|||||||
class seibu_cop_bootleg_device : public device_t, public device_memory_interface
|
class seibu_cop_bootleg_device : public device_t, public device_memory_interface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
template <typename T>
|
||||||
|
seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag)
|
||||||
|
: seibu_cop_bootleg_device(mconfig, tag, owner, (uint32_t)0)
|
||||||
|
{
|
||||||
|
m_host_cpu.set_tag(std::forward<T>(cpu_tag));
|
||||||
|
}
|
||||||
|
|
||||||
seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
DECLARE_READ16_MEMBER( read );
|
DECLARE_READ16_MEMBER( read );
|
||||||
@ -39,8 +46,8 @@ protected:
|
|||||||
virtual space_config_vector memory_space_config() const override;
|
virtual space_config_vector memory_space_config() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cpu_device *m_host_cpu; /**< reference to the host cpu */
|
required_device<cpu_device> m_host_cpu;
|
||||||
address_space *m_host_space; /**< reference to the host cpu space */
|
address_space *m_host_space;
|
||||||
const address_space_config m_space_config;
|
const address_space_config m_space_config;
|
||||||
inline uint16_t read_word(offs_t address);
|
inline uint16_t read_word(offs_t address);
|
||||||
inline void write_word(offs_t address, uint16_t data);
|
inline void write_word(offs_t address, uint16_t data);
|
||||||
@ -56,7 +63,4 @@ private:
|
|||||||
|
|
||||||
DECLARE_DEVICE_TYPE(SEIBU_COP_BOOTLEG, seibu_cop_bootleg_device)
|
DECLARE_DEVICE_TYPE(SEIBU_COP_BOOTLEG, seibu_cop_bootleg_device)
|
||||||
|
|
||||||
#define MCFG_DEVICE_SEIBUCOP_BOOTLEG_ADD(_tag) \
|
|
||||||
MCFG_DEVICE_ADD(_tag, SEIBU_COP_BOOTLEG, 0)
|
|
||||||
|
|
||||||
#endif // MAME_MACHINE_SEICOP_H
|
#endif // MAME_MACHINE_SEICOP_H
|
||||||
|
Loading…
Reference in New Issue
Block a user