summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h6280
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/h6280')
-rw-r--r--src/devices/cpu/h6280/h6280.cpp40
-rw-r--r--src/devices/cpu/h6280/h6280.h6
2 files changed, 23 insertions, 23 deletions
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index 814f906de81..96ecb18534d 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -320,9 +320,9 @@ void h6280_device::device_reset()
#endif
m_io_buffer = 0;
- m_program = &space(AS_PROGRAM);
- m_cache = m_program->cache<0, 0, ENDIANNESS_LITTLE>();
- m_io = &space(AS_IO);
+ space(AS_PROGRAM).cache(m_cache);
+ space(AS_PROGRAM).specific(m_program);
+ space(AS_IO).specific(m_io);
/* set I and B flags */
P = _fI | _fB;
@@ -1605,7 +1605,7 @@ inline uint8_t h6280_device::smb(int bit, uint8_t tmp)
inline void h6280_device::st0(uint8_t tmp)
{
clear_t();
- m_io->write_byte(0x0000,tmp);
+ m_io.write_byte(0x0000,tmp);
}
/* 6280 ********************************************************
@@ -1614,7 +1614,7 @@ inline void h6280_device::st0(uint8_t tmp)
inline void h6280_device::st1(uint8_t tmp)
{
clear_t();
- m_io->write_byte(0x0002,tmp);
+ m_io.write_byte(0x0002,tmp);
}
/* 6280 ********************************************************
@@ -1623,7 +1623,7 @@ inline void h6280_device::st1(uint8_t tmp)
inline void h6280_device::st2(uint8_t tmp)
{
clear_t();
- m_io->write_byte(0x0003,tmp);
+ m_io.write_byte(0x0003,tmp);
}
/* 6280 ********************************************************
@@ -2329,7 +2329,7 @@ void h6280_device::execute_set_input(int inputnum, int state)
uint8_t h6280_device::program_read8(offs_t addr)
{
check_vdc_vce_penalty(addr);
- return m_program->read_byte(translated(addr));
+ return m_program.read_byte(translated(addr));
}
/***************************************************************
@@ -2338,7 +2338,7 @@ uint8_t h6280_device::program_read8(offs_t addr)
void h6280_device::program_write8(offs_t addr, uint8_t data)
{
check_vdc_vce_penalty(addr);
- m_program->write_byte(translated(addr), data);
+ m_program.write_byte(translated(addr), data);
}
/***************************************************************
@@ -2346,7 +2346,7 @@ void h6280_device::program_write8(offs_t addr, uint8_t data)
***************************************************************/
uint8_t h6280_device::program_read8z(offs_t addr)
{
- return m_program->read_byte((m_mmr[1] << 13) | (addr & 0x1fff));
+ return m_program.read_byte((m_mmr[1] << 13) | (addr & 0x1fff));
}
/***************************************************************
@@ -2354,7 +2354,7 @@ uint8_t h6280_device::program_read8z(offs_t addr)
***************************************************************/
void h6280_device::program_write8z(offs_t addr, uint8_t data)
{
- m_program->write_byte((m_mmr[1] << 13) | (addr & 0x1fff), data);
+ m_program.write_byte((m_mmr[1] << 13) | (addr & 0x1fff), data);
}
/***************************************************************
@@ -2362,8 +2362,8 @@ void h6280_device::program_write8z(offs_t addr, uint8_t data)
***************************************************************/
uint16_t h6280_device::program_read16(offs_t addr)
{
- return m_program->read_byte(translated(addr)) |
- (m_program->read_byte(translated(addr + 1)) << 8);
+ return m_program.read_byte(translated(addr)) |
+ (m_program.read_byte(translated(addr + 1)) << 8);
}
/***************************************************************
@@ -2373,13 +2373,13 @@ uint16_t h6280_device::program_read16z(offs_t addr)
{
if ((addr & 0xff) == 0xff)
{
- return m_program->read_byte((m_mmr[1] << 13) | (addr & 0x1fff)) |
- (m_program->read_byte((m_mmr[1] << 13) | ((addr - 0xff) & 0x1fff)) << 8);
+ return m_program.read_byte((m_mmr[1] << 13) | (addr & 0x1fff)) |
+ (m_program.read_byte((m_mmr[1] << 13) | ((addr - 0xff) & 0x1fff)) << 8);
}
else
{
- return m_program->read_byte((m_mmr[1] << 13) | (addr & 0x1fff)) |
- (m_program->read_byte((m_mmr[1] << 13) | ((addr + 1) & 0x1fff)) << 8);
+ return m_program.read_byte((m_mmr[1] << 13) | (addr & 0x1fff)) |
+ (m_program.read_byte((m_mmr[1] << 13) | ((addr + 1) & 0x1fff)) << 8);
}
}
@@ -2388,7 +2388,7 @@ uint16_t h6280_device::program_read16z(offs_t addr)
***************************************************************/
void h6280_device::push(uint8_t value)
{
- m_program->write_byte((m_mmr[1] << 13) | m_sp.d, value);
+ m_program.write_byte((m_mmr[1] << 13) | m_sp.d, value);
S--;
}
@@ -2398,7 +2398,7 @@ void h6280_device::push(uint8_t value)
void h6280_device::pull(uint8_t &value)
{
S++;
- value = m_program->read_byte((m_mmr[1] << 13) | m_sp.d);
+ value = m_program.read_byte((m_mmr[1] << 13) | m_sp.d);
}
/***************************************************************
@@ -2406,7 +2406,7 @@ void h6280_device::pull(uint8_t &value)
***************************************************************/
uint8_t h6280_device::read_opcode()
{
- return m_cache->read_byte(translated(PCW));
+ return m_cache.read_byte(translated(PCW));
}
/***************************************************************
@@ -2414,7 +2414,7 @@ uint8_t h6280_device::read_opcode()
***************************************************************/
uint8_t h6280_device::read_opcode_arg()
{
- return m_cache->read_byte(translated(PCW));
+ return m_cache.read_byte(translated(PCW));
}
diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h
index 923591eec93..22d3ac06ce6 100644
--- a/src/devices/cpu/h6280/h6280.h
+++ b/src/devices/cpu/h6280/h6280.h
@@ -380,9 +380,9 @@ protected:
uint8_t m_timer_scale;
// address spaces
- address_space *m_program;
- address_space *m_io;
- memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_cache;
+ memory_access<21, 0, 0, ENDIANNESS_LITTLE>::cache m_cache;
+ memory_access<21, 0, 0, ENDIANNESS_LITTLE>::specific m_program;
+ memory_access< 2, 0, 0, ENDIANNESS_LITTLE>::specific m_io;
typedef void (h6280_device::*ophandler)();