X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdis6808.cpp;fp=src%2Fdis6808.cpp;h=0000000000000000000000000000000000000000;hb=a7c3ff9deab4cefbc76ac52d38b67e7033c63cf6;hp=97f20c4c91d64a515d1bfed669659039c8a9147b;hpb=6e4a6b1f4aecb0ec7cab2c3dea9553f30f848a4c;p=thunder diff --git a/src/dis6808.cpp b/src/dis6808.cpp deleted file mode 100644 index 97f20c4..0000000 --- a/src/dis6808.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// -// 6808 disassembler -// -// by James Hammons -// -// (c) 2004, 2014 Underground Software -// - -#include "dis6808.h" - -#include -#include -#include "v6808.h" -#include "log.h" - -using namespace std; - -// External shit - -#warning "THIS ISN'T GENERIC ENOUGH... !!! FIX !!!" -/*extern*/ V6808REGS soundCPU;//Hm. - -// Private globals variables - -static char op_mat[256] = { - 0, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 0, 0, 0, 0, 5, 5, 0, 5, 0, 5, 0, 0, 0, 0, - 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 5, 0, 0, 5, 5, - 5, 0, 0, 5, 5, 0, 5, 5, 5, 5, 5, 0, 5, 5, 0, 5, - 5, 0, 0, 5, 5, 0, 5, 5, 5, 5, 5, 0, 5, 5, 0, 5, - 7, 0, 0, 7, 7, 0, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, - 2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, - 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 8, 9, 3, 9, 0, - 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, - 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 8, 0, 0, 9, 0, - 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, - 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 7, 7, - 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2 -}; - -static char mnemonics[256][6] = { - "??? ","NOP ","??? ","??? ","??? ","??? ","TAP ","TPA ", - "INX ","DEX ","CLV ","SEV ","CLC ","SEC ","CLI ","SEI ", - "SBA ","CBA ","??? ","??? ","??? ","??? ","TAB ","TBA ", - "??? ","DAA ","??? ","ABA ","??? ","??? ","??? ","??? ", - "BRA ","??? ","BHI ","BLS ","BCC ","BCS ","BNE ","BEQ ", - "BVC ","BVS ","BPL ","BMI ","BGE ","BLT ","BGT ","BLE ", - "TSX ","INS ","PULA ","PULB ","DES ","TXS ","PSHA ","PSHB ", - "??? ","RTS ","??? ","RTI ","??? ","??? ","WAI ","SWI ", - "NEGA ","??? ","??? ","COMA ","LSRA ","??? ","RORA ","ASRA ", - "ASLA ","ROLA ","DECA ","??? ","INCA ","TSTA ","??? ","CLRA ", - "NEGB ","??? ","??? ","COMB ","LSRB ","??? ","RORB ","ASRB ", - "ASLB ","ROLB ","DECB ","??? ","INCB ","TSTB ","??? ","CLRB ", - "NEG ","??? ","??? ","COM ","LSR ","??? ","ROR ","ASR ", - "ASL ","ROL ","DEC ","??? ","INC ","TST ","JMP ","CLR ", - "NEG ","??? ","??? ","COM ","LSR ","??? ","ROR ","ASR ", - "ASL ","ROL ","DEC ","??? ","INC ","TST ","JMP ","CLR ", - "SUBA ","CMPA ","SBCA ","??? ","ANDA ","BITA ","LDAA ","??? ", - "EORA ","ADCA ","ORAA ","ADDA ","CPX ","BSR ","LDS ","??? ", - "SUBA ","CMPA ","SBCA ","??? ","ANDA ","BITA ","LDAA ","STAA ", - "EORA ","ADCA ","ORAA ","ADDA ","CPX ","??? ","LDS ","STS ", - "SUBA ","CMPA ","SBCA ","??? ","ANDA ","BITA ","LDAA ","STAA ", - "EORA ","ADCA ","ORAA ","ADDA ","CPX ","JSR ","LDS ","STS ", - "SUBA ","CMPA ","SBCA ","??? ","ANDA ","BITA ","LDAA ","STAA ", - "EORA ","ADCA ","ORAA ","ADDA ","CPX ","JSR ","LDS ","STS ", - "SUBB ","CMPB ","SBCB ","??? ","ANDB ","BITB ","LDAB ","??? ", - "EORB ","ADCB ","ORAB ","ADDB ","??? ","??? ","LDX ","??? ", - "SUBB ","CMPB ","SBCB ","??? ","ANDB ","BITB ","LDAB ","STAB ", - "EORB ","ADCB ","ORAB ","ADDB ","??? ","??? ","LDX ","STX ", - "SUBB ","CMPB ","SBCB ","??? ","ANDB ","BITB ","LDAB ","STAB ", - "EORB ","ADCB ","ORAB ","ADDB ","??? ","??? ","LDX ","STX ", - "SUBB ","CMPB ","SBCB ","??? ","ANDB ","BITB ","LDAB ","STAB ", - "EORB ","ADCB ","ORAB ","ADDB ","??? ","??? ","LDX ","STX " -}; - -// -// Display bytes in mem in hex -// -static void DisplayBytes(uint16_t src, uint32_t dst) -{ - WriteLog("%04X: ", src); - uint8_t cnt = 0; // Init counter... - - if (src > dst) - dst += 0x10000; // That should fix the FFFF bug... - - for(uint32_t i=src; i