From fe9fb6ff9f2c6bddb8ffc358b278a14826b5db8d Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Mon, 16 Apr 2012 08:28:56 +0000 Subject: [PATCH] Fix most reported errors. --- src/emu/device.c | 2 +- src/emu/device.h | 14 +++++++------- src/mame/drivers/blitz68k.c | 16 ++++++++-------- src/mame/drivers/bmcbowl.c | 2 +- src/mame/drivers/gstriker.c | 6 +++--- src/mame/drivers/hornet.c | 4 ++-- src/mame/drivers/igs011.c | 2 +- src/mame/drivers/igs017.c | 6 +++--- src/mame/drivers/igspoker.c | 2 +- src/mame/drivers/itech8.c | 16 +++++++++++----- src/mame/drivers/jalmah.c | 4 ++-- src/mame/drivers/jollyjgr.c | 2 +- src/mame/drivers/mpu4vid.c | 8 ++++---- src/mame/drivers/photon2.c | 2 +- src/mame/drivers/rungun.c | 1 - src/mame/drivers/scobra.c | 2 +- src/mame/drivers/splus.c | 2 +- src/mame/drivers/srmp6.c | 2 +- src/mame/drivers/subsino.c | 12 ++++++------ src/mame/drivers/subsino2.c | 4 ++-- src/mame/drivers/tmaster.c | 2 +- src/mame/drivers/vamphalf.c | 8 ++++---- src/mame/drivers/zr107.c | 2 +- src/mame/includes/argus.h | 6 +++--- src/mame/includes/asteroid.h | 4 ++-- src/mame/includes/astrocde.h | 2 +- src/mame/includes/atarig1.h | 5 +++-- src/mame/includes/atarig42.h | 5 +++-- src/mame/includes/atarigx2.h | 8 +++++--- src/mame/includes/atarisy1.h | 3 ++- src/mame/includes/balsente.h | 4 ++-- src/mame/includes/beathead.h | 20 +++++++++++++------- src/mame/includes/blstroid.h | 5 +++-- src/mame/includes/btime.h | 4 ++-- src/mame/includes/bublbobl.h | 2 +- src/mame/includes/cave.h | 4 ++-- src/mame/includes/cclimber.h | 10 +++++----- src/mame/includes/centiped.h | 2 +- src/mame/includes/cinemat.h | 2 +- src/mame/includes/cischeat.h | 2 +- src/mame/includes/cvs.h | 6 +++--- src/mame/includes/cyberbal.h | 8 +++++--- src/mame/includes/ddragon.h | 4 ++-- src/mame/includes/dec0.h | 2 +- src/mame/includes/dec8.h | 2 +- src/mame/includes/deco32.h | 2 +- src/mame/includes/dooyong.h | 2 +- src/mame/includes/equites.h | 4 ++-- src/mame/includes/f1gp.h | 18 +++++++++--------- src/mame/includes/fantland.h | 4 ++-- src/mame/includes/firetrk.h | 8 ++++---- src/mame/includes/foodf.h | 5 +++-- src/mame/includes/gaelco.h | 2 +- src/mame/includes/gaelco3d.h | 4 ++-- src/mame/includes/galaga.h | 10 +++++----- src/mame/includes/galaxold.h | 2 +- src/mame/includes/goldstar.h | 6 +++--- src/mame/includes/harddriv.h | 28 ++++++++++++++++++---------- src/mame/includes/homedata.h | 2 +- src/mame/includes/itech32.h | 14 +++++++------- src/mame/includes/itech8.h | 6 +++--- src/mame/includes/jpmimpct.h | 2 +- src/mame/includes/kaneko16.h | 10 +++++----- src/mame/includes/ladybug.h | 4 ++-- src/mame/includes/lasso.h | 8 ++++---- src/mame/includes/liberate.h | 4 ++-- src/mame/includes/m62.h | 4 ++-- src/mame/includes/mcr3.h | 8 +++----- src/mame/includes/megadriv.h | 5 +++-- src/mame/includes/metro.h | 14 +++++++------- src/mame/includes/midvunit.h | 12 ++++++------ src/mame/includes/midxunit.h | 5 +++-- src/mame/includes/midyunit.h | 4 ++-- src/mame/includes/model2.h | 2 +- src/mame/includes/mpu4.h | 4 ++-- src/mame/includes/mystwarr.h | 6 ++++-- src/mame/includes/namconb1.h | 2 +- src/mame/includes/namcos21.h | 4 ++-- src/mame/includes/namcos22.h | 8 ++++---- src/mame/includes/nemesis.h | 2 +- src/mame/includes/ojankohs.h | 2 +- src/mame/includes/opwolf.h | 2 +- src/mame/includes/pacman.h | 2 +- src/mame/includes/pgm.h | 5 +++-- src/mame/includes/pktgaldx.h | 4 ++-- src/mame/includes/playmark.h | 8 ++++---- src/mame/includes/psikyo.h | 2 +- src/mame/includes/punchout.h | 2 +- src/mame/includes/realbrk.h | 6 +++--- src/mame/includes/rohga.h | 4 ++-- src/mame/includes/sauro.h | 4 ++-- src/mame/includes/seibuspi.h | 2 +- src/mame/includes/seicross.h | 2 +- src/mame/includes/seta.h | 12 ++++++------ src/mame/includes/seta2.h | 4 ++-- src/mame/includes/shangkid.h | 4 ++-- src/mame/includes/slapfght.h | 10 +++++----- src/mame/includes/snowbros.h | 2 +- src/mame/includes/splash.h | 4 ++-- src/mame/includes/sshangha.h | 2 +- src/mame/includes/sslam.h | 4 ++-- src/mame/includes/ssv.h | 10 +++++----- src/mame/includes/suna16.h | 2 +- src/mame/includes/superqix.h | 4 ++-- src/mame/includes/system16.h | 8 ++++---- src/mame/includes/taito_b.h | 2 +- src/mame/includes/taito_f2.h | 4 ++-- src/mame/includes/taitojc.h | 2 +- src/mame/includes/tatsumi.h | 20 ++++++++++---------- src/mame/includes/tmnt.h | 6 +++--- src/mame/includes/toaplan2.h | 14 +++++++------- src/mame/includes/toobin.h | 5 +++-- src/mame/includes/tsamurai.h | 4 ++-- src/mame/includes/tubep.h | 2 +- src/mame/includes/tumbleb.h | 4 ++-- src/mame/includes/twin16.h | 4 ++-- src/mame/includes/twincobr.h | 2 +- src/mame/includes/undrfire.h | 4 ++-- src/mame/includes/unico.h | 4 ++-- src/mame/includes/vsnes.h | 2 +- src/mame/includes/warpwarp.h | 4 ++-- src/mame/includes/wecleman.h | 2 +- src/mame/includes/xmen.h | 8 ++++---- src/mame/includes/zaxxon.h | 2 +- src/mame/machine/atarigen.c | 2 +- src/mame/machine/atarigen.h | 6 ++++-- src/mame/machine/harddriv.c | 2 +- src/mame/machine/pgmprot1.c | 6 +++--- src/mame/video/beathead.c | 2 +- src/mame/video/harddriv.c | 2 +- src/mame/video/itech8.c | 6 +++--- src/mame/video/mcr3.c | 2 +- 132 files changed, 362 insertions(+), 328 deletions(-) diff --git a/src/emu/device.c b/src/emu/device.c index 8d23edc0aa1..bcb336e1564 100644 --- a/src/emu/device.c +++ b/src/emu/device.c @@ -877,7 +877,7 @@ void *device_t::finder_base::find_memory(UINT8 width, size_t &bytes, bool requir mame_printf_error("Shared ptr '%s' not found\n", m_tag); return NULL; } - if (share->width() != width) + if (width != 0 && share->width() != width) { if (required) mame_printf_warning("Shared ptr '%s' found but is width %d, not %d as requested\n", m_tag, share->width(), width); diff --git a/src/emu/device.h b/src/emu/device.h index b75ae3d5298..605c1e66195 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -411,12 +411,12 @@ class device_t::shared_ptr_finder : public device_t::finder_base { public: // construction/destruction - shared_ptr_finder(device_t &base, const char *tag, UINT8 width = 0) + shared_ptr_finder(device_t &base, const char *tag, UINT8 width = sizeof(_PointerType) * 8) : finder_base(base, tag), m_target(0), m_bytes(0), m_allocated(false), - m_width((width != 0) ? width : sizeof(_PointerType) * 8) { } + m_width(width) { } virtual ~shared_ptr_finder() { if (m_allocated) global_free(m_target); } @@ -459,7 +459,7 @@ template class device_t::optional_shared_ptr : public device_t::shared_ptr_finder<_PointerType, false> { public: - optional_shared_ptr(device_t &base, const char *tag, UINT8 width = 0) : shared_ptr_finder<_PointerType, false>(base, tag, width) { } + optional_shared_ptr(device_t &base, const char *tag, UINT8 width = sizeof(_PointerType) * 8) : shared_ptr_finder<_PointerType, false>(base, tag, width) { } }; // required shared pointer finder @@ -467,7 +467,7 @@ template class device_t::required_shared_ptr : public device_t::shared_ptr_finder<_PointerType, true> { public: - required_shared_ptr(device_t &base, const char *tag, UINT8 width = 0) : shared_ptr_finder<_PointerType, true>(base, tag, width) { } + required_shared_ptr(device_t &base, const char *tag, UINT8 width = sizeof(_PointerType) * 8) : shared_ptr_finder<_PointerType, true>(base, tag, width) { } }; @@ -481,7 +481,7 @@ class device_t::shared_ptr_array_finder public: // construction/destruction - shared_ptr_array_finder(device_t &base, const char *basetag, UINT8 width = 0) + shared_ptr_array_finder(device_t &base, const char *basetag, UINT8 width = sizeof(_PointerType) * 8) { for (int index = 0; index < _Count; index++) m_array[index] = global_alloc(shared_ptr_type(base, m_tag[index].format("%s.%d", basetag, index), width)); @@ -508,7 +508,7 @@ template class device_t::optional_shared_ptr_array : public device_t::shared_ptr_array_finder<_PointerType, _Count, false> { public: - optional_shared_ptr_array(device_t &base, const char *tag, UINT8 width = 0) : shared_ptr_array_finder<_PointerType, _Count, false>(base, tag, width) { } + optional_shared_ptr_array(device_t &base, const char *tag, UINT8 width = sizeof(_PointerType) * 8) : shared_ptr_array_finder<_PointerType, _Count, false>(base, tag, width) { } }; // required shared pointer array finder @@ -516,7 +516,7 @@ template class device_t::required_shared_ptr_array : public device_t::shared_ptr_array_finder<_PointerType, _Count, true> { public: - required_shared_ptr_array(device_t &base, const char *tag, UINT8 width = 0) : shared_ptr_array_finder<_PointerType, _Count, true>(base, tag, width) { } + required_shared_ptr_array(device_t &base, const char *tag, UINT8 width = sizeof(_PointerType) * 8) : shared_ptr_array_finder<_PointerType, _Count, true>(base, tag, width) { } }; diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c index a3679a3a73e..ccf97d85aa1 100644 --- a/src/mame/drivers/blitz68k.c +++ b/src/mame/drivers/blitz68k.c @@ -58,14 +58,14 @@ public: optional_shared_ptr m_nvram; UINT8 *m_blit_buffer; - required_shared_ptr m_frame_buffer; - required_shared_ptr m_blit_romaddr; - required_shared_ptr m_blit_attr1_ram; - required_shared_ptr m_blit_dst_ram_loword; - required_shared_ptr m_blit_attr2_ram; - required_shared_ptr m_blit_dst_ram_hiword; - required_shared_ptr m_blit_vregs; - required_shared_ptr m_blit_transpen; + optional_shared_ptr m_frame_buffer; + optional_shared_ptr m_blit_romaddr; + optional_shared_ptr m_blit_attr1_ram; + optional_shared_ptr m_blit_dst_ram_loword; + optional_shared_ptr m_blit_attr2_ram; + optional_shared_ptr m_blit_dst_ram_hiword; + optional_shared_ptr m_blit_vregs; + optional_shared_ptr m_blit_transpen; optional_shared_ptr m_leds0; optional_shared_ptr m_leds1; optional_shared_ptr m_leds2; diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c index e72541e84c6..993ef40a55e 100644 --- a/src/mame/drivers/bmcbowl.c +++ b/src/mame/drivers/bmcbowl.c @@ -116,7 +116,7 @@ public: m_vid1(*this, "vid1"), m_vid2(*this, "vid2"){ } - required_shared_ptr m_stats_ram; + optional_shared_ptr m_stats_ram; required_shared_ptr m_vid1; required_shared_ptr m_vid2; UINT8 *m_bmc_colorram; diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c index c2e3aac8775..522f24e6022 100644 --- a/src/mame/drivers/gstriker.c +++ b/src/mame/drivers/gstriker.c @@ -315,9 +315,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( vgoal_map, AS_PROGRAM, 16, gstriker_state ) AM_RANGE(0x000000, 0x0fffff) AM_ROM - AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(MB60553_0_vram_w) AM_SHARE("mb60553.vram") - AM_RANGE(0x140000, 0x141fff) AM_RAM AM_SHARE("cg10103.vram") - AM_RANGE(0x180000, 0x180fff) AM_RAM_WRITE(VS920A_0_vram_w) AM_SHARE("vs920a.vram") + AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(MB60553_0_vram_w) AM_SHARE("mb60553_vram") + AM_RANGE(0x140000, 0x141fff) AM_RAM AM_SHARE("cg10103_vram") + AM_RANGE(0x180000, 0x180fff) AM_RAM_WRITE(VS920A_0_vram_w) AM_SHARE("vs920a_vram") AM_RANGE(0x181000, 0x181fff) AM_RAM AM_SHARE("lineram") AM_RANGE(0x1c0000, 0x1c4fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") AM_RANGE(0x200000, 0x20000f) AM_RAM_WRITE(MB60553_0_regs_w) diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index c6c4dc209eb..023f0e22008 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -329,8 +329,8 @@ public: hornet_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_workram(*this, "workram"), - m_sharc_dataram0(*this, "share_dataram0"), - m_sharc_dataram1(*this, "share_dataram1") { } + m_sharc_dataram0(*this, "sharc_dataram0"), + m_sharc_dataram1(*this, "sharc_dataram1") { } UINT8 m_led_reg0; UINT8 m_led_reg1; diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c index 0e2e9f1802d..d18249fe0d6 100644 --- a/src/mame/drivers/igs011.c +++ b/src/mame/drivers/igs011.c @@ -91,7 +91,7 @@ public: required_device m_maincpu; required_shared_ptr m_priority_ram; - required_shared_ptr m_vbowl_trackball; + optional_shared_ptr m_vbowl_trackball; UINT8 *m_layer[8]; UINT16 m_priority; UINT8 m_lhb2_pen_hi; diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c index 3efe4bb1767..1742949242a 100644 --- a/src/mame/drivers/igs017.c +++ b/src/mame/drivers/igs017.c @@ -62,9 +62,9 @@ public: int m_input_addr; required_device m_maincpu; - required_shared_ptr m_spriteram; - required_shared_ptr m_fg_videoram; - required_shared_ptr m_bg_videoram; + optional_shared_ptr m_spriteram; + optional_shared_ptr m_fg_videoram; + optional_shared_ptr m_bg_videoram; int m_toggle; int m_debug_addr; diff --git a/src/mame/drivers/igspoker.c b/src/mame/drivers/igspoker.c index 291d1d36033..a8854f64223 100644 --- a/src/mame/drivers/igspoker.c +++ b/src/mame/drivers/igspoker.c @@ -82,7 +82,7 @@ public: m_fg_color_ram(*this, "fg_color_ram"){ } required_device m_maincpu; - required_shared_ptr m_bg_tile_ram; + optional_shared_ptr m_bg_tile_ram; required_shared_ptr m_fg_tile_ram; required_shared_ptr m_fg_color_ram; int m_nmi_enable; diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c index a6baf41a26f..f843d9ab13c 100644 --- a/src/mame/drivers/itech8.c +++ b/src/mame/drivers/itech8.c @@ -814,6 +814,12 @@ READ8_MEMBER(itech8_state::sound_data_r) } +WRITE8_MEMBER(itech8_state::grom_bank_w) +{ + m_grom_bank = data; +} + + /************************************* * @@ -824,7 +830,7 @@ READ8_MEMBER(itech8_state::sound_data_r) WRITE16_MEMBER(itech8_state::grom_bank16_w) { if (ACCESSING_BITS_8_15) - *m_grom_bank = data >> 8; + m_grom_bank = data >> 8; } @@ -854,7 +860,7 @@ static ADDRESS_MAP_START( tmslo_map, AS_PROGRAM, 8, itech8_state ) AM_RANGE(0x0000, 0x0fff) AM_READWRITE(itech8_tms34061_r, itech8_tms34061_w) AM_RANGE(0x1100, 0x1100) AM_WRITENOP AM_RANGE(0x1120, 0x1120) AM_WRITE(sound_data_w) - AM_RANGE(0x1140, 0x1140) AM_READ_PORT("40") AM_WRITEONLY AM_SHARE("grom_bank") + AM_RANGE(0x1140, 0x1140) AM_READ_PORT("40") AM_WRITE(grom_bank_w) AM_RANGE(0x1160, 0x1160) AM_READ_PORT("60") AM_WRITE(itech8_page_w) AM_RANGE(0x1180, 0x1180) AM_READ_PORT("80") AM_WRITE_LEGACY(tms34061_latch_w) AM_RANGE(0x11a0, 0x11a0) AM_WRITE(itech8_nmi_ack_w) @@ -870,7 +876,7 @@ static ADDRESS_MAP_START( tmshi_map, AS_PROGRAM, 8, itech8_state ) AM_RANGE(0x1000, 0x1fff) AM_READWRITE(itech8_tms34061_r, itech8_tms34061_w) AM_RANGE(0x0100, 0x0100) AM_WRITENOP AM_RANGE(0x0120, 0x0120) AM_WRITE(sound_data_w) - AM_RANGE(0x0140, 0x0140) AM_READ_PORT("40") AM_WRITEONLY AM_SHARE("grom_bank") + AM_RANGE(0x0140, 0x0140) AM_READ_PORT("40") AM_WRITE(grom_bank_w) AM_RANGE(0x0160, 0x0160) AM_READ_PORT("60") AM_WRITE(itech8_page_w) AM_RANGE(0x0180, 0x0180) AM_READ_PORT("80") AM_WRITE_LEGACY(tms34061_latch_w) AM_RANGE(0x01a0, 0x01a0) AM_WRITE(itech8_nmi_ack_w) @@ -887,7 +893,7 @@ static ADDRESS_MAP_START( gtg2_map, AS_PROGRAM, 8, itech8_state ) AM_RANGE(0x0120, 0x0120) AM_READ_PORT("60") AM_WRITE(itech8_page_w) AM_RANGE(0x0140, 0x015f) AM_WRITE(itech8_palette_w) AM_RANGE(0x0140, 0x0140) AM_READ_PORT("80") - AM_RANGE(0x0160, 0x0160) AM_WRITEONLY AM_SHARE("grom_bank") + AM_RANGE(0x0160, 0x0160) AM_WRITE(grom_bank_w) AM_RANGE(0x0180, 0x019f) AM_READ(itech8_blitter_r) AM_WRITE(blitter_w) AM_RANGE(0x01c0, 0x01c0) AM_WRITE(gtg2_sound_data_w) AM_RANGE(0x01e0, 0x01e0) AM_WRITE_LEGACY(tms34061_latch_w) @@ -903,7 +909,7 @@ static ADDRESS_MAP_START( ninclown_map, AS_PROGRAM, 16, itech8_state ) AM_RANGE(0x000080, 0x003fff) AM_RAM AM_SHARE("nvram") AM_RANGE(0x004000, 0x07ffff) AM_ROM AM_RANGE(0x100080, 0x100081) AM_WRITE8(sound_data_w, 0xff00) - AM_RANGE(0x100100, 0x100101) AM_READ_PORT("40") AM_WRITE(grom_bank16_w) AM_SHARE("grom_bank") + AM_RANGE(0x100100, 0x100101) AM_READ_PORT("40") AM_WRITE(grom_bank16_w) AM_RANGE(0x100180, 0x100181) AM_READ_PORT("60") AM_WRITE(display_page16_w) AM_RANGE(0x100240, 0x100241) AM_WRITE8_LEGACY(tms34061_latch_w, 0xff00) AM_RANGE(0x100280, 0x100281) AM_READ_PORT("80") AM_WRITENOP diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c index 54d412153da..9b9693edf7e 100644 --- a/src/mame/drivers/jalmah.c +++ b/src/mame/drivers/jalmah.c @@ -142,8 +142,8 @@ public: tilemap_t *m_sc3_tilemap_2; tilemap_t *m_sc3_tilemap_3; required_shared_ptr m_sc0_vram; - required_shared_ptr m_sc1_vram; - required_shared_ptr m_sc2_vram; + optional_shared_ptr m_sc1_vram; + optional_shared_ptr m_sc2_vram; required_shared_ptr m_sc3_vram; UINT16 *m_jm_scrollram; UINT16 *m_jm_vregs; diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c index 511129c903c..0ca9bed75be 100644 --- a/src/mame/drivers/jollyjgr.c +++ b/src/mame/drivers/jollyjgr.c @@ -118,7 +118,7 @@ public: required_shared_ptr m_colorram; required_shared_ptr m_spriteram; required_shared_ptr m_bitmap; - required_shared_ptr m_bulletram; + optional_shared_ptr m_bulletram; /* video-related */ tilemap_t *m_bg_tilemap; diff --git a/src/mame/drivers/mpu4vid.c b/src/mame/drivers/mpu4vid.c index 01fc5f76be3..ab58fdb5a45 100644 --- a/src/mame/drivers/mpu4vid.c +++ b/src/mame/drivers/mpu4vid.c @@ -1983,7 +1983,7 @@ static ADDRESS_MAP_START( mpu4_68k_map, AS_PROGRAM, 16, mpu4_state ) AM_RANGE(0xa00000, 0xa00003) AM_READWRITE_LEGACY(ef9369_r, ef9369_w) /* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE_LEGACY(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */ AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE_LEGACY(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) - AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) + AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_read, control_write, 0xff) AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_read, data_write, 0xff) AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0xff) @@ -1999,7 +1999,7 @@ static ADDRESS_MAP_START( mpu4oki_68k_map, AS_PROGRAM, 16, mpu4_state ) AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8_LEGACY("saa", saa1099_control_w, 0x00ff) AM_RANGE(0xa00000, 0xa00003) AM_READWRITE_LEGACY(ef9369_r, ef9369_w) AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE_LEGACY(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) - AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) + AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_read, control_write, 0xff) AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_read, data_write, 0xff) AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0xff) @@ -2038,7 +2038,7 @@ static ADDRESS_MAP_START( bwbvid_68k_map, AS_PROGRAM, 16, mpu4_state ) // AM_RANGE(0xa00000, 0xa0000f) AM_READWRITE_LEGACY(bt471_r,bt471_w) //Some games use this /* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE_LEGACY(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */ AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE_LEGACY(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) - AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) + AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_read, control_write, 0xff) AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_read, data_write, 0xff) AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0xff) @@ -2055,7 +2055,7 @@ static ADDRESS_MAP_START( bwbvid5_68k_map, AS_PROGRAM, 16, mpu4_state ) //AM_RANGE(0xa00000, 0xa00003) AM_READWRITE_LEGACY(bt471_r,bt471_w) Some games use this /* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE_LEGACY(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */ AM_RANGE(0xb00000, 0xb0000f) AM_READWRITE_LEGACY(mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) - AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) + AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE_LEGACY(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_read, control_write, 0xff) AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_read, data_write, 0xff) AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0x00ff) diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c index a26a8d3f704..aa85369106f 100644 --- a/src/mame/drivers/photon2.c +++ b/src/mame/drivers/photon2.c @@ -22,7 +22,7 @@ public: m_spectrum_video_ram(*this, "spectruvideo_ram"){ } required_device m_maincpu; - required_shared_ptr m_spectrum_video_ram; + optional_shared_ptr m_spectrum_video_ram; int m_spectrum_frame_number; int m_spectrum_flash_invert; UINT8 m_spectrum_port_fe; diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index 1384e461aef..b3e785b0918 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -380,7 +380,6 @@ static MACHINE_START( rng ) state->save_item(NAME(state->m_z80_control)); state->save_item(NAME(state->m_sound_status)); - state->save_item(NAME(state->m_sysreg)); state->save_item(NAME(state->m_ttl_vram)); } diff --git a/src/mame/drivers/scobra.c b/src/mame/drivers/scobra.c index 88c36c0f103..79b02936e72 100644 --- a/src/mame/drivers/scobra.c +++ b/src/mame/drivers/scobra.c @@ -47,7 +47,7 @@ public: : scramble_state(mconfig, type, tag), m_soundram(*this, "soundram") { } - required_shared_ptr m_soundram; + optional_shared_ptr m_soundram; DECLARE_READ8_MEMBER(scobra_soundram_r); DECLARE_WRITE8_MEMBER(scobra_soundram_w); DECLARE_CUSTOM_INPUT_MEMBER(stratgyx_coinage_r); diff --git a/src/mame/drivers/splus.c b/src/mame/drivers/splus.c index cd785eb07f2..b682398aadd 100644 --- a/src/mame/drivers/splus.c +++ b/src/mame/drivers/splus.c @@ -62,7 +62,7 @@ public: required_shared_ptr m_cmosh_ram; // Program and Reel Data - required_shared_ptr m_program_ram; + optional_shared_ptr m_program_ram; required_shared_ptr m_reel_ram; // IO Ports diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c index 383c2562e14..46a4fa519ca 100644 --- a/src/mame/drivers/srmp6.c +++ b/src/mame/drivers/srmp6.c @@ -83,7 +83,7 @@ public: UINT16* m_tileram; required_shared_ptr m_sprram; required_shared_ptr m_chrram; - required_shared_ptr m_dmaram; + optional_shared_ptr m_dmaram; required_shared_ptr m_video_regs; UINT16 *m_sprram_old; diff --git a/src/mame/drivers/subsino.c b/src/mame/drivers/subsino.c index b773b1f6f29..9e46fa4cdfc 100644 --- a/src/mame/drivers/subsino.c +++ b/src/mame/drivers/subsino.c @@ -244,12 +244,12 @@ public: required_shared_ptr m_colorram; required_shared_ptr m_videoram; - required_shared_ptr m_reel3_scroll; - required_shared_ptr m_reel2_scroll; - required_shared_ptr m_reel1_scroll; - required_shared_ptr m_reel1_ram; - required_shared_ptr m_reel2_ram; - required_shared_ptr m_reel3_ram; + optional_shared_ptr m_reel3_scroll; + optional_shared_ptr m_reel2_scroll; + optional_shared_ptr m_reel1_scroll; + optional_shared_ptr m_reel1_ram; + optional_shared_ptr m_reel2_ram; + optional_shared_ptr m_reel3_ram; tilemap_t *m_tmap; tilemap_t *m_reel1_tilemap; diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c index 14801847db1..ac42cad5172 100644 --- a/src/mame/drivers/subsino2.c +++ b/src/mame/drivers/subsino2.c @@ -95,8 +95,8 @@ public: int m_hm86171_offs; UINT8 m_dsw_mask; required_shared_ptr m_outputs16; - required_shared_ptr m_outputs; - required_shared_ptr m_am188em_regs; + optional_shared_ptr m_outputs; + optional_shared_ptr m_am188em_regs; UINT16 m_bishjan_sel; UINT16 m_bishjan_input; DECLARE_WRITE8_MEMBER(ss9601_byte_lo_w); diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index 13fe2d3cb96..8e4d00fef5f 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -129,7 +129,7 @@ public: required_device m_maincpu; optional_device m_microtouch; required_shared_ptr m_regs; - required_shared_ptr m_galgames_ram; + optional_shared_ptr m_galgames_ram; int m_okibank; UINT8 m_rtc_ram[8]; diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index 067e0a6a3fa..0b3496c9465 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -74,10 +74,10 @@ public: m_has_extra_gfx = 0; } - required_shared_ptr m_tiles; - required_shared_ptr m_wram; - required_shared_ptr m_tiles32; - required_shared_ptr m_wram32; + optional_shared_ptr m_tiles; + optional_shared_ptr m_wram; + optional_shared_ptr m_tiles32; + optional_shared_ptr m_wram32; int m_flip_bit; int m_flipscreen; int m_palshift; diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index 6dc98325402..56a7e8e68ed 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -188,7 +188,7 @@ public: UINT8 m_led_reg1; int m_ccu_vcth; int m_ccu_vctl; - required_shared_ptr m_workram; + optional_shared_ptr m_workram; UINT32 *m_sharc_dataram; DECLARE_WRITE32_MEMBER(paletteram32_w); DECLARE_READ8_MEMBER(sysreg_r); diff --git a/src/mame/includes/argus.h b/src/mame/includes/argus.h index d7eb71665a9..1c4e4c93f47 100644 --- a/src/mame/includes/argus.h +++ b/src/mame/includes/argus.h @@ -18,10 +18,10 @@ public: required_shared_ptr m_bg1_scrollx; required_shared_ptr m_bg1_scrolly; required_shared_ptr m_paletteram; - required_shared_ptr m_txram; - required_shared_ptr m_bg1ram; + optional_shared_ptr m_txram; + optional_shared_ptr m_bg1ram; required_shared_ptr m_spriteram; - required_shared_ptr m_butasan_bg1ram; + optional_shared_ptr m_butasan_bg1ram; UINT8 *m_dummy_bg0ram; UINT8 *m_butasan_txram; diff --git a/src/mame/includes/asteroid.h b/src/mame/includes/asteroid.h index c7549b1e6c6..95ccfae2ea3 100644 --- a/src/mame/includes/asteroid.h +++ b/src/mame/includes/asteroid.h @@ -14,8 +14,8 @@ public: m_ram1(*this, "ram1"), m_ram2(*this, "ram2"){ } - required_shared_ptr m_ram1; - required_shared_ptr m_ram2; + optional_shared_ptr m_ram1; + optional_shared_ptr m_ram2; DECLARE_WRITE8_MEMBER(astdelux_coin_counter_w); DECLARE_WRITE8_MEMBER(llander_led_w); DECLARE_READ8_MEMBER(asteroid_IN0_r); diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h index a886820562a..5cc9bb387a1 100644 --- a/src/mame/includes/astrocde.h +++ b/src/mame/includes/astrocde.h @@ -29,7 +29,7 @@ public: char *m_totalword_ptr; char m_oldword[256]; int m_plural; - required_shared_ptr m_protected_ram; + optional_shared_ptr m_protected_ram; UINT8 m_port_1_last; UINT8 m_port_2_last; UINT8 m_ram_write_enable; diff --git a/src/mame/includes/atarig1.h b/src/mame/includes/atarig1.h index a5c49055579..7b39d8ad33d 100644 --- a/src/mame/includes/atarig1.h +++ b/src/mame/includes/atarig1.h @@ -10,12 +10,13 @@ class atarig1_state : public atarigen_state { public: atarig1_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_mo_command(*this, "mo_command") { } UINT8 m_is_pitfight; UINT8 m_which_input; - UINT16 * m_mo_command; + required_shared_ptr m_mo_command; UINT16 * m_bslapstic_base; void * m_bslapstic_bank0; diff --git a/src/mame/includes/atarig42.h b/src/mame/includes/atarig42.h index b6a1aad4a37..b111f184cf0 100644 --- a/src/mame/includes/atarig42.h +++ b/src/mame/includes/atarig42.h @@ -10,7 +10,8 @@ class atarig42_state : public atarigen_state { public: atarig42_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_mo_command(*this, "mo_command") { } UINT16 m_playfield_base; @@ -21,7 +22,7 @@ public: UINT16 m_playfield_yscroll; UINT8 m_analog_data; - UINT16 * m_mo_command; + required_shared_ptr m_mo_command; int m_sloop_bank; int m_sloop_next_bank; diff --git a/src/mame/includes/atarigx2.h b/src/mame/includes/atarigx2.h index 25a6357da15..4e6408404ad 100644 --- a/src/mame/includes/atarigx2.h +++ b/src/mame/includes/atarigx2.h @@ -10,12 +10,14 @@ class atarigx2_state : public atarigen_state { public: atarigx2_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_mo_command(*this, "mo_command"), + m_protection_base(*this, "protection_base") { } UINT16 m_playfield_base; - UINT32 * m_mo_command; - UINT32 * m_protection_base; + required_shared_ptr m_mo_command; + required_shared_ptr m_protection_base; UINT16 m_current_control; UINT8 m_playfield_tile_bank; diff --git a/src/mame/includes/atarisy1.h b/src/mame/includes/atarisy1.h index addf990c2f5..14a7baab772 100644 --- a/src/mame/includes/atarisy1.h +++ b/src/mame/includes/atarisy1.h @@ -11,12 +11,13 @@ class atarisy1_state : public atarigen_state public: atarisy1_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), + m_bankselect(*this, "bankselect"), m_joystick_timer(*this, "joystick_timer"), m_yscroll_reset_timer(*this, "yreset_timer"), m_scanline_timer(*this, "scan_timer"), m_int3off_timer(*this, "int3off_timer") { } - UINT16 * m_bankselect; + required_shared_ptr m_bankselect; UINT8 m_joystick_type; UINT8 m_trackball_type; diff --git a/src/mame/includes/balsente.h b/src/mame/includes/balsente.h index 8085067ec35..6415066f2af 100644 --- a/src/mame/includes/balsente.h +++ b/src/mame/includes/balsente.h @@ -127,8 +127,8 @@ public: required_shared_ptr m_spriteram; required_shared_ptr m_videoram; - required_shared_ptr m_shrike_io; - required_shared_ptr m_shrike_shared; + optional_shared_ptr m_shrike_io; + optional_shared_ptr m_shrike_shared; DECLARE_WRITE8_MEMBER(balsente_random_reset_w); DECLARE_READ8_MEMBER(balsente_random_num_r); diff --git a/src/mame/includes/beathead.h b/src/mame/includes/beathead.h index 76ad749caab..a8b52169e02 100644 --- a/src/mame/includes/beathead.h +++ b/src/mame/includes/beathead.h @@ -14,7 +14,13 @@ public: beathead_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_nvram(*this, "nvram") { } + m_nvram(*this, "nvram"), + m_videoram(*this, "videoram"), + m_paletteram(*this, "paletteram"), + m_vram_bulk_latch(*this, "vram_bulk_latch"), + m_palette_select(*this, "palette_select"), + m_ram_base(*this, "ram_base"), + m_rom_base(*this, "rom_base") { } virtual void machine_start(); virtual void machine_reset(); @@ -27,11 +33,11 @@ public: required_shared_ptr m_nvram; - UINT32 * m_videoram; - UINT32 * m_paletteram; + required_shared_ptr m_videoram; + required_shared_ptr m_paletteram; - UINT32 * m_vram_bulk_latch; - UINT32 * m_palette_select; + required_shared_ptr m_vram_bulk_latch; + required_shared_ptr m_palette_select; UINT32 m_finescroll; offs_t m_vram_latch_offset; @@ -40,8 +46,8 @@ public: offs_t m_hsyncram_start; UINT8 m_hsyncram[0x800]; - UINT32 * m_ram_base; - UINT32 * m_rom_base; + required_shared_ptr m_ram_base; + required_shared_ptr m_rom_base; attotime m_hblank_offset; diff --git a/src/mame/includes/blstroid.h b/src/mame/includes/blstroid.h index c898f384199..24f70b28ce5 100644 --- a/src/mame/includes/blstroid.h +++ b/src/mame/includes/blstroid.h @@ -10,9 +10,10 @@ class blstroid_state : public atarigen_state { public: blstroid_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_priorityram(*this, "priorityram") { } - UINT16 * m_priorityram; + required_shared_ptr m_priorityram; DECLARE_WRITE16_MEMBER(blstroid_halt_until_hblank_0_w); DECLARE_READ16_MEMBER(inputs_r); }; diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index 45e6fbd55e4..c41a11c3d40 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -15,7 +15,7 @@ public: m_audio_rambase(*this, "audio_rambase"){ } /* memory pointers */ - required_shared_ptr m_rambase; + optional_shared_ptr m_rambase; required_shared_ptr m_videoram; required_shared_ptr m_colorram; // UINT8 * m_paletteram; // currently this uses generic palette handling @@ -25,7 +25,7 @@ public: optional_shared_ptr m_deco_charram; optional_shared_ptr m_spriteram; // used by disco // UINT8 * m_decrypted; - required_shared_ptr m_audio_rambase; + optional_shared_ptr m_audio_rambase; /* video-related */ bitmap_ind16 *m_background_bitmap; diff --git a/src/mame/includes/bublbobl.h b/src/mame/includes/bublbobl.h index 0793bea000c..20bc677ab0a 100644 --- a/src/mame/includes/bublbobl.h +++ b/src/mame/includes/bublbobl.h @@ -11,7 +11,7 @@ public: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_objectram; - required_shared_ptr m_mcu_sharedram; + optional_shared_ptr m_mcu_sharedram; // UINT8 * paletteram; // currently this uses generic palette handling /* video-related */ diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index aa743b12732..45f66f993cd 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -40,7 +40,7 @@ public: optional_shared_ptr_array m_vram; optional_shared_ptr_array m_vctrl; required_shared_ptr m_spriteram; - required_shared_ptr m_spriteram_2; + optional_shared_ptr m_spriteram_2; required_shared_ptr m_paletteram; /* video-related */ @@ -104,7 +104,7 @@ public: /* game specific */ // sailormn int m_sailormn_tilebank; - required_shared_ptr m_mirror_ram; + optional_shared_ptr m_mirror_ram; // korokoro UINT16 m_leds[2]; int m_hopper; diff --git a/src/mame/includes/cclimber.h b/src/mame/includes/cclimber.h index 72c57aadc74..6f79754b1d7 100644 --- a/src/mame/includes/cclimber.h +++ b/src/mame/includes/cclimber.h @@ -23,11 +23,11 @@ public: required_shared_ptr m_bigsprite_control; required_shared_ptr m_colorram; required_shared_ptr m_flip_screen; - required_shared_ptr m_swimmer_side_background_enabled; - required_shared_ptr m_swimmer_palettebank; - required_shared_ptr m_swimmer_background_color; - required_shared_ptr m_toprollr_bg_videoram; - required_shared_ptr m_toprollr_bg_coloram; + optional_shared_ptr m_swimmer_side_background_enabled; + optional_shared_ptr m_swimmer_palettebank; + optional_shared_ptr m_swimmer_background_color; + optional_shared_ptr m_toprollr_bg_videoram; + optional_shared_ptr m_toprollr_bg_coloram; UINT8 m_yamato_p0; UINT8 m_yamato_p1; diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h index cd35d670188..3a11ba62908 100644 --- a/src/mame/includes/centiped.h +++ b/src/mame/includes/centiped.h @@ -17,7 +17,7 @@ public: required_shared_ptr m_rambase; required_shared_ptr m_videoram; required_shared_ptr m_spriteram; - required_shared_ptr m_bullsdrt_tiles_bankram; + optional_shared_ptr m_bullsdrt_tiles_bankram; UINT8 m_oldpos[4]; UINT8 m_sign[4]; UINT8 m_dsw_select; diff --git a/src/mame/includes/cinemat.h b/src/mame/includes/cinemat.h index 56fb70ae1ec..e85ab7539f7 100644 --- a/src/mame/includes/cinemat.h +++ b/src/mame/includes/cinemat.h @@ -25,7 +25,7 @@ public: UINT8 m_last_portb_write; float m_target_volume; float m_current_volume; - required_shared_ptr m_rambase; + optional_shared_ptr m_rambase; UINT8 m_coin_detected; UINT8 m_coin_last_reset; UINT8 m_mux_select; diff --git a/src/mame/includes/cischeat.h b/src/mame/includes/cischeat.h index 4ef20d19892..17091d9ccea 100644 --- a/src/mame/includes/cischeat.h +++ b/src/mame/includes/cischeat.h @@ -15,7 +15,7 @@ public: required_shared_ptr_array m_scrollram; required_shared_ptr m_ram; required_shared_ptr_array m_roadram; - required_shared_ptr m_f1gpstr2_ioready; + optional_shared_ptr m_f1gpstr2_ioready; UINT16 *m_objectram; tilemap_t *m_tmap[3]; diff --git a/src/mame/includes/cvs.h b/src/mame/includes/cvs.h index 1f217a2ff07..1e89ed3c9c0 100644 --- a/src/mame/includes/cvs.h +++ b/src/mame/includes/cvs.h @@ -30,9 +30,9 @@ public: required_shared_ptr m_video_ram; required_shared_ptr m_bullet_ram; required_shared_ptr m_fo_state; - required_shared_ptr m_cvs_4_bit_dac_data; - required_shared_ptr m_tms5110_ctl_data; - required_shared_ptr m_dac3_state; + optional_shared_ptr m_cvs_4_bit_dac_data; + optional_shared_ptr m_tms5110_ctl_data; + optional_shared_ptr m_dac3_state; /* video-related */ struct cvs_star m_stars[CVS_MAX_STARS]; diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h index 7835f263b5e..0d225e3b1d5 100644 --- a/src/mame/includes/cyberbal.h +++ b/src/mame/includes/cyberbal.h @@ -10,10 +10,12 @@ class cyberbal_state : public atarigen_state { public: cyberbal_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_paletteram_0(*this, "paletteram_0"), + m_paletteram_1(*this, "paletteram_1") { } - UINT16 * m_paletteram_0; - UINT16 * m_paletteram_1; + optional_shared_ptr m_paletteram_0; + optional_shared_ptr m_paletteram_1; UINT16 m_current_slip[2]; UINT8 m_playfield_palette_bank[2]; UINT16 m_playfield_xscroll[2]; diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 2325cc1bc09..5ad481eadf3 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -19,13 +19,13 @@ public: m_darktowr_mcu_ports(*this, "darktowr_mcu"){ } /* memory pointers */ - required_shared_ptr m_rambase; + optional_shared_ptr m_rambase; required_shared_ptr m_bgvideoram; required_shared_ptr m_fgvideoram; required_shared_ptr m_spriteram; required_shared_ptr m_scrollx_lo; required_shared_ptr m_scrolly_lo; - required_shared_ptr m_darktowr_mcu_ports; + optional_shared_ptr m_darktowr_mcu_ports; // UINT8 * m_paletteram; // currently this uses generic palette handling // UINT8 * m_paletteram_2; // currently this uses generic palette handling size_t m_spriteram_size; // FIXME: this appears in chinagat.c, but is it really used? diff --git a/src/mame/includes/dec0.h b/src/mame/includes/dec0.h index 7f5ee930201..e7a28d7c30b 100644 --- a/src/mame/includes/dec0.h +++ b/src/mame/includes/dec0.h @@ -11,7 +11,7 @@ public: int m_automat_msm5205_vclk_toggle; required_shared_ptr m_ram; required_shared_ptr m_spriteram; - required_shared_ptr m_robocop_shared_ram; + optional_shared_ptr m_robocop_shared_ram; int m_GAME; int m_i8751_return; diff --git a/src/mame/includes/dec8.h b/src/mame/includes/dec8.h index 561f3d346d8..3cdcb7cb426 100644 --- a/src/mame/includes/dec8.h +++ b/src/mame/includes/dec8.h @@ -18,7 +18,7 @@ public: /* memory pointers */ required_shared_ptr m_videoram; - required_shared_ptr m_bg_data; + optional_shared_ptr m_bg_data; UINT8 * m_pf1_data; UINT8 * m_row; // UINT8 * m_paletteram; // currently this uses generic palette handling diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h index b859f33f95d..a364afb640f 100644 --- a/src/mame/includes/deco32.h +++ b/src/mame/includes/deco32.h @@ -26,7 +26,7 @@ public: required_shared_ptr m_pf3_rowscroll32; required_shared_ptr m_pf4_rowscroll32; - required_shared_ptr m_ace_ram; + optional_shared_ptr m_ace_ram; int m_raster_enable; timer_device *m_raster_irq_timer; diff --git a/src/mame/includes/dooyong.h b/src/mame/includes/dooyong.h index 6fab79ee51d..af9d61e80d0 100644 --- a/src/mame/includes/dooyong.h +++ b/src/mame/includes/dooyong.h @@ -13,7 +13,7 @@ public: optional_device m_spriteram; optional_device m_spriteram16; required_shared_ptr m_txvideoram; - required_shared_ptr m_paletteram_flytiger; + optional_shared_ptr m_paletteram_flytiger; UINT8 m_sprites_disabled; UINT8 m_flytiger_palette_bank; UINT8 m_flytiger_pri; diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h index da2851705a0..a443b87a305 100644 --- a/src/mame/includes/equites.h +++ b/src/mame/includes/equites.h @@ -19,8 +19,8 @@ public: required_shared_ptr m_bg_videoram; UINT8 * m_fg_videoram; // 8bits required_shared_ptr m_spriteram; - required_shared_ptr m_workram; - required_shared_ptr m_spriteram_2; + optional_shared_ptr m_workram; + optional_shared_ptr m_spriteram_2; required_shared_ptr m_mcu_ram; // 8bits // UINT16 * m_nvram; // currently this uses generic nvram handling diff --git a/src/mame/includes/f1gp.h b/src/mame/includes/f1gp.h index 39210492112..e70b361dd36 100644 --- a/src/mame/includes/f1gp.h +++ b/src/mame/includes/f1gp.h @@ -19,17 +19,17 @@ public: /* memory pointers */ required_shared_ptr m_sharedram; - required_shared_ptr m_spr1vram; - required_shared_ptr m_spr2vram; - required_shared_ptr m_spr1cgram; - required_shared_ptr m_spr2cgram; + optional_shared_ptr m_spr1vram; + optional_shared_ptr m_spr2vram; + optional_shared_ptr m_spr1cgram; + optional_shared_ptr m_spr2cgram; required_shared_ptr m_fgvideoram; required_shared_ptr m_rozvideoram; - required_shared_ptr m_sprcgram; - required_shared_ptr m_spritelist; - required_shared_ptr m_spriteram; - required_shared_ptr m_fgregs; - required_shared_ptr m_rozregs; + optional_shared_ptr m_sprcgram; + optional_shared_ptr m_spritelist; + optional_shared_ptr m_spriteram; + optional_shared_ptr m_fgregs; + optional_shared_ptr m_rozregs; UINT16 * m_zoomdata; // UINT16 * m_paletteram; // currently this uses generic palette handling diff --git a/src/mame/includes/fantland.h b/src/mame/includes/fantland.h index 87c5e365023..d2a8a719f27 100644 --- a/src/mame/includes/fantland.h +++ b/src/mame/includes/fantland.h @@ -5,8 +5,8 @@ class fantland_state : public driver_device public: fantland_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_spriteram(*this, "spriteram"), - m_spriteram2(*this, "spriteram2"){ } + m_spriteram(*this, "spriteram", 16), + m_spriteram2(*this, "spriteram2", 16){ } /* memory pointers */ // UINT8 * m_spriteram; // currently directly used in a 16bit map... diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h index 56a3fa0dbea..26d605c7f22 100644 --- a/src/mame/includes/firetrk.h +++ b/src/mame/includes/firetrk.h @@ -55,10 +55,10 @@ public: required_shared_ptr m_scroll_y; required_shared_ptr m_scroll_x; required_shared_ptr m_car_rot; - required_shared_ptr m_blink; - required_shared_ptr m_drone_x; - required_shared_ptr m_drone_y; - required_shared_ptr m_drone_rot; + optional_shared_ptr m_blink; + optional_shared_ptr m_drone_x; + optional_shared_ptr m_drone_y; + optional_shared_ptr m_drone_rot; UINT8 m_flash; UINT8 m_crash[2]; UINT8 m_skid[2]; diff --git a/src/mame/includes/foodf.h b/src/mame/includes/foodf.h index 96f172d7c80..9242105682b 100644 --- a/src/mame/includes/foodf.h +++ b/src/mame/includes/foodf.h @@ -12,7 +12,8 @@ class foodf_state : public atarigen_state public: foodf_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), - m_nvram(*this, "nvram") { } + m_nvram(*this, "nvram"), + m_spriteram(*this, "spriteram") { } required_device m_nvram; @@ -22,7 +23,7 @@ public: UINT8 m_playfield_flip; UINT8 m_whichport; - UINT16 *m_spriteram; + required_shared_ptr m_spriteram; DECLARE_WRITE16_MEMBER(nvram_recall_w); DECLARE_WRITE8_MEMBER(digital_w); DECLARE_READ16_MEMBER(analog_r); diff --git a/src/mame/includes/gaelco.h b/src/mame/includes/gaelco.h index 3c945815331..a0527898506 100644 --- a/src/mame/includes/gaelco.h +++ b/src/mame/includes/gaelco.h @@ -18,7 +18,7 @@ public: required_shared_ptr m_videoram; required_shared_ptr m_vregs; required_shared_ptr m_spriteram; - required_shared_ptr m_screen; + optional_shared_ptr m_screen; // UINT16 * paletteram; // currently this uses generic palette handling /* video-related */ diff --git a/src/mame/includes/gaelco3d.h b/src/mame/includes/gaelco3d.h index e2f872f65d0..ffa4bb28370 100644 --- a/src/mame/includes/gaelco3d.h +++ b/src/mame/includes/gaelco3d.h @@ -53,8 +53,8 @@ public: gaelco3d_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_adsp_ram_base(*this,"adsp_ram_base"), - m_m68k_ram_base(*this,"m68k_ram_base"), - m_tms_comm_base(*this,"tms_comm_base"), + m_m68k_ram_base(*this,"m68k_ram_base",0), + m_tms_comm_base(*this,"tms_comm_base",0), m_adsp_control_regs(*this,"adsp_regs"), m_adsp_fastram_base(*this,"adsp_fastram") { } diff --git a/src/mame/includes/galaga.h b/src/mame/includes/galaga.h index 667ac2b8f60..6c947cdcfa6 100644 --- a/src/mame/includes/galaga.h +++ b/src/mame/includes/galaga.h @@ -13,11 +13,11 @@ public: { } /* memory pointers */ - required_shared_ptr m_videoram; - required_shared_ptr m_galaga_ram1; - required_shared_ptr m_galaga_ram2; - required_shared_ptr m_galaga_ram3; - required_shared_ptr m_galaga_starcontrol; // 6 addresses + optional_shared_ptr m_videoram; + optional_shared_ptr m_galaga_ram1; + optional_shared_ptr m_galaga_ram2; + optional_shared_ptr m_galaga_ram3; + optional_shared_ptr m_galaga_starcontrol; // 6 addresses emu_timer *m_cpu3_interrupt_timer; UINT8 m_custom_mod; diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h index e432adaf927..aef1aa987a2 100644 --- a/src/mame/includes/galaxold.h +++ b/src/mame/includes/galaxold.h @@ -37,7 +37,7 @@ public: required_shared_ptr m_spriteram; optional_shared_ptr m_spriteram2; required_shared_ptr m_attributesram; - required_shared_ptr m_bulletsram; + optional_shared_ptr m_bulletsram; optional_shared_ptr m_rockclim_videoram; optional_shared_ptr m_racknrol_tiles_bank; diff --git a/src/mame/includes/goldstar.h b/src/mame/includes/goldstar.h index a0fe42f45be..db71cef46bd 100644 --- a/src/mame/includes/goldstar.h +++ b/src/mame/includes/goldstar.h @@ -30,9 +30,9 @@ public: required_shared_ptr m_reel3_scroll; /* reelx_attrram for unkch sets */ - required_shared_ptr m_reel1_attrram; - required_shared_ptr m_reel2_attrram; - required_shared_ptr m_reel3_attrram; + optional_shared_ptr m_reel1_attrram; + optional_shared_ptr m_reel2_attrram; + optional_shared_ptr m_reel3_attrram; UINT8 m_unkch_vidreg; tilemap_t *m_reel1_tilemap; diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index 454127e97e2..c9ad24b1d73 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -26,6 +26,15 @@ public: m_dsp32(*this, "dsp32"), m_ds4cpu1(*this, "ds4cpu1"), m_ds4cpu2(*this, "ds4cpu2"), + m_msp_ram(*this, "msp_ram"), + m_adsp_data_memory(*this, "adsp_data"), + m_adsp_pgm_memory(*this, "adsp_pgm_memory"), + m_sounddsp_ram(*this, "sounddsp_ram"), + m_gsp_vram(*this, "gsp_vram", 16), + m_gsp_control_lo(*this, "gsp_control_lo"), + m_gsp_control_hi(*this, "gsp_control_hi"), + m_gsp_paletteram_lo(*this, "gsp_palram_lo"), + m_gsp_paletteram_hi(*this, "gsp_palram_hi"), m_duart_timer(*this, "duart_timer") { } required_device m_maincpu; @@ -42,15 +51,15 @@ public: UINT8 m_hd34010_host_access; UINT8 m_dsk_pio_access; - UINT16 * m_msp_ram; + optional_shared_ptr m_msp_ram; UINT16 * m_dsk_ram; UINT16 * m_dsk_rom; UINT16 * m_dsk_zram; UINT16 * m_m68k_slapstic_base; UINT16 * m_m68k_sloop_alt_base; - UINT16 * m_adsp_data_memory; - UINT32 * m_adsp_pgm_memory; + optional_shared_ptr m_adsp_data_memory; + optional_shared_ptr m_adsp_pgm_memory; UINT16 * m_gsp_protection; @@ -70,15 +79,14 @@ public: UINT32 m_msp_speedup_count[4]; UINT32 m_adsp_speedup_count[4]; - UINT16 * m_sounddsp_ram; + optional_shared_ptr m_sounddsp_ram; UINT8 m_gsp_multisync; - UINT8 * m_gsp_vram; - UINT16 * m_gsp_control_lo; - UINT16 * m_gsp_control_hi; - UINT16 * m_gsp_paletteram_lo; - UINT16 * m_gsp_paletteram_hi; - size_t m_gsp_vram_size; + optional_shared_ptr m_gsp_vram; + optional_shared_ptr m_gsp_control_lo; + optional_shared_ptr m_gsp_control_hi; + optional_shared_ptr m_gsp_paletteram_lo; + optional_shared_ptr m_gsp_paletteram_hi; /* machine state */ UINT8 m_irq_state; diff --git a/src/mame/includes/homedata.h b/src/mame/includes/homedata.h index e6dbe5f95c8..c626f347b29 100644 --- a/src/mame/includes/homedata.h +++ b/src/mame/includes/homedata.h @@ -8,7 +8,7 @@ public: m_videoram(*this, "videoram"){ } /* memory pointers */ - required_shared_ptr m_vreg; + optional_shared_ptr m_vreg; required_shared_ptr m_videoram; /* video-related */ diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h index eec74ff8f2c..34cdf2ce5b2 100644 --- a/src/mame/includes/itech32.h +++ b/src/mame/includes/itech32.h @@ -29,13 +29,13 @@ public: m_tms2_ram(*this, "tms2_ram"){ } optional_shared_ptr m_main_ram; - required_shared_ptr m_nvram; - required_shared_ptr m_video; - required_shared_ptr m_main_rom; - required_shared_ptr m_drivedge_zbuf_control; - required_shared_ptr m_tms1_boot; - required_shared_ptr m_tms1_ram; - required_shared_ptr m_tms2_ram; + optional_shared_ptr m_nvram; + optional_shared_ptr m_video; + optional_shared_ptr m_main_rom; + optional_shared_ptr m_drivedge_zbuf_control; + optional_shared_ptr m_tms1_boot; + optional_shared_ptr m_tms1_ram; + optional_shared_ptr m_tms2_ram; void nvram_init(nvram_device &nvram, void *base, size_t length); diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h index bb50e018907..cea24d85bd4 100644 --- a/src/mame/includes/itech8.h +++ b/src/mame/includes/itech8.h @@ -14,11 +14,10 @@ class itech8_state : public driver_device public: itech8_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_visarea(0, 0, 0, 0) , - m_grom_bank(*this, "grom_bank"){ } + m_visarea(0, 0, 0, 0){ } rectangle m_visarea; - required_shared_ptr m_grom_bank; + UINT8 m_grom_bank; UINT8 m_blitter_int; UINT8 m_tms34061_int; @@ -62,6 +61,7 @@ public: DECLARE_WRITE8_MEMBER(sound_data_w); DECLARE_WRITE8_MEMBER(gtg2_sound_data_w); DECLARE_READ8_MEMBER(sound_data_r); + DECLARE_WRITE8_MEMBER(grom_bank_w); DECLARE_WRITE16_MEMBER(grom_bank16_w); DECLARE_WRITE16_MEMBER(display_page16_w); DECLARE_WRITE16_MEMBER(palette16_w); diff --git a/src/mame/includes/jpmimpct.h b/src/mame/includes/jpmimpct.h index e1a8ac6da2d..a8a6f491354 100644 --- a/src/mame/includes/jpmimpct.h +++ b/src/mame/includes/jpmimpct.h @@ -71,7 +71,7 @@ public: int m_slidesout; int m_hopper[3]; int m_motor[3]; - required_shared_ptr m_vram; + optional_shared_ptr m_vram; struct bt477_t m_bt477; DECLARE_WRITE16_MEMBER(m68k_tms_w); DECLARE_READ16_MEMBER(m68k_tms_r); diff --git a/src/mame/includes/kaneko16.h b/src/mame/includes/kaneko16.h index 961c491eb4e..e4f6d7bb6f3 100644 --- a/src/mame/includes/kaneko16.h +++ b/src/mame/includes/kaneko16.h @@ -90,13 +90,13 @@ public: required_device m_maincpu; optional_shared_ptr m_spriteram; - required_shared_ptr m_bg15_reg; - required_shared_ptr m_bg15_select; + optional_shared_ptr m_bg15_reg; + optional_shared_ptr m_bg15_select; required_shared_ptr m_sprites_regs; - required_shared_ptr_array m_vram; - required_shared_ptr_array m_vscroll; + optional_shared_ptr_array m_vram; + optional_shared_ptr_array m_vscroll; required_shared_ptr m_layers_0_regs; - required_shared_ptr m_layers_1_regs; + optional_shared_ptr m_layers_1_regs; required_shared_ptr m_mcu_ram; required_shared_ptr m_mainram; diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h index 0e59d5872e1..1858c72dab4 100644 --- a/src/mame/includes/ladybug.h +++ b/src/mame/includes/ladybug.h @@ -18,9 +18,9 @@ public: /* memory pointers */ required_shared_ptr m_videoram; - required_shared_ptr m_colorram; + optional_shared_ptr m_colorram; required_shared_ptr m_spriteram; - required_shared_ptr m_grid_data; + optional_shared_ptr m_grid_data; /* video-related */ tilemap_t *m_bg_tilemap; diff --git a/src/mame/includes/lasso.h b/src/mame/includes/lasso.h index 5f6bcef4a1d..43748cb8271 100644 --- a/src/mame/includes/lasso.h +++ b/src/mame/includes/lasso.h @@ -23,10 +23,10 @@ public: required_shared_ptr m_colorram; required_shared_ptr m_spriteram; required_shared_ptr m_back_color; - required_shared_ptr m_chip_data; - required_shared_ptr m_bitmap_ram; /* 0x2000 bytes for a 256 x 256 x 1 bitmap */ - required_shared_ptr m_last_colors; - required_shared_ptr m_track_scroll; + optional_shared_ptr m_chip_data; + optional_shared_ptr m_bitmap_ram; /* 0x2000 bytes for a 256 x 256 x 1 bitmap */ + optional_shared_ptr m_last_colors; + optional_shared_ptr m_track_scroll; /* video-related */ tilemap_t *m_bg_tilemap; diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index db9d62b0ebd..5a7b9d017a1 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -11,11 +11,11 @@ public: m_scratchram(*this, "scratchram"){ } required_shared_ptr m_paletteram; - required_shared_ptr m_bg_vram; /* prosport */ + optional_shared_ptr m_bg_vram; /* prosport */ required_shared_ptr m_colorram; required_shared_ptr m_videoram; required_shared_ptr m_spriteram; - required_shared_ptr m_scratchram; + optional_shared_ptr m_scratchram; UINT8 *m_charram; /* prosoccr */ UINT8 m_io_ram[16]; diff --git a/src/mame/includes/m62.h b/src/mame/includes/m62.h index fc1a9d8c41d..bf73dc79d56 100644 --- a/src/mame/includes/m62.h +++ b/src/mame/includes/m62.h @@ -12,8 +12,8 @@ public: required_shared_ptr m_spriteram; required_shared_ptr m_m62_tileram; - required_shared_ptr m_m62_textram; - required_shared_ptr m_scrollram; + optional_shared_ptr m_m62_textram; + optional_shared_ptr m_scrollram; /* video-related */ tilemap_t* m_bg_tilemap; diff --git a/src/mame/includes/mcr3.h b/src/mame/includes/mcr3.h index 4097315c6b5..a3f641715b0 100644 --- a/src/mame/includes/mcr3.h +++ b/src/mame/includes/mcr3.h @@ -2,11 +2,9 @@ class mcr3_state : public mcr_state { public: mcr3_state(const machine_config &mconfig, device_type type, const char *tag) - : mcr_state(mconfig, type, tag) { } + : mcr_state(mconfig, type, tag), + m_spyhunt_alpharam(*this, "spyhunt_alpha") { } - UINT8 *m_videoram; - UINT8 *m_spriteram; - size_t m_spriteram_size; UINT8 m_input_mux; UINT8 m_latched_input; UINT8 m_last_op4; @@ -17,7 +15,7 @@ public: INT8 m_maxrpm_p2_shift; UINT8 m_spyhunt_sprite_color_mask; INT16 m_spyhunt_scroll_offset; - UINT8 *m_spyhunt_alpharam; + optional_shared_ptr m_spyhunt_alpharam; INT16 m_spyhunt_scrollx; INT16 m_spyhunt_scrolly; tilemap_t *m_bg_tilemap; diff --git a/src/mame/includes/megadriv.h b/src/mame/includes/megadriv.h index 6742ae1f619..5eba2a7726c 100644 --- a/src/mame/includes/megadriv.h +++ b/src/mame/includes/megadriv.h @@ -113,14 +113,15 @@ class segac2_state : public md_base_state { public: segac2_state(const machine_config &mconfig, device_type type, const char *tag) - : md_base_state(mconfig, type, tag) { } + : md_base_state(mconfig, type, tag), + m_paletteram(*this, "paletteram") { } // for Print Club only int m_cam_data; int m_segac2_enable_display; - UINT16* m_paletteram; + required_shared_ptr m_paletteram; /* internal states */ UINT8 m_misc_io_data[0x10]; /* holds values written to the I/O chip */ diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h index 9cb7da1718d..c92565e0d1b 100644 --- a/src/mame/includes/metro.h +++ b/src/mame/includes/metro.h @@ -46,17 +46,17 @@ public: optional_shared_ptr m_vram_1; optional_shared_ptr m_vram_2; required_shared_ptr m_spriteram; - required_shared_ptr m_tiletable; + optional_shared_ptr m_tiletable; UINT16 * m_tiletable_old; - required_shared_ptr m_blitter_regs; - required_shared_ptr m_scroll; - required_shared_ptr m_window; - required_shared_ptr m_irq_enable; + optional_shared_ptr m_blitter_regs; + optional_shared_ptr m_scroll; + optional_shared_ptr m_window; + optional_shared_ptr m_irq_enable; optional_shared_ptr m_irq_levels; optional_shared_ptr m_irq_vectors; - required_shared_ptr m_rombank; + optional_shared_ptr m_rombank; required_shared_ptr m_videoregs; - required_shared_ptr m_screenctrl; + optional_shared_ptr m_screenctrl; optional_shared_ptr m_input_sel; optional_shared_ptr m_k053936_ram; diff --git a/src/mame/includes/midvunit.h b/src/mame/includes/midvunit.h index 9f327ba35c8..4474af0a676 100644 --- a/src/mame/includes/midvunit.h +++ b/src/mame/includes/midvunit.h @@ -40,12 +40,12 @@ public: midvunit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_nvram(*this, "nvram"), - m_ram_base(*this, "m_ram_base"), - m_fastram_base(*this, "m_fastram_base"), - m_tms32031_control(*this, "m_tms32031_control"), - m_midvplus_misc(*this, "m_midvplus_misc"), - m_videoram(*this, "m_videoram"), - m_textureram(*this, "m_textureram") { } + m_ram_base(*this, "ram_base"), + m_fastram_base(*this, "fastram_base"), + m_tms32031_control(*this, "tms32031_control"), + m_midvplus_misc(*this, "midvplus_misc"), + m_videoram(*this, "videoram"), + m_textureram(*this, "textureram") { } optional_shared_ptr m_nvram; required_shared_ptr m_ram_base; diff --git a/src/mame/includes/midxunit.h b/src/mame/includes/midxunit.h index 4f1d255b8ab..b8fd4986eeb 100644 --- a/src/mame/includes/midxunit.h +++ b/src/mame/includes/midxunit.h @@ -9,10 +9,11 @@ class midxunit_state : public midtunit_state public: midxunit_state(const machine_config &mconfig, device_type type, const char *tag) : midtunit_state(mconfig, type, tag), - m_nvram(*this, "nvram") { } + m_nvram(*this, "nvram"), + m_decode_memory(*this, "decode_memory", 16) { } required_shared_ptr m_nvram; - UINT8 *m_decode_memory; + required_shared_ptr m_decode_memory; UINT8 m_cmos_write_enable; UINT16 m_iodata[8]; UINT8 m_ioshuffle[16]; diff --git a/src/mame/includes/midyunit.h b/src/mame/includes/midyunit.h index de462b23695..962f582c61d 100644 --- a/src/mame/includes/midyunit.h +++ b/src/mame/includes/midyunit.h @@ -32,11 +32,11 @@ class midyunit_state : public driver_device public: midyunit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_gfx_rom(*this,"gfx_rom") { } + m_gfx_rom(*this, "gfx_rom", 16) { } UINT16 *m_cmos_ram; UINT32 m_cmos_page; - required_shared_ptr m_gfx_rom; + optional_shared_ptr m_gfx_rom; UINT16 m_prot_result; UINT16 m_prot_sequence[3]; UINT8 m_prot_index; diff --git a/src/mame/includes/model2.h b/src/mame/includes/model2.h index d3a83dca58c..eae9d2b89ca 100644 --- a/src/mame/includes/model2.h +++ b/src/mame/includes/model2.h @@ -30,7 +30,7 @@ public: required_shared_ptr m_textureram1; required_shared_ptr m_lumaram; required_shared_ptr m_soundram; - required_shared_ptr m_tgp_program; + optional_shared_ptr m_tgp_program; UINT32 m_intreq; UINT32 m_intena; diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h index aad92399ea5..32d859cd6fb 100644 --- a/src/mame/includes/mpu4.h +++ b/src/mame/includes/mpu4.h @@ -176,8 +176,8 @@ public: UINT8 m_m6809_acia_rts; UINT8 m_m6809_acia_dcd; int m_gfx_index; - required_shared_ptr m_vid_vidram; - required_shared_ptr m_vid_mainram; + optional_shared_ptr m_vid_vidram; + optional_shared_ptr m_vid_mainram; // UINT8 m_scn2674_IR[16]; UINT8 m_scn2674_IR_pointer; UINT8 m_scn2674_screen1_l; diff --git a/src/mame/includes/mystwarr.h b/src/mame/includes/mystwarr.h index 44e3dab2f45..ae4aef8d609 100644 --- a/src/mame/includes/mystwarr.h +++ b/src/mame/includes/mystwarr.h @@ -3,10 +3,12 @@ class mystwarr_state : public konamigx_state public: mystwarr_state(const machine_config &mconfig, device_type type, const char *tag) : konamigx_state(mconfig, type, tag), + m_gx_workram(*this,"gx_workram"), + m_spriteram(*this,"spriteram"), m_maincpu(*this,"maincpu") { } - UINT16 *m_gx_workram; + required_shared_ptr m_gx_workram; UINT8 m_mw_irq_control; int m_cur_sound_region; int m_layer_colorbase[6]; @@ -20,7 +22,7 @@ public: int m_roz_rombank; tilemap_t *m_ult_936_tilemap; UINT16 m_clip; - UINT16 *m_spriteram; + required_shared_ptr m_spriteram; required_device m_maincpu; DECLARE_READ16_MEMBER(eeprom_r); diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 85026e2eb18..15470a64d6d 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -29,7 +29,7 @@ public: required_device m_mcu; required_shared_ptr m_nvmem32; required_shared_ptr m_spritebank32; - required_shared_ptr m_tilebank32; + optional_shared_ptr m_tilebank32; required_shared_ptr m_namconb_shareram; UINT8 m_namconb_cpureg[32]; diff --git a/src/mame/includes/namcos21.h b/src/mame/includes/namcos21.h index 76a636c8474..651fc0353f3 100644 --- a/src/mame/includes/namcos21.h +++ b/src/mame/includes/namcos21.h @@ -39,10 +39,10 @@ public: optional_shared_ptr m_winrun_dspbios; optional_shared_ptr m_winrun_polydata; optional_shared_ptr m_winrun_gpucomram; - required_shared_ptr m_dspram16; + optional_shared_ptr m_dspram16; required_shared_ptr m_mpSharedRAM1; required_shared_ptr m_mpDualPortRAM; - required_shared_ptr m_master_dsp_code; + optional_shared_ptr m_master_dsp_code; UINT8 *m_videoram; UINT16 *m_winrun_dspcomram; diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index 389d46a520e..8a66d0f6e2a 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -49,7 +49,7 @@ public: m_tilemapattr(*this,"tilemapattr"), m_czram(*this,"czram") { } - required_shared_ptr m_spriteram; + optional_shared_ptr m_spriteram; required_shared_ptr m_shareram; required_shared_ptr m_system_controller; required_shared_ptr m_nvmem; @@ -59,9 +59,9 @@ public: required_shared_ptr m_textram; required_shared_ptr m_polygonram; required_shared_ptr m_gamma; - required_shared_ptr m_vics_data; - required_shared_ptr m_vics_control; - required_shared_ptr m_czattr; + optional_shared_ptr m_vics_data; + optional_shared_ptr m_vics_control; + optional_shared_ptr m_czattr; required_shared_ptr m_tilemapattr; optional_shared_ptr m_czram; diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h index 12ddc202572..fe2d3873206 100644 --- a/src/mame/includes/nemesis.h +++ b/src/mame/includes/nemesis.h @@ -28,7 +28,7 @@ public: required_shared_ptr m_colorram2; required_shared_ptr m_spriteram; required_shared_ptr m_paletteram; - required_shared_ptr m_gx400_shared_ram; + optional_shared_ptr m_gx400_shared_ram; /* video-related */ tilemap_t *m_background; diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h index ea8cd74922b..7808c4e788f 100644 --- a/src/mame/includes/ojankohs.h +++ b/src/mame/includes/ojankohs.h @@ -16,7 +16,7 @@ public: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_colorram; - required_shared_ptr m_paletteram; + optional_shared_ptr m_paletteram; /* video-related */ tilemap_t *m_tilemap; diff --git a/src/mame/includes/opwolf.h b/src/mame/includes/opwolf.h index eb35f8e4b69..093c4191004 100644 --- a/src/mame/includes/opwolf.h +++ b/src/mame/includes/opwolf.h @@ -12,7 +12,7 @@ public: m_cchip_ram(*this, "cchip_ram"){ } /* memory pointers */ - required_shared_ptr m_cchip_ram; + optional_shared_ptr m_cchip_ram; /* video-related */ UINT16 m_sprite_ctrl; diff --git a/src/mame/includes/pacman.h b/src/mame/includes/pacman.h index ca1c01d75a9..8d42af7bbf3 100644 --- a/src/mame/includes/pacman.h +++ b/src/mame/includes/pacman.h @@ -21,7 +21,7 @@ public: optional_shared_ptr m_spriteram2; optional_shared_ptr m_s2650_spriteram; required_shared_ptr m_videoram; - required_shared_ptr m_colorram; + optional_shared_ptr m_colorram; optional_shared_ptr m_s2650games_tileram; optional_shared_ptr m_rocktrv2_prot_data; diff --git a/src/mame/includes/pgm.h b/src/mame/includes/pgm.h index 0735c339d3c..777f97b6ac5 100644 --- a/src/mame/includes/pgm.h +++ b/src/mame/includes/pgm.h @@ -101,7 +101,8 @@ class pgm_arm_type1_state : public pgm_state { public: pgm_arm_type1_state(const machine_config &mconfig, device_type type, const char *tag) - : pgm_state(mconfig, type, tag) { + : pgm_state(mconfig, type, tag), + m_arm7_shareram(*this, "arm7_shareram") { m_curslots = 0; m_puzzli_54_trigger = 0; @@ -137,7 +138,7 @@ public: UINT16 m_pgm_arm_type1_highlatch_68k_w; UINT16 m_pgm_arm_type1_lowlatch_68k_w; UINT32 m_pgm_arm_type1_counter; - UINT32 * m_arm7_shareram; + required_shared_ptr m_arm7_shareram; cpu_device *m_prot; }; diff --git a/src/mame/includes/pktgaldx.h b/src/mame/includes/pktgaldx.h index ad4cc3cd238..dff06d35018 100644 --- a/src/mame/includes/pktgaldx.h +++ b/src/mame/includes/pktgaldx.h @@ -21,8 +21,8 @@ public: required_shared_ptr m_spriteram; // UINT16 * paletteram; // currently this uses generic palette handling (in decocomn.c) - required_shared_ptr m_pktgaldb_fgram; - required_shared_ptr m_pktgaldb_sprites; + optional_shared_ptr m_pktgaldb_fgram; + optional_shared_ptr m_pktgaldb_sprites; /* devices */ device_t *m_maincpu; diff --git a/src/mame/includes/playmark.h b/src/mame/includes/playmark.h index 0dd130513e3..2ca23d945c2 100644 --- a/src/mame/includes/playmark.h +++ b/src/mame/includes/playmark.h @@ -14,12 +14,12 @@ public: m_rowscroll(*this, "rowscroll"){ } /* memory pointers */ - required_shared_ptr m_bgvideoram; + optional_shared_ptr m_bgvideoram; required_shared_ptr m_videoram1; - required_shared_ptr m_videoram2; - required_shared_ptr m_videoram3; + optional_shared_ptr m_videoram2; + optional_shared_ptr m_videoram3; required_shared_ptr m_spriteram; - required_shared_ptr m_rowscroll; + optional_shared_ptr m_rowscroll; // UINT16 * m_paletteram; // currently this uses generic palette handling /* video-related */ diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h index f01fde31545..9e90453c056 100644 --- a/src/mame/includes/psikyo.h +++ b/src/mame/includes/psikyo.h @@ -20,7 +20,7 @@ public: required_shared_ptr m_vram_0; required_shared_ptr m_vram_1; required_shared_ptr m_vregs; - required_shared_ptr m_bootleg_spritebuffer; + optional_shared_ptr m_bootleg_spritebuffer; UINT32 * m_spritebuf1; UINT32 * m_spritebuf2; // UINT32 * m_paletteram; // currently this uses generic palette handling diff --git a/src/mame/includes/punchout.h b/src/mame/includes/punchout.h index ab1a9f4c736..c69866c6a12 100644 --- a/src/mame/includes/punchout.h +++ b/src/mame/includes/punchout.h @@ -21,7 +21,7 @@ public: required_shared_ptr m_spr1_videoram; required_shared_ptr m_spr2_videoram; required_shared_ptr m_bg_bot_videoram; - required_shared_ptr m_armwrest_fg_videoram; + optional_shared_ptr m_armwrest_fg_videoram; tilemap_t *m_bg_top_tilemap; tilemap_t *m_bg_bot_tilemap; tilemap_t *m_fg_tilemap; diff --git a/src/mame/includes/realbrk.h b/src/mame/includes/realbrk.h index 117895eee8a..2e878c60b47 100644 --- a/src/mame/includes/realbrk.h +++ b/src/mame/includes/realbrk.h @@ -19,9 +19,9 @@ public: required_shared_ptr m_vram_2; required_shared_ptr m_vregs; required_shared_ptr m_dsw_select; - required_shared_ptr m_backup_ram; - required_shared_ptr m_vram_0ras; - required_shared_ptr m_vram_1ras; + optional_shared_ptr m_backup_ram; + optional_shared_ptr m_vram_0ras; + optional_shared_ptr m_vram_1ras; bitmap_ind16 *m_tmpbitmap0; bitmap_ind16 *m_tmpbitmap1; int m_disable_video; diff --git a/src/mame/includes/rohga.h b/src/mame/includes/rohga.h index 23b4cf6f88f..3d3eb307cf8 100644 --- a/src/mame/includes/rohga.h +++ b/src/mame/includes/rohga.h @@ -40,8 +40,8 @@ public: optional_device m_spriteram2; /* memory pointers */ - required_shared_ptr m_pf1_rowscroll; - required_shared_ptr m_pf2_rowscroll; + optional_shared_ptr m_pf1_rowscroll; + optional_shared_ptr m_pf2_rowscroll; required_shared_ptr m_pf3_rowscroll; required_shared_ptr m_pf4_rowscroll; diff --git a/src/mame/includes/sauro.h b/src/mame/includes/sauro.h index 0629ec7a8dc..12ff1b06a97 100644 --- a/src/mame/includes/sauro.h +++ b/src/mame/includes/sauro.h @@ -12,8 +12,8 @@ public: required_shared_ptr m_spriteram; required_shared_ptr m_videoram; required_shared_ptr m_colorram; - required_shared_ptr m_videoram2; - required_shared_ptr m_colorram2; + optional_shared_ptr m_videoram2; + optional_shared_ptr m_colorram2; tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; diff --git a/src/mame/includes/seibuspi.h b/src/mame/includes/seibuspi.h index 389aa367bc0..b8fa1dddab7 100644 --- a/src/mame/includes/seibuspi.h +++ b/src/mame/includes/seibuspi.h @@ -10,7 +10,7 @@ public: m_spi_scrollram(*this, "spi_scrollram"), m_spimainram(*this, "spimainram"){ } - required_shared_ptr m_spi_scrollram; + optional_shared_ptr m_spi_scrollram; required_shared_ptr m_spimainram; intel_e28f008sa_device *m_flash[2]; diff --git a/src/mame/includes/seicross.h b/src/mame/includes/seicross.h index f34106c9779..37da1ca8dbf 100644 --- a/src/mame/includes/seicross.h +++ b/src/mame/includes/seicross.h @@ -15,7 +15,7 @@ public: required_shared_ptr m_row_scroll; required_shared_ptr m_spriteram2; required_shared_ptr m_colorram; - required_shared_ptr m_nvram; + optional_shared_ptr m_nvram; UINT8 m_portb; tilemap_t *m_bg_tilemap; diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index 098b58a8ebd..6dc2a4ac002 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -49,12 +49,12 @@ public: optional_shared_ptr m_sharedram; optional_shared_ptr m_workram; - required_shared_ptr m_vregs; - required_shared_ptr m_vram_0; - required_shared_ptr m_vctrl_0; - required_shared_ptr m_vram_2; - required_shared_ptr m_vctrl_2; - required_shared_ptr m_paletteram; + optional_shared_ptr m_vregs; + optional_shared_ptr m_vram_0; + optional_shared_ptr m_vctrl_0; + optional_shared_ptr m_vram_2; + optional_shared_ptr m_vctrl_2; + optional_shared_ptr m_paletteram; optional_shared_ptr m_paletteram2; optional_shared_ptr m_kiwame_nvram; optional_shared_ptr m_inttoote_key_select; diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index c7b4d16aeb8..41d4711b380 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -14,8 +14,8 @@ public: required_device m_maincpu; optional_shared_ptr m_nvram; - required_shared_ptr m_spriteram; - required_shared_ptr m_vregs; + optional_shared_ptr m_spriteram; + optional_shared_ptr m_vregs; optional_shared_ptr m_coldfire_regs; optional_shared_ptr m_funcube_outputs; diff --git a/src/mame/includes/shangkid.h b/src/mame/includes/shangkid.h index dc61a786b49..b92b7bdf620 100644 --- a/src/mame/includes/shangkid.h +++ b/src/mame/includes/shangkid.h @@ -8,10 +8,10 @@ public: m_videoreg(*this, "videoreg"){ } required_shared_ptr m_videoram; - required_shared_ptr m_spriteram; + optional_shared_ptr m_spriteram; UINT8 m_bbx_sound_enable; UINT8 m_sound_latch; - required_shared_ptr m_videoreg; + optional_shared_ptr m_videoreg; int m_gfx_type; tilemap_t *m_background; DECLARE_WRITE8_MEMBER(shangkid_maincpu_bank_w); diff --git a/src/mame/includes/slapfght.h b/src/mame/includes/slapfght.h index 6d48d0d2359..0a9bb319e26 100644 --- a/src/mame/includes/slapfght.h +++ b/src/mame/includes/slapfght.h @@ -29,11 +29,11 @@ public: int m_getstar_id; required_shared_ptr m_slapfight_videoram; required_shared_ptr m_slapfight_colorram; - required_shared_ptr m_slapfight_fixvideoram; - required_shared_ptr m_slapfight_fixcolorram; - required_shared_ptr m_slapfight_scrollx_lo; - required_shared_ptr m_slapfight_scrollx_hi; - required_shared_ptr m_slapfight_scrolly; + optional_shared_ptr m_slapfight_fixvideoram; + optional_shared_ptr m_slapfight_fixcolorram; + optional_shared_ptr m_slapfight_scrollx_lo; + optional_shared_ptr m_slapfight_scrollx_hi; + optional_shared_ptr m_slapfight_scrolly; int m_slapfight_status; int m_getstar_sequence_index; int m_getstar_sh_intenabled; diff --git a/src/mame/includes/snowbros.h b/src/mame/includes/snowbros.h index d84e268d168..afe9f1d668a 100644 --- a/src/mame/includes/snowbros.h +++ b/src/mame/includes/snowbros.h @@ -9,7 +9,7 @@ public: m_bootleg_spriteram16(*this, "spriteram16b"), m_maincpu(*this,"maincpu"){ } - required_shared_ptr m_hyperpac_ram; + optional_shared_ptr m_hyperpac_ram; int m_sb3_music_is_playing; int m_sb3_music; UINT8 m_semicom_prot_offset; diff --git a/src/mame/includes/splash.h b/src/mame/includes/splash.h index 4578cd0614a..86e6dade561 100644 --- a/src/mame/includes/splash.h +++ b/src/mame/includes/splash.h @@ -14,8 +14,8 @@ public: required_shared_ptr m_videoram; required_shared_ptr m_vregs; required_shared_ptr m_spriteram; - required_shared_ptr m_protdata; - required_shared_ptr m_bitmap_mode; + optional_shared_ptr m_protdata; + optional_shared_ptr m_bitmap_mode; int m_bitmap_type; int m_sprite_attr2_shift; diff --git a/src/mame/includes/sshangha.h b/src/mame/includes/sshangha.h index e0e10f3b3e9..18b9c5c5691 100644 --- a/src/mame/includes/sshangha.h +++ b/src/mame/includes/sshangha.h @@ -30,7 +30,7 @@ public: required_shared_ptr m_sprite_paletteram2; required_shared_ptr m_tile_paletteram1; - required_shared_ptr m_prot_data; + optional_shared_ptr m_prot_data; int m_video_control; diff --git a/src/mame/includes/sslam.h b/src/mame/includes/sslam.h index 26dc1297c71..e38b30700de 100644 --- a/src/mame/includes/sslam.h +++ b/src/mame/includes/sslam.h @@ -18,8 +18,8 @@ public: int m_snd_bank; required_shared_ptr m_bg_tileram; - required_shared_ptr m_md_tileram; - required_shared_ptr m_tx_tileram; + optional_shared_ptr m_md_tileram; + optional_shared_ptr m_tx_tileram; required_shared_ptr m_regs; required_shared_ptr m_spriteram; diff --git a/src/mame/includes/ssv.h b/src/mame/includes/ssv.h index 80759ac3fe4..adb041f2823 100644 --- a/src/mame/includes/ssv.h +++ b/src/mame/includes/ssv.h @@ -24,11 +24,11 @@ public: required_shared_ptr m_paletteram; required_shared_ptr m_scroll; required_shared_ptr m_irq_vectors; - required_shared_ptr m_gdfs_tmapram; - required_shared_ptr m_gdfs_tmapscroll; - required_shared_ptr m_spriteram2; - required_shared_ptr m_gdfs_blitram; - required_shared_ptr m_input_sel; + optional_shared_ptr m_gdfs_tmapram; + optional_shared_ptr m_gdfs_tmapscroll; + optional_shared_ptr m_spriteram2; + optional_shared_ptr m_gdfs_blitram; + optional_shared_ptr m_input_sel; int m_tile_code[16]; diff --git a/src/mame/includes/suna16.h b/src/mame/includes/suna16.h index 7dfc7a1f683..b9a93d2950f 100644 --- a/src/mame/includes/suna16.h +++ b/src/mame/includes/suna16.h @@ -9,7 +9,7 @@ public: required_device m_maincpu; required_shared_ptr m_spriteram; - required_shared_ptr m_spriteram2; + optional_shared_ptr m_spriteram2; UINT16 m_prot; UINT16 *m_paletteram; diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h index 3c73172f20a..230a2560547 100644 --- a/src/mame/includes/superqix.h +++ b/src/mame/includes/superqix.h @@ -12,8 +12,8 @@ public: required_device m_maincpu; required_shared_ptr m_spriteram; required_shared_ptr m_videoram; - required_shared_ptr m_bitmapram; - required_shared_ptr m_bitmapram2; + optional_shared_ptr m_bitmapram; + optional_shared_ptr m_bitmapram2; INT16 *m_samplebuf; UINT8 m_port1; diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h index 3d146ccdd12..8842305c48d 100644 --- a/src/mame/includes/system16.h +++ b/src/mame/includes/system16.h @@ -14,11 +14,11 @@ public: m_goldnaxeb2_fgpage(*this, "gab2_fgpage"){ } required_shared_ptr m_textram; - required_shared_ptr m_bg0_tileram; - required_shared_ptr m_bg1_tileram; + optional_shared_ptr m_bg0_tileram; + optional_shared_ptr m_bg1_tileram; required_shared_ptr m_tileram; - required_shared_ptr m_goldnaxeb2_bgpage; - required_shared_ptr m_goldnaxeb2_fgpage; + optional_shared_ptr m_goldnaxeb2_bgpage; + optional_shared_ptr m_goldnaxeb2_fgpage; UINT16 m_coinctrl; diff --git a/src/mame/includes/taito_b.h b/src/mame/includes/taito_b.h index bbc4b88491d..c54baaf52b8 100644 --- a/src/mame/includes/taito_b.h +++ b/src/mame/includes/taito_b.h @@ -9,7 +9,7 @@ public: /* memory pointers */ required_shared_ptr m_spriteram; - required_shared_ptr m_pixelram; + optional_shared_ptr m_pixelram; // UINT16 * m_paletteram; // this currently uses generic palette handlers /* video-related */ diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index 19cd8a485a2..03af860bf53 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -21,11 +21,11 @@ public: m_oki(*this, "oki") { } /* memory pointers */ - required_shared_ptr m_sprite_extension; + optional_shared_ptr m_sprite_extension; required_shared_ptr m_spriteram; UINT16 * m_spriteram_buffered; UINT16 * m_spriteram_delayed; - required_shared_ptr m_cchip2_ram; // for megablst only + optional_shared_ptr m_cchip2_ram; // for megablst only // UINT16 * m_paletteram; // currently this uses generic palette handling diff --git a/src/mame/includes/taitojc.h b/src/mame/includes/taitojc.h index 49fed144b38..5d0ef893e61 100644 --- a/src/mame/includes/taitojc.h +++ b/src/mame/includes/taitojc.h @@ -46,7 +46,7 @@ public: poly_manager *m_poly; - required_shared_ptr m_f3_shared_ram; + optional_shared_ptr m_f3_shared_ram; required_shared_ptr m_main_ram; required_shared_ptr m_dsp_shared_ram; required_shared_ptr m_palette_ram; diff --git a/src/mame/includes/tatsumi.h b/src/mame/includes/tatsumi.h index cd8497d6787..84acd9c2f6d 100644 --- a/src/mame/includes/tatsumi.h +++ b/src/mame/includes/tatsumi.h @@ -33,21 +33,21 @@ public: UINT8 *m_rom_sprite_lookup2; UINT8 *m_rom_clut0; UINT8 *m_rom_clut1; - required_shared_ptr m_roundup5_d0000_ram; - required_shared_ptr m_roundup5_e0000_ram; - required_shared_ptr m_roundup5_unknown0; - required_shared_ptr m_roundup5_unknown1; - required_shared_ptr m_roundup5_unknown2; + optional_shared_ptr m_roundup5_d0000_ram; + optional_shared_ptr m_roundup5_e0000_ram; + optional_shared_ptr m_roundup5_unknown0; + optional_shared_ptr m_roundup5_unknown1; + optional_shared_ptr m_roundup5_unknown2; required_shared_ptr m_68k_ram; required_shared_ptr m_apache3_z80_ram; UINT16 m_control_word; UINT16 m_apache3_rotate_ctrl[12]; required_shared_ptr m_sprite_control_ram; - required_shared_ptr m_cyclwarr_videoram0; - required_shared_ptr m_cyclwarr_videoram1; - required_shared_ptr m_roundup_r_ram; - required_shared_ptr m_roundup_p_ram; - required_shared_ptr m_roundup_l_ram; + optional_shared_ptr m_cyclwarr_videoram0; + optional_shared_ptr m_cyclwarr_videoram1; + optional_shared_ptr m_roundup_r_ram; + optional_shared_ptr m_roundup_p_ram; + optional_shared_ptr m_roundup_l_ram; UINT16 m_last_control; UINT8 m_apache3_adc; int m_apache3_rot_idx; diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h index d543aad81df..2b19dd53511 100644 --- a/src/mame/includes/tmnt.h +++ b/src/mame/includes/tmnt.h @@ -12,9 +12,9 @@ public: /* memory pointers */ required_shared_ptr m_spriteram; - required_shared_ptr m_tmnt2_rom; - required_shared_ptr m_sunset_104000; - required_shared_ptr m_tmnt2_1c0800; + optional_shared_ptr m_tmnt2_rom; + optional_shared_ptr m_sunset_104000; + optional_shared_ptr m_tmnt2_1c0800; // UINT16 * m_paletteram; // currently this uses generic palette handling // UINT8 * m_nvram; // currently cuebrick uses generic nvram handling // UINT8 * m_cuebrick_nvram; diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index 5c7945e8a10..8e48e936778 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -29,8 +29,8 @@ public: gp9001vdp_device* m_vdp0; gp9001vdp_device* m_vdp1; - required_shared_ptr m_shared_ram; // 8 bit RAM shared between 68K and sound CPU - required_shared_ptr m_shared_ram16; // Really 8 bit RAM connected to Z180 + optional_shared_ptr m_shared_ram; // 8 bit RAM shared between 68K and sound CPU + optional_shared_ptr m_shared_ram16; // Really 8 bit RAM connected to Z180 device_t *m_main_cpu; device_t *m_sub_cpu; @@ -43,11 +43,11 @@ public: UINT8 m_sndirq_line; /* IRQ4 for batrider, IRQ2 for bbakraid */ UINT8 m_z80_busreq; - required_shared_ptr m_txvideoram16; - required_shared_ptr m_txvideoram16_offs; - required_shared_ptr m_txscrollram16; - required_shared_ptr m_tx_gfxram16; - required_shared_ptr m_mainram16; + optional_shared_ptr m_txvideoram16; + optional_shared_ptr m_txvideoram16_offs; + optional_shared_ptr m_txscrollram16; + optional_shared_ptr m_tx_gfxram16; + optional_shared_ptr m_mainram16; bitmap_ind8 m_custom_priority_bitmap; diff --git a/src/mame/includes/toobin.h b/src/mame/includes/toobin.h index 1f8d0169cc6..0ee6ca334fd 100644 --- a/src/mame/includes/toobin.h +++ b/src/mame/includes/toobin.h @@ -10,9 +10,10 @@ class toobin_state : public atarigen_state { public: toobin_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) { } + : atarigen_state(mconfig, type, tag), + m_interrupt_scan(*this, "interrupt_scan") { } - UINT16 * m_interrupt_scan; + required_shared_ptr m_interrupt_scan; double m_brightness; bitmap_ind16 m_pfbitmap; diff --git a/src/mame/includes/tsamurai.h b/src/mame/includes/tsamurai.h index 30891e2066b..d48720deb83 100644 --- a/src/mame/includes/tsamurai.h +++ b/src/mame/includes/tsamurai.h @@ -14,8 +14,8 @@ public: int m_sound_command3; int m_vsgongf_sound_nmi_enabled; required_shared_ptr m_videoram; - required_shared_ptr m_colorram; - required_shared_ptr m_bg_videoram; + optional_shared_ptr m_colorram; + optional_shared_ptr m_bg_videoram; int m_bgcolor; int m_textbank1; int m_textbank2; diff --git a/src/mame/includes/tubep.h b/src/mame/includes/tubep.h index 975fb66968f..01d11d918a7 100644 --- a/src/mame/includes/tubep.h +++ b/src/mame/includes/tubep.h @@ -16,7 +16,7 @@ public: required_shared_ptr m_textram; required_shared_ptr m_backgroundram; required_shared_ptr m_sprite_colorsharedram; - required_shared_ptr m_rjammer_backgroundram; + optional_shared_ptr m_rjammer_backgroundram; UINT8 *m_spritemap; UINT8 m_prom2[32]; UINT32 m_romD_addr; diff --git a/src/mame/includes/tumbleb.h b/src/mame/includes/tumbleb.h index c09c54587c4..798d19dbed0 100644 --- a/src/mame/includes/tumbleb.h +++ b/src/mame/includes/tumbleb.h @@ -11,11 +11,11 @@ public: m_control(*this, "control"){ } /* memory pointers */ - required_shared_ptr m_mainram; + optional_shared_ptr m_mainram; required_shared_ptr m_spriteram; required_shared_ptr m_pf1_data; required_shared_ptr m_pf2_data; - required_shared_ptr m_control; + optional_shared_ptr m_control; // UINT16 * m_paletteram; // currently this uses generic palette handling /* misc */ diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h index ef937df614e..d1a487d055e 100644 --- a/src/mame/includes/twin16.h +++ b/src/mame/includes/twin16.h @@ -14,8 +14,8 @@ public: required_device m_spriteram; required_shared_ptr m_text_ram; required_shared_ptr m_videoram; - required_shared_ptr m_tile_gfx_ram; - required_shared_ptr m_sprite_gfx_ram; + optional_shared_ptr m_tile_gfx_ram; + optional_shared_ptr m_sprite_gfx_ram; UINT16 m_CPUA_register; UINT16 m_CPUB_register; diff --git a/src/mame/includes/twincobr.h b/src/mame/includes/twincobr.h index dae7346e8af..022e96901f1 100644 --- a/src/mame/includes/twincobr.h +++ b/src/mame/includes/twincobr.h @@ -18,7 +18,7 @@ public: int m_toaplan_main_cpu; int m_wardner_membank; - required_shared_ptr m_sharedram; + optional_shared_ptr m_sharedram; INT32 m_fg_rom_bank; INT32 m_bg_ram_bank; INT32 m_wardner_sprite_hack; diff --git a/src/mame/includes/undrfire.h b/src/mame/includes/undrfire.h index e6238f755ff..c3e2d24b766 100644 --- a/src/mame/includes/undrfire.h +++ b/src/mame/includes/undrfire.h @@ -20,8 +20,8 @@ public: UINT16 m_coin_word; UINT16 m_port_sel; int m_frame_counter; - required_shared_ptr m_ram; - required_shared_ptr m_shared_ram; + optional_shared_ptr m_ram; + optional_shared_ptr m_shared_ram; struct tempsprite *m_spritelist; UINT16 m_rotate_ctrl[8]; UINT8 m_dislayer[6]; diff --git a/src/mame/includes/unico.h b/src/mame/includes/unico.h index 8a174c610eb..af28507e1ee 100644 --- a/src/mame/includes/unico.h +++ b/src/mame/includes/unico.h @@ -11,8 +11,8 @@ public: required_shared_ptr m_vram; required_shared_ptr m_scroll; - required_shared_ptr m_vram32; - required_shared_ptr m_scroll32; + optional_shared_ptr m_vram32; + optional_shared_ptr m_scroll32; tilemap_t *m_tilemap[3]; int m_sprites_scrolldx; int m_sprites_scrolldy; diff --git a/src/mame/includes/vsnes.h b/src/mame/includes/vsnes.h index 69ec774dd19..2c5c518ba54 100644 --- a/src/mame/includes/vsnes.h +++ b/src/mame/includes/vsnes.h @@ -7,7 +7,7 @@ public: m_work_ram_1(*this, "work_ram_1"){ } required_shared_ptr m_work_ram; - required_shared_ptr m_work_ram_1; + optional_shared_ptr m_work_ram_1; int m_coin; int m_do_vrom_bank; int m_input_latch[4]; diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index a0f708ad664..c68d70c80e6 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -8,8 +8,8 @@ public: m_geebee_videoram(*this, "geebee_videoram"), m_videoram(*this, "videoram"){ } - required_shared_ptr m_geebee_videoram; - required_shared_ptr m_videoram; + optional_shared_ptr m_geebee_videoram; + optional_shared_ptr m_videoram; int m_geebee_bgw; int m_ball_on; int m_ball_h; diff --git a/src/mame/includes/wecleman.h b/src/mame/includes/wecleman.h index 89f77bbc8da..b97fabf1bb4 100644 --- a/src/mame/includes/wecleman.h +++ b/src/mame/includes/wecleman.h @@ -15,7 +15,7 @@ public: required_shared_ptr m_protection_ram; required_shared_ptr m_blitter_regs; required_shared_ptr m_pageram; - required_shared_ptr m_txtram; + optional_shared_ptr m_txtram; required_shared_ptr m_spriteram; required_shared_ptr m_roadram; diff --git a/src/mame/includes/xmen.h b/src/mame/includes/xmen.h index 103f92c23f9..0e9cb37a9a8 100644 --- a/src/mame/includes/xmen.h +++ b/src/mame/includes/xmen.h @@ -20,10 +20,10 @@ public: /* for xmen6p */ bitmap_ind16 *m_screen_right; bitmap_ind16 *m_screen_left; - required_shared_ptr m_xmen6p_spriteramleft; - required_shared_ptr m_xmen6p_spriteramright; - required_shared_ptr m_xmen6p_tilemapleft; - required_shared_ptr m_xmen6p_tilemapright; + optional_shared_ptr m_xmen6p_spriteramleft; + optional_shared_ptr m_xmen6p_spriteramright; + optional_shared_ptr m_xmen6p_tilemapleft; + optional_shared_ptr m_xmen6p_tilemapright; UINT16 * m_k053247_ram; /* misc */ diff --git a/src/mame/includes/zaxxon.h b/src/mame/includes/zaxxon.h index dfa8b380844..f169361d536 100644 --- a/src/mame/includes/zaxxon.h +++ b/src/mame/includes/zaxxon.h @@ -15,7 +15,7 @@ public: required_shared_ptr m_videoram; optional_shared_ptr m_spriteram; - required_shared_ptr m_colorram; + optional_shared_ptr m_colorram; UINT8 m_int_enabled; UINT8 m_coin_status[3]; diff --git a/src/mame/machine/atarigen.c b/src/mame/machine/atarigen.c index 26020f774d2..0d3a7b7a414 100644 --- a/src/mame/machine/atarigen.c +++ b/src/mame/machine/atarigen.c @@ -117,7 +117,7 @@ void atarigen_init(running_machine &machine) /* allocate timers for all screens */ screen_device_iterator iter(machine.root_device()); - assert(iter.count() < ARRAY_LENGTH(state->m_screen_timer)); + assert(iter.count() <= ARRAY_LENGTH(state->m_screen_timer)); for (i = 0, screen = iter.first(); screen != NULL; i++, screen = iter.next()) { state->m_screen_timer[i].screen = screen; diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h index 3a5db7a6972..9c26cba0522 100644 --- a/src/mame/machine/atarigen.h +++ b/src/mame/machine/atarigen.h @@ -106,6 +106,8 @@ public: m_alpha2(*this, "alpha2"), m_xscroll(*this, "xscroll"), m_yscroll(*this, "yscroll"), + m_playfield32(*this, "playfield32"), + m_alpha32(*this, "alpha32"), m_atarivc_data(*this, "atarivc_data"), m_atarivc_eof_data(*this, "atarivc_eof_data") { } @@ -143,8 +145,8 @@ public: optional_shared_ptr m_xscroll; optional_shared_ptr m_yscroll; - UINT32 * m_playfield32; - UINT32 * m_alpha32; + optional_shared_ptr m_playfield32; + optional_shared_ptr m_alpha32; tilemap_t * m_playfield_tilemap; tilemap_t * m_playfield2_tilemap; diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c index cfa36067b3a..4a1ded55037 100644 --- a/src/mame/machine/harddriv.c +++ b/src/mame/machine/harddriv.c @@ -61,7 +61,7 @@ MACHINE_START( harddriv ) /* predetermine memory regions */ state->m_sim_memory = (UINT16 *)machine.region("user1")->base(); state->m_sim_memory_size = machine.region("user1")->bytes() / 2; - state->m_adsp_pgm_memory_word = (UINT16 *)((UINT8 *)state->m_adsp_pgm_memory + 1); + state->m_adsp_pgm_memory_word = (UINT16 *)(reinterpret_cast(state->m_adsp_pgm_memory.target()) + 1); } diff --git a/src/mame/machine/pgmprot1.c b/src/mame/machine/pgmprot1.c index b93a1014498..eac94f136fb 100644 --- a/src/mame/machine/pgmprot1.c +++ b/src/mame/machine/pgmprot1.c @@ -118,7 +118,7 @@ static WRITE16_HANDLER( pgm_arm7_type1_68k_protlatch_w ) static READ16_HANDLER( pgm_arm7_type1_ram_r ) { pgm_arm_type1_state *state = space->machine().driver_data(); - UINT16 *share16 = (UINT16 *)state->m_arm7_shareram; + UINT16 *share16 = reinterpret_cast(state->m_arm7_shareram.target()); if (PGMARM7LOGERROR) logerror("M68K: ARM7 Shared RAM Read: %04x = %04x (%08x) (%06x)\n", BYTE_XOR_LE(offset), share16[BYTE_XOR_LE(offset)], mem_mask, cpu_get_pc(&space->device())); @@ -128,7 +128,7 @@ static READ16_HANDLER( pgm_arm7_type1_ram_r ) static WRITE16_HANDLER( pgm_arm7_type1_ram_w ) { pgm_arm_type1_state *state = space->machine().driver_data(); - UINT16 *share16 = (UINT16 *)state->m_arm7_shareram; + UINT16 *share16 = reinterpret_cast(state->m_arm7_shareram.target()); if (PGMARM7LOGERROR) logerror("M68K: ARM7 Shared RAM Write: %04x = %04x (%04x) (%06x)\n", BYTE_XOR_LE(offset), data, mem_mask, cpu_get_pc(&space->device())); @@ -277,7 +277,7 @@ static READ16_HANDLER( kovsh_fake_region_r ) if (regionhack != 0xff) return regionhack; offset = 0x4; - UINT16 *share16 = (UINT16 *)state->m_arm7_shareram; + UINT16 *share16 = reinterpret_cast(state->m_arm7_shareram.target()); return share16[BYTE_XOR_LE(offset << 1)]; } diff --git a/src/mame/video/beathead.c b/src/mame/video/beathead.c index c961bc90d50..8b9e9757909 100644 --- a/src/mame/video/beathead.c +++ b/src/mame/video/beathead.c @@ -156,7 +156,7 @@ WRITE32_MEMBER( beathead_state::hsync_ram_w ) UINT32 beathead_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 *videoram = reinterpret_cast(m_videoram); + UINT8 *videoram = reinterpret_cast(m_videoram.target()); int x, y; /* generate the final screen */ diff --git a/src/mame/video/harddriv.c b/src/mame/video/harddriv.c index 673a8088895..d9e656811e4 100644 --- a/src/mame/video/harddriv.c +++ b/src/mame/video/harddriv.c @@ -85,7 +85,7 @@ VIDEO_START( harddriv ) } /* init VRAM pointers */ - state->m_vram_mask = state->m_gsp_vram_size - 1; + state->m_vram_mask = state->m_gsp_vram.bytes() - 1; } diff --git a/src/mame/video/itech8.c b/src/mame/video/itech8.c index 57e94586d60..69ed3ec8501 100644 --- a/src/mame/video/itech8.c +++ b/src/mame/video/itech8.c @@ -305,12 +305,12 @@ static void perform_blit(address_space *space) if (FULL_LOGGING) logerror("Blit: scan=%d src=%06x @ (%05x) for %dx%d ... flags=%02x\n", space->machine().primary_screen->vpos(), - (*state->m_grom_bank << 16) | (BLITTER_ADDRHI << 8) | BLITTER_ADDRLO, + (state->m_grom_bank << 16) | (BLITTER_ADDRHI << 8) | BLITTER_ADDRLO, tms_state.regs[TMS34061_XYADDRESS] | ((tms_state.regs[TMS34061_XYOFFSET] & 0x300) << 8), BLITTER_WIDTH, BLITTER_HEIGHT, BLITTER_FLAGS); /* initialize the fetcher */ - state->m_fetch_offset = (*state->m_grom_bank << 16) | (BLITTER_ADDRHI << 8) | BLITTER_ADDRLO; + state->m_fetch_offset = (state->m_grom_bank << 16) | (BLITTER_ADDRHI << 8) | BLITTER_ADDRLO; state->m_fetch_rle_count = 0; /* RLE starts with a couple of extra 0's */ @@ -484,7 +484,7 @@ WRITE8_MEMBER(itech8_state::itech8_blitter_w) { logerror("Blit: XY=%1X%04X SRC=%02X%02X%02X SIZE=%3dx%3d FLAGS=%02x", (tms_state.regs[TMS34061_XYOFFSET] >> 8) & 0x0f, tms_state.regs[TMS34061_XYADDRESS], - *m_grom_bank, blitter_data[0], blitter_data[1], + m_grom_bank, blitter_data[0], blitter_data[1], blitter_data[4], blitter_data[5], blitter_data[2]); logerror(" %02X %02X %02X [%02X] %02X %02X %02X [%02X]-%02X %02X %02X %02X [%02X %02X %02X %02X]\n", diff --git a/src/mame/video/mcr3.c b/src/mame/video/mcr3.c index 895b9b26861..2635ea6887b 100644 --- a/src/mame/video/mcr3.c +++ b/src/mame/video/mcr3.c @@ -210,7 +210,7 @@ static void mcr3_update_sprites(running_machine &machine, bitmap_ind16 &bitmap, machine.priority_bitmap.fill(1, cliprect); /* loop over sprite RAM */ - for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4) + for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4) { int code, color, flipx, flipy, sx, sy, flags;