Added infrastructure to compile universal standalone disassembler:

- added unidasm to the tools build
 - split the disassemblers out of libcpu and into new libdasm
 - ensured the disassembly entry points for all disassemblers are
    in the source file for the disassembler (sometimes new generic
    versions were created)

Still needs command line options and file loading, but the 
fundamentals are present, and it links.
This commit is contained in:
Aaron Giles 2009-08-22 06:25:07 +00:00
parent b99862230d
commit f474114e1d
56 changed files with 1241 additions and 738 deletions

4
.gitattributes vendored
View File

@ -62,6 +62,7 @@ src/emu/cpu/cp1610/1610dasm.c svneol=native#text/plain
src/emu/cpu/cp1610/cp1610.c svneol=native#text/plain
src/emu/cpu/cp1610/cp1610.h svneol=native#text/plain
src/emu/cpu/cpu.mak svneol=native#text/plain
src/emu/cpu/cubeqcpu/cubedasm.c svneol=native#text/plain
src/emu/cpu/cubeqcpu/cubeqcpu.c svneol=native#text/plain
src/emu/cpu/cubeqcpu/cubeqcpu.h svneol=native#text/plain
src/emu/cpu/drcbec.c svneol=native#text/plain
@ -93,6 +94,7 @@ src/emu/cpu/e132xs/e132xs.h svneol=native#text/plain
src/emu/cpu/e132xs/e132xsop.c svneol=native#text/plain
src/emu/cpu/esrip/esrip.c svneol=native#text/plain
src/emu/cpu/esrip/esrip.h svneol=native#text/plain
src/emu/cpu/esrip/esripdsm.c svneol=native#text/plain
src/emu/cpu/f8/f8.c svneol=native#text/plain
src/emu/cpu/f8/f8.h svneol=native#text/plain
src/emu/cpu/f8/f8dasm.c svneol=native#text/plain
@ -422,6 +424,7 @@ src/emu/cpu/tms34010/dis34010.c svneol=native#text/plain
src/emu/cpu/tms34010/makefile svneol=native#text/plain
src/emu/cpu/tms34010/tms34010.c svneol=native#text/plain
src/emu/cpu/tms34010/tms34010.h svneol=native#text/plain
src/emu/cpu/tms57002/57002dsm.c svneol=native#text/plain
src/emu/cpu/tms57002/tms57002.c svneol=native#text/plain
src/emu/cpu/tms57002/tms57002.h svneol=native#text/plain
src/emu/cpu/tms57002/tmsinstr.lst svneol=native#text/plain
@ -3692,4 +3695,5 @@ src/tools/split.c svneol=native#text/plain
src/tools/src2html.c svneol=native#text/plain
src/tools/srcclean.c svneol=native#text/plain
src/tools/tools.mak svneol=native#text/plain
src/tools/unidasm.c svneol=native#text/plain
src/version.c svneol=native#text/plain

View File

@ -420,6 +420,7 @@ OBJDIRS = $(OBJ)
LIBEMU = $(OBJ)/libemu.a
LIBCPU = $(OBJ)/libcpu.a
LIBDASM = $(OBJ)/libdasm.a
LIBSOUND = $(OBJ)/libsound.a
LIBUTIL = $(OBJ)/libutil.a
LIBOCORE = $(OBJ)/libocore.a
@ -537,7 +538,7 @@ $(sort $(OBJDIRS)):
ifndef EXECUTABLE_DEFINED
$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
# always recompile the version string
$(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
@echo Linking $@...

View File

@ -18,6 +18,8 @@
#include "arm.h"
#include "debugger.h"
CPU_DISASSEMBLE( arm );
#define READ8(addr) cpu_read8(cpustate,addr)
#define WRITE8(addr,data) cpu_write8(cpustate,addr,data)
#define READ32(addr) cpu_read32(cpustate,addr)
@ -492,12 +494,6 @@ static void set_irq_line(ARM_REGS* cpustate, int irqline, int state)
arm_check_irq_state(cpustate);
}
static CPU_DISASSEMBLE( arm )
{
UINT32 opcode = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
return 4 | arm_disasm(buffer, pc, opcode);
}
static CPU_INIT( arm )
{
ARM_REGS *cpustate = get_safe_token(device);

View File

@ -391,3 +391,9 @@ UINT32 arm_disasm( char *pBuf, UINT32 pc, UINT32 opcode )
return dasmflags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( arm )
{
UINT32 opcode = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
return 4 | arm_disasm(buffer, pc, opcode);
}

View File

@ -279,16 +279,15 @@ static void set_irq_line(arm_state *cpustate, int irqline, int state)
static CPU_DISASSEMBLE( arm7 )
{
CPU_DISASSEMBLE( arm7arm );
CPU_DISASSEMBLE( arm7thumb );
arm_state *cpustate = get_safe_token(device);
if (T_IS_SET(GET_CPSR))
{
return thumb_disasm(buffer, pc, oprom[0] | (oprom[1] << 8)) | 2;
}
return CPU_DISASSEMBLE_CALL(arm7thumb);
else
{
return arm7_disasm(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)) | 4;
}
return CPU_DISASSEMBLE_CALL(arm7arm);
}

View File

@ -1305,3 +1305,13 @@ UINT32 thumb_disasm( char *pBuf, UINT32 pc, UINT16 opcode )
return dasmflags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( arm7arm )
{
return arm7_disasm(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)) | 4;
}
CPU_DISASSEMBLE( arm7thumb )
{
return thumb_disasm(buffer, pc, oprom[0] | (oprom[1] << 8)) | 2;
}

View File

