mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Merge pull request #4512 from tyfighter/master
MIPS3: Add minimal support for revealing the Secondary Cache Line siz…
This commit is contained in:
commit
57abfa52de
@ -166,6 +166,7 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
|
||||
, m_dword_xor(data_bits == 64 ? (m_bigendian ? DWORD_XOR_BE(0) : DWORD_XOR_LE(0)) : 0)
|
||||
, c_icache_size(0)
|
||||
, c_dcache_size(0)
|
||||
, c_secondary_cache_line_size(0)
|
||||
, m_fastram_select(0)
|
||||
, m_debugger_temp(0)
|
||||
, m_drc_cache(DRC_CACHE_SIZE + sizeof(internal_mips3_state) + 0x800000)
|
||||
|
@ -297,6 +297,7 @@ public:
|
||||
|
||||
void set_icache_size(size_t icache_size) { c_icache_size = icache_size; }
|
||||
void set_dcache_size(size_t dcache_size) { c_dcache_size = dcache_size; }
|
||||
void set_secondary_cache_line_size(uint8_t secondary_cache_line_size) { c_secondary_cache_line_size = secondary_cache_line_size; }
|
||||
void set_system_clock(uint32_t system_clock) { c_system_clock = system_clock; }
|
||||
|
||||
TIMER_CALLBACK_MEMBER(compare_int_callback);
|
||||
@ -442,6 +443,7 @@ protected:
|
||||
/* cache memory */
|
||||
size_t c_icache_size;
|
||||
size_t c_dcache_size;
|
||||
uint8_t c_secondary_cache_line_size;
|
||||
|
||||
/* MMU */
|
||||
mips3_tlb_entry m_tlb[MIPS3_MAX_TLB_ENTRIES];
|
||||
|
@ -273,6 +273,13 @@ uint32_t mips3_device::compute_config_register()
|
||||
else if (c_icache_size <= 0x40000) configreg |= 6 << 9;
|
||||
else configreg |= 7 << 9;
|
||||
|
||||
if (c_secondary_cache_line_size != 0) {
|
||||
configreg &= ~((0xf << 20) | (1 << 17));
|
||||
if (c_secondary_cache_line_size <= 0x10) configreg |= 0 << 22;
|
||||
else if (c_secondary_cache_line_size <= 0x20) configreg |= 1 << 22;
|
||||
else if (c_secondary_cache_line_size <= 0x40) configreg |= 2 << 22;
|
||||
else configreg |= 3 << 22;
|
||||
}
|
||||
/* set the system clock divider */
|
||||
int divisor = 2;
|
||||
if (c_system_clock != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user