diff --git a/Core/BaseCartridge.cpp b/Core/BaseCartridge.cpp index 95a07df..704b03e 100644 --- a/Core/BaseCartridge.cpp +++ b/Core/BaseCartridge.cpp @@ -532,7 +532,6 @@ void BaseCartridge::InitCoprocessor() _sgb = dynamic_cast(_coprocessor.get()); _needCoprocSync = true; } else if (hle) { - printf("USE HLE DSP1\n"); _coprocessor.reset(NecDspHle::InitCoprocessor(_coprocessorType, _console)); } } diff --git a/Core/NecDspHle.cpp b/Core/NecDspHle.cpp index 543a342..8561db7 100644 --- a/Core/NecDspHle.cpp +++ b/Core/NecDspHle.cpp @@ -73,10 +73,8 @@ NecDspHle* NecDspHle::InitCoprocessor(CoprocessorType type, Console *console) void NecDspHle::Reset() { - if (_type == CoprocessorType::DSP1 || _type == CoprocessorType::DSP1B) { - //printf("[DSP] Reset\n"); + if (_type == CoprocessorType::DSP1 || _type == CoprocessorType::DSP1B) _dsp1.reset(); - } } void NecDspHle::Run() @@ -95,12 +93,10 @@ uint8_t NecDspHle::Read(uint32_t addr) { if (_type == CoprocessorType::DSP1 || _type == CoprocessorType::DSP1B) { uint8_t r; - if(addr & _registerMask) { + if(addr & _registerMask) r = _dsp1.getSr(); - } else { + else r = _dsp1.getDr(); - } - //printf("[DSP] Read (%x) => %d\n", addr, r); return r; } return 0; @@ -109,18 +105,15 @@ uint8_t NecDspHle::Read(uint32_t addr) void NecDspHle::Write(uint32_t addr, uint8_t value) { if (_type == CoprocessorType::DSP1 || _type == CoprocessorType::DSP1B) { - if(addr & _registerMask) { + if(addr & _registerMask) return; - } else { - //printf("[DSP] Write (%x) <= %d\n", addr, value); - return _dsp1.setDr(value); - } + _dsp1.setDr(value); } } uint8_t NecDspHle::Peek(uint32_t addr) { - //Avoid side effects for now + /* Avoid side effects for now */ return 0; } diff --git a/SevenZip/7zAlloc.c b/SevenZip/7zAlloc.c index 3e848c9..e82a9c5 100644 --- a/SevenZip/7zAlloc.c +++ b/SevenZip/7zAlloc.c @@ -5,43 +5,17 @@ #include "7zAlloc.h" -/* #define _SZ_ALLOC_DEBUG */ -/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ - -#ifdef _SZ_ALLOC_DEBUG - -#ifdef _WIN32 -#include -#endif - -#include -int g_allocCount = 0; -int g_allocCountTemp = 0; - -#endif - void *SzAlloc(void *p, size_t size) { UNUSED_VAR(p); if (size == 0) return 0; - #ifdef _SZ_ALLOC_DEBUG - fprintf(stderr, "\nAlloc %10u bytes; count = %10d", (unsigned)size, g_allocCount); - g_allocCount++; - #endif return malloc(size); } void SzFree(void *p, void *address) { UNUSED_VAR(p); - #ifdef _SZ_ALLOC_DEBUG - if (address != 0) - { - g_allocCount--; - fprintf(stderr, "\nFree; count = %10d", g_allocCount); - } - #endif free(address); } @@ -50,29 +24,11 @@ void *SzAllocTemp(void *p, size_t size) UNUSED_VAR(p); if (size == 0) return 0; - #ifdef _SZ_ALLOC_DEBUG - fprintf(stderr, "\nAlloc_temp %10u bytes; count = %10d", (unsigned)size, g_allocCountTemp); - g_allocCountTemp++; - #ifdef _WIN32 - return HeapAlloc(GetProcessHeap(), 0, size); - #endif - #endif return malloc(size); } void SzFreeTemp(void *p, void *address) { UNUSED_VAR(p); - #ifdef _SZ_ALLOC_DEBUG - if (address != 0) - { - g_allocCountTemp--; - fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp); - } - #ifdef _WIN32 - HeapFree(GetProcessHeap(), 0, address); - return; - #endif - #endif free(address); } diff --git a/SevenZip/Lzma2Dec.c b/SevenZip/Lzma2Dec.c index b84f88a..82f5b7c 100644 --- a/SevenZip/Lzma2Dec.c +++ b/SevenZip/Lzma2Dec.c @@ -1,14 +1,8 @@ /* Lzma2Dec.c -- LZMA2 Decoder 2015-11-09 : Igor Pavlov : Public domain */ -/* #define SHOW_DEBUG_INFO */ - #include "Precomp.h" -#ifdef SHOW_DEBUG_INFO -#include -#endif - #include #include "Lzma2Dec.h" @@ -40,12 +34,6 @@ #define LZMA2_LCLP_MAX 4 #define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) -#ifdef SHOW_DEBUG_INFO -#define PRF(x) x -#else -#define PRF(x) -#endif - typedef enum { LZMA2_STATE_CONTROL, @@ -103,8 +91,6 @@ static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) { case LZMA2_STATE_CONTROL: p->control = b; - PRF(printf("\n %4X ", (unsigned)p->decoder.dicPos)); - PRF(printf(" %2X", (unsigned)b)); if (p->control == 0) return LZMA2_STATE_FINISHED; if (LZMA2_IS_UNCOMPRESSED_STATE(p)) @@ -124,7 +110,6 @@ static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) case LZMA2_STATE_UNPACK1: p->unpackSize |= (UInt32)b; p->unpackSize++; - PRF(printf(" %8u", (unsigned)p->unpackSize)); return (LZMA2_IS_UNCOMPRESSED_STATE(p)) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0; case LZMA2_STATE_PACK0: @@ -134,7 +119,6 @@ static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) case LZMA2_STATE_PACK1: p->packSize |= (UInt32)b; p->packSize++; - PRF(printf(" %8u", (unsigned)p->packSize)); return LZMA2_IS_THERE_PROP(LZMA2_GET_LZMA_MODE(p)) ? LZMA2_STATE_PROP: (p->needInitProp ? LZMA2_STATE_ERROR : LZMA2_STATE_DATA); diff --git a/Utilities/snes_ntsc_impl.h b/Utilities/snes_ntsc_impl.h index 1d7adc7..bca6776 100644 --- a/Utilities/snes_ntsc_impl.h +++ b/Utilities/snes_ntsc_impl.h @@ -159,15 +159,6 @@ static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup ) } } - /* - printf( "luma:\n" ); - for ( i = kernel_size; i < kernel_size * 2; i++ ) - printf( "%f\n", kernels [i] ); - printf( "chroma:\n" ); - for ( i = 0; i < kernel_size; i++ ) - printf( "%f\n", kernels [i] ); - */ - /* generate linear rescale kernels */ #if rescale_out > 1 {