summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/sh2
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2015-07-07 22:29:10 +0200
committer angelosa <salese_corp_ltd@email.it>2015-07-07 22:29:10 +0200
commitf7cd2d14cabdce7571ced441f3d50a05ae320b36 (patch)
treef0588180a84a9dce3929d5d92af77345b67885c8 /src/emu/cpu/sh2
parent37950bd90fdb299275d68aa9bed36c385b1aec76 (diff)
Fixed SH-1 internal mem map, nw
Diffstat (limited to 'src/emu/cpu/sh2')
-rw-r--r--src/emu/cpu/sh2/sh2.c12
-rw-r--r--src/emu/cpu/sh2/sh2.h3
2 files changed, 6 insertions, 9 deletions
diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c
index d826363a28b..6b913d1ef2c 100644
--- a/src/emu/cpu/sh2/sh2.c
+++ b/src/emu/cpu/sh2/sh2.c
@@ -147,8 +147,8 @@ static ADDRESS_MAP_START( sh2_internal_map, AS_PROGRAM, 32, sh2_device )
AM_RANGE(0xe0000000, 0xffffffff) AM_READWRITE(sh2_internal_r, sh2_internal_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( sh7032_map, AS_PROGRAM, 32, sh2_device )
-
+static ADDRESS_MAP_START( sh7032_map, AS_PROGRAM, 32, sh1_device )
+ AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7032_r,sh7032_w,0xffffffff) // SH-7032H internal i/o
ADDRESS_MAP_END
sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -189,9 +189,9 @@ void sh2_device::device_stop()
}
-sh2_device::sh2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int cpu_type)
+sh2_device::sh2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int cpu_type, address_map_constructor internal_map )
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
- , m_program_config("program", ENDIANNESS_BIG, 32, 32, 0, ADDRESS_MAP_NAME(sh2_internal_map))
+ , m_program_config("program", ENDIANNESS_BIG, 32, 32, 0, internal_map)
, m_decrypted_program_config("decrypted_opcodes", ENDIANNESS_BIG, 32, 32, 0)
, m_is_slave(0)
, m_cpu_type(cpu_type)
@@ -216,9 +216,7 @@ sh2_device::sh2_device(const machine_config &mconfig, device_type type, const ch
}
sh1_device::sh1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : sh2_device(mconfig, SH1, "SH-1", tag, owner, clock, "sh1", __FILE__, CPU_TYPE_SH1 ),
- m_program_config("program", ENDIANNESS_BIG, 32, 28, 0, ADDRESS_MAP_NAME(sh7032_map)),
- m_decrypted_program_config("decrypted_opcodes", ENDIANNESS_BIG, 32, 28, 0)
+ : sh2_device(mconfig, SH1, "SH-1", tag, owner, clock, "sh1", __FILE__, CPU_TYPE_SH1, ADDRESS_MAP_NAME(sh7032_map) )
{
}
diff --git a/src/emu/cpu/sh2/sh2.h b/src/emu/cpu/sh2/sh2.h
index 6f70030f6db..8908cb093f8 100644
--- a/src/emu/cpu/sh2/sh2.h
+++ b/src/emu/cpu/sh2/sh2.h
@@ -105,7 +105,7 @@ class sh2_device : public cpu_device
public:
// construction/destruction
sh2_device(const machine_config &mconfig, const char *_tag, device_t *_owner, UINT32 _clock);
- sh2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int cpu_type);
+ sh2_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int cpu_type,address_map_constructor internal_map);
static void set_is_slave(device_t &device, int slave) { downcast<sh2_device &>(device).m_is_slave = slave; }
static void set_dma_kludge_callback(device_t &device, sh2_dma_kludge_delegate callback) { downcast<sh2_device &>(device).m_dma_kludge_cb = callback; }
@@ -505,7 +505,6 @@ public:
DECLARE_WRITE16_MEMBER(sh7032_w);
private:
UINT16 m_sh7032_regs[0x200];
- address_space_config m_program_config, m_decrypted_program_config;
};