mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
tsispch.cpp, tvc.cpp: Replace machine().device with device finders (nw)
This commit is contained in:
parent
8863aef519
commit
3f5b0d66ae
@ -114,7 +114,6 @@
|
|||||||
#include "includes/tsispch.h"
|
#include "includes/tsispch.h"
|
||||||
|
|
||||||
#include "cpu/i86/i86.h"
|
#include "cpu/i86/i86.h"
|
||||||
#include "cpu/upd7725/upd7725.h"
|
|
||||||
#include "machine/i8251.h"
|
#include "machine/i8251.h"
|
||||||
#include "sound/dac.h"
|
#include "sound/dac.h"
|
||||||
#include "sound/volt_reg.h"
|
#include "sound/volt_reg.h"
|
||||||
@ -184,44 +183,38 @@ WRITE8_MEMBER( tsispch_state::peripheral_w )
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
READ16_MEMBER( tsispch_state::dsp_data_r )
|
READ16_MEMBER( tsispch_state::dsp_data_r )
|
||||||
{
|
{
|
||||||
upd7725_device *upd7725 = machine().device<upd7725_device>("dsp");
|
|
||||||
#ifdef DEBUG_DSP
|
#ifdef DEBUG_DSP
|
||||||
uint8_t temp;
|
uint8_t temp = m_dsp->snesdsp_read(true);
|
||||||
temp = upd7725->snesdsp_read(true);
|
|
||||||
fprintf(stderr, "dsp data read: %02x\n", temp);
|
fprintf(stderr, "dsp data read: %02x\n", temp);
|
||||||
return temp;
|
return temp;
|
||||||
#else
|
#else
|
||||||
return upd7725->snesdsp_read(true);
|
return m_dsp->snesdsp_read(true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER( tsispch_state::dsp_data_w )
|
WRITE16_MEMBER( tsispch_state::dsp_data_w )
|
||||||
{
|
{
|
||||||
upd7725_device *upd7725 = machine().device<upd7725_device>("dsp");
|
|
||||||
#ifdef DEBUG_DSP_W
|
#ifdef DEBUG_DSP_W
|
||||||
fprintf(stderr, "dsp data write: %02x\n", data);
|
fprintf(stderr, "dsp data write: %02x\n", data);
|
||||||
#endif
|
#endif
|
||||||
upd7725->snesdsp_write(true, data);
|
m_dsp->snesdsp_write(true, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
READ16_MEMBER( tsispch_state::dsp_status_r )
|
READ16_MEMBER( tsispch_state::dsp_status_r )
|
||||||
{
|
{
|
||||||
upd7725_device *upd7725 = machine().device<upd7725_device>("dsp");
|
|
||||||
#ifdef DEBUG_DSP
|
#ifdef DEBUG_DSP
|
||||||
uint8_t temp;
|
uint8_t temp = m_dsp->snesdsp_read(false);
|
||||||
temp = upd7725->snesdsp_read(false);
|
|
||||||
fprintf(stderr, "dsp status read: %02x\n", temp);
|
fprintf(stderr, "dsp status read: %02x\n", temp);
|
||||||
return temp;
|
return temp;
|
||||||
#else
|
#else
|
||||||
return upd7725->snesdsp_read(false);
|
return m_dsp->snesdsp_read(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER( tsispch_state::dsp_status_w )
|
WRITE16_MEMBER( tsispch_state::dsp_status_w )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "warning: upd772x status register should never be written to!\n");
|
fprintf(stderr, "warning: upd772x status register should never be written to!\n");
|
||||||
upd7725_device *upd7725 = machine().device<upd7725_device>("dsp");
|
m_dsp->snesdsp_write(false, data);
|
||||||
upd7725->snesdsp_write(false, data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER( tsispch_state::dsp_to_8086_p0_w )
|
WRITE_LINE_MEMBER( tsispch_state::dsp_to_8086_p0_w )
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
, m_cassette(*this, "cassette")
|
, m_cassette(*this, "cassette")
|
||||||
, m_cart(*this, "cartslot")
|
, m_cart(*this, "cartslot")
|
||||||
, m_centronics(*this, CENTRONICS_TAG)
|
, m_centronics(*this, CENTRONICS_TAG)
|
||||||
|
, m_expansions(*this, "exp%u", 1)
|
||||||
, m_palette(*this, "palette")
|
, m_palette(*this, "palette")
|
||||||
, m_keyboard(*this, "LINE.%u", 0)
|
, m_keyboard(*this, "LINE.%u", 0)
|
||||||
{ }
|
{ }
|
||||||
@ -60,10 +61,10 @@ public:
|
|||||||
required_device<cassette_image_device> m_cassette;
|
required_device<cassette_image_device> m_cassette;
|
||||||
required_device<generic_slot_device> m_cart;
|
required_device<generic_slot_device> m_cart;
|
||||||
required_device<centronics_device> m_centronics;
|
required_device<centronics_device> m_centronics;
|
||||||
|
required_device_array<tvcexp_slot_device, 4> m_expansions;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
required_ioport_array<16> m_keyboard;
|
required_ioport_array<16> m_keyboard;
|
||||||
|
|
||||||
tvcexp_slot_device *m_expansions[4];
|
|
||||||
memory_region *m_bios_rom;
|
memory_region *m_bios_rom;
|
||||||
memory_region *m_cart_rom;
|
memory_region *m_cart_rom;
|
||||||
memory_region *m_ext;
|
memory_region *m_ext;
|
||||||
@ -609,11 +610,6 @@ void tvc_state::machine_start()
|
|||||||
|
|
||||||
m_int_flipflop = 0;
|
m_int_flipflop = 0;
|
||||||
|
|
||||||
m_expansions[0] = machine().device<tvcexp_slot_device>("exp1");
|
|
||||||
m_expansions[1] = machine().device<tvcexp_slot_device>("exp2");
|
|
||||||
m_expansions[2] = machine().device<tvcexp_slot_device>("exp3");
|
|
||||||
m_expansions[3] = machine().device<tvcexp_slot_device>("exp4");
|
|
||||||
|
|
||||||
m_bios_rom = memregion("sys");
|
m_bios_rom = memregion("sys");
|
||||||
m_ext = memregion("ext");
|
m_ext = memregion("ext");
|
||||||
m_vram = memregion("vram");
|
m_vram = memregion("vram");
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "cpu/upd7725/upd7725.h"
|
||||||
#include "machine/pic8259.h"
|
#include "machine/pic8259.h"
|
||||||
#include "machine/terminal.h"
|
#include "machine/terminal.h"
|
||||||
|
|
||||||
@ -50,7 +51,7 @@ protected:
|
|||||||
virtual void machine_reset() override;
|
virtual void machine_reset() override;
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_dsp;
|
required_device<upd7725_device> m_dsp;
|
||||||
required_device<generic_terminal_device> m_terminal;
|
required_device<generic_terminal_device> m_terminal;
|
||||||
required_device<pic8259_device> m_pic;
|
required_device<pic8259_device> m_pic;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user