summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-09-09 19:38:27 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-09-09 19:38:27 -0400
commit5749b1ded1b123ca075f94767f7a4aff1462a31c (patch)
tree6effc2f7d2e831c3af64679d2156fb01ff68ebb6
parent451066eaca54e95dea450fcebf58cdda34518492 (diff)
h6280: Use official names for banking registers; reduce logical width of address space
-rw-r--r--src/devices/cpu/h6280/h6280.cpp12
-rw-r--r--src/devices/cpu/h6280/h6280.h16
2 files changed, 11 insertions, 17 deletions
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index 02450ff10d2..2746e637ba8 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -171,7 +171,7 @@ DEFINE_DEVICE_TYPE(H6280, h6280_device, "h6280", "Hudson Soft HuC6280")
h6280_device::h6280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cpu_device(mconfig, H6280, tag, owner, clock)
, device_mixer_interface(mconfig, *this, 2)
- , m_program_config("program", ENDIANNESS_LITTLE, 8, 21, 0, address_map_constructor(FUNC(h6280_device::internal_map), this))
+ , m_program_config("program", ENDIANNESS_LITTLE, 8, 21, 0, 16, 0, address_map_constructor(FUNC(h6280_device::internal_map), this))
, m_io_config("io", ENDIANNESS_LITTLE, 8, 2)
, m_port_in_cb(*this)
, m_port_out_cb(*this)
@@ -258,14 +258,8 @@ void h6280_device::device_start()
state_add(H6280_IRQ1_STATE, "IRQ1", m_irq_state[0]).mask(0xf);
state_add(H6280_IRQ2_STATE, "IRQ2", m_irq_state[1]).mask(0xf);
state_add(H6280_IRQT_STATE, "IRQT", m_irq_state[2]).mask(0xf);
- state_add(H6280_M1, "M1", m_mmr[0]).mask(0xff);
- state_add(H6280_M2, "M2", m_mmr[1]).mask(0xff);
- state_add(H6280_M3, "M3", m_mmr[2]).mask(0xff);
- state_add(H6280_M4, "M4", m_mmr[3]).mask(0xff);
- state_add(H6280_M5, "M5", m_mmr[4]).mask(0xff);
- state_add(H6280_M6, "M6", m_mmr[5]).mask(0xff);
- state_add(H6280_M7, "M7", m_mmr[6]).mask(0xff);
- state_add(H6280_M8, "M8", m_mmr[7]).mask(0xff);
+ for (int i = 0; i < 8; i++)
+ state_add(H6280_MPR0 + i, util::string_format("MPR%d", i).c_str(), m_mmr[i]).mask(0xff);
save_item(NAME(m_ppc.w.l));
save_item(NAME(m_pc.w.l));
diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h
index 86483beca98..5cb61d3689a 100644
--- a/src/devices/cpu/h6280/h6280.h
+++ b/src/devices/cpu/h6280/h6280.h
@@ -64,14 +64,14 @@ protected:
H6280_IRQ1_STATE,
H6280_IRQ2_STATE,
H6280_IRQT_STATE,
- H6280_M1,
- H6280_M2,
- H6280_M3,
- H6280_M4,
- H6280_M5,
- H6280_M6,
- H6280_M7,
- H6280_M8
+ H6280_MPR0,
+ H6280_MPR1,
+ H6280_MPR2,
+ H6280_MPR3,
+ H6280_MPR4,
+ H6280_MPR5,
+ H6280_MPR6,
+ H6280_MPR7
};
// device-level overrides