diff options
Diffstat (limited to 'src/devices/bus/c64')
30 files changed, 56 insertions, 80 deletions
diff --git a/src/devices/bus/c64/c128_partner.cpp b/src/devices/bus/c64/c128_partner.cpp index 91b7cf751ab..808926d8583 100644 --- a/src/devices/bus/c64/c128_partner.cpp +++ b/src/devices/bus/c64/c128_partner.cpp @@ -80,7 +80,8 @@ ioport_constructor c128_partner_cartridge_device::device_input_ports() const c128_partner_cartridge_device::c128_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, C128_PARTNER, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), - m_ram(*this, "ram"), t_joyb2(nullptr), + m_ram(*this, "ram", 0x2000, ENDIANNESS_LITTLE), + t_joyb2(nullptr), m_ram_a12_a7(0), m_ls74_cd(0), m_ls74_q1(0), @@ -96,9 +97,6 @@ c128_partner_cartridge_device::c128_partner_cartridge_device(const machine_confi void c128_partner_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(0x2000); - // simulate the 16.7ms pulse from CIA1 PB2 that would arrive thru the joystick port dongle t_joyb2 = timer_alloc(); t_joyb2->adjust(attotime::from_msec(16), 0, attotime::from_msec(16)); diff --git a/src/devices/bus/c64/c128_partner.h b/src/devices/bus/c64/c128_partner.h index 1f4402d5b22..da906531122 100644 --- a/src/devices/bus/c64/c128_partner.h +++ b/src/devices/bus/c64/c128_partner.h @@ -49,7 +49,7 @@ protected: virtual void vcs_joy_w(uint8_t data); private: - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; emu_timer *t_joyb2; int m_ram_a12_a7; diff --git a/src/devices/bus/c64/dqbb.cpp b/src/devices/bus/c64/dqbb.cpp index 20adedd9057..6f7e2bf7dab 100644 --- a/src/devices/bus/c64/dqbb.cpp +++ b/src/devices/bus/c64/dqbb.cpp @@ -53,7 +53,8 @@ c64_dqbb_cartridge_device::c64_dqbb_cartridge_device(const machine_config &mconf void c64_dqbb_cartridge_device::device_start() { // allocate memory - m_nvram.allocate(0x4000); + m_nvram = std::make_unique<uint8_t[]>(0x4000); + save_pointer(NAME(m_nvram.get()), 0x4000); // state saving save_item(NAME(m_cs)); diff --git a/src/devices/bus/c64/dqbb.h b/src/devices/bus/c64/dqbb.h index aaa8c0e1bf4..af9460a5bbe 100644 --- a/src/devices/bus/c64/dqbb.h +++ b/src/devices/bus/c64/dqbb.h @@ -38,8 +38,8 @@ protected: // device_nvram_interface overrides virtual void nvram_default() override { } - virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } } - virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } } + virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram.get(), 0x4000); } } + virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram.get(), 0x4000); } } // device_c64_expansion_card_interface overrides virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; diff --git a/src/devices/bus/c64/easyflash.cpp b/src/devices/bus/c64/easyflash.cpp index 38cdf9739c6..eab9ff7930a 100644 --- a/src/devices/bus/c64/easyflash.cpp +++ b/src/devices/bus/c64/easyflash.cpp @@ -77,7 +77,7 @@ c64_easyflash_cartridge_device::c64_easyflash_cartridge_device(const machine_con m_flash_roml(*this, AM29F040_0_TAG), m_flash_romh(*this, AM29F040_1_TAG), m_jp1(*this, "JP1"), - m_ram(*this, "ram"), + m_ram(*this, "ram", 0x100, ENDIANNESS_LITTLE), m_bank(0), m_mode(0) { @@ -90,9 +90,6 @@ c64_easyflash_cartridge_device::c64_easyflash_cartridge_device(const machine_con void c64_easyflash_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(0x100); - // state saving save_item(NAME(m_bank)); save_item(NAME(m_mode)); diff --git a/src/devices/bus/c64/easyflash.h b/src/devices/bus/c64/easyflash.h index 377de25d50d..6c73a14838a 100644 --- a/src/devices/bus/c64/easyflash.h +++ b/src/devices/bus/c64/easyflash.h @@ -49,7 +49,7 @@ private: required_device<amd_29f040_device> m_flash_roml; required_device<amd_29f040_device> m_flash_romh; required_ioport m_jp1; - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; uint8_t m_bank; uint8_t m_mode; diff --git a/src/devices/bus/c64/exp.cpp b/src/devices/bus/c64/exp.cpp index 3c5663db036..8304a7be6b7 100644 --- a/src/devices/bus/c64/exp.cpp +++ b/src/devices/bus/c64/exp.cpp @@ -29,10 +29,6 @@ DEFINE_DEVICE_TYPE(C64_EXPANSION_SLOT, c64_expansion_slot_device, "c64_expansion device_c64_expansion_card_interface::device_c64_expansion_card_interface(const machine_config &mconfig, device_t &device) : device_interface(device, "c64exp"), - m_roml(*this, "roml"), - m_romh(*this, "romh"), - m_romx(*this, "romx"), - m_nvram(*this, "nvram"), m_game(1), m_exrom(1) { @@ -148,11 +144,11 @@ image_init_result c64_expansion_slot_device::call_load() uint8_t *roml = nullptr; uint8_t *romh = nullptr; - m_card->m_roml.allocate(roml_size); - m_card->m_romh.allocate(romh_size); + m_card->m_roml = std::make_unique<uint8_t[]>(roml_size); + m_card->m_romh = std::make_unique<uint8_t[]>(romh_size); - if (roml_size) roml = m_card->m_roml; - if (romh_size) romh = m_card->m_roml; + if (roml_size) roml = m_card->m_roml.get(); + if (romh_size) romh = m_card->m_romh.get(); cbm_crt_read_data(image_core_file(), roml, romh); } diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h index 2507227d724..29e79fb1ff8 100644 --- a/src/devices/bus/c64/exp.h +++ b/src/devices/bus/c64/exp.h @@ -148,10 +148,10 @@ public: protected: device_c64_expansion_card_interface(const machine_config &mconfig, device_t &device); - optional_shared_ptr<uint8_t> m_roml; - optional_shared_ptr<uint8_t> m_romh; - optional_shared_ptr<uint8_t> m_romx; - optional_shared_ptr<uint8_t> m_nvram; + std::unique_ptr<uint8_t[]> m_roml; + std::unique_ptr<uint8_t[]> m_romh; + std::unique_ptr<uint8_t[]> m_romx; + std::unique_ptr<uint8_t[]> m_nvram; int m_game; int m_exrom; diff --git a/src/devices/bus/c64/fcc.cpp b/src/devices/bus/c64/fcc.cpp index 405c1761a2e..13b42122a03 100644 --- a/src/devices/bus/c64/fcc.cpp +++ b/src/devices/bus/c64/fcc.cpp @@ -97,6 +97,7 @@ c64_final_chesscard_device::c64_final_chesscard_device(const machine_config &mco void c64_final_chesscard_device::device_start() { + m_nvram = std::make_unique<uint8_t[]>(0x2000); // state saving save_item(NAME(m_bank)); save_item(NAME(m_hidden)); diff --git a/src/devices/bus/c64/fcc.h b/src/devices/bus/c64/fcc.h index 03eac948a73..15a096f5cf5 100644 --- a/src/devices/bus/c64/fcc.h +++ b/src/devices/bus/c64/fcc.h @@ -42,8 +42,8 @@ protected: // device_nvram_interface overrides virtual void nvram_default() override { } - virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } } - virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } } + virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram.get(), 0x2000); } } + virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram.get(), 0x2000); } } // device_c64_expansion_card_interface overrides virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; @@ -59,8 +59,8 @@ private: DECLARE_WRITE_LINE_MEMBER(mainlatch_int) { m_slot->nmi_w(state); } uint8_t rom_r(offs_t offset) { return m_romx[offset]; } // cartridge cpu rom - uint8_t nvram_r(offs_t offset) { return m_nvram[offset & m_nvram.mask()]; } - void nvram_w(offs_t offset, uint8_t data) { m_nvram[offset & m_nvram.mask()] = data; } + uint8_t nvram_r(offs_t offset) { return m_nvram[offset & 0x1fff]; } + void nvram_w(offs_t offset, uint8_t data) { m_nvram[offset & 0x1fff] = data; } void c64_fcc_map(address_map &map); }; diff --git a/src/devices/bus/c64/georam.cpp b/src/devices/bus/c64/georam.cpp index 6bf8a16a1d8..377bc10a391 100644 --- a/src/devices/bus/c64/georam.cpp +++ b/src/devices/bus/c64/georam.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(C64_GEORAM, c64_georam_cartridge_device, "c64_georam", "C64 G c64_georam_cartridge_device::c64_georam_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, C64_GEORAM, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), - m_ram(*this, "ram"), + m_ram(*this, "ram", 0x80000, ENDIANNESS_LITTLE), m_bank(0) { } @@ -42,9 +42,6 @@ c64_georam_cartridge_device::c64_georam_cartridge_device(const machine_config &m void c64_georam_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(0x80000); - // state saving save_item(NAME(m_bank)); } diff --git a/src/devices/bus/c64/georam.h b/src/devices/bus/c64/georam.h index 03967625c23..41b7fd82379 100644 --- a/src/devices/bus/c64/georam.h +++ b/src/devices/bus/c64/georam.h @@ -39,7 +39,7 @@ protected: virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; private: - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; uint16_t m_bank; }; diff --git a/src/devices/bus/c64/ide64.cpp b/src/devices/bus/c64/ide64.cpp index 73e14ea6b99..830f38c3993 100644 --- a/src/devices/bus/c64/ide64.cpp +++ b/src/devices/bus/c64/ide64.cpp @@ -93,7 +93,8 @@ c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mco m_rtc(*this, DS1302_TAG), m_ata(*this, ATA_TAG), m_jp1(*this, "JP1"), - m_ram(*this, "ram"), m_bank(0), m_ata_data(0), m_wp(0), m_enable(0) + m_ram(*this, "ram", 0x8000, ENDIANNESS_LITTLE), + m_bank(0), m_ata_data(0), m_wp(0), m_enable(0) { } @@ -104,9 +105,6 @@ c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mco void c64_ide64_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(0x8000); - // state saving save_item(NAME(m_bank)); save_item(NAME(m_ata_data)); diff --git a/src/devices/bus/c64/ide64.h b/src/devices/bus/c64/ide64.h index 366357868b9..9438e3a1ed0 100644 --- a/src/devices/bus/c64/ide64.h +++ b/src/devices/bus/c64/ide64.h @@ -53,7 +53,7 @@ private: required_device<ds1302_device> m_rtc; required_device<ata_interface_device> m_ata; required_ioport m_jp1; - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; uint8_t m_bank; uint16_t m_ata_data; diff --git a/src/devices/bus/c64/magic_formel.cpp b/src/devices/bus/c64/magic_formel.cpp index 8d43fd05810..1e6c38d1685 100644 --- a/src/devices/bus/c64/magic_formel.cpp +++ b/src/devices/bus/c64/magic_formel.cpp @@ -157,7 +157,7 @@ c64_magic_formel_cartridge_device::c64_magic_formel_cartridge_device(const machi device_t(mconfig, C64_MAGIC_FORMEL, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_pia(*this, MC6821_TAG), - m_ram(*this, "ram"), + m_ram(*this, "ram", 0x2000, ENDIANNESS_LITTLE), m_rom_bank(0), m_ram_bank(0), m_ram_oe(0), @@ -174,9 +174,6 @@ c64_magic_formel_cartridge_device::c64_magic_formel_cartridge_device(const machi void c64_magic_formel_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(0x2000); - // state saving save_item(NAME(m_rom_bank)); save_item(NAME(m_ram_bank)); diff --git a/src/devices/bus/c64/magic_formel.h b/src/devices/bus/c64/magic_formel.h index 43fb7c69fe5..ab16d4a0e34 100644 --- a/src/devices/bus/c64/magic_formel.h +++ b/src/devices/bus/c64/magic_formel.h @@ -51,7 +51,7 @@ private: DECLARE_WRITE_LINE_MEMBER( pia_cb2_w ); required_device<pia6821_device> m_pia; - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; uint8_t m_rom_bank; uint8_t m_ram_bank; diff --git a/src/devices/bus/c64/neoram.cpp b/src/devices/bus/c64/neoram.cpp index 4cb34cbbb57..c0f292da161 100644 --- a/src/devices/bus/c64/neoram.cpp +++ b/src/devices/bus/c64/neoram.cpp @@ -43,7 +43,7 @@ c64_neoram_cartridge_device::c64_neoram_cartridge_device(const machine_config &m void c64_neoram_cartridge_device::device_start() { // allocate memory - m_nvram.allocate(0x200000); + m_nvram = std::make_unique<uint8_t[]>(0x200000); // state saving save_item(NAME(m_bank)); diff --git a/src/devices/bus/c64/neoram.h b/src/devices/bus/c64/neoram.h index d5058b878b7..b6729ec08d4 100644 --- a/src/devices/bus/c64/neoram.h +++ b/src/devices/bus/c64/neoram.h @@ -37,8 +37,8 @@ protected: // device_nvram_interface overrides virtual void nvram_default() override { } - virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } } - virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } } + virtual void nvram_read(emu_file &file) override { if (m_nvram != nullptr) { file.read(m_nvram.get(), 0x200000); } } + virtual void nvram_write(emu_file &file) override { if (m_nvram != nullptr) { file.write(m_nvram.get(), 0x200000); } } // device_c64_expansion_card_interface overrides virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; diff --git a/src/devices/bus/c64/ocean.cpp b/src/devices/bus/c64/ocean.cpp index 92b18de6a51..d267a9912fa 100644 --- a/src/devices/bus/c64/ocean.cpp +++ b/src/devices/bus/c64/ocean.cpp @@ -84,15 +84,15 @@ void c64_ocean_cartridge_device::device_reset() uint8_t c64_ocean_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) { - if (!roml && m_roml.bytes()) + if (!roml && m_roml) { offs_t addr = (m_bank << 13) | (offset & 0x1fff); - data = m_roml[addr & m_roml.mask()]; + data = m_roml[addr]; } - else if (!romh && m_romh.bytes()) + else if (!romh && m_romh) { offs_t addr = (m_bank << 13) | (offset & 0x1fff); - data = m_romh[addr & m_romh.mask()]; + data = m_romh[addr]; } else if (!io1) { diff --git a/src/devices/bus/c64/pagefox.cpp b/src/devices/bus/c64/pagefox.cpp index 80264aab13b..e33bb4d3d7b 100644 --- a/src/devices/bus/c64/pagefox.cpp +++ b/src/devices/bus/c64/pagefox.cpp @@ -52,7 +52,8 @@ DEFINE_DEVICE_TYPE(C64_PAGEFOX, c64_pagefox_cartridge_device, "c64_pagefox", "C6 c64_pagefox_cartridge_device::c64_pagefox_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, C64_PAGEFOX, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), - m_ram(*this, "ram"), m_bank(0) + m_ram(*this, "ram", 0x8000, ENDIANNESS_LITTLE), + m_bank(0) { } @@ -63,9 +64,6 @@ c64_pagefox_cartridge_device::c64_pagefox_cartridge_device(const machine_config void c64_pagefox_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(0x8000); - // state saving save_item(NAME(m_bank)); } diff --git a/src/devices/bus/c64/pagefox.h b/src/devices/bus/c64/pagefox.h index 74ed5a4edf0..b0295eb9d0d 100644 --- a/src/devices/bus/c64/pagefox.h +++ b/src/devices/bus/c64/pagefox.h @@ -39,7 +39,7 @@ protected: virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; private: - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; uint8_t m_bank; }; diff --git a/src/devices/bus/c64/partner.cpp b/src/devices/bus/c64/partner.cpp index 55e4d07f3e1..b77cf610d17 100644 --- a/src/devices/bus/c64/partner.cpp +++ b/src/devices/bus/c64/partner.cpp @@ -80,7 +80,7 @@ ioport_constructor c64_partner_cartridge_device::device_input_ports() const c64_partner_cartridge_device::c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, C64_PARTNER, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), - m_ram(*this, "ram"), + m_ram(*this, "ram", 0x2000, ENDIANNESS_LITTLE), m_a0(1), m_a6(1), m_nmi(0) @@ -94,8 +94,6 @@ c64_partner_cartridge_device::c64_partner_cartridge_device(const machine_config void c64_partner_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(0x2000); } diff --git a/src/devices/bus/c64/partner.h b/src/devices/bus/c64/partner.h index 6ecf4503a91..4dd71542571 100644 --- a/src/devices/bus/c64/partner.h +++ b/src/devices/bus/c64/partner.h @@ -44,7 +44,7 @@ protected: virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw) override; private: - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; int m_a0; int m_a6; diff --git a/src/devices/bus/c64/reu.cpp b/src/devices/bus/c64/reu.cpp index cc51b99e096..0d24a1967fa 100644 --- a/src/devices/bus/c64/reu.cpp +++ b/src/devices/bus/c64/reu.cpp @@ -53,7 +53,7 @@ c64_reu_cartridge_device::c64_reu_cartridge_device(const machine_config &mconfig device_c64_expansion_card_interface(mconfig, *this), m_dmac(*this, MOS8726R1_TAG), m_eprom(*this, "rom"), - m_ram(*this, "ram"), + m_ram(*this, "ram", ram_size, ENDIANNESS_LITTLE), m_variant(variant), m_jp1(jp1), m_ram_size(ram_size) @@ -76,9 +76,6 @@ c64_reu1764_cartridge_device::c64_reu1764_cartridge_device(const machine_config void c64_reu_cartridge_device::device_start() { - // allocate memory - m_ram.allocate(m_ram_size); - // setup DMA controller m_dmac->set_unscaled_clock(m_slot->phi2()); m_dmac->bs_w(m_jp1); diff --git a/src/devices/bus/c64/reu.h b/src/devices/bus/c64/reu.h index 0cbb67d9576..eaa662f38a1 100644 --- a/src/devices/bus/c64/reu.h +++ b/src/devices/bus/c64/reu.h @@ -52,7 +52,7 @@ protected: required_device<mos8726_device> m_dmac; required_device<generic_slot_device> m_eprom; - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; int m_variant; int m_jp1; diff --git a/src/devices/bus/c64/ross.cpp b/src/devices/bus/c64/ross.cpp index 25c1a996df8..e8703a33bcc 100644 --- a/src/devices/bus/c64/ross.cpp +++ b/src/devices/bus/c64/ross.cpp @@ -68,7 +68,7 @@ uint8_t c64_ross_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sph { offs_t addr = (m_bank << 14) | (offset & 0x3fff); - data = m_roml[addr & m_roml.mask()]; + data = m_roml[addr]; } return data; diff --git a/src/devices/bus/c64/std.cpp b/src/devices/bus/c64/std.cpp index 08f4c1d65e0..95d472bfbfd 100644 --- a/src/devices/bus/c64/std.cpp +++ b/src/devices/bus/c64/std.cpp @@ -49,19 +49,19 @@ void c64_standard_cartridge_device::device_start() uint8_t c64_standard_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) { - if (!roml && m_roml.bytes()) + if (!roml && m_roml) { - data = m_roml[offset & m_roml.mask()]; + data = m_roml[offset]; } else if (!romh) { - if (m_romh.bytes()) + if (m_romh) { - data = m_romh[offset & m_romh.mask()]; + data = m_romh[offset]; } - else if (m_roml.mask() == 0x3fff) + else if (m_roml) { - data = m_roml[offset & m_roml.mask()]; + data = m_roml[offset]; } } diff --git a/src/devices/bus/c64/westermann.cpp b/src/devices/bus/c64/westermann.cpp index ac254733f01..33b22c06942 100644 --- a/src/devices/bus/c64/westermann.cpp +++ b/src/devices/bus/c64/westermann.cpp @@ -61,17 +61,17 @@ uint8_t c64_westermann_cartridge_device::c64_cd_r(offs_t offset, uint8_t data, i { if (!roml) { - data = m_roml[offset & m_roml.mask()]; + data = m_roml[offset]; } else if (!romh) { - if (m_romh.bytes()) + if (m_romh) { - data = m_romh[offset & m_romh.mask()]; + data = m_romh[offset]; } else { - data = m_roml[offset & m_roml.mask()]; + data = m_roml[offset]; } } else if (!io2) diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp index 6bfa6e9d8cd..346fb7c0947 100644 --- a/src/devices/bus/c64/xl80.cpp +++ b/src/devices/bus/c64/xl80.cpp @@ -157,7 +157,7 @@ c64_xl80_device::c64_xl80_device(const machine_config &mconfig, const char *tag, m_crtc(*this, HD46505SP_TAG), m_palette(*this, "palette"), m_char_rom(*this, HD46505SP_TAG), - m_ram(*this, "ram") + m_ram(*this, "ram", RAM_SIZE, ENDIANNESS_LITTLE) { } @@ -168,8 +168,6 @@ c64_xl80_device::c64_xl80_device(const machine_config &mconfig, const char *tag, void c64_xl80_device::device_start() { - // allocate memory - m_ram.allocate(RAM_SIZE); } diff --git a/src/devices/bus/c64/xl80.h b/src/devices/bus/c64/xl80.h index 70a9b1cba9d..762b8ed39eb 100644 --- a/src/devices/bus/c64/xl80.h +++ b/src/devices/bus/c64/xl80.h @@ -52,7 +52,7 @@ private: required_device<hd6845s_device> m_crtc; required_device<palette_device> m_palette; required_memory_region m_char_rom; - optional_shared_ptr<uint8_t> m_ram; + memory_share_creator<uint8_t> m_ram; }; |