summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h8/h8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/h8/h8.cpp')
-rw-r--r--src/devices/cpu/h8/h8.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp
index e0214a6ea38..1d78fa4ba62 100644
--- a/src/devices/cpu/h8/h8.cpp
+++ b/src/devices/cpu/h8/h8.cpp
@@ -16,19 +16,26 @@
#include "h8_dtc.h"
#include "h8d.h"
-h8_device::h8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool mode_a16, address_map_constructor map_delegate) :
+h8_device::h8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate) :
cpu_device(mconfig, type, tag, owner, clock),
- program_config("program", ENDIANNESS_BIG, 16, mode_a16 ? 16 : 24, 0, map_delegate),
+ program_config("program", ENDIANNESS_BIG, 16, 16, 0, map_delegate),
io_config("io", ENDIANNESS_BIG, 16, 16, -1), program(nullptr), io(nullptr), cache(nullptr), PPC(0), NPC(0), PC(0), PIR(0), EXR(0), CCR(0), MAC(0), MACF(0),
TMP1(0), TMP2(0), TMPR(0), inst_state(0), inst_substate(0), icount(0), bcount(0), irq_vector(0), taken_irq_vector(0), irq_level(0), taken_irq_level(0), irq_required(false), irq_nmi(false)
{
supports_advanced = false;
mode_advanced = false;
+ mode_a20 = false;
has_exr = false;
mac_saturating = false;
has_trace = false;
}
+void h8_device::device_config_complete()
+{
+ uint8_t addrbits = mode_advanced ? (mode_a20 ? 20 : 24) : 16;
+ program_config.m_addr_width = program_config.m_logaddr_width = addrbits;
+}
+
void h8_device::device_start()
{
program = &space(AS_PROGRAM);