diff options
author | 2015-12-17 11:10:30 +0100 | |
---|---|---|
committer | 2015-12-17 11:10:30 +0100 | |
commit | 174720a64ddeed98078139dc0e4dd7aed15f91d4 (patch) | |
tree | b22e4fb4f1a210751cadc5aa01d73113b8e9857f /src/devices/bus | |
parent | be38cd71bb958d651ba91db8db439edc9c31b21e (diff) |
removed auto_bitmap_ind*_alloc and auto_bitmap_rgb32_alloc and replaced with std::unique_ptr (nw)
auto_alloc_array to unique_ptr
Added make_unique_clear
Diffstat (limited to 'src/devices/bus')
-rw-r--r-- | src/devices/bus/cpc/mface2.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/cpc/mface2.h | 2 | ||||
-rw-r--r-- | src/devices/bus/iq151/minigraf.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/iq151/minigraf.h | 2 | ||||
-rw-r--r-- | src/devices/bus/iq151/ms151a.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/iq151/ms151a.h | 2 | ||||
-rw-r--r-- | src/devices/bus/isa/aga.cpp | 24 | ||||
-rw-r--r-- | src/devices/bus/isa/aga.h | 2 | ||||
-rw-r--r-- | src/devices/bus/isa/mda.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/isa/mda.h | 2 | ||||
-rw-r--r-- | src/devices/bus/isa/pgc.cpp | 10 | ||||
-rw-r--r-- | src/devices/bus/isa/pgc.h | 6 | ||||
-rw-r--r-- | src/devices/bus/macpds/pds_tpdfpd.cpp | 8 | ||||
-rw-r--r-- | src/devices/bus/macpds/pds_tpdfpd.h | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/disksys.cpp | 4 | ||||
-rw-r--r-- | src/devices/bus/nes/disksys.h | 2 | ||||
-rw-r--r-- | src/devices/bus/snes/sdd1.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/snes/sdd1.h | 2 | ||||
-rw-r--r-- | src/devices/bus/snes/spc7110.cpp | 4 | ||||
-rw-r--r-- | src/devices/bus/snes/spc7110.h | 2 |
20 files changed, 48 insertions, 48 deletions
diff --git a/src/devices/bus/cpc/mface2.cpp b/src/devices/bus/cpc/mface2.cpp index 3bb01352876..bb4354041bc 100644 --- a/src/devices/bus/cpc/mface2.cpp +++ b/src/devices/bus/cpc/mface2.cpp @@ -107,9 +107,9 @@ void cpc_multiface2_device::multiface_rethink_memory() { /* set bank addressess */ machine().root_device().membank("bank1")->set_base(multiface_rom); - machine().root_device().membank("bank2")->set_base(m_multiface_ram); + machine().root_device().membank("bank2")->set_base(m_multiface_ram.get()); machine().root_device().membank("bank9")->set_base(multiface_rom); - machine().root_device().membank("bank10")->set_base(m_multiface_ram); + machine().root_device().membank("bank10")->set_base(m_multiface_ram.get()); } } @@ -326,7 +326,7 @@ void cpc_multiface2_device::device_start() m_multiface_flags = MULTIFACE_VISIBLE; /* allocate ram */ - m_multiface_ram = auto_alloc_array(machine(), UINT8, 8192); + m_multiface_ram = std::make_unique<UINT8[]>(8192); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/mface2.h b/src/devices/bus/cpc/mface2.h index c54e38ec889..c64872af18b 100644 --- a/src/devices/bus/cpc/mface2.h +++ b/src/devices/bus/cpc/mface2.h @@ -59,7 +59,7 @@ private: DIRECT_UPDATE_MEMBER( amstrad_default ); DIRECT_UPDATE_MEMBER( amstrad_multiface_directoverride ); - unsigned char *m_multiface_ram; + std::unique_ptr<UINT8[]> m_multiface_ram; unsigned long m_multiface_flags; UINT8 m_romdis; diff --git a/src/devices/bus/iq151/minigraf.cpp b/src/devices/bus/iq151/minigraf.cpp index ca4ffdcc463..1a8e9d182a0 100644 --- a/src/devices/bus/iq151/minigraf.cpp +++ b/src/devices/bus/iq151/minigraf.cpp @@ -62,7 +62,7 @@ void iq151_minigraf_device::device_start() m_rom = (UINT8*)memregion("minigraf")->base(); // allocate a bitmap for represent the paper - m_paper = auto_bitmap_ind16_alloc(machine(), PAPER_WIDTH, PAPER_HEIGHT); + m_paper = std::make_unique<bitmap_ind16>(PAPER_WIDTH, PAPER_HEIGHT); m_paper->fill(0); m_pen = 0; diff --git a/src/devices/bus/iq151/minigraf.h b/src/devices/bus/iq151/minigraf.h index 311d79e97f1..6632fa31aa4 100644 --- a/src/devices/bus/iq151/minigraf.h +++ b/src/devices/bus/iq151/minigraf.h @@ -46,7 +46,7 @@ private: UINT8 m_pen; UINT8 m_control; - bitmap_ind16 * m_paper; + std::unique_ptr<bitmap_ind16> m_paper; }; diff --git a/src/devices/bus/iq151/ms151a.cpp b/src/devices/bus/iq151/ms151a.cpp index 1a4ee73d586..99da92c6d61 100644 --- a/src/devices/bus/iq151/ms151a.cpp +++ b/src/devices/bus/iq151/ms151a.cpp @@ -61,7 +61,7 @@ void iq151_ms151a_device::device_start() m_rom = (UINT8*)memregion("ms151a")->base(); // allocate a bitmap for represent the paper - m_paper = auto_bitmap_ind16_alloc(machine(), PAPER_WIDTH, PAPER_HEIGHT); + m_paper = std::make_unique<bitmap_ind16>(PAPER_WIDTH, PAPER_HEIGHT); m_paper->fill(0); m_pen = 0; diff --git a/src/devices/bus/iq151/ms151a.h b/src/devices/bus/iq151/ms151a.h index 528ce9a9554..1d794e1081d 100644 --- a/src/devices/bus/iq151/ms151a.h +++ b/src/devices/bus/iq151/ms151a.h @@ -46,7 +46,7 @@ private: INT32 m_posy; UINT8 m_pen; - bitmap_ind16 * m_paper; + std::unique_ptr<bitmap_ind16> m_paper; }; diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp index 8149486ae7e..1e798680b58 100644 --- a/src/devices/bus/isa/aga.cpp +++ b/src/devices/bus/isa/aga.cpp @@ -107,7 +107,7 @@ void isa8_aga_device::device_start() m_mode = AGA_COLOR; m_mda_chr_gen = memregion("gfx1")->base() + 0x1000; m_cga_chr_gen = memregion("gfx1")->base(); - m_videoram = auto_alloc_array(machine(), UINT8, 0x10000); + m_videoram = std::make_unique<UINT8[]>(0x10000); set_isa_device(); m_isa->install_memory(0xb0000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_r),this), write8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_w),this)); @@ -194,7 +194,7 @@ void isa8_aga_pc200_device::device_start() m_mode = AGA_COLOR; m_mda_chr_gen = memregion("gfx1")->base(); m_cga_chr_gen = memregion("gfx1")->base() + 0x1000; - m_videoram = auto_alloc_array(machine(), UINT8, 0x10000); + m_videoram = std::make_unique<UINT8[]>(0x10000); set_isa_device(); m_isa->install_memory(0xb0000, 0xbffff, 0, 0, read8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_r),this), write8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_w),this)); @@ -315,7 +315,7 @@ machine_config_constructor isa8_aga_device::device_mconfig_additions() const MC6845_UPDATE_ROW( isa8_aga_device::mda_text_inten_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); UINT32 *p = &bitmap.pix32(y); UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; int i; @@ -375,7 +375,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::mda_text_inten_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::mda_text_blink_update_row ) { - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); const rgb_t *palette = m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; @@ -437,7 +437,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::mda_text_blink_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_update_row ) { - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); const rgb_t *palette = m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); int i; @@ -469,7 +469,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_alt_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); UINT32 *p = &bitmap.pix32(y); int i; @@ -499,7 +499,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_inten_alt_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); UINT32 *p = &bitmap.pix32(y); int i; @@ -533,7 +533,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_alt_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); UINT32 *p = &bitmap.pix32(y); int i; @@ -569,7 +569,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_text_blink_alt_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bppl_update_row ) { const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); UINT32 *p = &bitmap.pix32(y); int i; @@ -594,7 +594,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bppl_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bpph_update_row ) { - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); const rgb_t *palette = m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); int i; @@ -628,7 +628,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_4bpph_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_2bpp_update_row ) { - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); const rgb_t *palette = m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); int i; @@ -654,7 +654,7 @@ MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_2bpp_update_row ) MC6845_UPDATE_ROW( isa8_aga_device::cga_gfx_1bpp_update_row ) { - UINT8 *videoram = m_videoram; + UINT8 *videoram = m_videoram.get(); const rgb_t *palette = m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT8 fg = m_cga_color_select & 0x0F; diff --git a/src/devices/bus/isa/aga.h b/src/devices/bus/isa/aga.h index 5ed2e560287..c0c80ac29bb 100644 --- a/src/devices/bus/isa/aga.h +++ b/src/devices/bus/isa/aga.h @@ -93,7 +93,7 @@ public: UINT8 m_cga_palette_lut_2bpp[4]; - UINT8 *m_videoram; + std::unique_ptr<UINT8[]> m_videoram; }; // device type definition diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp index 713891a5186..c8456886f02 100644 --- a/src/devices/bus/isa/mda.cpp +++ b/src/devices/bus/isa/mda.cpp @@ -799,15 +799,15 @@ void isa8_ec1840_0002_device::device_start() { isa8_mda_device::device_start(); - m_soft_chr_gen = auto_alloc_array(machine(), UINT8, 0x2000); - m_isa->install_bank(0xdc000, 0xddfff, 0, 0x2000, "bank_chargen", m_soft_chr_gen); + m_soft_chr_gen = std::make_unique<UINT8[]>(0x2000); + m_isa->install_bank(0xdc000, 0xddfff, 0, 0x2000, "bank_chargen", m_soft_chr_gen.get()); } void isa8_ec1840_0002_device::device_reset() { isa8_mda_device::device_reset(); - m_chr_gen = m_soft_chr_gen; + m_chr_gen = m_soft_chr_gen.get(); } diff --git a/src/devices/bus/isa/mda.h b/src/devices/bus/isa/mda.h index cba94767b40..c6cf72b29ad 100644 --- a/src/devices/bus/isa/mda.h +++ b/src/devices/bus/isa/mda.h @@ -120,7 +120,7 @@ protected: virtual void device_reset() override; public: - UINT8 *m_soft_chr_gen; + std::unique_ptr<UINT8[]> m_soft_chr_gen; }; diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp index f551a0fc2ec..c22631d405b 100644 --- a/src/devices/bus/isa/pgc.cpp +++ b/src/devices/bus/isa/pgc.cpp @@ -237,14 +237,14 @@ void isa8_pgc_device::device_start() m_palette->set_pen_color( i, 0, 0, 0 ); } - m_bitmap = auto_bitmap_ind16_alloc(machine(), width, height); + m_bitmap = std::make_unique<bitmap_ind16>(width, height); m_bitmap->fill(0); - m_vram = auto_alloc_array(machine(), UINT8, 0x78000); + m_vram = std::make_unique<UINT8[]>(0x78000); space.install_readwrite_bank(0x80000, 0xf7fff, "vram"); - membank("vram")->set_base(m_vram); + membank("vram")->set_base(m_vram.get()); - m_eram = auto_alloc_array(machine(), UINT8, 0x8000); + m_eram = std::make_unique<UINT8[]>(0x8000); machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(isa8_pgc_device::reset_common), this)); } @@ -325,7 +325,7 @@ READ8_MEMBER( isa8_pgc_device::init_r ) { DBG_LOG(1,"INIT",("mapping emulator RAM\n")); space.install_readwrite_bank(0xf8000, 0xfffff, "eram"); - membank("eram")->set_base(m_eram); + membank("eram")->set_base(m_eram.get()); DBG_LOG(1,"INIT",("mapping LUT\n")); space.install_write_handler(0xf8400, 0xf85ff, diff --git a/src/devices/bus/isa/pgc.h b/src/devices/bus/isa/pgc.h index 45eb4bfb25a..cf83eb8ae1d 100644 --- a/src/devices/bus/isa/pgc.h +++ b/src/devices/bus/isa/pgc.h @@ -55,11 +55,11 @@ private: required_device<palette_device> m_palette; UINT8 *m_commarea; - UINT8 *m_vram; - UINT8 *m_eram; + std::unique_ptr<UINT8[]> m_vram; + std::unique_ptr<UINT8[]> m_eram; UINT8 m_stateparam[16]; UINT8 m_lut[256*3]; - bitmap_ind16 *m_bitmap; + std::unique_ptr<bitmap_ind16> m_bitmap; }; diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp index 968eed3564f..f89a210888f 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.cpp +++ b/src/devices/bus/macpds/pds_tpdfpd.cpp @@ -115,10 +115,10 @@ void macpds_sedisplay_device::device_start() install_rom(this, SEDISPLAY_ROM_REGION, 0xc00000); install_rom(this, SEDISPLAY_ROM_REGION, 0xf80000); - m_vram = auto_alloc_array(machine(), UINT8, VRAM_SIZE); + m_vram = std::make_unique<UINT8[]>(VRAM_SIZE); static const char bankname[] = { "radpds_ram" }; - m_macpds->install_bank(0xc40000, 0xc40000+VRAM_SIZE-1, 0, 0, bankname, m_vram); + m_macpds->install_bank(0xc40000, 0xc40000+VRAM_SIZE-1, 0, 0, bankname, m_vram.get()); m_macpds->install_device(0x770000, 0x77000f, read16_delegate(FUNC(macpds_sedisplay_device::ramdac_r), this), write16_delegate(FUNC(macpds_sedisplay_device::ramdac_w), this)); m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(FUNC(macpds_sedisplay_device::sedisplay_r), this), write16_delegate(FUNC(macpds_sedisplay_device::sedisplay_w), this)); @@ -136,7 +136,7 @@ void macpds_sedisplay_device::device_reset() m_count = 0; m_clutoffs = 0; m_vbl_disable = 1; - memset(m_vram, 0, VRAM_SIZE); + memset(m_vram.get(), 0, VRAM_SIZE); memset(m_palette, 0, sizeof(m_palette)); m_palette[0] = rgb_t(0, 0, 0); @@ -166,7 +166,7 @@ UINT32 macpds_sedisplay_device::screen_update(screen_device &screen, bitmap_rgb3 int x, y; UINT8 pixels, *vram; - vram = m_vram; + vram = m_vram.get(); for (y = 0; y < 870; y++) { diff --git a/src/devices/bus/macpds/pds_tpdfpd.h b/src/devices/bus/macpds/pds_tpdfpd.h index 0adf48c2765..218c30f959b 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.h +++ b/src/devices/bus/macpds/pds_tpdfpd.h @@ -41,7 +41,7 @@ protected: DECLARE_WRITE16_MEMBER(ramdac_w); public: - UINT8 *m_vram; + std::unique_ptr<UINT8[]> m_vram; UINT32 m_vbl_disable; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; diff --git a/src/devices/bus/nes/disksys.cpp b/src/devices/bus/nes/disksys.cpp index e89429dc0c4..d517b7d4a67 100644 --- a/src/devices/bus/nes/disksys.cpp +++ b/src/devices/bus/nes/disksys.cpp @@ -416,11 +416,11 @@ void nes_disksys_device::load_disk(device_image_interface &image) m_fds_sides = (image.length() - header) / 65500; if (!m_fds_data) - m_fds_data = auto_alloc_array(machine(), UINT8, m_fds_sides * 65500); + m_fds_data = std::make_unique<UINT8[]>(m_fds_sides * 65500); // if there is an header, skip it image.fseek(header, SEEK_SET); - image.fread(m_fds_data, 65500 * m_fds_sides); + image.fread(m_fds_data.get(), 65500 * m_fds_sides); return; } diff --git a/src/devices/bus/nes/disksys.h b/src/devices/bus/nes/disksys.h index 821cfb5614b..7dbefa37ee4 100644 --- a/src/devices/bus/nes/disksys.h +++ b/src/devices/bus/nes/disksys.h @@ -38,7 +38,7 @@ public: private: UINT8 *m_2c33_rom; - UINT8 *m_fds_data; // here, we store a copy of the disk + std::unique_ptr<UINT8[]> m_fds_data; // here, we store a copy of the disk required_device<legacy_floppy_image_device> m_disk; static const device_timer_id TIMER_IRQ = 0; diff --git a/src/devices/bus/snes/sdd1.cpp b/src/devices/bus/snes/sdd1.cpp index 56376641705..f3282b27b84 100644 --- a/src/devices/bus/snes/sdd1.cpp +++ b/src/devices/bus/snes/sdd1.cpp @@ -428,7 +428,7 @@ void sns_rom_sdd1_device::device_start() { m_sdd1emu = auto_alloc(machine(), SDD1_emu(machine())); - m_buffer.data = (UINT8*)auto_alloc_array(machine(), UINT8, 0x10000); + m_buffer.data = std::make_unique<UINT8[]>(0x10000); m_buffer.ready = 0; save_item(NAME(m_sdd1_enable)); @@ -441,7 +441,7 @@ void sns_rom_sdd1_device::device_start() save_item(NAME(m_dma[i].size), i); } - save_pointer(NAME(m_buffer.data), 0x10000); + save_pointer(NAME(m_buffer.data.get()), 0x10000); save_item(NAME(m_buffer.offset)); save_item(NAME(m_buffer.size)); save_item(NAME(m_buffer.ready)); @@ -567,7 +567,7 @@ UINT8 sns_rom_sdd1_device::read_helper(UINT32 addr) // SDD1_emu calls this function; it needs to access uncompressed data; // so temporarily disable decompression mode for decompress() call. - m_sdd1emu->SDD1emu_decompress(m_rom, m_mmc, addr, m_buffer.size, m_buffer.data); + m_sdd1emu->SDD1emu_decompress(m_rom, m_mmc, addr, m_buffer.size, m_buffer.data.get()); m_buffer.ready = 1; } diff --git a/src/devices/bus/snes/sdd1.h b/src/devices/bus/snes/sdd1.h index 24e8ecaf47a..6524a043b68 100644 --- a/src/devices/bus/snes/sdd1.h +++ b/src/devices/bus/snes/sdd1.h @@ -180,7 +180,7 @@ public: struct { - UINT8 *data; // pointer to decompressed S-DD1 data (65536 bytes) + std::unique_ptr<UINT8[]> data; // pointer to decompressed S-DD1 data (65536 bytes) UINT16 offset; // read index into S-DD1 decompression buffer UINT32 size; // length of data buffer; reads decrement counter, set ready to false at 0 UINT8 ready; // 1 when data[] is valid; 0 to invoke sdd1emu.decompress() diff --git a/src/devices/bus/snes/spc7110.cpp b/src/devices/bus/snes/spc7110.cpp index a6ebbdab2df..0c7cc797316 100644 --- a/src/devices/bus/snes/spc7110.cpp +++ b/src/devices/bus/snes/spc7110.cpp @@ -300,7 +300,7 @@ static const UINT8 spc7110_mode2_context_table[32][2] = SPC7110_Decomp::SPC7110_Decomp(running_machine &machine) : m_machine(machine) { - m_decomp_buffer = (UINT8*)auto_alloc_array(machine, UINT8, SPC7110_DECOMP_BUFFER_SIZE); + m_decomp_buffer = std::make_unique<UINT8[]>(SPC7110_DECOMP_BUFFER_SIZE); reset(); for (int i = 0; i < 256; i++) @@ -325,7 +325,7 @@ SPC7110_Decomp::SPC7110_Decomp(running_machine &machine) m_machine.save().save_item(m_decomp_mode, "SNES_SPC7110/m_decomp_mode"); m_machine.save().save_item(m_decomp_offset, "SNES_SPC7110/m_decomp_offset"); - m_machine.save().save_pointer(m_decomp_buffer, "SNES_SPC7110/m_decomp_buffer", SPC7110_DECOMP_BUFFER_SIZE); + m_machine.save().save_pointer(m_decomp_buffer.get(), "SNES_SPC7110/m_decomp_buffer", SPC7110_DECOMP_BUFFER_SIZE); m_machine.save().save_item(m_decomp_buffer_rdoffset, "SNES_SPC7110/m_decomp_buffer_rdoffset"); m_machine.save().save_item(m_decomp_buffer_wroffset, "SNES_SPC7110/m_decomp_buffer_wroffset"); m_machine.save().save_item(m_decomp_buffer_length, "SNES_SPC7110/m_decomp_buffer_length"); diff --git a/src/devices/bus/snes/spc7110.h b/src/devices/bus/snes/spc7110.h index ba356790d2f..7dd3710cc5d 100644 --- a/src/devices/bus/snes/spc7110.h +++ b/src/devices/bus/snes/spc7110.h @@ -50,7 +50,7 @@ private: UINT32 m_decomp_mode; UINT32 m_decomp_offset; - UINT8 *m_decomp_buffer; + std::unique_ptr<UINT8[]> m_decomp_buffer; UINT32 m_decomp_buffer_rdoffset; UINT32 m_decomp_buffer_wroffset; UINT32 m_decomp_buffer_length; |