diff options
author | 2017-07-05 11:44:49 +0200 | |
---|---|---|
committer | 2017-11-26 17:41:27 +0100 | |
commit | 6caef2579a1490f05d28bcede731cbdd45fc5c65 (patch) | |
tree | 8055384e183be3cb27e7d0894ac53dc96c09e6fa /src/devices/cpu/pdp1/pdp1dasm.cpp | |
parent | 34b222062c89adbeed822f56be6130421777e11f (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/pdp1/pdp1dasm.cpp')
-rw-r--r-- | src/devices/cpu/pdp1/pdp1dasm.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/devices/cpu/pdp1/pdp1dasm.cpp b/src/devices/cpu/pdp1/pdp1dasm.cpp index 7376b752538..9b04c91ec87 100644 --- a/src/devices/cpu/pdp1/pdp1dasm.cpp +++ b/src/devices/cpu/pdp1/pdp1dasm.cpp @@ -1,13 +1,10 @@ // license:BSD-3-Clause // copyright-holders:Raphael Nabet #include "emu.h" -#include "cpu/pdp1/pdp1.h" +#include "pdp1dasm.h" +#include "pdp1.h" -/* PDP1 registers */ -static int ib; -static int y; - -static inline void ea (void) +inline void pdp1_disassembler::ea() { /* while (1) { @@ -20,15 +17,20 @@ static inline void ea (void) #define IN if (ib) util::stream_format(stream, " i") -CPU_DISASSEMBLE(pdp1) +u32 pdp1_disassembler::opcode_alignment() const +{ + return 4; +} + +offs_t pdp1_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) { int md; //int etime = 0; - md = oprom[0] << 24 | oprom[1] << 16 | oprom[2] << 8 | oprom[3]; + md = opcodes.r32(pc); - y = md & 07777; - ib = (md >> 12) & 1; /* */ + int y = md & 07777; + int ib = (md >> 12) & 1; /* */ switch (md >> 13) { case pdp1_device::AND: |