summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-01-24 07:56:16 -0500
committer AJR <ajrhacker@users.noreply.github.com>2019-01-24 07:57:39 -0500
commit2035fedd6e7d620cc23370049ec9ac588b243a6a (patch)
tree4393c783ad01b054be2d3b3a40597158d9f6d5da
parentbb0702d2d5f5ca6c89049ae6285c0701f2a488fb (diff)
8x300: Apply address shift to program space
-rw-r--r--src/devices/cpu/8x300/8x300.cpp14
-rw-r--r--src/devices/cpu/8x300/8x300.h2
-rw-r--r--src/devices/cpu/8x300/8x300dasm.cpp6
-rw-r--r--src/mame/drivers/fs3216.cpp2
-rw-r--r--src/mame/drivers/wicat.cpp4
-rw-r--r--src/tools/unidasm.cpp2
6 files changed, 15 insertions, 15 deletions
diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp
index bf08f3a3cdb..a8a9b9dcdad 100644
--- a/src/devices/cpu/8x300/8x300.cpp
+++ b/src/devices/cpu/8x300/8x300.cpp
@@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(N8X305, n8x305_cpu_device, "8x305", "Signetics 8X305")
n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: cpu_device(mconfig, type, tag, owner, clock)
- , m_program_config("program", ENDIANNESS_BIG, 16, 14, 0)
+ , m_program_config("program", ENDIANNESS_BIG, 16, 13, -1)
, m_io_config("io", ENDIANNESS_BIG, 8, 9, 0)
, m_sc_callback(*this)
{
@@ -154,7 +154,7 @@ void n8x300_cpu_device::device_resolve_objects()
void n8x300_cpu_device::device_start()
{
m_program = &space(AS_PROGRAM);
- m_cache = m_program->cache<1, 0, ENDIANNESS_BIG>();
+ m_cache = m_program->cache<1, -1, ENDIANNESS_BIG>();
m_io = &space(AS_IO);
save_item(NAME(m_PC));
@@ -229,8 +229,8 @@ void n8x300_cpu_device::device_start()
state_add( _8X300_OVF, "OVF", m_OVF).mask(0x01).formatstr("%01X");
state_add( _8X300_IVL, "IVL", m_IVL).mask(0xff).formatstr("%02X");
state_add( _8X300_IVR, "IVR", m_IVR).mask(0xff).formatstr("%02X");
- state_add(STATE_GENPC, "GENPC", m_genPC).mask(0x3ffe).callimport().noshow();
- state_add(STATE_GENPCBASE, "CURPC", m_genPC).mask(0x3ffe).callimport().noshow();
+ state_add(STATE_GENPC, "GENPC", m_genPC).mask(0x1fff).callimport().noshow();
+ state_add(STATE_GENPCBASE, "CURPC", m_genPC).mask(0x1fff).callimport().noshow();
set_icountptr(m_icount);
}
@@ -246,12 +246,12 @@ void n8x300_cpu_device::state_import(const device_state_entry &entry)
{
case _8X300_PC:
m_AR = m_PC;
- m_genPC = m_AR << 1;
+ m_genPC = m_AR;
m_increment_pc = true;
break;
case _8X300_AR:
- m_genPC = m_AR << 1;
+ m_genPC = m_AR;
m_increment_pc = false;
break;
@@ -284,7 +284,7 @@ void n8x300_cpu_device::execute_run()
uint8_t mask;
/* fetch the opcode */
- m_genPC = m_AR << 1;
+ m_genPC = m_AR;
debugger_instruction_hook(m_genPC);
opcode = FETCHOP(m_genPC);
diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h
index f85ead659bf..155079d225a 100644
--- a/src/devices/cpu/8x300/8x300.h
+++ b/src/devices/cpu/8x300/8x300.h
@@ -83,7 +83,7 @@ protected:
bool m_increment_pc;
address_space *m_program;
- memory_access_cache<1, 0, ENDIANNESS_BIG> *m_cache;
+ memory_access_cache<1, -1, ENDIANNESS_BIG> *m_cache;
address_space *m_io;
devcb_write8 m_sc_callback; // Select Command (address latch)
diff --git a/src/devices/cpu/8x300/8x300dasm.cpp b/src/devices/cpu/8x300/8x300dasm.cpp
index db231195f04..762fec8f382 100644
--- a/src/devices/cpu/8x300/8x300dasm.cpp
+++ b/src/devices/cpu/8x300/8x300dasm.cpp
@@ -43,7 +43,7 @@ bool n8x300_disassembler::is_src_rot(uint16_t opcode)
u32 n8x300_disassembler::opcode_alignment() const
{
- return 2;
+ return 1;
}
offs_t n8x300_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
@@ -51,7 +51,7 @@ offs_t n8x300_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
unsigned startpc = pc;
uint16_t opcode = opcodes.r16(pc);
uint8_t inst = opcode >> 13;
- pc+=2;
+ pc+=1;
// determine instruction
switch (inst)
@@ -127,7 +127,7 @@ offs_t n8x300_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
}
break;
case 0x07:
- util::stream_format(stream, "JMP %04XH", (opcode & 0x1fff) << 1);
+ util::stream_format(stream, "JMP %04XH", (opcode & 0x1fff));
break;
}
diff --git a/src/mame/drivers/fs3216.cpp b/src/mame/drivers/fs3216.cpp
index bb917962270..cbe6aa178df 100644
--- a/src/mame/drivers/fs3216.cpp
+++ b/src/mame/drivers/fs3216.cpp
@@ -445,7 +445,7 @@ void fs3216_state::clb_map(address_map &map)
void fs3216_state::wdcpu_prog_map(address_map &map)
{
- map(0x000, 0x7ff).rom().region("wdcpu", 0);
+ map(0x0000, 0x03ff).rom().region("wdcpu", 0);
}
void fs3216_state::wdcpu_bank_map(address_map &map)
diff --git a/src/mame/drivers/wicat.cpp b/src/mame/drivers/wicat.cpp
index 54faa6c0cd1..ea8cd57c964 100644
--- a/src/mame/drivers/wicat.cpp
+++ b/src/mame/drivers/wicat.cpp
@@ -202,8 +202,8 @@ void wicat_state::video_io(address_map &map)
void wicat_state::wd1000_mem(address_map &map)
{
- map(0x0000, 0x17ff).rom().region("wd3", 0x0000);
- map(0x1800, 0x1fff).noprw();
+ map(0x0000, 0x0bff).rom().region("wd3", 0x0000);
+ map(0x0c00, 0x0fff).noprw();
}
void wicat_state::wd1000_io(address_map &map)
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index 4faea8300e7..e0f4bd0b7a2 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -300,7 +300,7 @@ struct options
static const dasm_table_entry dasm_table[] =
{
- { "8x300", be, 0, []() -> util::disasm_interface * { return new n8x300_disassembler; } },
+ { "8x300", be, -1, []() -> util::disasm_interface * { return new n8x300_disassembler; } },
{ "adsp21xx", le, -2, []() -> util::disasm_interface * { return new adsp21xx_disassembler; } },
{ "alpha", le, 0, []() -> util::disasm_interface * { return new alpha_disassembler; } },
{ "alpha8201", le, 0, []() -> util::disasm_interface * { return new alpha8201_disassembler; } },