diff options
author | 2020-09-30 10:29:40 +0200 | |
---|---|---|
committer | 2020-09-30 10:29:40 +0200 | |
commit | 78f052e23e84759d11a91066788fe93be25f71b7 (patch) | |
tree | 7be6853ebef449c7e04121c49e8e18c62158efc6 | |
parent | 5a1fd0cc172cf10c9519152391283a90da33d0c9 (diff) |
Quick and dirty replacement of cache with specific for benchingbench-specific
264 files changed, 383 insertions, 558 deletions
diff --git a/src/devices/bus/multibus/isbc202.cpp b/src/devices/bus/multibus/isbc202.cpp index 77efce95e82..2e7b200d23d 100644 --- a/src/devices/bus/multibus/isbc202.cpp +++ b/src/devices/bus/multibus/isbc202.cpp @@ -405,7 +405,7 @@ void isbc202_device::device_start() save_item(NAME(m_amwrt)); save_item(NAME(m_dlyd_amwrt)); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); set_icountptr(m_icount); space(AS_PROGRAM).install_rom(0 , 0x1ff , memregion("microcode")->base()); diff --git a/src/devices/bus/multibus/isbc202.h b/src/devices/bus/multibus/isbc202.h index ae5e6ce8fe9..c122627328f 100644 --- a/src/devices/bus/multibus/isbc202.h +++ b/src/devices/bus/multibus/isbc202.h @@ -64,7 +64,7 @@ private: required_device_array<floppy_connector , 4> m_drives; address_space_config m_program_config; - memory_access<9, 2 , -2 , ENDIANNESS_BIG>::cache m_cache; + memory_access<9, 2 , -2 , ENDIANNESS_BIG>::specific m_cache; address_space *m_mem_space; diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp index 1b0aecfc4c4..4b67f08b4ed 100644 --- a/src/devices/cpu/8x300/8x300.cpp +++ b/src/devices/cpu/8x300/8x300.cpp @@ -153,7 +153,7 @@ void n8x300_cpu_device::device_resolve_objects() void n8x300_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h index 0c95ddc2002..00abb443ec2 100644 --- a/src/devices/cpu/8x300/8x300.h +++ b/src/devices/cpu/8x300/8x300.h @@ -82,7 +82,7 @@ protected: int m_icount; bool m_increment_pc; - memory_access<13, 1, -1, ENDIANNESS_BIG>::cache m_cache; + memory_access<13, 1, -1, ENDIANNESS_BIG>::specific m_cache; memory_access<13, 1, -1, ENDIANNESS_BIG>::specific m_program; memory_access< 9, 0, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/adsp2100/adsp2100.cpp b/src/devices/cpu/adsp2100/adsp2100.cpp index 2f0b609ad5b..e9536091711 100644 --- a/src/devices/cpu/adsp2100/adsp2100.cpp +++ b/src/devices/cpu/adsp2100/adsp2100.cpp @@ -417,7 +417,7 @@ void adsp21xx_device::device_start() m_dmovlay_cb.resolve(); // get our address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); if(has_space(AS_IO)) diff --git a/src/devices/cpu/adsp2100/adsp2100.h b/src/devices/cpu/adsp2100/adsp2100.h index 9910a7ac2b3..cdad846013a 100644 --- a/src/devices/cpu/adsp2100/adsp2100.h +++ b/src/devices/cpu/adsp2100/adsp2100.h @@ -429,7 +429,7 @@ protected: adsp_core m_alt; // address spaces - memory_access<14, 2, -2, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<14, 2, -2, ENDIANNESS_LITTLE>::specific m_cache; memory_access<14, 2, -2, ENDIANNESS_LITTLE>::specific m_program; memory_access<14, 1, -1, ENDIANNESS_LITTLE>::specific m_data; memory_access<11, 1, -1, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/am29000/am29000.cpp b/src/devices/cpu/am29000/am29000.cpp index 3a7bdb98954..4154059302e 100644 --- a/src/devices/cpu/am29000/am29000.cpp +++ b/src/devices/cpu/am29000/am29000.cpp @@ -130,9 +130,9 @@ device_memory_interface::space_config_vector am29000_cpu_device::memory_space_co void am29000_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); - space(AS_DATA).cache(m_datacache); + space(AS_DATA).specific(m_datacache); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/am29000/am29000.h b/src/devices/cpu/am29000/am29000.h index c19eeb8b9f2..777e7f90eb5 100644 --- a/src/devices/cpu/am29000/am29000.h +++ b/src/devices/cpu/am29000/am29000.h @@ -629,9 +629,9 @@ protected: uint32_t m_exec_pc; uint32_t m_next_pc; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_program; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_datacache; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_datacache; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_data; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp index 13a6cf7c64b..89c282908fb 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -498,10 +498,10 @@ void arm_cpu_device::device_start() m_program = &space(AS_PROGRAM); if(m_program->endianness() == ENDIANNESS_LITTLE) { - m_program->cache(m_cachele); + m_program->specific(m_cachele); m_pr32 = [this](offs_t address) -> u32 { return m_cachele.read_dword(address); }; } else { - m_program->cache(m_cachebe); + m_program->specific(m_cachebe); m_pr32 = [this](offs_t address) -> u32 { return m_cachebe.read_dword(address); }; } diff --git a/src/devices/cpu/arm/arm.h b/src/devices/cpu/arm/arm.h index bfa16724463..75453c3e9af 100644 --- a/src/devices/cpu/arm/arm.h +++ b/src/devices/cpu/arm/arm.h @@ -64,8 +64,8 @@ protected: virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; address_space_config m_program_config; - memory_access<26, 2, 0, ENDIANNESS_LITTLE>::cache m_cachele; - memory_access<26, 2, 0, ENDIANNESS_BIG>::cache m_cachebe; + memory_access<26, 2, 0, ENDIANNESS_LITTLE>::specific m_cachele; + memory_access<26, 2, 0, ENDIANNESS_BIG>::specific m_cachebe; int m_icount; uint32_t m_sArmRegister[27]; diff --git a/src/devices/cpu/arm7/arm7.cpp b/src/devices/cpu/arm7/arm7.cpp index 608d84a8612..94c077b71e2 100644 --- a/src/devices/cpu/arm7/arm7.cpp +++ b/src/devices/cpu/arm7/arm7.cpp @@ -641,13 +641,13 @@ void arm7_cpu_device::device_start() m_program = &space(AS_PROGRAM); if(m_program->endianness() == ENDIANNESS_LITTLE) { - m_program->cache(m_cachele); + m_program->specific(m_cachele); m_pr32 = [this](offs_t address) -> u32 { return m_cachele.read_dword(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cachele.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } else { - m_program->cache(m_cachebe); + m_program->specific(m_cachebe); m_pr32 = [this](offs_t address) -> u32 { return m_cachebe.read_dword(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cachebe.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } save_item(NAME(m_insn_prefetch_depth)); diff --git a/src/devices/cpu/arm7/arm7.h b/src/devices/cpu/arm7/arm7.h index 80757afe13b..9e2247d9dd5 100644 --- a/src/devices/cpu/arm7/arm7.h +++ b/src/devices/cpu/arm7/arm7.h @@ -141,8 +141,8 @@ protected: virtual bool get_t_flag() const override; address_space_config m_program_config; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cachele; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cachebe; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cachele; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cachebe; uint32_t m_r[/*NUM_REGS*/37]; diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp index 9df9049d5ba..91165374647 100644 --- a/src/devices/cpu/asap/asap.cpp +++ b/src/devices/cpu/asap/asap.cpp @@ -181,7 +181,7 @@ asap_device::asap_device(const machine_config &mconfig, const char *tag, device_ void asap_device::device_start() { // get our address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); // register our state for the debugger diff --git a/src/devices/cpu/asap/asap.h b/src/devices/cpu/asap/asap.h index 3adb9ef37f4..de33bb818d1 100644 --- a/src/devices/cpu/asap/asap.h +++ b/src/devices/cpu/asap/asap.h @@ -237,7 +237,7 @@ protected: uint32_t m_nextpc; uint8_t m_irq_state; int m_icount; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program; // src2val table, registers are at the end diff --git a/src/devices/cpu/bcp/dp8344.cpp b/src/devices/cpu/bcp/dp8344.cpp index b58599e3183..1f3b6603949 100644 --- a/src/devices/cpu/bcp/dp8344.cpp +++ b/src/devices/cpu/bcp/dp8344.cpp @@ -172,7 +172,7 @@ void dp8344_device::device_resolve_objects() void dp8344_device::device_start() { // get memory spaces - space(AS_PROGRAM).cache(m_inst_cache); + space(AS_PROGRAM).specific(m_inst_cache); space(AS_PROGRAM).specific(m_inst_space); space(AS_DATA).specific(m_data_space); diff --git a/src/devices/cpu/bcp/dp8344.h b/src/devices/cpu/bcp/dp8344.h index f4e1e674da9..67a98d6d8e4 100644 --- a/src/devices/cpu/bcp/dp8344.h +++ b/src/devices/cpu/bcp/dp8344.h @@ -146,7 +146,7 @@ private: // address spaces const address_space_config m_inst_config; const address_space_config m_data_config; - memory_access<16, 1, -1, ENDIANNESS_LITTLE>::cache m_inst_cache; + memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_inst_cache; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_inst_space; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_data_space; diff --git a/src/devices/cpu/capricorn/capricorn.cpp b/src/devices/cpu/capricorn/capricorn.cpp index 0f937891e47..963187699da 100644 --- a/src/devices/cpu/capricorn/capricorn.cpp +++ b/src/devices/cpu/capricorn/capricorn.cpp @@ -172,7 +172,7 @@ void capricorn_cpu_device::device_start() // Flags state_add(STATE_GENFLAGS , "GENFLAGS" , m_flags).noshow().formatstr("%9s"); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); save_item(NAME(m_reg)); diff --git a/src/devices/cpu/capricorn/capricorn.h b/src/devices/cpu/capricorn/capricorn.h index 40bbb2cc3ab..d29795d0c82 100644 --- a/src/devices/cpu/capricorn/capricorn.h +++ b/src/devices/cpu/capricorn/capricorn.h @@ -57,7 +57,7 @@ protected: private: address_space_config m_program_config; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; int m_icount; diff --git a/src/devices/cpu/ccpu/ccpu.cpp b/src/devices/cpu/ccpu/ccpu.cpp index 55bba0dd96e..d7a231cc74b 100644 --- a/src/devices/cpu/ccpu/ccpu.cpp +++ b/src/devices/cpu/ccpu/ccpu.cpp @@ -107,7 +107,7 @@ void ccpu_cpu_device::device_start() m_vector_callback.resolve(); assert(!m_vector_callback.isnull()); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/ccpu/ccpu.h b/src/devices/cpu/ccpu/ccpu.h index c4377f251e3..b6d22f18c92 100644 --- a/src/devices/cpu/ccpu/ccpu.h +++ b/src/devices/cpu/ccpu/ccpu.h @@ -100,7 +100,7 @@ protected: int m_icount; - memory_access<15, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<15, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<15, 0, 0, ENDIANNESS_BIG>::specific m_program; memory_access<32, 1, -1, ENDIANNESS_BIG>::specific m_data; memory_access< 5, 0, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/cop400/cop400.cpp b/src/devices/cpu/cop400/cop400.cpp index 22495ff2c92..fda4b911cd7 100644 --- a/src/devices/cpu/cop400/cop400.cpp +++ b/src/devices/cpu/cop400/cop400.cpp @@ -1073,7 +1073,7 @@ void cop400_cpu_device::device_timer(emu_timer &timer, device_timer_id id, int p void cop400_cpu_device::device_start() { /* find address spaces */ - space(AS_PROGRAM).cache(m_program); + space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); /* find i/o handlers */ diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h index b51732fecf8..213cd87dc38 100644 --- a/src/devices/cpu/cop400/cop400.h +++ b/src/devices/cpu/cop400/cop400.h @@ -184,7 +184,7 @@ protected: bool m_has_counter; bool m_has_inil; - memory_access<11, 0, 0, ENDIANNESS_LITTLE>::cache m_program; + memory_access<11, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 7, 0, 0, ENDIANNESS_LITTLE>::specific m_data; uint8_t m_featuremask; diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp index 6f824b90d64..a87a2e258db 100644 --- a/src/devices/cpu/cosmac/cosmac.cpp +++ b/src/devices/cpu/cosmac/cosmac.cpp @@ -464,7 +464,7 @@ void cosmac_device::device_start() m_write_tpb.resolve_safe(); // get our address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/cosmac/cosmac.h b/src/devices/cpu/cosmac/cosmac.h index 314bad599e8..8c7437aefbe 100644 --- a/src/devices/cpu/cosmac/cosmac.h +++ b/src/devices/cpu/cosmac/cosmac.h @@ -415,7 +415,7 @@ protected: // internal stuff int m_icount; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 3, 0, 0, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/cr16b/cr16b.cpp b/src/devices/cpu/cr16b/cr16b.cpp index c9c6d414caf..c1cadf15c0a 100644 --- a/src/devices/cpu/cr16b/cr16b.cpp +++ b/src/devices/cpu/cr16b/cr16b.cpp @@ -51,7 +51,7 @@ device_memory_interface::space_config_vector cr16b_device::memory_space_config() void cr16b_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/cr16b/cr16b.h b/src/devices/cpu/cr16b/cr16b.h index a8028b03108..560b5d87bf6 100644 --- a/src/devices/cpu/cr16b/cr16b.h +++ b/src/devices/cpu/cr16b/cr16b.h @@ -42,7 +42,7 @@ protected: private: // address space address_space_config m_space_config; - memory_access<21, 1, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<21, 1, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<21, 1, 0, ENDIANNESS_LITTLE>::specific m_space; // internal state diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp index a33fd877505..df5e409b8fd 100644 --- a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp +++ b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp @@ -182,7 +182,7 @@ void cquestsnd_cpu_device::device_start() assert(m_sound_region_tag != nullptr); m_sound_data = (u16*)machine().root_device().memregion(m_sound_region_tag)->base(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); memset(m_ram, 0, sizeof(m_ram)); @@ -261,7 +261,7 @@ void cquestrot_cpu_device::device_start() { m_linedata_w.resolve_safe(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); memset(m_ram, 0, sizeof(m_ram)); @@ -392,7 +392,7 @@ void cquestlin_cpu_device::device_start() { m_linedata_r.resolve_safe(0); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); memset(m_ram, 0, sizeof(m_ram)); diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.h b/src/devices/cpu/cubeqcpu/cubeqcpu.h index 54070a1bd48..5f658f352be 100644 --- a/src/devices/cpu/cubeqcpu/cubeqcpu.h +++ b/src/devices/cpu/cubeqcpu/cubeqcpu.h @@ -99,7 +99,7 @@ private: const char *m_sound_region_tag; u16 *m_sound_data; - memory_access<9, 3, -3, ENDIANNESS_BIG>::cache m_cache; + memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_cache; memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_program; int m_icount; @@ -209,7 +209,7 @@ private: u8 m_rc; u8 m_clkcnt; - memory_access<9, 3, -3, ENDIANNESS_BIG>::cache m_cache; + memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_cache; memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_program; int m_icount; @@ -326,7 +326,7 @@ private: u32 m_e_stack[32768]; /* Stack DRAM: 32kx20 */ u32 m_o_stack[32768]; /* Stack DRAM: 32kx20 */ - memory_access<9, 3, -3, ENDIANNESS_BIG>::cache m_cache; + memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_cache; memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_program; int m_icount; diff --git a/src/devices/cpu/diablo/diablo1300.cpp b/src/devices/cpu/diablo/diablo1300.cpp index 81fe6e4142b..c9f14f30365 100644 --- a/src/devices/cpu/diablo/diablo1300.cpp +++ b/src/devices/cpu/diablo/diablo1300.cpp @@ -104,7 +104,7 @@ diablo1300_cpu_device::diablo1300_cpu_device(const machine_config &mconfig, cons void diablo1300_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); m_table = memregion("trom"); diff --git a/src/devices/cpu/diablo/diablo1300.h b/src/devices/cpu/diablo/diablo1300.h index ebccc694654..028eb19d8b3 100644 --- a/src/devices/cpu/diablo/diablo1300.h +++ b/src/devices/cpu/diablo/diablo1300.h @@ -72,7 +72,7 @@ protected: int m_icount; // address spaces - memory_access<9, 1, -1, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<9, 1, -1, ENDIANNESS_LITTLE>::specific m_cache; memory_access<9, 1, -1, ENDIANNESS_LITTLE>::specific m_program; memory_access<5, 0, 0, ENDIANNESS_LITTLE>::specific m_data; diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp index a4ff22587e9..3b7de8c4142 100644 --- a/src/devices/cpu/dsp16/dsp16.cpp +++ b/src/devices/cpu/dsp16/dsp16.cpp @@ -231,7 +231,7 @@ void dsp16_device_base::device_start() m_spaces[AS_PROGRAM] = &space(AS_PROGRAM); m_spaces[AS_DATA] = &space(AS_DATA); m_spaces[AS_IO] = &space(AS_IO); - m_spaces[AS_PROGRAM]->cache(m_pcache); + m_spaces[AS_PROGRAM]->specific(m_pcache); m_workram_mask = u16((m_workram.bytes() >> 1) - 1); if (allow_drc()) diff --git a/src/devices/cpu/dsp16/dsp16.h b/src/devices/cpu/dsp16/dsp16.h index 3f7ae66dd53..dec252a4184 100644 --- a/src/devices/cpu/dsp16/dsp16.h +++ b/src/devices/cpu/dsp16/dsp16.h @@ -275,7 +275,7 @@ private: // memory system access required_shared_ptr<u16> m_workram; address_space *m_spaces[3]; - memory_access<16, 1, -1, ENDIANNESS_BIG>::cache m_pcache; + memory_access<16, 1, -1, ENDIANNESS_BIG>::specific m_pcache; u16 m_workram_mask; // recompiler stuff diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp index c7452161137..569e99e5adc 100644 --- a/src/devices/cpu/dsp32/dsp32.cpp +++ b/src/devices/cpu/dsp32/dsp32.cpp @@ -189,7 +189,7 @@ void dsp32c_device::device_start() m_output_pins_changed.resolve_safe(); // get our address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); // register our state for the debugger diff --git a/src/devices/cpu/dsp32/dsp32.h b/src/devices/cpu/dsp32/dsp32.h index 90ede0181fa..e781d4d99b6 100644 --- a/src/devices/cpu/dsp32/dsp32.h +++ b/src/devices/cpu/dsp32/dsp32.h @@ -416,7 +416,7 @@ protected: int m_icount; uint8_t m_lastpins; uint32_t m_ppc; - memory_access<24, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<24, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<24, 2, 0, ENDIANNESS_LITTLE>::specific m_program; devcb_write32 m_output_pins_changed; diff --git a/src/devices/cpu/dsp56156/dsp56156.cpp b/src/devices/cpu/dsp56156/dsp56156.cpp index 04952c0f7d3..d0ed7f62be3 100644 --- a/src/devices/cpu/dsp56156/dsp56156.cpp +++ b/src/devices/cpu/dsp56156/dsp56156.cpp @@ -291,7 +291,7 @@ void dsp56156_device::device_start() save_item(NAME(m_core.peripheral_ram)); - space(AS_PROGRAM).cache(m_core.cache); + space(AS_PROGRAM).specific(m_core.cache); space(AS_PROGRAM).specific(m_core.program); space(AS_DATA).specific(m_core.data); diff --git a/src/devices/cpu/dsp56156/dsp56156.h b/src/devices/cpu/dsp56156/dsp56156.h index cc8ebe6741d..ef8f44aea5b 100644 --- a/src/devices/cpu/dsp56156/dsp56156.h +++ b/src/devices/cpu/dsp56156/dsp56156.h @@ -191,7 +191,7 @@ struct dsp56156_core int interrupt_cycles; void (*output_pins_changed)(uint32_t pins); cpu_device *device; - memory_access<16, 1, -1, ENDIANNESS_LITTLE>::cache cache; + memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific cache; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific program; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific data; diff --git a/src/devices/cpu/dspp/dspp.cpp b/src/devices/cpu/dspp/dspp.cpp index dded3f028f9..872b3f48ef5 100644 --- a/src/devices/cpu/dspp/dspp.cpp +++ b/src/devices/cpu/dspp/dspp.cpp @@ -158,7 +158,7 @@ void dspp_device::device_start() m_dma_write_handler.resolve_safe(); // Get our address spaces - space(AS_PROGRAM).cache(m_code_cache); + space(AS_PROGRAM).specific(m_code_cache); space(AS_PROGRAM).specific(m_code); space(AS_DATA).specific(m_data); diff --git a/src/devices/cpu/dspp/dspp.h b/src/devices/cpu/dspp/dspp.h index 68492fb7f40..4958fff1af5 100644 --- a/src/devices/cpu/dspp/dspp.h +++ b/src/devices/cpu/dspp/dspp.h @@ -199,7 +199,7 @@ private: // Address spaces const address_space_config m_code_config; const address_space_config m_data_config; - memory_access<10, 1, -1, ENDIANNESS_BIG>::cache m_code_cache; + memory_access<10, 1, -1, ENDIANNESS_BIG>::specific m_code_cache; memory_access<10, 1, -1, ENDIANNESS_BIG>::specific m_code; memory_access<10, 1, -1, ENDIANNESS_BIG>::specific m_data; diff --git a/src/devices/cpu/dspp/dsppdrc.cpp b/src/devices/cpu/dspp/dsppdrc.cpp index 947c698576f..e37d53eab69 100644 --- a/src/devices/cpu/dspp/dsppdrc.cpp +++ b/src/devices/cpu/dspp/dsppdrc.cpp @@ -292,7 +292,7 @@ void dspp_device::generate_checksum_block(drcuml_block &block, compiler_state *c { uint32_t sum = seqhead->opptr.w[0]; uint32_t addr = seqhead->physpc; - const void *base = m_code_cache.read_ptr(addr); + const void *base = space(AS_PROGRAM).get_read_ptr(addr); UML_MOV(block, I0, 0); UML_LOAD(block, I0, base, 0, SIZE_WORD, SCALE_x2); // load i0,base,0,word @@ -306,14 +306,14 @@ void dspp_device::generate_checksum_block(drcuml_block &block, compiler_state *c { uint32_t sum = 0; uint32_t addr = seqhead->physpc; - const void *base = m_code_cache.read_ptr(addr); + const void *base = space(AS_PROGRAM).get_read_ptr(addr); UML_LOAD(block, I0, base, 0, SIZE_WORD, SCALE_x2); // load i0,base,0,dword sum += seqhead->opptr.w[0]; for (curdesc = seqhead->next(); curdesc != seqlast->next(); curdesc = curdesc->next()) if (!(curdesc->flags & OPFLAG_VIRTUAL_NOOP)) { addr = curdesc->physpc; - base = m_code_cache.read_ptr(addr); + base = space(AS_PROGRAM).get_read_ptr(addr); assert(base != nullptr); UML_LOAD(block, I1, base, 0, SIZE_WORD, SCALE_x2); // load i1,base,dword UML_ADD(block, I0, I0, I1); // add i0,i0,i1 diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp index c328c0a35d7..61a0711743c 100644 --- a/src/devices/cpu/e132xs/e132xs.cpp +++ b/src/devices/cpu/e132xs/e132xs.cpp @@ -1117,24 +1117,24 @@ void hyperstone_device::init(int scale_mask) m_program = &space(AS_PROGRAM); if (m_program->data_width() == 16) { - m_program->cache(m_cache16); + m_program->specific(m_cache16); m_pr16 = [this](offs_t address) -> u16 { return m_cache16.read_word(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cache16.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } else { - m_program->cache(m_cache32); + m_program->specific(m_cache32); m_pr16 = [this](offs_t address) -> u16 { return m_cache32.read_word(address); }; if (ENDIANNESS_NATIVE != ENDIANNESS_BIG) m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache32.read_ptr(address & ~3)); + const u16 *ptr = static_cast<u16 *>(m_program->get_read_ptr(address & ~3)); if(!(address & 2)) ptr++; return ptr; }; else m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache32.read_ptr(address & ~3)); + const u16 *ptr = static_cast<u16 *>(m_program->get_read_ptr(address & ~3)); if(address & 2) ptr++; return ptr; diff --git a/src/devices/cpu/e132xs/e132xs.h b/src/devices/cpu/e132xs/e132xs.h index fb50a3dfb5b..d1faa7b123c 100644 --- a/src/devices/cpu/e132xs/e132xs.h +++ b/src/devices/cpu/e132xs/e132xs.h @@ -305,8 +305,8 @@ protected: const address_space_config m_program_config; const address_space_config m_io_config; address_space *m_program; - memory_access<32, 1, 0, ENDIANNESS_BIG>::cache m_cache16; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache32; + memory_access<32, 1, 0, ENDIANNESS_BIG>::specific m_cache16; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache32; std::function<u16 (offs_t)> m_pr16; std::function<const void * (offs_t)> m_prptr; diff --git a/src/devices/cpu/esrip/esrip.cpp b/src/devices/cpu/esrip/esrip.cpp index 931b5866308..c9566f88106 100644 --- a/src/devices/cpu/esrip/esrip.cpp +++ b/src/devices/cpu/esrip/esrip.cpp @@ -192,7 +192,7 @@ void esrip_device::device_start() /* Allocate image pointer table RAM */ m_ipt_ram.resize(IPT_RAM_SIZE/2); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); // register our state for the debugger diff --git a/src/devices/cpu/esrip/esrip.h b/src/devices/cpu/esrip/esrip.h index f58b2d41a97..6d5bc0ec67c 100644 --- a/src/devices/cpu/esrip/esrip.h +++ b/src/devices/cpu/esrip/esrip.h @@ -176,7 +176,7 @@ protected: std::vector<uint16_t> m_ipt_ram; uint8_t *m_lbrm; - memory_access<9, 3, -3, ENDIANNESS_BIG>::cache m_cache; + memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_cache; memory_access<9, 3, -3, ENDIANNESS_BIG>::specific m_program; int m_icount; diff --git a/src/devices/cpu/f8/f8.cpp b/src/devices/cpu/f8/f8.cpp index 9aa27af8f54..6b85485d8e3 100644 --- a/src/devices/cpu/f8/f8.cpp +++ b/src/devices/cpu/f8/f8.cpp @@ -108,8 +108,8 @@ void f8_cpu_device::state_string_export(const device_state_entry &entry, std::st void f8_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_program); - space(AS_DATA).cache(m_r); + space(AS_PROGRAM).specific(m_program); + space(AS_DATA).specific(m_r); space(AS_IO).specific(m_ios); // zerofill diff --git a/src/devices/cpu/f8/f8.h b/src/devices/cpu/f8/f8.h index ed12ecab708..5c87f791ba3 100644 --- a/src/devices/cpu/f8/f8.h +++ b/src/devices/cpu/f8/f8.h @@ -66,8 +66,8 @@ private: u8 m_dbus; /* data bus value */ u16 m_io; /* last I/O address */ u16 m_irq_vector; - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_program; - memory_access<6, 0, 0, ENDIANNESS_BIG>::cache m_r; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program; + memory_access<6, 0, 0, ENDIANNESS_BIG>::specific m_r; memory_access<8, 0, 0, ENDIANNESS_BIG>::specific m_ios; int m_icount; int m_irq_request; diff --git a/src/devices/cpu/fr/fr.cpp b/src/devices/cpu/fr/fr.cpp index 51ae7313780..a1bb18acd8b 100644 --- a/src/devices/cpu/fr/fr.cpp +++ b/src/devices/cpu/fr/fr.cpp @@ -53,7 +53,7 @@ device_memory_interface::space_config_vector fr_cpu_device::memory_space_config( void fr_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/fr/fr.h b/src/devices/cpu/fr/fr.h index 60e6eb8469f..e4d31daf799 100644 --- a/src/devices/cpu/fr/fr.h +++ b/src/devices/cpu/fr/fr.h @@ -43,7 +43,7 @@ protected: private: // address space address_space_config m_space_config; - memory_access<24, 2, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<24, 2, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<24, 2, 0, ENDIANNESS_BIG>::specific m_space; // internal state diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp index 7ecc352b09a..ad05eeae37e 100644 --- a/src/devices/cpu/g65816/g65816.cpp +++ b/src/devices/cpu/g65816/g65816.cpp @@ -871,8 +871,8 @@ void g65816_device::device_start() m_execute = nullptr; m_debugger_temp = 0; - space(AS_PROGRAM).cache(m_program); - (has_space(AS_OPCODES) ? space(AS_OPCODES) : space(AS_PROGRAM)).cache(m_opcode); + space(AS_PROGRAM).specific(m_program); + (has_space(AS_OPCODES) ? space(AS_OPCODES) : space(AS_PROGRAM)).specific(m_opcode); (has_space(AS_DATA) ? space(AS_DATA) : space(AS_PROGRAM)).specific(m_data); m_wdm_w.resolve_safe(); diff --git a/src/devices/cpu/g65816/g65816.h b/src/devices/cpu/g65816/g65816.h index 7d12db2a995..5a8b7b90b41 100644 --- a/src/devices/cpu/g65816/g65816.h +++ b/src/devices/cpu/g65816/g65816.h @@ -233,8 +233,8 @@ protected: unsigned m_fastROM; /* SNES specific */ unsigned m_ir; /* Instruction Register */ unsigned m_irq_delay; /* delay 1 instruction before checking irq */ - memory_access<24, 0, 0, ENDIANNESS_LITTLE>::cache m_program; - memory_access<24, 0, 0, ENDIANNESS_LITTLE>::cache m_opcode; + memory_access<24, 0, 0, ENDIANNESS_LITTLE>::specific m_program; + memory_access<24, 0, 0, ENDIANNESS_LITTLE>::specific m_opcode; memory_access<24, 0, 0, ENDIANNESS_LITTLE>::specific m_data; unsigned m_stopped; /* Sets how the CPU is stopped */ diff --git a/src/devices/cpu/h16/hd641016.cpp b/src/devices/cpu/h16/hd641016.cpp index b52b50c20bf..a698995471b 100644 --- a/src/devices/cpu/h16/hd641016.cpp +++ b/src/devices/cpu/h16/hd641016.cpp @@ -145,8 +145,8 @@ std::unique_ptr<util::disasm_interface> hd641016_device::create_disassembler() void hd641016_device::device_start() { space(AS_PROGRAM).specific(m_program); - space(AS_PROGRAM).cache(m_cache); - space(AS_DATA).cache(m_data); + space(AS_PROGRAM).specific(m_cache); + space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); set_icountptr(m_icount); diff --git a/src/devices/cpu/h16/hd641016.h b/src/devices/cpu/h16/hd641016.h index 1c93f5a2ff3..66754ba9dd5 100644 --- a/src/devices/cpu/h16/hd641016.h +++ b/src/devices/cpu/h16/hd641016.h @@ -118,8 +118,8 @@ private: address_space_config m_data_config; address_space_config m_io_config; memory_access<24, 1, 0, ENDIANNESS_BIG>::specific m_program; - memory_access<24, 1, 0, ENDIANNESS_BIG>::cache m_cache; - memory_access<10, 2, 0, ENDIANNESS_BIG>::cache m_data; + memory_access<24, 1, 0, ENDIANNESS_BIG>::specific m_cache; + memory_access<10, 2, 0, ENDIANNESS_BIG>::specific m_data; memory_access<9, 2, 0, ENDIANNESS_BIG>::specific m_io; u32 m_pc; diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp index 96ecb18534d..9c9c7491c50 100644 --- a/src/devices/cpu/h6280/h6280.cpp +++ b/src/devices/cpu/h6280/h6280.cpp @@ -320,7 +320,7 @@ void h6280_device::device_reset() #endif m_io_buffer = 0; - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h index 22d3ac06ce6..6fe207f246c 100644 --- a/src/devices/cpu/h6280/h6280.h +++ b/src/devices/cpu/h6280/h6280.h @@ -380,7 +380,7 @@ protected: uint8_t m_timer_scale; // address spaces - memory_access<21, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<21, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<21, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 2, 0, 0, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp index 0b4d35ebbd5..081f003ee30 100644 --- a/src/devices/cpu/h8/h8.cpp +++ b/src/devices/cpu/h8/h8.cpp @@ -38,7 +38,7 @@ void h8_device::device_config_complete() void h8_device::device_start() { - space(AS_PROGRAM).cache(cache); + space(AS_PROGRAM).specific(cache); space(AS_PROGRAM).specific(program); space(AS_IO).specific(io); diff --git a/src/devices/cpu/h8/h8.h b/src/devices/cpu/h8/h8.h index e8e1647288e..72707bc0a3c 100644 --- a/src/devices/cpu/h8/h8.h +++ b/src/devices/cpu/h8/h8.h @@ -113,7 +113,7 @@ protected: virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; address_space_config program_config, io_config; - memory_access<32, 1, 0, ENDIANNESS_BIG>::cache cache; + memory_access<32, 1, 0, ENDIANNESS_BIG>::specific cache; memory_access<32, 1, 0, ENDIANNESS_BIG>::specific program; memory_access<16, 1, -1, ENDIANNESS_BIG>::specific io; h8_dma_device *dma_device; diff --git a/src/devices/cpu/h8500/h8500.cpp b/src/devices/cpu/h8500/h8500.cpp index c96fed16f7f..bf3b76e586a 100644 --- a/src/devices/cpu/h8500/h8500.cpp +++ b/src/devices/cpu/h8500/h8500.cpp @@ -66,7 +66,7 @@ void h8500_device::device_start() { m_program = &space(AS_PROGRAM); if (has_space(AS_DATA)) - space(AS_DATA).cache(m_ram_cache); + space(AS_DATA).specific(m_ram_cache); set_icountptr(m_icount); diff --git a/src/devices/cpu/h8500/h8500.h b/src/devices/cpu/h8500/h8500.h index ede393687a9..7f09fd992a9 100644 --- a/src/devices/cpu/h8500/h8500.h +++ b/src/devices/cpu/h8500/h8500.h @@ -50,7 +50,7 @@ private: address_space_config m_program_config; address_space_config m_ram_config; address_space *m_program; - memory_access<11, 1, 0, ENDIANNESS_BIG>::cache m_ram_cache; + memory_access<11, 1, 0, ENDIANNESS_BIG>::specific m_ram_cache; // internal registers u16 m_pc; diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp index fae3b8474c7..cefc3e8cdff 100644 --- a/src/devices/cpu/hphybrid/hphybrid.cpp +++ b/src/devices/cpu/hphybrid/hphybrid.cpp @@ -219,7 +219,7 @@ void hp_hybrid_cpu_device::device_start() state_add(HPHYBRID_I, "I", m_reg_I).noshow(); } - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/hphybrid/hphybrid.h b/src/devices/cpu/hphybrid/hphybrid.h index 3d4a7cc7536..7105fe3cf05 100644 --- a/src/devices/cpu/hphybrid/hphybrid.h +++ b/src/devices/cpu/hphybrid/hphybrid.h @@ -198,7 +198,7 @@ protected: uint16_t m_reg_r26; // R26 register uint16_t m_reg_r27; // R27 register - memory_access<22, 1, -1, ENDIANNESS_BIG>::cache m_cache; + memory_access<22, 1, -1, ENDIANNESS_BIG>::specific m_cache; memory_access<22, 1, -1, ENDIANNESS_BIG>::specific m_program; memory_access< 6, 1, -1, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/i386/athlon.cpp b/src/devices/cpu/i386/athlon.cpp index dddfa80fa35..b7f5c9b0910 100644 --- a/src/devices/cpu/i386/athlon.cpp +++ b/src/devices/cpu/i386/athlon.cpp @@ -30,7 +30,7 @@ void athlonxp_device::device_start() register_state_i386_x87_xmm(); space(AS_DATA).specific(m_data); space(AS_OPCODES).specific(m_opcodes); - space(AS_DATA).cache(mmacache32); + space(AS_DATA).specific(mmacache32); space(AS_OPCODES).install_read_handler(0, 0xffffffff, read32sm_delegate(*this, FUNC(athlonxp_device::debug_read_memory))); diff --git a/src/devices/cpu/i386/athlon.h b/src/devices/cpu/i386/athlon.h index 69cc6d84794..0af1a2d700a 100644 --- a/src/devices/cpu/i386/athlon.h +++ b/src/devices/cpu/i386/athlon.h @@ -56,7 +56,7 @@ private: address_space_config m_data_config; address_space_config m_opcodes_config; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache mmacache32; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific mmacache32; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_opcodes; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_data; uint8_t m_processor_name_string[48]; diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp index e8fdf6a12ea..954c8e3f328 100644 --- a/src/devices/cpu/i386/i386.cpp +++ b/src/devices/cpu/i386/i386.cpp @@ -1937,9 +1937,9 @@ void i386_device::i386_common_init() m_program = &space(AS_PROGRAM); if(m_program->data_width() == 16) { // for the 386sx - m_program->cache(macache16); + m_program->specific(macache16); } else { - m_program->cache(macache32); + m_program->specific(macache32); } m_io = &space(AS_IO); diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h index 64730816b66..bb5cb6c3c8b 100644 --- a/src/devices/cpu/i386/i386.h +++ b/src/devices/cpu/i386/i386.h @@ -307,8 +307,8 @@ protected: address_space *m_program; address_space *m_io; uint32_t m_a20_mask; - memory_access<32, 1, 0, ENDIANNESS_LITTLE>::cache macache16; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache macache32; + memory_access<32, 1, 0, ENDIANNESS_LITTLE>::specific macache16; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific macache32; int m_cpuid_max_input_value_eax; // Highest CPUID standard function available uint32_t m_cpuid_id0, m_cpuid_id1, m_cpuid_id2; diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp index 0bd6ce04176..266f884bd5c 100644 --- a/src/devices/cpu/i8008/i8008.cpp +++ b/src/devices/cpu/i8008/i8008.cpp @@ -50,7 +50,7 @@ i8008_device::i8008_device(const machine_config &mconfig, const char *tag, devic void i8008_device::device_start() { // find address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/i8008/i8008.h b/src/devices/cpu/i8008/i8008.h index b3183a0640c..642ccf57dbc 100644 --- a/src/devices/cpu/i8008/i8008.h +++ b/src/devices/cpu/i8008/i8008.h @@ -81,7 +81,7 @@ protected: uint8_t m_PARITY[256]; - memory_access<14, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<14, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<14, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 5, 0, 0, ENDIANNESS_LITTLE>::specific m_io; }; diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp index 5460ab653ea..de389d3d3b5 100644 --- a/src/devices/cpu/i8085/i8085.cpp +++ b/src/devices/cpu/i8085/i8085.cpp @@ -347,9 +347,9 @@ void i8085a_cpu_device::device_start() } } - space(AS_PROGRAM).cache(m_cprogram); + space(AS_PROGRAM).specific(m_cprogram); space(AS_PROGRAM).specific(m_program); - space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(m_copcodes); + space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).specific(m_copcodes); space(AS_IO).specific(m_io); /* resolve callbacks */ diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h index 5378a712e5e..5029037cb11 100644 --- a/src/devices/cpu/i8085/i8085.h +++ b/src/devices/cpu/i8085/i8085.h @@ -129,7 +129,7 @@ private: bool m_ietemp; /* import/export temp space */ - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cprogram, m_copcodes; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cprogram, m_copcodes; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 8, 0, 0, ENDIANNESS_LITTLE>::specific m_io; int m_icount; diff --git a/src/devices/cpu/i86/i86.cpp b/src/devices/cpu/i86/i86.cpp index de5aceba216..ac1504d3e1b 100644 --- a/src/devices/cpu/i86/i86.cpp +++ b/src/devices/cpu/i86/i86.cpp @@ -470,10 +470,10 @@ void i8086_common_cpu_device::device_start() m_opcodes = has_space(AS_OPCODES) ? &space(AS_OPCODES) : m_program; if(m_opcodes->data_width() == 8) { - m_opcodes->cache(m_cache8); + m_opcodes->specific(m_cache8); m_or8 = [this](offs_t address) -> u8 { return m_cache8.read_byte(address); }; } else { - m_opcodes->cache(m_cache16); + m_opcodes->specific(m_cache16); m_or8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(address); }; } m_io = &space(AS_IO); diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h index f08a8e0c2ba..5dc05cc0bc3 100644 --- a/src/devices/cpu/i86/i86.h +++ b/src/devices/cpu/i86/i86.h @@ -295,8 +295,8 @@ protected: uint8_t m_test_state; address_space *m_program, *m_opcodes; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::cache m_cache8; - memory_access<20, 1, 0, ENDIANNESS_LITTLE>::cache m_cache16; + memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_cache8; + memory_access<20, 1, 0, ENDIANNESS_LITTLE>::specific m_cache16; std::function<u8 (offs_t)> m_or8; address_space *m_io; diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp index ae17f211aba..3ddade15042 100644 --- a/src/devices/cpu/i960/i960.cpp +++ b/src/devices/cpu/i960/i960.cpp @@ -2245,7 +2245,7 @@ void i960_cpu_device::execute_set_input(int irqline, int state) void i960_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); save_item(NAME(m_IP)); diff --git a/src/devices/cpu/i960/i960.h b/src/devices/cpu/i960/i960.h index 8ebe214044c..ba92f97b27b 100644 --- a/src/devices/cpu/i960/i960.h +++ b/src/devices/cpu/i960/i960.h @@ -137,7 +137,7 @@ private: int m_immediate_vector; int m_immediate_pri; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program; int m_icount; diff --git a/src/devices/cpu/ie15/ie15.cpp b/src/devices/cpu/ie15/ie15.cpp index 828143e1715..13a13336d36 100644 --- a/src/devices/cpu/ie15/ie15.cpp +++ b/src/devices/cpu/ie15/ie15.cpp @@ -47,7 +47,7 @@ ie15_cpu_device::ie15_cpu_device(const machine_config &mconfig, const char *tag, void ie15_cpu_device::device_start() { // find address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/ie15/ie15.h b/src/devices/cpu/ie15/ie15.h index a0885ce55f1..78c7ddca253 100644 --- a/src/devices/cpu/ie15/ie15.h +++ b/src/devices/cpu/ie15/ie15.h @@ -72,7 +72,7 @@ protected: uint8_t m_RF; // Current register page uint8_t m_flags; // temporary I/O only - memory_access<14, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<14, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<14, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 8, 0, 0, ENDIANNESS_LITTLE>::specific m_io; }; diff --git a/src/devices/cpu/jaguar/jaguar.cpp b/src/devices/cpu/jaguar/jaguar.cpp index fbfcc0c8759..b8c699dbfb2 100644 --- a/src/devices/cpu/jaguar/jaguar.cpp +++ b/src/devices/cpu/jaguar/jaguar.cpp @@ -355,7 +355,7 @@ void jaguar_cpu_device::device_start() { init_tables(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); m_cpu_interrupt.resolve_safe(); diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h index 90ee5aef405..df8712e8baa 100644 --- a/src/devices/cpu/jaguar/jaguar.h +++ b/src/devices/cpu/jaguar/jaguar.h @@ -138,7 +138,7 @@ protected: int m_icount; int m_bankswitch_icount; devcb_write_line m_cpu_interrupt; - memory_access<24, 2, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<24, 2, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<24, 2, 0, ENDIANNESS_BIG>::specific m_program; memory_access< 8, 2, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/ks0164/ks0164.cpp b/src/devices/cpu/ks0164/ks0164.cpp index 8bb447993a4..e031d5ed7eb 100644 --- a/src/devices/cpu/ks0164/ks0164.cpp +++ b/src/devices/cpu/ks0164/ks0164.cpp @@ -23,7 +23,7 @@ ks0164_cpu_device::ks0164_cpu_device(const machine_config &mconfig, const char * void ks0164_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_program_cache); + space(AS_PROGRAM).specific(m_program_cache); space(AS_PROGRAM).specific(m_program); state_add(STATE_GENPC, "GENPC", m_r[R_PC]).callexport().noshow(); diff --git a/src/devices/cpu/ks0164/ks0164.h b/src/devices/cpu/ks0164/ks0164.h index 1df7e6f5e4b..a7f64d7c290 100644 --- a/src/devices/cpu/ks0164/ks0164.h +++ b/src/devices/cpu/ks0164/ks0164.h @@ -50,7 +50,7 @@ protected: virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; const address_space_config m_program_config; - memory_access<16, 1, 0, ENDIANNESS_BIG>::cache m_program_cache; + memory_access<16, 1, 0, ENDIANNESS_BIG>::specific m_program_cache; memory_access<16, 1, 0, ENDIANNESS_BIG>::specific m_program; void handle_irq(); diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp index 4d03d6c5c0e..551193c0116 100644 --- a/src/devices/cpu/lc8670/lc8670.cpp +++ b/src/devices/cpu/lc8670/lc8670.cpp @@ -194,7 +194,7 @@ lc8670_cpu_device::lc8670_cpu_device(const machine_config &mconfig, const char * void lc8670_cpu_device::device_start() { // find address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/lc8670/lc8670.h b/src/devices/cpu/lc8670/lc8670.h index 890472d689f..3b6d3cd0e4e 100644 --- a/src/devices/cpu/lc8670/lc8670.h +++ b/src/devices/cpu/lc8670/lc8670.h @@ -189,7 +189,7 @@ private: address_space_config m_data_config; address_space_config m_io_config; - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program; // program space (ROM or flash) memory_access< 9, 0, 0, ENDIANNESS_BIG>::specific m_data; // internal RAM/register memory_access< 8, 0, 0, ENDIANNESS_BIG>::specific m_io; // I/O ports diff --git a/src/devices/cpu/lh5801/lh5801.cpp b/src/devices/cpu/lh5801/lh5801.cpp index da156333eb0..812f80f8011 100644 --- a/src/devices/cpu/lh5801/lh5801.cpp +++ b/src/devices/cpu/lh5801/lh5801.cpp @@ -90,7 +90,7 @@ device_memory_interface::space_config_vector lh5801_cpu_device::memory_space_con void lh5801_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/lh5801/lh5801.h b/src/devices/cpu/lh5801/lh5801.h index 68c028289af..88f8b0baea6 100644 --- a/src/devices/cpu/lh5801/lh5801.h +++ b/src/devices/cpu/lh5801/lh5801.h @@ -99,7 +99,7 @@ private: devcb_read8 m_in_func; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; // ME0 memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; // ME1 diff --git a/src/devices/cpu/m37710/m37710.cpp b/src/devices/cpu/m37710/m37710.cpp index 9067979db62..49fcb8a8a47 100644 --- a/src/devices/cpu/m37710/m37710.cpp +++ b/src/devices/cpu/m37710/m37710.cpp @@ -1315,7 +1315,7 @@ void m37710_cpu_device::device_start() m_watchdog_freq = 0; std::fill(std::begin(m_int_control), std::end(m_int_control), 0); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); m_port_in_cb.resolve_all_safe(0xff); diff --git a/src/devices/cpu/m37710/m37710.h b/src/devices/cpu/m37710/m37710.h index 1ff34d91336..10ab1156212 100644 --- a/src/devices/cpu/m37710/m37710.h +++ b/src/devices/cpu/m37710/m37710.h @@ -270,7 +270,7 @@ private: int m_ICount; /* cycle count */ uint32_t m_source; /* temp register */ uint32_t m_destination; /* temp register */ - memory_access<24, 1, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<24, 1, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<24, 1, 0, ENDIANNESS_LITTLE>::specific m_program; uint32_t m_stopped; /* Sets how the CPU is stopped */ diff --git a/src/devices/cpu/m6502/m6502.cpp b/src/devices/cpu/m6502/m6502.cpp index f69e672ed31..da606ca297b 100644 --- a/src/devices/cpu/m6502/m6502.cpp +++ b/src/devices/cpu/m6502/m6502.cpp @@ -44,8 +44,8 @@ void m6502_device::device_start() void m6502_device::init() { - space(AS_PROGRAM).cache(mintf->cprogram); - space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(mintf->csprogram); + space(AS_PROGRAM).specific(mintf->cprogram); + space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).specific(mintf->csprogram); if(space(AS_PROGRAM).addr_width() > 14) space(AS_PROGRAM).specific(mintf->program); else diff --git a/src/devices/cpu/m6502/m6502.h b/src/devices/cpu/m6502/m6502.h index 077de2920ac..df7ed64d072 100644 --- a/src/devices/cpu/m6502/m6502.h +++ b/src/devices/cpu/m6502/m6502.h @@ -33,7 +33,7 @@ protected: class memory_interface { public: - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache cprogram, csprogram; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific cprogram, csprogram; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific program; memory_access<14, 0, 0, ENDIANNESS_LITTLE>::specific program14; diff --git a/src/devices/cpu/m6502/r65c19.cpp b/src/devices/cpu/m6502/r65c19.cpp index 0616a432504..48ca7ea514f 100644 --- a/src/devices/cpu/m6502/r65c19.cpp +++ b/src/devices/cpu/m6502/r65c19.cpp @@ -108,7 +108,7 @@ device_memory_interface::space_config_vector c39_device::memory_space_config() c void c39_device::device_start() { std::unique_ptr<mi_banked> intf = std::make_unique<mi_banked>(); - space(AS_DATA).cache(intf->escache); + space(AS_DATA).specific(intf->escache); space(AS_DATA).specific(intf->exp); space(AS_IO).specific(intf->es4); diff --git a/src/devices/cpu/m6502/r65c19.h b/src/devices/cpu/m6502/r65c19.h index 6f018fb661b..0e586e49d61 100644 --- a/src/devices/cpu/m6502/r65c19.h +++ b/src/devices/cpu/m6502/r65c19.h @@ -138,7 +138,7 @@ private: u8 es4_read(u16 adr); void es4_write(u16 adr, u8 val); - memory_access<21, 0, 0, ENDIANNESS_LITTLE>::cache escache; + memory_access<21, 0, 0, ENDIANNESS_LITTLE>::specific escache; memory_access<21, 0, 0, ENDIANNESS_LITTLE>::specific exp; memory_access< 9, 0, 0, ENDIANNESS_LITTLE>::specific es4; diff --git a/src/devices/cpu/m6502/st2204.cpp b/src/devices/cpu/m6502/st2204.cpp index 2523f34d5a8..9fb98300f38 100644 --- a/src/devices/cpu/m6502/st2204.cpp +++ b/src/devices/cpu/m6502/st2204.cpp @@ -79,7 +79,7 @@ void st2204_device::device_start() { std::unique_ptr<mi_st2204> intf = std::make_unique<mi_st2204>(); - space(AS_DATA).cache(intf->dcache); + space(AS_DATA).specific(intf->dcache); space(AS_DATA).specific(intf->data); intf->irr_enable = false; intf->irr = 0; diff --git a/src/devices/cpu/m6502/st2205u.cpp b/src/devices/cpu/m6502/st2205u.cpp index a9417ec2cce..d43d129f606 100644 --- a/src/devices/cpu/m6502/st2205u.cpp +++ b/src/devices/cpu/m6502/st2205u.cpp @@ -131,7 +131,7 @@ void st2205u_device::device_start() { std::unique_ptr<mi_st2205u> intf = std::make_unique<mi_st2205u>(); space(AS_DATA).specific(intf->data); - space(AS_DATA).cache(intf->dcache); + space(AS_DATA).specific(intf->dcache); intf->irr_enable = false; intf->irr = 0; intf->prr = 0; @@ -225,7 +225,7 @@ void st2302u_device::device_start() { std::unique_ptr<mi_st2302u> intf = std::make_unique<mi_st2302u>(); space(AS_DATA).specific(intf->data); - space(AS_DATA).cache(intf->dcache); + space(AS_DATA).specific(intf->dcache); intf->irr_enable = false; intf->irr = 0; intf->prr = 0; diff --git a/src/devices/cpu/m6502/st2xxx.h b/src/devices/cpu/m6502/st2xxx.h index cd6138b6e12..65c5b539c1f 100644 --- a/src/devices/cpu/m6502/st2xxx.h +++ b/src/devices/cpu/m6502/st2xxx.h @@ -119,7 +119,7 @@ protected: public: virtual u8 read_vector(u16 adr) = 0; - memory_access<26, 0, 0, ENDIANNESS_LITTLE>::cache dcache; + memory_access<26, 0, 0, ENDIANNESS_LITTLE>::specific dcache; memory_access<26, 0, 0, ENDIANNESS_LITTLE>::specific data; bool irq_service; diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp index 7eab9292599..ea82fc04e3e 100644 --- a/src/devices/cpu/m6800/m6800.cpp +++ b/src/devices/cpu/m6800/m6800.cpp @@ -546,8 +546,8 @@ void m6800_cpu_device::EAT_CYCLES() void m6800_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cprogram); - space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(m_copcodes); + space(AS_PROGRAM).specific(m_cprogram); + space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).specific(m_copcodes); space(AS_PROGRAM).specific(m_program); m_pc.d = 0; diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h index 1601a62b798..7b47a643c9c 100644 --- a/src/devices/cpu/m6800/m6800.h +++ b/src/devices/cpu/m6800/m6800.h @@ -82,7 +82,7 @@ protected: uint8_t m_irq_state[3]; /* IRQ line state [IRQ1,TIN,SC1] */ /* Memory spaces */ - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cprogram, m_copcodes; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cprogram, m_copcodes; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program; const op_func *m_insn; diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h index d048f68e2cc..a5b008af10d 100644 --- a/src/devices/cpu/m68000/m68000.h +++ b/src/devices/cpu/m68000/m68000.h @@ -261,9 +261,9 @@ protected: address_space *m_program, *m_oprogram, *m_cpu_space; - memory_access<24, 0, 0, ENDIANNESS_BIG>::cache m_oprogram8; - memory_access<24, 1, 0, ENDIANNESS_BIG>::cache m_oprogram16; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_oprogram32; + memory_access<24, 0, 0, ENDIANNESS_BIG>::specific m_oprogram8; + memory_access<24, 1, 0, ENDIANNESS_BIG>::specific m_oprogram16; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_oprogram32; memory_access<24, 0, 0, ENDIANNESS_BIG>::specific m_program8; memory_access<24, 1, 0, ENDIANNESS_BIG>::specific m_program16; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_program32; diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index 5088f184e43..24a623266e3 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -1305,7 +1305,7 @@ void m68000_base_device::init8(address_space &space, address_space &ospace) { m_space = &space; m_ospace = &ospace; - ospace.cache(m_oprogram8); + ospace.specific(m_oprogram8); space.specific(m_program8); m_readimm16 = [this](offs_t address) -> u16 { return m_oprogram8.read_word(address); }; @@ -1325,7 +1325,7 @@ void m68000_base_device::init16(address_space &space, address_space &ospace) { m_space = &space; m_ospace = &ospace; - ospace.cache(m_oprogram16); + ospace.specific(m_oprogram16); space.specific(m_program16); m_readimm16 = [this](offs_t address) -> u16 { return m_oprogram16.read_word(address); }; @@ -1350,7 +1350,7 @@ void m68000_base_device::init32(address_space &space, address_space &ospace) { m_space = &space; m_ospace = &ospace; - ospace.cache(m_oprogram32); + ospace.specific(m_oprogram32); space.specific(m_program32); m_readimm16 = [this](offs_t address) -> u16 { return m_oprogram32.read_word(address); }; @@ -1409,7 +1409,7 @@ void m68000_base_device::init32mmu(address_space &space, address_space &ospace) { m_space = &space; m_ospace = &ospace; - ospace.cache(m_oprogram32); + ospace.specific(m_oprogram32); space.specific(m_program32); m_readimm16 = [this](offs_t address) -> u16 { @@ -1579,7 +1579,7 @@ void m68000_base_device::init32hmmu(address_space &space, address_space &ospace) { m_space = &space; m_ospace = &ospace; - ospace.cache(m_oprogram32); + ospace.specific(m_oprogram32); space.specific(m_program32); m_readimm16 = [this](offs_t address) -> u16 { diff --git a/src/devices/cpu/m6805/m6805.cpp b/src/devices/cpu/m6805/m6805.cpp index 4e52a5631ec..4bff9b73c66 100644 --- a/src/devices/cpu/m6805/m6805.cpp +++ b/src/devices/cpu/m6805/m6805.cpp @@ -344,10 +344,10 @@ m6805_base_device::m6805_base_device( void m6805_base_device::device_start() { if (m_params.m_addr_width > 13) { - space(AS_PROGRAM).cache(m_cprogram16); + space(AS_PROGRAM).specific(m_cprogram16); space(AS_PROGRAM).specific(m_program16); } else { - space(AS_PROGRAM).cache(m_cprogram13); + space(AS_PROGRAM).specific(m_cprogram13); space(AS_PROGRAM).specific(m_program13); } diff --git a/src/devices/cpu/m6805/m6805.h b/src/devices/cpu/m6805/m6805.h index 8aaf1a2a1f0..7422579eccc 100644 --- a/src/devices/cpu/m6805/m6805.h +++ b/src/devices/cpu/m6805/m6805.h @@ -300,8 +300,8 @@ protected: int m_icount; // address spaces - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cprogram16; - memory_access<13, 0, 0, ENDIANNESS_BIG>::cache m_cprogram13; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cprogram16; + memory_access<13, 0, 0, ENDIANNESS_BIG>::specific m_cprogram13; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program16; memory_access<13, 0, 0, ENDIANNESS_BIG>::specific m_program13; }; diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp index 39ba49cda10..303e750efc0 100644 --- a/src/devices/cpu/m6809/m6809.cpp +++ b/src/devices/cpu/m6809/m6809.cpp @@ -156,9 +156,9 @@ void m6809_base_device::device_start() if (!m_mintf) m_mintf = std::make_unique<mi_default>(); - space(AS_PROGRAM).cache(m_mintf->cprogram); + space(AS_PROGRAM).specific(m_mintf->cprogram); space(AS_PROGRAM).specific(m_mintf->program); - space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(m_mintf->csprogram); + space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).specific(m_mintf->csprogram); m_lic_func.resolve_safe(); diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h index de8e5988236..5dee094995e 100644 --- a/src/devices/cpu/m6809/m6809.h +++ b/src/devices/cpu/m6809/m6809.h @@ -34,7 +34,7 @@ protected: class memory_interface { public: - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache cprogram, csprogram; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific cprogram, csprogram; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific program; virtual ~memory_interface() {} diff --git a/src/devices/cpu/m88000/m88000.cpp b/src/devices/cpu/m88000/m88000.cpp index 7498d02591d..7d7968395c1 100644 --- a/src/devices/cpu/m88000/m88000.cpp +++ b/src/devices/cpu/m88000/m88000.cpp @@ -43,7 +43,7 @@ device_memory_interface::space_config_vector mc88100_device::memory_space_config void mc88100_device::device_start() { - space(AS_PROGRAM).cache(m_inst_cache); + space(AS_PROGRAM).specific(m_inst_cache); space(AS_DATA).specific(m_data_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/m88000/m88000.h b/src/devices/cpu/m88000/m88000.h index c4e0c888475..35fbcc8aa93 100644 --- a/src/devices/cpu/m88000/m88000.h +++ b/src/devices/cpu/m88000/m88000.h @@ -49,7 +49,7 @@ private: // address spaces address_space_config m_code_config; address_space_config m_data_config; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_inst_cache; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_inst_cache; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_data_space; // register storage diff --git a/src/devices/cpu/mb86233/mb86233.cpp b/src/devices/cpu/mb86233/mb86233.cpp index b69cad9639c..ca3c6ad2cd5 100644 --- a/src/devices/cpu/mb86233/mb86233.cpp +++ b/src/devices/cpu/mb86233/mb86233.cpp @@ -88,7 +88,7 @@ std::unique_ptr<util::disasm_interface> mb86233_device::create_disassembler() void mb86233_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/mb86233/mb86233.h b/src/devices/cpu/mb86233/mb86233.h index 611eb1e5b33..55eb9c3cea6 100644 --- a/src/devices/cpu/mb86233/mb86233.h +++ b/src/devices/cpu/mb86233/mb86233.h @@ -88,7 +88,7 @@ private: address_space_config m_io_config; address_space_config m_rf_config; - memory_access<16, 2, -2, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 2, -2, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 2, -2, ENDIANNESS_LITTLE>::specific m_program; memory_access<16, 2, -2, ENDIANNESS_LITTLE>::specific m_data; memory_access<16, 2, -2, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/mb86235/mb86235.cpp b/src/devices/cpu/mb86235/mb86235.cpp index 45eb318704c..e8b2c12fe56 100644 --- a/src/devices/cpu/mb86235/mb86235.cpp +++ b/src/devices/cpu/mb86235/mb86235.cpp @@ -91,7 +91,7 @@ void mb86235_device::execute_run() void mb86235_device::device_start() { - space(AS_PROGRAM).cache(m_pcache); + space(AS_PROGRAM).specific(m_pcache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_dataa); space(AS_IO).specific(m_datab); diff --git a/src/devices/cpu/mb86235/mb86235.h b/src/devices/cpu/mb86235/mb86235.h index c859807bf56..1d4e52fdc84 100644 --- a/src/devices/cpu/mb86235/mb86235.h +++ b/src/devices/cpu/mb86235/mb86235.h @@ -172,7 +172,7 @@ private: std::unique_ptr<drcuml_state> m_drcuml; std::unique_ptr<mb86235_frontend> m_drcfe; - memory_access<32, 3, -3, ENDIANNESS_LITTLE>::cache m_pcache; + memory_access<32, 3, -3, ENDIANNESS_LITTLE>::specific m_pcache; memory_access<32, 3, -3, ENDIANNESS_LITTLE>::specific m_program; memory_access<24, 2, -2, ENDIANNESS_LITTLE>::specific m_dataa; memory_access<10, 2, -2, ENDIANNESS_LITTLE>::specific m_datab; diff --git a/src/devices/cpu/mb88xx/mb88xx.cpp b/src/devices/cpu/mb88xx/mb88xx.cpp index fe07ba80d2c..9d66fcd88a9 100644 --- a/src/devices/cpu/mb88xx/mb88xx.cpp +++ b/src/devices/cpu/mb88xx/mb88xx.cpp @@ -182,7 +182,7 @@ std::unique_ptr<util::disasm_interface> mb88_cpu_device::create_disassembler() void mb88_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h index df9c3dc283c..a7e9e1e9002 100644 --- a/src/devices/cpu/mb88xx/mb88xx.h +++ b/src/devices/cpu/mb88xx/mb88xx.h @@ -177,7 +177,7 @@ private: /* IRQ handling */ uint8_t m_pending_interrupt; - memory_access<11, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<11, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<11, 0, 0, ENDIANNESS_BIG>::specific m_program; memory_access< 7, 0, 0, ENDIANNESS_BIG>::specific m_data; diff --git a/src/devices/cpu/mc68hc11/mc68hc11.cpp b/src/devices/cpu/mc68hc11/mc68hc11.cpp index 3aa83784ca7..e78945075d8 100644 --- a/src/devices/cpu/mc68hc11/mc68hc11.cpp +++ b/src/devices/cpu/mc68hc11/mc68hc11.cpp @@ -639,7 +639,7 @@ void mc68hc11_cpu_device::device_start() } } - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/mc68hc11/mc68hc11.h b/src/devices/cpu/mc68hc11/mc68hc11.h index 33b6ab4be33..d2b78951949 100644 --- a/src/devices/cpu/mc68hc11/mc68hc11.h +++ b/src/devices/cpu/mc68hc11/mc68hc11.h @@ -141,7 +141,7 @@ private: int m_ad_channel; uint8_t m_irq_state[2]; - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program; memory_access<11, 0, 0, ENDIANNESS_BIG>::specific m_data; memory_access< 8, 0, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/mcs40/mcs40.cpp b/src/devices/cpu/mcs40/mcs40.cpp index 969f08c4197..49292e62923 100644 --- a/src/devices/cpu/mcs40/mcs40.cpp +++ b/src/devices/cpu/mcs40/mcs40.cpp @@ -141,7 +141,7 @@ void mcs40_cpu_device_base::device_start() m_spaces[AS_RAM_STATUS] = &space(AS_RAM_STATUS); m_spaces[AS_RAM_PORTS] = &space(AS_RAM_PORTS); m_spaces[AS_PROGRAM_MEMORY] = &space(AS_PROGRAM_MEMORY); - m_spaces[AS_ROM]->cache(m_cache); + m_spaces[AS_ROM]->specific(m_cache); m_bus_cycle_cb.resolve(); m_sync_cb.resolve_safe(); diff --git a/src/devices/cpu/mcs40/mcs40.h b/src/devices/cpu/mcs40/mcs40.h index 68a8dca161f..fd564d219ad 100644 --- a/src/devices/cpu/mcs40/mcs40.h +++ b/src/devices/cpu/mcs40/mcs40.h @@ -182,7 +182,7 @@ private: // address spaces address_space_config const m_space_config[7]; address_space *m_spaces[7]; - memory_access<12, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; // bus snooping callback bus_cycle_delegate m_bus_cycle_cb; diff --git a/src/devices/cpu/mcs48/mcs48.cpp b/src/devices/cpu/mcs48/mcs48.cpp index 58f3d31b150..d2a7f9e0b6b 100644 --- a/src/devices/cpu/mcs48/mcs48.cpp +++ b/src/devices/cpu/mcs48/mcs48.cpp @@ -1111,7 +1111,7 @@ void mcs48_cpu_device::device_start() /* FIXME: Current implementation suboptimal */ m_ea = (m_int_rom_size ? 0 : 1); - space(AS_PROGRAM).cache(m_program); + space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); if(m_feature_mask & EXT_BUS_FEATURE) space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h index fb78f63cc14..af2e0193cb7 100644 --- a/src/devices/cpu/mcs48/mcs48.h +++ b/src/devices/cpu/mcs48/mcs48.h @@ -213,7 +213,7 @@ protected: int m_icount; /* Memory spaces */ - memory_access<12, 0, 0, ENDIANNESS_LITTLE>::cache m_program; + memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access<8, 0, 0, ENDIANNESS_LITTLE>::specific m_data; memory_access<8, 0, 0, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp index 99c6950ef74..ad93a068e98 100644 --- a/src/devices/cpu/mcs51/mcs51.cpp +++ b/src/devices/cpu/mcs51/mcs51.cpp @@ -2155,7 +2155,7 @@ uint8_t mcs51_cpu_device::sfr_read(size_t offset) void mcs51_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_program); + space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h index a7e17d71b10..92ebd68200e 100644 --- a/src/devices/cpu/mcs51/mcs51.h +++ b/src/devices/cpu/mcs51/mcs51.h @@ -148,7 +148,7 @@ protected: virtual uint8_t sfr_read(size_t offset); /* Memory spaces */ - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_program; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 9, 0, 0, ENDIANNESS_LITTLE>::specific m_data; memory_access<17, 0, 0, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/mcs96/mcs96.cpp b/src/devices/cpu/mcs96/mcs96.cpp index e1524462f13..6811f95b9a9 100644 --- a/src/devices/cpu/mcs96/mcs96.cpp +++ b/src/devices/cpu/mcs96/mcs96.cpp @@ -26,10 +26,10 @@ void mcs96_device::device_start() { program = &space(AS_PROGRAM); if(program->data_width() == 8) { - program->cache(m_cache8); + program->specific(m_cache8); m_pr8 = [this](offs_t address) -> u8 { return m_cache8.read_byte(address); }; } else { - program->cache(m_cache16); + program->specific(m_cache16); m_pr8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(address); }; } regs = &space(AS_DATA); diff --git a/src/devices/cpu/mcs96/mcs96.h b/src/devices/cpu/mcs96/mcs96.h index b27d13044c7..7d8f49e7d51 100644 --- a/src/devices/cpu/mcs96/mcs96.h +++ b/src/devices/cpu/mcs96/mcs96.h @@ -65,8 +65,8 @@ protected: address_space_config program_config, regs_config; address_space *program, *regs; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache8; - memory_access<16, 1, 0, ENDIANNESS_LITTLE>::cache m_cache16; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache8; + memory_access<16, 1, 0, ENDIANNESS_LITTLE>::specific m_cache16; std::function<u8 (offs_t address)> m_pr8; required_shared_ptr<u16> register_file; diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp index 34bb1a86741..cbfbafaef23 100644 --- a/src/devices/cpu/mips/mips3.cpp +++ b/src/devices/cpu/mips/mips3.cpp @@ -401,30 +401,30 @@ void mips3_device::device_start() { if (m_data_bits == 32) { - m_program->cache(m_cache32le); + m_program->specific(m_cache32le); m_pr32 = [this](offs_t address) -> u32 { return m_cache32le.read_dword(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cache32le.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } else { - m_program->cache(m_cache64le); + m_program->specific(m_cache64le); m_pr32 = [this](offs_t address) -> u32 { return m_cache64le.read_dword(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cache64le.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } } else { if (m_data_bits == 32) { - m_program->cache(m_cache32be); + m_program->specific(m_cache32be); m_pr32 = [this](offs_t address) -> u32 { return m_cache32be.read_dword(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cache32be.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } else { - m_program->cache(m_cache64be); + m_program->specific(m_cache64be); m_pr32 = [this](offs_t address) -> u32 { return m_cache64be.read_dword(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cache64be.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } } diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h index 0657a511a48..76cee2b3032 100644 --- a/src/devices/cpu/mips/mips3.h +++ b/src/devices/cpu/mips/mips3.h @@ -399,10 +399,10 @@ protected: uint8_t *m_icache; address_space_config m_program_config; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache32le; - memory_access<32, 3, 0, ENDIANNESS_LITTLE>::cache m_cache64le; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache32be; - memory_access<32, 3, 0, ENDIANNESS_BIG>::cache m_cache64be; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache32le; + memory_access<32, 3, 0, ENDIANNESS_LITTLE>::specific m_cache64le; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache32be; + memory_access<32, 3, 0, ENDIANNESS_BIG>::specific m_cache64be; mips3_flavor m_flavor; diff --git a/src/devices/cpu/mn1880/mn1880.cpp b/src/devices/cpu/mn1880/mn1880.cpp index cf837a53d28..54ae1cf9753 100644 --- a/src/devices/cpu/mn1880/mn1880.cpp +++ b/src/devices/cpu/mn1880/mn1880.cpp @@ -44,7 +44,7 @@ device_memory_interface::space_config_vector mn1880_device::memory_space_config( void mn1880_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_DATA).specific(m_data); set_icountptr(m_icount); diff --git a/src/devices/cpu/mn1880/mn1880.h b/src/devices/cpu/mn1880/mn1880.h index e4ab2427f46..656f68692f1 100644 --- a/src/devices/cpu/mn1880/mn1880.h +++ b/src/devices/cpu/mn1880/mn1880.h @@ -39,7 +39,7 @@ private: // address spaces address_space_config m_program_config; address_space_config m_data_config; - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_data; // internal state diff --git a/src/devices/cpu/nanoprocessor/nanoprocessor.cpp b/src/devices/cpu/nanoprocessor/nanoprocessor.cpp index 198ce26b619..a7c4914dd85 100644 --- a/src/devices/cpu/nanoprocessor/nanoprocessor.cpp +++ b/src/devices/cpu/nanoprocessor/nanoprocessor.cpp @@ -80,7 +80,7 @@ void hp_nanoprocessor_device::device_start() state_add(NANO_REG_ISR, "ISR", m_reg_ISR).formatstr("%03X"); state_add(STATE_GENFLAGS, "GENFLAGS", m_flags).noshow().formatstr("%10s"); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/nanoprocessor/nanoprocessor.h b/src/devices/cpu/nanoprocessor/nanoprocessor.h index e5260a950e6..24f91f5a73e 100644 --- a/src/devices/cpu/nanoprocessor/nanoprocessor.h +++ b/src/devices/cpu/nanoprocessor/nanoprocessor.h @@ -113,7 +113,7 @@ private: address_space_config m_program_config; address_space_config m_io_config; - memory_access<11, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<11, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<11, 0, 0, ENDIANNESS_BIG>::specific m_program; memory_access< 4, 0, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/nec/nec.cpp b/src/devices/cpu/nec/nec.cpp index b46910bc4d9..bf24091b01a 100644 --- a/src/devices/cpu/nec/nec.cpp +++ b/src/devices/cpu/nec/nec.cpp @@ -498,18 +498,18 @@ void nec_common_device::device_start() m_program = &space(AS_PROGRAM); if (m_program->data_width() == 8) { - m_program->cache(m_cache8); + m_program->specific(m_cache8); m_dr8 = [this](offs_t address) -> u8 { return m_cache8.read_byte(address); }; } else if (m_chip_type == V33_TYPE) { save_item(NAME(m_xa)); - m_program->cache(m_cache16); + m_program->specific(m_cache16); m_dr8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(v33_translate(address)); }; } else { - m_program->cache(m_cache16); + m_program->specific(m_cache16); m_dr8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(address); }; } diff --git a/src/devices/cpu/nec/nec.h b/src/devices/cpu/nec/nec.h index 025aecc17fc..2adbd666064 100644 --- a/src/devices/cpu/nec/nec.h +++ b/src/devices/cpu/nec/nec.h @@ -102,8 +102,8 @@ private: uint8_t m_halted; address_space *m_program; - memory_access<24, 0, 0, ENDIANNESS_LITTLE>::cache m_cache8; - memory_access<24, 1, 0, ENDIANNESS_LITTLE>::cache m_cache16; + memory_access<24, 0, 0, ENDIANNESS_LITTLE>::specific m_cache8; + memory_access<24, 1, 0, ENDIANNESS_LITTLE>::specific m_cache16; std::function<u8 (offs_t address)> m_dr8; address_space *m_io; diff --git a/src/devices/cpu/nec/v25.cpp b/src/devices/cpu/nec/v25.cpp index 8a44732d07d..e21b390da53 100644 --- a/src/devices/cpu/nec/v25.cpp +++ b/src/devices/cpu/nec/v25.cpp @@ -623,10 +623,10 @@ void v25_common_device::device_start() m_program = &space(AS_PROGRAM); if(m_program->data_width() == 8) { - m_program->cache(m_cache8); + m_program->specific(m_cache8); m_dr8 = [this](offs_t address) -> u8 { return m_cache8.read_byte(address); }; } else { - m_program->cache(m_cache16); + m_program->specific(m_cache16); m_dr8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(address); }; } m_data = &space(AS_DATA); diff --git a/src/devices/cpu/nec/v25.h b/src/devices/cpu/nec/v25.h index e3cf7e9a80b..7e109c4ef73 100644 --- a/src/devices/cpu/nec/v25.h +++ b/src/devices/cpu/nec/v25.h @@ -78,8 +78,8 @@ private: address_space_config m_data_config; address_space_config m_io_config; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::cache m_cache8; - memory_access<20, 1, 0, ENDIANNESS_LITTLE>::cache m_cache16; + memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_cache8; + memory_access<20, 1, 0, ENDIANNESS_LITTLE>::specific m_cache16; /* internal RAM and register banks */ required_shared_ptr<uint16_t> m_internal_ram; diff --git a/src/devices/cpu/ns32000/ns32000.cpp b/src/devices/cpu/ns32000/ns32000.cpp index 4b796f8f345..90d40b4fa72 100644 --- a/src/devices/cpu/ns32000/ns32000.cpp +++ b/src/devices/cpu/ns32000/ns32000.cpp @@ -155,7 +155,7 @@ void ns32000_device::device_start() void ns32000_device::device_reset() { for (std::pair<int, address_space_config const *> s : memory_space_config()) - space(has_configured_map(s.first) ? s.first : 0).cache(m_bus[s.first]); + space(has_configured_map(s.first) ? s.first : 0).specific(m_bus[s.first]); m_pc = 0; m_psr = 0; diff --git a/src/devices/cpu/ns32000/ns32000.h b/src/devices/cpu/ns32000/ns32000.h index af5977fe52e..c42fc28e8ab 100644 --- a/src/devices/cpu/ns32000/ns32000.h +++ b/src/devices/cpu/ns32000/ns32000.h @@ -87,7 +87,7 @@ private: // emulation state int m_icount; - memory_access<24, 1, 0, ENDIANNESS_LITTLE>::cache m_bus[16]; + memory_access<24, 1, 0, ENDIANNESS_LITTLE>::specific m_bus[16]; u32 m_pc; // program counter u32 m_sb; // static base diff --git a/src/devices/cpu/pace/pace.cpp b/src/devices/cpu/pace/pace.cpp index 2bfba2cc338..4fa77430e4a 100644 --- a/src/devices/cpu/pace/pace.cpp +++ b/src/devices/cpu/pace/pace.cpp @@ -130,7 +130,7 @@ void pace_device::device_resolve_objects() void pace_device::device_start() { // get memory spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/pace/pace.h b/src/devices/cpu/pace/pace.h index c96c38e5c02..15531d6afc0 100644 --- a/src/devices/cpu/pace/pace.h +++ b/src/devices/cpu/pace/pace.h @@ -182,7 +182,7 @@ private: // address space and cache address_space_config m_space_config; - memory_access<16, 1, -1, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_space; // callback objects diff --git a/src/devices/cpu/pic16c5x/pic16c5x.cpp b/src/devices/cpu/pic16c5x/pic16c5x.cpp index 715cf574ee1..9ffadddcab3 100644 --- a/src/devices/cpu/pic16c5x/pic16c5x.cpp +++ b/src/devices/cpu/pic16c5x/pic16c5x.cpp @@ -887,7 +887,7 @@ enum void pic16c5x_device::device_start() { - space(AS_PROGRAM).cache(m_program); + space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); m_read_a.resolve_safe(0); diff --git a/src/devices/cpu/pic16c5x/pic16c5x.h b/src/devices/cpu/pic16c5x/pic16c5x.h index 8936a22d3a3..90872fb7b39 100644 --- a/src/devices/cpu/pic16c5x/pic16c5x.h +++ b/src/devices/cpu/pic16c5x/pic16c5x.h @@ -143,7 +143,7 @@ private: uint8_t m_picRAMmask; int m_inst_cycles; - memory_access<11, 1, -1, ENDIANNESS_LITTLE>::cache m_program; + memory_access<11, 1, -1, ENDIANNESS_LITTLE>::specific m_program; memory_access< 7, 0, 0, ENDIANNESS_LITTLE>::specific m_data; // i/o handlers diff --git a/src/devices/cpu/pic16c62x/pic16c62x.cpp b/src/devices/cpu/pic16c62x/pic16c62x.cpp index 166b26b731e..0c315a21b10 100644 --- a/src/devices/cpu/pic16c62x/pic16c62x.cpp +++ b/src/devices/cpu/pic16c62x/pic16c62x.cpp @@ -887,7 +887,7 @@ void pic16c62x_device::build_opcode_table(void) void pic16c62x_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/pic16c62x/pic16c62x.h b/src/devices/cpu/pic16c62x/pic16c62x.h index d0b9390078f..e56447ca240 100644 --- a/src/devices/cpu/pic16c62x/pic16c62x.h +++ b/src/devices/cpu/pic16c62x/pic16c62x.h @@ -114,7 +114,7 @@ private: uint8_t m_picRAMmask; int m_inst_cycles; - memory_access<11, 1, -1, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<11, 1, -1, ENDIANNESS_LITTLE>::specific m_cache; memory_access<11, 1, -1, ENDIANNESS_LITTLE>::specific m_program; memory_access< 8, 0, 0, ENDIANNESS_LITTLE>::specific m_data; memory_access< 5, 0, 0, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/pic17/pic17.cpp b/src/devices/cpu/pic17/pic17.cpp index 67d9caa23b7..c23bd323e30 100644 --- a/src/devices/cpu/pic17/pic17.cpp +++ b/src/devices/cpu/pic17/pic17.cpp @@ -1002,7 +1002,7 @@ void pic17_cpu_device::execute_run() void pic17_cpu_device::device_start() { // Hook address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); set_icountptr(m_icount); diff --git a/src/devices/cpu/pic17/pic17.h b/src/devices/cpu/pic17/pic17.h index fed49748a67..3925edd753f 100644 --- a/src/devices/cpu/pic17/pic17.h +++ b/src/devices/cpu/pic17/pic17.h @@ -140,7 +140,7 @@ private: const address_space_config m_program_config; const address_space_config m_data_config; const u16 m_rom_size; - memory_access<16, 1, -1, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_program; memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_data; diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h index d37bf06498c..7317160764a 100644 --- a/src/devices/cpu/powerpc/ppc.h +++ b/src/devices/cpu/powerpc/ppc.h @@ -292,8 +292,8 @@ protected: address_space_config m_program_config; address_space *m_program; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache32; - memory_access<32, 3, 0, ENDIANNESS_BIG>::cache m_cache64; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache32; + memory_access<32, 3, 0, ENDIANNESS_BIG>::specific m_cache64; uint32_t c_bus_frequency; struct internal_ppc_state diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp index 566be7c820a..157ce084e56 100644 --- a/src/devices/cpu/powerpc/ppccom.cpp +++ b/src/devices/cpu/powerpc/ppccom.cpp @@ -722,24 +722,24 @@ void ppc_device::device_start() m_program = &space(AS_PROGRAM); if(m_cap & PPCCAP_4XX) { - m_program->cache(m_cache32); + m_program->specific(m_cache32); m_pr32 = [this](offs_t address) -> u32 { return m_cache32.read_dword(address); }; - m_prptr = [this](offs_t address) -> const void * { return m_cache32.read_ptr(address); }; + m_prptr = [this](offs_t address) -> const void * { return m_program->get_read_ptr(address); }; } else { - m_program->cache(m_cache64); + m_program->specific(m_cache64); m_pr32 = [this](offs_t address) -> u32 { return m_cache64.read_dword(address); }; if(space_config()->m_endianness != ENDIANNESS_NATIVE) m_prptr = [this](offs_t address) -> const void * { - const u32 *ptr = static_cast<u32 *>(m_cache64.read_ptr(address & ~7)); + const u32 *ptr = static_cast<u32 *>(m_program->get_read_ptr(address & ~7)); if(!(address & 4)) ptr++; return ptr; }; else m_prptr = [this](offs_t address) -> const void * { - const u32 *ptr = static_cast<u32 *>(m_cache64.read_ptr(address & ~7)); + const u32 *ptr = static_cast<u32 *>(m_program->get_read_ptr(address & ~7)); if(address & 4) ptr++; return ptr; diff --git a/src/devices/cpu/pps4/pps4.cpp b/src/devices/cpu/pps4/pps4.cpp index 9de3131ba19..6c2ca8b9d08 100644 --- a/src/devices/cpu/pps4/pps4.cpp +++ b/src/devices/cpu/pps4/pps4.cpp @@ -1568,7 +1568,7 @@ void pps4_device::execute_run() void pps4_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h index ab6e58c5554..95cd6eda51f 100644 --- a/src/devices/cpu/pps4/pps4.h +++ b/src/devices/cpu/pps4/pps4.h @@ -79,7 +79,7 @@ protected: devcb_read8 m_dib_cb; devcb_write8 m_do_cb; - memory_access<12, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_data; memory_access< 8, 0, 0, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp index 174eb4298d8..6d9c05ecd56 100644 --- a/src/devices/cpu/psx/psx.cpp +++ b/src/devices/cpu/psx/psx.cpp @@ -1837,7 +1837,7 @@ void psxcpu_device::device_start() { // get our address spaces m_program = &space( AS_PROGRAM ); - m_program->cache(m_instruction); + m_program->specific(m_instruction); m_program->specific(m_data); save_item( NAME( m_op ) ); diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h index e02c4471bae..97abd0d3245 100644 --- a/src/devices/cpu/psx/psx.h +++ b/src/devices/cpu/psx/psx.h @@ -208,7 +208,7 @@ protected: // address spaces const address_space_config m_program_config; address_space *m_program; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_instruction; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_instruction; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_data; // other internal states diff --git a/src/devices/cpu/rii/riscii.cpp b/src/devices/cpu/rii/riscii.cpp index 6351cd60073..dca1856b021 100644 --- a/src/devices/cpu/rii/riscii.cpp +++ b/src/devices/cpu/rii/riscii.cpp @@ -196,7 +196,7 @@ void riscii_series_device::device_resolve_objects() void riscii_series_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_regs); diff --git a/src/devices/cpu/rii/riscii.h b/src/devices/cpu/rii/riscii.h index 1acc09e4862..2ff77e33f42 100644 --- a/src/devices/cpu/rii/riscii.h +++ b/src/devices/cpu/rii/riscii.h @@ -287,7 +287,7 @@ private: // address spaces address_space_config m_program_config; address_space_config m_regs_config; - memory_access<22, 1, -1, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<22, 1, -1, ENDIANNESS_LITTLE>::specific m_cache; memory_access<22, 1, -1, ENDIANNESS_LITTLE>::specific m_program; memory_access<13, 0, 0, ENDIANNESS_LITTLE>::specific m_regs; diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp index 07deffc6e10..b9db95a6b1b 100644 --- a/src/devices/cpu/rsp/rsp.cpp +++ b/src/devices/cpu/rsp/rsp.cpp @@ -381,7 +381,7 @@ void rsp_device::device_start() if (LOG_INSTRUCTION_EXECUTION) m_exec_output = fopen("rsp_execute.txt", "wt"); - space(AS_PROGRAM).cache(m_pcache); + space(AS_PROGRAM).specific(m_pcache); space(AS_PROGRAM).specific(m_program); resolve_cb(); diff --git a/src/devices/cpu/rsp/rsp.h b/src/devices/cpu/rsp/rsp.h index 5383889cdd3..a88513560f1 100644 --- a/src/devices/cpu/rsp/rsp.h +++ b/src/devices/cpu/rsp/rsp.h @@ -219,7 +219,7 @@ private: uint32_t m_nextpc; protected: - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_pcache; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_pcache; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_program; private: diff --git a/src/devices/cpu/rsp/rspdrc.cpp b/src/devices/cpu/rsp/rspdrc.cpp index 4e5df7c80a0..727048be083 100644 --- a/src/devices/cpu/rsp/rspdrc.cpp +++ b/src/devices/cpu/rsp/rspdrc.cpp @@ -654,12 +654,12 @@ void rsp_device::generate_checksum_block(drcuml_block &block, compiler_state &co if (!(seqhead->flags & OPFLAG_VIRTUAL_NOOP)) { uint32_t sum = seqhead->opptr.l[0]; - void *base = m_pcache.read_ptr(seqhead->physpc | 0x1000); + void *base = space(AS_PROGRAM).get_read_ptr(seqhead->physpc | 0x1000); UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword if (seqhead->delay.first() != nullptr && seqhead->physpc != seqhead->delay.first()->physpc) { - base = m_pcache.read_ptr((seqhead->delay.first()->physpc & 0x00000fff) | 0x1000); + base = space(AS_PROGRAM).get_read_ptr((seqhead->delay.first()->physpc & 0x00000fff) | 0x1000); assert(base != nullptr); UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword UML_ADD(block, I0, I0, I1); // add i0,i0,i1 @@ -676,13 +676,13 @@ void rsp_device::generate_checksum_block(drcuml_block &block, compiler_state &co else { uint32_t sum = 0; - void *base = m_pcache.read_ptr(seqhead->physpc | 0x1000); + void *base = space(AS_PROGRAM).get_read_ptr(seqhead->physpc | 0x1000); UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword sum += seqhead->opptr.l[0]; for (curdesc = seqhead->next(); curdesc != seqlast->next(); curdesc = curdesc->next()) if (!(curdesc->flags & OPFLAG_VIRTUAL_NOOP)) { - base = m_pcache.read_ptr(curdesc->physpc | 0x1000); + base = space(AS_PROGRAM).get_read_ptr(curdesc->physpc | 0x1000); assert(base != nullptr); UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword UML_ADD(block, I0, I0, I1); // add i0,i0,i1 @@ -690,7 +690,7 @@ void rsp_device::generate_checksum_block(drcuml_block &block, compiler_state &co if (curdesc->delay.first() != nullptr && (curdesc == seqlast || (curdesc->next() != nullptr && curdesc->next()->physpc != curdesc->delay.first()->physpc))) { - base = m_pcache.read_ptr((curdesc->delay.first()->physpc & 0x00000fff) | 0x1000); + base = space(AS_PROGRAM).get_read_ptr((curdesc->delay.first()->physpc & 0x00000fff) | 0x1000); assert(base != nullptr); UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword UML_ADD(block, I0, I0, I1); // add i0,i0,i1 diff --git a/src/devices/cpu/rx01/rx01.cpp b/src/devices/cpu/rx01/rx01.cpp index 58f90dba842..652f3268e32 100644 --- a/src/devices/cpu/rx01/rx01.cpp +++ b/src/devices/cpu/rx01/rx01.cpp @@ -75,8 +75,8 @@ device_memory_interface::space_config_vector rx01_cpu_device::memory_space_confi void rx01_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_inst_cache); - space(AS_DATA).cache(m_data_cache); + space(AS_PROGRAM).specific(m_inst_cache); + space(AS_DATA).specific(m_data_cache); set_icountptr(m_icount); diff --git a/src/devices/cpu/rx01/rx01.h b/src/devices/cpu/rx01/rx01.h index 2b990e96867..9e2a6347f8f 100644 --- a/src/devices/cpu/rx01/rx01.h +++ b/src/devices/cpu/rx01/rx01.h @@ -70,8 +70,8 @@ private: // address spaces address_space_config m_inst_config; address_space_config m_data_config; - memory_access<12, 0, 0, ENDIANNESS_LITTLE>::cache m_inst_cache; - memory_access<10, 0, 0, ENDIANNESS_LITTLE>::cache m_data_cache; + memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_inst_cache; + memory_access<10, 0, 0, ENDIANNESS_LITTLE>::specific m_data_cache; // internal state u16 m_pc; diff --git a/src/devices/cpu/s2650/s2650.cpp b/src/devices/cpu/s2650/s2650.cpp index ccdc5694cd2..7b78009262d 100644 --- a/src/devices/cpu/s2650/s2650.cpp +++ b/src/devices/cpu/s2650/s2650.cpp @@ -824,7 +824,7 @@ void s2650_device::device_start() m_flag_handler.resolve_safe(); m_intack_handler.resolve_safe(0x00); - space(AS_PROGRAM).cache(m_cprogram); + space(AS_PROGRAM).specific(m_cprogram); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/s2650/s2650.h b/src/devices/cpu/s2650/s2650.h index 008ea0bb31f..8951465f82f 100644 --- a/src/devices/cpu/s2650/s2650.h +++ b/src/devices/cpu/s2650/s2650.h @@ -84,7 +84,7 @@ private: uint8_t m_irq_state; int m_icount; - memory_access<15, 0, 0, ENDIANNESS_BIG>::cache m_cprogram; + memory_access<15, 0, 0, ENDIANNESS_BIG>::specific m_cprogram; memory_access<15, 0, 0, ENDIANNESS_BIG>::specific m_program; memory_access< 1, 0, 0, ENDIANNESS_BIG>::specific m_data; memory_access< 8, 0, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/saturn/saturn.cpp b/src/devices/cpu/saturn/saturn.cpp index c7baae6770f..db87fd16981 100644 --- a/src/devices/cpu/saturn/saturn.cpp +++ b/src/devices/cpu/saturn/saturn.cpp @@ -94,7 +94,7 @@ std::unique_ptr<util::disasm_interface> saturn_device::create_disassembler() void saturn_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); m_out_func.resolve_safe(); diff --git a/src/devices/cpu/saturn/saturn.h b/src/devices/cpu/saturn/saturn.h index 5111de6d7ed..03d5f073087 100644 --- a/src/devices/cpu/saturn/saturn.h +++ b/src/devices/cpu/saturn/saturn.h @@ -137,7 +137,7 @@ private: uint8_t m_sleeping; /* low-consumption state */ int m_monitor_id; int m_monitor_in; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_program; int m_icount; int64_t m_debugger_temp; diff --git a/src/devices/cpu/sc61860/sc61860.cpp b/src/devices/cpu/sc61860/sc61860.cpp index bd99080a9b5..e1555025fd4 100644 --- a/src/devices/cpu/sc61860/sc61860.cpp +++ b/src/devices/cpu/sc61860/sc61860.cpp @@ -109,7 +109,7 @@ void sc61860_device::device_start() m_2ms_tick_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sc61860_device::sc61860_2ms_tick), this)); m_2ms_tick_timer->adjust(attotime::from_hz(500), 0, attotime::from_hz(500)); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); m_reset.resolve(); m_brk.resolve(); diff --git a/src/devices/cpu/sc61860/sc61860.h b/src/devices/cpu/sc61860/sc61860.h index df019b6b845..cbd919b2374 100644 --- a/src/devices/cpu/sc61860/sc61860.h +++ b/src/devices/cpu/sc61860/sc61860.h @@ -111,7 +111,7 @@ private: struct { int t2ms, t512ms; int count; } m_timer; emu_timer *m_2ms_tick_timer; - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program; int m_icount; diff --git a/src/devices/cpu/scmp/scmp.cpp b/src/devices/cpu/scmp/scmp.cpp index a9021737300..eb6b25e3d8d 100644 --- a/src/devices/cpu/scmp/scmp.cpp +++ b/src/devices/cpu/scmp/scmp.cpp @@ -502,7 +502,7 @@ void scmp_device::device_start() state_add(SCMP_SR, "SR", m_SR); } - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); /* resolve callbacks */ diff --git a/src/devices/cpu/scmp/scmp.h b/src/devices/cpu/scmp/scmp.h index 7145973bdb1..479702a7f30 100644 --- a/src/devices/cpu/scmp/scmp.h +++ b/src/devices/cpu/scmp/scmp.h @@ -58,7 +58,7 @@ private: uint8_t m_ER; uint8_t m_SR; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; int m_icount; diff --git a/src/devices/cpu/score/score.cpp b/src/devices/cpu/score/score.cpp index 0e306b55349..3d74f20a8d4 100644 --- a/src/devices/cpu/score/score.cpp +++ b/src/devices/cpu/score/score.cpp @@ -78,7 +78,7 @@ score7_cpu_device::score7_cpu_device(const machine_config &mconfig, const char * void score7_cpu_device::device_start() { // find address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); // set our instruction counter diff --git a/src/devices/cpu/score/score.h b/src/devices/cpu/score/score.h index 0760b3779a8..e4cbb9cbc22 100644 --- a/src/devices/cpu/score/score.h +++ b/src/devices/cpu/score/score.h @@ -107,7 +107,7 @@ private: void op_iform1b(); address_space_config m_program_config; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program; // internal state diff --git a/src/devices/cpu/se3208/se3208.cpp b/src/devices/cpu/se3208/se3208.cpp index 6e5a15bef2c..76241a7ce3d 100644 --- a/src/devices/cpu/se3208/se3208.cpp +++ b/src/devices/cpu/se3208/se3208.cpp @@ -1710,7 +1710,7 @@ void se3208_device::device_reset() m_SP = 0; m_ER = 0; m_PPC = 0; - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); m_PC=SE3208_Read32(0); m_SR=0; @@ -1780,7 +1780,7 @@ void se3208_device::device_start() { BuildTable(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); save_item(NAME(m_R)); diff --git a/src/devices/cpu/se3208/se3208.h b/src/devices/cpu/se3208/se3208.h index d006a071bb4..faffb635f99 100644 --- a/src/devices/cpu/se3208/se3208.h +++ b/src/devices/cpu/se3208/se3208.h @@ -62,7 +62,7 @@ private: uint32_t m_ER; uint32_t m_PPC; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program; uint8_t m_IRQ; uint8_t m_NMI; diff --git a/src/devices/cpu/sh/sh.h b/src/devices/cpu/sh/sh.h index 6920d85fd3b..9e11093ab06 100644 --- a/src/devices/cpu/sh/sh.h +++ b/src/devices/cpu/sh/sh.h @@ -385,9 +385,9 @@ public: std::function<u16 (offs_t)> m_pr16; std::function<const void * (offs_t)> m_prptr; address_space *m_program; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache32; - memory_access<32, 3, 0, ENDIANNESS_BIG>::cache m_cache64be; - memory_access<32, 3, 0, ENDIANNESS_LITTLE>::cache m_cache64le; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache32; + memory_access<32, 3, 0, ENDIANNESS_BIG>::specific m_cache64be; + memory_access<32, 3, 0, ENDIANNESS_LITTLE>::specific m_cache64le; std::unique_ptr<drcuml_state> m_drcuml; /* DRC UML generator state */ uint32_t m_drcoptions; /* configurable DRC options */ diff --git a/src/devices/cpu/sh/sh2.cpp b/src/devices/cpu/sh/sh2.cpp index d46a2f5fdc0..f499e316ebd 100644 --- a/src/devices/cpu/sh/sh2.cpp +++ b/src/devices/cpu/sh/sh2.cpp @@ -532,18 +532,18 @@ void sh2_device::device_start() m_ftcsr_read_cb.resolve(); m_decrypted_program = has_space(AS_OPCODES) ? &space(AS_OPCODES) : &space(AS_PROGRAM); - m_decrypted_program->cache(m_cache32); + m_decrypted_program->specific(m_cache32); m_pr16 = [this](offs_t address) -> u16 { return m_cache32.read_word(address); }; if (m_decrypted_program->endianness() != ENDIANNESS_NATIVE) m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache32.read_ptr(address & ~3)); + const u16 *ptr = static_cast<u16 *>(m_decrypted_program->get_read_ptr(address & ~3)); if(!(address & 2)) ptr++; return ptr; }; else m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache32.read_ptr(address & ~3)); + const u16 *ptr = static_cast<u16 *>(m_decrypted_program->get_read_ptr(address & ~3)); if(address & 2) ptr++; return ptr; diff --git a/src/devices/cpu/sh/sh4.cpp b/src/devices/cpu/sh/sh4.cpp index 0d212e7ffe2..811734fd9cb 100644 --- a/src/devices/cpu/sh/sh4.cpp +++ b/src/devices/cpu/sh/sh4.cpp @@ -2062,34 +2062,34 @@ void sh34_base_device::device_start() m_io = &space(AS_IO); if (m_program->endianness() == ENDIANNESS_LITTLE) { - m_program->cache(m_cache64le); + m_program->specific(m_cache64le); m_pr16 = [this](offs_t address) -> u16 { return m_cache64le.read_word(address); }; if (ENDIANNESS_NATIVE != ENDIANNESS_LITTLE) m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache64le.read_ptr(address & ~7)); + const u16 *ptr = static_cast<u16 *>(m_program->get_read_ptr(address & ~7)); ptr += (~address >> 1) & 3; return ptr; }; else m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache64le.read_ptr(address & ~7)); + const u16 *ptr = static_cast<u16 *>(m_program->get_read_ptr(address & ~7)); ptr += (address >> 1) & 3; return ptr; }; } else { - m_program->cache(m_cache64be); + m_program->specific(m_cache64be); m_pr16 = [this](offs_t address) -> u16 { return m_cache64be.read_word(address); }; if (ENDIANNESS_NATIVE != ENDIANNESS_BIG) m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache64be.read_ptr(address & ~7)); + const u16 *ptr = static_cast<u16 *>(m_program->get_read_ptr(address & ~7)); ptr += (~address >> 1) & 3; return ptr; }; else m_prptr = [this](offs_t address) -> const void * { - const u16 *ptr = static_cast<u16 *>(m_cache64be.read_ptr(address & ~7)); + const u16 *ptr = static_cast<u16 *>(m_program->get_read_ptr(address & ~7)); ptr += (address >> 1) & 3; return ptr; }; diff --git a/src/devices/cpu/ssp1601/ssp1601.cpp b/src/devices/cpu/ssp1601/ssp1601.cpp index 79119b6a97a..ed0d52a8c04 100644 --- a/src/devices/cpu/ssp1601/ssp1601.cpp +++ b/src/devices/cpu/ssp1601/ssp1601.cpp @@ -521,7 +521,7 @@ void ssp1601_device::device_start() m_g_cycles = 0; m_gr[0].w.h = 0xffff; // constant reg - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/ssp1601/ssp1601.h b/src/devices/cpu/ssp1601/ssp1601.h index e912ff9891b..6215b29422b 100644 --- a/src/devices/cpu/ssp1601/ssp1601.h +++ b/src/devices/cpu/ssp1601/ssp1601.h @@ -71,7 +71,7 @@ private: int m_g_cycles; - memory_access<16, 1, -1, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 1, -1, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 1, -1, ENDIANNESS_BIG>::specific m_program; memory_access< 4, 1, 0, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/t11/t11.cpp b/src/devices/cpu/t11/t11.cpp index c4f22b93732..d0b22a6afcb 100644 --- a/src/devices/cpu/t11/t11.cpp +++ b/src/devices/cpu/t11/t11.cpp @@ -303,7 +303,7 @@ void t11_device::device_start() }; m_initial_pc = initial_pc[c_initial_mode >> 13]; - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); m_out_reset_func.resolve_safe(); m_in_iack_func.resolve_safe(0); // default vector (T-11 User's Guide, p. A-11) diff --git a/src/devices/cpu/t11/t11.h b/src/devices/cpu/t11/t11.h index ff63ef311fe..4b8754db3e3 100644 --- a/src/devices/cpu/t11/t11.h +++ b/src/devices/cpu/t11/t11.h @@ -93,7 +93,7 @@ protected: bool m_power_fail; bool m_ext_halt; int m_icount; - memory_access<16, 1, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 1, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 1, 0, ENDIANNESS_LITTLE>::specific m_program; devcb_write_line m_out_reset_func; diff --git a/src/devices/cpu/tms32010/tms32010.cpp b/src/devices/cpu/tms32010/tms32010.cpp index 01c18fb4471..f9d762eb4b3 100644 --- a/src/devices/cpu/tms32010/tms32010.cpp +++ b/src/devices/cpu/tms32010/tms32010.cpp @@ -835,7 +835,7 @@ void tms32010_device::device_start() save_item(NAME(m_memaccess)); save_item(NAME(m_addr_mask)); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/tms32010/tms32010.h b/src/devices/cpu/tms32010/tms32010.h index beebee1b0b0..acfa3328083 100644 --- a/src/devices/cpu/tms32010/tms32010.h +++ b/src/devices/cpu/tms32010/tms32010.h @@ -101,7 +101,7 @@ private: uint16_t m_memaccess; int m_addr_mask; - memory_access<12, 1, -1, ENDIANNESS_BIG>::cache m_cache; + memory_access<12, 1, -1, ENDIANNESS_BIG>::specific m_cache; memory_access<12, 1, -1, ENDIANNESS_BIG>::specific m_program; memory_access< 8, 1, -1, ENDIANNESS_BIG>::specific m_data; memory_access< 4, 1, -1, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp index 11444c83b23..96d8c142094 100644 --- a/src/devices/cpu/tms32025/tms32025.cpp +++ b/src/devices/cpu/tms32025/tms32025.cpp @@ -1651,7 +1651,7 @@ const tms32025_device::tms32025_opcode tms32025_device::s_opcode_Dx_subset[8]= ****************************************************************************/ void tms32025_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h index de8b4442c08..64e3a3d3916 100644 --- a/src/devices/cpu/tms32025/tms32025.h +++ b/src/devices/cpu/tms32025/tms32025.h @@ -114,7 +114,7 @@ protected: required_shared_ptr<uint16_t> m_b2; optional_shared_ptr<uint16_t> m_b3; - memory_access<16, 1, -1, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 1, -1, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 1, -1, ENDIANNESS_BIG>::specific m_program; memory_access<16, 1, -1, ENDIANNESS_BIG>::specific m_data; memory_access<16, 1, -1, ENDIANNESS_BIG>::specific m_io; diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp index 98365fbbc8a..84a2ef48429 100644 --- a/src/devices/cpu/tms32031/tms32031.cpp +++ b/src/devices/cpu/tms32031/tms32031.cpp @@ -492,7 +492,7 @@ inline void tms3203x_device::WMEM(offs_t addr, uint32_t data) void tms3203x_device::device_start() { // find address spaces - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); // resolve devcb handlers diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h index f27f0757244..76976572dbc 100644 --- a/src/devices/cpu/tms32031/tms32031.h +++ b/src/devices/cpu/tms32031/tms32031.h @@ -768,7 +768,7 @@ protected: int m_icount; uint32_t m_iotemp; - memory_access<24, 2, -2, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<24, 2, -2, ENDIANNESS_LITTLE>::specific m_cache; memory_access<24, 2, -2, ENDIANNESS_LITTLE>::specific m_program; optional_memory_region m_internal_rom; diff --git a/src/devices/cpu/tms32051/tms32051.cpp b/src/devices/cpu/tms32051/tms32051.cpp index 29fb4f14f29..bdad89a03c3 100644 --- a/src/devices/cpu/tms32051/tms32051.cpp +++ b/src/devices/cpu/tms32051/tms32051.cpp @@ -186,7 +186,7 @@ void tms32051_device::delay_slot(uint16_t startpc) void tms32051_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_DATA).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/tms32051/tms32051.h b/src/devices/cpu/tms32051/tms32051.h index 63552d7e605..20dbd0d54d4 100644 --- a/src/devices/cpu/tms32051/tms32051.h +++ b/src/devices/cpu/tms32051/tms32051.h @@ -160,7 +160,7 @@ protected: int32_t treg2; } m_shadow; - memory_access<16, 1, -1, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_program; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_data; memory_access<16, 1, -1, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/tms32082/tms32082.cpp b/src/devices/cpu/tms32082/tms32082.cpp index 25dc0af52ac..c1b8ab5b173 100644 --- a/src/devices/cpu/tms32082/tms32082.cpp +++ b/src/devices/cpu/tms32082/tms32082.cpp @@ -218,7 +218,7 @@ void tms32082_mp_device::device_start() state_add(STATE_GENPC, "GENPC", m_pc).noshow(); state_add(STATE_GENPCBASE, "CURPC", m_pc).noshow(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); set_icountptr(m_icount); @@ -517,7 +517,7 @@ void tms32082_pp_device::device_start() state_add(STATE_GENPC, "GENPC", m_pc).noshow(); state_add(STATE_GENPCBASE, "CURPC", m_pc).noshow(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); set_icountptr(m_icount); diff --git a/src/devices/cpu/tms32082/tms32082.h b/src/devices/cpu/tms32082/tms32082.h index a3e3135b568..57ec7bfdf6e 100644 --- a/src/devices/cpu/tms32082/tms32082.h +++ b/src/devices/cpu/tms32082/tms32082.h @@ -129,7 +129,7 @@ protected: int m_icount; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_program; write32mo_delegate m_cmd_callback; @@ -189,7 +189,7 @@ protected: int m_icount; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_program; }; diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp index d5fd882a484..92e0033bf83 100644 --- a/src/devices/cpu/tms34010/tms34010.cpp +++ b/src/devices/cpu/tms34010/tms34010.cpp @@ -764,7 +764,7 @@ void tms34010_device::device_start() { tms340x0_device::device_start(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); } @@ -772,7 +772,7 @@ void tms34020_device::device_start() { tms340x0_device::device_start(); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); } diff --git a/src/devices/cpu/tms34010/tms34010.h b/src/devices/cpu/tms34010/tms34010.h index c3d639e3506..28692d24f73 100644 --- a/src/devices/cpu/tms34010/tms34010.h +++ b/src/devices/cpu/tms34010/tms34010.h @@ -1037,7 +1037,7 @@ protected: virtual void TMS34010_WRMEM_DWORD(offs_t A, uint32_t V) override; private: - memory_access<32, 1, 3, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 1, 3, ENDIANNESS_LITTLE>::specific m_cache; memory_access<32, 1, 3, ENDIANNESS_LITTLE>::specific m_program; }; @@ -1072,7 +1072,7 @@ protected: virtual void TMS34010_WRMEM_DWORD(offs_t A, uint32_t V) override; private: - memory_access<32, 2, 3, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 2, 3, ENDIANNESS_LITTLE>::specific m_cache; memory_access<32, 2, 3, ENDIANNESS_LITTLE>::specific m_program; }; diff --git a/src/devices/cpu/tms7000/tms7000.cpp b/src/devices/cpu/tms7000/tms7000.cpp index cc3c0a1ff88..9edfa034d39 100644 --- a/src/devices/cpu/tms7000/tms7000.cpp +++ b/src/devices/cpu/tms7000/tms7000.cpp @@ -196,7 +196,7 @@ device_memory_interface::space_config_vector tms7000_device::memory_space_config void tms7000_device::device_start() { // init/zerofill - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); set_icountptr(m_icount); diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h index a35656422ff..1b4a3fe8f60 100644 --- a/src/devices/cpu/tms7000/tms7000.h +++ b/src/devices/cpu/tms7000/tms7000.h @@ -113,7 +113,7 @@ protected: const uint32_t m_info_flags; unsigned m_divider; - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program; int m_icount; diff --git a/src/devices/cpu/uml.cpp b/src/devices/cpu/uml.cpp index df52f5f1235..4d534c1fc63 100644 --- a/src/devices/cpu/uml.cpp +++ b/src/devices/cpu/uml.cpp @@ -273,7 +273,7 @@ uml::code_handle::code_handle(drcuml_state &drcuml, const char *name) void uml::code_handle::set_codeptr(drccodeptr code) { assert(*m_code == nullptr); - assert_in_cache(m_drcuml.cache(), code); + assert_in_cache(m_drcuml.specific(), code); *m_code = code; } diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp index ea416cbe05c..76600083615 100644 --- a/src/devices/cpu/unsp/unsp.cpp +++ b/src/devices/cpu/unsp/unsp.cpp @@ -210,7 +210,7 @@ void unsp_device::device_start() m_debugger_temp = 0; - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); uint32_t umlflags = 0; diff --git a/src/devices/cpu/unsp/unsp.h b/src/devices/cpu/unsp/unsp.h index cd25d6c55e7..6d4ef6ed9ab 100644 --- a/src/devices/cpu/unsp/unsp.h +++ b/src/devices/cpu/unsp/unsp.h @@ -287,7 +287,7 @@ private: address_space_config m_program_config; - memory_access<23, 1, -1, ENDIANNESS_BIG>::cache m_cache; + memory_access<23, 1, -1, ENDIANNESS_BIG>::specific m_cache; memory_access<23, 1, -1, ENDIANNESS_BIG>::specific m_program; uint32_t m_debugger_temp; diff --git a/src/devices/cpu/upd7725/upd7725.cpp b/src/devices/cpu/upd7725/upd7725.cpp index d2d52a31959..a3588a78039 100644 --- a/src/devices/cpu/upd7725/upd7725.cpp +++ b/src/devices/cpu/upd7725/upd7725.cpp @@ -64,7 +64,7 @@ void necdsp_device::device_start() { // get our address spaces space(AS_PROGRAM).specific(m_program); - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_DATA).specific(m_data); // register our state for the debugger diff --git a/src/devices/cpu/upd7725/upd7725.h b/src/devices/cpu/upd7725/upd7725.h index ed17af002eb..65f77faca26 100644 --- a/src/devices/cpu/upd7725/upd7725.h +++ b/src/devices/cpu/upd7725/upd7725.h @@ -144,7 +144,7 @@ private: // 1 = next opcode is the first half of int firing 'NOP' // 2 = next opcode is the second half of int firing 'CALL 0100' int m_irq_firing; - memory_access<14, 2, -2, ENDIANNESS_BIG>::cache m_cache; + memory_access<14, 2, -2, ENDIANNESS_BIG>::specific m_cache; memory_access<14, 2, -2, ENDIANNESS_BIG>::specific m_program; memory_access<12, 1, -1, ENDIANNESS_BIG>::specific m_data; diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp index 1e212dfe24e..6fbe5910c75 100644 --- a/src/devices/cpu/upd7810/upd7810.cpp +++ b/src/devices/cpu/upd7810/upd7810.cpp @@ -1564,7 +1564,7 @@ void upd78c05_device::handle_timers(int cycles) void upd7810_device::base_device_start() { space(AS_PROGRAM).specific(m_program); - space(AS_PROGRAM).cache(m_opcodes); + space(AS_PROGRAM).specific(m_opcodes); m_to_func.resolve_safe(); m_co0_func.resolve_safe(); diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h index ee8d139a275..46ec30bb96d 100644 --- a/src/devices/cpu/upd7810/upd7810.h +++ b/src/devices/cpu/upd7810/upd7810.h @@ -333,7 +333,7 @@ protected: const struct opcode_s *m_op64; const struct opcode_s *m_op70; const struct opcode_s *m_op74; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_opcodes; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_opcodes; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; int m_icount; diff --git a/src/devices/cpu/upd78k/upd78k0.cpp b/src/devices/cpu/upd78k/upd78k0.cpp index 6af06e02685..c319cd69733 100644 --- a/src/devices/cpu/upd78k/upd78k0.cpp +++ b/src/devices/cpu/upd78k/upd78k0.cpp @@ -100,8 +100,8 @@ void upd78k0_device::device_start() { // get address spaces and access caches space(AS_PROGRAM).specific(m_program_space); - space(AS_PROGRAM).cache(m_program_cache); - space(AS_DATA).cache(m_iram_cache); + space(AS_PROGRAM).specific(m_program_cache); + space(AS_DATA).specific(m_iram_cache); space(AS_IO).specific(m_sfr_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/upd78k/upd78k0.h b/src/devices/cpu/upd78k/upd78k0.h index 566dfab340f..25f1a3acdef 100644 --- a/src/devices/cpu/upd78k/upd78k0.h +++ b/src/devices/cpu/upd78k/upd78k0.h @@ -61,8 +61,8 @@ private: address_space_config m_iram_config; address_space_config m_sfr_config; const u16 m_iram_size; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_program_cache; - memory_access<10, 1, 0, ENDIANNESS_LITTLE>::cache m_iram_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program_cache; + memory_access<10, 1, 0, ENDIANNESS_LITTLE>::specific m_iram_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program_space; memory_access< 8, 1, 0, ENDIANNESS_LITTLE>::specific m_sfr_space; diff --git a/src/devices/cpu/upd78k/upd78k2.cpp b/src/devices/cpu/upd78k/upd78k2.cpp index 91f25b29618..8e53c66db7d 100644 --- a/src/devices/cpu/upd78k/upd78k2.cpp +++ b/src/devices/cpu/upd78k/upd78k2.cpp @@ -83,8 +83,8 @@ void upd78k2_device::device_start() { // get address spaces and access caches space(AS_PROGRAM).specific(m_program_space); - space(AS_PROGRAM).cache(m_program_cache); - space(AS_DATA).cache(m_iram_cache); + space(AS_PROGRAM).specific(m_program_cache); + space(AS_DATA).specific(m_iram_cache); space(AS_IO).specific(m_sfr_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/upd78k/upd78k2.h b/src/devices/cpu/upd78k/upd78k2.h index c0a8e07b825..580b89044da 100644 --- a/src/devices/cpu/upd78k/upd78k2.h +++ b/src/devices/cpu/upd78k/upd78k2.h @@ -61,8 +61,8 @@ private: address_space_config m_iram_config; address_space_config m_sfr_config; const offs_t m_iram_addrmask; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::cache m_program_cache; - memory_access< 8, 1, 0, ENDIANNESS_LITTLE>::cache m_iram_cache; + memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_program_cache; + memory_access< 8, 1, 0, ENDIANNESS_LITTLE>::specific m_iram_cache; memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_program_space; memory_access< 8, 1, 0, ENDIANNESS_LITTLE>::specific m_sfr_space; diff --git a/src/devices/cpu/upd78k/upd78k3.cpp b/src/devices/cpu/upd78k/upd78k3.cpp index ef7ee4008e9..958c4b2d4fd 100644 --- a/src/devices/cpu/upd78k/upd78k3.cpp +++ b/src/devices/cpu/upd78k/upd78k3.cpp @@ -128,9 +128,9 @@ void upd78k3_device::state_add_psw() void upd78k3_device::device_start() { // get address spaces and access caches - space(AS_PROGRAM).cache(m_program_cache); + space(AS_PROGRAM).specific(m_program_cache); space(AS_PROGRAM).specific(m_program_space); - space(AS_DATA).cache(m_iram_cache); + space(AS_DATA).specific(m_iram_cache); space(AS_IO).specific(m_sfr_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/upd78k/upd78k3.h b/src/devices/cpu/upd78k/upd78k3.h index 22867376847..70be68de592 100644 --- a/src/devices/cpu/upd78k/upd78k3.h +++ b/src/devices/cpu/upd78k/upd78k3.h @@ -75,8 +75,8 @@ private: address_space_config m_sfr_config; required_shared_ptr<u16> m_iram; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_program_cache; - memory_access< 8, 1, 0, ENDIANNESS_LITTLE>::cache m_iram_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program_cache; + memory_access< 8, 1, 0, ENDIANNESS_LITTLE>::specific m_iram_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program_space; memory_access< 8, 1, 0, ENDIANNESS_LITTLE>::specific m_sfr_space; diff --git a/src/devices/cpu/v30mz/v30mz.cpp b/src/devices/cpu/v30mz/v30mz.cpp index db96c6b92e5..7f48d252b37 100644 --- a/src/devices/cpu/v30mz/v30mz.cpp +++ b/src/devices/cpu/v30mz/v30mz.cpp @@ -146,7 +146,7 @@ device_memory_interface::space_config_vector v30mz_cpu_device::memory_space_conf void v30mz_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/v30mz/v30mz.h b/src/devices/cpu/v30mz/v30mz.h index 7d8d06c7b68..0749ab1bdae 100644 --- a/src/devices/cpu/v30mz/v30mz.h +++ b/src/devices/cpu/v30mz/v30mz.h @@ -189,7 +189,7 @@ protected: uint8_t m_no_interrupt; uint8_t m_fire_trap; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; int m_icount; diff --git a/src/devices/cpu/v60/v60.cpp b/src/devices/cpu/v60/v60.cpp index 0a9030ad313..b2514a3637e 100644 --- a/src/devices/cpu/v60/v60.cpp +++ b/src/devices/cpu/v60/v60.cpp @@ -412,14 +412,14 @@ void v60_device::device_start() m_program = &space(AS_PROGRAM); if (m_program->data_width() == 16) { - m_program->cache(m_cache16); + m_program->specific(m_cache16); m_pr8 = [this](offs_t address) -> u8 { return m_cache16.read_byte(address); }; m_pr16 = [this](offs_t address) -> u16 { return m_cache16.read_word_unaligned(address); }; m_pr32 = [this](offs_t address) -> u32 { return m_cache16.read_dword_unaligned(address); }; } else { - m_program->cache(m_cache32); + m_program->specific(m_cache32); m_pr8 = [this](offs_t address) -> u8 { return m_cache32.read_byte(address); }; m_pr16 = [this](offs_t address) -> u16 { return m_cache32.read_word_unaligned(address); }; m_pr32 = [this](offs_t address) -> u32 { return m_cache32.read_dword_unaligned(address); }; diff --git a/src/devices/cpu/v60/v60.h b/src/devices/cpu/v60/v60.h index 0cb41bd18a8..3dcdfa0031e 100644 --- a/src/devices/cpu/v60/v60.h +++ b/src/devices/cpu/v60/v60.h @@ -163,8 +163,8 @@ private: uint8_t m_irq_line; uint8_t m_nmi_line; address_space *m_program; - memory_access<32, 1, 0, ENDIANNESS_LITTLE>::cache m_cache16; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache32; + memory_access<32, 1, 0, ENDIANNESS_LITTLE>::specific m_cache16; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache32; std::function<u8 (offs_t)> m_pr8; std::function<u16 (offs_t)> m_pr16; diff --git a/src/devices/cpu/v810/v810.cpp b/src/devices/cpu/v810/v810.cpp index a5a7e8dfc52..aac365dd062 100644 --- a/src/devices/cpu/v810/v810.cpp +++ b/src/devices/cpu/v810/v810.cpp @@ -1255,7 +1255,7 @@ const v810_device::opcode_func v810_device::s_OpCodeTable[64] = void v810_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(has_space(AS_IO) ? AS_IO : AS_PROGRAM).specific(m_io); diff --git a/src/devices/cpu/v810/v810.h b/src/devices/cpu/v810/v810.h index a24abe48751..a58c29d81d0 100644 --- a/src/devices/cpu/v810/v810.h +++ b/src/devices/cpu/v810/v810.h @@ -117,7 +117,7 @@ private: uint8_t m_irq_line; uint8_t m_irq_state; uint8_t m_nmi_line; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_io; uint32_t m_PPC; diff --git a/src/devices/cpu/vt50/vt50.cpp b/src/devices/cpu/vt50/vt50.cpp index 961dca5aa2c..f1dc0abe151 100644 --- a/src/devices/cpu/vt50/vt50.cpp +++ b/src/devices/cpu/vt50/vt50.cpp @@ -193,8 +193,8 @@ void vt52_cpu_device::device_resolve_objects() void vt5x_cpu_device::device_start() { // acquire address spaces - space(AS_PROGRAM).cache(m_rom_cache); - space(AS_DATA).cache(m_ram_cache); + space(AS_PROGRAM).specific(m_rom_cache); + space(AS_DATA).specific(m_ram_cache); screen().register_screen_bitmap(m_bitmap); set_icountptr(m_icount); diff --git a/src/devices/cpu/vt50/vt50.h b/src/devices/cpu/vt50/vt50.h index e9d0b39b1bc..cce7b251b75 100644 --- a/src/devices/cpu/vt50/vt50.h +++ b/src/devices/cpu/vt50/vt50.h @@ -73,8 +73,8 @@ protected: // address spaces address_space_config m_rom_config; address_space_config m_ram_config; - memory_access<10, 0, 0, ENDIANNESS_LITTLE>::cache m_rom_cache; - memory_access<11, 0, 0, ENDIANNESS_LITTLE>::cache m_ram_cache; + memory_access<10, 0, 0, ENDIANNESS_LITTLE>::specific m_rom_cache; + memory_access<11, 0, 0, ENDIANNESS_LITTLE>::specific m_ram_cache; // device callbacks devcb_write_line m_baud_9600_callback; diff --git a/src/devices/cpu/vt61/vt61.cpp b/src/devices/cpu/vt61/vt61.cpp index 377d9e58244..ad050f5d81e 100644 --- a/src/devices/cpu/vt61/vt61.cpp +++ b/src/devices/cpu/vt61/vt61.cpp @@ -52,9 +52,9 @@ device_memory_interface::space_config_vector vt61_cpu_device::memory_space_confi void vt61_cpu_device::device_start() { - space(AS_PROGRAM).cache(m_program_cache); - space(AS_DATA).cache(m_memory_cache); - space(AS_IDR).cache(m_idr_cache); + space(AS_PROGRAM).specific(m_program_cache); + space(AS_DATA).specific(m_memory_cache); + space(AS_IDR).specific(m_idr_cache); set_icountptr(m_icount); diff --git a/src/devices/cpu/vt61/vt61.h b/src/devices/cpu/vt61/vt61.h index c2aa2d39f6b..da45a5a5493 100644 --- a/src/devices/cpu/vt61/vt61.h +++ b/src/devices/cpu/vt61/vt61.h @@ -51,9 +51,9 @@ private: address_space_config m_program_config; address_space_config m_memory_config; address_space_config m_idr_config; - memory_access<10, 1, -1, ENDIANNESS_LITTLE>::cache m_program_cache; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_memory_cache; - memory_access< 6, 0, 0, ENDIANNESS_LITTLE>::cache m_idr_cache; + memory_access<10, 1, -1, ENDIANNESS_LITTLE>::specific m_program_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_memory_cache; + memory_access< 6, 0, 0, ENDIANNESS_LITTLE>::specific m_idr_cache; // processor state u16 m_pc; diff --git a/src/devices/cpu/we32000/we32100.cpp b/src/devices/cpu/we32000/we32100.cpp index b7f166e5287..fc5b4371cef 100644 --- a/src/devices/cpu/we32000/we32100.cpp +++ b/src/devices/cpu/we32000/we32100.cpp @@ -37,7 +37,7 @@ device_memory_interface::space_config_vector we32100_device::memory_space_config void we32100_device::device_start() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_space); set_icountptr(m_icount); diff --git a/src/devices/cpu/we32000/we32100.h b/src/devices/cpu/we32000/we32100.h index c34afc4279e..ba5972b2681 100644 --- a/src/devices/cpu/we32000/we32100.h +++ b/src/devices/cpu/we32000/we32100.h @@ -45,7 +45,7 @@ protected: private: // address space address_space_config m_space_config; - memory_access<32, 2, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_space; // internal state diff --git a/src/devices/cpu/xavix2/xavix2.cpp b/src/devices/cpu/xavix2/xavix2.cpp index 84a6da150ce..29c4b0a8f22 100644 --- a/src/devices/cpu/xavix2/xavix2.cpp +++ b/src/devices/cpu/xavix2/xavix2.cpp @@ -18,7 +18,7 @@ xavix2_device::xavix2_device(const machine_config &mconfig, const char *tag, dev void xavix2_device::device_start() { - space(AS_PROGRAM).cache(m_program_cache); + space(AS_PROGRAM).specific(m_program_cache); space(AS_PROGRAM).specific(m_program); state_add(STATE_GENPC, "GENPC", m_pc).callexport().noshow(); diff --git a/src/devices/cpu/xavix2/xavix2.h b/src/devices/cpu/xavix2/xavix2.h index 30e9ec5faea..3c78905c63a 100644 --- a/src/devices/cpu/xavix2/xavix2.h +++ b/src/devices/cpu/xavix2/xavix2.h @@ -39,7 +39,7 @@ protected: virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; const address_space_config m_program_config; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_program_cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program_cache; memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program; int m_icount, m_ei_count; diff --git a/src/devices/cpu/z180/z180.cpp b/src/devices/cpu/z180/z180.cpp index f9f15f0d834..9d7c78a7205 100644 --- a/src/devices/cpu/z180/z180.cpp +++ b/src/devices/cpu/z180/z180.cpp @@ -1683,8 +1683,8 @@ void z180_device::device_start() } space(AS_PROGRAM).specific(m_program); - space(AS_PROGRAM).cache(m_cprogram); - space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(m_copcodes); + space(AS_PROGRAM).specific(m_cprogram); + space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).specific(m_copcodes); space(AS_IO).specific(m_io); /* set up the state table */ diff --git a/src/devices/cpu/z180/z180.h b/src/devices/cpu/z180/z180.h index 4dd8821991d..25d8ae7ceac 100644 --- a/src/devices/cpu/z180/z180.h +++ b/src/devices/cpu/z180/z180.h @@ -201,7 +201,7 @@ private: uint8_t m_int_pending[11 + 1]; // interrupt pending uint8_t m_after_EI; // are we in the EI shadow? uint32_t m_ea; - memory_access<20, 0, 0, ENDIANNESS_LITTLE>::cache m_cprogram, m_copcodes; + memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_cprogram, m_copcodes; memory_access<20, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; uint8_t m_rtemp; diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp index c1a17dc1741..1174544c311 100644 --- a/src/devices/cpu/z8/z8.cpp +++ b/src/devices/cpu/z8/z8.cpp @@ -1256,7 +1256,7 @@ void z8_device::device_start() } /* find address spaces */ - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); space(has_space(AS_DATA) ? AS_DATA : AS_PROGRAM).specific(m_data); space(AS_IO).specific(m_regs); diff --git a/src/devices/cpu/z8/z8.h b/src/devices/cpu/z8/z8.h index c092cfd4066..8e05d4aef99 100644 --- a/src/devices/cpu/z8/z8.h +++ b/src/devices/cpu/z8/z8.h @@ -74,7 +74,7 @@ private: address_space_config m_data_config; address_space_config m_register_config; - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_program; memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_data; memory_access< 8, 0, 0, ENDIANNESS_BIG>::specific m_regs; diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index e3575a90af7..0b171177ac0 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -3404,8 +3404,8 @@ void z80_device::device_start() m_after_ldair = 0; m_ea = 0; - space(AS_PROGRAM).cache(m_args); - space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(m_opcodes); + space(AS_PROGRAM).specific(m_args); + space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).specific(m_opcodes); space(AS_PROGRAM).specific(m_data); space(AS_IO).specific(m_io); diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h index 8e82ccd3353..28bbca01095 100644 --- a/src/devices/cpu/z80/z80.h +++ b/src/devices/cpu/z80/z80.h @@ -237,8 +237,8 @@ protected: const address_space_config m_program_config; const address_space_config m_opcodes_config; const address_space_config m_io_config; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_args; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_opcodes; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_args; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_opcodes; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_data; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_io; diff --git a/src/devices/cpu/z8000/z8000.cpp b/src/devices/cpu/z8000/z8000.cpp index 4ce857cecb5..e73a8e724aa 100644 --- a/src/devices/cpu/z8000/z8000.cpp +++ b/src/devices/cpu/z8000/z8000.cpp @@ -573,14 +573,14 @@ void z8002_device::register_save_state() void z8002_device::init_spaces() { - space(AS_PROGRAM).cache(m_cache); + space(AS_PROGRAM).specific(m_cache); space(AS_PROGRAM).specific(m_program); /* If the system decodes STn lines to distinguish between data and program memory fetches, install the data space. If it doesn't, install the program memory into data memory space. */ space(has_space(AS_DATA) ? AS_DATA : AS_PROGRAM).specific(m_data); space(has_space(AS_STACK) ? AS_STACK : has_space(AS_DATA) ? AS_DATA : AS_PROGRAM).specific(m_stack); - space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(m_opcache); + space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).specific(m_opcache); space(AS_IO).specific(m_io); space(has_space(AS_SIO) ? AS_SIO : AS_IO).specific(m_sio); } diff --git a/src/devices/cpu/z8000/z8000.h b/src/devices/cpu/z8000/z8000.h index 921f8f4eb0f..9be449656b6 100644 --- a/src/devices/cpu/z8000/z8000.h +++ b/src/devices/cpu/z8000/z8000.h @@ -146,8 +146,8 @@ protected: int m_irq_state[2]; /* IRQ line states (NVI, VI) */ int m_mi; bool m_halt; - memory_access<23, 1, 0, ENDIANNESS_BIG>::cache m_cache; - memory_access<23, 1, 0, ENDIANNESS_BIG>::cache m_opcache; + memory_access<23, 1, 0, ENDIANNESS_BIG>::specific m_cache; + memory_access<23, 1, 0, ENDIANNESS_BIG>::specific m_opcache; memory_access<23, 1, 0, ENDIANNESS_BIG>::specific m_program; memory_access<23, 1, 0, ENDIANNESS_BIG>::specific m_data; memory_access<23, 1, 0, ENDIANNESS_BIG>::specific m_stack; diff --git a/src/devices/machine/68307.cpp b/src/devices/machine/68307.cpp index 2a16def71d9..ad60aa4f8d2 100644 --- a/src/devices/machine/68307.cpp +++ b/src/devices/machine/68307.cpp @@ -130,7 +130,7 @@ inline int m68307_cpu_device::calc_cs(offs_t address) const void m68307_cpu_device::init16_m68307(address_space &space) { m_space = &space; - space.cache(m_oprogram16); + space.specific(m_oprogram16); space.specific(m_program16); m_readimm16 = [this](offs_t address) -> u16 { /* m_m68307_currentcs = calc_cs(address); */ return m_oprogram16.read_word(address); }; diff --git a/src/devices/machine/s3c2400.h b/src/devices/machine/s3c2400.h index b5390419a93..020ae3c2206 100644 --- a/src/devices/machine/s3c2400.h +++ b/src/devices/machine/s3c2400.h @@ -454,7 +454,7 @@ private: required_device<arm7_cpu_device> m_cpu; required_device<palette_device> m_palette; required_device<screen_device> m_screen; - memory_access<24, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<24, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; memcon_t m_memcon; usbhost_t m_usbhost; diff --git a/src/devices/machine/s3c2410.h b/src/devices/machine/s3c2410.h index 46b16b441d8..c1886aa2b27 100644 --- a/src/devices/machine/s3c2410.h +++ b/src/devices/machine/s3c2410.h @@ -562,7 +562,7 @@ private: required_device<arm7_cpu_device> m_cpu; required_device<palette_device> m_palette; required_device<screen_device> m_screen; - memory_access<24, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<24, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; uint8_t m_steppingstone[4*1024]; memcon_t m_memcon; diff --git a/src/devices/machine/s3c2440.h b/src/devices/machine/s3c2440.h index 18bdeecacc7..66e27dd8045 100644 --- a/src/devices/machine/s3c2440.h +++ b/src/devices/machine/s3c2440.h @@ -607,7 +607,7 @@ private: required_device<arm7_cpu_device> m_cpu; required_device<palette_device> m_palette; required_device<screen_device> m_screen; - memory_access<24, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<24, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; uint8_t m_steppingstone[4*1024]; memcon_t m_memcon; diff --git a/src/devices/machine/s3c24xx.hxx b/src/devices/machine/s3c24xx.hxx index dcff99a7b70..726b6efa4d9 100644 --- a/src/devices/machine/s3c24xx.hxx +++ b/src/devices/machine/s3c24xx.hxx @@ -744,7 +744,7 @@ void S3C24_CLASS_NAME::s3c24xx_video_start() m_lcd.bitmap[0] = std::make_unique<bitmap_rgb32>(m_screen->width(), m_screen->height()); m_lcd.bitmap[1] = std::make_unique<bitmap_rgb32>(m_screen->width(), m_screen->height()); - m_cpu->space(AS_PROGRAM).cache(m_cache); + m_cpu->space(AS_PROGRAM).specific(m_cache); } void S3C24_CLASS_NAME::bitmap_blend( bitmap_rgb32 &bitmap_dst, bitmap_rgb32 &bitmap_src_1, bitmap_rgb32 &bitmap_src_2) diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp index 6672127e20f..e243bc971a9 100644 --- a/src/devices/machine/s3c44b0.cpp +++ b/src/devices/machine/s3c44b0.cpp @@ -264,7 +264,7 @@ void s3c44b0_device::device_start() m_data_r_cb.resolve_safe(0); m_data_w_cb.resolve(); - m_cpu->space(AS_PROGRAM).cache(m_cache); + m_cpu->space(AS_PROGRAM).specific(m_cache); for (int i = 0; i < 6; i++) m_pwm.timer[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::pwm_timer_exp),this)); for (auto & elem : m_uart) elem.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::uart_timer_exp),this)); diff --git a/src/devices/machine/s3c44b0.h b/src/devices/machine/s3c44b0.h index e082937ea83..f182584509c 100644 --- a/src/devices/machine/s3c44b0.h +++ b/src/devices/machine/s3c44b0.h @@ -600,7 +600,7 @@ private: devcb_read32 m_data_r_cb; devcb_write16 m_data_w_cb; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_cache; }; DECLARE_DEVICE_TYPE(S3C44B0, s3c44b0_device) diff --git a/src/devices/machine/s_smp.cpp b/src/devices/machine/s_smp.cpp index fb4396b68d5..8cb3da539e9 100644 --- a/src/devices/machine/s_smp.cpp +++ b/src/devices/machine/s_smp.cpp @@ -87,7 +87,7 @@ void s_smp_device::device_start() m_dsp_io_w_cb.resolve_safe(); space(AS_DATA).specific(m_data); - space(AS_DATA).cache(m_dcache); + space(AS_DATA).specific(m_dcache); m_tick_timer = timer_alloc(TIMER_TICK_ID); diff --git a/src/devices/machine/s_smp.h b/src/devices/machine/s_smp.h index 9fd0232329c..59c687c4fab 100644 --- a/src/devices/machine/s_smp.h +++ b/src/devices/machine/s_smp.h @@ -39,7 +39,7 @@ protected: address_space_config m_data_config; private: - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_dcache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_dcache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_data; inline u8 data_read_byte(offs_t a) { diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp index 21d5fa081d0..4f826e38cdf 100644 --- a/src/devices/sound/aica.cpp +++ b/src/devices/sound/aica.cpp @@ -436,7 +436,7 @@ void aica_device::Init() m_MidiOutR = m_MidiOutW = 0; space().specific(m_DSP.space); - space().cache(m_DSP.cache); + space().specific(m_DSP.cache); m_timerA = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aica_device::timerA_cb), this)); m_timerB = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aica_device::timerB_cb), this)); m_timerC = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aica_device::timerC_cb), this)); @@ -1399,7 +1399,7 @@ void aica_device::sound_stream_update(sound_stream &stream, std::vector<read_str void aica_device::device_start() { space().specific(m_data); - space().cache(m_cache); + space().specific(m_cache); // init the emulation Init(); diff --git a/src/devices/sound/aica.h b/src/devices/sound/aica.h index 8509953a228..7145e7804c1 100644 --- a/src/devices/sound/aica.h +++ b/src/devices/sound/aica.h @@ -147,7 +147,7 @@ private: u16 m_EFSPAN[0x48]; AICA_SLOT m_Slots[64]; - memory_access<23, 1, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific m_data; sound_stream * m_stream; diff --git a/src/devices/sound/aicadsp.h b/src/devices/sound/aicadsp.h index b7b38a27d03..fe9aea412a0 100644 --- a/src/devices/sound/aicadsp.h +++ b/src/devices/sound/aicadsp.h @@ -14,7 +14,7 @@ struct AICADSP void start(); //Config - memory_access<23, 1, 0, ENDIANNESS_LITTLE>::cache cache; + memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific cache; memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific space; u32 RBP; //Ring buf pointer u32 RBL; //Delay ram (Ring buffer) size in words diff --git a/src/devices/sound/es5506.cpp b/src/devices/sound/es5506.cpp index 3ea90a97261..2f1e0197d4e 100644 --- a/src/devices/sound/es5506.cpp +++ b/src/devices/sound/es5506.cpp @@ -256,7 +256,7 @@ void es5506_device::device_start() space(3).install_rom(0, std::min<offs_t>((1 << ADDRESS_INTEGER_BIT_ES5506) - 1, (m_region3->bytes() / 2) - 1), m_region3->base()); for (int s = 0; s < 4; s++) - space(s).cache(m_cache[s]); + space(s).specific(m_cache[s]); // compute the tables compute_tables(VOLUME_BIT_ES5506, 4, 8); // 4 bit exponent, 8 bit mantissa @@ -379,7 +379,7 @@ void es5505_device::device_start() space(1).install_rom(0, std::min<offs_t>((1 << ADDRESS_INTEGER_BIT_ES5505) - 1, (m_region1->bytes() / 2) - 1), m_region1->base()); for (int s = 0; s < 2; s++) - space(s).cache(m_cache[s]); + space(s).specific(m_cache[s]); // compute the tables compute_tables(VOLUME_BIT_ES5505, 4, 4); // 4 bit exponent, 4 bit mantissa diff --git a/src/devices/sound/es5506.h b/src/devices/sound/es5506.h index 4e45617c8b7..eff128f6117 100644 --- a/src/devices/sound/es5506.h +++ b/src/devices/sound/es5506.h @@ -201,7 +201,7 @@ private: inline u32 reg_read_high(es550x_voice *voice, offs_t offset); inline u32 reg_read_test(es550x_voice *voice, offs_t offset); - memory_access<21, 1, -1, ENDIANNESS_BIG>::cache m_cache[4]; + memory_access<21, 1, -1, ENDIANNESS_BIG>::specific m_cache[4]; // ES5506 specific registers u32 m_write_latch; // currently accumulated data for write @@ -256,7 +256,7 @@ private: inline u16 reg_read_high(es550x_voice *voice, offs_t offset); inline u16 reg_read_test(es550x_voice *voice, offs_t offset); - memory_access<20, 1, -1, ENDIANNESS_BIG>::cache m_cache[2]; + memory_access<20, 1, -1, ENDIANNESS_BIG>::specific m_cache[2]; }; DECLARE_DEVICE_TYPE(ES5505, es5505_device) diff --git a/src/devices/sound/ics2115.cpp b/src/devices/sound/ics2115.cpp index 80e4aa9cd09..13ed77b74a5 100644 --- a/src/devices/sound/ics2115.cpp +++ b/src/devices/sound/ics2115.cpp @@ -59,7 +59,7 @@ void ics2115_device::device_start() if (m_rom && !has_configured_map(0)) space(0).install_rom(0, std::min<offs_t>((1 << 24) - 1, m_rom.bytes()), m_rom.target()); - space(0).cache(m_cache); + space(0).specific(m_cache); m_timer[0].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ics2115_device::timer_cb_0),this), this); m_timer[1].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ics2115_device::timer_cb_1),this), this); diff --git a/src/devices/sound/ics2115.h b/src/devices/sound/ics2115.h index 5dd18fcf4ed..b98f19f2d28 100644 --- a/src/devices/sound/ics2115.h +++ b/src/devices/sound/ics2115.h @@ -126,7 +126,7 @@ private: sound_stream *m_stream; // internal state - memory_access<24, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<24, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; required_region_ptr<u8> m_rom; devcb_write_line m_irq_cb; diff --git a/src/devices/sound/k007232.cpp b/src/devices/sound/k007232.cpp index a8b6c135a51..abf4c82ce84 100644 --- a/src/devices/sound/k007232.cpp +++ b/src/devices/sound/k007232.cpp @@ -64,7 +64,7 @@ void k007232_device::device_start() m_pcmlimit = m_rom.bytes(); } } - space(0).cache(m_cache); + space(0).specific(m_cache); /* Set up the chips */ m_port_write_handler.resolve_safe(); diff --git a/src/devices/sound/k007232.h b/src/devices/sound/k007232.h index 57cb72fcf7b..d5bb9c15291 100644 --- a/src/devices/sound/k007232.h +++ b/src/devices/sound/k007232.h @@ -48,7 +48,7 @@ private: static constexpr unsigned KDAC_A_PCM_MAX = 2; /* Channels per chip */ // internal state - memory_access<17, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<17, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; optional_region_ptr<u8> m_rom; struct channel_t diff --git a/src/devices/sound/ks0164.cpp b/src/devices/sound/ks0164.cpp index 2086b014478..716b2062869 100644 --- a/src/devices/sound/ks0164.cpp +++ b/src/devices/sound/ks0164.cpp @@ -51,7 +51,7 @@ void ks0164_device::device_start() } m_stream = stream_alloc(0, 2, clock()/3/2/2/32); - space().cache(m_mem_cache); + space().specific(m_mem_cache); m_timer = timer_alloc(0); save_item(NAME(m_bank1_base)); diff --git a/src/devices/sound/ks0164.h b/src/devices/sound/ks0164.h index cc707699f2e..1ed39c0b821 100644 --- a/src/devices/sound/ks0164.h +++ b/src/devices/sound/ks0164.h @@ -42,7 +42,7 @@ private: address_space_config m_mem_config; sound_stream *m_stream; emu_timer *m_timer; - memory_access<23, 1, 0, ENDIANNESS_BIG>::cache m_mem_cache; + memory_access<23, 1, 0, ENDIANNESS_BIG>::specific m_mem_cache; u32 m_bank1_base, m_bank2_base; u16 m_bank1_select, m_bank2_select; diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp index f91e370b95f..37d4b162178 100644 --- a/src/devices/sound/rf5c68.cpp +++ b/src/devices/sound/rf5c68.cpp @@ -77,7 +77,7 @@ rf5c164_device::rf5c164_device(const machine_config &mconfig, const char *tag, d void rf5c68_device::device_start() { // Find our direct access - space(0).cache(m_cache); + space(0).specific(m_cache); m_sample_end_cb.resolve(); /* allocate the stream */ diff --git a/src/devices/sound/rf5c68.h b/src/devices/sound/rf5c68.h index d78f378faaf..9874670e757 100644 --- a/src/devices/sound/rf5c68.h +++ b/src/devices/sound/rf5c68.h @@ -68,7 +68,7 @@ private: u16 loopst = 0; }; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; sound_stream* m_stream; pcm_channel m_chan[NUM_CHANNELS]; u8 m_cbank; diff --git a/src/devices/sound/s_dsp.cpp b/src/devices/sound/s_dsp.cpp index 52d255dbfc6..3ae442d67ab 100644 --- a/src/devices/sound/s_dsp.cpp +++ b/src/devices/sound/s_dsp.cpp @@ -157,7 +157,7 @@ s_dsp_device::s_dsp_device(const machine_config &mconfig, const char *tag, devic void s_dsp_device::device_start() { // Find our direct access - space().cache(m_cache); + space().specific(m_cache); space().specific(m_data); m_channel = stream_alloc(0, 2, clock() / 64); diff --git a/src/devices/sound/s_dsp.h b/src/devices/sound/s_dsp.h index 00097b17303..10a76b82c30 100644 --- a/src/devices/sound/s_dsp.h +++ b/src/devices/sound/s_dsp.h @@ -38,7 +38,7 @@ protected: address_space_config m_data_config; private: - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_data; inline u8 read_byte(offs_t a) { return m_cache.read_byte(a); } inline u16 read_word(offs_t a) { return read_byte(a) | (read_byte(a + 1) << 8); } diff --git a/src/devices/sound/vrender0.cpp b/src/devices/sound/vrender0.cpp index fd86b56adea..68580249723 100644 --- a/src/devices/sound/vrender0.cpp +++ b/src/devices/sound/vrender0.cpp @@ -142,8 +142,8 @@ void vr0sound_device::device_start() m_irq_cb.resolve_safe(); // Find our direct access - space(AS_TEXTURE).cache(m_texcache); - space(AS_FRAME).cache(m_fbcache); + space(AS_TEXTURE).specific(m_texcache); + space(AS_FRAME).specific(m_fbcache); m_texcache_ctrl = &m_fbcache; for (auto &elem : m_channel) elem.Cache = &m_fbcache; diff --git a/src/devices/sound/vrender0.h b/src/devices/sound/vrender0.h index 1e234232c69..80ee71e357a 100644 --- a/src/devices/sound/vrender0.h +++ b/src/devices/sound/vrender0.h @@ -115,7 +115,7 @@ private: std::fill(std::begin(EnvTarget), std::end(EnvTarget), 0); } - memory_access<23, 1, 0, ENDIANNESS_LITTLE>::cache *Cache; + memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific *Cache; u32 CurSAddr = 0; // Current Address Pointer, 22.10 Fixed Point s32 EnvVol = 0; // Envelope Volume (Overall Volume), S.7.16 Fixed Point u8 EnvStage = 1; // Envelope Stage @@ -132,9 +132,9 @@ private: void write(offs_t offset, u16 data, u16 mem_mask); }; - memory_access<23, 1, 0, ENDIANNESS_LITTLE>::cache m_texcache; - memory_access<23, 1, 0, ENDIANNESS_LITTLE>::cache m_fbcache; - memory_access<23, 1, 0, ENDIANNESS_LITTLE>::cache *m_texcache_ctrl; + memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific m_texcache; + memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific m_fbcache; + memory_access<23, 1, 0, ENDIANNESS_LITTLE>::specific *m_texcache_ctrl; channel_t m_channel[32]; sound_stream *m_stream; diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp index 101ebe72944..f58b8768c3f 100644 --- a/src/devices/video/sed1330.cpp +++ b/src/devices/video/sed1330.cpp @@ -174,7 +174,7 @@ const tiny_rom_entry *sed1330_device::device_rom_region() const void sed1330_device::device_start() { - space().cache(m_cache); + space().specific(m_cache); // register for state saving save_item(NAME(m_bf)); diff --git a/src/devices/video/sed1330.h b/src/devices/video/sed1330.h index c9bff82f578..cf374c1cc02 100644 --- a/src/devices/video/sed1330.h +++ b/src/devices/video/sed1330.h @@ -94,7 +94,7 @@ private: // address space configurations const address_space_config m_space_config; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_cache; inline uint8_t readbyte(offs_t address); inline void writebyte(offs_t address, uint8_t m_data); diff --git a/src/emu/dirom.h b/src/emu/dirom.h index 62566f433d3..a57ab0558a3 100644 --- a/src/emu/dirom.h +++ b/src/emu/dirom.h @@ -39,7 +39,7 @@ protected: private: const char *m_rom_tag; address_space_config m_rom_config; - typename memory_access<AddrWidth, DataWidth, AddrShift, Endian>::cache m_rom_cache; + typename memory_access<AddrWidth, DataWidth, AddrShift, Endian>::specific m_rom_cache; memory_bank *m_bank; int m_cur_bank, m_bank_count; diff --git a/src/emu/dirom.ipp b/src/emu/dirom.ipp index e552ff87e22..ea57150432a 100644 --- a/src/emu/dirom.ipp +++ b/src/emu/dirom.ipp @@ -91,7 +91,7 @@ void device_rom_interface<AddrWidth, DataWidth, AddrShift, Endian>::interface_pr if(!has_space(0)) return; - space().cache(m_rom_cache); + space().specific(m_rom_cache); device().save_item(NAME(m_cur_bank)); device().save_item(NAME(m_bank_count)); diff --git a/src/emu/emumem.h b/src/emu/emumem.h index 1adfb0332eb..3b9a362dd90 100644 --- a/src/emu/emumem.h +++ b/src/emu/emumem.h @@ -1062,119 +1062,13 @@ private: void set(address_space *space, std::pair<const void *, const void *> rw); }; - - - -// ======================> memory_access_cache - -// memory_access_cache contains state data for cached access -template<int Width, int AddrShift, endianness_t Endian> class memory_access_cache -{ - friend class ::address_space; - - using NativeType = typename emu::detail::handler_entry_size<Width>::uX; - static constexpr u32 NATIVE_BYTES = 1 << Width; - static constexpr u32 NATIVE_MASK = Width + AddrShift >= 0 ? (1 << (Width + AddrShift)) - 1 : 0; - -public: - // construction/destruction - memory_access_cache() - : m_space(nullptr), - m_addrmask(0), - m_addrstart_r(1), - m_addrend_r(0), - m_addrstart_w(1), - m_addrend_w(0), - m_cache_r(nullptr), - m_cache_w(nullptr), - m_root_read(nullptr), - m_root_write(nullptr) - { - } - - ~memory_access_cache(); - - // see if an address is within bounds, update it if not - void check_address_r(offs_t address) { - if(address >= m_addrstart_r && address <= m_addrend_r) - return; - m_root_read->lookup(address, m_addrstart_r, m_addrend_r, m_cache_r); - } - - void check_address_w(offs_t address) { - if(address >= m_addrstart_w && address <= m_addrend_w) - return; - m_root_write->lookup(address, m_addrstart_w, m_addrend_w, m_cache_w); - } - - // accessor methods - - inline address_space &space() const { - return *m_space; - } - - void *read_ptr(offs_t address) { - address &= m_addrmask; - check_address_r(address); - return m_cache_r->get_ptr(address); - } - - u8 read_byte(offs_t address) { return Width == 0 ? read_native(address & ~NATIVE_MASK) : memory_read_generic<Width, AddrShift, Endian, 0, true>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, 0xff); } - u16 read_word(offs_t address) { return Width == 1 ? read_native(address & ~NATIVE_MASK) : memory_read_generic<Width, AddrShift, Endian, 1, true>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, 0xffff); } - u16 read_word(offs_t address, u16 mask) { return memory_read_generic<Width, AddrShift, Endian, 1, true>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, mask); } - u16 read_word_unaligned(offs_t address) { return memory_read_generic<Width, AddrShift, Endian, 1, false>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, 0xffff); } - u16 read_word_unaligned(offs_t address, u16 mask) { return memory_read_generic<Width, AddrShift, Endian, 1, false>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, mask); } - u32 read_dword(offs_t address) { return Width == 2 ? read_native(address & ~NATIVE_MASK) : memory_read_generic<Width, AddrShift, Endian, 2, true>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, 0xffffffff); } - u32 read_dword(offs_t address, u32 mask) { return memory_read_generic<Width, AddrShift, Endian, 2, true>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, mask); } - u32 read_dword_unaligned(offs_t address) { return memory_read_generic<Width, AddrShift, Endian, 2, false>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, 0xffffffff); } - u32 read_dword_unaligned(offs_t address, u32 mask) { return memory_read_generic<Width, AddrShift, Endian, 2, false>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, mask); } - u64 read_qword(offs_t address) { return Width == 3 ? read_native(address & ~NATIVE_MASK) : memory_read_generic<Width, AddrShift, Endian, 3, true>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, 0xffffffffffffffffU); } - u64 read_qword(offs_t address, u64 mask) { return memory_read_generic<Width, AddrShift, Endian, 3, true>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, mask); } - u64 read_qword_unaligned(offs_t address) { return memory_read_generic<Width, AddrShift, Endian, 3, false>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, 0xffffffffffffffffU); } - u64 read_qword_unaligned(offs_t address, u64 mask) { return memory_read_generic<Width, AddrShift, Endian, 3, false>([this](offs_t offset, NativeType mask) -> NativeType { return read_native(offset, mask); }, address, mask); } - - void write_byte(offs_t address, u8 data) { if (Width == 0) write_native(address & ~NATIVE_MASK, data); else memory_write_generic<Width, AddrShift, Endian, 0, true>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, 0xff); } - void write_word(offs_t address, u16 data) { if (Width == 1) write_native(address & ~NATIVE_MASK, data); else memory_write_generic<Width, AddrShift, Endian, 1, true>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, 0xffff); } - void write_word(offs_t address, u16 data, u16 mask) { memory_write_generic<Width, AddrShift, Endian, 1, true>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, mask); } - void write_word_unaligned(offs_t address, u16 data) { memory_write_generic<Width, AddrShift, Endian, 1, false>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, 0xffff); } - void write_word_unaligned(offs_t address, u16 data, u16 mask) { memory_write_generic<Width, AddrShift, Endian, 1, false>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, mask); } - void write_dword(offs_t address, u32 data) { if (Width == 2) write_native(address & ~NATIVE_MASK, data); else memory_write_generic<Width, AddrShift, Endian, 2, true>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, 0xffffffff); } - void write_dword(offs_t address, u32 data, u32 mask) { memory_write_generic<Width, AddrShift, Endian, 2, true>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, mask); } - void write_dword_unaligned(offs_t address, u32 data) { memory_write_generic<Width, AddrShift, Endian, 2, false>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, 0xffffffff); } - void write_dword_unaligned(offs_t address, u32 data, u32 mask) { memory_write_generic<Width, AddrShift, Endian, 2, false>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, mask); } - void write_qword(offs_t address, u64 data) { if (Width == 3) write_native(address & ~NATIVE_MASK, data); else memory_write_generic<Width, AddrShift, Endian, 3, true>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, 0xffffffffffffffffU); } - void write_qword(offs_t address, u64 data, u64 mask) { memory_write_generic<Width, AddrShift, Endian, 3, true>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, mask); } - void write_qword_unaligned(offs_t address, u64 data) { memory_write_generic<Width, AddrShift, Endian, 3, false>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, 0xffffffffffffffffU); } - void write_qword_unaligned(offs_t address, u64 data, u64 mask) { memory_write_generic<Width, AddrShift, Endian, 3, false>([this](offs_t offset, NativeType data, NativeType mask) { write_native(offset, data, mask); }, address, data, mask); } - -private: - address_space * m_space; - - offs_t m_addrmask; // address mask - offs_t m_addrstart_r; // minimum valid address for reading - offs_t m_addrend_r; // maximum valid address for reading - offs_t m_addrstart_w; // minimum valid address for writing - offs_t m_addrend_w; // maximum valid address for writing - handler_entry_read <Width, AddrShift, Endian> *m_cache_r; // read cache - handler_entry_write<Width, AddrShift, Endian> *m_cache_w; // write cache - - handler_entry_read <Width, AddrShift, Endian> *m_root_read; // decode tree roots - handler_entry_write<Width, AddrShift, Endian> *m_root_write; - - NativeType read_native(offs_t address, NativeType mask = ~NativeType(0)); - void write_native(offs_t address, NativeType data, NativeType mask = ~NativeType(0)); - - void set(address_space *space, std::pair<void *, void *> rw); -}; }} - // ======================> memory_access cache/specific type dispatcher template<int HighBits, int Width, int AddrShift, endianness_t Endian> struct memory_access { static constexpr int Level = emu::detail::handler_entry_dispatch_level(HighBits); - using cache = emu::detail::memory_access_cache<Width, AddrShift, Endian>; using specific = emu::detail::memory_access_specific<Level, Width, AddrShift, Endian>; }; @@ -1256,18 +1150,6 @@ public: int spacenum() const { return m_spacenum; } address_map *map() const { return m_map.get(); } - template<int Width, int AddrShift, endianness_t Endian> void cache(emu::detail::memory_access_cache<Width, AddrShift, Endian> &v) { - if(AddrShift != m_config.addr_shift()) - fatalerror("Requesting cache() with address shift %d while the config says %d\n", AddrShift, m_config.addr_shift()); - if(8 << Width != m_config.data_width()) - fatalerror("Requesting cache() with data width %d while the config says %d\n", 8 << Width, m_config.data_width()); - if(Endian != m_config.endianness()) - fatalerror("Requesting cache() with endianness %s while the config says %s\n", - endianness_names[Endian], endianness_names[m_config.endianness()]); - - v.set(this, get_cache_info()); - } - template<int Level, int Width, int AddrShift, endianness_t Endian> void specific(emu::detail::memory_access_specific<Level, Width, AddrShift, Endian> &v) { if(Level != emu::detail::handler_entry_dispatch_level(m_config.addr_width())) fatalerror("Requesting specific() with wrong level, bad address width (the config says %d)\n", m_config.addr_width()); @@ -1940,25 +1822,6 @@ private: #define QWORD_ALIGNED(a) (((a) & 7) == 0) -template<int Width, int AddrShift, endianness_t Endian> -typename emu::detail::handler_entry_size<Width>::uX -emu::detail::memory_access_cache<Width, AddrShift, Endian>:: -read_native(offs_t address, typename emu::detail::handler_entry_size<Width>::uX mask) -{ - address &= m_addrmask; - check_address_r(address); - return m_cache_r->read(address, mask); -} - -template<int Width, int AddrShift, endianness_t Endian> -void emu::detail::memory_access_cache<Width, AddrShift, Endian>:: -write_native(offs_t address, typename emu::detail::handler_entry_size<Width>::uX data, typename emu::detail::handler_entry_size<Width>::uX mask) -{ - address &= m_addrmask; - check_address_w(address); - m_cache_w->write(address, data, mask); -} - void memory_passthrough_handler::remove() { m_space.remove_passthrough(m_handlers); @@ -1975,42 +1838,4 @@ set(address_space *space, std::pair<const void *, const void *> rw) m_dispatch_write = (const handler_entry_write<Width, AddrShift, Endian> *const *)(rw.second); } - -template<int Width, int AddrShift, endianness_t Endian> -void emu::detail::memory_access_cache<Width, AddrShift, Endian>:: -set(address_space *space, std::pair<void *, void *> rw) -{ - m_space = space; - m_addrmask = space->addrmask(); - - space->add_change_notifier([this](read_or_write mode) { - if(u32(mode) & u32(read_or_write::READ)) { - m_addrend_r = 0; - m_addrstart_r = 1; - m_cache_r = nullptr; - } - if(u32(mode) & u32(read_or_write::WRITE)) { - m_addrend_w = 0; - m_addrstart_w = 1; - m_cache_w = nullptr; - } - }); - m_root_read = (handler_entry_read <Width, AddrShift, Endian> *)(rw.first); - m_root_write = (handler_entry_write<Width, AddrShift, Endian> *)(rw.second); - - // Protect against a wandering memset - m_addrstart_r = 1; - m_addrend_r = 0; - m_cache_r = nullptr; - m_addrstart_w = 1; - m_addrend_w = 0; - m_cache_w = nullptr; -} - -template<int Width, int AddrShift, endianness_t Endian> -emu::detail::memory_access_cache<Width, AddrShift, Endian>:: -~memory_access_cache() -{ -} - #endif /* MAME_EMU_EMUMEM_H */ diff --git a/src/mame/audio/turrett.cpp b/src/mame/audio/turrett.cpp index 4d8414b0118..5e5f5dc3097 100644 --- a/src/mame/audio/turrett.cpp +++ b/src/mame/audio/turrett.cpp @@ -44,7 +44,7 @@ device_memory_interface::space_config_vector turrett_device::memory_space_config void turrett_device::device_start() { // Find our direct access - space().cache(m_cache); + space().specific(m_cache); // Create the sound stream m_stream = stream_alloc_legacy(0, 2, 44100); diff --git a/src/mame/drivers/mindset.cpp b/src/mame/drivers/mindset.cpp index 279ad92bbf8..9663c6175a4 100644 --- a/src/mame/drivers/mindset.cpp +++ b/src/mame/drivers/mindset.cpp @@ -330,7 +330,7 @@ protected: required_device<dac_byte_interface> m_dac; required_device_array<mindset_module, 6> m_modules; - memory_access<20, 1, 0, ENDIANNESS_LITTLE>::cache m_gcps; + memory_access<20, 1, 0, ENDIANNESS_LITTLE>::specific m_gcps; floppy_image_device *m_floppy[2]; u32 m_palette[16]; @@ -450,7 +450,7 @@ void mindset_state::machine_start() m_yellow_led.resolve(); m_green_led.resolve(); - m_maincpu->space(AS_PROGRAM).cache(m_gcps); + m_maincpu->space(AS_PROGRAM).specific(m_gcps); for(int i=0; i<2; i++) m_floppy[i] = m_fdco[i]->get_device(); diff --git a/src/mame/includes/osborne1.h b/src/mame/includes/osborne1.h index 6fd060f111f..58704063e85 100644 --- a/src/mame/includes/osborne1.h +++ b/src/mame/includes/osborne1.h @@ -165,7 +165,7 @@ private: u8 m_acia_rxc_txc_state; emu_timer *m_acia_rxc_txc_timer; - memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_mem_cache; + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_mem_cache; }; diff --git a/src/mame/includes/turrett.h b/src/mame/includes/turrett.h index cce1f821f56..72fa8371014 100644 --- a/src/mame/includes/turrett.h +++ b/src/mame/includes/turrett.h @@ -129,7 +129,7 @@ protected: const address_space_config m_space_config; private: - memory_access<28, 1, 0, ENDIANNESS_LITTLE>::cache m_cache; + memory_access<28, 1, 0, ENDIANNESS_LITTLE>::specific m_cache; sound_stream *m_stream; struct diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp index 8e20c5e940d..164fecd5b4f 100644 --- a/src/mame/machine/6883sam.cpp +++ b/src/mame/machine/6883sam.cpp @@ -122,12 +122,12 @@ device_memory_interface::space_config_vector sam6883_device::memory_space_config void sam6883_device::device_start() { // get spaces - space(0).cache(m_ram_space); + space(0).specific(m_ram_space); for (int i = 0; i < 3; i++) - space(i + 1).cache(m_rom_space[i]); + space(i + 1).specific(m_rom_space[i]); for (int i = 0; i < 3; i++) space(i + 4).specific(m_io_space[i]); - space(7).cache(m_boot_space); + space(7).specific(m_boot_space); // save state support save_item(NAME(m_sam_state)); diff --git a/src/mame/machine/6883sam.h b/src/mame/machine/6883sam.h index d3e7e725e8a..7309d1dc03e 100644 --- a/src/mame/machine/6883sam.h +++ b/src/mame/machine/6883sam.h @@ -140,10 +140,10 @@ private: address_space_config m_boot_config; // memory spaces - memory_access<16, 0, 0, ENDIANNESS_BIG>::cache m_ram_space; - memory_access<14, 0, 0, ENDIANNESS_BIG>::cache m_rom_space[3]; + memory_access<16, 0, 0, ENDIANNESS_BIG>::specific m_ram_space; + memory_access<14, 0, 0, ENDIANNESS_BIG>::specific m_rom_space[3]; memory_access< 5, 0, 0, ENDIANNESS_BIG>::specific m_io_space[3]; - memory_access< 7, 0, 0, ENDIANNESS_BIG>::cache m_boot_space; + memory_access< 7, 0, 0, ENDIANNESS_BIG>::specific m_boot_space; uint16_t m_counter_mask; // SAM state diff --git a/src/mame/machine/bert.cpp b/src/mame/machine/bert.cpp index b175a3efad7..403368bb40c 100644 --- a/src/mame/machine/bert.cpp +++ b/src/mame/machine/bert.cpp @@ -26,7 +26,7 @@ void bert_device::device_start() save_item(NAME(m_step)); save_item(NAME(m_qlc_mode)); save_item(NAME(m_qlc_src)); - m_memory_space->cache(m_memory); + m_memory_space->specific(m_memory); } void bert_device::device_reset() diff --git a/src/mame/machine/bert.h b/src/mame/machine/bert.h index 410fbcf61c1..62ff8c483e1 100644 --- a/src/mame/machine/bert.h +++ b/src/mame/machine/bert.h @@ -26,7 +26,7 @@ protected: private: required_address_space m_memory_space; - memory_access<24, 1, 0, ENDIANNESS_BIG>::cache m_memory; + memory_access<24, 1, 0, ENDIANNESS_BIG>::specific m_memory; u16 m_control; u16 m_history; diff --git a/src/mame/machine/c117.cpp b/src/mame/machine/c117.cpp index 32904271278..82909ae56bc 100644 --- a/src/mame/machine/c117.cpp +++ b/src/mame/machine/c117.cpp @@ -60,8 +60,8 @@ void namco_c117_device::device_start() space(AS_PROGRAM).specific(m_program); - m_cpuexec[0]->space(AS_PROGRAM).cache(m_cpucache[0]); - m_cpuexec[1]->space(AS_PROGRAM).cache(m_cpucache[1]); + m_cpuexec[0]->space(AS_PROGRAM).specific(m_cpucache[0]); + m_cpuexec[1]->space(AS_PROGRAM).specific(m_cpucache[1]); memset(&m_offsets, 0, sizeof(m_offsets)); m_subres = m_wdog = 0; diff --git a/src/mame/machine/c117.h b/src/mame/machine/c117.h index d41ee5fde5b..45098811582 100644 --- a/src/mame/machine/c117.h +++ b/src/mame/machine/c117.h @@ -67,7 +67,7 @@ private: // cpu interfaces required_device<cpu_device> m_cpuexec[2]; - memory_access<23, 0, 0, ENDIANNESS_BIG>::cache m_cpucache[2]; + memory_access<23, 0, 0, ENDIANNESS_BIG>::specific m_cpucache[2]; required_device<watchdog_timer_device> m_watchdog; }; diff --git a/src/mame/machine/cammu.cpp b/src/mame/machine/cammu.cpp index 1a2ceac6cd3..0c2f8450f38 100644 --- a/src/mame/machine/cammu.cpp +++ b/src/mame/machine/cammu.cpp @@ -196,10 +196,10 @@ void cammu_c3_device::device_start() tlb_set.u = false; tlb_set.w.ra = tlb_set.w.va = 0; - m_memory[ST0].space->cache(tlb_set.w.cache); + m_memory[ST0].space->specific(tlb_set.w.cache); tlb_set.x.ra = tlb_set.x.va = 0; - m_memory[ST0].space->cache(tlb_set.x.cache); + m_memory[ST0].space->specific(tlb_set.x.cache); } } @@ -226,7 +226,7 @@ void cammu_device::set_spaces(address_space &main_space, address_space &io_space m_memory[ST7].space = &main_space; for (memory_t &memory : m_memory) - memory.space->cache(memory.cache); + memory.space->specific(memory.cache); } bool cammu_device::memory_translate(const u32 ssw, const int spacenum, const int intention, offs_t &address) diff --git a/src/mame/machine/cammu.h b/src/mame/machine/cammu.h index 1dbe48a7f02..a4d75afc4df 100644 --- a/src/mame/machine/cammu.h +++ b/src/mame/machine/cammu.h @@ -227,7 +227,7 @@ protected: struct translated_t { - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache *const cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific *const cache; const u32 address; }; @@ -240,7 +240,7 @@ protected: struct memory_t { address_space *space; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific cache; }; // address translation @@ -562,7 +562,7 @@ private: u32 ra; // real address field u32 va; // virtual address field - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache cache; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific cache; }; struct tlb_set_t { diff --git a/src/mame/machine/fddebug.cpp b/src/mame/machine/fddebug.cpp index 1e186468e12..f2dbee64743 100644 --- a/src/mame/machine/fddebug.cpp +++ b/src/mame/machine/fddebug.cpp @@ -443,7 +443,7 @@ static inline int pc_is_valid(address_space &space, uint32_t pc, uint32_t flags) return 0; if (pc & 0xff000000) return 0; - if (space.direct().read_ptr(pc) == nullptr) + if (space->get_read_ptr(pc) == nullptr) return 0; return 1; } diff --git a/src/mame/machine/interpro_ioga.cpp b/src/mame/machine/interpro_ioga.cpp index 0ab14ca6997..3c45725cec7 100644 --- a/src/mame/machine/interpro_ioga.cpp +++ b/src/mame/machine/interpro_ioga.cpp @@ -170,7 +170,7 @@ sapphire_ioga_device::sapphire_ioga_device(const machine_config &mconfig, const void interpro_ioga_device::device_start() { - m_memory_space->cache(m_memory); + m_memory_space->specific(m_memory); // resolve callbacks m_out_nmi_func.resolve(); diff --git a/src/mame/machine/interpro_ioga.h b/src/mame/machine/interpro_ioga.h index 56dc6995cc6..ae49e427652 100644 --- a/src/mame/machine/interpro_ioga.h +++ b/src/mame/machine/interpro_ioga.h @@ -243,7 +243,7 @@ protected: virtual void device_reset() override; required_address_space m_memory_space; - memory_access<32, 2, 0, ENDIANNESS_LITTLE>::cache m_memory; + memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_memory; // callbacks devcb_write_line m_out_nmi_func; diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp index 932cabea96b..5a02e180f43 100644 --- a/src/mame/machine/osborne1.cpp +++ b/src/mame/machine/osborne1.cpp @@ -287,7 +287,7 @@ void osborne1_state::machine_start() m_acia_rxc_txc_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(osborne1_state::acia_rxc_txc_callback), this)); - m_maincpu->space(AS_PROGRAM).cache(m_mem_cache); + m_maincpu->space(AS_PROGRAM).specific(m_mem_cache); save_item(NAME(m_acia_rxc_txc_div)); save_item(NAME(m_acia_rxc_txc_p_low)); |