From 0be7035c022d59768247029bcbd0202657a30ad1 Mon Sep 17 00:00:00 2001 From: dborth Date: Tue, 30 Dec 2008 03:32:32 +0000 Subject: [PATCH] comment out debug messages --- source/snes9x/dma.cpp | 2 +- source/snes9x/fxinst.cpp | 4 +-- source/snes9x/memmap.cpp | 51 +++++++++++++++++++------------------- source/snes9x/ppu.cpp | 38 ++++++++++++++-------------- source/snes9x/seta010.cpp | 2 +- source/snes9x/seta018.cpp | 4 +-- source/snes9x/snapshot.cpp | 2 +- 7 files changed, 52 insertions(+), 51 deletions(-) diff --git a/source/snes9x/dma.cpp b/source/snes9x/dma.cpp index 38ea202..bc4d107 100644 --- a/source/snes9x/dma.cpp +++ b/source/snes9x/dma.cpp @@ -199,7 +199,7 @@ static inline bool8 addCyclesInDMA (uint8 dma_channel) { CPU.HDMARanInDMA = 0; #if 1 - printf("HDMA and DMA use the same channel %d!\n", dma_channel); + //printf("HDMA and DMA use the same channel %d!\n", dma_channel); #endif // If HDMA triggers in the middle of DMA transfer and it uses the same channel, // it kills the DMA transfer immediately. $43x2 and $43x5 stop updating. diff --git a/source/snes9x/fxinst.cpp b/source/snes9x/fxinst.cpp index 9f45bcc..e669e9d 100644 --- a/source/snes9x/fxinst.cpp +++ b/source/snes9x/fxinst.cpp @@ -641,13 +641,13 @@ static void fx_rpix_8bit() /* 4o - plot - plot pixel with R1,R2 as x,y and the color register as the color */ static void fx_plot_obj() { - printf ("ERROR fx_plot_obj called\n"); + //printf ("ERROR fx_plot_obj called\n"); } /* 4c(ALT1) - rpix - read color of the pixel with R1,R2 as x,y */ static void fx_rpix_obj() { - printf ("ERROR fx_rpix_obj called\n"); + //printf ("ERROR fx_rpix_obj called\n"); } /* 4d - swap - swap upper and lower byte of a register */ diff --git a/source/snes9x/memmap.cpp b/source/snes9x/memmap.cpp index 069c676..443f8e2 100644 --- a/source/snes9x/memmap.cpp +++ b/source/snes9x/memmap.cpp @@ -1655,9 +1655,9 @@ void CMemory::ParseSNESHeader (uint8 *RomHeader) if (bs) { - if (!(((RomHeader[0x29] & 0x20) && CalculatedSize < 0x100000) || + /*if (!(((RomHeader[0x29] & 0x20) && CalculatedSize < 0x100000) || (!(RomHeader[0x29] & 0x20) && CalculatedSize == 0x100000))) - printf("BS: Size mismatch\n"); + printf("BS: Size mismatch\n");*/ // FIXME int p = 0; @@ -2385,7 +2385,7 @@ void CMemory::Map_Initialize (void) void CMemory::Map_LoROMMap (void) { - printf("Map_LoROMMap\n"); + //printf("Map_LoROMMap\n"); map_System(); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2413,7 +2413,7 @@ void CMemory::Map_LoROMMap (void) void CMemory::Map_NoMAD1LoROMMap (void) { - printf("Map_NoMAD1LoROMMap\n"); + //printf("Map_NoMAD1LoROMMap\n"); map_System(); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2432,7 +2432,7 @@ void CMemory::Map_NoMAD1LoROMMap (void) void CMemory::Map_JumboLoROMMap (void) { // XXX: Which game uses this? - printf("Map_JumboLoROMMap\n"); + //printf("Map_JumboLoROMMap\n"); map_System(); map_lorom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000); @@ -2449,7 +2449,7 @@ void CMemory::Map_JumboLoROMMap (void) void CMemory::Map_ROM24MBSLoROMMap (void) { // PCB: BSC-1A5M-01, BSC-1A7M-10 - printf("Map_ROM24MBSLoROMMap\n"); + //printf("Map_ROM24MBSLoROMMap\n"); map_System(); map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x100000, 0); @@ -2465,7 +2465,7 @@ void CMemory::Map_ROM24MBSLoROMMap (void) void CMemory::Map_SRAM512KLoROMMap (void) { - printf("Map_SRAM512KLoROMMap\n"); + //printf("Map_SRAM512KLoROMMap\n"); map_System(); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2485,7 +2485,7 @@ void CMemory::Map_SRAM512KLoROMMap (void) void CMemory::Map_SufamiTurboLoROMMap (void) { - printf("Map_SufamiTurboLoROMMap\n"); + //printf("Map_SufamiTurboLoROMMap\n"); map_System(); map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x40000, 0); @@ -2515,7 +2515,7 @@ void CMemory::Map_SufamiTurboLoROMMap (void) void CMemory::Map_SufamiTurboPseudoLoROMMap (void) { // for combined images - printf("Map_SufamiTurboPseudoLoROMMap\n"); + //printf("Map_SufamiTurboPseudoLoROMMap\n"); map_System(); map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x40000, 0); @@ -2538,7 +2538,7 @@ void CMemory::Map_SufamiTurboPseudoLoROMMap (void) void CMemory::Map_SuperFXLoROMMap (void) { - printf("Map_SuperFXLoROMMap\n"); + //printf("Map_SuperFXLoROMMap\n"); map_System(); // Replicate the first 2Mb of the ROM at ROM + 2MB such that each 32K @@ -2567,7 +2567,7 @@ void CMemory::Map_SuperFXLoROMMap (void) void CMemory::Map_SetaDSPLoROMMap (void) { - printf("Map_SetaDSPLoROMMap\n"); + //printf("Map_SetaDSPLoROMMap\n"); map_System(); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2585,7 +2585,7 @@ void CMemory::Map_SetaDSPLoROMMap (void) void CMemory::Map_SDD1LoROMMap (void) { - printf("Map_SDD1LoROMMap\n"); + //printf("Map_SDD1LoROMMap\n"); map_System(); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2603,7 +2603,7 @@ void CMemory::Map_SDD1LoROMMap (void) void CMemory::Map_SA1LoROMMap (void) { - printf("Map_SA1LoROMMap\n"); + //printf("Map_SA1LoROMMap\n"); map_System(); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2645,7 +2645,7 @@ void CMemory::Map_SA1LoROMMap (void) void CMemory::Map_HiROMMap (void) { - printf("Map_HiROMMap\n"); + //printf("Map_HiROMMap\n"); map_System(); map_hirom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2664,7 +2664,7 @@ void CMemory::Map_HiROMMap (void) void CMemory::Map_ExtendedHiROMMap (void) { - printf("Map_ExtendedHiROMMap\n"); + //printf("Map_ExtendedHiROMMap\n"); map_System(); map_hirom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000); @@ -2680,7 +2680,7 @@ void CMemory::Map_ExtendedHiROMMap (void) void CMemory::Map_SameGameHiROMMap (void) { - printf("Map_SameGameHiROMMap\n"); + //printf("Map_SameGameHiROMMap\n"); map_System(); map_hirom_offset(0x00, 0x1f, 0x8000, 0xffff, Multi.cartSizeA, Multi.cartOffsetA); @@ -2700,7 +2700,7 @@ void CMemory::Map_SameGameHiROMMap (void) void CMemory::Map_SPC7110HiROMMap (void) { - printf("Map_SPC7110HiROMMap\n"); + //printf("Map_SPC7110HiROMMap\n"); map_System(); map_hirom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); @@ -2954,16 +2954,17 @@ void CMemory::ApplyROMFixes (void) if (match_id("AVCJ")) // Rendering Ranger R2 { IAPU.OneCycle = (int32) (15.7 * (1 << SNES_APU_ACCURACY)); - printf("APU OneCycle hack: %d\n", IAPU.OneCycle); + //printf("APU OneCycle hack: %d\n", IAPU.OneCycle); } // XXX: All Quintet games? if (match_na("GAIA GENSOUKI 1 JPN") || // Gaia Gensouki + match_na("SOULBLAZER 1 GRM") || // Soulblazer (E) match_id("JG ") || // Illusion of Gaia match_id("CQ ")) // Stunt Race FX { IAPU.OneCycle = (int32) (13.0 * (1 << SNES_APU_ACCURACY)); - printf("APU OneCycle hack: %d\n", IAPU.OneCycle); + //printf("APU OneCycle hack: %d\n", IAPU.OneCycle); } if (match_na("SOULBLADER - 1") || // Soul Blader @@ -2999,7 +3000,7 @@ void CMemory::ApplyROMFixes (void) match_nn("SANKYO Fever! \xCC\xA8\xB0\xCA\xDE\xB0!")) // SANKYO Fever! Fever! { IAPU.OneCycle = (int32) (15.0 * (1 << SNES_APU_ACCURACY)); - printf("APU OneCycle hack: %d\n", IAPU.OneCycle); + //printf("APU OneCycle hack: %d\n", IAPU.OneCycle); } //// DMA/HDMA timing hacks :( @@ -3016,7 +3017,7 @@ void CMemory::ApplyROMFixes (void) { Timings.HDMAStart -= 10; Timings.HBlankStart -= 10; - printf("HDMA timing hack: %d\n", Timings.HDMAStart); + //printf("HDMA timing hack: %d\n", Timings.HDMAStart); } // The delay to sync CPU and DMA which Snes9x cannot emulate. @@ -3024,7 +3025,7 @@ void CMemory::ApplyROMFixes (void) if (match_na("BATTLE GRANDPRIX")) // Battle Grandprix { Timings.DMACPUSync = 20; - printf("DMA sync: %d\n", Timings.DMACPUSync); + //printf("DMA sync: %d\n", Timings.DMACPUSync); } //// CPU speed-ups (CPU_Shutdown()) @@ -3045,8 +3046,8 @@ void CMemory::ApplyROMFixes (void) match_nn("NHL") || match_nc("MADDEN")) { - if (Settings.Shutdown) - printf("Disabled CPU shutdown hack.\n"); + //if (Settings.Shutdown) + // printf("Disabled CPU shutdown hack.\n"); Settings.Shutdown = FALSE; } @@ -3297,7 +3298,7 @@ void CMemory::ApplyROMFixes (void) if (match_nn("UNIRACERS")) // Uniracers { SNESGameFixes.Uniracers = TRUE; - printf("Applied Uniracers hack.\n"); + //printf("Applied Uniracers hack.\n"); } /* diff --git a/source/snes9x/ppu.cpp b/source/snes9x/ppu.cpp index 9cf5f61..edb9927 100644 --- a/source/snes9x/ppu.cpp +++ b/source/snes9x/ppu.cpp @@ -2930,7 +2930,7 @@ void S9xSuperFXExec () memcpy(avReg,SuperFX.pvRegisters,0x40); /* Print the pipe string */ - printf(tmp); + //printf(tmp); /* Execute the instruction in the pipe */ vPipe = FxPipe(); @@ -2944,14 +2944,14 @@ void S9xSuperFXExec () uint32 r2 = (uint32)(SuperFX.pvRegisters[i*2]) | (((uint32)SuperFX.pvRegisters[(i*2)+1])<<8); if(i==15) a = OPCODE_BYTES(vPipe); - if(((r1+a)&0xffff) != r2) - printf(" r%d=$%04x",i,r2); + //if(((r1+a)&0xffff) != r2) + // printf(" r%d=$%04x",i,r2); } { /* Check SFR */ uint32 r1 = ((uint32)avReg[0x30]) | (((uint32)avReg[0x31])<<8); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x30]) | (((uint32)SuperFX.pvRegisters[0x31])<<8); - if((r1&(1<<1)) != (r2&(1<<1))) + /*if((r1&(1<<1)) != (r2&(1<<1))) printf(" Z=%d",(uint32)(!!(r2&(1<<1)))); if((r1&(1<<2)) != (r2&(1<<2))) printf(" CY=%d",(uint32)(!!(r2&(1<<2)))); @@ -2974,47 +2974,47 @@ void S9xSuperFXExec () if((r1&(1<<12)) != (r2&(1<<12))) printf(" B=%d",(uint32)(!!(r2&(1<<12)))); if((r1&(1<<15)) != (r2&(1<<15))) - printf(" IRQ=%d",(uint32)(!!(r2&(1<<15)))); + printf(" IRQ=%d",(uint32)(!!(r2&(1<<15))));*/ } { /* Check PBR */ uint32 r1 = ((uint32)avReg[0x34]); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x34]); - if(r1 != r2) - printf(" PBR=$%02x",r2); + //if(r1 != r2) + // printf(" PBR=$%02x",r2); } { /* Check ROMBR */ uint32 r1 = ((uint32)avReg[0x36]); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x36]); - if(r1 != r2) - printf(" ROMBR=$%02x",r2); + //if(r1 != r2) + // printf(" ROMBR=$%02x",r2); } { /* Check RAMBR */ uint32 r1 = ((uint32)avReg[0x3c]); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x3c]); - if(r1 != r2) - printf(" RAMBR=$%02x",r2); + //if(r1 != r2) + // printf(" RAMBR=$%02x",r2); } { /* Check CBR */ uint32 r1 = ((uint32)avReg[0x3e]) | (((uint32)avReg[0x3f])<<8); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x3e]) | (((uint32)SuperFX.pvRegisters[0x3f])<<8); - if(r1 != r2) - printf(" CBR=$%04x",r2); + //if(r1 != r2) + // printf(" CBR=$%04x",r2); } { /* Check COLR */ - if(vColr != FxGetColorRegister()) - printf(" COLR=$%02x",FxGetColorRegister()); + //if(vColr != FxGetColorRegister()) + // printf(" COLR=$%02x",FxGetColorRegister()); } { /* Check POR */ - if(vPor != FxGetPlotOptionRegister()) - printf(" POR=$%02x",FxGetPlotOptionRegister()); + //if(vPor != FxGetPlotOptionRegister()) + // printf(" POR=$%02x",FxGetPlotOptionRegister()); } - printf ("\n"); + //printf ("\n"); } S9xExit (); } @@ -3024,7 +3024,7 @@ void S9xSuperFXExec () (Memory.FillRAM [0x301f] << 8) + (Memory.FillRAM [0x301e] << 0); -printf ("%06x: %d\n", t, FxEmulate (2000000)); +//printf ("%06x: %d\n", t, FxEmulate (2000000)); // FxEmulate (2000000); } #if 0 diff --git a/source/snes9x/seta010.cpp b/source/snes9x/seta010.cpp index e0a84f1..e28225a 100644 --- a/source/snes9x/seta010.cpp +++ b/source/snes9x/seta010.cpp @@ -812,7 +812,7 @@ void S9xSetST010(uint32 Address, uint8 Byte) } default: - printf("Unknown Op\n"); + //printf("Unknown Op\n"); break; } diff --git a/source/snes9x/seta018.cpp b/source/snes9x/seta018.cpp index 6ce9e9e..8dc6bff 100644 --- a/source/snes9x/seta018.cpp +++ b/source/snes9x/seta018.cpp @@ -193,7 +193,7 @@ uint8 S9xGetST018(uint32 Address) else if (address == 0x3800) t = ST018.status; - printf( "ST018 R: %06X %02X\n", Address, t); + //printf( "ST018 R: %06X %02X\n", Address, t); return t; } @@ -203,7 +203,7 @@ void S9xSetST018(uint8 Byte, uint32 Address) uint16 address = (uint16) Address&0xFFFF; static bool reset = false; - printf( "ST018 W: %06X %02X\n", Address, Byte ); + //printf( "ST018 W: %06X %02X\n", Address, Byte ); line++; diff --git a/source/snes9x/snapshot.cpp b/source/snes9x/snapshot.cpp index 3c735ff..b3522d1 100644 --- a/source/snes9x/snapshot.cpp +++ b/source/snes9x/snapshot.cpp @@ -1583,7 +1583,7 @@ int S9xUnfreezeFromStream (STREAM stream) if (APU.OldCycles != -99999999) { // Must be <= v1.5 savestate - printf("Older APU Cycles found.\n"); + //printf("Older APU Cycles found.\n"); APU.Cycles = (APU.OldCycles << SNES_APU_ACCURACY); APU.OldCycles = -99999999; }