Commit 99c7cb30 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Cleanups

parent 95a47eb0
Pipeline #30100 passed with stages
in 1 minute and 44 seconds
......@@ -45,25 +45,6 @@
#ifndef C65C02_H
#define C65C02_H
//#include <crtdbg.h>
//#define TRACE_CPU
#ifdef TRACE_CPU
#define TRACE_CPU0(msg) _RPT1(_CRT_WARN,"C65C02::"msg" (Time=%012d)\n",gSystemCycleCount)
#define TRACE_CPU1(msg,arg1) _RPT2(_CRT_WARN,"C65C02::"msg" (Time=%012d)\n",arg1,gSystemCycleCount)
#define TRACE_CPU2(msg,arg1,arg2) _RPT3(_CRT_WARN,"C65C02::"msg" (Time=%012d)\n",arg1,arg2,gSystemCycleCount)
#define TRACE_CPU3(msg,arg1,arg2,arg3) _RPT4(_CRT_WARN,"C65C02::"msg" (Time=%012d)\n",arg1,arg2,arg3,gSystemCycleCount)
#else
#define TRACE_CPU0(msg)
#define TRACE_CPU1(msg,arg1)
#define TRACE_CPU2(msg,arg1,arg2)
#define TRACE_CPU3(msg,arg1,arg2,arg3)
#endif
//
// Handy definitions
//
......@@ -140,7 +121,6 @@ class C65C02
C65C02(CSystemBase& parent)
:mSystem(parent)
{
TRACE_CPU0("C65C02()");
// Compute the BCD lookup table
for(UWORD t=0;t<256;++t)
{
......@@ -157,13 +137,11 @@ class C65C02
~C65C02()
{
TRACE_CPU0("~C65C02()");
}
public:
inline void Reset(void)
{
TRACE_CPU0("Reset()");
mRamPointer=mSystem.GetRamPointer();
mA=0;
mX=0;
......@@ -190,7 +168,6 @@ class C65C02
inline bool ContextSave(LSS_FILE *fp)
{
TRACE_CPU0("ContextSave()");
int mPS;
mPS=PS();
if(!lss_printf(fp,"C6502::ContextSave")) return 0;
......@@ -206,7 +183,6 @@ class C65C02
inline bool ContextLoad(LSS_FILE *fp)
{
TRACE_CPU0("ContextLoad()");
int mPS;
char teststr[100]="XXXXXXXXXXXXXXXXXX";
if(!lss_read(teststr,sizeof(char),18,fp)) return 0;
......@@ -247,7 +223,6 @@ class C65C02
if(gSystemIRQ && !mI)
{
TRACE_CPU1("Update() IRQ taken at PC=%04x",mPC);
// IRQ signal clearance is handled by CMikie::Update() as this
// is the only source of interrupts
......@@ -280,7 +255,6 @@ class C65C02
// Fetch opcode
mOpcode=CPU_PEEK(mPC);
TRACE_CPU2("Update() PC=$%04x, Opcode=%02x",mPC,mOpcode);
mPC++;
// Execute Opcode
......
......@@ -45,7 +45,6 @@
#define CART_CPP
//#include <crtdbg.h>
//#define TRACE_CART
#include <stdlib.h>
#include <stdio.h>
......@@ -57,8 +56,7 @@
CCart::CCart(UBYTE *gamedata,ULONG gamesize)
{
int headersize=0
TRACE_CART1("CCart() called with %s",gamefile);
int headersize=0;
LYNX_HEADER header;
mWriteEnableBank0=FALSE;
......@@ -158,7 +156,6 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize)
fprintf(stderr, "Invalid cart (bank0 size).\n");
break;
}
TRACE_CART1("CCart() - Bank0 = $%06x",mMaskBank0);
switch(header.page_size_bank1) {
case 0x000:
......@@ -195,7 +192,6 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize)
fprintf(stderr, "Invalid cart (bank1 size).\n");
break;
}
TRACE_CART1("CCart() - Bank1 = $%06x",mMaskBank1);
// Make some space for the new carts
......@@ -273,7 +269,6 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize)
}
}
}
TRACE_CART1("CCart() - mHeaderLess=%d",mHeaderLess);
}
// Dont allow an empty Bank1 - Use it for shadow SRAM/EEPROM
......@@ -281,7 +276,6 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize)
// Delete the single byte allocated earlier
delete[] mCartBank1;
// Allocate some new memory for us
TRACE_CART0("CCart() - Bank1 being converted to 64K SRAM");
banktype1=C64K;
mMaskBank1=0x00ffff;
mShiftCount1=8;
......@@ -295,7 +289,6 @@ CCart::CCart(UBYTE *gamedata,ULONG gamesize)
CCart::~CCart()
{
TRACE_CART0("~CCart()");
delete[] mCartBank0;
delete[] mCartBank1;
delete[] mCartBank0A;
......@@ -305,7 +298,6 @@ CCart::~CCart()
void CCart::Reset(void)
{
TRACE_CART0("Reset()");
mCounter=0;
mShifter=0;
mAddrData=0;
......@@ -314,7 +306,6 @@ void CCart::Reset(void)
bool CCart::ContextSave(LSS_FILE *fp)
{
TRACE_CART0("ContextSave()");
if(!lss_printf(fp,"CCart::ContextSave")) return 0;
if(!lss_write(&mCounter,sizeof(ULONG),1,fp)) return 0;
if(!lss_write(&mShifter,sizeof(ULONG),1,fp)) return 0;
......@@ -338,7 +329,6 @@ bool CCart::ContextSave(LSS_FILE *fp)
bool CCart::ContextLoad(LSS_FILE *fp)
{
TRACE_CART0("ContextLoad()");
char teststr[100]="XXXXXXXXXXXXXXXXXX";
if(!lss_read(teststr,sizeof(char),18,fp)) return 0;
if(strcmp(teststr,"CCart::ContextSave")!=0) return 0;
......@@ -366,7 +356,6 @@ bool CCart::ContextLoad(LSS_FILE *fp)
bool CCart::ContextLoadLegacy(LSS_FILE *fp)
{
TRACE_CART0("ContextLoadLegacy()");
strcpy(mName,"<** IMAGE **>");
strcpy(mManufacturer,"<** RESTORED **>");
char teststr[100]="XXXXXXXXXXXXXXXXXX";
......@@ -436,12 +425,10 @@ void CCart::CartAddressStrobe(bool strobe)
mShifter&=0xff;
}
last_strobe=mStrobe;
TRACE_CART2("CartAddressStrobe(strobe=%d) mShifter=$%06x",strobe,mShifter);
}
void CCart::CartAddressData(bool data)
{
TRACE_CART1("CartAddressData($%02x)",data);
mAddrData=data;
}
......
......@@ -62,22 +62,6 @@
_a > _b ? _b : _a; })
#endif
#ifdef TRACE_CART
#define TRACE_CART0(msg) _RPT1(_CRT_WARN,"CCart::"msg" (Time=%012d)\n",gSystemCycleCount)
#define TRACE_CART1(msg,arg1) _RPT2(_CRT_WARN,"CCart::"msg" (Time=%012d)\n",arg1,gSystemCycleCount)
#define TRACE_CART2(msg,arg1,arg2) _RPT3(_CRT_WARN,"CCart::"msg" (Time=%012d)\n",arg1,arg2,gSystemCycleCount)
#define TRACE_CART3(msg,arg1,arg2,arg3) _RPT4(_CRT_WARN,"CCart::"msg" (Time=%012d)\n",arg1,arg2,arg3,gSystemCycleCount)
#else
#define TRACE_CART0(msg)
#define TRACE_CART1(msg,arg1)
#define TRACE_CART2(msg,arg1,arg2)
#define TRACE_CART3(msg,arg1,arg2,arg3)
#endif
#define DEFAULT_CART_CONTENTS 0xFF
enum CTYPE {UNUSED,C64K,C128K,C256K,C512K,C1024K};
......
......@@ -44,9 +44,6 @@
#define MEMMAP_CPP
//#include <crtdbg.h>
//#define TRACE_MEMMAP
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......@@ -144,8 +141,6 @@ bool CMemMap::ContextLoad(LSS_FILE *fp)
inline void CMemMap::Poke(ULONG addr, UBYTE data)
{
TRACE_MEMMAP1("Poke() - Data %02x",data);
int newstate,loop;
// FC00-FCFF Susie area
......@@ -207,7 +202,6 @@ inline UBYTE CMemMap::Peek(ULONG addr)
retval+=(mMikieEnabled)?0:0x02;
retval+=(mRomEnabled)?0:0x04;
retval+=(mVectorsEnabled)?0:0x08;
TRACE_MEMMAP1("Peek() - Data %02x",retval);
return retval;
}
......
......@@ -48,22 +48,6 @@
#define MEMMAP_SIZE 0x1
#ifdef TRACE_CART
#define TRACE_MEMMAP0(msg) _RPT1(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",gSystemCycleCount)
#define TRACE_MEMMAP1(msg,arg1) _RPT2(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",arg1,gSystemCycleCount)
#define TRACE_MEMMAP2(msg,arg1,arg2) _RPT3(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",arg1,arg2,gSystemCycleCount)
#define TRACE_MEMMAP3(msg,arg1,arg2,arg3) _RPT4(_CRT_WARN,"CMamMap::"msg" (Time=%012d)\n",arg1,arg2,arg3,gSystemCycleCount)
#else
#define TRACE_MEMMAP0(msg)
#define TRACE_MEMMAP1(msg,arg1)
#define TRACE_MEMMAP2(msg,arg1,arg2)
#define TRACE_MEMMAP3(msg,arg1,arg2,arg3)
#endif
class CMemMap : public CLynxBase
{
// Function members
......
This diff is collapsed.
......@@ -49,25 +49,6 @@
#ifndef MIKIE_H
#define MIKIE_H
//#include <crtdbg.h>
//#define TRACE_MIKIE
#ifdef TRACE_MIKIE
#define TRACE_MIKIE0(msg) _RPT1(_CRT_WARN,"CMikie::"msg" (Time=%012d)\n",gSystemCycleCount)
#define TRACE_MIKIE1(msg,arg1) _RPT2(_CRT_WARN,"CMikie::"msg" (Time=%012d)\n",arg1,gSystemCycleCount)
#define TRACE_MIKIE2(msg,arg1,arg2) _RPT3(_CRT_WARN,"CMikie::"msg" (Time=%012d)\n",arg1,arg2,gSystemCycleCount)
#define TRACE_MIKIE3(msg,arg1,arg2,arg3) _RPT4(_CRT_WARN,"CMikie::"msg" (Time=%012d)\n",arg1,arg2,arg3,gSystemCycleCount)
#else
#define TRACE_MIKIE0(msg)
#define TRACE_MIKIE1(msg,arg1)
#define TRACE_MIKIE2(msg,arg1,arg2)
#define TRACE_MIKIE3(msg,arg1,arg2,arg3)
#endif
class CSystem;
#define MIKIE_START 0xfd00
......
......@@ -45,9 +45,6 @@
#define RAM_CPP
//#include <crtdbg.h>
//#define TRACE_RAM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -44,9 +44,6 @@
#define ROM_CPP
//#include <crtdbg.h>
//#define TRACE_ROM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
This diff is collapsed.
......@@ -45,22 +45,6 @@
#ifndef SUSIE_H
#define SUSIE_H
#ifdef TRACE_SUSIE
#define TRACE_SUSIE0(msg) _RPT1(_CRT_WARN,"CSusie::"msg" (Time=%012d)\n",gSystemCycleCount)
#define TRACE_SUSIE1(msg,arg1) _RPT2(_CRT_WARN,"CSusie::"msg" (Time=%012d)\n",arg1,gSystemCycleCount)
#define TRACE_SUSIE2(msg,arg1,arg2) _RPT3(_CRT_WARN,"CSusie::"msg" (Time=%012d)\n",arg1,arg2,gSystemCycleCount)
#define TRACE_SUSIE3(msg,arg1,arg2,arg3) _RPT4(_CRT_WARN,"CSusie::"msg" (Time=%012d)\n",arg1,arg2,arg3,gSystemCycleCount)
#else
#define TRACE_SUSIE0(msg)
#define TRACE_SUSIE1(msg,arg1)
#define TRACE_SUSIE2(msg,arg1,arg2)
#define TRACE_SUSIE3(msg,arg1,arg2,arg3)
#endif
class CSystem;
#define SUSIE_START 0xfc00
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment