mirror of
https://github.com/holub/mame
synced 2025-06-22 12:28:33 +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_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*/
|
||||
MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4)
|
||||
|
@ -406,6 +406,7 @@ 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)
|
||||
: device_t(mconfig, SEIBU_COP_BOOTLEG, tag, owner, clock),
|
||||
device_memory_interface(mconfig, *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()
|
||||
{
|
||||
m_host_cpu = machine().device<cpu_device>("maincpu");
|
||||
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
|
||||
{
|
||||
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);
|
||||
|
||||
DECLARE_READ16_MEMBER( read );
|
||||
@ -39,8 +46,8 @@ protected:
|
||||
virtual space_config_vector memory_space_config() const override;
|
||||
|
||||
private:
|
||||
cpu_device *m_host_cpu; /**< reference to the host cpu */
|
||||
address_space *m_host_space; /**< reference to the host cpu space */
|
||||
required_device<cpu_device> m_host_cpu;
|
||||
address_space *m_host_space;
|
||||
const address_space_config m_space_config;
|
||||
inline uint16_t read_word(offs_t address);
|
||||
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)
|
||||
|
||||
#define MCFG_DEVICE_SEIBUCOP_BOOTLEG_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, SEIBU_COP_BOOTLEG, 0)
|
||||
|
||||
#endif // MAME_MACHINE_SEICOP_H
|
||||
|
Loading…
Reference in New Issue
Block a user