From 1f685be195d042f84755e70318b8d1a23f515276 Mon Sep 17 00:00:00 2001 From: "therealmogminer@gmail.com" Date: Sun, 29 Nov 2015 23:56:22 +0100 Subject: [PATCH] More this==NULL stuff --- src/devices/sound/c140.cpp | 2 +- src/devices/sound/namco.cpp | 8 ++------ src/devices/sound/scsp.cpp | 10 +++++----- src/devices/sound/scsp.h | 2 +- src/devices/sound/tms5110.cpp | 4 ++-- src/devices/sound/upd7759.cpp | 2 +- src/devices/sound/ymf271.cpp | 3 +-- src/mame/includes/btime.h | 1 - src/mame/includes/cps3.h | 1 - src/mame/video/sega16sp.cpp | 2 +- 10 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp index bc8c17babd8..907d09a85e9 100644 --- a/src/devices/sound/c140.cpp +++ b/src/devices/sound/c140.cpp @@ -95,7 +95,7 @@ c140_device::c140_device(const machine_config &mconfig, const char *tag, device_ , m_mixer_buffer_left(nullptr), , m_mixer_buffer_right(nullptr), , m_baserate(0), - , m_rom_region(*this, tag) + , m_rom_region(*this, this->tag()) , m_pRom(nullptr) { memset(m_REG, 0, sizeof(UINT8)*0x200); diff --git a/src/devices/sound/namco.cpp b/src/devices/sound/namco.cpp index cc71d81ab16..13ef8ea1851 100644 --- a/src/devices/sound/namco.cpp +++ b/src/devices/sound/namco.cpp @@ -38,7 +38,7 @@ const device_type NAMCO_CUS30 = &device_creator; namco_audio_device::namco_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__), , device_sound_interface(mconfig, *this) - , m_wave_region(*this, tag) + , m_wave_region(*this, this->tag()) , m_last_channel(nullptr) , m_soundregs(nullptr) , m_wavedata(nullptr) @@ -110,11 +110,7 @@ void namco_audio_device::device_start() /* register with the save state system */ save_pointer(NAME(m_soundregs), 0x400); -<<<<<<< HEAD - if (region() == nullptr) -======= - if (m_wave_region == NULL) ->>>>>>> Yet more this==NULL fixes + if (m_wave_region == nullptr) save_pointer(NAME(m_wavedata), 0x400); save_item(NAME(m_voices)); diff --git a/src/devices/sound/scsp.cpp b/src/devices/sound/scsp.cpp index ac4020852af..bfa48f599d4 100644 --- a/src/devices/sound/scsp.cpp +++ b/src/devices/sound/scsp.cpp @@ -149,7 +149,7 @@ scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_ m_roffset(0), m_irq_cb(*this), m_main_irq_cb(*this), - m_ram_region(*this, tag), + m_ram_region(*this, this->tag()), m_BUFPTR(0), m_SCSPRAM(nullptr), m_SCSPRAM_LENGTH(0), @@ -503,17 +503,17 @@ void scsp_device::init() SCSPDSP_Init(&m_DSP); m_IrqTimA = m_IrqTimBC = m_IrqMidi = 0; - m_MidiR=m_MidiW=0; - m_MidiOutR=m_MidiOutW=0; + m_MidiR=m_MidiW = 0; + m_MidiOutR = m_MidiOutW = 0; // get SCSP RAM if (strcmp(tag(), ":scsp") == 0 || strcmp(tag(), ":scsp1") == 0) { - m_Master=1; + m_Master = 1; } else { - m_Master=0; + m_Master = 0; } if (m_ram_region) diff --git a/src/devices/sound/scsp.h b/src/devices/sound/scsp.h index 1ad46c7028d..360d2498c7e 100644 --- a/src/devices/sound/scsp.h +++ b/src/devices/sound/scsp.h @@ -104,7 +104,7 @@ private: int m_roffset; /* offset in the region */ devcb_write8 m_irq_cb; /* irq callback */ devcb_write_line m_main_irq_cb; - optional_memory_region m_ram_region; + required_memory_region m_ram_region; union { diff --git a/src/devices/sound/tms5110.cpp b/src/devices/sound/tms5110.cpp index 6ac5628f135..26573ec2f4c 100644 --- a/src/devices/sound/tms5110.cpp +++ b/src/devices/sound/tms5110.cpp @@ -1537,7 +1537,7 @@ const device_type TMS5110 = &device_creator; tms5110_device::tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, TMS5110, "TMS5110", tag, owner, clock, "tms5110", __FILE__), , device_sound_interface(mconfig, *this) - , m_table_region(*this, tag) + , m_table_region(*this, this->tag()) , m_m0_cb(*this) , m_m1_cb(*this) , m_addr_cb(*this) @@ -1549,7 +1549,7 @@ tms5110_device::tms5110_device(const machine_config &mconfig, const char *tag, d tms5110_device::tms5110_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source) , device_sound_interface(mconfig, *this) - , m_table_region(*this, tag) + , m_table_region(*this, this->tag()) , m_m0_cb(*this) , m_m1_cb(*this) , m_addr_cb(*this) diff --git a/src/devices/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp index d5727b6464d..12b17faa20a 100644 --- a/src/devices/sound/upd7759.cpp +++ b/src/devices/sound/upd7759.cpp @@ -171,7 +171,7 @@ upd775x_device::upd775x_device(const machine_config &mconfig, device_type type, , m_adpcm_state(0) , m_adpcm_data(0) , m_sample(0) - , m_rom_region(*this, tag) + , m_rom_region(*this, this->tag()) , m_rom(nullptr) , m_rombase(nullptr) , m_romoffset(0) diff --git a/src/devices/sound/ymf271.cpp b/src/devices/sound/ymf271.cpp index d03e4026020..7a4b5bf2c70 100644 --- a/src/devices/sound/ymf271.cpp +++ b/src/devices/sound/ymf271.cpp @@ -1749,7 +1749,6 @@ void ymf271_device::device_reset() const device_type YMF271 = &device_creator; -<<<<<<< HEAD ymf271_device::ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, YMF271, "YMF271", tag, owner, clock, "ymf271", __FILE__) , device_sound_interface(mconfig, *this) @@ -1766,7 +1765,7 @@ ymf271_device::ymf271_device(const machine_config &mconfig, const char *tag, dev , m_irq_handler(*this) , m_ext_read_handler(*this) , m_ext_write_handler(*this) - , m_mem_region(*this, tag) + , m_mem_region(*this, this->tag()) , m_clock(0) , m_timA(nullptr) , m_timB(nullptr) diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index 3c9ddb7f2ba..92331e41f83 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -9,7 +9,6 @@ class btime_state : public driver_device { public: -<<<<<<< HEAD btime_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_rambase(*this, "rambase") diff --git a/src/mame/includes/cps3.h b/src/mame/includes/cps3.h index fda7f55da2c..aae60770749 100644 --- a/src/mame/includes/cps3.h +++ b/src/mame/includes/cps3.h @@ -14,7 +14,6 @@ class cps3_state : public driver_device { public: -<<<<<<< HEAD cps3_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") diff --git a/src/mame/video/sega16sp.cpp b/src/mame/video/sega16sp.cpp index cc5ad338608..115a3967ea7 100644 --- a/src/mame/video/sega16sp.cpp +++ b/src/mame/video/sega16sp.cpp @@ -826,7 +826,7 @@ void bootleg_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &c sega_sys16b_sprite_device::sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : sega_16bit_sprite_device(mconfig, SEGA_SYS16B_SPRITES, "Sega System 16B Sprites", tag, owner, "sega_16bit_sprite", __FILE__) - , m_sprite_region(*this, tag) + , m_sprite_region(*this, this->tag()) { set_local_origin(184, 0x00, -184, 0); }