summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/8x300/8x300dasm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/8x300/8x300dasm.cpp')
-rw-r--r--src/devices/cpu/8x300/8x300dasm.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/devices/cpu/8x300/8x300dasm.cpp b/src/devices/cpu/8x300/8x300dasm.cpp
index a6375072a49..db231195f04 100644
--- a/src/devices/cpu/8x300/8x300dasm.cpp
+++ b/src/devices/cpu/8x300/8x300dasm.cpp
@@ -8,7 +8,7 @@
*/
#include "emu.h"
-#include "8x300.h"
+#include "8x300dasm.h"
#define SRC ((opcode & 0x1f00) >> 8)
#define DST (opcode & 0x001f)
@@ -16,7 +16,7 @@
#define IMM8 (opcode & 0x00ff)
#define IMM5 (opcode & 0x001f)
-static const char *reg_names[32] =
+const char *const n8x300_disassembler::reg_names[32] =
{
"AUX", "R1", "R2", "R3", "R4", "R5", "R6", "IVL", "OVF", "R11",
"Unused12", "Unused13", "Unused14", "Unused15", "Unused16", "IVR",
@@ -25,7 +25,7 @@ static const char *reg_names[32] =
};
// determines if right rotate or I/O field length is to be used
-static inline bool is_rot(uint16_t opcode)
+bool n8x300_disassembler::is_rot(uint16_t opcode)
{
if((opcode & 0x1000) || (opcode & 0x0010))
return false;
@@ -33,7 +33,7 @@ static inline bool is_rot(uint16_t opcode)
return true;
}
-static inline bool is_src_rot(uint16_t opcode)
+bool n8x300_disassembler::is_src_rot(uint16_t opcode)
{
if((opcode & 0x1000))
return false;
@@ -41,10 +41,15 @@ static inline bool is_src_rot(uint16_t opcode)
return true;
}
-CPU_DISASSEMBLE(n8x300)
+u32 n8x300_disassembler::opcode_alignment() const
+{
+ return 2;
+}
+
+offs_t n8x300_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
{
unsigned startpc = pc;
- uint16_t opcode = (oprom[pc - startpc] << 8) | oprom[pc+1 - startpc];
+ uint16_t opcode = opcodes.r16(pc);
uint8_t inst = opcode >> 13;
pc+=2;