summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/upd7725/dasm7725.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2017-07-05 11:44:49 +0200
committer Olivier Galibert <galibert@pobox.com>2017-11-26 17:41:27 +0100
commit6caef2579a1490f05d28bcede731cbdd45fc5c65 (patch)
tree8055384e183be3cb27e7d0894ac53dc96c09e6fa /src/devices/cpu/upd7725/dasm7725.cpp
parent34b222062c89adbeed822f56be6130421777e11f (diff)
dvdisasm: Overhaul [O. Galibert]
Disassemblers are now independant classes. Not only the code is cleaner, but unidasm has access to all the cpu cores again. The interface to the disassembly method has changed from byte buffers to objects that give a result to read methods. This also adds support for lfsr and/or paged PCs.
Diffstat (limited to 'src/devices/cpu/upd7725/dasm7725.cpp')
-rw-r--r--src/devices/cpu/upd7725/dasm7725.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/devices/cpu/upd7725/dasm7725.cpp b/src/devices/cpu/upd7725/dasm7725.cpp
index f2e644e0bec..06a9fdd3d16 100644
--- a/src/devices/cpu/upd7725/dasm7725.cpp
+++ b/src/devices/cpu/upd7725/dasm7725.cpp
@@ -10,11 +10,16 @@
***************************************************************************/
#include "emu.h"
-#include "upd7725.h"
+#include "dasm7725.h"
-CPU_DISASSEMBLE(upd7725)
+u32 necdsp_disassembler::opcode_alignment() const
{
- uint32_t opcode = oprom[2] | (oprom[1] << 8) | (oprom[0] << 16);
+ return 1;
+}
+
+offs_t necdsp_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)
+{
+ uint32_t opcode = opcodes.r32(pc);
uint32_t type = (opcode >> 22);
// printf("dasm: PC %x opcode %08x\n", pc, opcode);
@@ -220,5 +225,5 @@ CPU_DISASSEMBLE(upd7725)
}
}
- return 1 | DASMFLAG_SUPPORTED;
+ return 1 | SUPPORTED;
}