@ -81,13 +81,13 @@ $(DRCOBJ): $(DRCDEPS)
ifneq ($(filter ARM,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/arm
CPUOBJS += $(CPUOBJ)/arm/arm.o
DBGOBJS += $(CPUOBJ)/arm/armdasm.o
DASMOBJS += $(CPUOBJ)/arm/armdasm.o
endif
ifneq ($(filter ARM7,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/arm7
CPUOBJS += $(CPUOBJ)/arm7/arm7.o
DBGOBJS += $(CPUOBJ)/arm7/arm7dasm.o
DASMOBJS += $(CPUOBJ)/arm7/arm7dasm.o
endif
$(CPUOBJ)/arm/arm.o: $(CPUSRC)/arm/arm.c \
@ -107,7 +107,7 @@ $(CPUOBJ)/arm7/arm7.o: $(CPUSRC)/arm7/arm7.c \
ifneq ($(filter SE3208,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/se3208
CPUOBJS += $(CPUOBJ)/se3208/se3208.o
DBGOBJS += $(CPUOBJ)/se3208/se3208dis.o
DASMOBJS += $(CPUOBJ)/se3208/se3208dis.o
endif
$(CPUOBJ)/se3208/se3208.o: $(CPUSRC)/se3208/se3208.c \
@ -122,7 +122,7 @@ $(CPUOBJ)/se3208/se3208.o: $(CPUSRC)/se3208/se3208.c \
ifneq ($(filter ALPHA8201,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/alph8201
CPUOBJS += $(CPUOBJ)/alph8201/alph8201.o
DBGOBJS += $(CPUOBJ)/alph8201/8201dasm.o
DASMOBJS += $(CPUOBJ)/alph8201/8201dasm.o
endif
$(CPUOBJ)/alph8201/alph8201.o: $(CPUSRC)/alph8201/alph8201.c \
@ -137,7 +137,7 @@ $(CPUOBJ)/alph8201/alph8201.o: $(CPUSRC)/alph8201/alph8201.c \
ifneq ($(filter ADSP21XX,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/adsp2100
CPUOBJS += $(CPUOBJ)/adsp2100/adsp2100.o
DBGOBJS += $(CPUOBJ)/adsp2100/2100dasm.o
DASMOBJS += $(CPUOBJ)/adsp2100/2100dasm.o
endif
$(CPUOBJ)/adsp2100/adsp2100.o: $(CPUSRC)/adsp2100/adsp2100.c \
@ -153,7 +153,7 @@ $(CPUOBJ)/adsp2100/adsp2100.o: $(CPUSRC)/adsp2100/adsp2100.c \
ifneq ($(filter ADSP21062,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/sharc
CPUOBJS += $(CPUOBJ)/sharc/sharc.o
DBGOBJS += $(CPUOBJ)/sharc/sharcdsm.o
DASMOBJS += $(CPUOBJ)/sharc/sharcdsm.o
endif
$(CPUOBJ)/sharc/sharc.o: $(CPUSRC)/sharc/sharc.c \
@ -175,7 +175,7 @@ $(CPUOBJ)/sharc/sharc.o: $(CPUSRC)/sharc/sharc.c \
ifneq ($(filter APEXC,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/apexc
CPUOBJS += $(CPUOBJ)/apexc/apexc.o
DBGOBJS += $(CPUOBJ)/apexc/apexcdsm.o
DASMOBJS += $(CPUOBJ)/apexc/apexcdsm.o
endif
$(CPUOBJ)/apexc/apexc.o: $(CPUSRC)/apexc/apexc.c \
@ -190,7 +190,7 @@ $(CPUOBJ)/apexc/apexc.o: $(CPUSRC)/apexc/apexc.c \
ifneq ($(filter DSP32C,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/dsp32
CPUOBJS += $(CPUOBJ)/dsp32/dsp32.o
DBGOBJS += $(CPUOBJ)/dsp32/dsp32dis.o
DASMOBJS += $(CPUOBJ)/dsp32/dsp32dis.o
endif
$(CPUOBJ)/dsp32/dsp32.o: $(CPUSRC)/dsp32/dsp32.c \
@ -205,7 +205,7 @@ $(CPUOBJ)/dsp32/dsp32.o: $(CPUSRC)/dsp32/dsp32.c \
ifneq ($(filter ASAP,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/asap
CPUOBJS += $(CPUOBJ)/asap/asap.o
DBGOBJS += $(CPUOBJ)/asap/asapdasm.o
DASMOBJS += $(CPUOBJ)/asap/asapdasm.o
endif
$(CPUOBJ)/asap/asap.o: $(CPUSRC)/asap/asap.c \
@ -220,7 +220,7 @@ $(CPUOBJ)/asap/asap.o: $(CPUSRC)/asap/asap.c \
ifneq ($(filter JAGUAR,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/jaguar
CPUOBJS += $(CPUOBJ)/jaguar/jaguar.o
DBGOBJS += $(CPUOBJ)/jaguar/jagdasm.o
DASMOBJS += $(CPUOBJ)/jaguar/jagdasm.o
endif
$(CPUOBJ)/jaguar/jaguar.o: $(CPUSRC)/jaguar/jaguar.c \
@ -235,7 +235,7 @@ $(CPUOBJ)/jaguar/jaguar.o: $(CPUSRC)/jaguar/jaguar.c \
ifneq ($(filter AVR8,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/avr8
CPUOBJS += $(CPUOBJ)/avr8/avr8.o
DBGOBJS += $(CPUOBJ)/avr8/avr8dasm.o
DASMOBJS += $(CPUOBJ)/avr8/avr8dasm.o
endif
$(CPUOBJ)/avr8/avr8.o: $(CPUSRC)/avr8/avr8.c \
@ -250,7 +250,7 @@ $(CPUOBJ)/avr8/avr8.o: $(CPUSRC)/avr8/avr8.c \
ifneq ($(filter CUBEQCPU,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/cubeqcpu
CPUOBJS += $(CPUOBJ)/cubeqcpu/cubeqcpu.o
#DBGOBJS += $(CPUOBJ)/cubeqcpu/cubedasm.o
DASMOBJS += $(CPUOBJ)/cubeqcpu/cubedasm.o
endif
$(CPUOBJ)/cubeqcpu/cubeqcpu.o: $(CPUSRC)/cubeqcpu/cubeqcpu.c \
@ -265,7 +265,7 @@ $(CPUOBJ)/cubeqcpu/cubeqcpu.o: $(CPUSRC)/cubeqcpu/cubeqcpu.c \
ifneq ($(filter ESRIP,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/esrip
CPUOBJS += $(CPUOBJ)/esrip/esrip.o
#DBGOBJS += $(CPUOBJ)/esrip/esrip.o
DASMOBJS += $(CPUOBJ)/esrip/esripdsm.o
endif
$(CPUOBJ)/esrip/esrip.o: $(CPUSRC)/esrip/esrip.c \
@ -280,7 +280,7 @@ $(CPUOBJ)/esrip/esrip.o: $(CPUSRC)/esrip/esrip.c \
ifneq ($(filter CDP1802,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/cdp1802
CPUOBJS += $(CPUOBJ)/cdp1802/cdp1802.o
DBGOBJS += $(CPUOBJ)/cdp1802/1802dasm.o
DASMOBJS += $(CPUOBJ)/cdp1802/1802dasm.o
endif
$(CPUOBJ)/cdp1802/cdp1802.o: $(CPUSRC)/cdp1802/cdp1802.c \
@ -295,9 +295,9 @@ $(CPUOBJ)/cdp1802/cdp1802.o: $(CPUSRC)/cdp1802/cdp1802.c \
ifneq ($(filter COP400,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/cop400
CPUOBJS += $(CPUOBJ)/cop400/cop400.o
DBGOBJS += $(CPUOBJ)/cop400/cop410ds.o
DBGOBJS += $(CPUOBJ)/cop400/cop420ds.o
DBGOBJS += $(CPUOBJ)/cop400/cop440ds.o
DASMOBJS += $(CPUOBJ)/cop400/cop410ds.o
DASMOBJS += $(CPUOBJ)/cop400/cop420ds.o
DASMOBJS += $(CPUOBJ)/cop400/cop440ds.o
endif
$(CPUOBJ)/cop400/cop400.o: $(CPUSRC)/cop400/cop400.c \
@ -313,7 +313,7 @@ $(CPUOBJ)/cop400/cop400.o: $(CPUSRC)/cop400/cop400.c \
ifneq ($(filter CP1610,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/cp1610
CPUOBJS += $(CPUOBJ)/cp1610/cp1610.o
DBGOBJS += $(CPUOBJ)/cp1610/1610dasm.o
DASMOBJS += $(CPUOBJ)/cp1610/1610dasm.o
endif
$(CPUOBJ)/cp1610/cp1610.o: $(CPUSRC)/cp1610/cp1610.c \
@ -328,7 +328,7 @@ $(CPUOBJ)/cp1610/cp1610.o: $(CPUSRC)/cp1610/cp1610.c \
ifneq ($(filter CCPU,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/ccpu
CPUOBJS += $(CPUOBJ)/ccpu/ccpu.o
DBGOBJS += $(CPUOBJ)/ccpu/ccpudasm.o
DASMOBJS += $(CPUOBJ)/ccpu/ccpudasm.o
endif
$(CPUOBJ)/ccpu/ccpu.o: $(CPUSRC)/ccpu/ccpu.c \
@ -343,7 +343,7 @@ $(CPUOBJ)/ccpu/ccpu.o: $(CPUSRC)/ccpu/ccpu.c \
ifneq ($(filter T11,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/t11
CPUOBJS += $(CPUOBJ)/t11/t11.o
DBGOBJS += $(CPUOBJ)/t11/t11dasm.o
DASMOBJS += $(CPUOBJ)/t11/t11dasm.o
endif
$(CPUOBJ)/t11/t11.o: $(CPUSRC)/t11/t11.c \
@ -360,7 +360,7 @@ $(CPUOBJ)/t11/t11.o: $(CPUSRC)/t11/t11.c \
ifneq ($(filter F8,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/f8
CPUOBJS += $(CPUOBJ)/f8/f8.o
DBGOBJS += $(CPUOBJ)/f8/f8dasm.o
DASMOBJS += $(CPUOBJ)/f8/f8dasm.o
endif
$(CPUOBJ)/f8/f8.o: $(CPUSRC)/f8/f8.c \
@ -381,7 +381,7 @@ CPUOBJS += \
$(CPUOBJ)/g65816/g65816o2.o \
$(CPUOBJ)/g65816/g65816o3.o \
$(CPUOBJ)/g65816/g65816o4.o
DBGOBJS += $(CPUOBJ)/g65816/g65816ds.o
DASMOBJS += $(CPUOBJ)/g65816/g65816ds.o
endif
G65816DEPS = \
@ -416,7 +416,7 @@ $(CPUOBJ)/g65816/g65816o4.o: $(CPUSRC)/g65816/g65816o4.c \
ifneq ($(filter HD6309,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/hd6309
CPUOBJS += $(CPUOBJ)/hd6309/hd6309.o
DBGOBJS += $(CPUOBJ)/hd6309/6309dasm.o
DASMOBJS += $(CPUOBJ)/hd6309/6309dasm.o
endif
$(CPUOBJ)/hd6309/hd6309.o: $(CPUSRC)/hd6309/hd6309.c \
@ -432,7 +432,7 @@ $(CPUOBJ)/hd6309/hd6309.o: $(CPUSRC)/hd6309/hd6309.c \
ifneq ($(filter H83002,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/h83002
CPUOBJS += $(CPUOBJ)/h83002/h8_16.o $(CPUOBJ)/h83002/h8periph.o
DBGOBJS += $(CPUOBJ)/h83002/h8disasm.o
DASMOBJS += $(CPUOBJ)/h83002/h8disasm.o
endif
$(CPUOBJ)/h83002/h8_16.o: $(CPUSRC)/h83002/h8_16.c \
@ -453,7 +453,7 @@ $(CPUOBJ)/h83002/h8periph.o: $(CPUSRC)/h83002/h8periph.c \
ifneq ($(filter H83334,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/h83002
CPUOBJS += $(CPUOBJ)/h83002/h8_8.o $(CPUOBJ)/h83002/h8periph.o
DBGOBJS += $(CPUOBJ)/h83002/h8disasm.o
DASMOBJS += $(CPUOBJ)/h83002/h8disasm.o
endif
$(CPUOBJ)/h83002/h8_8.o: $(CPUSRC)/h83002/h8_8.c \
@ -473,7 +473,7 @@ $(CPUOBJ)/h83002/h8periph.o: $(CPUSRC)/h83002/h8periph.c \
ifneq ($(filter SH2,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/sh2
CPUOBJS += $(CPUOBJ)/sh2/sh2.o $(CPUOBJ)/sh2/sh2comn.o $(CPUOBJ)/sh2/sh2drc.o $(CPUOBJ)/sh2/sh2fe.o $(DRCOBJ)
DBGOBJS += $(CPUOBJ)/sh2/sh2dasm.o
DASMOBJS += $(CPUOBJ)/sh2/sh2dasm.o
endif
$(CPUOBJ)/sh2/sh2.o: $(CPUSRC)/sh2/sh2.c \
@ -499,7 +499,7 @@ $(CPUOBJ)/sh2/sh2fe.o: $(CPUSRC)/sh2/sh2fe.c \
ifneq ($(filter SH4,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/sh4
CPUOBJS += $(CPUOBJ)/sh4/sh4.o $(CPUOBJ)/sh4/sh4comn.o
DBGOBJS += $(CPUOBJ)/sh4/sh4dasm.o
DASMOBJS += $(CPUOBJ)/sh4/sh4dasm.o
endif
$(CPUOBJ)/sh4/sh4.o: $(CPUSRC)/sh4/sh4.c \
@ -519,7 +519,7 @@ $(CPUOBJ)/sh4/sh4comn.o: $(CPUSRC)/sh4/sh4comn.c \
ifneq ($(filter H6280,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/h6280
CPUOBJS += $(CPUOBJ)/h6280/h6280.o
DBGOBJS += $(CPUOBJ)/h6280/6280dasm.o
DASMOBJS += $(CPUOBJ)/h6280/6280dasm.o
endif
$(CPUOBJ)/h6280/h6280.o: $(CPUSRC)/h6280/h6280.c \
@ -536,7 +536,7 @@ $(CPUOBJ)/h6280/h6280.o: $(CPUSRC)/h6280/h6280.c \
ifneq ($(filter E1,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/e132xs
CPUOBJS += $(CPUOBJ)/e132xs/e132xs.o
DBGOBJS += $(CPUOBJ)/e132xs/32xsdasm.o
DASMOBJS += $(CPUOBJ)/e132xs/32xsdasm.o
endif
$(CPUOBJ)/e132xs/e132xs.o: $(CPUSRC)/e132xs/e132xs.c \
@ -552,7 +552,7 @@ $(CPUOBJ)/e132xs/e132xs.o: $(CPUSRC)/e132xs/e132xs.c \
ifneq ($(filter I4004,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/i4004
CPUOBJS += $(CPUOBJ)/i4004/i4004.o
DBGOBJS += $(CPUOBJ)/i4004/4004dasm.o
DASMOBJS += $(CPUOBJ)/i4004/4004dasm.o
endif
$(CPUOBJ)/i4004/i4004.o: $(CPUSRC)/i4004/i4004.c \
@ -567,7 +567,7 @@ $(CPUOBJ)/i4004/i4004.o: $(CPUSRC)/i4004/i4004.c \
ifneq ($(filter I8085,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/i8085
CPUOBJS += $(CPUOBJ)/i8085/i8085.o
DBGOBJS += $(CPUOBJ)/i8085/8085dasm.o
DASMOBJS += $(CPUOBJ)/i8085/8085dasm.o
endif
$(CPUOBJ)/i8085/i8085.o: $(CPUSRC)/i8085/i8085.c \
@ -583,7 +583,7 @@ $(CPUOBJ)/i8085/i8085.o: $(CPUSRC)/i8085/i8085.c \
ifneq ($(filter MCS48,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/mcs48
CPUOBJS += $(CPUOBJ)/mcs48/mcs48.o
DBGOBJS += $(CPUOBJ)/mcs48/mcs48dsm.o
DASMOBJS += $(CPUOBJ)/mcs48/mcs48dsm.o
endif
$(CPUOBJ)/mcs48/mcs48.o: $(CPUSRC)/mcs48/mcs48.c \
@ -598,7 +598,7 @@ $(CPUOBJ)/mcs48/mcs48.o: $(CPUSRC)/mcs48/mcs48.c \
ifneq ($(filter MCS51,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/mcs51
CPUOBJS += $(CPUOBJ)/mcs51/mcs51.o
DBGOBJS += $(CPUOBJ)/mcs51/mcs51dasm.o
DASMOBJS += $(CPUOBJ)/mcs51/mcs51dasm.o
endif
$(CPUOBJ)/mcs51/mcs51.o: $(CPUSRC)/mcs51/mcs51.c \
@ -613,13 +613,13 @@ ifneq ($(filter I86,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/i86 $(CPUOBJ)/i386
CPUOBJS += $(CPUOBJ)/i86/i86.o
CPUOBJS += $(CPUOBJ)/i86/i286.o
DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
DASMOBJS += $(CPUOBJ)/i386/i386dasm.o
endif
ifneq ($(filter I386,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/i386
CPUOBJS += $(CPUOBJ)/i386/i386.o
DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
DASMOBJS += $(CPUOBJ)/i386/i386dasm.o
endif
I86DEPS = \
@ -662,7 +662,7 @@ $(CPUOBJ)/i386/i386.o: $(CPUSRC)/i386/i386.c \
ifneq ($(filter I860,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/i860
CPUOBJS += $(CPUOBJ)/i860/i860.o
DBGOBJS += $(CPUOBJ)/i860/i860dis.o
DASMOBJS += $(CPUOBJ)/i860/i860dis.o
endif
$(CPUOBJ)/i860/i860.o: $(CPUSRC)/i860/i860.c \
@ -676,7 +676,7 @@ $(CPUOBJ)/i860/i860.o: $(CPUSRC)/i860/i860.c \
ifneq ($(filter I960,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/i960
CPUOBJS += $(CPUOBJ)/i960/i960.o
DBGOBJS += $(CPUOBJ)/i960/i960dis.o
DASMOBJS += $(CPUOBJ)/i960/i960dis.o
endif
$(CPUOBJ)/i960/i960.o: $(CPUSRC)/i960/i960.c \
@ -691,7 +691,7 @@ $(CPUOBJ)/i960/i960.o: $(CPUSRC)/i960/i960.c \
ifneq ($(filter KONAMI,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/konami
CPUOBJS += $(CPUOBJ)/konami/konami.o
DBGOBJS += $(CPUOBJ)/konami/knmidasm.o
DASMOBJS += $(CPUOBJ)/konami/knmidasm.o
endif
$(CPUOBJ)/konami/konami.o: $(CPUSRC)/konami/konami.c \
@ -708,7 +708,7 @@ $(CPUOBJ)/konami/konami.o: $(CPUSRC)/konami/konami.c \
ifneq ($(filter LH5801,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/lh5801
CPUOBJS += $(CPUOBJ)/lh5801/lh5801.o
DBGOBJS += $(CPUOBJ)/lh5801/5801dasm.o
DASMOBJS += $(CPUOBJ)/lh5801/5801dasm.o
endif
$(CPUOBJ)/lh5801/lh5801.o: $(CPUSRC)/lh5801/lh5801.c \
@ -724,7 +724,7 @@ $(CPUOBJ)/lh5801/lh5801.o: $(CPUSRC)/lh5801/lh5801.c \
ifneq ($(filter SSEM,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/ssem
CPUOBJS += $(CPUOBJ)/ssem/ssem.o
DBGOBJS += $(CPUOBJ)/ssem/ssemdasm.o
DASMOBJS += $(CPUOBJ)/ssem/ssemdasm.o
endif
$(CPUOBJ)/ssem/ssem.o: $(CPUSRC)/ssem/ssem.c \
@ -739,7 +739,7 @@ $(CPUOBJ)/ssem/ssem.o: $(CPUSRC)/ssem/ssem.c \
ifneq ($(filter MB88XX,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/mb88xx
CPUOBJS += $(CPUOBJ)/mb88xx/mb88xx.o
DBGOBJS += $(CPUOBJ)/mb88xx/mb88dasm.o
DASMOBJS += $(CPUOBJ)/mb88xx/mb88dasm.o
endif
$(CPUOBJ)/mb88xx/mb88xx.o: $(CPUSRC)/mb88xx/mb88xx.c \
@ -754,7 +754,7 @@ $(CPUOBJ)/mb88xx/mb88xx.o: $(CPUSRC)/mb88xx/mb88xx.c \
ifneq ($(filter MB86233,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/mb86233
CPUOBJS += $(CPUOBJ)/mb86233/mb86233.o
DBGOBJS += $(CPUOBJ)/mb86233/mb86233d.o
DASMOBJS += $(CPUOBJ)/mb86233/mb86233d.o
endif
$(CPUOBJ)/mb86233/mb86233.o: $(CPUSRC)/mb86233/mb86233.c \
@ -769,7 +769,7 @@ $(CPUOBJ)/mb86233/mb86233.o: $(CPUSRC)/mb86233/mb86233.c \
ifneq ($(filter PIC16C5X,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/pic16c5x
CPUOBJS += $(CPUOBJ)/pic16c5x/pic16c5x.o
DBGOBJS += $(CPUOBJ)/pic16c5x/16c5xdsm.o
DASMOBJS += $(CPUOBJ)/pic16c5x/16c5xdsm.o
endif
$(CPUOBJ)/pic16c5x/pic16c5x.o: $(CPUSRC)/pic16c5x/pic16c5x.c \
@ -788,9 +788,9 @@ OBJDIRS += $(CPUOBJ)/mips
CPUOBJS += $(CPUOBJ)/mips/r3000.o
CPUOBJS += $(CPUOBJ)/mips/mips3com.o $(CPUOBJ)/mips/mips3fe.o $(CPUOBJ)/mips/mips3drc.o $(DRCOBJ)
CPUOBJS += $(CPUOBJ)/mips/psx.o
DBGOBJS += $(CPUOBJ)/mips/r3kdasm.o
DBGOBJS += $(CPUOBJ)/mips/mips3dsm.o
DBGOBJS += $(CPUOBJ)/mips/psxdasm.o
DASMOBJS += $(CPUOBJ)/mips/r3kdasm.o
DASMOBJS += $(CPUOBJ)/mips/mips3dsm.o
DASMOBJS += $(CPUOBJ)/mips/psxdasm.o
endif
$(CPUOBJ)/mips/r3000.o: $(CPUSRC)/mips/r3000.c \
@ -826,7 +826,7 @@ CPUOBJS += \
$(CPUOBJ)/m37710/m37710o1.o \
$(CPUOBJ)/m37710/m37710o2.o \
$(CPUOBJ)/m37710/m37710o3.o
DBGOBJS += $(CPUOBJ)/m37710/m7700ds.o
DASMOBJS += $(CPUOBJ)/m37710/m7700ds.o
endif
M37710DEPS = \
@ -864,7 +864,7 @@ CPUOBJS += $(CPUOBJ)/m6502/m6502.o
CPUOBJS += $(CPUOBJ)/m6502/m6509.o
CPUOBJS += $(CPUOBJ)/m6502/m65ce02.o
CPUOBJS += $(CPUOBJ)/m6502/m4510.o
DBGOBJS += $(CPUOBJ)/m6502/6502dasm.o
DASMOBJS += $(CPUOBJ)/m6502/6502dasm.o
endif
$(CPUOBJ)/m6502/m6502.o: $(CPUSRC)/m6502/m6502.c \
@ -895,7 +895,7 @@ $(CPUOBJ)/m6502/m6509.o: $(CPUSRC)/m6502/m6509.c \
ifneq ($(filter M6800,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/m6800
CPUOBJS += $(CPUOBJ)/m6800/m6800.o
DBGOBJS += $(CPUOBJ)/m6800/6800dasm.o
DASMOBJS += $(CPUOBJ)/m6800/6800dasm.o
endif
$(CPUOBJ)/m6800/m6800.o: $(CPUSRC)/m6800/m6800.c \
@ -912,7 +912,7 @@ $(CPUOBJ)/m6800/m6800.o: $(CPUSRC)/m6800/m6800.c \
ifneq ($(filter M6805,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/m6805
CPUOBJS += $(CPUOBJ)/m6805/m6805.o
DBGOBJS += $(CPUOBJ)/m6805/6805dasm.o
DASMOBJS += $(CPUOBJ)/m6805/6805dasm.o
endif
$(CPUOBJ)/m6805/m6805.o: $(CPUSRC)/m6805/m6805.c \
@ -928,7 +928,7 @@ $(CPUOBJ)/m6805/m6805.o: $(CPUSRC)/m6805/m6805.c \
ifneq ($(filter M6809,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/m6809
CPUOBJS += $(CPUOBJ)/m6809/m6809.o
DBGOBJS += $(CPUOBJ)/m6809/6809dasm.o
DASMOBJS += $(CPUOBJ)/m6809/6809dasm.o
endif
$(CPUOBJ)/m6809/m6809.o: $(CPUSRC)/m6809/m6809.c \
@ -945,7 +945,7 @@ $(CPUOBJ)/m6809/m6809.o: $(CPUSRC)/m6809/m6809.c \
ifneq ($(filter MC68HC11,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/mc68hc11
CPUOBJS += $(CPUOBJ)/mc68hc11/mc68hc11.o
DBGOBJS += $(CPUOBJ)/mc68hc11/hc11dasm.o
DASMOBJS += $(CPUOBJ)/mc68hc11/hc11dasm.o
endif
$(CPUOBJ)/mc68hc11/mc68hc11.o: $(CPUSRC)/mc68hc11/mc68hc11.c \
@ -960,7 +960,7 @@ $(CPUOBJ)/mc68hc11/mc68hc11.o: $(CPUSRC)/mc68hc11/mc68hc11.c \
ifneq ($(filter M680X0,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/m68000
CPUOBJS += $(CPUOBJ)/m68000/m68kcpu.o $(CPUOBJ)/m68000/m68kops.o
DBGOBJS += $(CPUOBJ)/m68000/m68kdasm.o
DASMOBJS += $(CPUOBJ)/m68000/m68kdasm.o
M68KMAKE = $(BUILDOUT)/m68kmake$(BUILD_EXE)
endif
@ -1002,7 +1002,7 @@ $(CPUOBJ)/m68000/m68kcpu.o: $(CPUOBJ)/m68000/m68kops.c \
ifneq ($(filter DSP56156,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/dsp56k
CPUOBJS += $(CPUOBJ)/dsp56k/dsp56k.o
DBGOBJS += $(CPUOBJ)/dsp56k/dsp56dsm.o
DASMOBJS += $(CPUOBJ)/dsp56k/dsp56dsm.o
endif
$(CPUOBJ)/dsp56k/dsp56k.o: $(CPUSRC)/dsp56k/dsp56k.c \
@ -1020,8 +1020,8 @@ ifneq ($(filter PDP1,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/pdp1
CPUOBJS += $(CPUOBJ)/pdp1/pdp1.o
CPUOBJS += $(CPUOBJ)/pdp1/tx0.o
DBGOBJS += $(CPUOBJ)/pdp1/pdp1dasm.o
DBGOBJS += $(CPUOBJ)/pdp1/tx0dasm.o
DASMOBJS += $(CPUOBJ)/pdp1/pdp1dasm.o
DASMOBJS += $(CPUOBJ)/pdp1/tx0dasm.o
endif
$(CPUOBJ)/pdp1/pdp1.o: $(CPUSRC)/pdp1/pdp1.c \
@ -1041,7 +1041,7 @@ $(CPUOBJ)/pdp1/tx0dasm.o: $(CPUSRC)/pdp1/tx0.h \
ifneq ($(filter POWERPC,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/powerpc
CPUOBJS += $(CPUOBJ)/powerpc/ppccom.o $(CPUOBJ)/powerpc/ppcfe.o $(CPUOBJ)/powerpc/ppcdrc.o $(DRCOBJ)
DBGOBJS += $(CPUOBJ)/powerpc/ppc_dasm.o
DASMOBJS += $(CPUOBJ)/powerpc/ppc_dasm.o
endif
$(CPUOBJ)/powerpc/ppccom.o: $(CPUSRC)/powerpc/ppc.h \
@ -1066,13 +1066,13 @@ $(CPUOBJ)/powerpc/ppcdrc.o: $(CPUSRC)/powerpc/ppcdrc.c \
ifneq ($(filter NEC,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/nec
CPUOBJS += $(CPUOBJ)/nec/nec.o
DBGOBJS += $(CPUOBJ)/nec/necdasm.o
DASMOBJS += $(CPUOBJ)/nec/necdasm.o
endif
ifneq ($(filter V30MZ,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/v30mz $(CPUOBJ)/nec
CPUOBJS += $(CPUOBJ)/v30mz/v30mz.o
DBGOBJS += $(CPUOBJ)/nec/necdasm.o
DASMOBJS += $(CPUOBJ)/nec/necdasm.o
endif
$(CPUOBJ)/nec/nec.o: $(CPUSRC)/nec/nec.c \
@ -1100,7 +1100,7 @@ $(CPUOBJ)/v30mz/v30mz.o: $(CPUSRC)/v30mz/v30mz.c \
ifneq ($(filter V60,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/v60
CPUOBJS += $(CPUOBJ)/v60/v60.o
DBGOBJS += $(CPUOBJ)/v60/v60d.o
DASMOBJS += $(CPUOBJ)/v60/v60d.o
endif
$(CPUOBJ)/v60/v60.o: $(CPUSRC)/v60/am.c \
@ -1128,7 +1128,7 @@ $(CPUOBJ)/v60/v60.o: $(CPUSRC)/v60/am.c \
ifneq ($(filter V810,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/v810
CPUOBJS += $(CPUOBJ)/v810/v810.o
DBGOBJS += $(CPUOBJ)/v810/v810dasm.o
DASMOBJS += $(CPUOBJ)/v810/v810dasm.o
endif
$(CPUOBJ)/v810/v810.o: $(CPUSRC)/v810/v810.c \
@ -1143,7 +1143,7 @@ $(CPUOBJ)/v810/v810.o: $(CPUSRC)/v810/v810.c \
ifneq ($(filter UPD7810,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/upd7810
CPUOBJS += $(CPUOBJ)/upd7810/upd7810.o
DBGOBJS += $(CPUOBJ)/upd7810/7810dasm.o
DASMOBJS += $(CPUOBJ)/upd7810/7810dasm.o
endif
$(CPUOBJ)/upd7810/upd7810.o: $(CPUSRC)/upd7810/upd7810.c \
@ -1160,7 +1160,7 @@ $(CPUOBJ)/upd7810/upd7810.o: $(CPUSRC)/upd7810/upd7810.c \
ifneq ($(filter MINX,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/minx
CPUOBJS += $(CPUOBJ)/minx/minx.o
DBGOBJS += $(CPUOBJ)/minx/minxd.o
DASMOBJS += $(CPUOBJ)/minx/minxd.o
endif
$(CPUOBJ)/minx/minx.o: $(CPUSRC)/minx/minx.c \
@ -1180,7 +1180,7 @@ $(CPUOBJ)/minx/minx.o: $(CPUSRC)/minx/minx.c \
ifneq ($(filter RSP,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/rsp
CPUOBJS += $(CPUOBJ)/rsp/rsp.o
DBGOBJS += $(CPUOBJ)/rsp/rsp_dasm.o
DASMOBJS += $(CPUOBJ)/rsp/rsp_dasm.o
endif
$(CPUOBJ)/rsp/rsp.o: $(CPUSRC)/rsp/rsp.c \
@ -1195,7 +1195,7 @@ $(CPUOBJ)/rsp/rsp.o: $(CPUSRC)/rsp/rsp.c \
ifneq ($(filter SATURN,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/saturn
CPUOBJS += $(CPUOBJ)/saturn/saturn.o
DBGOBJS += $(CPUOBJ)/saturn/saturnds.o
DASMOBJS += $(CPUOBJ)/saturn/saturnds.o
endif
$(CPUOBJ)/saturn/saturn.o: $(CPUSRC)/saturn/saturn.c \
@ -1212,7 +1212,7 @@ $(CPUOBJ)/saturn/saturn.o: $(CPUSRC)/saturn/saturn.c \
ifneq ($(filter S2650,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/s2650
CPUOBJS += $(CPUOBJ)/s2650/s2650.o
DBGOBJS += $(CPUOBJ)/s2650/2650dasm.o
DASMOBJS += $(CPUOBJ)/s2650/2650dasm.o
endif
$(CPUOBJ)/s2650/s2650.o: $(CPUSRC)/s2650/s2650.c \
@ -1228,7 +1228,7 @@ $(CPUOBJ)/s2650/s2650.o: $(CPUSRC)/s2650/s2650.c \
ifneq ($(filter SC61860,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/sc61860
CPUOBJS += $(CPUOBJ)/sc61860/sc61860.o
DBGOBJS += $(CPUOBJ)/sc61860/scdasm.o
DASMOBJS += $(CPUOBJ)/sc61860/scdasm.o
endif
$(CPUOBJ)/sc61860/sc61860.o: $(CPUSRC)/sc61860/sc61860.h \
@ -1245,7 +1245,7 @@ $(CPUOBJ)/sc61860/sc61860.o: $(CPUSRC)/sc61860/sc61860.h \
ifneq ($(filter SM8500,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/sm8500
CPUOBJS += $(CPUOBJ)/sm8500/sm8500.o
DBGOBJS += $(CPUOBJ)/sm8500/sm8500d.o
DASMOBJS += $(CPUOBJ)/sm8500/sm8500d.o
endif
$(CPUOBJ)/sm8500/sm8500.o: $(CPUSRC)/sm8500/sm8500.c \
@ -1262,7 +1262,7 @@ ifneq ($(filter SPC700,$(CPUS)),)
SPCD = cpu/spc700
OBJDIRS += $(CPUOBJ)/spc700
CPUOBJS += $(CPUOBJ)/spc700/spc700.o
DBGOBJS += $(CPUOBJ)/spc700/spc700ds.o
DASMOBJS += $(CPUOBJ)/spc700/spc700ds.o
endif
$(CPUOBJ)/spc700/spc700.o: $(CPUSRC)/spc700/spc700.c \
@ -1277,7 +1277,7 @@ $(CPUOBJ)/spc700/spc700.o: $(CPUSRC)/spc700/spc700.c \
ifneq ($(filter SSP1601,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/ssp1601
CPUOBJS += $(CPUOBJ)/ssp1601/ssp1601.o
DBGOBJS += $(CPUOBJ)/ssp1601/ssp1601d.o
DASMOBJS += $(CPUOBJ)/ssp1601/ssp1601d.o
endif
$(CPUOBJ)/ssp1610/ssp1601.o: $(CPUSRC)/ssp1601/ssp1601.c \
@ -1292,7 +1292,7 @@ $(CPUOBJ)/ssp1610/ssp1601.o: $(CPUSRC)/ssp1601/ssp1601.c \
ifneq ($(filter TMS0980,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms0980
CPUOBJS += $(CPUOBJ)/tms0980/tms0980.o
DBGOBJS += $(CPUOBJ)/tms0980/tms0980d.o
DASMOBJS += $(CPUOBJ)/tms0980/tms0980d.o
endif
$(CPUOBJ)/tms0980/tms0980.o: $(CPUSRC)/tms0980/tms0980.h \
@ -1310,7 +1310,7 @@ $(CPUOBJ)/tms0980/tms0980d.o: $(CPUSRC)/tms0980/tms0980.h \
ifneq ($(filter TMS7000,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms7000
CPUOBJS += $(CPUOBJ)/tms7000/tms7000.o
DBGOBJS += $(CPUOBJ)/tms7000/7000dasm.o
DASMOBJS += $(CPUOBJ)/tms7000/7000dasm.o
endif
$(CPUOBJ)/tms7000/tms7000.o: $(CPUSRC)/tms7000/tms7000.h \
@ -1331,7 +1331,7 @@ CPUOBJS += $(CPUOBJ)/tms9900/tms9900.o
CPUOBJS += $(CPUOBJ)/tms9900/tms9980a.o
CPUOBJS += $(CPUOBJ)/tms9900/tms9995.o
CPUOBJS += $(CPUOBJ)/tms9900/ti990_10.o
DBGOBJS += $(CPUOBJ)/tms9900/9900dasm.o
DASMOBJS += $(CPUOBJ)/tms9900/9900dasm.o
endif
$(CPUOBJ)/tms9900/tms9900.o: $(CPUSRC)/tms9900/tms9900.c \
@ -1363,7 +1363,7 @@ $(CPUOBJ)/tms9900/ti990_10.o: $(CPUSRC)/tms9900/ti990_10.c \
ifneq ($(filter TMS340X0,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms34010
CPUOBJS += $(CPUOBJ)/tms34010/tms34010.o
DBGOBJS += $(CPUOBJ)/tms34010/34010dsm.o
DASMOBJS += $(CPUOBJ)/tms34010/34010dsm.o
endif
$(CPUOBJ)/tms34010/tms34010.o: $(CPUSRC)/tms34010/tms34010.c \
@ -1382,7 +1382,7 @@ $(CPUOBJ)/tms34010/tms34010.o: $(CPUSRC)/tms34010/tms34010.c \
ifneq ($(filter TMS32010,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms32010
CPUOBJS += $(CPUOBJ)/tms32010/tms32010.o
DBGOBJS += $(CPUOBJ)/tms32010/32010dsm.o
DASMOBJS += $(CPUOBJ)/tms32010/32010dsm.o
endif
$(CPUOBJ)/tms32010/tms32010.o: $(CPUSRC)/tms32010/tms32010.c \
@ -1397,7 +1397,7 @@ $(CPUOBJ)/tms32010/tms32010.o: $(CPUSRC)/tms32010/tms32010.c \
ifneq ($(filter TMS32025,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms32025
CPUOBJS += $(CPUOBJ)/tms32025/tms32025.o
DBGOBJS += $(CPUOBJ)/tms32025/32025dsm.o
DASMOBJS += $(CPUOBJ)/tms32025/32025dsm.o
endif
$(CPUOBJ)/tms32025/tms32025.o: $(CPUSRC)/tms32025/tms32025.c \
@ -1412,7 +1412,7 @@ $(CPUOBJ)/tms32025/tms32025.o: $(CPUSRC)/tms32025/tms32025.c \
ifneq ($(filter TMS32031,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms32031
CPUOBJS += $(CPUOBJ)/tms32031/tms32031.o
DBGOBJS += $(CPUOBJ)/tms32031/dis32031.o
DASMOBJS += $(CPUOBJ)/tms32031/dis32031.o
endif
$(CPUOBJ)/tms32031/tms32031.o: $(CPUSRC)/tms32031/tms32031.c \
@ -1428,7 +1428,7 @@ $(CPUOBJ)/tms32031/tms32031.o: $(CPUSRC)/tms32031/tms32031.c \
ifneq ($(filter TMS32051,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms32051
CPUOBJS += $(CPUOBJ)/tms32051/tms32051.o
DBGOBJS += $(CPUOBJ)/tms32051/dis32051.o
DASMOBJS += $(CPUOBJ)/tms32051/dis32051.o
endif
$(CPUOBJ)/tms32051/tms32051.o: $(CPUSRC)/tms32051/tms32051.c \
@ -1443,6 +1443,7 @@ $(CPUOBJ)/tms32051/tms32051.o: $(CPUSRC)/tms32051/tms32051.c \
ifneq ($(filter TMS57002,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tms57002
CPUOBJS += $(CPUOBJ)/tms57002/tms57002.o
DASMOBJS += $(CPUOBJ)/tms57002/57002dsm.o
TMSMAKE += $(BUILDOUT)/tmsmake$(BUILD_EXE)
endif
@ -1474,7 +1475,7 @@ endif
ifneq ($(filter TLCS90,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tlcs90
CPUOBJS += $(CPUOBJ)/tlcs90/tlcs90.o
#DBGOBJS += $(CPUOBJ)/tlcs90/tlcs90.o
#DASMOBJS += $(CPUOBJ)/tlcs90/tlcs90.o
endif
$(CPUOBJ)/tlcs90/tlcs90.o: $(CPUSRC)/tlcs90/tlcs90.c \
@ -1489,7 +1490,7 @@ $(CPUOBJ)/tlcs90/tlcs90.o: $(CPUSRC)/tlcs90/tlcs90.c \
ifneq ($(filter TLCS900,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/tlcs900
CPUOBJS += $(CPUOBJ)/tlcs900/tlcs900.o
DBGOBJS += $(CPUOBJ)/tlcs900/dasm900.o
DASMOBJS += $(CPUOBJ)/tlcs900/dasm900.o
endif
$(CPUOBJ)/tlcs900/tlcs900.o: $(CPUSRC)/tlcs900/tlcs900.c \
@ -1507,7 +1508,7 @@ $(CPUOBJ)/tlcs900/dasm900.o: $(CPUSRC)/tlcs900/dasm900.c
ifneq ($(filter Z80,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/z80
CPUOBJS += $(CPUOBJ)/z80/z80.o $(CPUOBJ)/z80/z80daisy.o
DBGOBJS += $(CPUOBJ)/z80/z80dasm.o
DASMOBJS += $(CPUOBJ)/z80/z80dasm.o
endif
$(CPUOBJ)/z80/z80.o: $(CPUSRC)/z80/z80.c \
@ -1522,7 +1523,7 @@ $(CPUOBJ)/z80/z80.o: $(CPUSRC)/z80/z80.c \
ifneq ($(filter LR35902,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/lr35902
CPUOBJS += $(CPUOBJ)/lr35902/lr35902.o
DBGOBJS += $(CPUOBJ)/lr35902/lr35902d.o
DASMOBJS += $(CPUOBJ)/lr35902/lr35902d.o
endif
$(CPUOBJ)/lr35902/lr35902.o: $(CPUSRC)/lr35902/lr35902.c \
@ -1539,7 +1540,7 @@ $(CPUOBJ)/lr35902/lr35902.o: $(CPUSRC)/lr35902/lr35902.c \
ifneq ($(filter Z180,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/z180 $(CPUOBJ)/z80
CPUOBJS += $(CPUOBJ)/z180/z180.o $(CPUOBJ)/z80/z80daisy.o
DBGOBJS += $(CPUOBJ)/z180/z180dasm.o
DASMOBJS += $(CPUOBJ)/z180/z180dasm.o
endif
$(CPUOBJ)/z180/z180.o: $(CPUSRC)/z180/z180.c \
@ -1562,7 +1563,7 @@ $(CPUOBJ)/z180/z180.o: $(CPUSRC)/z180/z180.c \
ifneq ($(filter Z8000,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/z8000
CPUOBJS += $(CPUOBJ)/z8000/z8000.o
DBGOBJS += $(CPUOBJ)/z8000/8000dasm.o
DASMOBJS += $(CPUOBJ)/z8000/8000dasm.o
endif
$(CPUOBJ)/z8000/z8000.o: $(CPUSRC)/z8000/z8000.c \

View File

@ -0,0 +1,305 @@
/***************************************************************************
cubedasm.c
Implementation of the Cube Quest AM2901-based CPUs
***************************************************************************/
#include "debugger.h"
#include "cubeqcpu.h"
#include "driver.h"
/***************************************************************************
CONSTANTS
***************************************************************************/
/* Am2901 Instruction Fields */
static const char *const ins[] =
{
"ADD ",
"SUBR ",
"SUBS ",
"OR ",
"AND ",
"NOTRS",
"EXOR ",
"EXNOR",
};
static const char *const src[] =
{
"A,Q",
"A,B",
"0,Q",
"0,B",
"0,A",
"D,A",
"D,Q",
"D,0",
};
static const char *const dst[] =
{
"QREG ",
"NOP ",
"RAMA ",
"RAMF ",
"RAMQD",
"RAMD ",
"RAMQU",
"RAMU ",
};
/***************************************************************************
SOUND DISASSEMBLY HOOK
***************************************************************************/
CPU_DISASSEMBLE( cquestsnd )
{
static const char *const jmps[] =
{
"JUMP ",
" ",
"JMSB ",
"JNMSB",
" ",
"JZERO",
"JOVR ",
"JLOOP",
};
static const char *const latches[] =
{
"PLTCH ",
"DAC ",
"ADLATCH",
" ",
};
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inslow = inst & 0xffffffff;
UINT32 inshig = inst >> 32;
int t = (inshig >> 24) & 0xff;
int b = (inshig >> 20) & 0xf;
int a = (inshig >> 16) & 0xf;
int ci = (inshig >> 15) & 1;
int i5_3 = (inshig >> 12) & 7;
int _ramen = (inshig >> 11) & 1;
int i2_0 = (inshig >> 8) & 7;
int rtnltch = (inshig >> 7) & 1;
int jmp = (inshig >> 4) & 7;
int inca = (inshig >> 3) & 1;
int i8_6 = (inshig >> 0) & 7;
int _ipram = (inslow >> 31) & 1;
int _ipwrt = (inslow >> 30) & 1;
int latch = (inslow >> 28) & 3;
int rtn = (inslow >> 27) & 1;
int _rin = (inslow >> 26) & 1;
sprintf(buffer, "%s %s %s %x,%x,%c %.2x %s %s %.2x %s %s %s %c %c %c",
ins[i5_3],
src[i2_0],
dst[i8_6],
a,
b,
ci ? 'C' : ' ',
_rin,
jmps[jmp],
rtn ? "RET" : " ",
t,
latches[latch],
rtnltch ? "RTLATCH" : " ",
_ramen ? "PROM" : "RAM ",
_ipram ? ' ' : 'R',
_ipwrt ? ' ' : 'W',
inca ? 'I' : ' ');
return 1 | DASMFLAG_SUPPORTED;
}
/***************************************************************************
ROTATE DISASSEMBLY HOOK
***************************************************************************/
CPU_DISASSEMBLE( cquestrot )
{
static const char *const jmps[] =
{
" ",
"JSEQ ",
"JC ",
"JSYNC ",
"JLDWAIT",
"JMSB ",
"JGEONE ",
"JZERO ",
"JUMP ",
"JNSEQ ",
"JNC ",
"JNSYNC ",
"JNLDWAI",
"JNMSB ",
"JLTONE ",
"JNZERO ",
};
static const char *const youts[] =
{
" ",
" ",
"Y2LDA",
"Y2LDD",
"Y2DAD",
"Y2DIN",
"Y2R ",
"Y2D ",
};
static const char *const spfs[] =
{
" ",
" ",
"OP ",
"RET ",
"SQLTCH",
"SWRT ",
"DIV ",
"MULT ",
"DRED ",
"DWRT ",
"??? ",
"??? ",
"??? ",
"??? ",
"??? ",
"??? "
};
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inslow = inst & 0xffffffff;
UINT32 inshig = inst >> 32;
int t = (inshig >> 20) & 0xfff;
int jmp = (inshig >> 16) & 0xf;
int spf = (inshig >> 12) & 0xf;
// int rsrc = (inshig >> 11) & 0x1;
int yout = (inshig >> 8) & 0x7;
int sel = (inshig >> 6) & 0x3;
// int dsrc = (inshig >> 4) & 0x3;
int b = (inshig >> 0) & 0xf;
int a = (inslow >> 28) & 0xf;
int i8_6 = (inslow >> 24) & 0x7;
int ci = (inslow >> 23) & 0x1;
int i5_3 = (inslow >> 20) & 0x7;
// int _sex = (inslow >> 19) & 0x1;
int i2_0 = (inslow >> 16) & 0x7;
sprintf(buffer, "%s %s,%s %x,%x,%c %d %s %s %s %.2x",
ins[i5_3],
src[i2_0],
dst[i8_6],
a,
b,
ci ? 'C' : ' ',
sel,
jmps[jmp],
youts[yout],
spfs[spf],
t);
return 1 | DASMFLAG_SUPPORTED;
}
/***************************************************************************
LINE DRAWER DISASSEMBLY HOOK
***************************************************************************/
CPU_DISASSEMBLE( cquestlin )
{
static const char *const jmps[] =
{
" ",
"JMSB ",
"JSEQ ",
"JGTZ ",
"JC ",
"JZ ",
"?????",
"?????",
"JUMP ",
"JNMSB",
"JNSEQ",
"JLEZ ",
"JNC ",
"JNZ ",
"?????",
"?????",
};
static const char *const latches[] =
{
" ",
"SEQLTCH",
"XLTCH ",
"YLTCH ",
"BGLTCH ",
"FGLTCH ",
"CLTCH ",
"ZLTCH ",
};
static const char *const spfs[] =
{
" ",
"FSTOP ",
"FREG ",
"FSTART",
"PWRT ",
"MULT ",
"LSTOP ",
"BRES ",
};
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inslow = inst & 0xffffffff;
UINT32 inshig = inst >> 32;
int t = (inshig >> 24) & 0xff;
int jmp = (inshig >> 20) & 0xf;
int latch = (inshig >> 16) & 0x7;
int op = (inshig >> 15) & 0x1;
int spf = (inshig >> 12) & 0x7;
int b = (inshig >> 8) & 0xf;
int a = (inshig >> 4) & 0xf;
int i8_6 = (inshig >> 0) & 0x7;
int ci = (inslow >> 31) & 0x1;
int i5_3 = (inslow >> 28) & 0x7;
int _pbcs = (inslow >> 27) & 0x1;
int i2_0 = (inslow >> 24) & 0x7;
sprintf(buffer, "%s %s,%s %x,%x %c %s %.2x %s %s %s %s",
ins[i5_3],
src[i2_0],
dst[i8_6],
a,
b,
ci ? 'C' : ' ',
jmps[jmp],
t,
latches[latch],
op ? "OP" : " ",
_pbcs ? " " : "PB",
spfs[spf]);
return 1 | DASMFLAG_SUPPORTED;
}

View File

@ -15,47 +15,16 @@
#include "driver.h"
CPU_DISASSEMBLE( cquestsnd );
CPU_DISASSEMBLE( cquestrot );
CPU_DISASSEMBLE( cquestlin );
/***************************************************************************
CONSTANTS
***************************************************************************/
/* Am2901 Instruction Fields */
static const char *const ins[] =
{
"ADD ",
"SUBR ",
"SUBS ",
"OR ",
"AND ",
"NOTRS",
"EXOR ",
"EXNOR",
};
static const char *const src[] =
{
"A,Q",
"A,B",
"0,Q",
"0,B",
"0,A",
"D,A",
"D,Q",
"D,0",
};
static const char *const dst[] =
{
"QREG ",
"NOP ",
"RAMA ",
"RAMF ",
"RAMQD",
"RAMD ",
"RAMQU",
"RAMU ",
};
enum alu_src
{
AQ = 0,
@ -736,77 +705,6 @@ static CPU_EXECUTE( cquestsnd )
}
/***************************************************************************
SOUND DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( cquestsnd )
{
static const char *const jmps[] =
{
"JUMP ",
" ",
"JMSB ",
"JNMSB",
" ",
"JZERO",
"JOVR ",
"JLOOP",
};
static const char *const latches[] =
{
"PLTCH ",
"DAC ",
"ADLATCH",
" ",
};
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inslow = inst & 0xffffffff;
UINT32 inshig = inst >> 32;
int t = (inshig >> 24) & 0xff;
int b = (inshig >> 20) & 0xf;
int a = (inshig >> 16) & 0xf;
int ci = (inshig >> 15) & 1;
int i5_3 = (inshig >> 12) & 7;
int _ramen = (inshig >> 11) & 1;
int i2_0 = (inshig >> 8) & 7;
int rtnltch = (inshig >> 7) & 1;
int jmp = (inshig >> 4) & 7;
int inca = (inshig >> 3) & 1;
int i8_6 = (inshig >> 0) & 7;
int _ipram = (inslow >> 31) & 1;
int _ipwrt = (inslow >> 30) & 1;
int latch = (inslow >> 28) & 3;
int rtn = (inslow >> 27) & 1;
int _rin = (inslow >> 26) & 1;
sprintf(buffer, "%s %s %s %x,%x,%c %.2x %s %s %.2x %s %s %s %c %c %c\n",
ins[i5_3],
src[i2_0],
dst[i8_6],
a,
b,
ci ? 'C' : ' ',
_rin,
jmps[jmp],
rtn ? "RET" : " ",
t,
latches[latch],
rtnltch ? "RTLATCH" : " ",
_ramen ? "PROM" : "RAM ",
_ipram ? ' ' : 'R',
_ipwrt ? ' ' : 'W',
inca ? 'I' : ' ');
return 1 | DASMFLAG_SUPPORTED;
}
/***************************************************************************
ROTATE CORE EXECUTION LOOP
***************************************************************************/
@ -1191,101 +1089,6 @@ static CPU_EXECUTE( cquestrot )
}
/***************************************************************************
ROTATE DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( cquestrot )
{
static const char *const jmps[] =
{
" ",
"JSEQ ",
"JC ",
"JSYNC ",
"JLDWAIT",
"JMSB ",
"JGEONE ",
"JZERO ",
"JUMP ",
"JNSEQ ",
"JNC ",
"JNSYNC ",
"JNLDWAI",
"JNMSB ",
"JLTONE ",
"JNZERO ",
};
static const char *const youts[] =
{
" ",
" ",
"Y2LDA",
"Y2LDD",
"Y2DAD",
"Y2DIN",
"Y2R ",
"Y2D ",
};
static const char *const spfs[] =
{
" ",
" ",
"OP ",
"RET ",
"SQLTCH",
"SWRT ",
"DIV ",
"MULT ",
"DRED ",
"DWRT ",
"??? ",
"??? ",
"??? ",
"??? ",
"??? ",
"??? "
};
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inslow = inst & 0xffffffff;
UINT32 inshig = inst >> 32;
int t = (inshig >> 20) & 0xfff;
int jmp = (inshig >> 16) & 0xf;
int spf = (inshig >> 12) & 0xf;
// int rsrc = (inshig >> 11) & 0x1;
int yout = (inshig >> 8) & 0x7;
int sel = (inshig >> 6) & 0x3;
// int dsrc = (inshig >> 4) & 0x3;
int b = (inshig >> 0) & 0xf;
int a = (inslow >> 28) & 0xf;
int i8_6 = (inslow >> 24) & 0x7;
int ci = (inslow >> 23) & 0x1;
int i5_3 = (inslow >> 20) & 0x7;
// int _sex = (inslow >> 19) & 0x1;
int i2_0 = (inslow >> 16) & 0x7;
sprintf(buffer, "%s %s,%s %x,%x,%c %d %s %s %s %.2x\n",
ins[i5_3],
src[i2_0],
dst[i8_6],
a,
b,
ci ? 'C' : ' ',
sel,
jmps[jmp],
youts[yout],
spfs[spf],
t);
return 1 | DASMFLAG_SUPPORTED;
}
/***************************************************************************
LINE DRAWER CORE EXECUTION LOOP
***************************************************************************/
@ -1755,91 +1558,6 @@ static CPU_EXECUTE( cquestlin )
}
/***************************************************************************
LINE DRAWER DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( cquestlin )
{
static const char *const jmps[] =
{
" ",
"JMSB ",
"JSEQ ",
"JGTZ ",
"JC ",
"JZ ",
"?????",
"?????",
"JUMP ",
"JNMSB",
"JNSEQ",
"JLEZ ",
"JNC ",
"JNZ ",
"?????",
"?????",
};
static const char *const latches[] =
{
" ",
"SEQLTCH",
"XLTCH ",
"YLTCH ",
"BGLTCH ",
"FGLTCH ",
"CLTCH ",
"ZLTCH ",
};
static const char *const spfs[] =
{
" ",
"FSTOP ",
"FREG ",
"FSTART",
"PWRT ",
"MULT ",
"LSTOP ",
"BRES ",
};
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inslow = inst & 0xffffffff;
UINT32 inshig = inst >> 32;
int t = (inshig >> 24) & 0xff;
int jmp = (inshig >> 20) & 0xf;
int latch = (inshig >> 16) & 0x7;
int op = (inshig >> 15) & 0x1;
int spf = (inshig >> 12) & 0x7;
int b = (inshig >> 8) & 0xf;
int a = (inshig >> 4) & 0xf;
int i8_6 = (inshig >> 0) & 0x7;
int ci = (inslow >> 31) & 0x1;
int i5_3 = (inslow >> 28) & 0x7;
int _pbcs = (inslow >> 27) & 0x1;
int i2_0 = (inslow >> 24) & 0x7;
sprintf(buffer, "%s %s,%s %x,%x %c %s %.2x %s %s %s %s\n",
ins[i5_3],
src[i2_0],
dst[i8_6],
a,
b,
ci ? 'C' : ' ',
jmps[jmp],
t,
latches[latch],
op ? "OP" : " ",
_pbcs ? " " : "PB",
spfs[spf]);
return 1 | DASMFLAG_SUPPORTED;
}
/**************************************************************************
* Sound set_info
**************************************************************************/

View File

@ -30,6 +30,7 @@
#include "debugger.h"
#include "dsp32.h"
CPU_DISASSEMBLE( dsp32c );
/***************************************************************************
@ -401,18 +402,6 @@ static CPU_EXECUTE( dsp32c )
/***************************************************************************
DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( dsp32c )
{
extern unsigned dasm_dsp32(char *, unsigned, UINT32);
return dasm_dsp32(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24));
}
/***************************************************************************
PARALLEL INTERFACE WRITES
***************************************************************************/

View File

@ -689,3 +689,13 @@ unsigned dasm_dsp32(char *buffer, unsigned pc, UINT32 op)
return 4 | flags | DASMFLAG_SUPPORTED;
}
/***************************************************************************
DISASSEMBLY HOOK
***************************************************************************/
CPU_DISASSEMBLE( dsp32c )
{
return dasm_dsp32(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24));
}

View File

@ -2133,3 +2133,8 @@ unsigned dasm_hyperstone(char *buffer, unsigned pc, const UINT8 *oprom, unsigned
return size | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( hyperstone_generic )
{
return dasm_hyperstone( buffer, pc, oprom, 0, 0 );
}

View File

@ -11,6 +11,8 @@
#include "deprecat.h"
#include "esrip.h"
CPU_DISASSEMBLE( esrip );
/***************************************************************************
CONSTANTS
@ -1864,87 +1866,6 @@ static CPU_EXECUTE( esrip )
}
/***************************************************************************
DISASSEMBLY HOOK (TODO: FINISH)
***************************************************************************/
static CPU_DISASSEMBLE( esrip )
{
#if 0
static const char* const jmp_types[] =
{
"JCT",
"JT1",
"JT2",
"JT3",
"JT4",
"JLBRM",
"J#HBLANK",
"JMP",
};
static const char* const njmp_types[] =
{
"JNCT",
"JNT1",
"JNT2",
"JNT3",
"JNT4",
"JNLBRM",
"J#HBLANK",
" ",
};
#endif
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inst_hi = inst >> 32;
UINT32 inst_lo = inst & 0xffffffff;
UINT16 ins = (inst_hi >> 16) & 0xffff;
UINT8 ctrl = (inst_hi >> 8) & 0xff;
UINT8 jmp_dest = (inst_lo >> 8) & 0xff;
UINT8 jmp_ctrl = (ctrl >> 3) & 0x1f;
UINT8 ctrl1 = (inst_lo >> 16) & 0xff;
UINT8 ctrl2 = (inst_lo >> 24) & 0xff;
UINT8 ctrl3 = (inst_hi) & 0xff;
sprintf(buffer, "%.4x %c%c%c%c %.2x %s%s%s%s%s%s%s%s %c%s%s%s %c%c%c%c%c%c%c%c\n",
ins,
ctrl & 1 ? 'D' : ' ',
ctrl & 2 ? ' ' : 'Y',
ctrl & 4 ? 'S' : ' ',
(~jmp_ctrl & 0x18) ? 'J' : ' ',
jmp_dest,
ctrl1 & 0x01 ? " " : "I ",
ctrl1 & 0x02 ? " " : "FL",
ctrl1 & 0x04 ? "FE" : " ",
ctrl1 & 0x08 ? " " : "FR",
ctrl1 & 0x10 ? " " : "IL",
ctrl1 & 0x20 ? "IE" : " ",
ctrl1 & 0x40 ? " " : "IR",
ctrl1 & 0x80 ? " " : "IW",
ctrl2 & 0x80 ? ' ' : 'O',
ctrl2 & 0x40 ? " " : "IXLLD",
ctrl2 & 0x20 ? " " : "IADLD",
ctrl2 & 0x10 ? " " : "SCALD",
ctrl3 & 0x01 ? ' ' : '0',
ctrl3 & 0x02 ? ' ' : '1',
ctrl3 & 0x04 ? ' ' : '2',
ctrl3 & 0x08 ? ' ' : '3',
ctrl3 & 0x10 ? ' ' : '4',
ctrl3 & 0x20 ? ' ' : '5',
ctrl3 & 0x40 ? ' ' : '6',
ctrl3 & 0x80 ? ' ' : '7'
);
return 1 | DASMFLAG_SUPPORTED;
}
/**************************************************************************
* set_info
**************************************************************************/

View File

@ -0,0 +1,92 @@
/***************************************************************************
esripdsm.c
Implementation of the Entertainment Sciences
AM29116-based Real Time Image Processor
***************************************************************************/
#include "debugger.h"
/***************************************************************************
DISASSEMBLY HOOK (TODO: FINISH)
***************************************************************************/
CPU_DISASSEMBLE( esrip )
{
#if 0
static const char* const jmp_types[] =
{
"JCT",
"JT1",
"JT2",
"JT3",
"JT4",
"JLBRM",
"J#HBLANK",
"JMP",
};
static const char* const njmp_types[] =
{
"JNCT",
"JNT1",
"JNT2",
"JNT3",
"JNT4",
"JNLBRM",
"J#HBLANK",
" ",
};
#endif
UINT64 inst = BIG_ENDIANIZE_INT64(*(UINT64 *)oprom);
UINT32 inst_hi = inst >> 32;
UINT32 inst_lo = inst & 0xffffffff;
UINT16 ins = (inst_hi >> 16) & 0xffff;
UINT8 ctrl = (inst_hi >> 8) & 0xff;
UINT8 jmp_dest = (inst_lo >> 8) & 0xff;
UINT8 jmp_ctrl = (ctrl >> 3) & 0x1f;
UINT8 ctrl1 = (inst_lo >> 16) & 0xff;
UINT8 ctrl2 = (inst_lo >> 24) & 0xff;
UINT8 ctrl3 = (inst_hi) & 0xff;
sprintf(buffer, "%.4x %c%c%c%c %.2x %s%s%s%s%s%s%s%s %c%s%s%s %c%c%c%c%c%c%c%c",
ins,
ctrl & 1 ? 'D' : ' ',
ctrl & 2 ? ' ' : 'Y',
ctrl & 4 ? 'S' : ' ',
(~jmp_ctrl & 0x18) ? 'J' : ' ',
jmp_dest,
ctrl1 & 0x01 ? " " : "I ",
ctrl1 & 0x02 ? " " : "FL",
ctrl1 & 0x04 ? "FE" : " ",
ctrl1 & 0x08 ? " " : "FR",
ctrl1 & 0x10 ? " " : "IL",
ctrl1 & 0x20 ? "IE" : " ",
ctrl1 & 0x40 ? " " : "IR",
ctrl1 & 0x80 ? " " : "IW",
ctrl2 & 0x80 ? ' ' : 'O',
ctrl2 & 0x40 ? " " : "IXLLD",
ctrl2 & 0x20 ? " " : "IADLD",
ctrl2 & 0x10 ? " " : "SCALD",
ctrl3 & 0x01 ? ' ' : '0',
ctrl3 & 0x02 ? ' ' : '1',
ctrl3 & 0x04 ? ' ' : '2',
ctrl3 & 0x08 ? ' ' : '3',
ctrl3 & 0x10 ? ' ' : '4',
ctrl3 & 0x20 ? ' ' : '5',
ctrl3 & 0x40 ? ' ' : '6',
ctrl3 & 0x80 ? ' ' : '7'
);
return 1 | DASMFLAG_SUPPORTED;
}

View File

@ -345,3 +345,8 @@ unsigned g65816_disassemble(char* buff, unsigned int pc, unsigned int pb, const
return length | DASMFLAG_SUPPORTED | dasm_flags;
}
CPU_DISASSEMBLE( g65816_generic )
{
return g65816_disassemble(buffer, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, 0, 0);
}

View File

@ -17,6 +17,9 @@
#include "h8.h"
#include "h8priv.h"
CPU_DISASSEMBLE(h8_24);
CPU_DISASSEMBLE(h8_32);
#define H8_SP (7)
#define h8_mem_read8(x) memory_read_byte(h8->program, x)
@ -53,18 +56,6 @@ static void h8_check_irqs(h83xx_state *h8);
extern offs_t h8_disasm(char *output, offs_t address, const UINT8 *oprom, const UINT8 *opram, UINT32 addr_mask);
// disassembly hook for varients with 24-bit address bus (e.g. H8/3044)
static CPU_DISASSEMBLE(h8_24)
{
return h8_disasm(buffer, pc, oprom, opram, 0xffffff);
}
// disassembly hook for full 32-bit address bus
static CPU_DISASSEMBLE(h8_32)
{
return h8_disasm(buffer, pc, oprom, opram, 0xffffffff);
}
void h8_3002_InterruptRequest(h83xx_state *h8, UINT8 source, UINT8 state)
{
// don't allow clear on external interrupts

View File

@ -13,6 +13,8 @@
#include "h8.h"
#include "h8priv.h"
CPU_DISASSEMBLE(h8);
#define H8_SP (7)
#define h8_mem_read8(x) memory_read_byte(h8->program, x)
@ -71,13 +73,6 @@ static void h8_check_irqs(h83xx_state *h8);
/* implementation */
extern offs_t h8_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 addrmask);
static CPU_DISASSEMBLE(h8)
{
return h8_disasm(buffer, pc, oprom, opram, 0xffff);
}
static void h8_300_InterruptRequest(h83xx_state *h8, UINT8 source, UINT8 mode)
{
if (source>31)

View File

@ -1274,4 +1274,20 @@ static UINT32 h8disasm_7(UINT32 address, UINT32 opcode, char *buffer, const UINT
return size;
}
CPU_DISASSEMBLE(h8)
{
return h8_disasm(buffer, pc, oprom, opram, 0xffff);
}
// disassembly hook for varients with 24-bit address bus (e.g. H8/3044)
CPU_DISASSEMBLE(h8_24)
{
return h8_disasm(buffer, pc, oprom, opram, 0xffffff);
}
// disassembly hook for full 32-bit address bus
CPU_DISASSEMBLE(h8_32)
{
return h8_disasm(buffer, pc, oprom, opram, 0xffffffff);
}

View File

@ -2055,7 +2055,7 @@ static void decode_opcode(char *s, const I386_OPCODE *op, UINT8 op1)
case GROUP:
handle_modrm( modrm_string );
for( i=0; i < ARRAY_LENGTH(group_op_table); i++ ) {
if( mame_stricmp(op->mnemonic, group_op_table[i].mnemonic) == 0 ) {
if( strcmp(op->mnemonic, group_op_table[i].mnemonic) == 0 ) {
decode_opcode( s, &group_op_table[i].opcode[MODRM_REG1], op1 );
return;
}
@ -2137,3 +2137,18 @@ int i386_dasm_one(char *buffer, offs_t eip, const UINT8 *oprom, int mode)
{
return i386_dasm_one_ex(buffer, eip, oprom, mode);
}
CPU_DISASSEMBLE( x86_16 )
{
return i386_dasm_one_ex(buffer, pc, oprom, 16);
}
CPU_DISASSEMBLE( x86_32 )
{
return i386_dasm_one_ex(buffer, pc, oprom, 32);
}
CPU_DISASSEMBLE( x86_64 )
{
return i386_dasm_one_ex(buffer, pc, oprom, 64);
}

View File

@ -3,6 +3,8 @@
#include "i960dis.h"
#include <math.h>
CPU_DISASSEMBLE( i960 );
#ifdef _MSC_VER
/* logb prototype is different for MS Visual C */
#include <float.h>
@ -2084,19 +2086,6 @@ static CPU_INIT( i960 )
state_save_register_device_item_array(device, 0, i960->rcache_frame_addr);
}
static CPU_DISASSEMBLE( i960 )
{
disassemble_t dis;
dis.IP = pc;
dis.buffer = buffer;
dis.oprom = oprom;
i960_disassemble(&dis);
return dis.IPinc | dis.disflags | DASMFLAG_SUPPORTED;
}
static CPU_RESET( i960 )
{
i960_state_t *i960 = get_safe_token(device);

View File

@ -289,3 +289,16 @@ char *i960_disassemble(disassemble_t *diss)
CPU_DISASSEMBLE( i960 )
{
disassemble_t dis;
dis.IP = pc;
dis.buffer = buffer;
dis.oprom = oprom;
i960_disassemble(&dis);
return dis.IPinc | dis.disflags | DASMFLAG_SUPPORTED;
}

View File

@ -180,3 +180,17 @@ unsigned dasmjag(int variant, char *buffer, unsigned pc, const UINT8 *oprom)
}
return size | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( jaguargpu )
{
return dasmjag(JAGUAR_VARIANT_GPU, buffer, pc, oprom);
}
CPU_DISASSEMBLE( jaguardsp )
{
return dasmjag(JAGUAR_VARIANT_DSP, buffer, pc, oprom);
}

View File

@ -10,6 +10,9 @@
#include "cpuexec.h"
#include "jaguar.h"
CPU_DISASSEMBLE( jaguargpu );
CPU_DISASSEMBLE( jaguardsp );
#define LOG_GPU_IO 0
#define LOG_DSP_IO 0
@ -556,24 +559,6 @@ static CPU_EXECUTE( jaguardsp )
/***************************************************************************
DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( jaguargpu )
{
extern unsigned dasmjag(int, char *, unsigned, const UINT8 *);
return dasmjag(JAGUAR_VARIANT_GPU, buffer, pc, oprom);
}
static CPU_DISASSEMBLE( jaguardsp )
{
extern unsigned dasmjag(int, char *, unsigned, const UINT8 *);
return dasmjag(JAGUAR_VARIANT_DSP, buffer, pc, oprom);
}
/***************************************************************************
OPCODES
***************************************************************************/

View File

@ -608,3 +608,9 @@ int m7700_disassemble(char* buff, unsigned int pc, unsigned int pb, const UINT8
return length | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( m37710_generic )
{
return m7700_disassemble(buffer, (pc&0xffff), pc>>16, oprom, 0, 0);
}

View File

@ -3715,6 +3715,37 @@ unsigned int m68k_is_valid_instruction(unsigned int instruction, unsigned int cp
}
#endif
CPU_DISASSEMBLE( m68000 )
{
return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68000);
}
CPU_DISASSEMBLE( m68008 )
{
return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68008);
}
CPU_DISASSEMBLE( m68010 )
{
return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68010);
}
CPU_DISASSEMBLE( m68020 )
{
return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68020);
}
CPU_DISASSEMBLE( m68030 )
{
return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68030);
}
CPU_DISASSEMBLE( m68040 )
{
return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68040);
}
/* ======================================================================== */
/* ============================== END OF FILE ============================= */

View File

@ -16,6 +16,8 @@
#include "mb86233.h"
#include "debugger.h"
CPU_DISASSEMBLE( mb86233 );
/***************************************************************************
STRUCTURES & TYPEDEFS
***************************************************************************/
@ -1557,20 +1559,6 @@ static CPU_EXECUTE( mb86233 )
return cycles - cpustate->icount;
}
/***************************************************************************
DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( mb86233 )
{
extern UINT32 dasm_mb86233(char *, UINT32);
UINT32 op = *(UINT32 *)oprom;
op = LITTLE_ENDIANIZE_INT32(op);
return dasm_mb86233(buffer, op);
}
/***************************************************************************
Information Setters
***************************************************************************/

View File

@ -772,3 +772,10 @@ unsigned dasm_mb86233(char *buffer, UINT32 opcode )
return (1 | DASMFLAG_SUPPORTED);
}
CPU_DISASSEMBLE( mb86233 )
{
UINT32 op = *(UINT32 *)oprom;
op = LITTLE_ENDIANIZE_INT32(op);
return dasm_mb86233(buffer, op);
}

View File

@ -509,3 +509,21 @@ unsigned dasmmips3(char *buffer, unsigned pc, UINT32 op)
}
return 4 | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( mips3be )
{
UINT32 op = *(UINT32 *)oprom;
op = BIG_ENDIANIZE_INT32(op);
return dasmmips3(buffer, pc, op);
}
CPU_DISASSEMBLE( mips3le )
{
UINT32 op = *(UINT32 *)oprom;
op = LITTLE_ENDIANIZE_INT32(op);
return dasmmips3(buffer, pc, op);
}

View File

@ -739,3 +739,10 @@ unsigned DasmPSXCPU( DasmPSXCPU_state *state, char *buffer, UINT32 pc, const UIN
}
return ( opram - oldopram ) | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( psxcpu_generic )
{
DasmPSXCPU_state state = {0};
state.pc = pc;
return DasmPSXCPU( &state, buffer, pc, opram );
}

View File

@ -9,6 +9,8 @@
#include "debugger.h"
#include "r3000.h"
CPU_DISASSEMBLE( r3000be );
CPU_DISASSEMBLE( r3000le );
#define ENABLE_OVERFLOWS 0
@ -888,24 +890,6 @@ static CPU_EXECUTE( r3000 )
DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( r3000be )
{
extern unsigned dasmr3k(char *, unsigned, UINT32);
UINT32 op = *(UINT32 *)oprom;
op = BIG_ENDIANIZE_INT32(op);
return dasmr3k(buffer, pc, op);
}
static CPU_DISASSEMBLE( r3000le )
{
extern unsigned dasmr3k(char *, unsigned, UINT32);
UINT32 op = *(UINT32 *)oprom;
op = LITTLE_ENDIANIZE_INT32(op);
return dasmr3k(buffer, pc, op);
}
/***************************************************************************
CACHE I/O

View File

@ -369,3 +369,19 @@ unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op)
}
return 4 | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( r3000be )
{
UINT32 op = *(UINT32 *)oprom;
op = BIG_ENDIANIZE_INT32(op);
return dasmr3k(buffer, pc, op);
}
CPU_DISASSEMBLE( r3000le )
{
UINT32 op = *(UINT32 *)oprom;
op = LITTLE_ENDIANIZE_INT32(op);
return dasmr3k(buffer, pc, op);
}

View File

@ -1485,7 +1485,7 @@ static void decode_opcode(char *s, const I386_OPCODE *op, UINT8 op1 )
case GROUP:
handle_modrm( modrm_string );
for( i=0; i < ARRAY_LENGTH(group_op_table); i++ ) {
if( mame_stricmp(op->mnemonic, group_op_table[i].mnemonic) == 0 )
if( strcmp(op->mnemonic, group_op_table[i].mnemonic) == 0 )
{
decode_opcode( s, &group_op_table[i].opcode[MODRM_REG1], op1 );
return;
@ -1543,3 +1543,9 @@ int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config
decode_opcode( buffer, &necv_opcode_table1[op], op );
return (pc-eip) | dasm_flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( nec_generic )
{
return necv_dasm_one(buffer, pc, oprom, NULL);
}

View File

@ -1166,3 +1166,10 @@ offs_t ppc_dasm_one(char *buffer, UINT32 pc, UINT32 op)
sprintf(buffer, "?");
return 4 | flags;
}
CPU_DISASSEMBLE( powerpc )
{
UINT32 op = *(UINT32 *)oprom;
op = BIG_ENDIANIZE_INT32(op);
return ppc_dasm_one(buffer, pc, op);
}

View File

@ -8,6 +8,8 @@
#include "debugger.h"
#include "rsp.h"
CPU_DISASSEMBLE( rsp );
#define LOG_INSTRUCTION_EXECUTION 0
#define SAVE_DISASM 0
#define SAVE_DMEM 0
@ -2865,14 +2867,6 @@ static CPU_EXECUTE( rsp )
/*****************************************************************************/
static CPU_DISASSEMBLE( rsp )
{
UINT32 op = LITTLE_ENDIANIZE_INT32(*(UINT32 *)opram);
return rsp_dasm_one(buffer, pc, op);
}
/*****************************************************************************/
static CPU_SET_INFO( rsp )

View File

@ -343,3 +343,11 @@ offs_t rsp_dasm_one(char *buffer, offs_t pc, UINT32 op)
return 4 | flags | DASMFLAG_SUPPORTED;
}
/*****************************************************************************/
CPU_DISASSEMBLE( rsp )
{
UINT32 op = LITTLE_ENDIANIZE_INT32(*(UINT32 *)opram);
return rsp_dasm_one(buffer, pc, op);
}

View File

@ -103,6 +103,8 @@
#include "sh2.h"
#include "sh2comn.h"
CPU_DISASSEMBLE( sh2 );
#ifndef USE_SH2DRC
/* speed up delay loops, bail out of tight loops */
@ -2239,11 +2241,6 @@ static CPU_EXECUTE( sh2 )
return cycles - sh2_icount;
}
static CPU_DISASSEMBLE( sh2 )
{
return DasmSH2( buffer, pc, (oprom[0] << 8) | oprom[1] );
}
static CPU_INIT( sh2 )
{
/* allocate the core memory */

View File

@ -600,3 +600,9 @@ unsigned DasmSH2(char *buffer, unsigned pc, UINT16 opcode)
}
return 2 | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( sh2 )
{
return DasmSH2( buffer, pc, (oprom[0] << 8) | oprom[1] );
}

View File

@ -20,6 +20,8 @@
#include "sh2comn.h"
#include "eminline.h"
CPU_DISASSEMBLE( sh2 );
#ifdef USE_SH2DRC
/***************************************************************************
@ -3171,15 +3173,6 @@ void sh2drc_add_pcflush(const device_config *device, offs_t address)
}
/*-------------------------------------------------
sh2_dasm - disassemble an instruction
-------------------------------------------------*/
static CPU_DISASSEMBLE( sh2 )
{
return DasmSH2( buffer, pc, (oprom[0] << 8) | oprom[1] );
}
/*-------------------------------------------------
sh2_internal_a5 - read handler for
SH2 internal map

View File

@ -27,6 +27,8 @@
#include "sh4regs.h"
#include "sh4comn.h"
CPU_DISASSEMBLE( sh4 );
INLINE SH4 *get_safe_token(const device_config *device)
{
assert(device != NULL);
@ -3419,11 +3421,6 @@ static CPU_EXECUTE( sh4 )
return cycles - sh4->sh4_icount;
}
static CPU_DISASSEMBLE( sh4 )
{
return DasmSH4( buffer, pc, (oprom[1] << 8) | oprom[0] );
}
static CPU_INIT( sh4 )
{
const struct sh4_config *conf = (const struct sh4_config *)device->static_config;

View File

@ -809,3 +809,9 @@ unsigned DasmSH4(char *buffer, unsigned pc, UINT16 opcode)
}
return 2 | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( sh4 )
{
return DasmSH4( buffer, pc, (oprom[1] << 8) | oprom[0] );
}

View File

@ -6,6 +6,8 @@
#include "sharc.h"
#include "debugger.h"
CPU_DISASSEMBLE( sharc );
enum
{
SHARC_PC=1, SHARC_PCSTK, SHARC_MODE1, SHARC_MODE2,
@ -170,8 +172,6 @@ struct _SHARC_REGS
};
static CPU_DISASSEMBLE( sharc );
static void sharc_dma_exec(SHARC_REGS *cpustate, int channel);
static void check_interrupts(SHARC_REGS *cpustate);
@ -416,20 +416,6 @@ void sharc_external_dma_write(const device_config *device, UINT32 address, UINT6
}
}
static CPU_DISASSEMBLE( sharc )
{
UINT64 op = 0;
UINT32 flags = 0;
op = ((UINT64)oprom[0] << 0) | ((UINT64)oprom[1] << 8) |
((UINT64)oprom[2] << 16) | ((UINT64)oprom[3] << 24) |
((UINT64)oprom[4] << 32) | ((UINT64)oprom[5] << 40);
flags = sharc_dasm_one(buffer, pc, op);
return 1 | flags | DASMFLAG_SUPPORTED;
}
static CPU_INIT( sharc )
{
SHARC_REGS *cpustate = get_safe_token(device);

View File

@ -1181,3 +1181,18 @@ UINT32 sharc_dasm_one(char *buffer, offs_t pc, UINT64 opcode)
return flags;
}
CPU_DISASSEMBLE( sharc )
{
UINT64 op = 0;
UINT32 flags = 0;
op = ((UINT64)oprom[0] << 0) | ((UINT64)oprom[1] << 8) |
((UINT64)oprom[2] << 16) | ((UINT64)oprom[3] << 24) |
((UINT64)oprom[4] << 32) | ((UINT64)oprom[5] << 40);
flags = sharc_dasm_one(buffer, pc, op);
return 1 | flags | DASMFLAG_SUPPORTED;
}

View File

@ -8,6 +8,9 @@
#include "debugger.h"
#include "ssem.h"
CPU_DISASSEMBLE( ssem );
#define SSEM_DISASM_ON_UNIMPL 0
#define SSEM_DUMP_MEM_ON_UNIMPL 0
@ -234,16 +237,6 @@ static CPU_EXECUTE( ssem )
return cycles - cpustate->icount;
}
/*****************************************************************************/
static CPU_DISASSEMBLE( ssem )
{
UINT32 op = (*(UINT8 *)(opram + 0) << 24) |
(*(UINT8 *)(opram + 1) << 16) |
(*(UINT8 *)(opram + 2) << 8) |
(*(UINT8 *)(opram + 3) << 0);
return ssem_dasm_one(buffer, pc, op);
}
/*****************************************************************************/

View File

@ -73,3 +73,14 @@ offs_t ssem_dasm_one(char *buffer, offs_t pc, UINT32 op)
return 4 | DASMFLAG_SUPPORTED;
}
/*****************************************************************************/
CPU_DISASSEMBLE( ssem )
{
UINT32 op = (*(UINT8 *)(opram + 0) << 24) |
(*(UINT8 *)(opram + 1) << 16) |
(*(UINT8 *)(opram + 2) << 8) |
(*(UINT8 *)(opram + 3) << 0);
return ssem_dasm_one(buffer, pc, op);
}

View File

@ -20,6 +20,7 @@
#include "debugger.h"
#include "ssp1601.h"
CPU_DISASSEMBLE( ssp1601 );
/* detect ops with unimplemented/invalid fields.
* Useful for homebrew or if a new VR revision pops up. */
@ -764,14 +765,6 @@ static CPU_EXECUTE( ssp1601 )
* MAME interface
**************************************************************************/
static CPU_DISASSEMBLE( ssp1601 )
{
//ssp1601_state_t *ssp1601_state = get_safe_token(device);
return dasm_ssp1601(buffer, pc, oprom);
}
static CPU_SET_INFO( ssp1601 )
{
ssp1601_state_t *ssp1601_state = get_safe_token(device);

View File

@ -288,3 +288,12 @@ unsigned dasm_ssp1601(char *buffer, unsigned pc, const UINT8 *oprom)
}
// vim:ts=4
CPU_DISASSEMBLE( ssp1601 )
{
//ssp1601_state_t *ssp1601_state = get_safe_token(device);
return dasm_ssp1601(buffer, pc, oprom);
}

View File

@ -731,3 +731,10 @@ unsigned dasm_tms32031(char *buffer, unsigned pc, UINT32 op)
return 1 | flags | DASMFLAG_SUPPORTED;
}
CPU_DISASSEMBLE( tms32031 )
{
UINT32 op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
return dasm_tms32031(buffer, pc, op);
}

View File

@ -10,6 +10,7 @@
#include "tms32031.h"
#include "eminline.h"
CPU_DISASSEMBLE( tms32031 );
#define LOG_OPCODE_USAGE (0)
@ -535,19 +536,6 @@ static CPU_EXECUTE( tms32031 )
/***************************************************************************
DISASSEMBLY HOOK
***************************************************************************/
static CPU_DISASSEMBLE( tms32031 )
{
UINT32 op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24);
extern unsigned dasm_tms32031(char *, unsigned, UINT32);
return dasm_tms32031(buffer, pc, op);
}
/***************************************************************************
BOOT LOADER
***************************************************************************/

View File

@ -0,0 +1,90 @@
#include "tms57002.h"
#include "debugger.h"
#ifdef __GNUC__
#define noinline __attribute__((noinline))
#else
#define noinline /* */
#endif
static const char *tms57002_get_memadr(UINT32 opcode, char type)
{
static char buff[2][10];
static int index = 0;
char *buf;
index = 1-index;
buf = buff[index];
if(((opcode & 0x400) && (type == 'c')) || (!(opcode & 0x400) && (type == 'd'))) {
if(opcode & 0x100)
sprintf(buf, "%c(%02x)", type, opcode & 0xff);
else if(opcode & 0x80)
sprintf(buf, "%c*+", type);
else
sprintf(buf, "%c*", type);
} else if(opcode & 0x200)
sprintf(buf, "%c*+", type);
else
sprintf(buf, "%c*", type);
return buf;
}
CPU_DISASSEMBLE(tms57002)
{
UINT32 opcode = opram[0] | (opram[1] << 8) | (opram[2] << 16);
UINT8 fa = opcode >> 18;
char *buf = buffer;
if(fa == 0x3f) {
switch((opcode >> 11) & 0x7f) { // category 3
#define DASM3
#include "cpu/tms57002/tms57002.inc"
#undef DASM3
default:
sprintf(buf, "unk c3 %02x", (opcode >> 11) & 0x7f);
break;
}
} else {
switch(fa) { // category 1
case 0x00:
buf[0] = 0;
break;
#define DASM1
#include "cpu/tms57002/tms57002.inc"
#undef DASM1
default:
sprintf(buf, "unk c1 %02x", fa);
break;
}
buf += strlen(buf);
if(buf != buffer) {
strcpy(buf, " ; ");
buf += 3;
}
switch((opcode >> 11) & 0x7f) { // category 2
case 0x00:
if(buf != buffer)
buf[-3] = 0;
else
sprintf(buf, "nop");
break;
#define DASM2
#include "cpu/tms57002/tms57002.inc"
#undef DASM2
default:
sprintf(buf, "unk c2 %02x", (opcode >> 11) & 0x7f);
break;
}
}
return 1;
}

View File

@ -1,6 +1,8 @@
#include "tms57002.h"
#include "debugger.h"
CPU_DISASSEMBLE(tms57002);
#ifdef __GNUC__
#define noinline __attribute__((noinline))
#else
@ -117,87 +119,6 @@ INLINE tms57002_t *get_safe_token(const device_config *device)
static void tms57002_cache_flush(tms57002_t *s);
static const char *tms57002_get_memadr(UINT32 opcode, char type)
{
static char buff[2][10];
static int index = 0;
char *buf;
index = 1-index;
buf = buff[index];
if(((opcode & 0x400) && (type == 'c')) || (!(opcode & 0x400) && (type == 'd'))) {
if(opcode & 0x100)
sprintf(buf, "%c(%02x)", type, opcode & 0xff);
else if(opcode & 0x80)
sprintf(buf, "%c*+", type);
else
sprintf(buf, "%c*", type);
} else if(opcode & 0x200)
sprintf(buf, "%c*+", type);
else
sprintf(buf, "%c*", type);
return buf;
}
static CPU_DISASSEMBLE(tms57002)
{
UINT32 opcode = opram[0] | (opram[1] << 8) | (opram[2] << 16);
UINT8 fa = opcode >> 18;
char *buf = buffer;
if(fa == 0x3f) {
switch((opcode >> 11) & 0x7f) { // category 3
#define DASM3
#include "cpu/tms57002/tms57002.inc"
#undef DASM3
default:
sprintf(buf, "unk c3 %02x", (opcode >> 11) & 0x7f);
break;
}
} else {
switch(fa) { // category 1
case 0x00:
buf[0] = 0;
break;
#define DASM1
#include "cpu/tms57002/tms57002.inc"
#undef DASM1
default:
sprintf(buf, "unk c1 %02x", fa);
break;
}
buf += strlen(buf);
if(buf != buffer) {
strcpy(buf, " ; ");
buf += 3;
}
switch((opcode >> 11) & 0x7f) { // category 2
case 0x00:
if(buf != buffer)
buf[-3] = 0;
else
sprintf(buf, "nop");
break;
#define DASM2
#include "cpu/tms57002/tms57002.inc"
#undef DASM2
default:
sprintf(buf, "unk c2 %02x", (opcode >> 11) & 0x7f);
break;
}
}
return 1;
}
WRITE8_DEVICE_HANDLER(tms57002_pload_w)
{
tms57002_t *s = get_safe_token(device);

View File

@ -199,27 +199,6 @@ INLINE v60_state *get_safe_token(const device_config *device)
#define ADTMR1 reg[64]
//29-31 reserved
// Register names
const char *const v60_reg_names[69] = {
"R0", "R1", "R2", "R3",
"R4", "R5", "R6", "R7",
"R8", "R9", "R10", "R11",
"R12", "R13", "R14", "R15",
"R16", "R17", "R18", "R19",
"R20", "R21", "R22", "R23",
"R24", "R25", "R26", "R27",
"R28", "AP", "FP", "SP",
"PC", "PSW","Unk","Unk",
"ISP", "L0SP", "L1SP", "L2SP",
"L3SP", "SBR","TR","SYCW",
"TKCW", "PIR", "Reserved","Reserved",
"Reserved","Reserved","Reserved","PSW2",
"ATBR0", "ATLR0", "ATBR1", "ATLR1",
"ATBR2", "ATLR2", "ATBR3", "ATLR3",
"TRMODE", "ADTR0", "ADTR1","ADTMR0",
"ADTMR1","Reserved","Reserved","Reserved"
};
// Defines...
#define NORMALIZEFLAGS(cs) \
{ \

View File

@ -2,6 +2,27 @@
#include "debugger.h"
#include "v60.h"
// Register names
const char *const v60_reg_names[69] = {
"R0", "R1", "R2", "R3",
"R4", "R5", "R6", "R7",
"R8", "R9", "R10", "R11",
"R12", "R13", "R14", "R15",
"R16", "R17", "R18", "R19",
"R20", "R21", "R22", "R23",
"R24", "R25", "R26", "R27",
"R28", "AP", "FP", "SP",
"PC", "PSW","Unk","Unk",
"ISP", "L0SP", "L1SP", "L2SP",
"L3SP", "SBR","TR","SYCW",
"TKCW", "PIR", "Reserved","Reserved",
"Reserved","Reserved","Reserved","PSW2",
"ATBR0", "ATLR0", "ATBR1", "ATLR1",
"ATBR2", "ATLR2", "ATBR3", "ATLR3",
"TRMODE", "ADTR0", "ADTR1","ADTMR0",
"ADTMR1","Reserved","Reserved","Reserved"
};
static const UINT8 *rombase;
static offs_t pcbase;

View File

@ -86,6 +86,10 @@ CPU_DISASSEMBLE( z8000 )
Z8000_exec *o;
UINT32 flags = 0;
/* already initialized? */
if(z8000_exec == NULL)
z8000_init_tables();
GET_OP(oprom, 0, new_pc - pc);
new_pc += 2;
switch (pc)

View File

@ -202,7 +202,9 @@ $(LIBEMU): $(EMUOBJS) $(EMUSOUNDOBJS) $(EMUAUDIOOBJS) $(EMUDRIVEROBJS) $(EMUMACH
include $(EMUSRC)/cpu/cpu.mak
$(LIBCPU): $(CPUOBJS) $(DBGOBJS)
$(LIBCPU): $(CPUOBJS)
$(LIBDASM): $(DASMOBJS)

View File

@ -26,6 +26,7 @@ TOOLS += \
romcmp$(EXE) \
chdman$(EXE) \
jedutil$(EXE) \
unidasm$(EXE) \
ldresample$(EXE) \
ldverify$(EXE) \
regrep$(EXE) \
@ -75,6 +76,19 @@ jedutil$(EXE): $(JEDUTILOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
#-------------------------------------------------
# unidasm
#-------------------------------------------------
UNIDASMOBJS = \
$(TOOLSOBJ)/unidasm.o \
unidasm$(EXE): $(UNIDASMOBJS) $(LIBUTIL) $(LIBOCORE) $(LIBDASM) $(ZLIB) $(EXPAT)
@echo Linking $@...
$(LD) $(LDFLAGS) $^ $(LIBS) -o $@
#-------------------------------------------------
# ldresample
#-------------------------------------------------

319
src/tools/unidasm.c Normal file
View File

@ -0,0 +1,319 @@
/***************************************************************************
mamedasm.c
Generic MAME disassembler.
Copyright Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
***************************************************************************/
#include "cpuintrf.h"
CPU_DISASSEMBLE( adsp21xx );
CPU_DISASSEMBLE( alpha8201 );
CPU_DISASSEMBLE( arm );
CPU_DISASSEMBLE( arm7arm );
CPU_DISASSEMBLE( arm7thumb );
CPU_DISASSEMBLE( asap );
CPU_DISASSEMBLE( avr8 );
CPU_DISASSEMBLE( ccpu );
CPU_DISASSEMBLE( cdp1802 );
CPU_DISASSEMBLE( cop410 );
CPU_DISASSEMBLE( cop420 );
CPU_DISASSEMBLE( cop444 );
CPU_DISASSEMBLE( cp1610 );
CPU_DISASSEMBLE( cquestsnd );
CPU_DISASSEMBLE( cquestrot );
CPU_DISASSEMBLE( cquestlin );
CPU_DISASSEMBLE( dsp32c );
CPU_DISASSEMBLE( dsp56k );
CPU_DISASSEMBLE( hyperstone_generic );
CPU_DISASSEMBLE( esrip );
CPU_DISASSEMBLE( f8 );
CPU_DISASSEMBLE( g65816_generic );
CPU_DISASSEMBLE( h6280 );
CPU_DISASSEMBLE( h8 );
CPU_DISASSEMBLE( hd6309 );
CPU_DISASSEMBLE( i4004 );
CPU_DISASSEMBLE( i8085 );
CPU_DISASSEMBLE( x86_16 );
CPU_DISASSEMBLE( x86_32 );
CPU_DISASSEMBLE( x86_64 );
CPU_DISASSEMBLE( i860 );
CPU_DISASSEMBLE( i960 );
CPU_DISASSEMBLE( jaguargpu );
CPU_DISASSEMBLE( jaguardsp );
CPU_DISASSEMBLE( konami );
CPU_DISASSEMBLE( lh5801 );
CPU_DISASSEMBLE( lr35902 );
CPU_DISASSEMBLE( m37710_generic );
CPU_DISASSEMBLE( m6502 );
CPU_DISASSEMBLE( m65sc02 );
CPU_DISASSEMBLE( m65c02 );
CPU_DISASSEMBLE( m65ce02 );
CPU_DISASSEMBLE( m6510 );
CPU_DISASSEMBLE( deco16 );
CPU_DISASSEMBLE( m4510 );
CPU_DISASSEMBLE( m6800 );
CPU_DISASSEMBLE( m6801 );
CPU_DISASSEMBLE( m6802 );
CPU_DISASSEMBLE( m6803 );
CPU_DISASSEMBLE( hd63701 );
CPU_DISASSEMBLE( nsc8105 );
CPU_DISASSEMBLE( m68000 );
CPU_DISASSEMBLE( m68008 );
CPU_DISASSEMBLE( m68010 );
CPU_DISASSEMBLE( m68020 );
CPU_DISASSEMBLE( m68030 );
CPU_DISASSEMBLE( m68040 );
CPU_DISASSEMBLE( m6805 );
CPU_DISASSEMBLE( m6809 );
CPU_DISASSEMBLE( mb86233 );
CPU_DISASSEMBLE( mb88 );
CPU_DISASSEMBLE( mcs48 );
CPU_DISASSEMBLE( upi41 );
CPU_DISASSEMBLE( i8051 );
CPU_DISASSEMBLE( i8052 );
CPU_DISASSEMBLE( i80c51 );
CPU_DISASSEMBLE( i80c52 );
CPU_DISASSEMBLE( ds5002fp );
CPU_DISASSEMBLE( minx );
CPU_DISASSEMBLE( mips3be );
CPU_DISASSEMBLE( mips3le );
CPU_DISASSEMBLE( psxcpu_generic );
CPU_DISASSEMBLE( r3000be );
CPU_DISASSEMBLE( r3000le );
CPU_DISASSEMBLE( nec_generic );
CPU_DISASSEMBLE( pdp1 );
CPU_DISASSEMBLE( tx0_64kw );
CPU_DISASSEMBLE( tx0_8kw );
CPU_DISASSEMBLE( pic16c5x );
CPU_DISASSEMBLE( powerpc );
CPU_DISASSEMBLE( rsp );
CPU_DISASSEMBLE( s2650 );
CPU_DISASSEMBLE( saturn );
CPU_DISASSEMBLE( sc61860 );
CPU_DISASSEMBLE( se3208 );
CPU_DISASSEMBLE( sh2 );
CPU_DISASSEMBLE( sh4 );
CPU_DISASSEMBLE( sharc );
CPU_DISASSEMBLE( sm8500 );
CPU_DISASSEMBLE( spc700 );
CPU_DISASSEMBLE( ssem );
CPU_DISASSEMBLE( ssp1601 );
CPU_DISASSEMBLE( t11 );
CPU_DISASSEMBLE( t90 );
CPU_DISASSEMBLE( tlcs900 );
CPU_DISASSEMBLE( tms0980 );
CPU_DISASSEMBLE( tms1000 );
CPU_DISASSEMBLE( tms1100 );
CPU_DISASSEMBLE( tms32010 );
CPU_DISASSEMBLE( tms32025 );
CPU_DISASSEMBLE( tms32031 );
CPU_DISASSEMBLE( tms32051 );
CPU_DISASSEMBLE( tms34010 );
CPU_DISASSEMBLE( tms34020 );
CPU_DISASSEMBLE( tms57002 );
CPU_DISASSEMBLE( tms7000 );
CPU_DISASSEMBLE( upd7810 );
CPU_DISASSEMBLE( upd7807 );
CPU_DISASSEMBLE( upd7801 );
CPU_DISASSEMBLE( upd78c05 );
CPU_DISASSEMBLE( v60 );
CPU_DISASSEMBLE( v70 );
CPU_DISASSEMBLE( v810 );
CPU_DISASSEMBLE( z180 );
CPU_DISASSEMBLE( z8000 );
CPU_DISASSEMBLE( z80 );
enum _display_type
{
_8bit,
_16be,
_16le,
_24be,
_24le,
_32be,
_32le,
_64be,
_64le
};
typedef enum _display_type display_type;
typedef struct _dasm_table_entry dasm_table_entry;
struct _dasm_table_entry
{
const char * name;
display_type display;
INT8 pcshift;
cpu_disassemble_func func;
};
static const dasm_table_entry dasm_table[] =
{
{ "adsp21xx", _24le, -2, CPU_DISASSEMBLE_NAME(adsp21xx) },
{ "alpha8201", _8bit, 0, CPU_DISASSEMBLE_NAME(alpha8201) },
{ "arm", _32le, 0, CPU_DISASSEMBLE_NAME(arm) },
{ "arm7", _32le, 0, CPU_DISASSEMBLE_NAME(arm7arm) },
{ "arm7thumb", _16le, 0, CPU_DISASSEMBLE_NAME(arm7thumb) },
{ "asap", _32le, 0, CPU_DISASSEMBLE_NAME(asap) },
{ "avr8", _16le, 0, CPU_DISASSEMBLE_NAME(avr8) },
{ "ccpu", _8bit, 0, CPU_DISASSEMBLE_NAME(ccpu) },
{ "cdp1802", _8bit, 0, CPU_DISASSEMBLE_NAME(cdp1802) },
{ "cop410", _8bit, 0, CPU_DISASSEMBLE_NAME(cop410) },
{ "cop420", _8bit, 0, CPU_DISASSEMBLE_NAME(cop420) },
{ "cop444", _8bit, 0, CPU_DISASSEMBLE_NAME(cop444) },
{ "cp1610", _16be, -1, CPU_DISASSEMBLE_NAME(cp1610) },
{ "cquestsnd", _64be, -3, CPU_DISASSEMBLE_NAME(cquestsnd) },
{ "cquestrot", _64be, -3, CPU_DISASSEMBLE_NAME(cquestrot) },
{ "cquestlin", _64be, -3, CPU_DISASSEMBLE_NAME(cquestlin) },
{ "dsp32c", _32le, 0, CPU_DISASSEMBLE_NAME(dsp32c) },
{ "dsp56k", _16le, -1, CPU_DISASSEMBLE_NAME(dsp56k) },
{ "hyperstone", _16be, 0, CPU_DISASSEMBLE_NAME(hyperstone_generic) },
{ "esrip", _64be, 0, CPU_DISASSEMBLE_NAME(esrip) },
{ "f8", _8bit, 0, CPU_DISASSEMBLE_NAME(f8) },
{ "g65816", _8bit, 0, CPU_DISASSEMBLE_NAME(g65816_generic) },
{ "h6280", _8bit, 0, CPU_DISASSEMBLE_NAME(h6280) },
{ "h8", _16be, 0, CPU_DISASSEMBLE_NAME(h8) },
{ "hd6309", _8bit, 0, CPU_DISASSEMBLE_NAME(hd6309) },
{ "i386", _8bit, 0, CPU_DISASSEMBLE_NAME(x86_32) },
{ "i4004", _8bit, 0, CPU_DISASSEMBLE_NAME(i4004) },
{ "i8085", _8bit, 0, CPU_DISASSEMBLE_NAME(i8085) },
{ "i80286", _8bit, 0, CPU_DISASSEMBLE_NAME(x86_16) },
{ "i8086", _8bit, 0, CPU_DISASSEMBLE_NAME(x86_16) },
{ "i960", _32le, 0, CPU_DISASSEMBLE_NAME(i960) },
{ "jaguargpu", _16be, 0, CPU_DISASSEMBLE_NAME(jaguargpu) },
{ "jaguardsp", _16be, 0, CPU_DISASSEMBLE_NAME(jaguardsp) },
{ "x86_16", _8bit, 0, CPU_DISASSEMBLE_NAME(x86_16) },
{ "x86_32", _8bit, 0, CPU_DISASSEMBLE_NAME(x86_32) },
{ "x86_64", _8bit, 0, CPU_DISASSEMBLE_NAME(x86_64) },
{ "konami", _8bit, 0, CPU_DISASSEMBLE_NAME(konami) },
{ "lh5801", _8bit, 0, CPU_DISASSEMBLE_NAME(lh5801) },
{ "lr35902", _8bit, 0, CPU_DISASSEMBLE_NAME(lr35902) },
{ "m37710", _8bit, 0, CPU_DISASSEMBLE_NAME(m37710_generic) },
{ "m6502", _8bit, 0, CPU_DISASSEMBLE_NAME(m6502) },
{ "m65sc02", _8bit, 0, CPU_DISASSEMBLE_NAME(m65sc02) },
{ "m65c02", _8bit, 0, CPU_DISASSEMBLE_NAME(m65c02) },
{ "m65ce02", _8bit, 0, CPU_DISASSEMBLE_NAME(m65ce02) },
{ "m6510", _8bit, 0, CPU_DISASSEMBLE_NAME(m6510) },
{ "deco16", _8bit, 0, CPU_DISASSEMBLE_NAME(deco16) },
{ "m4510", _8bit, 0, CPU_DISASSEMBLE_NAME(m4510) },
{ "m6800", _8bit, 0, CPU_DISASSEMBLE_NAME(m6800) },
{ "m6801", _8bit, 0, CPU_DISASSEMBLE_NAME(m6801) },
{ "m6802", _8bit, 0, CPU_DISASSEMBLE_NAME(m6802) },
{ "m6803", _8bit, 0, CPU_DISASSEMBLE_NAME(m6803) },
{ "hd63701", _8bit, 0, CPU_DISASSEMBLE_NAME(hd63701) },
{ "nsc8105", _8bit, 0, CPU_DISASSEMBLE_NAME(nsc8105) },
{ "m68000", _16be, 0, CPU_DISASSEMBLE_NAME(m68000) },
{ "m68008", _16be, 0, CPU_DISASSEMBLE_NAME(m68008) },
{ "m68010", _16be, 0, CPU_DISASSEMBLE_NAME(m68010) },
{ "m68020", _16be, 0, CPU_DISASSEMBLE_NAME(m68020) },
{ "m68030", _16be, 0, CPU_DISASSEMBLE_NAME(m68030) },
{ "m68040", _16be, 0, CPU_DISASSEMBLE_NAME(m68040) },
{ "m6805", _8bit, 0, CPU_DISASSEMBLE_NAME(m6805) },
{ "m6809", _8bit, 0, CPU_DISASSEMBLE_NAME(m6809) },
{ "mb86233", _32le, -2, CPU_DISASSEMBLE_NAME(mb86233) },
{ "mb88xx", _8bit, 0, CPU_DISASSEMBLE_NAME(mb88) },
{ "mcs48", _8bit, 0, CPU_DISASSEMBLE_NAME(mcs48) },
{ "upi41", _8bit, 0, CPU_DISASSEMBLE_NAME(upi41) },
{ "i8051", _8bit, 0, CPU_DISASSEMBLE_NAME(i8051) },
{ "i8052", _8bit, 0, CPU_DISASSEMBLE_NAME(i8052) },
{ "i80c51", _8bit, 0, CPU_DISASSEMBLE_NAME(i80c51) },
{ "i80c52", _8bit, 0, CPU_DISASSEMBLE_NAME(i80c52) },
{ "ds5002fp", _8bit, 0, CPU_DISASSEMBLE_NAME(ds5002fp) },
{ "minx", _8bit, 0, CPU_DISASSEMBLE_NAME(minx) },
{ "mips3be", _32be, 0, CPU_DISASSEMBLE_NAME(mips3be) },
{ "mips3le", _32le, 0, CPU_DISASSEMBLE_NAME(mips3le) },
{ "psxcpu", _32le, 0, CPU_DISASSEMBLE_NAME(psxcpu_generic) },
{ "r3000be", _32be, 0, CPU_DISASSEMBLE_NAME(r3000be) },
{ "r3000le", _32le, 0, CPU_DISASSEMBLE_NAME(r3000le) },
{ "nec", _8bit, 0, CPU_DISASSEMBLE_NAME(nec_generic) },
{ "pdp1", _32be, 0, CPU_DISASSEMBLE_NAME(pdp1) },
{ "tx0_64kw", _32be, -2, CPU_DISASSEMBLE_NAME(tx0_64kw) },
{ "tx0_8kw", _32be, -2, CPU_DISASSEMBLE_NAME(tx0_8kw) },
{ "pic16c5x", _16le, -1, CPU_DISASSEMBLE_NAME(pic16c5x) },
{ "powerpc", _32be, 0, CPU_DISASSEMBLE_NAME(powerpc) },
{ "rsp", _32le, 0, CPU_DISASSEMBLE_NAME(rsp) },
{ "s2650", _8bit, 0, CPU_DISASSEMBLE_NAME(s2650) },
{ "saturn", _8bit, 0, CPU_DISASSEMBLE_NAME(saturn) },
{ "sc61860", _8bit, 0, CPU_DISASSEMBLE_NAME(sc61860) },
{ "se3208", _16le, 0, CPU_DISASSEMBLE_NAME(se3208) },
{ "sh2", _16be, 0, CPU_DISASSEMBLE_NAME(sh2) },
{ "sh4", _16le, 0, CPU_DISASSEMBLE_NAME(sh4) },
{ "sharc", _64le, -3, CPU_DISASSEMBLE_NAME(sharc) },
{ "sm8500", _8bit, 0, CPU_DISASSEMBLE_NAME(sm8500) },
{ "spc700", _8bit, 0, CPU_DISASSEMBLE_NAME(spc700) },
{ "ssem", _32le, 0, CPU_DISASSEMBLE_NAME(ssem) },
{ "ssp1601", _16be, -1, CPU_DISASSEMBLE_NAME(ssp1601) },
{ "t11", _16le, 0, CPU_DISASSEMBLE_NAME(t11) },
// { "t90", _8bit, 0, CPU_DISASSEMBLE_NAME(t90) },
{ "tlcs900", _8bit, 0, CPU_DISASSEMBLE_NAME(tlcs900) },
{ "tms0980", _16be, 0, CPU_DISASSEMBLE_NAME(tms0980) },
{ "tms1000", _8bit, 0, CPU_DISASSEMBLE_NAME(tms1000) },
{ "tms1100", _8bit, 0, CPU_DISASSEMBLE_NAME(tms1100) },
{ "tms32010", _16be, -1, CPU_DISASSEMBLE_NAME(tms32010) },
{ "tms32025", _16be, -1, CPU_DISASSEMBLE_NAME(tms32025) },
{ "tms32031", _32le, -2, CPU_DISASSEMBLE_NAME(tms32031) },
{ "tms32051", _16le, -1, CPU_DISASSEMBLE_NAME(tms32051) },
{ "tms34010", _8bit, 3, CPU_DISASSEMBLE_NAME(tms34010) },
{ "tms34020", _8bit, 3, CPU_DISASSEMBLE_NAME(tms34020) },
{ "tms57002", _32le, -2, CPU_DISASSEMBLE_NAME(tms57002) },
{ "tms7000", _8bit, 0, CPU_DISASSEMBLE_NAME(tms7000) },
{ "upd7810", _8bit, 0, CPU_DISASSEMBLE_NAME(upd7810) },
{ "upd7807", _8bit, 0, CPU_DISASSEMBLE_NAME(upd7807) },
{ "upd7801", _8bit, 0, CPU_DISASSEMBLE_NAME(upd7801) },
{ "upd78c05", _8bit, 0, CPU_DISASSEMBLE_NAME(upd78c05) },
{ "v60", _8bit, 0, CPU_DISASSEMBLE_NAME(v60) },
{ "v70", _8bit, 0, CPU_DISASSEMBLE_NAME(v70) },
{ "v810", _16le, 0, CPU_DISASSEMBLE_NAME(v810) },
{ "z180", _8bit, 0, CPU_DISASSEMBLE_NAME(z180) },
// { "z8000", _16be, 0, CPU_DISASSEMBLE_NAME(z8000) },
{ "z80", _8bit, 0, CPU_DISASSEMBLE_NAME(z80) },
};
void CLIB_DECL fatalerror(const char *text, ...)
{
va_list arg;
/* dump to the buffer; assume no one writes >2k lines this way */
va_start(arg, text);
vfprintf(stderr, text, arg);
va_end(arg);
exit(1);
}
void CLIB_DECL logerror(const char *format, ...)
{
/* silent logerrors are allowed in disassemblers */
}
void CLIB_DECL mame_printf_debug(const char *format, ...)
{
/* silent mame_printf_debugs are allowed in disassemblers */
}
int main(int argc, char *argv[])
{
char buffer[1024];
UINT8 oprom[10] = { 0x12, 0x34, 0x56, 0x78 };
offs_t basepc = 0;
int index;
//const device_config *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram
for (index = 0; index < ARRAY_LENGTH(dasm_table); index++)
{
int result = (*dasm_table[index].func)(NULL, buffer, basepc, oprom, oprom);
printf("%10s: (%d) %s\n", dasm_table[index].name, result & DASMFLAG_LENGTHMASK, buffer);
}
return 0;
}