summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar smf- <smf-@users.noreply.github.com>2020-05-21 10:34:09 +0100
committerGravatarGravatar smf- <smf-@users.noreply.github.com>2020-05-21 10:34:50 +0100
commiteeb89d420aea3c9f31fd3dd355ca60c4b9be3a55 (patch) (github)
tree50237a3204f9e72f59b0be26d700fd95129d028b
parent941e06150bef625cb8bf1d58139563bb5c828b2d (diff)
downloadmame-eeb89d420aea3c9f31fd3dd355ca60c4b9be3a55.tar.bz2
mame-eeb89d420aea3c9f31fd3dd355ca60c4b9be3a55.zip
switched PlayStation CPU over to memory_access_specific (nw)
-rw-r--r--src/devices/cpu/psx/psx.cpp23
-rw-r--r--src/devices/cpu/psx/psx.h3
2 files changed, 14 insertions, 12 deletions
diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp
index 741b96934e4..2fafd9db49e 100644
--- a/src/devices/cpu/psx/psx.cpp
+++ b/src/devices/cpu/psx/psx.cpp
@@ -386,7 +386,7 @@ uint8_t psxcpu_device::readbyte( uint32_t address )
{
if( m_bus_attached )
{
- return m_program->read_byte( address );
+ return m_data->read_byte( address );
}
return cache_readword( address ) >> ( ( address & 3 ) * 8 );
@@ -396,7 +396,7 @@ uint16_t psxcpu_device::readhalf( uint32_t address )
{
if( m_bus_attached )
{
- return m_program->read_word( address );
+ return m_data->read_word( address );
}
return cache_readword( address ) >> ( ( address & 2 ) * 8 );
@@ -406,7 +406,7 @@ uint32_t psxcpu_device::readword( uint32_t address )
{
if( m_bus_attached )
{
- return m_program->read_dword( address );
+ return m_data->read_dword( address );
}
return cache_readword( address );
@@ -416,7 +416,7 @@ uint32_t psxcpu_device::readword_masked( uint32_t address, uint32_t mask )
{
if( m_bus_attached )
{
- return m_program->read_dword( address, mask );
+ return m_data->read_dword( address, mask );
}
return cache_readword( address );
@@ -426,7 +426,7 @@ void psxcpu_device::writeword( uint32_t address, uint32_t data )
{
if( m_bus_attached )
{
- m_program->write_dword( address, data );
+ m_data->write_dword( address, data );
}
else
{
@@ -438,7 +438,7 @@ void psxcpu_device::writeword_masked( uint32_t address, uint32_t data, uint32_t
{
if( m_bus_attached )
{
- m_program->write_dword( address, data, mask );
+ m_data->write_dword( address, data, mask );
}
else
{
@@ -1462,7 +1462,7 @@ void psxcpu_device::update_cop0(int reg)
//if (ip & CAUSE_IP5) debugger_interrupt_hook(PSXCPU_IRQ3);
//if (ip & CAUSE_IP6) debugger_interrupt_hook(PSXCPU_IRQ4);
//if (ip & CAUSE_IP7) debugger_interrupt_hook(PSXCPU_IRQ5);
- m_op = m_cache->read_dword(m_pc);
+ m_op = m_instruction->read_dword(m_pc);
execute_unstoppable_instructions(1);
exception(EXC_INT);
}
@@ -1490,11 +1490,11 @@ void psxcpu_device::fetch_next_op()
{
uint32_t safepc = m_delayv & ~m_bad_word_address_mask;
- m_op = m_cache->read_dword( safepc );
+ m_op = m_instruction->read_dword( safepc );
}
else
{
- m_op = m_cache->read_dword( m_pc + 4 );
+ m_op = m_instruction->read_dword( m_pc + 4 );
}
}
@@ -1837,7 +1837,8 @@ void psxcpu_device::device_start()
{
// get our address spaces
m_program = &space( AS_PROGRAM );
- m_cache = m_program->cache<2, 0, ENDIANNESS_LITTLE>();
+ m_instruction = m_program->cache<2, 0, ENDIANNESS_LITTLE>();
+ m_data = m_program->specific<2, 0, ENDIANNESS_LITTLE>();
save_item( NAME( m_op ) );
save_item( NAME( m_pc ) );
@@ -2349,7 +2350,7 @@ void psxcpu_device::execute_run()
}
else
{
- m_op = m_cache->read_dword(m_pc);
+ m_op = m_instruction->read_dword(m_pc);
if( m_berr )
{
diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h
index f1fc9315852..5b57acc4859 100644
--- a/src/devices/cpu/psx/psx.h
+++ b/src/devices/cpu/psx/psx.h
@@ -208,7 +208,8 @@ protected:
// address spaces
const address_space_config m_program_config;
address_space *m_program;
- memory_access_cache<2, 0, ENDIANNESS_LITTLE> *m_cache;
+ memory_access_cache<2, 0, ENDIANNESS_LITTLE>* m_instruction;
+ memory_access_specific<2, 0, ENDIANNESS_LITTLE> *m_data;
// other internal states
int m_icount;