diff options
author | Ivan Vangelista <mesgnet@yahoo.it> | 2021-03-15 18:09:32 +0100 |
---|---|---|
committer | Ivan Vangelista <mesgnet@yahoo.it> | 2021-03-15 18:09:32 +0100 |
commit | 82a88e10a8408008b145a0d781c9e6e9f38b5c4e (patch) | |
tree | d4fc8bbf22c69281d9b3e6e5567610bbb1afb992 | |
parent | 613eaa353c13fb16265b1f47f24596e587dacef3 (diff) |
machine/3dom2.cpp: got rid of auto_alloc_array
-rw-r--r-- | src/mame/machine/3dom2.cpp | 4 | ||||
-rw-r--r-- | src/mame/machine/3dom2.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/machine/3dom2.cpp b/src/mame/machine/3dom2.cpp index 7da659deefa..4e3927f72f5 100644 --- a/src/mame/machine/3dom2.cpp +++ b/src/mame/machine/3dom2.cpp @@ -241,7 +241,7 @@ void m2_bda_device::device_start() // Allocate RAM uint32_t ram_size = (m_rambank_size[0] + m_rambank_size[1]) * 1024 * 1024; - m_ram = auto_alloc_array(machine(), uint32_t, ram_size / sizeof(uint32_t)); + m_ram = std::make_unique<uint32_t[]>(ram_size / sizeof(uint32_t)); m_ram_mask = ram_size - 1; // Install RAM and handlers into the CPU address spaces @@ -463,7 +463,7 @@ void m2_bda_device::write_bus32(offs_t offset, uint32_t data) void m2_bda_device::configure_ppc_address_map(address_space &space) { // Install shared RAM - space.install_ram(RAM_BASE, RAM_BASE + m_ram_mask, m_ram); + space.install_ram(RAM_BASE, RAM_BASE + m_ram_mask, m_ram.get()); // Install TE texture RAM window space.install_ram(TE_TRAM_BASE, TE_TRAM_BASE + TE_TRAM_MASK, m_te->tram_ptr()); diff --git a/src/mame/machine/3dom2.h b/src/mame/machine/3dom2.h index 48c8724a7ad..3326afe4c74 100644 --- a/src/mame/machine/3dom2.h +++ b/src/mame/machine/3dom2.h @@ -149,7 +149,7 @@ public: void write_bus16(offs_t offset, uint16_t data); void write_bus32(offs_t offset, uint32_t data); - void * ram_ptr() { return m_ram; } + void * ram_ptr() { return m_ram.get(); } offs_t ram_start() { return RAM_BASE; } offs_t ram_end() { return RAM_BASE + m_ram_mask; } uint32_t get_rambank_size(uint32_t bank) const { return m_rambank_size[bank]; } @@ -215,9 +215,9 @@ public: // TODO: THIS SHOULD NOT BE PUBLIC required_device<m2_te_device> m_te; // System RAM - uint32_t *m_ram; - uint32_t m_rambank_size[2]; - uint32_t m_ram_mask; + std::unique_ptr<uint32_t[]> m_ram; + uint32_t m_rambank_size[2]; + uint32_t m_ram_mask; devcb_write16 m_dac_l; devcb_write16 m_dac_r; |