comment out debug messages

This commit is contained in:
dborth 2008-12-30 03:32:32 +00:00
parent 0775cc95b2
commit 0be7035c02
7 changed files with 52 additions and 51 deletions

View File

@ -199,7 +199,7 @@ static inline bool8 addCyclesInDMA (uint8 dma_channel)
{ {
CPU.HDMARanInDMA = 0; CPU.HDMARanInDMA = 0;
#if 1 #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 #endif
// If HDMA triggers in the middle of DMA transfer and it uses the same channel, // 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. // it kills the DMA transfer immediately. $43x2 and $43x5 stop updating.

View File

@ -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 */ /* 4o - plot - plot pixel with R1,R2 as x,y and the color register as the color */
static void fx_plot_obj() 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 */ /* 4c(ALT1) - rpix - read color of the pixel with R1,R2 as x,y */
static void fx_rpix_obj() 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 */ /* 4d - swap - swap upper and lower byte of a register */

View File

@ -1655,9 +1655,9 @@ void CMemory::ParseSNESHeader (uint8 *RomHeader)
if (bs) if (bs)
{ {
if (!(((RomHeader[0x29] & 0x20) && CalculatedSize < 0x100000) || /*if (!(((RomHeader[0x29] & 0x20) && CalculatedSize < 0x100000) ||
(!(RomHeader[0x29] & 0x20) && CalculatedSize == 0x100000))) (!(RomHeader[0x29] & 0x20) && CalculatedSize == 0x100000)))
printf("BS: Size mismatch\n"); printf("BS: Size mismatch\n");*/
// FIXME // FIXME
int p = 0; int p = 0;
@ -2385,7 +2385,7 @@ void CMemory::Map_Initialize (void)
void CMemory::Map_LoROMMap (void) void CMemory::Map_LoROMMap (void)
{ {
printf("Map_LoROMMap\n"); //printf("Map_LoROMMap\n");
map_System(); map_System();
map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2413,7 +2413,7 @@ void CMemory::Map_LoROMMap (void)
void CMemory::Map_NoMAD1LoROMMap (void) void CMemory::Map_NoMAD1LoROMMap (void)
{ {
printf("Map_NoMAD1LoROMMap\n"); //printf("Map_NoMAD1LoROMMap\n");
map_System(); map_System();
map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2432,7 +2432,7 @@ void CMemory::Map_NoMAD1LoROMMap (void)
void CMemory::Map_JumboLoROMMap (void) void CMemory::Map_JumboLoROMMap (void)
{ {
// XXX: Which game uses this? // XXX: Which game uses this?
printf("Map_JumboLoROMMap\n"); //printf("Map_JumboLoROMMap\n");
map_System(); map_System();
map_lorom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000); map_lorom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000);
@ -2449,7 +2449,7 @@ void CMemory::Map_JumboLoROMMap (void)
void CMemory::Map_ROM24MBSLoROMMap (void) void CMemory::Map_ROM24MBSLoROMMap (void)
{ {
// PCB: BSC-1A5M-01, BSC-1A7M-10 // PCB: BSC-1A5M-01, BSC-1A7M-10
printf("Map_ROM24MBSLoROMMap\n"); //printf("Map_ROM24MBSLoROMMap\n");
map_System(); map_System();
map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x100000, 0); map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x100000, 0);
@ -2465,7 +2465,7 @@ void CMemory::Map_ROM24MBSLoROMMap (void)
void CMemory::Map_SRAM512KLoROMMap (void) void CMemory::Map_SRAM512KLoROMMap (void)
{ {
printf("Map_SRAM512KLoROMMap\n"); //printf("Map_SRAM512KLoROMMap\n");
map_System(); map_System();
map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2485,7 +2485,7 @@ void CMemory::Map_SRAM512KLoROMMap (void)
void CMemory::Map_SufamiTurboLoROMMap (void) void CMemory::Map_SufamiTurboLoROMMap (void)
{ {
printf("Map_SufamiTurboLoROMMap\n"); //printf("Map_SufamiTurboLoROMMap\n");
map_System(); map_System();
map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x40000, 0); map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x40000, 0);
@ -2515,7 +2515,7 @@ void CMemory::Map_SufamiTurboLoROMMap (void)
void CMemory::Map_SufamiTurboPseudoLoROMMap (void) void CMemory::Map_SufamiTurboPseudoLoROMMap (void)
{ {
// for combined images // for combined images
printf("Map_SufamiTurboPseudoLoROMMap\n"); //printf("Map_SufamiTurboPseudoLoROMMap\n");
map_System(); map_System();
map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x40000, 0); map_lorom_offset(0x00, 0x1f, 0x8000, 0xffff, 0x40000, 0);
@ -2538,7 +2538,7 @@ void CMemory::Map_SufamiTurboPseudoLoROMMap (void)
void CMemory::Map_SuperFXLoROMMap (void) void CMemory::Map_SuperFXLoROMMap (void)
{ {
printf("Map_SuperFXLoROMMap\n"); //printf("Map_SuperFXLoROMMap\n");
map_System(); map_System();
// Replicate the first 2Mb of the ROM at ROM + 2MB such that each 32K // 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) void CMemory::Map_SetaDSPLoROMMap (void)
{ {
printf("Map_SetaDSPLoROMMap\n"); //printf("Map_SetaDSPLoROMMap\n");
map_System(); map_System();
map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2585,7 +2585,7 @@ void CMemory::Map_SetaDSPLoROMMap (void)
void CMemory::Map_SDD1LoROMMap (void) void CMemory::Map_SDD1LoROMMap (void)
{ {
printf("Map_SDD1LoROMMap\n"); //printf("Map_SDD1LoROMMap\n");
map_System(); map_System();
map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2603,7 +2603,7 @@ void CMemory::Map_SDD1LoROMMap (void)
void CMemory::Map_SA1LoROMMap (void) void CMemory::Map_SA1LoROMMap (void)
{ {
printf("Map_SA1LoROMMap\n"); //printf("Map_SA1LoROMMap\n");
map_System(); map_System();
map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_lorom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2645,7 +2645,7 @@ void CMemory::Map_SA1LoROMMap (void)
void CMemory::Map_HiROMMap (void) void CMemory::Map_HiROMMap (void)
{ {
printf("Map_HiROMMap\n"); //printf("Map_HiROMMap\n");
map_System(); map_System();
map_hirom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_hirom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2664,7 +2664,7 @@ void CMemory::Map_HiROMMap (void)
void CMemory::Map_ExtendedHiROMMap (void) void CMemory::Map_ExtendedHiROMMap (void)
{ {
printf("Map_ExtendedHiROMMap\n"); //printf("Map_ExtendedHiROMMap\n");
map_System(); map_System();
map_hirom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000); map_hirom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000);
@ -2680,7 +2680,7 @@ void CMemory::Map_ExtendedHiROMMap (void)
void CMemory::Map_SameGameHiROMMap (void) void CMemory::Map_SameGameHiROMMap (void)
{ {
printf("Map_SameGameHiROMMap\n"); //printf("Map_SameGameHiROMMap\n");
map_System(); map_System();
map_hirom_offset(0x00, 0x1f, 0x8000, 0xffff, Multi.cartSizeA, Multi.cartOffsetA); 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) void CMemory::Map_SPC7110HiROMMap (void)
{ {
printf("Map_SPC7110HiROMMap\n"); //printf("Map_SPC7110HiROMMap\n");
map_System(); map_System();
map_hirom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize); map_hirom(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize);
@ -2954,16 +2954,17 @@ void CMemory::ApplyROMFixes (void)
if (match_id("AVCJ")) // Rendering Ranger R2 if (match_id("AVCJ")) // Rendering Ranger R2
{ {
IAPU.OneCycle = (int32) (15.7 * (1 << SNES_APU_ACCURACY)); 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? // XXX: All Quintet games?
if (match_na("GAIA GENSOUKI 1 JPN") || // Gaia Gensouki if (match_na("GAIA GENSOUKI 1 JPN") || // Gaia Gensouki
match_na("SOULBLAZER 1 GRM") || // Soulblazer (E)
match_id("JG ") || // Illusion of Gaia match_id("JG ") || // Illusion of Gaia
match_id("CQ ")) // Stunt Race FX match_id("CQ ")) // Stunt Race FX
{ {
IAPU.OneCycle = (int32) (13.0 * (1 << SNES_APU_ACCURACY)); 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 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! match_nn("SANKYO Fever! \xCC\xA8\xB0\xCA\xDE\xB0!")) // SANKYO Fever! Fever!
{ {
IAPU.OneCycle = (int32) (15.0 * (1 << SNES_APU_ACCURACY)); 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 :( //// DMA/HDMA timing hacks :(
@ -3016,7 +3017,7 @@ void CMemory::ApplyROMFixes (void)
{ {
Timings.HDMAStart -= 10; Timings.HDMAStart -= 10;
Timings.HBlankStart -= 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. // 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 if (match_na("BATTLE GRANDPRIX")) // Battle Grandprix
{ {
Timings.DMACPUSync = 20; Timings.DMACPUSync = 20;
printf("DMA sync: %d\n", Timings.DMACPUSync); //printf("DMA sync: %d\n", Timings.DMACPUSync);
} }
//// CPU speed-ups (CPU_Shutdown()) //// CPU speed-ups (CPU_Shutdown())
@ -3045,8 +3046,8 @@ void CMemory::ApplyROMFixes (void)
match_nn("NHL") || match_nn("NHL") ||
match_nc("MADDEN")) match_nc("MADDEN"))
{ {
if (Settings.Shutdown) //if (Settings.Shutdown)
printf("Disabled CPU shutdown hack.\n"); // printf("Disabled CPU shutdown hack.\n");
Settings.Shutdown = FALSE; Settings.Shutdown = FALSE;
} }
@ -3297,7 +3298,7 @@ void CMemory::ApplyROMFixes (void)
if (match_nn("UNIRACERS")) // Uniracers if (match_nn("UNIRACERS")) // Uniracers
{ {
SNESGameFixes.Uniracers = TRUE; SNESGameFixes.Uniracers = TRUE;
printf("Applied Uniracers hack.\n"); //printf("Applied Uniracers hack.\n");
} }
/* /*

View File

@ -2930,7 +2930,7 @@ void S9xSuperFXExec ()
memcpy(avReg,SuperFX.pvRegisters,0x40); memcpy(avReg,SuperFX.pvRegisters,0x40);
/* Print the pipe string */ /* Print the pipe string */
printf(tmp); //printf(tmp);
/* Execute the instruction in the pipe */ /* Execute the instruction in the pipe */
vPipe = FxPipe(); vPipe = FxPipe();
@ -2944,14 +2944,14 @@ void S9xSuperFXExec ()
uint32 r2 = (uint32)(SuperFX.pvRegisters[i*2]) | (((uint32)SuperFX.pvRegisters[(i*2)+1])<<8); uint32 r2 = (uint32)(SuperFX.pvRegisters[i*2]) | (((uint32)SuperFX.pvRegisters[(i*2)+1])<<8);
if(i==15) if(i==15)
a = OPCODE_BYTES(vPipe); a = OPCODE_BYTES(vPipe);
if(((r1+a)&0xffff) != r2) //if(((r1+a)&0xffff) != r2)
printf(" r%d=$%04x",i,r2); // printf(" r%d=$%04x",i,r2);
} }
{ {
/* Check SFR */ /* Check SFR */
uint32 r1 = ((uint32)avReg[0x30]) | (((uint32)avReg[0x31])<<8); uint32 r1 = ((uint32)avReg[0x30]) | (((uint32)avReg[0x31])<<8);
uint32 r2 = (uint32)(SuperFX.pvRegisters[0x30]) | (((uint32)SuperFX.pvRegisters[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)))); printf(" Z=%d",(uint32)(!!(r2&(1<<1))));
if((r1&(1<<2)) != (r2&(1<<2))) if((r1&(1<<2)) != (r2&(1<<2)))
printf(" CY=%d",(uint32)(!!(r2&(1<<2)))); printf(" CY=%d",(uint32)(!!(r2&(1<<2))));
@ -2974,47 +2974,47 @@ void S9xSuperFXExec ()
if((r1&(1<<12)) != (r2&(1<<12))) if((r1&(1<<12)) != (r2&(1<<12)))
printf(" B=%d",(uint32)(!!(r2&(1<<12)))); printf(" B=%d",(uint32)(!!(r2&(1<<12))));
if((r1&(1<<15)) != (r2&(1<<15))) if((r1&(1<<15)) != (r2&(1<<15)))
printf(" IRQ=%d",(uint32)(!!(r2&(1<<15)))); printf(" IRQ=%d",(uint32)(!!(r2&(1<<15))));*/
} }
{ {
/* Check PBR */ /* Check PBR */
uint32 r1 = ((uint32)avReg[0x34]); uint32 r1 = ((uint32)avReg[0x34]);
uint32 r2 = (uint32)(SuperFX.pvRegisters[0x34]); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x34]);
if(r1 != r2) //if(r1 != r2)
printf(" PBR=$%02x",r2); // printf(" PBR=$%02x",r2);
} }
{ {
/* Check ROMBR */ /* Check ROMBR */
uint32 r1 = ((uint32)avReg[0x36]); uint32 r1 = ((uint32)avReg[0x36]);
uint32 r2 = (uint32)(SuperFX.pvRegisters[0x36]); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x36]);
if(r1 != r2) //if(r1 != r2)
printf(" ROMBR=$%02x",r2); // printf(" ROMBR=$%02x",r2);
} }
{ {
/* Check RAMBR */ /* Check RAMBR */
uint32 r1 = ((uint32)avReg[0x3c]); uint32 r1 = ((uint32)avReg[0x3c]);
uint32 r2 = (uint32)(SuperFX.pvRegisters[0x3c]); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x3c]);
if(r1 != r2) //if(r1 != r2)
printf(" RAMBR=$%02x",r2); // printf(" RAMBR=$%02x",r2);
} }
{ {
/* Check CBR */ /* Check CBR */
uint32 r1 = ((uint32)avReg[0x3e]) | (((uint32)avReg[0x3f])<<8); uint32 r1 = ((uint32)avReg[0x3e]) | (((uint32)avReg[0x3f])<<8);
uint32 r2 = (uint32)(SuperFX.pvRegisters[0x3e]) | (((uint32)SuperFX.pvRegisters[0x3f])<<8); uint32 r2 = (uint32)(SuperFX.pvRegisters[0x3e]) | (((uint32)SuperFX.pvRegisters[0x3f])<<8);
if(r1 != r2) //if(r1 != r2)
printf(" CBR=$%04x",r2); // printf(" CBR=$%04x",r2);
} }
{ {
/* Check COLR */ /* Check COLR */
if(vColr != FxGetColorRegister()) //if(vColr != FxGetColorRegister())
printf(" COLR=$%02x",FxGetColorRegister()); // printf(" COLR=$%02x",FxGetColorRegister());
} }
{ {
/* Check POR */ /* Check POR */
if(vPor != FxGetPlotOptionRegister()) //if(vPor != FxGetPlotOptionRegister())
printf(" POR=$%02x",FxGetPlotOptionRegister()); // printf(" POR=$%02x",FxGetPlotOptionRegister());
} }
printf ("\n"); //printf ("\n");
} }
S9xExit (); S9xExit ();
} }
@ -3024,7 +3024,7 @@ void S9xSuperFXExec ()
(Memory.FillRAM [0x301f] << 8) + (Memory.FillRAM [0x301f] << 8) +
(Memory.FillRAM [0x301e] << 0); (Memory.FillRAM [0x301e] << 0);
printf ("%06x: %d\n", t, FxEmulate (2000000)); //printf ("%06x: %d\n", t, FxEmulate (2000000));
// FxEmulate (2000000); // FxEmulate (2000000);
} }
#if 0 #if 0

View File

@ -812,7 +812,7 @@ void S9xSetST010(uint32 Address, uint8 Byte)
} }
default: default:
printf("Unknown Op\n"); //printf("Unknown Op\n");
break; break;
} }

View File

@ -193,7 +193,7 @@ uint8 S9xGetST018(uint32 Address)
else if (address == 0x3800) else if (address == 0x3800)
t = ST018.status; t = ST018.status;
printf( "ST018 R: %06X %02X\n", Address, t); //printf( "ST018 R: %06X %02X\n", Address, t);
return t; return t;
} }
@ -203,7 +203,7 @@ void S9xSetST018(uint8 Byte, uint32 Address)
uint16 address = (uint16) Address&0xFFFF; uint16 address = (uint16) Address&0xFFFF;
static bool reset = false; static bool reset = false;
printf( "ST018 W: %06X %02X\n", Address, Byte ); //printf( "ST018 W: %06X %02X\n", Address, Byte );
line++; line++;

View File

@ -1583,7 +1583,7 @@ int S9xUnfreezeFromStream (STREAM stream)
if (APU.OldCycles != -99999999) if (APU.OldCycles != -99999999)
{ {
// Must be <= v1.5 savestate // 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.Cycles = (APU.OldCycles << SNES_APU_ACCURACY);
APU.OldCycles = -99999999; APU.OldCycles = -99999999;
} }