Assorted machine().device removals, nw

This commit is contained in:
Ryan Holtz 2018-05-27 10:22:11 +02:00
parent 6ab9e423d5
commit e18205b832
16 changed files with 37 additions and 30 deletions

View File

@ -628,7 +628,7 @@ MACHINE_CONFIG_START(pcjr_state::ibmpcjr)
MCFG_RS232_CTS_HANDLER(WRITELINE("ins8250", ins8250_uart_device, cts_w))
/* video hardware */
MCFG_PCVIDEO_PCJR_ADD("pcvideo_pcjr")
MCFG_DEVICE_ADD("pcvideo_pcjr", PCVIDEO_PCJR, 0)
MCFG_VIDEO_SET_SCREEN("pcvideo_pcjr:screen")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "pcvideo_pcjr:palette", gfx_pcjr)

View File

@ -83,7 +83,6 @@
#include "includes/mz700.h"
#include "cpu/z80/z80.h"
#include "machine/74145.h"
#include "sound/sn76496.h"
#include "sound/wave.h"
@ -99,7 +98,7 @@
TIMER_DEVICE_CALLBACK_MEMBER(mz_state::ne556_cursor_callback)
{
m_cursor_timer ^= 1;
m_cursor_bit ^= 1;
}
TIMER_DEVICE_CALLBACK_MEMBER(mz_state::ne556_other_callback)

View File

@ -651,7 +651,7 @@ MACHINE_CONFIG_START(tandy1000_state::tandy1000_common)
downcast<t1000_mb_device &>(*device).set_cputag("maincpu");
/* video hardware */
MCFG_PCVIDEO_T1000_ADD("pcvideo_t1000")
MCFG_DEVICE_ADD("pcvideo_t1000", PCVIDEO_T1000, 0)
MCFG_VIDEO_SET_SCREEN("pcvideo_t1000:screen")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "pcvideo_t1000:palette", gfx_t1000)

View File

@ -613,7 +613,6 @@ Stephh's and AWJ's notes (based on the games M68000 and Z80 code and some tests)
#include "cpu/z80/z80.h"
#include "cpu/z180/z180.h"
#include "machine/74259.h"
#include "sound/3812intf.h"
#include "speaker.h"

View File

@ -13,6 +13,7 @@
#include "bus/centronics/ctronics.h"
#include "imagedev/cassette.h"
#include "machine/bankdev.h"
#include "machine/74145.h"
#include "machine/i8255.h"
#include "machine/pit8253.h"
#include "machine/ram.h"
@ -37,6 +38,8 @@ public:
, m_screen(*this, "screen")
, m_banke(*this, "banke")
, m_bankf(*this, "bankf")
, m_ls145(*this, "ls145")
, m_cursor_timer(*this, "cursor")
{ }
DECLARE_READ8_MEMBER(mz700_e008_r);
@ -90,10 +93,11 @@ public:
void mz800_bankf(address_map &map);
void mz800_io(address_map &map);
void mz800_mem(address_map &map);
private:
int m_mz700; /* 1 if running on an mz700 */
int m_cursor_timer;
int m_cursor_bit;
int m_other_timer;
int m_intmsk; /* PPI8255 pin PC2 */
@ -134,6 +138,9 @@ private:
required_device<screen_device> m_screen;
optional_device<address_map_bank_device> m_banke;
optional_device<address_map_bank_device> m_bankf;
required_device<ttl74145_device> m_ls145;
required_device<timer_device> m_cursor_timer;
};
#endif // MAME_INCLUDES_MZ700_H

View File

@ -12,6 +12,7 @@
/*----------- driver state -----------*/
class n64_rdp;
class n64_periphs;
class n64_state : public driver_device
{
@ -24,6 +25,7 @@ public:
, m_rdram(*this, "rdram")
, m_rsp_imem(*this, "rsp_imem")
, m_rsp_dmem(*this, "rsp_dmem")
, m_rcp_periphs(*this, "rcp")
{
}
@ -51,6 +53,8 @@ protected:
required_shared_ptr<uint32_t> m_rsp_imem;
required_shared_ptr<uint32_t> m_rsp_dmem;
required_device<n64_periphs> m_rcp_periphs;
/* video-related */
n64_rdp *m_rdp;
};

View File

@ -31,7 +31,9 @@ public:
m_cassette(*this, "cassette"),
m_cart1(*this, "cartslot1"),
m_cart2(*this, "cartslot2"),
m_screen(*this, "screen")
m_screen(*this, "screen"),
m_mem_exp_port(*this, "MEMORY_EXPANSION"),
m_clock_port(*this, "CPU_CLOCK")
{ }
void init_primo48();
@ -80,6 +82,8 @@ private:
required_device<generic_slot_device> m_cart1;
required_device<generic_slot_device> m_cart2;
required_device<screen_device> m_screen;
required_ioport m_mem_exp_port;
required_ioport m_clock_port;
memory_region *m_cart1_rom;
memory_region *m_cart2_rom;

