Commit 1c190bf1 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Cleanups

parent 690a5076
......@@ -12,7 +12,6 @@
/** changes to this file. **/
/*************************************************************/
#include "FDIDisk.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _WIN32
......
......@@ -13,7 +13,6 @@
#include "Floppy.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/stat.h>
......
/** EMULib Emulation Library *********************************/
/** **/
/** Hunt.c **/
/** **/
/** This file implements mechanism for searching possible **/
/** cheats inside running game data. Also see Hunt.h. **/
/** **/
/** Copyright (C) Marat Fayzullin 2013-2016 **/
/** You are not allowed to distribute this software **/
/** commercially. Please, notify me, if you make any **/
/** changes to this file. **/
/*************************************************************/
#include "Hunt.h"
#include <stdio.h>
#if defined(VGBA)
#include "ARM.h"
#define MEMREAD32(A) QRdARM(A)
#define MEMREAD16(A) WRdARM(A)
#define MEMREAD8(A) BRdARM(A)
#elif defined(INES)
#include "M6502.h"
#define MEMREAD32(A) (Rd6502(A)+((int)Rd6502(A+1)<<8)+((int)Rd6502(A+2)<<16)+((int)Rd6502(A+3)<<24))
#define MEMREAD16(A) (Rd6502(A)+((int)Rd6502(A+1)<<8))
#define MEMREAD8(A) Rd6502(A)
#elif defined(VGB) || defined(MG) || defined(COLEM) || defined(SPECCY) || defined(FMSX)
#include "Z80.h"
#define MEMREAD32(A) (RdZ80(A)+((int)RdZ80(A+1)<<8)+((int)RdZ80(A+2)<<16)+((int)RdZ80(A+3)<<24))
#define MEMREAD16(A) (RdZ80(A)+((int)RdZ80(A+1)<<8))
#define MEMREAD8(A) RdZ80(A)
#else
#define MEMREAD32(A) (0)
#define MEMREAD16(A) (0)
#define MEMREAD8(A) (0)
#endif
static HUNTEntry Buf[HUNT_BUFSIZE];
static int Count;
/** InitHUNT() ***********************************************/
/** Initialize cheat search, clearing all data. **/
/*************************************************************/
void InitHUNT(void) { Count=0; }
/** TotalHUNT() **********************************************/
/** Get total number of currently watched locations. **/
/*************************************************************/
int TotalHUNT(void) { return(Count); }
/** GetHUNT() ************************************************/
/** Get Nth memory location. Returns 0 for invalid N. **/
/*************************************************************/
HUNTEntry *GetHUNT(int N)
{ return((N>=0)&&(N<Count)? &Buf[N]:0); }
/** AddHUNT() ************************************************/
/** Add a new value to search for, with the address range **/
/** to search in. Returns number of memory locations found. **/
/*************************************************************/
int AddHUNT(unsigned int Addr,unsigned int Size,unsigned int Value,unsigned int NewValue,unsigned int Flags)
{
unsigned int J,M;
int I;
/* Force 32bit/16bit mode for large values */
if((Value>=0x10000)||(NewValue>=0x10000))
Flags = (Flags&~HUNT_MASK_SIZE)|HUNT_32BIT;
else if((Value>=0x100)||(NewValue>=0x100))
Flags = (Flags&~HUNT_MASK_SIZE)|HUNT_16BIT;
/* Compute mask for given value size and truncate value */
M = Flags&HUNT_32BIT? 0xFFFFFFFF:Flags&HUNT_16BIT? 0xFFFF:0x00FF;
#ifdef VGBA
/* ARM aligns data to the size boundary */
if(M>0xFFFF) Addr&=~3; else if(M>0xFF) Addr&=~1;
#endif
/* Scan memory for given value */
for(Size+=Addr,I=0;(Addr<Size)&&(Count<HUNT_BUFSIZE);++Addr)
{
J = (M>0xFFFF? MEMREAD32(Addr):M>0xFF? MEMREAD16(Addr):MEMREAD8(Addr))&M;
if((J==Value)||(J==((Value-1)&M)))
{
Buf[Count].Addr = Addr;
Buf[Count].Flags = Flags;
Buf[Count].Value = J;
Buf[Count].Orig = J==Value? NewValue:((NewValue-1)&M);
Buf[Count].Count = 0;
++Count;
++I;
}
#ifdef VGBA
/* ARM aligns data to the size boundary */
if(M>0xFFFF) Addr+=3; else if(M>0xFF) Addr+=1;
#endif
}
/* Return the number of matches found */
return(I);
}
/** ScanHUNT() ***********************************************/
/** Scan memory for changed values and update search data. **/
/** Returns number of memory locations updated. **/
/*************************************************************/
int ScanHUNT(void)
{
unsigned int K,L;
int J,I;
/* Scan active search entries */
for(J=I=0;J<Count;++J)
{
L = Buf[J].Flags&HUNT_32BIT? 0xFFFFFFFF:Buf[J].Flags&HUNT_16BIT? 0xFFFF:0x00FF;
K = (L>0xFFFF? MEMREAD32(Buf[J].Addr):L>0xFF? MEMREAD16(Buf[J].Addr):MEMREAD8(Buf[J].Addr))&L;
/* Check for expected changes */
switch(Buf[J].Flags&HUNT_MASK_CHANGE)
{
case HUNT_PLUSONE: L = K==((Buf[J].Value+1)&L);break;
case HUNT_PLUSMANY: L = K>Buf[J].Value;break;
case HUNT_MINUSONE: L = K==((Buf[J].Value-1)&L);break;
case HUNT_MINUSMANY: L = K<Buf[J].Value;break;
default:
case HUNT_CONSTANT: L = K==Buf[J].Value;break;
}
/* Delete any entry that does not change as expected */
if(L)
{
if(Buf[J].Count<(1<<(sizeof(Buf[J].Count)<<3))-1) ++Buf[J].Count;
Buf[J].Value = K;
Buf[I++] = Buf[J];
}
}
/* Return number of successfully updated entries */
return(Count=I);
}
/** HUNT2Cheat() *********************************************/
/** Create cheat code from Nth hunt entry. Returns 0 if the **/
/** entry is invalid. **/
/*************************************************************/
const char *HUNT2Cheat(int N,unsigned int Type)
{
static char Buf[32];
HUNTEntry *HE;
/* Must have a valid entry */
if(!(HE=GetHUNT(N))) return(0);
/* Depending on cheat type... */
switch(Type)
{
/** GameBoy Advance ******************************************/
/** There are two versions of GameShark (v1/v3) differing **/
/** by encryption and CodeBreaker. Not encrypting here. **/
/*************************************************************/
case HUNT_GBA_GS:
/* 00AAAAAA NNNNNNDD - Multiple 8bit RAM Write */
/* 02AAAAAA NNNNDDDD - Multiple 816bit RAM Write */
sprintf(Buf,"0%c%06X 0000%04X",
HE->Flags&HUNT_16BIT? '2':'0',
(HE->Addr&0x000FFFFF)|((HE->Addr&0x0F000000)>>4),
HE->Orig
);
return(Buf);
case HUNT_GBA_CB:
/* 2AAAAAAA XXXX - 16bit RAM Write */
/* 3AAAAAAA 00XX - 8bit RAM Write */
sprintf(Buf,"%c%07X %04X",
HE->Flags&HUNT_16BIT? '2':'3',
HE->Addr&0x0FFFFFFF,
HE->Orig
);
return(Buf);
/** GameBoy **************************************************/
/** GameBoy has GameShark and GameGenie, but only GameShark **/
/** can modify RAM. **/
/*************************************************************/
case HUNT_GB_GS:
/* 00DDAAAA - 8bit RAM Write, No Bank */
sprintf(Buf,"00%02X%02X%02X",(HE->Orig)&0xFF,HE->Addr&0x00FF,(HE->Addr&0xFF00)>>8);
if(HE->Flags&HUNT_16BIT)
sprintf(Buf+8,";00%02X%02X%02X",HE->Orig>>8,(HE->Addr+1)&0x00FF,((HE->Addr+1)&0xFF00)>>8);
return(Buf);
/** NES ******************************************************/
/** NES has both Pro Action Replay and GameGenie, but only **/
/** Pro Action Replay can modify RAM. **/
/*************************************************************/
case HUNT_NES_AR:
/* 00AAAADD - 8bit RAM Write */
sprintf(Buf,"00%04X%02X",HE->Addr&0xFFFF,HE->Orig&0xFF);
if(HE->Flags&HUNT_16BIT)
sprintf(Buf+8,";00%04X%02X",(HE->Addr+1)&0xFFFF,HE->Orig>>8);
return(Buf);
/** Sega MasterSystem and GameGear ***************************/
/** MasterSystem has Pro Action Replay, while GameGear has **/
/** GameGenie. Only Pro Action Replay can modify RAM. **/
/*************************************************************/
case HUNT_SMS_AR:
/* 00AA-AADD - 8bit RAM Write */
sprintf(Buf,"00%02X-%02X%02X",(HE->Addr&0xFF00)>>8,HE->Addr&0x00FF,HE->Orig&0xFF);
if(HE->Flags&HUNT_16BIT)
sprintf(Buf+9,";00%02X-%02X%02X",((HE->Addr+1)&0xFF00)>>8,(HE->Addr+1)&0x00FF,HE->Orig>>8);
return(Buf);
/** ColecoVision, MSX, ZX Spectrum ***************************/
/** There was no official cheating hardware for these **/
/** systems, so we come up with our own "hardware". **/
/*************************************************************/
case HUNT_MSX:
case HUNT_ZXS:
case HUNT_COLECO:
/* AAAA-DD[DD] - 8bit[16bit] RAM Write */
if(HE->Flags&HUNT_16BIT)
sprintf(Buf,"%04X-%04X",HE->Addr,HE->Orig&0xFFFF);
else
sprintf(Buf,"%04X-%02X",HE->Addr,HE->Orig&0x00FF);
return(Buf);
}
/* Invalid cheat type */
return(0);
}
/** EMULib Emulation Library *********************************/
/** **/
/** Hunt.h **/
/** **/
/** This file declares functions to search for possible **/
/** cheats inside running game data. Also see Hunt.c. **/
/** **/
/** Copyright (C) Marat Fayzullin 2013-2016 **/
/** You are not allowed to distribute this software **/
/** commercially. Please, notify me, if you make any **/
/** changes to this file. **/
/*************************************************************/
#ifndef HUNT_H
#define HUNT_H
#define HUNT_BUFSIZE 1024
/** Flags used in AddHUNT() **********************************/
#define HUNT_MASK_ID 0x00FF
#define HUNT_MASK_CHANGE 0x0700
#define HUNT_CONSTANT 0x0000
#define HUNT_PLUSONE 0x0100
#define HUNT_PLUSMANY 0x0200
#define HUNT_MINUSONE 0x0300
#define HUNT_MINUSMANY 0x0400
#define HUNT_MASK_SIZE 0x1800
#define HUNT_8BIT 0x0000
#define HUNT_16BIT 0x0800
#define HUNT_32BIT 0x1000
/** Types used in HUNT2Cheat() *******************************/
#define HUNT_GBA_GS 0 /* GBA GameShark Advance */
#define HUNT_GBA_CB 1 /* GBA CodeBreaker Advance */
#define HUNT_SMS_AR 2 /* SMS Pro Action Replay */
#define HUNT_NES_AR 3 /* NES Pro Action Replay */
#define HUNT_GB_GS 4 /* GB GameShark */
#define HUNT_COLECO 5 /* ColecoVision cheats */
#define HUNT_MSX 6 /* MSX cheats */
#define HUNT_ZXS 7 /* ZX Spectrum cheats */
/** HUNTEntry ************************************************/
/** Search entry containing data on one memory location. **/
/*************************************************************/
typedef struct
{
unsigned int Addr; /* Memory location address */
unsigned int Orig; /* Original value at the address */
unsigned int Value; /* Current value at the address */
unsigned short Flags; /* Options supplied in AddHUNT() */
unsigned short Count; /* Number of detected changes */
} HUNTEntry;
/** InitHUNT() ***********************************************/
/** Initialize cheat search, clearing all data. **/
/*************************************************************/
void InitHUNT(void);
/** AddHUNT() ************************************************/
/** Add a new value to search for, with the address range **/
/** to search in. Returns number of memory locations found. **/
/*************************************************************/
int AddHUNT(unsigned int Addr,unsigned int Size,unsigned int Value,unsigned int NewValue,unsigned int Flags);
/** ScanHUNT() ***********************************************/
/** Scan memory for changed values and update search data. **/
/** Returns number of memory locations updated. **/
/*************************************************************/
int ScanHUNT(void);
/** TotalHUNT() **********************************************/
/** Get total number of currently watched locations. **/
/*************************************************************/
int TotalHUNT(void);
/** GetHUNT() ************************************************/
/** Get Nth memory location. Returns 0 for invalid N. **/
/*************************************************************/
HUNTEntry *GetHUNT(int N);
/** HUNT2Cheat() *********************************************/
/** Create cheat code from Nth hunt entry. Returns 0 if the **/
/** entry is invalid. **/
/*************************************************************/
const char *HUNT2Cheat(int N,unsigned int Type);
#endif /* HUNT_H */
......@@ -13,7 +13,6 @@
/*************************************************************/
#include "Sound.h"
#include <stdio.h>
#include <string.h>
#if defined(_WIN32)
......
......@@ -12,7 +12,6 @@
/** changes to this file. **/
/*************************************************************/
#include "WD1793.h"
#include <stdio.h>
/** Reset1793() **********************************************/
/** Reset WD1793. When Disks=WD1793_INIT, also initialize **/
......@@ -70,8 +69,7 @@ byte Read1793(WD1793 *D,byte A)
return(D->R[A]);
case WD1793_DATA:
/* When reading data, load value from disk */
if(!D->RDLength)
{ if(D->Verbose) printf("WD1793: EXTRA DATA READ\n"); }
if(!D->RDLength) { }
else
{
/* Read data */
......@@ -87,7 +85,6 @@ byte Read1793(WD1793 *D,byte A)
else
{
/* Read completed */
if(D->Verbose) printf("WD1793: READ COMPLETED\n");
D->R[0]&= ~(F_DRQ|F_BUSY);
D->IRQ = WD1793_IRQ;
}
......@@ -98,7 +95,6 @@ byte Read1793(WD1793 *D,byte A)
if(D->Wait)
if(!--D->Wait)
{
if(D->Verbose) printf("WD1793: COMMAND TIMED OUT\n");
D->RDLength=D->WRLength=0;
D->R[0] = (D->R[0]&~(F_DRQ|F_BUSY))|F_LOSTDATA;
D->IRQ = WD1793_IRQ;
......@@ -127,7 +123,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
/* If it is FORCE-IRQ command... */
if((V&0xF0)==0xD0)
{
if(D->Verbose) printf("WD1793: FORCE-INTERRUPT (%02Xh)\n",V);
/* Reset any executing command */
D->RDLength=D->WRLength=0;
/* Either reset BUSY flag or reset all flags if BUSY=0 */
......@@ -146,7 +141,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
switch(V&0xF0)
{
case 0x00: /* RESTORE (seek track 0) */
if(D->Verbose) printf("WD1793: RESTORE-TRACK-0 (%02Xh)\n",V);
D->Track[D->Drive]=0;
D->R[0] = F_INDEX|F_TRACK0|(V&C_LOADHEAD? F_HEADLOAD:0);
D->R[1] = 0;
......@@ -154,7 +148,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
break;
case 0x10: /* SEEK */
if(D->Verbose) printf("WD1793: SEEK-TRACK %d (%02Xh)\n",D->R[3],V);
/* Reset any executing command */
D->RDLength=D->WRLength=0;
D->Track[D->Drive]=D->R[3];
......@@ -171,11 +164,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
case 0x50: /* STEP-IN-AND-UPDATE */
case 0x60: /* STEP-OUT */
case 0x70: /* STEP-OUT-AND-UPDATE */
if(D->Verbose) printf("WD1793: STEP%s%s (%02Xh)\n",
V&0x40? (V&0x20? "-OUT":"-IN"):"",
V&0x10? "-AND-UPDATE":"",
V
);
/* Either store or fetch step direction */
if(V&0x40) D->LastS=V&0x20; else V=(V&~0x20)|D->LastS;
/* Step the head, update track register if requested */
......@@ -193,7 +181,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
case 0x80:
case 0x90: /* READ-SECTORS */
if(D->Verbose) printf("WD1793: READ-SECTOR%s %c:%d:%d:%d (%02Xh)\n",V&0x10? "S":"",D->Drive+'A',D->Side,D->R[1],D->R[2],V);
/* Seek to the requested sector */
D->Ptr=SeekFDI(
D->Disk[D->Drive],D->Side,D->Track[D->Drive],
......@@ -202,7 +189,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
/* If seek successful, set up reading operation */
if(!D->Ptr)
{
if(D->Verbose) printf("WD1793: READ ERROR\n");
D->R[0] = (D->R[0]&~F_ERRCODE)|F_NOTFOUND;
D->IRQ = WD1793_IRQ;
}
......@@ -218,7 +204,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
case 0xA0:
case 0xB0: /* WRITE-SECTORS */
if(D->Verbose) printf("WD1793: WRITE-SECTOR%s %c:%d:%d:%d (%02Xh)\n",V&0x10? "S":"",'A'+D->Drive,D->Side,D->R[1],D->R[2],V);
/* Seek to the requested sector */
D->Ptr=SeekFDI(
D->Disk[D->Drive],D->Side,D->Track[D->Drive],
......@@ -227,7 +212,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
/* If seek successful, set up writing operation */
if(!D->Ptr)
{
if(D->Verbose) printf("WD1793: WRITE ERROR\n");
D->R[0] = (D->R[0]&~F_ERRCODE)|F_NOTFOUND;
D->IRQ = WD1793_IRQ;
}
......@@ -242,7 +226,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
break;
case 0xC0: /* READ-ADDRESS */
if(D->Verbose) printf("WD1793: READ-ADDRESS (%02Xh)\n",V);
/* Read first sector address from the track */
if(!D->Disk[D->Drive]) D->Ptr=0;
else
......@@ -258,7 +241,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
/* If address found, initiate data transfer */
if(!D->Ptr)
{
if(D->Verbose) printf("WD1793: READ-ADDRESS ERROR\n");
D->R[0] |= F_NOTFOUND;
D->IRQ = WD1793_IRQ;
}
......@@ -273,15 +255,12 @@ byte Write1793(WD1793 *D,byte A,byte V)
break;
case 0xE0: /* READ-TRACK */
if(D->Verbose) printf("WD1793: READ-TRACK %d (%02Xh) UNSUPPORTED!\n",D->R[1],V);
break;
case 0xF0: /* WRITE-TRACK */
if(D->Verbose) printf("WD1793: WRITE-TRACK %d (%02Xh) UNSUPPORTED!\n",D->R[1],V);
break;
default: /* UNKNOWN */
if(D->Verbose) printf("WD1793: UNSUPPORTED OPERATION %02Xh!\n",V);
break;
}
break;
......@@ -293,7 +272,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
case WD1793_SYSTEM:
// @@@ Too verbose
// if(D->Verbose) printf("WD1793: Drive %c, %cD side %d\n",'A'+(V&S_DRIVE),V&S_DENSITY? 'D':'S',V&S_SIDE? 0:1);
/* Reset controller if S_RESET goes up */
if((D->R[4]^V)&V&S_RESET) Reset1793(D,D->Disk[0],WD1793_KEEP);
/* Set disk #, side #, ignore the density (@@@) */
......@@ -305,8 +283,7 @@ byte Write1793(WD1793 *D,byte A,byte V)
case WD1793_DATA:
/* When writing data, store value to disk */
if(!D->WRLength)
{ if(D->Verbose) printf("WD1793: EXTRA DATA WRITE (%02Xh)\n",V); }
if(!D->WRLength) { }
else
{
/* Write data */
......@@ -322,7 +299,6 @@ byte Write1793(WD1793 *D,byte A,byte V)
else
{
/* Write completed */
if(D->Verbose) printf("WD1793: WRITE COMPLETED\n");
D->R[0]&= ~(F_DRQ|F_BUSY);
D->IRQ = WD1793_IRQ;
}
......
......@@ -11,7 +11,7 @@ ifneq (,$(findstring msvc2003,$(platform)))
INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc
endif
COREDEFINES := -DUNIX -DFMSX -DBPS16 -DBPP16
COREDEFINES := -DUNIX -DBPS16 -DBPP16
ifeq ($(PATCH_Z80), 1)
COREDEFINES += -DPATCH_Z80
......
......@@ -376,10 +376,4 @@ case DAA:
break;
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: %02X at PC=%04X\n",
(long)R->User,OpZ80(R->PC.W-1),R->PC.W-1
);
break;
......@@ -19,10 +19,8 @@
#include <ctype.h>
#include <string.h>
#ifdef FMSX
#include "AY8910.h"
extern AY8910 PSG;
#endif
static const char *Mnemonics[256] =
{
......@@ -412,7 +410,6 @@ byte DebugZ80(Z80 *R)
}
break;
#ifdef FMSX
case 'S':
for(J=0;J<AY8910_CHANNELS;J++)
{
......@@ -422,7 +419,6 @@ byte DebugZ80(Z80 *R)
}
printf("Envelope period %dms\n",PSG.EPeriod);
break;
#endif /* FMSX */
}
}
......
......@@ -15,7 +15,6 @@
#include "Z80.h"
#include "Tables.h"
#include <stdio.h>
/** INLINE ***************************************************/
/** C99 standard has "inline", but older compilers used **/
......@@ -31,49 +30,10 @@
/** This is system-dependent code put here to speed things **/
/** up. It has to stay inlined to be fast. **/
/*************************************************************/
#ifdef COLEM
#define FAST_RDOP
extern byte *ROMPage[];
INLINE byte OpZ80(word A) { return(ROMPage[A>>13][A&0x1FFF]); }
#endif
#ifdef SPECCY
#define RdZ80 RDZ80
// @@@ WrZ80() can't be inlined as it contains debugging stuff
//#define WrZ80 WRZ80
extern byte *Page[],*ROM;
INLINE byte RdZ80(word A) { return(Page[A>>13][A&0x1FFF]); }
//INLINE void WrZ80(word A,byte V) { if(Page[A>>13]<ROM) Page[A>>13][A&0x1FFF]=V; }
#endif
#ifdef MG
#define RdZ80 RDZ80
extern byte *Page[];
INLINE byte RdZ80(word A) { return(Page[A>>13][A&0x1FFF]); }
#endif
#ifdef FMSX
#define FAST_RDOP
extern byte *RAM[];
INLINE byte OpZ80(word A) { return(RAM[A>>13][A&0x1FFF]); }
#endif
#ifdef ATI85
#define RdZ80 RDZ80
#define WrZ80 WRZ80
extern byte *Page[],*ROM;
extern void (*DoMEM)(word Addr,byte V);
INLINE byte RdZ80(word A) { return(Page[A>>14][A&0x3FFF]); }
INLINE void WrZ80(word A,byte V) { if(Page[A>>14]<ROM) Page[A>>14][A&0x3FFF]=V; else DoMEM(A,V); }
#endif
/** FAST_RDOP ************************************************/
/** With this #define not present, RdZ80() should perform **/
/** the functions of OpZ80(). **/
/*************************************************************/
#ifndef FAST_RDOP
#define OpZ80(A) RdZ80(A)
#endif
#define S(Fl) R->AF.B.l|=Fl
#define R(Fl) R->AF.B.l&=~(Fl)
......@@ -353,12 +313,7 @@ static void CodesCB(Z80 *R)
{
#include "CodesCB.h"
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: CB %02X at PC=%04X\n",
(long)(R->User),OpZ80(R->PC.W-1),R->PC.W-2
);
break;
}
}
......@@ -377,12 +332,7 @@ static void CodesDDCB(Z80 *R)
{
#include "CodesXCB.h"
default:
if(R->TrapBadOps)
printf
(
"[Z80 %lX] Unrecognized instruction: DD CB %02X %02X at PC=%04X\n",
(long)(R->User),OpZ80(R->PC.W-2),OpZ80(R->PC.W-1),R->PC.W-4
);
break;
}
#undef XX
}
......@@ -402,12 +352,7 @@ static void CodesFDCB(Z80 *R)
{
#include "CodesXCB.h"