View File

@ -6,6 +6,7 @@
****************************************************************************/
#include "cpu/m68000/m68000.h"
#include "sound/3812intf.h"
#include "video/toaplan_scu.h"
#include "screen.h"
@ -20,6 +21,7 @@ public:
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_ymsnd(*this, "ymsnd"),
m_dsp(*this, "dsp"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
@ -159,6 +161,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(toaplan1_reset_callback);
required_device<m68000_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<ym3812_device> m_ymsnd;
optional_device<cpu_device> m_dsp;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;

View File

@ -471,15 +471,13 @@ WRITE_LINE_MEMBER(mz_state::pit_irq_2)
READ8_MEMBER(mz_state::pio_port_b_r)
{
device_t *device = machine().device("ls145");
int key_line = dynamic_cast<ttl74145_device *>(device)->read();
const int key_line = m_ls145->read();
const char *const keynames[10] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" };
int i;
uint8_t res = 0;
for(i=0;i<10;i++)
for (int i = 0; i < 10; i++)
{
if(key_line & (1 << i))
if (key_line & (1 << i))
res |= ioport(keynames[i])->read();
}
@ -503,7 +501,7 @@ READ8_MEMBER(mz_state::pio_port_c_r)
if ((m_cassette)->input() > 0.0038)
data |= 0x20; /* set the RDATA status */
data |= m_cursor_timer << 6;
data |= m_cursor_bit << 6;
data |= m_screen->vblank() << 7;
LOG(2,"mz700_pio_port_c_r",("%02X\n", data),machine());
@ -514,16 +512,13 @@ READ8_MEMBER(mz_state::pio_port_c_r)
WRITE8_MEMBER(mz_state::pio_port_a_w)
{
device_t *device = machine().device("ls145");
timer_device *timer = machine().device<timer_device>("cursor");
LOG(2,"mz700_pio_port_a_w",("%02X\n", data),machine());
/* the ls145 is connected to PA0-PA3 */
dynamic_cast<ttl74145_device *>(device)->write(data & 0x0f);
m_ls145->write(data & 0x0f);
/* ne556 reset is connected to PA7 */
timer->enable(BIT(data, 7));
m_cursor_timer->enable(BIT(data, 7));
}

View File

@ -327,6 +327,6 @@ SNAPSHOT_LOAD_MEMBER( poly88_state, poly88 )
}
pos+=recordLen;
}
machine().device("uart")->reset();
m_uart->reset();
return image_init_result::PASS;
}

View File

@ -229,12 +229,12 @@ void primo_state::init_primo64()
*******************************************************************************/
void primo_state::primo_common_machine_init ()
void primo_state::primo_common_machine_init()
{
if (ioport("MEMORY_EXPANSION")->read())
if (m_mem_exp_port->read())
m_port_FD = 0x00;
primo_update_memory();
machine().device("maincpu")->set_clock_scale(ioport("CPU_CLOCK")->read() ? 1.5 : 1.0);
m_maincpu->set_clock_scale(m_clock_port->read() ? 1.5 : 1.0);
}
void primo_state::machine_start()

View File

@ -287,7 +287,7 @@ void rm380z_state::machine_reset()
memset(m_vram,0,RM380Z_SCREENSIZE);
config_memory_map();
machine().device("wd1771")->reset();
m_fdc->reset();
init_graphic_chars();
}

View File

@ -895,7 +895,7 @@ static const nimbus_blocks ramblocks[] =
void rmnimbus_state::nimbus_bank_memory()
{
address_space &space = machine().device( MAINCPU_TAG)->memory().space( AS_PROGRAM );
address_space &space = m_maincpu->space(AS_PROGRAM);
int ramsize = m_ram->size();
int ramblock = 0;
int blockno;

View File

@ -172,7 +172,7 @@ void toaplan1_state::toaplan1_reset_sound()
/* Reset the secondary CPU and sound chip */
/* rallybik, truxton, hellfire, demonwld write to a port to cause a reset */
/* zerowing, fireshrk, outzone, vimana use a RESET instruction instead */
machine().device("ymsnd")->reset();
m_ymsnd->reset();
m_audiocpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}

View File

@ -95,7 +95,7 @@ void n64_state::video_start()
m_rdp->set_machine(machine());
m_rdp->init_internal_state();
m_rdp->set_n64_periphs(machine().device<n64_periphs>("rcp"));
m_rdp->set_n64_periphs(m_rcp_periphs);
m_rdp->m_blender.set_machine(machine());
m_rdp->m_blender.set_processor(m_rdp);

View File

@ -147,8 +147,4 @@ private:
DECLARE_DEVICE_TYPE(PCVIDEO_PCJR, pcvideo_pcjr_device)
#define MCFG_PCVIDEO_PCJR_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, PCVIDEO_PCJR, 0)
#endif // MAME_VIDEO_PC_T1T_H