mirror of https://github.com/PCSX2/pcsx2.git
Got rid of that old 'params' mess on console logs. Not needed anymore since wxwidgets has nicer built in formatting options (never liked it anyway)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1782 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
2c210e3b4e
commit
3b10771c36
|
@ -58,52 +58,31 @@ namespace Console
|
|||
// Writes a newline to the console.
|
||||
extern bool Newline();
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// No newline is appended.
|
||||
extern bool __fastcall Write( const char* text );
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// A newline is automatically appended, and the console color reset to default
|
||||
// after the log is written.
|
||||
extern bool __fastcall Write( Colors color, const char* text );
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// A newline is automatically appended.
|
||||
extern bool __fastcall WriteLn( const char* text );
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// A newline is automatically appended, and the console color reset to default
|
||||
// after the log is written.
|
||||
extern bool __fastcall WriteLn( Colors color, const char* text );
|
||||
|
||||
// Writes a line of colored text to the console, with automatic newline appendage.
|
||||
// The console color is reset to default when the operation is complete.
|
||||
extern bool WriteLn( Colors color, const char* fmt, VARG_PARAM dummy, ... );
|
||||
extern bool WriteLn( Colors color, const char* fmt, ... );
|
||||
|
||||
// Writes a formatted message to the console, with appended newline.
|
||||
extern bool WriteLn( const char* fmt, VARG_PARAM dummy, ... );
|
||||
extern bool WriteLn( const char* fmt, ... );
|
||||
|
||||
// Writes a line of colored text to the console (no newline).
|
||||
// The console color is reset to default when the operation is complete.
|
||||
extern bool Write( Colors color, const char* fmt, VARG_PARAM dummy, ... );
|
||||
extern bool Write( Colors color, const char* fmt, ... );
|
||||
|
||||
// Writes a formatted message to the console (no newline)
|
||||
extern bool Write( const char* fmt, VARG_PARAM dummy, ... );
|
||||
extern bool Write( const char* fmt, ... );
|
||||
|
||||
// Displays a message in the console with red emphasis.
|
||||
// Newline is automatically appended.
|
||||
extern bool Error( const char* fmt, VARG_PARAM dummy, ... );
|
||||
extern bool __fastcall Error( const char* text );
|
||||
extern bool Error( const char* fmt, ... );
|
||||
|
||||
// Displays a message in the console with yellow emphasis.
|
||||
// Newline is automatically appended.
|
||||
extern bool Notice( const char* fmt, VARG_PARAM dummy, ... );
|
||||
extern bool __fastcall Notice( const char* text );
|
||||
extern bool Notice( const char* fmt, ... );
|
||||
|
||||
// Displays a message in the console with yellow emphasis.
|
||||
// Newline is automatically appended.
|
||||
extern bool Status( const char* fmt, VARG_PARAM dummy, ... );
|
||||
extern bool __fastcall Status( const char* text );
|
||||
extern bool Status( const char* fmt, ... );
|
||||
|
||||
|
||||
extern bool __fastcall Write( const wxString& text );
|
||||
|
|
|
@ -44,38 +44,6 @@ extern bool TryParse( wxSize& dest, const wxString& src, const wxSize& defval=wx
|
|||
extern bool TryParse( wxRect& dest, const wxString& src, const wxRect& defval=wxDefaultRect, const wxString& separators=L",");
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// dummy structure used to type-guard the dummy parameter that's been inserted to
|
||||
// allow us to use the va_list feature on references.
|
||||
struct _VARG_PARAM
|
||||
{
|
||||
// just some value to make the struct length 32bits instead of 8 bits, so that the
|
||||
// compiler generates somewhat more efficient code.
|
||||
uint someval;
|
||||
};
|
||||
|
||||
#ifdef PCSX2_DEBUG
|
||||
|
||||
#define params va_arg_dummy,
|
||||
#define varg_assert() // jASSUME( dummy == &va_arg_dummy );
|
||||
// typedef the Va-Arg value to be a value type in debug builds. The value
|
||||
// type requires a little more overhead in terms of code generation, but is always
|
||||
// type-safe. The compiler will generate errors for any forgotten params value.
|
||||
typedef _VARG_PARAM VARG_PARAM;
|
||||
|
||||
#else
|
||||
|
||||
#define params NULL, // using null is faster / more compact!
|
||||
#define varg_assert() jASSUME( dummy == NULL );
|
||||
// typedef the Va-Arg value to be a pointer in release builds. Pointers
|
||||
// generate more compact code by a small margin, but aren't entirely type safe since
|
||||
// the compiler won't generate errors if you pass NULL or other values.
|
||||
typedef _VARG_PARAM const * VARG_PARAM;
|
||||
|
||||
#endif
|
||||
|
||||
extern const _VARG_PARAM va_arg_dummy;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Custom internal sprintf functions, which are ASCII only (even in UNICODE builds)
|
||||
//
|
||||
|
|
|
@ -290,7 +290,7 @@ namespace x86Emitter
|
|||
// Don't ask. --arcum42
|
||||
#if !defined(__LINUX__) || !defined(DEBUG)
|
||||
|
||||
Console::Error( "Emitter Error: Invalid short jump displacement = 0x%x", params (int)displacement );
|
||||
Console::Error( "Emitter Error: Invalid short jump displacement = 0x%x", (int)displacement );
|
||||
#endif
|
||||
}
|
||||
BasePtr[-1] = (s8)displacement;
|
||||
|
|
|
@ -22,24 +22,11 @@
|
|||
using namespace Threading;
|
||||
using namespace std;
|
||||
|
||||
const _VARG_PARAM va_arg_dummy = { 0 };
|
||||
|
||||
namespace Console
|
||||
{
|
||||
MutexLock m_writelock;
|
||||
std::string m_format_buffer;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool __fastcall Write( Colors color, const char* fmt )
|
||||
{
|
||||
SetColor( color );
|
||||
Write( fmt );
|
||||
ClearColor();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool __fastcall Write( Colors color, const wxString& fmt )
|
||||
{
|
||||
SetColor( color );
|
||||
|
@ -49,15 +36,6 @@ namespace Console
|
|||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall WriteLn( Colors color, const char* fmt )
|
||||
{
|
||||
SetColor( color );
|
||||
WriteLn( fmt );
|
||||
ClearColor();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall WriteLn( Colors color, const wxString& fmt )
|
||||
{
|
||||
SetColor( color );
|
||||
|
@ -71,7 +49,7 @@ namespace Console
|
|||
{
|
||||
ScopedLock locker( m_writelock );
|
||||
vssprintf( m_format_buffer, fmt, args );
|
||||
Write( m_format_buffer.c_str() );
|
||||
Write( wxString::FromUTF8( m_format_buffer.c_str() ) );
|
||||
}
|
||||
|
||||
__forceinline void __fastcall _WriteLn( const char* fmt, va_list args )
|
||||
|
@ -79,7 +57,7 @@ namespace Console
|
|||
ScopedLock locker( m_writelock );
|
||||
vssprintf( m_format_buffer, fmt, args );
|
||||
m_format_buffer += "\n";
|
||||
Write( m_format_buffer.c_str() );
|
||||
Write( wxString::FromUTF8( m_format_buffer.c_str() ) );
|
||||
}
|
||||
|
||||
__forceinline void __fastcall _WriteLn( Colors color, const char* fmt, va_list args )
|
||||
|
@ -90,24 +68,20 @@ namespace Console
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool Write( const char* fmt, VARG_PARAM dummy, ... )
|
||||
bool Write( const char* fmt, ... )
|
||||
{
|
||||
varg_assert();
|
||||
|
||||
va_list args;
|
||||
va_start(args,dummy);
|
||||
va_start(args,fmt);
|
||||
_Write( fmt, args );
|
||||
va_end(args);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Write( Colors color, const char* fmt, VARG_PARAM dummy, ... )
|
||||
bool Write( Colors color, const char* fmt, ... )
|
||||
{
|
||||
varg_assert();
|
||||
|
||||
va_list args;
|
||||
va_start(args,dummy);
|
||||
va_start(args,fmt);
|
||||
SetColor( color );
|
||||
_Write( fmt, args );
|
||||
ClearColor();
|
||||
|
@ -117,84 +91,53 @@ namespace Console
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool WriteLn( const char* fmt, VARG_PARAM dummy, ... )
|
||||
bool WriteLn( const char* fmt, ... )
|
||||
{
|
||||
varg_assert();
|
||||
va_list args;
|
||||
va_start(args,dummy);
|
||||
va_start(args,fmt);
|
||||
_WriteLn( fmt, args );
|
||||
va_end(args);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool WriteLn( Colors color, const char* fmt, VARG_PARAM dummy, ... )
|
||||
bool WriteLn( Colors color, const char* fmt, ... )
|
||||
{
|
||||
varg_assert();
|
||||
|
||||
va_list args;
|
||||
va_start(args,dummy);
|
||||
va_start(args,fmt);
|
||||
_WriteLn( color, fmt, args );
|
||||
va_end(args);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool Error( const char* fmt, VARG_PARAM dummy, ... )
|
||||
bool Error( const char* fmt, ... )
|
||||
{
|
||||
varg_assert();
|
||||
|
||||
va_list args;
|
||||
va_start(args,dummy);
|
||||
va_start(args,fmt);
|
||||
_WriteLn( Color_Red, fmt, args );
|
||||
va_end(args);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool Notice( const char* fmt, VARG_PARAM dummy, ... )
|
||||
bool Notice( const char* fmt, ... )
|
||||
{
|
||||
varg_assert();
|
||||
|
||||
va_list list;
|
||||
va_start(list,dummy);
|
||||
va_start(list,fmt);
|
||||
_WriteLn( Color_Yellow, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool Status( const char* fmt, VARG_PARAM dummy, ... )
|
||||
bool Status( const char* fmt, ... )
|
||||
{
|
||||
varg_assert();
|
||||
|
||||
va_list list;
|
||||
va_start(list,dummy);
|
||||
va_start(list,fmt);
|
||||
_WriteLn( Color_Green, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool __fastcall Error( const char* fmt )
|
||||
{
|
||||
WriteLn( Color_Red, fmt );
|
||||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall Notice( const char* fmt )
|
||||
{
|
||||
WriteLn( Color_Yellow, fmt );
|
||||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall Status( const char* fmt )
|
||||
{
|
||||
WriteLn( Color_Green, fmt );
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool __fastcall Error( const wxString& src )
|
||||
{
|
||||
|
|
|
@ -784,7 +784,7 @@ void ssappendf( std::string& dest, const char* format, ...)
|
|||
// the format string from the parameters used to fill the string's tokens. It looks
|
||||
// like this in practice:
|
||||
//
|
||||
// ssprintf( dest, "Yo Joe, %d. In the Hizzou %s.", params intval, strval );
|
||||
// ssprintf( dest, "Yo Joe, %d. In the Hizzou %s.", intval, strval );
|
||||
//
|
||||
// In addition to all standard printf formatting tokens, ssprintf also supports a new token
|
||||
// for std::string parameters as %hs (passed by reference/pointer). I opted for %hs (using 'h'
|
||||
|
@ -792,7 +792,7 @@ void ssappendf( std::string& dest, const char* format, ...)
|
|||
// that these are passed by pointer so you *must* use the & operator most of the time.
|
||||
// Example:
|
||||
//
|
||||
// ssprintf( dest, "Yo Joe, %hs.", params &strval );
|
||||
// ssprintf( dest, "Yo Joe, %hs.", &strval );
|
||||
//
|
||||
// This can be a cavet of sorts since forgetting to use the & will always compile but
|
||||
// will cause undefined behavior and odd crashes (much like how the same thing happens
|
||||
|
@ -806,12 +806,10 @@ void ssappendf( std::string& dest, const char* format, ...)
|
|||
// anything, and none of the other 64-bit qualifiers aren't really standard anyway.
|
||||
// Example:
|
||||
//
|
||||
// ssprintf( dest, "Yo Joe, %Ld, %Lx.", params int64, hex64 );
|
||||
// ssprintf( dest, "Yo Joe, %Ld, %Lx.", int64, hex64 );
|
||||
//
|
||||
void ssprintf(std::string& str, const char* fmt, ...)
|
||||
{
|
||||
//varg_assert();
|
||||
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vssprintf(str, fmt, args);
|
||||
|
@ -821,8 +819,6 @@ void ssprintf(std::string& str, const char* fmt, ...)
|
|||
// See ssprintf for usage details and differences from sprintf formatting.
|
||||
std::string fmt_string( const char* fmt, ... )
|
||||
{
|
||||
//varg_assert();
|
||||
|
||||
std::string retval;
|
||||
va_list args;
|
||||
va_start( args, fmt );
|
||||
|
@ -834,8 +830,6 @@ std::string fmt_string( const char* fmt, ... )
|
|||
|
||||
std::string vfmt_string( const char* fmt, va_list args )
|
||||
{
|
||||
//varg_assert();
|
||||
|
||||
std::string retval;
|
||||
vssprintf( retval, fmt, args );
|
||||
return retval;
|
||||
|
|
|
@ -105,7 +105,7 @@ static void SetSingleAffinity()
|
|||
"\tSystem Affinity : 0x%08x"
|
||||
"\tProcess Affinity: 0x%08x"
|
||||
"\tAttempted Thread Affinity CPU: i",
|
||||
params availProcCpus, availSysCpus, i
|
||||
availProcCpus, availSysCpus, i
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
@ -357,7 +357,7 @@ void cpudetectInit()
|
|||
if( sse3_result != !!x86caps.hasStreamingSIMD3Extensions )
|
||||
{
|
||||
Console::Notice( "SSE3 Detection Inconsistency: cpuid=%s, test_result=%s",
|
||||
params bool_to_char( !!x86caps.hasStreamingSIMD3Extensions ), bool_to_char( sse3_result ) );
|
||||
bool_to_char( !!x86caps.hasStreamingSIMD3Extensions ), bool_to_char( sse3_result ) );
|
||||
|
||||
x86caps.hasStreamingSIMD3Extensions = sse3_result;
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ void cpudetectInit()
|
|||
if( ssse3_result != !!x86caps.hasSupplementalStreamingSIMD3Extensions )
|
||||
{
|
||||
Console::Notice( "SSSE3 Detection Inconsistency: cpuid=%s, test_result=%s",
|
||||
params bool_to_char( !!x86caps.hasSupplementalStreamingSIMD3Extensions ), bool_to_char( ssse3_result ) );
|
||||
bool_to_char( !!x86caps.hasSupplementalStreamingSIMD3Extensions ), bool_to_char( ssse3_result ) );
|
||||
|
||||
x86caps.hasSupplementalStreamingSIMD3Extensions = ssse3_result;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ void cpudetectInit()
|
|||
if( sse41_result != !!x86caps.hasStreamingSIMD4Extensions )
|
||||
{
|
||||
Console::Notice( "SSE4 Detection Inconsistency: cpuid=%s, test_result=%s",
|
||||
params bool_to_char( !!x86caps.hasStreamingSIMD4Extensions ), bool_to_char( sse41_result ) );
|
||||
bool_to_char( !!x86caps.hasStreamingSIMD4Extensions ), bool_to_char( sse41_result ) );
|
||||
|
||||
x86caps.hasStreamingSIMD4Extensions = sse41_result;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ FILE *_cdvdOpenMechaVer() {
|
|||
{
|
||||
Console::Error( "\tMEC File Creation failed!" );
|
||||
throw Exception::CreateStream( file );
|
||||
//Msgbox::Alert( "_cdvdOpenMechaVer: Error creating %s", params file);
|
||||
//Msgbox::Alert( "_cdvdOpenMechaVer: Error creating %s", file);
|
||||
//exit(1);
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ FILE *_cdvdOpenNVM() {
|
|||
if (fd == NULL)
|
||||
{
|
||||
throw Exception::CreateStream( file );
|
||||
//Msgbox::Alert("_cdvdOpenNVM: Error creating %s", params file);
|
||||
//Msgbox::Alert("_cdvdOpenNVM: Error creating %s", file);
|
||||
//exit(1);
|
||||
}
|
||||
for (i=0; i<1024; i++) fputc(0, fd);
|
||||
|
@ -338,7 +338,7 @@ void cdvdReadKey(u8 arg0, u16 arg1, u32 arg2, u8* key) {
|
|||
const wxCharBuffer crap( fname.ToAscii() );
|
||||
const char* str = crap.data();
|
||||
sprintf(exeName, "%c%c%c%c%c%c%c%c%c%c%c",str[8],str[9],str[10],str[11],str[12],str[13],str[14],str[15],str[16],str[17],str[18]);
|
||||
DevCon::Notice("exeName = %s", params &str[8]);
|
||||
DevCon::Notice("exeName = %s", &str[8]);
|
||||
|
||||
// convert the number characters to a real 32bit number
|
||||
numbers = ((((exeName[5] - '0'))*10000) +
|
||||
|
@ -393,7 +393,7 @@ void cdvdReadKey(u8 arg0, u16 arg1, u32 arg2, u8* key) {
|
|||
key[15] = 0x01;
|
||||
}
|
||||
|
||||
Console::WriteLn( "CDVD.KEY = %02X,%02X,%02X,%02X,%02X,%02X,%02X", params
|
||||
Console::WriteLn( "CDVD.KEY = %02X,%02X,%02X,%02X,%02X,%02X,%02X",
|
||||
cdvd.Key[0],cdvd.Key[1],cdvd.Key[2],cdvd.Key[3],cdvd.Key[4],cdvd.Key[14],cdvd.Key[15] );
|
||||
|
||||
// Now's a good time to reload the ELF info...
|
||||
|
@ -648,7 +648,7 @@ int cdvdReadSector() {
|
|||
// be more correct. (air)
|
||||
psxCpu->Clear( HW_DMA3_MADR, cdvd.BlockSize/4 );
|
||||
|
||||
// Console::WriteLn("sector %x;%x;%x", params PSXMu8(madr+0), PSXMu8(madr+1), PSXMu8(madr+2));
|
||||
// Console::WriteLn("sector %x;%x;%x", PSXMu8(madr+0), PSXMu8(madr+1), PSXMu8(madr+2));
|
||||
|
||||
HW_DMA3_BCR_H16 -= (cdvd.BlockSize / (HW_DMA3_BCR_L16*4));
|
||||
HW_DMA3_MADR += cdvd.BlockSize;
|
||||
|
@ -696,7 +696,7 @@ __forceinline void cdvdActionInterrupt()
|
|||
// inlined due to being referenced in only one place.
|
||||
__forceinline void cdvdReadInterrupt()
|
||||
{
|
||||
//Console::WriteLn("cdvdReadInterrupt %x %x %x %x %x", params cpuRegs.interrupt, cdvd.Readed, cdvd.Reading, cdvd.nSectors, (HW_DMA3_BCR_H16 * HW_DMA3_BCR_L16) *4);
|
||||
//Console::WriteLn("cdvdReadInterrupt %x %x %x %x %x", cpuRegs.interrupt, cdvd.Readed, cdvd.Reading, cdvd.nSectors, (HW_DMA3_BCR_H16 * HW_DMA3_BCR_L16) *4);
|
||||
|
||||
cdvd.Ready = CDVD_NOTREADY;
|
||||
if (!cdvd.Readed)
|
||||
|
@ -743,7 +743,7 @@ __forceinline void cdvdReadInterrupt()
|
|||
CDVDREAD_INT(cdvd.ReadTime);
|
||||
}
|
||||
else
|
||||
Console::Error("CDVD READ ERROR, sector = 0x%08x", params cdvd.Sector);
|
||||
Console::Error("CDVD READ ERROR, sector = 0x%08x", cdvd.Sector);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1037,14 +1037,14 @@ u8 cdvdRead(u8 key)
|
|||
case 0x3A: // DEC_SET
|
||||
CDR_LOG("cdvdRead3A(DecSet) %x", cdvd.decSet);
|
||||
|
||||
Console::WriteLn("DecSet Read: %02X", params cdvd.decSet);
|
||||
Console::WriteLn("DecSet Read: %02X", cdvd.decSet);
|
||||
return cdvd.decSet;
|
||||
break;
|
||||
|
||||
default:
|
||||
// note: notify the console since this is a potentially serious emulation problem:
|
||||
PSXHW_LOG("*Unknown 8bit read at address 0x1f4020%x", key);
|
||||
Console::Error( "IOP Unknown 8bit read from addr 0x1f4020%x", params key );
|
||||
Console::Error( "IOP Unknown 8bit read from addr 0x1f4020%x", key );
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
@ -1068,14 +1068,14 @@ static void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
// Seek to sector zero. The cdvdStartSeek function will simulate
|
||||
// spinup times if needed.
|
||||
|
||||
DevCon::Notice( "CdStandby : %d", params rt );
|
||||
DevCon::Notice( "CdStandby : %d", rt );
|
||||
cdvd.Action = cdvdAction_Standby;
|
||||
cdvd.ReadTime = cdvdBlockReadTime( MODE_DVDROM );
|
||||
CDVD_INT( cdvdStartSeek( 0, MODE_DVDROM ) );
|
||||
break;
|
||||
|
||||
case N_CD_STOP: // CdStop
|
||||
DevCon::Notice( "CdStop : %d", params rt );
|
||||
DevCon::Notice( "CdStop : %d", rt );
|
||||
cdvd.Action = cdvdAction_Stop;
|
||||
CDVD_INT( PSXCLK / 6 ); // 166ms delay?
|
||||
break;
|
||||
|
@ -1110,7 +1110,7 @@ static void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
|
||||
if( EmuConfig.CdvdVerboseReads )
|
||||
Console::WriteLn("CdRead: Reading Sector %d(%d Blocks of Size %d) at Speed=%dx",
|
||||
params cdvd.Sector, cdvd.nSectors,cdvd.BlockSize,cdvd.Speed);
|
||||
cdvd.Sector, cdvd.nSectors,cdvd.BlockSize,cdvd.Speed);
|
||||
|
||||
cdvd.ReadTime = cdvdBlockReadTime( MODE_CDROM );
|
||||
CDVDREAD_INT( cdvdStartSeek( cdvd.SeekToSector,MODE_CDROM ) );
|
||||
|
@ -1158,7 +1158,7 @@ static void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
|
||||
if( EmuConfig.CdvdVerboseReads )
|
||||
Console::WriteLn("CdAudioRead: Reading Sector %d(%d Blocks of Size %d) at Speed=%dx",
|
||||
params cdvd.Sector, cdvd.nSectors,cdvd.BlockSize,cdvd.Speed);
|
||||
cdvd.Sector, cdvd.nSectors,cdvd.BlockSize,cdvd.Speed);
|
||||
|
||||
cdvd.ReadTime = cdvdBlockReadTime( MODE_CDROM );
|
||||
CDVDREAD_INT( cdvdStartSeek( cdvd.SeekToSector, MODE_CDROM ) );
|
||||
|
@ -1194,7 +1194,7 @@ static void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
|
||||
if( EmuConfig.CdvdVerboseReads )
|
||||
Console::WriteLn("DvdRead: Reading Sector %d(%d Blocks of Size %d) at Speed=%dx",
|
||||
params cdvd.Sector, cdvd.nSectors,cdvd.BlockSize,cdvd.Speed);
|
||||
cdvd.Sector, cdvd.nSectors,cdvd.BlockSize,cdvd.Speed);
|
||||
|
||||
cdvd.ReadTime = cdvdBlockReadTime( MODE_DVDROM );
|
||||
CDVDREAD_INT( cdvdStartSeek( cdvd.SeekToSector, MODE_DVDROM ) );
|
||||
|
@ -1215,7 +1215,7 @@ static void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
//the code below handles only CdGetToc!
|
||||
//if(cdvd.Param[0]==0x01)
|
||||
//{
|
||||
DevCon::WriteLn("CDGetToc Param[0]=%d, Param[1]=%d", params cdvd.Param[0],cdvd.Param[1]);
|
||||
DevCon::WriteLn("CDGetToc Param[0]=%d, Param[1]=%d", cdvd.Param[0],cdvd.Param[1]);
|
||||
//}
|
||||
cdvdGetToc( iopPhysMem( HW_DMA3_MADR ) );
|
||||
cdvdSetIrq( (1<<Irq_CommandComplete) ); //| (1<<Irq_DataReady) );
|
||||
|
@ -1228,7 +1228,7 @@ static void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
u8 arg0 = cdvd.Param[0];
|
||||
u16 arg1 = cdvd.Param[1] | (cdvd.Param[2]<<8);
|
||||
u32 arg2 = cdvd.Param[3] | (cdvd.Param[4]<<8) | (cdvd.Param[5]<<16) | (cdvd.Param[6]<<24);
|
||||
DevCon::WriteLn("cdvdReadKey(%d, %d, %d)", params arg0, arg1, arg2);
|
||||
DevCon::WriteLn("cdvdReadKey(%d, %d, %d)", arg0, arg1, arg2);
|
||||
cdvdReadKey(arg0, arg1, arg2, cdvd.Key);
|
||||
cdvd.KeyXor = 0x00;
|
||||
cdvdSetIrq();
|
||||
|
@ -1236,12 +1236,12 @@ static void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
break;
|
||||
|
||||
case N_CD_CHG_SPDL_CTRL: // CdChgSpdlCtrl
|
||||
Console::Notice("sceCdChgSpdlCtrl(%d)", params cdvd.Param[0]);
|
||||
Console::Notice("sceCdChgSpdlCtrl(%d)", cdvd.Param[0]);
|
||||
cdvdSetIrq();
|
||||
break;
|
||||
|
||||
default:
|
||||
Console::Notice("NCMD Unknown %x", params rt);
|
||||
Console::Notice("NCMD Unknown %x", rt);
|
||||
cdvdSetIrq();
|
||||
break;
|
||||
}
|
||||
|
@ -1270,7 +1270,7 @@ static __forceinline void cdvdWrite07(u8 rt) // BREAK
|
|||
// If we're already in a Ready state or already Breaking, then do nothing:
|
||||
if ((cdvd.Ready != CDVD_NOTREADY) || (cdvd.Action == cdvdAction_Break)) return;
|
||||
|
||||
DbgCon::Notice("*PCSX2*: CDVD BREAK %x", params rt);
|
||||
DbgCon::Notice("*PCSX2*: CDVD BREAK %x", rt);
|
||||
|
||||
// Aborts any one of several CD commands:
|
||||
// Pause, Seek, Read, Status, Standby, and Stop
|
||||
|
@ -1298,7 +1298,7 @@ static __forceinline void cdvdWrite0A(u8 rt) { // STATUS
|
|||
|
||||
static __forceinline void cdvdWrite0F(u8 rt) { // TYPE
|
||||
CDR_LOG("cdvdWrite0F(Type) %x", rt);
|
||||
DevCon::WriteLn("*PCSX2*: CDVD TYPE %x", params rt);
|
||||
DevCon::WriteLn("*PCSX2*: CDVD TYPE %x", rt);
|
||||
}
|
||||
|
||||
static __forceinline void cdvdWrite14(u8 rt) { // PS1 MODE??
|
||||
|
@ -1307,7 +1307,7 @@ static __forceinline void cdvdWrite14(u8 rt) { // PS1 MODE??
|
|||
if (rt == 0xFE)
|
||||
Console::Notice("*PCSX2*: go PS1 mode DISC SPEED = FAST");
|
||||
else
|
||||
Console::Notice("*PCSX2*: go PS1 mode DISC SPEED = %dX", params rt);
|
||||
Console::Notice("*PCSX2*: go PS1 mode DISC SPEED = %dX", rt);
|
||||
|
||||
psxReset();
|
||||
psxHu32(0x1f801450) = 0x8;
|
||||
|
@ -1374,7 +1374,7 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
default:
|
||||
SetResultSize(1);
|
||||
cdvd.Result[0] = 0x80;
|
||||
Console::WriteLn("*Unknown Mecacon Command param[0]=%02X", params cdvd.Param[0]);
|
||||
Console::WriteLn("*Unknown Mecacon Command param[0]=%02X", cdvd.Param[0]);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -1403,9 +1403,9 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
if(cdvd.Result[3] <= 7) cdvd.Result[5] += 1;
|
||||
cdvd.Result[6] = itob(cdvd.RTC.month)+0x80; //Month
|
||||
cdvd.Result[7] = itob(cdvd.RTC.year); //Year
|
||||
/*Console::WriteLn("RTC Read Sec %x Min %x Hr %x Day %x Month %x Year %x", params cdvd.Result[1], cdvd.Result[2],
|
||||
/*Console::WriteLn("RTC Read Sec %x Min %x Hr %x Day %x Month %x Year %x", cdvd.Result[1], cdvd.Result[2],
|
||||
cdvd.Result[3], cdvd.Result[5], cdvd.Result[6], cdvd.Result[7]);
|
||||
Console::WriteLn("RTC Read Real Sec %d Min %d Hr %d Day %d Month %d Year %d", params cdvd.RTC.second, cdvd.RTC.minute,
|
||||
Console::WriteLn("RTC Read Real Sec %d Min %d Hr %d Day %d Month %d Year %d", cdvd.RTC.second, cdvd.RTC.minute,
|
||||
cdvd.RTC.hour, cdvd.RTC.day, cdvd.RTC.month, cdvd.RTC.year);*/
|
||||
break;
|
||||
|
||||
|
@ -1421,9 +1421,9 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
if(cdvd.Param[cdvd.ParamP-5] <= 7) cdvd.RTC.day -= 1;
|
||||
cdvd.RTC.month = btoi(cdvd.Param[cdvd.ParamP-2]-0x80);
|
||||
cdvd.RTC.year = btoi(cdvd.Param[cdvd.ParamP-1]);
|
||||
/*Console::WriteLn("RTC write incomming Sec %x Min %x Hr %x Day %x Month %x Year %x", params cdvd.Param[cdvd.ParamP-7], cdvd.Param[cdvd.ParamP-6],
|
||||
/*Console::WriteLn("RTC write incomming Sec %x Min %x Hr %x Day %x Month %x Year %x", cdvd.Param[cdvd.ParamP-7], cdvd.Param[cdvd.ParamP-6],
|
||||
cdvd.Param[cdvd.ParamP-5], cdvd.Param[cdvd.ParamP-3], cdvd.Param[cdvd.ParamP-2], cdvd.Param[cdvd.ParamP-1]);
|
||||
Console::WriteLn("RTC Write Sec %d Min %d Hr %d Day %d Month %d Year %d", params cdvd.RTC.second, cdvd.RTC.minute,
|
||||
Console::WriteLn("RTC Write Sec %d Min %d Hr %d Day %d Month %d Year %d", cdvd.RTC.second, cdvd.RTC.minute,
|
||||
cdvd.RTC.hour, cdvd.RTC.day, cdvd.RTC.month, cdvd.RTC.year);*/
|
||||
//memcpy_fast((u8*)&cdvd.RTC, cdvd.Param, 7);
|
||||
break;
|
||||
|
@ -1625,7 +1625,7 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
|
||||
cdvdGetMechaVer(&cdvd.Result[1]);
|
||||
cdvd.Result[0] = cdvdReadRegionParams(&cdvd.Result[3]);//size==8
|
||||
Console::WriteLn("REGION PARAMS = %s %s", params mg_zones[cdvd.Result[1]], &cdvd.Result[3]);
|
||||
Console::WriteLn("REGION PARAMS = %s %s", mg_zones[cdvd.Result[1]], &cdvd.Result[3]);
|
||||
cdvd.Result[1] = 1 << cdvd.Result[1]; //encryption zone; see offset 0x1C in encrypted headers
|
||||
//////////////////////////////////////////
|
||||
cdvd.Result[2] = 0; //??
|
||||
|
@ -1793,11 +1793,11 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
}
|
||||
|
||||
Console::Write("[MG] ELF_size=0x%X Hdr_size=0x%X unk=0x%X flags=0x%X count=%d zones=",
|
||||
params *(u32*)&cdvd.mg_buffer[0x10], *(u16*)&cdvd.mg_buffer[0x14], *(u16*)&cdvd.mg_buffer[0x16],
|
||||
*(u32*)&cdvd.mg_buffer[0x10], *(u16*)&cdvd.mg_buffer[0x14], *(u16*)&cdvd.mg_buffer[0x16],
|
||||
*(u16*)&cdvd.mg_buffer[0x18], *(u16*)&cdvd.mg_buffer[0x1A]);
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
if (cdvd.mg_buffer[0x1C] & (1<<i)) Console::Write("%s ", params mg_zones[i]);
|
||||
if (cdvd.mg_buffer[0x1C] & (1<<i)) Console::Write("%s ", mg_zones[i]);
|
||||
}
|
||||
Console::Newline();
|
||||
|
||||
|
@ -1829,7 +1829,7 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
SetResultSize(1);//in:5
|
||||
cdvd.mg_size = 0;
|
||||
cdvd.mg_datatype = 1;//header data
|
||||
Console::WriteLn("[MG] hcode=%d cnum=%d a2=%d length=0x%X", params
|
||||
Console::WriteLn("[MG] hcode=%d cnum=%d a2=%d length=0x%X",
|
||||
cdvd.Param[0], cdvd.Param[3], cdvd.Param[4], cdvd.mg_maxsize = cdvd.Param[1] | (((int)cdvd.Param[2])<<8));
|
||||
|
||||
cdvd.Result[0] = 0; // 0 complete ; 1 busy ; 0x80 error
|
||||
|
@ -1843,7 +1843,7 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
|
||||
cdvd.mg_maxsize = 0; // don't allow any write
|
||||
cdvd.mg_size = 8+16*cdvd.mg_buffer[4];//new offset, i just moved the data
|
||||
Console::WriteLn("[MG] BIT count=%d", params cdvd.mg_buffer[4]);
|
||||
Console::WriteLn("[MG] BIT count=%d", cdvd.mg_buffer[4]);
|
||||
|
||||
cdvd.Result[0] = (cdvd.mg_datatype == 1) ? 0 : 0x80; // 0 complete ; 1 busy ; 0x80 error
|
||||
cdvd.Result[1] = (cdvd.mg_size >> 0) & 0xFF;
|
||||
|
@ -1908,11 +1908,11 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
|||
// fake a 'correct' command
|
||||
SetResultSize(1); //in:0
|
||||
cdvd.Result[0] = 0; // 0 complete ; 1 busy ; 0x80 error
|
||||
Console::WriteLn("SCMD Unknown %x", params rt);
|
||||
Console::WriteLn("SCMD Unknown %x", rt);
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
//Console::WriteLn("SCMD - 0x%x\n", params rt);
|
||||
//Console::WriteLn("SCMD - 0x%x\n", rt);
|
||||
cdvd.ParamP = 0;
|
||||
cdvd.ParamC = 0;
|
||||
}
|
||||
|
@ -1934,7 +1934,7 @@ static __forceinline void cdvdWrite18(u8 rt) { // SDATAOUT
|
|||
static __forceinline void cdvdWrite3A(u8 rt) { // DEC-SET
|
||||
CDR_LOG("cdvdWrite3A(DecSet) %x", rt);
|
||||
cdvd.decSet = rt;
|
||||
Console::WriteLn("DecSet Write: %02X", params cdvd.decSet);
|
||||
Console::WriteLn("DecSet Write: %02X", cdvd.decSet);
|
||||
}
|
||||
|
||||
void cdvdWrite(u8 key, u8 rt)
|
||||
|
@ -1954,7 +1954,7 @@ void cdvdWrite(u8 key, u8 rt)
|
|||
case 0x18: cdvdWrite18(rt); break;
|
||||
case 0x3A: cdvdWrite3A(rt); break;
|
||||
default:
|
||||
Console::Notice("IOP Unknown 8bit write to addr 0x1f4020%x = 0x%x", params key, rt);
|
||||
Console::Notice("IOP Unknown 8bit write to addr 0x1f4020%x = 0x%x", key, rt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ static int FindDiskType(int mType)
|
|||
switch(iCDType)
|
||||
{
|
||||
case CDVD_TYPE_DETCTCD:
|
||||
Console::Status(" * CDVD Disk Open: CD, %d tracks (%d to %d):", params tn.etrack-tn.strack+1,tn.strack,tn.etrack);
|
||||
Console::Status(" * CDVD Disk Open: CD, %d tracks (%d to %d):", tn.etrack-tn.strack+1,tn.strack,tn.etrack);
|
||||
break;
|
||||
|
||||
case CDVD_TYPE_DETCTDVDS:
|
||||
|
@ -190,12 +190,12 @@ static int FindDiskType(int mType)
|
|||
if (td.type == CDVD_AUDIO_TRACK)
|
||||
{
|
||||
audioTracks++;
|
||||
Console::Status(" * * Track %d: Audio (%d sectors)", params i,tlength);
|
||||
Console::Status(" * * Track %d: Audio (%d sectors)", i,tlength);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataTracks++;
|
||||
Console::Status(" * * Track %d: Data (Mode %d) (%d sectors)", params i,((td.type==CDVD_MODE1_TRACK)?1:2),tlength);
|
||||
Console::Status(" * * Track %d: Data (Mode %d) (%d sectors)", i,((td.type==CDVD_MODE1_TRACK)?1:2),tlength);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ s32 CALLBACK ISOopen(const char* pTitle)
|
|||
iso = isoOpen(pTitle);
|
||||
if (iso == NULL)
|
||||
{
|
||||
Console::Error( "CDVDiso Error: Failed loading %s", params pTitle );
|
||||
Console::Error( "CDVDiso Error: Failed loading %s", pTitle );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ static void FindLayer1Start()
|
|||
}
|
||||
|
||||
if(layer1start>=0)
|
||||
Console::Status("\tfound at 0x%8.8x", params layer1start);
|
||||
Console::Status("\tfound at 0x%8.8x", layer1start);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -945,7 +945,7 @@ s32 cdvdDmaRead(s32 channel, u32* data, u32 wordsLeft, u32* wordsProcessed)
|
|||
cdr.pTransfer+=wordsLeft;
|
||||
*wordsProcessed = wordsLeft;
|
||||
|
||||
Console::Status("New IOP DMA handled CDVD DMA: channel %d, data %p, remaining %08x, processed %08x.", params channel,data,wordsLeft, *wordsProcessed);
|
||||
Console::Status("New IOP DMA handled CDVD DMA: channel %d, data %p, remaining %08x, processed %08x.", channel,data,wordsLeft, *wordsProcessed);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ int IsoFS_findFile(const char* fname, TocEntry* tocEntry){
|
|||
dirTocEntry* tocEntryPointer;
|
||||
TocEntry localTocEntry; // used for internal checking only
|
||||
|
||||
DbgCon::WriteLn("IsoFS_findfile(\"%s\") called", params fname);
|
||||
DbgCon::WriteLn("IsoFS_findfile(\"%s\") called", fname);
|
||||
|
||||
_splitpath2(fname, pathname, filename);
|
||||
|
||||
|
|
|
@ -139,13 +139,13 @@ isoFile *isoOpen(const char *filename)
|
|||
iso->handle = _openfile( iso->filename, O_RDONLY);
|
||||
if (iso->handle == NULL)
|
||||
{
|
||||
Console::Error("error loading %s", params iso->filename);
|
||||
Console::Error("error loading %s", iso->filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (isoDetect(iso) == -1) return NULL;
|
||||
|
||||
Console::WriteLn("detected blocksize = %d", params iso->blocksize);
|
||||
Console::WriteLn("detected blocksize = %d", iso->blocksize);
|
||||
|
||||
if ((strlen(iso->filename) > 3) && strncmp(iso->filename + (strlen(iso->filename) - 3), "I00", 3) == 0)
|
||||
{
|
||||
|
@ -183,12 +183,12 @@ isoFile *isoOpen(const char *filename)
|
|||
iso->blocks = (u32)((_tellfile(iso->handle) - iso->offset) / (iso->blocksize));
|
||||
}
|
||||
|
||||
Console::WriteLn("isoOpen: %s ok", params iso->filename);
|
||||
Console::WriteLn("offset = %d", params iso->offset);
|
||||
Console::WriteLn("blockofs = %d", params iso->blockofs);
|
||||
Console::WriteLn("blocksize = %d", params iso->blocksize);
|
||||
Console::WriteLn("blocks = %d", params iso->blocks);
|
||||
Console::WriteLn("type = %d", params iso->type);
|
||||
Console::WriteLn("isoOpen: %s ok", iso->filename);
|
||||
Console::WriteLn("offset = %d", iso->offset);
|
||||
Console::WriteLn("blockofs = %d", iso->blockofs);
|
||||
Console::WriteLn("blocksize = %d", iso->blocksize);
|
||||
Console::WriteLn("blocks = %d", iso->blocks);
|
||||
Console::WriteLn("type = %d", iso->type);
|
||||
|
||||
return iso;
|
||||
}
|
||||
|
@ -221,12 +221,12 @@ isoFile *isoCreate(const char *filename, int flags)
|
|||
|
||||
if (iso->handle == NULL)
|
||||
{
|
||||
Console::Error("Error loading %s", params iso->filename);
|
||||
Console::Error("Error loading %s", iso->filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Console::WriteLn("isoCreate: %s ok", params iso->filename);
|
||||
Console::WriteLn("offset = %d", params iso->offset);
|
||||
Console::WriteLn("isoCreate: %s ok", iso->filename);
|
||||
Console::WriteLn("offset = %d", iso->offset);
|
||||
|
||||
return iso;
|
||||
}
|
||||
|
@ -237,9 +237,9 @@ int isoSetFormat(isoFile *iso, int blockofs, int blocksize, int blocks)
|
|||
iso->blocks = blocks;
|
||||
iso->blockofs = blockofs;
|
||||
|
||||
Console::WriteLn("blockofs = %d", params iso->blockofs);
|
||||
Console::WriteLn("blocksize = %d", params iso->blocksize);
|
||||
Console::WriteLn("blocks = %d", params iso->blocks);
|
||||
Console::WriteLn("blockofs = %d", iso->blockofs);
|
||||
Console::WriteLn("blocksize = %d", iso->blocksize);
|
||||
Console::WriteLn("blocks = %d", iso->blocks);
|
||||
|
||||
if (iso->flags & ISOFLAGS_BLOCKDUMP_V2)
|
||||
{
|
||||
|
@ -294,7 +294,7 @@ int _isoReadBlock(isoFile *iso, u8 *dst, int lsn)
|
|||
|
||||
if (ret < iso->blocksize)
|
||||
{
|
||||
Console::Error("read error %d in _isoReadBlock", params ret);
|
||||
Console::Error("read error %d in _isoReadBlock", ret);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ int _isoReadBlockD(isoFile *iso, u8 *dst, int lsn)
|
|||
{
|
||||
int ret;
|
||||
|
||||
// Console::WriteLn("_isoReadBlockD %d, blocksize=%d, blockofs=%d\n", params lsn, iso->blocksize, iso->blockofs);
|
||||
// Console::WriteLn("_isoReadBlockD %d, blocksize=%d, blockofs=%d\n", lsn, iso->blocksize, iso->blockofs);
|
||||
|
||||
memset(dst, 0, iso->blockofs);
|
||||
for (int i = 0; i < iso->dtablesize; i++)
|
||||
|
@ -319,7 +319,7 @@ int _isoReadBlockD(isoFile *iso, u8 *dst, int lsn)
|
|||
|
||||
return 0;
|
||||
}
|
||||
Console::WriteLn("Block %d not found in dump", params lsn);
|
||||
Console::WriteLn("Block %d not found in dump", lsn);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ int _isoReadBlockM(isoFile *iso, u8 *dst, int lsn)
|
|||
|
||||
ofs = (u64)(lsn - iso->multih[i].slsn) * iso->blocksize + iso->offset;
|
||||
|
||||
// Console::WriteLn("_isoReadBlock %d, blocksize=%d, blockofs=%d\n", params lsn, iso->blocksize, iso->blockofs);
|
||||
// Console::WriteLn("_isoReadBlock %d, blocksize=%d, blockofs=%d\n", lsn, iso->blocksize, iso->blockofs);
|
||||
|
||||
memset(dst, 0, iso->blockofs);
|
||||
_seekfile(iso->multih[i].handle, ofs, SEEK_SET);
|
||||
|
@ -349,7 +349,7 @@ int _isoReadBlockM(isoFile *iso, u8 *dst, int lsn)
|
|||
|
||||
if (ret < iso->blocksize)
|
||||
{
|
||||
Console::WriteLn("read error %d in _isoReadBlockM", params ret);
|
||||
Console::WriteLn("read error %d in _isoReadBlockM", ret);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ int isoReadBlock(isoFile *iso, u8 *dst, int lsn)
|
|||
|
||||
if (lsn > iso->blocks)
|
||||
{
|
||||
Console::WriteLn("isoReadBlock: %d > %d", params lsn, iso->blocks);
|
||||
Console::WriteLn("isoReadBlock: %d > %d", lsn, iso->blocks);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -403,13 +403,13 @@ int _isoWriteBlockD(isoFile *iso, u8 *src, int lsn)
|
|||
{
|
||||
int ret;
|
||||
|
||||
// Console::WriteLn("_isoWriteBlock %d (ofs=%d)", params iso->blocksize, ofs);
|
||||
// Console::WriteLn("_isoWriteBlock %d (ofs=%d)", iso->blocksize, ofs);
|
||||
|
||||
ret = _writefile(iso->handle, &lsn, 4);
|
||||
if (ret < 4) return -1;
|
||||
ret = _writefile(iso->handle, src + iso->blockofs, iso->blocksize);
|
||||
|
||||
// Console::WriteLn("_isoWriteBlock %d", params ret);
|
||||
// Console::WriteLn("_isoWriteBlock %d", ret);
|
||||
|
||||
if (ret < iso->blocksize) return -1;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ void *_openfile(const char *filename, int flags)
|
|||
{
|
||||
HANDLE handle;
|
||||
|
||||
// Console::WriteLn("_openfile %s, %d", params filename, flags & O_RDONLY);
|
||||
// Console::WriteLn("_openfile %s, %d", filename, flags & O_RDONLY);
|
||||
if (flags & O_WRONLY)
|
||||
{
|
||||
int _flags = CREATE_NEW;
|
||||
|
@ -55,7 +55,7 @@ int _seekfile(void *handle, u64 offset, int whence)
|
|||
u64 ofs = (u64)offset;
|
||||
PLONG _ofs = (LONG*) & ofs;
|
||||
|
||||
// Console::WriteLn("_seekfile %p, %d_%d", params handle, _ofs[1], _ofs[0]);
|
||||
// Console::WriteLn("_seekfile %p, %d_%d", handle, _ofs[1], _ofs[0]);
|
||||
|
||||
SetFilePointer(handle, _ofs[0], &_ofs[1], (whence == SEEK_SET) ? FILE_BEGIN : FILE_END);
|
||||
|
||||
|
@ -67,7 +67,7 @@ int _readfile(void *handle, void *dst, int size)
|
|||
DWORD ret;
|
||||
|
||||
ReadFile(handle, dst, size, &ret, NULL);
|
||||
// Console::WriteLn("_readfile(%p, %d) = %d; %d", params handle, size, ret, GetLastError());
|
||||
// Console::WriteLn("_readfile(%p, %d) = %d; %d", handle, size, ret, GetLastError());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ int _writefile(void *handle, const void *src, int size)
|
|||
|
||||
// _seekfile(handle, _tellfile(handle));
|
||||
WriteFile(handle, src, size, &ret, NULL);
|
||||
// Console::WriteLn("_readfile(%p, %d) = %d", params handle, size, ret);
|
||||
// Console::WriteLn("_readfile(%p, %d) = %d", handle, size, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ void _closefile(void *handle)
|
|||
|
||||
void *_openfile(const char *filename, int flags)
|
||||
{
|
||||
// Console::WriteLn("_openfile %s %x", params filename, flags);
|
||||
// Console::WriteLn("_openfile %s %x", filename, flags);
|
||||
|
||||
if (flags & O_WRONLY)
|
||||
return fopen64(filename, "wb");
|
||||
|
|
|
@ -50,12 +50,12 @@ void MapTLB(int i)
|
|||
u32 mask, addr;
|
||||
u32 saddr, eaddr;
|
||||
|
||||
DevCon::WriteLn("MAP TLB %d: %08x-> [%08x %08x] S=%d G=%d ASID=%d Mask= %03X", params
|
||||
DevCon::WriteLn("MAP TLB %d: %08x-> [%08x %08x] S=%d G=%d ASID=%d Mask= %03X",
|
||||
i,tlb[i].VPN2,tlb[i].PFN0,tlb[i].PFN1,tlb[i].S,tlb[i].G,tlb[i].ASID,tlb[i].Mask);
|
||||
|
||||
if (tlb[i].S)
|
||||
{
|
||||
DevCon::WriteLn("OMG SPRAM MAPPING %08X %08X\n",params tlb[i].VPN2,tlb[i].Mask);
|
||||
DevCon::WriteLn("OMG SPRAM MAPPING %08X %08X\n", tlb[i].VPN2,tlb[i].Mask);
|
||||
vtlb_VMapBuffer(tlb[i].VPN2, psS, 0x4000);
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ void MapTLB(int i)
|
|||
|
||||
void UnmapTLB(int i)
|
||||
{
|
||||
//Console::WriteLn("Clear TLB %d: %08x-> [%08x %08x] S=%d G=%d ASID=%d Mask= %03X", params i,tlb[i].VPN2,tlb[i].PFN0,tlb[i].PFN1,tlb[i].S,tlb[i].G,tlb[i].ASID,tlb[i].Mask);
|
||||
//Console::WriteLn("Clear TLB %d: %08x-> [%08x %08x] S=%d G=%d ASID=%d Mask= %03X", i,tlb[i].VPN2,tlb[i].PFN0,tlb[i].PFN1,tlb[i].S,tlb[i].G,tlb[i].ASID,tlb[i].Mask);
|
||||
u32 mask, addr;
|
||||
u32 saddr, eaddr;
|
||||
|
||||
|
@ -105,7 +105,7 @@ void UnmapTLB(int i)
|
|||
mask = ((~tlb[i].Mask) << 1) & 0xfffff;
|
||||
saddr = tlb[i].VPN2 >> 12;
|
||||
eaddr = saddr + tlb[i].Mask + 1;
|
||||
// Console::WriteLn("Clear TLB: %08x ~ %08x",params saddr,eaddr-1);
|
||||
// Console::WriteLn("Clear TLB: %08x ~ %08x",saddr,eaddr-1);
|
||||
for (addr=saddr; addr<eaddr; addr++) {
|
||||
if ((addr & mask) == ((tlb[i].VPN2 >> 12) & mask)) { //match
|
||||
memClearPageAddr(addr << 12);
|
||||
|
@ -118,7 +118,7 @@ void UnmapTLB(int i)
|
|||
mask = ((~tlb[i].Mask) << 1) & 0xfffff;
|
||||
saddr = (tlb[i].VPN2 >> 12) + tlb[i].Mask + 1;
|
||||
eaddr = saddr + tlb[i].Mask + 1;
|
||||
// Console::WriteLn("Clear TLB: %08x ~ %08x",params saddr,eaddr-1);
|
||||
// Console::WriteLn("Clear TLB: %08x ~ %08x",saddr,eaddr-1);
|
||||
for (addr=saddr; addr<eaddr; addr++) {
|
||||
if ((addr & mask) == ((tlb[i].VPN2 >> 12) & mask)) { //match
|
||||
memClearPageAddr(addr << 12);
|
||||
|
@ -212,10 +212,10 @@ static __forceinline bool PERF_ShouldCountEvent( uint evt )
|
|||
void COP0_DiagnosticPCCR()
|
||||
{
|
||||
if( cpuRegs.PERF.n.pccr.b.Event0 >= 7 && cpuRegs.PERF.n.pccr.b.Event0 <= 10 )
|
||||
Console::Notice( "PERF/PCR0 Unsupported Update Event Mode = 0x%x", params cpuRegs.PERF.n.pccr.b.Event0 );
|
||||
Console::Notice( "PERF/PCR0 Unsupported Update Event Mode = 0x%x", cpuRegs.PERF.n.pccr.b.Event0 );
|
||||
|
||||
if( cpuRegs.PERF.n.pccr.b.Event1 >= 7 && cpuRegs.PERF.n.pccr.b.Event1 <= 10 )
|
||||
Console::Notice( "PERF/PCR1 Unsupported Update Event Mode = 0x%x", params cpuRegs.PERF.n.pccr.b.Event1 );
|
||||
Console::Notice( "PERF/PCR1 Unsupported Update Event Mode = 0x%x", cpuRegs.PERF.n.pccr.b.Event1 );
|
||||
}
|
||||
extern int branch;
|
||||
__forceinline void COP0_UpdatePCCR()
|
||||
|
@ -339,7 +339,7 @@ void MFC0()
|
|||
if ((_Rd_ != 9) && !_Rt_ ) return;
|
||||
if (_Rd_ != 9) { COP0_LOG("%s", disR5900Current.getCString() ); }
|
||||
|
||||
//if(bExecBIOS == FALSE && _Rd_ == 25) Console::WriteLn("MFC0 _Rd_ %x = %x", params _Rd_, cpuRegs.CP0.r[_Rd_]);
|
||||
//if(bExecBIOS == FALSE && _Rd_ == 25) Console::WriteLn("MFC0 _Rd_ %x = %x", _Rd_, cpuRegs.CP0.r[_Rd_]);
|
||||
switch (_Rd_)
|
||||
{
|
||||
case 12:
|
||||
|
@ -368,7 +368,7 @@ void MFC0()
|
|||
break;
|
||||
|
||||
case 24:
|
||||
Console::WriteLn("MFC0 Breakpoint debug Registers code = %x", params cpuRegs.code & 0x3FF);
|
||||
Console::WriteLn("MFC0 Breakpoint debug Registers code = %x", cpuRegs.code & 0x3FF);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
@ -388,7 +388,7 @@ void MFC0()
|
|||
void MTC0()
|
||||
{
|
||||
COP0_LOG("%s\n", disR5900Current.getCString());
|
||||
//if(bExecBIOS == FALSE && _Rd_ == 25) Console::WriteLn("MTC0 _Rd_ %x = %x", params _Rd_, cpuRegs.CP0.r[_Rd_]);
|
||||
//if(bExecBIOS == FALSE && _Rd_ == 25) Console::WriteLn("MTC0 _Rd_ %x = %x", _Rd_, cpuRegs.CP0.r[_Rd_]);
|
||||
switch (_Rd_)
|
||||
{
|
||||
case 9:
|
||||
|
@ -401,7 +401,7 @@ void MTC0()
|
|||
break;
|
||||
|
||||
case 24:
|
||||
Console::WriteLn("MTC0 Breakpoint debug Registers code = %x", params cpuRegs.code & 0x3FF);
|
||||
Console::WriteLn("MTC0 Breakpoint debug Registers code = %x", cpuRegs.code & 0x3FF);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
|
|
|
@ -259,7 +259,7 @@ u32 UpdateVSyncRate()
|
|||
{
|
||||
m_iTicks = ticks;
|
||||
gsOnModeChanged( vSyncInfo.Framerate, m_iTicks );
|
||||
Console::Status( limiterMsg, params EmuConfig.Video.FpsLimit, 0 );
|
||||
Console::Status( limiterMsg, EmuConfig.Video.FpsLimit, 0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -269,7 +269,7 @@ u32 UpdateVSyncRate()
|
|||
{
|
||||
m_iTicks = ticks;
|
||||
gsOnModeChanged( vSyncInfo.Framerate, m_iTicks );
|
||||
Console::Status( limiterMsg, params vSyncInfo.Framerate/50, (vSyncInfo.Framerate*2)%100 );
|
||||
Console::Status( limiterMsg, vSyncInfo.Framerate/50, (vSyncInfo.Framerate*2)%100 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -478,7 +478,7 @@ __forceinline void rcntUpdate_vSync()
|
|||
if( vblankinc > 1 )
|
||||
{
|
||||
if( hsc != vSyncInfo.hScanlinesPerFrame )
|
||||
Console::WriteLn( " ** vSync > Abnormal Scanline Count: %d", params hsc );
|
||||
Console::WriteLn( " ** vSync > Abnormal Scanline Count: %d", hsc );
|
||||
hsc = 0;
|
||||
vblankinc = 0;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ typedef void (*TdisR5900F)DisFInterface;
|
|||
|
||||
// sap! it stands for string append. It's not a friendly name but for now it makes
|
||||
// the copy-paste marathon of code below more readable!
|
||||
#define _sap( str ) ssappendf( output, str, params
|
||||
#define _sap( str ) ssappendf( output, str,
|
||||
|
||||
#define dName(i) _sap("%-7s\t") i);
|
||||
#define dGPR128(i) _sap("%8.8x_%8.8x_%8.8x_%8.8x (%s),") cpuRegs.GPR.r[i].UL[3], cpuRegs.GPR.r[i].UL[2], cpuRegs.GPR.r[i].UL[1], cpuRegs.GPR.r[i].UL[0], disRNameGPR[i])
|
||||
|
@ -766,7 +766,7 @@ MakeDisF(disVWAITQ, dName("VWAITQ");)
|
|||
MakeDisF(disSYNC, dName("SYNC");)
|
||||
MakeDisF(disBREAK, dName("BREAK");)
|
||||
MakeDisF(disSYSCALL, dName("SYSCALL"); dCode();)
|
||||
MakeDisF(disCACHE, ssappendf(output, "%-7s, %x,", params "CACHE", _Rt_); dOfB();)
|
||||
MakeDisF(disCACHE, ssappendf(output, "%-7s, %x,", "CACHE", _Rt_); dOfB();)
|
||||
MakeDisF(disPREF, dName("PREF");)
|
||||
|
||||
MakeDisF(disMFSA, dName("MFSA"); dGPR64(_Rd_); dSaR();)
|
||||
|
|
|
@ -211,7 +211,7 @@ void iDumpBlock( int startpc, u8 * ptr )
|
|||
u8 fpuused[33];
|
||||
int numused, fpunumused;
|
||||
|
||||
Console::Status( "dump1 %x:%x, %x", params startpc, pc, cpuRegs.cycle );
|
||||
Console::Status( "dump1 %x:%x, %x", startpc, pc, cpuRegs.cycle );
|
||||
|
||||
g_Conf->Folders.Logs.Mkdir();
|
||||
AsciiFile eff(
|
||||
|
|
|
@ -390,7 +390,7 @@ struct ElfObject
|
|||
size = proghead[ i ].p_filesz;
|
||||
|
||||
if( proghead[ i ].p_vaddr != proghead[ i ].p_paddr )
|
||||
Console::Notice( "ElfProgram different load addrs: paddr=0x%8.8x, vaddr=0x%8.8x", params
|
||||
Console::Notice( "ElfProgram different load addrs: paddr=0x%8.8x, vaddr=0x%8.8x",
|
||||
proghead[ i ].p_paddr, proghead[ i ].p_vaddr);
|
||||
|
||||
// used to be paddr
|
||||
|
@ -477,7 +477,7 @@ struct ElfObject
|
|||
|
||||
SymNames = (char*)data.GetPtr( secthead[ i_dt ].sh_offset );
|
||||
eS = (Elf32_Sym*)data.GetPtr( secthead[ i_st ].sh_offset );
|
||||
Console::WriteLn("found %d symbols", params secthead[ i_st ].sh_size / sizeof( Elf32_Sym ));
|
||||
Console::WriteLn("found %d symbols", secthead[ i_st ].sh_size / sizeof( Elf32_Sym ));
|
||||
|
||||
for( uint i = 1; i < ( secthead[ i_st ].sh_size / sizeof( Elf32_Sym ) ); i++ ) {
|
||||
if ( ( eS[ i ].st_value != 0 ) && ( ELF32_ST_TYPE( eS[ i ].st_info ) == 2 ) ) {
|
||||
|
@ -515,14 +515,14 @@ u32 loadElfCRC( const char* filename )
|
|||
|
||||
IsoFS_init( );
|
||||
|
||||
Console::Status("loadElfCRC: %s", params filename);
|
||||
Console::Status("loadElfCRC: %s", filename);
|
||||
|
||||
int mylen = strlen( "cdromN:" );
|
||||
if ( IsoFS_findFile( filename + mylen, &toc ) == -1 ) return 0;
|
||||
|
||||
DevCon::Status( "loadElfFile: %d bytes", params toc.fileSize );
|
||||
DevCon::Status( "loadElfFile: %d bytes", toc.fileSize );
|
||||
u32 crcval = ElfObject( wxString::FromAscii( filename ), toc.fileSize ).GetCRC();
|
||||
Console::Status( "loadElfFile: %s; CRC = %8.8X", params filename, crcval );
|
||||
Console::Status( "loadElfFile: %s; CRC = %8.8X", filename, crcval );
|
||||
|
||||
return crcval;
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ void loadElfFile(const wxString& filename)
|
|||
if( memcmp( "rom0:OSDSYS", (char*)PSM( i ), 11 ) == 0 )
|
||||
{
|
||||
strcpy( (char*)PSM( i ), fnptr );
|
||||
DevCon::Status( "loadElfFile: addr %x \"%s\" -> \"%s\"", params i, "rom0:OSDSYS", fnptr );
|
||||
DevCon::Status( "loadElfFile: addr %x \"%s\" -> \"%s\"", i, "rom0:OSDSYS", fnptr );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ void __fastcall ReadFIFO_page_6(u32 mem, u64 *out)
|
|||
{
|
||||
jASSUME( (mem >= GIF_FIFO) && (mem < IPUout_FIFO) );
|
||||
|
||||
DevCon::Notice( "ReadFIFO/GIF, addr=0x%x", params mem );
|
||||
DevCon::Notice( "ReadFIFO/GIF, addr=0x%x", mem );
|
||||
|
||||
//out[0] = psHu64(mem );
|
||||
//out[1] = psHu64(mem+8);
|
||||
|
@ -190,7 +190,7 @@ void __fastcall WriteFIFO_page_7(u32 mem, const mem128_t *value)
|
|||
// All addresses in this page map to 0x7000 and 0x7010:
|
||||
mem &= 0x10;
|
||||
|
||||
IPU_LOG( "WriteFIFO/IPU, addr=0x%x", params mem );
|
||||
IPU_LOG( "WriteFIFO/IPU, addr=0x%x", mem );
|
||||
|
||||
if( mem == 0 )
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ void gsSetRegionMode( GS_RegionMode region )
|
|||
if( gsRegionMode == region ) return;
|
||||
|
||||
gsRegionMode = region;
|
||||
Console::WriteLn( "%s Display Mode Initialized.", params (( gsRegionMode == Region_PAL ) ? "PAL" : "NTSC") );
|
||||
Console::WriteLn( "%s Display Mode Initialized.", (( gsRegionMode == Region_PAL ) ? "PAL" : "NTSC") );
|
||||
UpdateVSyncRate();
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ void gsCSRwrite(u32 value)
|
|||
|
||||
// Our emulated GS has no FIFO...
|
||||
/*if( value & 0x100 ) { // FLUSH
|
||||
//Console::WriteLn("GS_CSR FLUSH GS fifo: %x (CSRr=%x)", params value, GSCSRr);
|
||||
//Console::WriteLn("GS_CSR FLUSH GS fifo: %x (CSRr=%x)", value, GSCSRr);
|
||||
}*/
|
||||
|
||||
if (value & 0x200) { // resetGS
|
||||
|
@ -226,7 +226,7 @@ void gsCSRwrite(u32 value)
|
|||
}
|
||||
else if( value & 0x100 ) // FLUSH
|
||||
{
|
||||
//Console::WriteLn("GS_CSR FLUSH GS fifo: %x (CSRr=%x)", params value, GSCSRr);
|
||||
//Console::WriteLn("GS_CSR FLUSH GS fifo: %x (CSRr=%x)", value, GSCSRr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -578,7 +578,7 @@ __forceinline void gsFrameSkip( bool forceskip )
|
|||
return;
|
||||
}
|
||||
|
||||
//Console::WriteLn( "Consecutive Frames -- Lateness: %d", params (int)( sSlowDeltaTime / m_iSlowTicks ) );
|
||||
//Console::WriteLn( "Consecutive Frames -- Lateness: %d", (int)( sSlowDeltaTime / m_iSlowTicks ) );
|
||||
|
||||
// -- Consecutive frames section --
|
||||
// Force-render consecutive frames without skipping.
|
||||
|
|
|
@ -59,7 +59,7 @@ __forceinline void gsInterrupt()
|
|||
|
||||
if (!(gif->chcr.STR))
|
||||
{
|
||||
//Console::WriteLn("Eh? why are you still interrupting! chcr %x, qwc %x, done = %x", params gif->chcr._u32, gif->qwc, done);
|
||||
//Console::WriteLn("Eh? why are you still interrupting! chcr %x, qwc %x, done = %x", gif->chcr._u32, gif->qwc, done);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ void GIFdma()
|
|||
|
||||
if ((dmacRegs->ctrl.STD == STD_GIF) && (prevcycles != 0))
|
||||
{
|
||||
Console::WriteLn("GS Stall Control Source = %x, Drain = %x\n MADR = %x, STADR = %x", params (psHu32(0xe000) >> 4) & 0x3, (psHu32(0xe000) >> 6) & 0x3, gif->madr, psHu32(DMAC_STADR));
|
||||
Console::WriteLn("GS Stall Control Source = %x, Drain = %x\n MADR = %x, STADR = %x", (psHu32(0xe000) >> 4) & 0x3, (psHu32(0xe000) >> 6) & 0x3, gif->madr, psHu32(DMAC_STADR));
|
||||
|
||||
if ((gif->madr + (gif->qwc * 16)) > psHu32(DMAC_STADR))
|
||||
{
|
||||
|
@ -276,7 +276,7 @@ void GIFdma()
|
|||
if (!gspath3done && ((gif->madr + (gif->qwc * 16)) > psHu32(DMAC_STADR)) && (id == 4))
|
||||
{
|
||||
// stalled
|
||||
Console::WriteLn("GS Stall Control Source = %x, Drain = %x\n MADR = %x, STADR = %x", params (psHu32(0xe000) >> 4) & 0x3, (psHu32(0xe000) >> 6) & 0x3,gif->madr, psHu32(DMAC_STADR));
|
||||
Console::WriteLn("GS Stall Control Source = %x, Drain = %x\n MADR = %x, STADR = %x", (psHu32(0xe000) >> 4) & 0x3, (psHu32(0xe000) >> 6) & 0x3,gif->madr, psHu32(DMAC_STADR));
|
||||
prevcycles = gscycles;
|
||||
gif->tadr -= 16;
|
||||
hwDmacIrq(DMAC_STALL_SIS);
|
||||
|
@ -443,7 +443,7 @@ void mfifoGIFtransfer(int qwc)
|
|||
{
|
||||
if (gif->tadr == spr0->madr)
|
||||
{
|
||||
//if( gifqwc > 1 ) DevCon::WriteLn("gif mfifo tadr==madr but qwc = %d", params gifqwc);
|
||||
//if( gifqwc > 1 ) DevCon::WriteLn("gif mfifo tadr==madr but qwc = %d", gifqwc);
|
||||
hwDmacIrq(DMAC_MFIFO_EMPTY);
|
||||
gifstate |= GIF_STATE_EMPTY;
|
||||
return;
|
||||
|
@ -506,8 +506,7 @@ void mfifoGIFtransfer(int qwc)
|
|||
FreezeRegs(1);
|
||||
if (mfifoGIFchain() == -1)
|
||||
{
|
||||
Console::WriteLn("GIF dmaChain error size=%d, madr=%lx, tadr=%lx", params
|
||||
gif->qwc, gif->madr, gif->tadr);
|
||||
Console::WriteLn("GIF dmaChain error size=%d, madr=%lx, tadr=%lx", gif->qwc, gif->madr, gif->tadr);
|
||||
gifstate = GIF_STATE_STALL;
|
||||
}
|
||||
FreezeRegs(0);
|
||||
|
@ -564,7 +563,7 @@ void gifMFIFOInterrupt()
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
//if(gifqwc > 0) Console::WriteLn("GIF MFIFO ending with stuff in it %x", params gifqwc);
|
||||
//if(gifqwc > 0) Console::WriteLn("GIF MFIFO ending with stuff in it %x", gifqwc);
|
||||
if (!gifmfifoirq) gifqwc = 0;
|
||||
|
||||
gspath3done = 0;
|
||||
|
|
|
@ -586,7 +586,7 @@ static __forceinline void *dmaGetAddr(u32 addr) {
|
|||
|
||||
ptr = (u8*)vtlb_GetPhyPtr(addr&0x1FFFFFF0);
|
||||
if (ptr == NULL) {
|
||||
Console::Error( "*PCSX2*: DMA error: %8.8x", params addr);
|
||||
Console::Error( "*PCSX2*: DMA error: %8.8x", addr);
|
||||
return NULL;
|
||||
}
|
||||
return ptr;
|
||||
|
|
|
@ -57,7 +57,7 @@ __forceinline mem8_t hwRead8(u32 mem)
|
|||
u8 ret;
|
||||
|
||||
if( mem >= IPU_CMD && mem < D0_CHCR )
|
||||
DevCon::Notice("Unexpected hwRead8 from 0x%x", params mem);
|
||||
DevCon::Notice("Unexpected hwRead8 from 0x%x", mem);
|
||||
|
||||
switch (mem)
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ __forceinline mem16_t hwRead16(u32 mem)
|
|||
u16 ret;
|
||||
|
||||
if( mem >= IPU_CMD && mem < D0_CHCR )
|
||||
Console::Notice("Unexpected hwRead16 from 0x%x", params mem);
|
||||
Console::Notice("Unexpected hwRead16 from 0x%x", mem);
|
||||
|
||||
switch (mem)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ static __forceinline void DmaExec8( void (*func)(), u32 mem, u8 value )
|
|||
psHu8(mem) = (u8)value;
|
||||
if ((psHu8(mem) & 0x1) && dmacRegs->ctrl.DMAE)
|
||||
{
|
||||
/*Console::WriteLn("Running DMA 8 %x", params psHu32(mem & ~0x1));*/
|
||||
/*Console::WriteLn("Running DMA 8 %x", psHu32(mem & ~0x1));*/
|
||||
func();
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ void hwWrite8(u32 mem, u8 value)
|
|||
}
|
||||
|
||||
if( mem >= IPU_CMD && mem < D0_CHCR )
|
||||
DevCon::Notice( "hwWrite8 to 0x%x = 0x%x", params mem, value );
|
||||
DevCon::Notice( "hwWrite8 to 0x%x = 0x%x", mem, value );
|
||||
|
||||
switch (mem) {
|
||||
case RCNT0_COUNT: rcntWcount(0, value); break;
|
||||
|
@ -352,7 +352,7 @@ void hwWrite8(u32 mem, u8 value)
|
|||
__forceinline void hwWrite16(u32 mem, u16 value)
|
||||
{
|
||||
if( mem >= IPU_CMD && mem < D0_CHCR )
|
||||
Console::Notice( "hwWrite16 to %x", params mem );
|
||||
Console::Notice( "hwWrite16 to %x", mem );
|
||||
|
||||
switch(mem)
|
||||
{
|
||||
|
@ -746,7 +746,7 @@ void __fastcall hwWrite32_page_03( u32 mem, u32 value )
|
|||
break;
|
||||
|
||||
case GIF_STAT: // stat is readonly
|
||||
DevCon::Notice("*PCSX2* GIFSTAT write value = 0x%x (readonly, ignored)", params value);
|
||||
DevCon::Notice("*PCSX2* GIFSTAT write value = 0x%x (readonly, ignored)", value);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1070,7 +1070,7 @@ void __fastcall hwWrite64_page_03( u32 mem, const mem64_t* srcval )
|
|||
switch (mem)
|
||||
{
|
||||
case GIF_CTRL:
|
||||
DevCon::Status("GIF_CTRL write 64", params value);
|
||||
DevCon::Status("GIF_CTRL write 64", value);
|
||||
psHu32(mem) = value & 0x8;
|
||||
if(value & 0x1)
|
||||
gsGIFReset();
|
||||
|
@ -1088,7 +1088,7 @@ void __fastcall hwWrite64_page_03( u32 mem, const mem64_t* srcval )
|
|||
// set/clear bits 0 and 2 as per the GIF_MODE value.
|
||||
const u32 bitmask = GIF_MODE_M3R | GIF_MODE_IMT;
|
||||
|
||||
Console::Status("GIFMODE64 %x", params value);
|
||||
Console::Status("GIFMODE64 %x", value);
|
||||
|
||||
psHu64(GIF_MODE) = value;
|
||||
psHu32(GIF_STAT) &= ~bitmask;
|
||||
|
|
|
@ -177,23 +177,23 @@ void ipuShutdown()
|
|||
|
||||
void ReportIPU()
|
||||
{
|
||||
Console::WriteLn("g_nDMATransfer = 0x%x.", params g_nDMATransfer);
|
||||
Console::WriteLn("FIreadpos = 0x%x, FIwritepos = 0x%x.", params FIreadpos, FIwritepos);
|
||||
Console::WriteLn("fifo_input = 0x%x.", params fifo_input);
|
||||
Console::WriteLn("FOreadpos = 0x%x, FOwritepos = 0x%x.", params FOreadpos, FOwritepos);
|
||||
Console::WriteLn("fifo_output = 0x%x.", params fifo_output);
|
||||
Console::WriteLn("g_BP = 0x%x.", params g_BP);
|
||||
Console::WriteLn("niq = 0x%x, iq = 0x%x.", params niq, iq);
|
||||
Console::WriteLn("vqclut = 0x%x.", params vqclut);
|
||||
Console::WriteLn("s_thresh = 0x%x.", params s_thresh);
|
||||
Console::WriteLn("coded_block_pattern = 0x%x.", params coded_block_pattern);
|
||||
Console::WriteLn("g_decoder = 0x%x.", params g_decoder);
|
||||
Console::WriteLn("mpeg2_scan_norm = 0x%x, mpeg2_scan_alt = 0x%x.", params mpeg2_scan_norm, mpeg2_scan_alt);
|
||||
Console::WriteLn("g_nCmdPos = 0x%x.", params g_nCmdPos);
|
||||
Console::WriteLn("g_nCmdIndex = 0x%x.", params g_nCmdIndex);
|
||||
Console::WriteLn("ipuCurCmd = 0x%x.", params ipuCurCmd);
|
||||
Console::WriteLn("_readbits = 0x%x.", params _readbits);
|
||||
Console::WriteLn("temp will equal 0x%x.", params readbits - _readbits);
|
||||
Console::WriteLn("g_nDMATransfer = 0x%x.", g_nDMATransfer);
|
||||
Console::WriteLn("FIreadpos = 0x%x, FIwritepos = 0x%x.", FIreadpos, FIwritepos);
|
||||
Console::WriteLn("fifo_input = 0x%x.", fifo_input);
|
||||
Console::WriteLn("FOreadpos = 0x%x, FOwritepos = 0x%x.", FOreadpos, FOwritepos);
|
||||
Console::WriteLn("fifo_output = 0x%x.", fifo_output);
|
||||
Console::WriteLn("g_BP = 0x%x.", g_BP);
|
||||
Console::WriteLn("niq = 0x%x, iq = 0x%x.", niq, iq);
|
||||
Console::WriteLn("vqclut = 0x%x.", vqclut);
|
||||
Console::WriteLn("s_thresh = 0x%x.", s_thresh);
|
||||
Console::WriteLn("coded_block_pattern = 0x%x.", coded_block_pattern);
|
||||
Console::WriteLn("g_decoder = 0x%x.", g_decoder);
|
||||
Console::WriteLn("mpeg2_scan_norm = 0x%x, mpeg2_scan_alt = 0x%x.", mpeg2_scan_norm, mpeg2_scan_alt);
|
||||
Console::WriteLn("g_nCmdPos = 0x%x.", g_nCmdPos);
|
||||
Console::WriteLn("g_nCmdIndex = 0x%x.", g_nCmdIndex);
|
||||
Console::WriteLn("ipuCurCmd = 0x%x.", ipuCurCmd);
|
||||
Console::WriteLn("_readbits = 0x%x.", _readbits);
|
||||
Console::WriteLn("temp will equal 0x%x.", readbits - _readbits);
|
||||
Console::WriteLn("");
|
||||
}
|
||||
// fixme - ipuFreeze looks fairly broken. Should probably take a closer look at some point.
|
||||
|
@ -980,7 +980,7 @@ void IPUWorker()
|
|||
return;
|
||||
|
||||
default:
|
||||
Console::WriteLn("Unknown IPU command: %x", params ipuRegs->cmd.CMD);
|
||||
Console::WriteLn("Unknown IPU command: %x", ipuRegs->cmd.CMD);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1631,7 +1631,7 @@ int FIFOfrom_write(const u32 *value, int size)
|
|||
|
||||
ipuRegs->ctrl.OFC += firsttrans;
|
||||
IPU0dma();
|
||||
//Console::WriteLn("Written %d qwords, %d", params firsttrans,ipuRegs->ctrl.OFC);
|
||||
//Console::WriteLn("Written %d qwords, %d", firsttrans,ipuRegs->ctrl.OFC);
|
||||
|
||||
return firsttrans;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ static void execI()
|
|||
//runs++;
|
||||
//if (runs > 1599999999){ //leave some time to startup the testgame
|
||||
// if (opcode.Name[0] == 'L') { //find all opcodes beginning with "L"
|
||||
// Console::WriteLn ("Load %s", params opcode.Name);
|
||||
// Console::WriteLn ("Load %s", opcode.Name);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ void bios_write() // 0x35/0x03
|
|||
// fixme: This should use %s with a length parameter (but I forget the exact syntax
|
||||
while (a2 > 0)
|
||||
{
|
||||
Console::Write("%c", params *ptr++);
|
||||
Console::Write("%c", *ptr++);
|
||||
a2--;
|
||||
}
|
||||
}
|
||||
|
@ -293,13 +293,13 @@ _start:
|
|||
// Note: Use Read to obtain a write pointer here, since we're just writing back the
|
||||
// temp buffer we saved earlier.
|
||||
memcpy( (void*)iopVirtMemR<void>(sp), save, 4*4);
|
||||
Console::Write( Color_Cyan, "%s", params tmp);
|
||||
Console::Write( Color_Cyan, "%s", tmp);
|
||||
pc0 = ra;
|
||||
}
|
||||
|
||||
void bios_putchar () // 3d
|
||||
{
|
||||
Console::Write( Color_Cyan, "%c", params a0 );
|
||||
Console::Write( Color_Cyan, "%c", a0 );
|
||||
pc0 = ra;
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ static void __fastcall _rcntTestTarget( int i )
|
|||
psxCounters[i].count -= psxCounters[i].target;
|
||||
if(!(psxCounters[i].mode & 0x40))
|
||||
{
|
||||
Console::WriteLn("Counter %x repeat intr not set on zero ret, ignoring target", params i);
|
||||
Console::WriteLn("Counter %x repeat intr not set on zero ret, ignoring target", i);
|
||||
psxCounters[i].target |= IOPCNT_FUTURE_TARGET;
|
||||
}
|
||||
} else psxCounters[i].target |= IOPCNT_FUTURE_TARGET;
|
||||
|
@ -639,7 +639,7 @@ __forceinline void psxRcntWmode32( int index, u32 value )
|
|||
// Need to set a rate and target
|
||||
if((counter.mode & 0x7) == 0x7 || (counter.mode & 0x7) == 0x1)
|
||||
{
|
||||
Console::WriteLn( "Gate set on IOP Counter %d, disabling", params index );
|
||||
Console::WriteLn( "Gate set on IOP Counter %d, disabling", index );
|
||||
counter.mode |= IOPCNT_STOPPED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ static void __fastcall psxDmaGeneric(u32 madr, u32 bcr, u32 chcr, u32 spuCore, _
|
|||
|
||||
if((g_psxNextBranchCycle - psxNextsCounter) > (u32)psxNextCounter)
|
||||
{
|
||||
//DevCon::Notice("SPU2async Setting new counter branch, old %x new %x ((%x - %x = %x) > %x delta)", params g_psxNextBranchCycle, psxNextsCounter + psxNextCounter, g_psxNextBranchCycle, psxNextsCounter, (g_psxNextBranchCycle - psxNextsCounter), psxNextCounter);
|
||||
//DevCon::Notice("SPU2async Setting new counter branch, old %x new %x ((%x - %x = %x) > %x delta)", g_psxNextBranchCycle, psxNextsCounter + psxNextCounter, g_psxNextBranchCycle, psxNextsCounter, (g_psxNextBranchCycle - psxNextsCounter), psxNextCounter);
|
||||
g_psxNextBranchCycle = psxNextsCounter + psxNextCounter;
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ static void __fastcall psxDmaGeneric(u32 madr, u32 bcr, u32 chcr, u32 spuCore, _
|
|||
break;
|
||||
|
||||
default:
|
||||
Console::Error("*** DMA %c - SPU unknown *** %x addr = %x size = %x", params dmaNum, chcr, madr, bcr);
|
||||
Console::Error("*** DMA %c - SPU unknown *** %x addr = %x size = %x", dmaNum, chcr, madr, bcr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -482,7 +482,7 @@ void IopDmaUpdate(u32 elapsed)
|
|||
|
||||
s32 errDmaRead(s32 channel, u32* data, u32 bytesLeft, u32* bytesProcessed)
|
||||
{
|
||||
Console::Error("ERROR: Tried to read using DMA %d (%s). Ignoring.", params 0, channel, IopDmaNames[channel]);
|
||||
Console::Error("ERROR: Tried to read using DMA %d (%s). Ignoring.", 0, channel, IopDmaNames[channel]);
|
||||
|
||||
*bytesProcessed = bytesLeft;
|
||||
return 0;
|
||||
|
@ -490,7 +490,7 @@ s32 errDmaRead(s32 channel, u32* data, u32 bytesLeft, u32* bytesProcessed)
|
|||
|
||||
s32 errDmaWrite(s32 channel, u32* data, u32 bytesLeft, u32* bytesProcessed)
|
||||
{
|
||||
Console::Error("ERROR: Tried to write using DMA %d (%s). Ignoring.", params 0, channel, IopDmaNames[channel]);
|
||||
Console::Error("ERROR: Tried to write using DMA %d (%s). Ignoring.", 0, channel, IopDmaNames[channel]);
|
||||
|
||||
*bytesProcessed = bytesLeft;
|
||||
return 0;
|
||||
|
|
|
@ -71,7 +71,7 @@ u8 psxHwRead8(u32 add) {
|
|||
case IOP_T5_COUNT:
|
||||
case IOP_T5_MODE:
|
||||
case IOP_T5_TARGET:
|
||||
DevCon::Notice( "IOP Counter Read8 from addr0x%x = 0x%x", params add, psxHu8(add) );
|
||||
DevCon::Notice( "IOP Counter Read8 from addr0x%x = 0x%x", add, psxHu8(add) );
|
||||
return psxHu8(add);
|
||||
#endif
|
||||
|
||||
|
@ -625,7 +625,7 @@ void psxHwWrite8(u32 add, u8 value) {
|
|||
USBwrite8(add, value); return;
|
||||
}
|
||||
if((add & 0xf) == 0xa)
|
||||
Console::Error("8bit write (possible chcr set) to addr 0x%x = 0x%x", params add, value );
|
||||
Console::Error("8bit write (possible chcr set) to addr 0x%x = 0x%x", add, value );
|
||||
|
||||
switch (add) {
|
||||
case 0x1f801040:
|
||||
|
@ -651,7 +651,7 @@ void psxHwWrite8(u32 add, u8 value) {
|
|||
case IOP_T5_COUNT:
|
||||
case IOP_T5_MODE:
|
||||
case IOP_T5_TARGET:
|
||||
DevCon::Notice( "IOP Counter Write8 to addr 0x%x = 0x%x", params add, value );
|
||||
DevCon::Notice( "IOP Counter Write8 to addr 0x%x = 0x%x", add, value );
|
||||
psxHu8(add) = value;
|
||||
return;
|
||||
|
||||
|
@ -675,7 +675,7 @@ void psxHwWrite8(u32 add, u8 value) {
|
|||
( value == '\n' && g_pbufi != 0 ) )
|
||||
{
|
||||
g_pbuf[g_pbufi] = 0;
|
||||
DevCon::WriteLn( Color_Cyan, "%s", params g_pbuf );
|
||||
DevCon::WriteLn( Color_Cyan, "%s", g_pbuf );
|
||||
g_pbufi = 0;
|
||||
}
|
||||
else if( value != '\n' )
|
||||
|
@ -705,7 +705,7 @@ void psxHwWrite16(u32 add, u16 value) {
|
|||
USBwrite16(add, value); return;
|
||||
}
|
||||
|
||||
if((add & 0xf) == 0x9) DevCon::WriteLn("16bit write (possible chcr set) %x value %x", params add, value);
|
||||
if((add & 0xf) == 0x9) DevCon::WriteLn("16bit write (possible chcr set) %x value %x", add, value);
|
||||
|
||||
switch (add) {
|
||||
case 0x1f801040:
|
||||
|
@ -1238,7 +1238,7 @@ void psxHwWrite32(u32 add, u32 value) {
|
|||
//------------------------------------------------------------------
|
||||
case 0x1f8014c0:
|
||||
PSXHW_LOG("RTC_HOLDMODE 32bit write %lx", value);
|
||||
Console::Notice("** RTC_HOLDMODE 32bit write %lx", params value);
|
||||
Console::Notice("** RTC_HOLDMODE 32bit write %lx", value);
|
||||
break;
|
||||
|
||||
case 0x1f801450:
|
||||
|
@ -1343,10 +1343,10 @@ void psxDmaInterrupt2(int n)
|
|||
if (HW_DMA_ICR2 & (1 << (16 + n)))
|
||||
{
|
||||
/* if (HW_DMA_ICR2 & (1 << (24 + n))) {
|
||||
Console::WriteLn("*PCSX2*: HW_DMA_ICR2 n=%d already set", params n);
|
||||
Console::WriteLn("*PCSX2*: HW_DMA_ICR2 n=%d already set", n);
|
||||
}
|
||||
if (psxHu32(0x1070) & 8) {
|
||||
Console::WriteLn("*PCSX2*: psxHu32(0x1070) 8 already set (n=%d)", params n);
|
||||
Console::WriteLn("*PCSX2*: psxHu32(0x1070) 8 already set (n=%d)", n);
|
||||
}*/
|
||||
HW_DMA_ICR2|= (1 << (24 + n));
|
||||
psxRegs.CP0.n.Cause |= 1 << (16 + n);
|
||||
|
|
|
@ -345,7 +345,7 @@ void iopMemWrite8(u32 mem, u8 value)
|
|||
{
|
||||
if (t == 0x1d00)
|
||||
{
|
||||
Console::WriteLn("sw8 [0x%08X]=0x%08X", params mem, value);
|
||||
Console::WriteLn("sw8 [0x%08X]=0x%08X", mem, value);
|
||||
psxSu8(mem) = value;
|
||||
return;
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ void iopMemWrite16(u32 mem, u16 value)
|
|||
u8* p = (u8 *)(psxMemWLUT[mem >> 16]);
|
||||
if (p != NULL && !(psxRegs.CP0.n.Status & 0x10000) )
|
||||
{
|
||||
if( t==0x1D00 ) Console::WriteLn("sw16 [0x%08X]=0x%08X", params mem, value);
|
||||
if( t==0x1D00 ) Console::WriteLn("sw16 [0x%08X]=0x%08X", mem, value);
|
||||
*(u16 *)(p + (mem & 0xffff)) = value;
|
||||
psxCpu->Clear(mem&~3, 1);
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ void sio2_serialIn(u8 value){
|
|||
sioWrite8(value);
|
||||
|
||||
if (sio2.packet.sendSize > BUFSIZE) {//asadr
|
||||
Console::Notice("*PCSX2*: sendSize >= %d", params BUFSIZE);
|
||||
Console::Notice("*PCSX2*: sendSize >= %d", BUFSIZE);
|
||||
} else {
|
||||
sio2.buf[sio2.packet.sendSize] = sioRead8();
|
||||
sio2.packet.sendSize++;
|
||||
|
@ -184,7 +184,7 @@ void sio2_fifoIn(u8 value){
|
|||
SIODMAWrite(value);
|
||||
|
||||
if (sio2.packet.sendSize > BUFSIZE) {//asadr
|
||||
Console::WriteLn("*PCSX2*: sendSize >= %d", params BUFSIZE);
|
||||
Console::WriteLn("*PCSX2*: sendSize >= %d", BUFSIZE);
|
||||
} else {
|
||||
sio2.buf[sio2.packet.sendSize] = sioRead8();
|
||||
sio2.packet.sendSize++;
|
||||
|
|
|
@ -47,7 +47,7 @@ void SysPageFaultExceptionFilter( int signal, siginfo_t *info, void * )
|
|||
// get bad virtual address
|
||||
uptr offset = (u8*)info->si_addr - psM;
|
||||
|
||||
DevCon::Status( "Protected memory cleanup. Offset 0x%x", params offset );
|
||||
DevCon::Status( "Protected memory cleanup. Offset 0x%x", offset );
|
||||
|
||||
if (offset>=Ps2MemSize::Base)
|
||||
{
|
||||
|
|
|
@ -1030,9 +1030,9 @@ void QFSRV() { // JayteeMaster: changed a bit to avoid screw up
|
|||
cpuRegs.GPR.r[_Rd_].UD[1] = cpuRegs.GPR.r[_Rt_].UD[1];
|
||||
//saZero++;
|
||||
//if( saZero >= 388800 )
|
||||
//Console::WriteLn( "SA Is Zero, Bitch: %d zeros and counting.", params saZero );
|
||||
//Console::WriteLn( "SA Is Zero, Bitch: %d zeros and counting.", saZero );
|
||||
} else {
|
||||
//Console::WriteLn( "SA Properly Valued at: %d (after %d zeros)", params sa_amt, saZero );
|
||||
//Console::WriteLn( "SA Properly Valued at: %d (after %d zeros)", sa_amt, saZero );
|
||||
//saZero = 0;
|
||||
if (sa_amt < 64) {
|
||||
/*
|
||||
|
|
|
@ -137,7 +137,7 @@ static void RegHandlerSIGNAL(const u32* data)
|
|||
|
||||
static void RegHandlerFINISH(const u32* data)
|
||||
{
|
||||
MTGS_LOG("MTGS FINISH data %x_%x CSRw %x\n", params data[0], data[1], CSRw);
|
||||
MTGS_LOG("MTGS FINISH data %x_%x CSRw %x\n", data[0], data[1], CSRw);
|
||||
|
||||
if ((CSRw & 0x2))
|
||||
{
|
||||
|
@ -396,7 +396,7 @@ __forceinline int mtgsThreadObject::_gifTransferDummy( GIF_PATH pathidx, const u
|
|||
/*if((path.tag.nloop > 0 || (!path.tag.eop && path.tag.nloop == 0)) && size == 0)
|
||||
{
|
||||
if(path1loop == true) return size - 0x400;
|
||||
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", params path.tag.nloop, path.tag.eop, path.tag.flg);
|
||||
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", path.tag.nloop, path.tag.eop, path.tag.flg);
|
||||
size = 0x400;
|
||||
pMem -= 0x4000;
|
||||
path1loop = true;
|
||||
|
@ -405,7 +405,7 @@ __forceinline int mtgsThreadObject::_gifTransferDummy( GIF_PATH pathidx, const u
|
|||
/*else if(size == 0 && pathidx == 0)
|
||||
{
|
||||
if(path1loop == true) return size - 0x400;
|
||||
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", params path.tag.nloop, path.tag.eop, path.tag.flg);
|
||||
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", path.tag.nloop, path.tag.eop, path.tag.flg);
|
||||
size = 0x400;
|
||||
pMem -= 0x4000;
|
||||
path1loop = true;
|
||||
|
@ -414,7 +414,7 @@ __forceinline int mtgsThreadObject::_gifTransferDummy( GIF_PATH pathidx, const u
|
|||
/*else if(size == 0 && pathidx == 0)
|
||||
{
|
||||
if(path1loop == true) return size - 0x400;
|
||||
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", params path.tag.nloop, path.tag.eop, path.tag.flg);
|
||||
//DevCon::Notice("Looping Nloop %x, Eop %x, FLG %x", path.tag.nloop, path.tag.eop, path.tag.flg);
|
||||
size = 0x400;
|
||||
pMem -= 0x4000;
|
||||
path1loop = true;
|
||||
|
@ -471,7 +471,7 @@ void mtgsThreadObject::PostVsyncEnd( bool updategs )
|
|||
if( m_WritePos == volatize( m_RingPos ) )
|
||||
{
|
||||
// MTGS ringbuffer is empty, but we still have queued frames in the counter? Ouch!
|
||||
Console::Error( "MTGS > Queued framecount mismatch = %d", params m_QueuedFrames );
|
||||
Console::Error( "MTGS > Queued framecount mismatch = %d", m_QueuedFrames );
|
||||
m_QueuedFrames = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ void mtgsThreadObject::_RingbufferLoop()
|
|||
uptr stackpos = ringposStack.back();
|
||||
if( stackpos != m_RingPos )
|
||||
{
|
||||
Console::Error( "MTGS Ringbuffer Critical Failure ---> %x to %x (prevCmd: %x)\n", params stackpos, m_RingPos, prevCmd.command );
|
||||
Console::Error( "MTGS Ringbuffer Critical Failure ---> %x to %x (prevCmd: %x)\n", stackpos, m_RingPos, prevCmd.command );
|
||||
}
|
||||
wxASSERT( stackpos == m_RingPos );
|
||||
prevCmd = tag;
|
||||
|
@ -668,7 +668,7 @@ void mtgsThreadObject::_RingbufferLoop()
|
|||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
default:
|
||||
Console::Error("GSThreadProc, bad packet (%x) at m_RingPos: %x, m_WritePos: %x", params tag.command, m_RingPos, m_WritePos);
|
||||
Console::Error("GSThreadProc, bad packet (%x) at m_RingPos: %x, m_WritePos: %x", tag.command, m_RingPos, m_WritePos);
|
||||
wxASSERT_MSG( false, L"Bad packet encountered in the MTGS Ringbuffer." );
|
||||
m_RingPos = m_WritePos;
|
||||
continue;
|
||||
|
@ -696,7 +696,7 @@ sptr mtgsThreadObject::ExecuteTask()
|
|||
|
||||
Console::WriteLn( (wxString)L"\t\tForced software switch: " + (renderswitch ? L"Enabled" : L"Disabled") );
|
||||
m_returncode = GSopen( (void*)&pDsp, "PCSX2", renderswitch ? 2 : 1 );
|
||||
DevCon::WriteLn( "MTGS: GSopen Finished, return code: 0x%x", params m_returncode );
|
||||
DevCon::WriteLn( "MTGS: GSopen Finished, return code: 0x%x", m_returncode );
|
||||
|
||||
GSCSRr = 0x551B4000; // 0x55190000
|
||||
m_sem_InitDone.Post();
|
||||
|
@ -915,7 +915,7 @@ int mtgsThreadObject::PrepDataPacket( GIF_PATH pathidx, const u8* srcdata, u32 s
|
|||
gif->madr += (size - retval) * 16;
|
||||
gif->qwc -= size - retval;
|
||||
}
|
||||
//if(retval < 0) DevCon::Notice("Increasing size from %x to %x path %x", params size, size-retval, pathidx+1);
|
||||
//if(retval < 0) DevCon::Notice("Increasing size from %x to %x path %x", size, size-retval, pathidx+1);
|
||||
size = size - retval;
|
||||
m_packet_size = size;
|
||||
size++; // takes into account our command qword.
|
||||
|
|
|
@ -221,7 +221,7 @@ mem8_t __fastcall _ext_memRead8 (u32 mem)
|
|||
case 7: // dev9
|
||||
{
|
||||
mem8_t retval = DEV9read8(mem & ~0xa4000000);
|
||||
Console::WriteLn("DEV9 read8 %8.8lx: %2.2lx", params mem & ~0xa4000000, retval);
|
||||
Console::WriteLn("DEV9 read8 %8.8lx: %2.2lx", mem & ~0xa4000000, retval);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ mem16_t __fastcall _ext_memRead16(u32 mem)
|
|||
case 7: // dev9
|
||||
{
|
||||
mem16_t retval = DEV9read16(mem & ~0xa4000000);
|
||||
Console::WriteLn("DEV9 read16 %8.8lx: %4.4lx", params mem & ~0xa4000000, retval);
|
||||
Console::WriteLn("DEV9 read16 %8.8lx: %4.4lx", mem & ~0xa4000000, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ mem32_t __fastcall _ext_memRead32(u32 mem)
|
|||
case 7: // dev9
|
||||
{
|
||||
mem32_t retval = DEV9read32(mem & ~0xa4000000);
|
||||
Console::WriteLn("DEV9 read32 %8.8lx: %8.8lx", params mem & ~0xa4000000, retval);
|
||||
Console::WriteLn("DEV9 read32 %8.8lx: %8.8lx", mem & ~0xa4000000, retval);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ void __fastcall _ext_memWrite8 (u32 mem, mem8_t value)
|
|||
gsWrite8(mem, value); return;
|
||||
case 7: // dev9
|
||||
DEV9write8(mem & ~0xa4000000, value);
|
||||
Console::WriteLn("DEV9 write8 %8.8lx: %2.2lx", params mem & ~0xa4000000, value);
|
||||
Console::WriteLn("DEV9 write8 %8.8lx: %2.2lx", mem & ~0xa4000000, value);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -348,7 +348,7 @@ void __fastcall _ext_memWrite16(u32 mem, mem16_t value)
|
|||
gsWrite16(mem, value); return;
|
||||
case 7: // dev9
|
||||
DEV9write16(mem & ~0xa4000000, value);
|
||||
Console::WriteLn("DEV9 write16 %8.8lx: %4.4lx", params mem & ~0xa4000000, value);
|
||||
Console::WriteLn("DEV9 write16 %8.8lx: %4.4lx", mem & ~0xa4000000, value);
|
||||
return;
|
||||
case 8: // spu2
|
||||
SPU2write(mem, value); return;
|
||||
|
@ -365,7 +365,7 @@ void __fastcall _ext_memWrite32(u32 mem, mem32_t value)
|
|||
gsWrite32(mem, value); return;
|
||||
case 7: // dev9
|
||||
DEV9write32(mem & ~0xa4000000, value);
|
||||
Console::WriteLn("DEV9 write32 %8.8lx: %8.8lx", params mem & ~0xa4000000, value);
|
||||
Console::WriteLn("DEV9 write32 %8.8lx: %8.8lx", mem & ~0xa4000000, value);
|
||||
return;
|
||||
}
|
||||
MEM_LOG("Unknown Memory write32 to address %x with data %8.8x", mem, value);
|
||||
|
@ -549,7 +549,7 @@ void __fastcall vuMicroWrite128(u32 addr,const mem128_t* data)
|
|||
|
||||
void memSetPageAddr(u32 vaddr, u32 paddr)
|
||||
{
|
||||
//Console::WriteLn("memSetPageAddr: %8.8x -> %8.8x", params vaddr, paddr);
|
||||
//Console::WriteLn("memSetPageAddr: %8.8x -> %8.8x", vaddr, paddr);
|
||||
|
||||
vtlb_VMap(vaddr,paddr,0x1000);
|
||||
|
||||
|
@ -557,7 +557,7 @@ void memSetPageAddr(u32 vaddr, u32 paddr)
|
|||
|
||||
void memClearPageAddr(u32 vaddr)
|
||||
{
|
||||
//Console::WriteLn("memClearPageAddr: %8.8x", params vaddr);
|
||||
//Console::WriteLn("memClearPageAddr: %8.8x", vaddr);
|
||||
|
||||
vtlb_VMapUnmap(vaddr,0x1000); // -> whut ?
|
||||
|
||||
|
@ -854,9 +854,9 @@ void mmap_MarkCountedRamPage( u32 paddr )
|
|||
return; // skip town if we're already protected.
|
||||
|
||||
if( m_PageProtectInfo[rampage].Mode == ProtMode_Manual )
|
||||
DbgCon::WriteLn( "dyna_page_reset @ 0x%05x", params paddr>>12 );
|
||||
DbgCon::WriteLn( "dyna_page_reset @ 0x%05x", paddr>>12 );
|
||||
else
|
||||
DbgCon::WriteLn( "Write-protected page @ 0x%05x", params paddr>>12 );
|
||||
DbgCon::WriteLn( "Write-protected page @ 0x%05x", paddr>>12 );
|
||||
|
||||
m_PageProtectInfo[rampage].Mode = ProtMode_Write;
|
||||
HostSys::MemProtect( &psM[rampage<<12], 1, Protect_ReadOnly );
|
||||
|
@ -874,7 +874,7 @@ void mmap_ClearCpuBlock( uint offset )
|
|||
jASSUME( m_PageProtectInfo[rampage].Mode != ProtMode_Manual );
|
||||
|
||||
//#ifndef __LINUX__ // this function is called from the signal handler
|
||||
//DbgCon::WriteLn( "Manual page @ 0x%05x", params m_PageProtectInfo[rampage].ReverseRamMap>>12 );
|
||||
//DbgCon::WriteLn( "Manual page @ 0x%05x", m_PageProtectInfo[rampage].ReverseRamMap>>12 );
|
||||
//#endif
|
||||
|
||||
HostSys::MemProtect( &psM[rampage<<12], 1, Protect_ReadWrite );
|
||||
|
|
|
@ -439,7 +439,7 @@ void applypatch(int place)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (place == 0) Console::WriteLn(" patchnumber: %d", params patchnumber);
|
||||
if (place == 0) Console::WriteLn(" patchnumber: %d", patchnumber);
|
||||
|
||||
for ( i = 0; i < patchnumber; i++ )
|
||||
{
|
||||
|
@ -449,13 +449,13 @@ void applypatch(int place)
|
|||
|
||||
void patchFunc_comment( char * text1, char * text2 )
|
||||
{
|
||||
Console::WriteLn( "comment: %s", params text2 );
|
||||
Console::WriteLn( "comment: %s", text2 );
|
||||
}
|
||||
|
||||
|
||||
void patchFunc_gametitle( char * text1, char * text2 )
|
||||
{
|
||||
Console::WriteLn( "gametitle: %s", params text2 );
|
||||
Console::WriteLn( "gametitle: %s", text2 );
|
||||
strgametitle.FromAscii( text2 );
|
||||
Console::SetTitle( strgametitle );
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ void patchFunc_patch( char * cmd, char * param )
|
|||
{
|
||||
// TODO : Use wxLogError for this, once we have full unicode compliance on cmd/params vars.
|
||||
//wxLogError( L"Patch ERROR: Maximum number of patches reached: %s=%s", cmd, param );
|
||||
Console::Error( "Patch ERROR: Maximum number of patches reached: %s=%s", params cmd, param );
|
||||
Console::Error( "Patch ERROR: Maximum number of patches reached: %s=%s", cmd, param );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -485,7 +485,7 @@ void patchFunc_patch( char * cmd, char * param )
|
|||
patch[ patchnumber ].cpu = (patch_cpu_type)PatchTableExecute( pText, NULL, cpuCore );
|
||||
if ( patch[ patchnumber ].cpu == 0 )
|
||||
{
|
||||
Console::Error( "Unrecognized patch '%s'", params pText );
|
||||
Console::Error( "Unrecognized patch '%s'", pText );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,7 @@ void patchFunc_patch( char * cmd, char * param )
|
|||
patch[ patchnumber ].type = (patch_data_type)PatchTableExecute( pText, NULL, dataType );
|
||||
if ( patch[ patchnumber ].type == 0 )
|
||||
{
|
||||
Console::Error( "Unrecognized patch '%s'", params pText );
|
||||
Console::Error( "Unrecognized patch '%s'", pText );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -725,7 +725,7 @@ void patchFunc_roundmode( char * cmd, char * param )
|
|||
|
||||
if( type == 0xffff )
|
||||
{
|
||||
Console::WriteLn("bad argument (%s) to round mode! skipping...\n", params pText);
|
||||
Console::WriteLn("bad argument (%s) to round mode! skipping...\n", pText);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -584,7 +584,7 @@ PluginManager::PluginManager( const wxString (&folders)[PluginId_Count] )
|
|||
{
|
||||
const PluginsEnum_t pid = pi->id;
|
||||
|
||||
Console::WriteLn( "\tBinding %s\t: %s ", params tbl_PluginInfo[pid].shortname, folders[pid].ToUTF8().data() );
|
||||
Console::WriteLn( "\tBinding %s\t: %s ", tbl_PluginInfo[pid].shortname, folders[pid].ToUTF8().data() );
|
||||
|
||||
if( folders[pid].IsEmpty() )
|
||||
throw Exception::InvalidArgument( "Empty plugin filename." );
|
||||
|
@ -771,7 +771,7 @@ void PluginManager::Open( PluginsEnum_t pid )
|
|||
{
|
||||
if( m_info[pid].IsOpened ) return;
|
||||
|
||||
Console::WriteLn( "\tOpening %s", params tbl_PluginInfo[pid].shortname );
|
||||
Console::WriteLn( "\tOpening %s", tbl_PluginInfo[pid].shortname );
|
||||
|
||||
// Each Open needs to be called explicitly. >_<
|
||||
|
||||
|
@ -807,7 +807,7 @@ void PluginManager::Open()
|
|||
void PluginManager::Close( PluginsEnum_t pid )
|
||||
{
|
||||
if( !m_info[pid].IsOpened ) return;
|
||||
DevCon::Status( "\tClosing %s", params tbl_PluginInfo[pid].shortname );
|
||||
DevCon::Status( "\tClosing %s", tbl_PluginInfo[pid].shortname );
|
||||
|
||||
if( pid == PluginId_GS )
|
||||
{
|
||||
|
@ -862,7 +862,7 @@ void PluginManager::Init()
|
|||
Console::Status( "Initializing plugins..." );
|
||||
printlog = true;
|
||||
}
|
||||
Console::WriteLn( "\tInit %s", params tbl_PluginInfo[pid].shortname );
|
||||
Console::WriteLn( "\tInit %s", tbl_PluginInfo[pid].shortname );
|
||||
m_info[pid].IsInitialized = true;
|
||||
if( 0 != m_info[pid].CommonBindings.Init() )
|
||||
throw Exception::PluginInitError( pid );
|
||||
|
@ -889,7 +889,7 @@ void PluginManager::Shutdown()
|
|||
{
|
||||
const PluginsEnum_t pid = tbl_PluginInfo[i].id;
|
||||
if( !m_info[pid].IsInitialized ) continue;
|
||||
DevCon::WriteLn( "\tShutdown %s", params tbl_PluginInfo[pid].shortname );
|
||||
DevCon::WriteLn( "\tShutdown %s", tbl_PluginInfo[pid].shortname );
|
||||
m_info[pid].IsInitialized = false;
|
||||
m_info[pid].CommonBindings.Shutdown();
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ void psxShutdown() {
|
|||
|
||||
void psxException(u32 code, u32 bd) {
|
||||
// PSXCPU_LOG("psxException %x: %x, %x", code, psxHu32(0x1070), psxHu32(0x1074));
|
||||
//Console::WriteLn("!! psxException %x: %x, %x", params code, psxHu32(0x1070), psxHu32(0x1074));
|
||||
//Console::WriteLn("!! psxException %x: %x, %x", code, psxHu32(0x1070), psxHu32(0x1074));
|
||||
// Set the Cause
|
||||
psxRegs.CP0.n.Cause &= ~0x7f;
|
||||
psxRegs.CP0.n.Cause |= code;
|
||||
|
@ -268,7 +268,7 @@ void iopTestIntc()
|
|||
|
||||
cpuSetNextBranchDelta( 16 );
|
||||
iopBranchAction = true;
|
||||
//Console::Error( "** IOP Needs an EE EventText, kthx ** %d", params psxCycleEE );
|
||||
//Console::Error( "** IOP Needs an EE EventText, kthx ** %d", psxCycleEE );
|
||||
|
||||
// Note: No need to set the iop's branch delta here, since the EE
|
||||
// will run an IOP branch test regardless.
|
||||
|
|
|
@ -260,15 +260,15 @@ void zeroEx()
|
|||
}
|
||||
|
||||
if (!strncmp(lib, "loadcore", 8) && code == 6) {
|
||||
DevCon::WriteLn("loadcore RegisterLibraryEntries (%x): %8.8s", params psxRegs.pc, iopVirtMemR<char>(psxRegs.GPR.n.a0+12));
|
||||
DevCon::WriteLn("loadcore RegisterLibraryEntries (%x): %8.8s", psxRegs.pc, iopVirtMemR<char>(psxRegs.GPR.n.a0+12));
|
||||
}
|
||||
|
||||
if (!strncmp(lib, "intrman", 7) && code == 4) {
|
||||
DevCon::WriteLn("intrman RegisterIntrHandler (%x): intr %s, handler %x", params psxRegs.pc, intrname[psxRegs.GPR.n.a0], psxRegs.GPR.n.a2);
|
||||
DevCon::WriteLn("intrman RegisterIntrHandler (%x): intr %s, handler %x", psxRegs.pc, intrname[psxRegs.GPR.n.a0], psxRegs.GPR.n.a2);
|
||||
}
|
||||
|
||||
if (!strncmp(lib, "sifcmd", 6) && code == 17) {
|
||||
DevCon::WriteLn("sifcmd sceSifRegisterRpc (%x): rpc_id %x", params psxRegs.pc, psxRegs.GPR.n.a1);
|
||||
DevCon::WriteLn("sifcmd sceSifRegisterRpc (%x): rpc_id %x", psxRegs.pc, psxRegs.GPR.n.a1);
|
||||
}
|
||||
|
||||
if (!strncmp(lib, "sysclib", 8))
|
||||
|
|
|
@ -303,7 +303,7 @@ void psxCTC0() { _rFs_ = _u32(_rRt_); }
|
|||
* Format: ? *
|
||||
*********************************************************/
|
||||
void psxNULL() {
|
||||
Console::Notice("psx: Unimplemented op %x", params psxRegs.code);
|
||||
Console::Notice("psx: Unimplemented op %x", psxRegs.code);
|
||||
}
|
||||
|
||||
void psxSPECIAL() {
|
||||
|
|
|
@ -129,7 +129,7 @@ __releaseinline void cpuException(u32 code, u32 bd)
|
|||
else if((code & 0x38000) == 0x18000)
|
||||
offset = 0x100; //Debug
|
||||
else
|
||||
Console::Error("Unknown Level 2 Exception!! Cause %x", params code);
|
||||
Console::Error("Unknown Level 2 Exception!! Cause %x", code);
|
||||
}
|
||||
|
||||
if (cpuRegs.CP0.n.Status.b.EXL == 0)
|
||||
|
@ -150,7 +150,7 @@ __releaseinline void cpuException(u32 code, u32 bd)
|
|||
else
|
||||
{
|
||||
offset = 0x180; //Override the cause
|
||||
if (errLevel2) Console::Notice("cpuException: Status.EXL = 1 cause %x", params code);
|
||||
if (errLevel2) Console::Notice("cpuException: Status.EXL = 1 cause %x", code);
|
||||
}
|
||||
|
||||
if (checkStatus)
|
||||
|
@ -164,7 +164,7 @@ __releaseinline void cpuException(u32 code, u32 bd)
|
|||
void cpuTlbMiss(u32 addr, u32 bd, u32 excode)
|
||||
{
|
||||
Console::Error("cpuTlbMiss pc:%x, cycl:%x, addr: %x, status=%x, code=%x",
|
||||
params cpuRegs.pc, cpuRegs.cycle, addr, cpuRegs.CP0.n.Status.val, excode);
|
||||
cpuRegs.pc, cpuRegs.cycle, addr, cpuRegs.CP0.n.Status.val, excode);
|
||||
|
||||
if (bd) Console::Notice("branch delay!!");
|
||||
|
||||
|
@ -321,7 +321,7 @@ static __forceinline void _cpuTestTIMR()
|
|||
if ( (cpuRegs.CP0.n.Status.val & 0x8000) &&
|
||||
cpuRegs.CP0.n.Count >= cpuRegs.CP0.n.Compare && cpuRegs.CP0.n.Count < cpuRegs.CP0.n.Compare+1000 )
|
||||
{
|
||||
Console::Status("timr intr: %x, %x", params cpuRegs.CP0.n.Count, cpuRegs.CP0.n.Compare);
|
||||
Console::Status("timr intr: %x, %x", cpuRegs.CP0.n.Count, cpuRegs.CP0.n.Compare);
|
||||
cpuException(0x808000, cpuRegs.branch);
|
||||
}
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ __forceinline void _cpuBranchTest_Shared()
|
|||
if( iopBranchAction )
|
||||
{
|
||||
//if( EEsCycle < -450 )
|
||||
// Console::WriteLn( " IOP ahead by: %d cycles", params -EEsCycle );
|
||||
// Console::WriteLn( " IOP ahead by: %d cycles", -EEsCycle );
|
||||
|
||||
// Experimental and Probably Unnecessry Logic -->
|
||||
// Check if the EE already has an exception pending, and if so we shouldn't
|
||||
|
@ -422,7 +422,7 @@ __forceinline void _cpuBranchTest_Shared()
|
|||
int cycleCount = std::min( EEsCycle, (s32)(eeWaitCycles>>4) );
|
||||
int cyclesRun = cycleCount - psxCpu->ExecuteBlock( cycleCount );
|
||||
EEsCycle -= cyclesRun;
|
||||
//Console::Notice( "IOP Exception-Pending Execution -- EEsCycle: %d", params EEsCycle );
|
||||
//Console::Notice( "IOP Exception-Pending Execution -- EEsCycle: %d", EEsCycle );
|
||||
}
|
||||
else*/
|
||||
{
|
||||
|
@ -458,7 +458,7 @@ __forceinline void _cpuBranchTest_Shared()
|
|||
// IOP extra timeslices in short order.
|
||||
|
||||
cpuSetNextBranchDelta( 48 );
|
||||
//Console::Notice( "EE ahead of the IOP -- Rapid Branch! %d", params EEsCycle );
|
||||
//Console::Notice( "EE ahead of the IOP -- Rapid Branch! %d", EEsCycle );
|
||||
}
|
||||
|
||||
// The IOP could be running ahead/behind of us, so adjust the iop's next branch by its
|
||||
|
|
|
@ -782,7 +782,7 @@ int __Deci2Call(int call, u32 *addr)
|
|||
deci2addr[3], deci2addr[2], deci2addr[1], deci2addr[0]);
|
||||
|
||||
// cpuRegs.pc = deci2handler;
|
||||
// Console::WriteLn("deci2msg: %s", params (char*)PSM(deci2addr[4]+0xc));
|
||||
// Console::WriteLn("deci2msg: %s", (char*)PSM(deci2addr[4]+0xc));
|
||||
if (deci2addr == NULL) return 1;
|
||||
if (deci2addr[1]>0xc){
|
||||
u8* pdeciaddr = (u8*)dmaGetAddr(deci2addr[4]+0xc);
|
||||
|
@ -811,7 +811,7 @@ int __Deci2Call(int call, u32 *addr)
|
|||
|
||||
case 0x10://kputs
|
||||
if( addr != NULL )
|
||||
Console::Write( Color_Cyan, "%s", params PSM(*addr));
|
||||
Console::Write( Color_Cyan, "%s", PSM(*addr));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ static __forceinline void _dmaSPR0()
|
|||
{
|
||||
if (dmacRegs->ctrl.STS == STS_fromSPR) // STS == fromSPR
|
||||
{
|
||||
Console::WriteLn("SPR0 stall %d", params(psHu32(DMAC_CTRL) >> 6)&3);
|
||||
Console::WriteLn("SPR0 stall %d", (psHu32(DMAC_CTRL) >> 6)&3);
|
||||
}
|
||||
|
||||
// Transfer Dn_QWC from SPR to Dn_MADR
|
||||
|
@ -237,7 +237,7 @@ void SPRFROMinterrupt()
|
|||
{
|
||||
if ((spr0->madr & ~psHu32(DMAC_RBSR)) != psHu32(DMAC_RBOR)) Console::WriteLn("GIF MFIFO Write outside MFIFO area");
|
||||
spr0->madr = psHu32(DMAC_RBOR) + (spr0->madr & psHu32(DMAC_RBSR));
|
||||
//Console::WriteLn("mfifoGIFtransfer %x madr %x, tadr %x", params gif->chcr._u32, gif->madr, gif->tadr);
|
||||
//Console::WriteLn("mfifoGIFtransfer %x madr %x, tadr %x", gif->chcr._u32, gif->madr, gif->tadr);
|
||||
mfifoGIFtransfer(mfifotransferred);
|
||||
mfifotransferred = 0;
|
||||
if (gif->chcr.STR) return;
|
||||
|
@ -247,7 +247,7 @@ void SPRFROMinterrupt()
|
|||
{
|
||||
if ((spr0->madr & ~psHu32(DMAC_RBSR)) != psHu32(DMAC_RBOR)) Console::WriteLn("VIF MFIFO Write outside MFIFO area");
|
||||
spr0->madr = psHu32(DMAC_RBOR) + (spr0->madr & psHu32(DMAC_RBSR));
|
||||
//Console::WriteLn("mfifoVIF1transfer %x madr %x, tadr %x", params vif1ch->chcr._u32, vif1ch->madr, vif1ch->tadr);
|
||||
//Console::WriteLn("mfifoVIF1transfer %x madr %x, tadr %x", vif1ch->chcr._u32, vif1ch->madr, vif1ch->tadr);
|
||||
mfifoVIF1transfer(mfifotransferred);
|
||||
mfifotransferred = 0;
|
||||
if (vif1ch->chcr.STR) return;
|
||||
|
|
|
@ -61,7 +61,7 @@ SaveState::SaveState( const char* msg, const wxString& destination ) :
|
|||
m_version( g_SaveVersion )
|
||||
, m_tagspace( 128 )
|
||||
{
|
||||
Console::WriteLn( "%s %s", params msg, destination.ToAscii().data() );
|
||||
Console::WriteLn( "%s %s", msg, destination.ToAscii().data() );
|
||||
}
|
||||
|
||||
s32 CALLBACK gsSafeFreeze( int mode, freezeData *data )
|
||||
|
@ -111,7 +111,7 @@ void SaveState::FreezeAll()
|
|||
"\n\tWarning: BIOS Version Mismatch, savestate may be unstable!\n"
|
||||
"\t\tCurrent BIOS: %s\n"
|
||||
"\t\tSavestate BIOS: %s\n",
|
||||
params descout.ToAscii().data(), descin
|
||||
descout.ToAscii().data(), descin
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -249,7 +249,7 @@ void gzLoadingState::FreezeMem( void* data, int size )
|
|||
void gzSavingState::FreezePlugin( const char* name, s32 (CALLBACK *freezer)(int mode, freezeData *data) )
|
||||
{
|
||||
freezeData fP = { 0, NULL };
|
||||
Console::WriteLn( "\tSaving %s", params name );
|
||||
Console::WriteLn( "\tSaving %s", name );
|
||||
|
||||
FreezeTag( name );
|
||||
|
||||
|
@ -271,7 +271,7 @@ void gzSavingState::FreezePlugin( const char* name, s32 (CALLBACK *freezer)(int
|
|||
void gzLoadingState::FreezePlugin( const char* name, s32 (CALLBACK *freezer)(int mode, freezeData *data) )
|
||||
{
|
||||
freezeData fP = { 0, NULL };
|
||||
Console::WriteLn( "\tLoading %s", params name );
|
||||
Console::WriteLn( "\tLoading %s", name );
|
||||
|
||||
FreezeTag( name );
|
||||
Freeze( fP.size );
|
||||
|
@ -338,7 +338,7 @@ void memLoadingState::FreezeMem( void* data, int size )
|
|||
void memSavingState::FreezePlugin( const char* name, s32 (CALLBACK *freezer)(int mode, freezeData *data) )
|
||||
{
|
||||
freezeData fP = { 0, NULL };
|
||||
Console::WriteLn( "\tSaving %s", params name );
|
||||
Console::WriteLn( "\tSaving %s", name );
|
||||
|
||||
if( freezer(FREEZE_SIZE, &fP) == -1 )
|
||||
throw Exception::FreezePluginFailure( name, "saving" );
|
||||
|
@ -359,7 +359,7 @@ void memSavingState::FreezePlugin( const char* name, s32 (CALLBACK *freezer)(int
|
|||
void memLoadingState::FreezePlugin( const char* name, s32 (CALLBACK *freezer)(int mode, freezeData *data) )
|
||||
{
|
||||
freezeData fP;
|
||||
Console::WriteLn( "\tLoading %s", params name );
|
||||
Console::WriteLn( "\tLoading %s", name );
|
||||
|
||||
Freeze( fP.size );
|
||||
if( fP.size == 0 ) return;
|
||||
|
|
|
@ -55,13 +55,13 @@ void SysDetect()
|
|||
|
||||
#ifdef __LINUX__
|
||||
// Haven't rigged up getting the svn version yet... --arcum42
|
||||
Notice("PCSX2 %d.%d.%d - compiled on " __DATE__, params PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo);
|
||||
Notice("PCSX2 %d.%d.%d - compiled on " __DATE__, PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo);
|
||||
#else
|
||||
Notice("PCSX2 %d.%d.%d.r%d %s - compiled on " __DATE__, params PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||
Notice("PCSX2 %d.%d.%d.r%d %s - compiled on " __DATE__, PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||
SVN_REV, SVN_MODS ? "(modded)" : ""
|
||||
);
|
||||
#endif
|
||||
Notice("Savestate version: %x", params g_SaveVersion);
|
||||
Notice("Savestate version: %x", g_SaveVersion);
|
||||
|
||||
cpudetectInit();
|
||||
|
||||
|
@ -94,7 +94,7 @@ void SysDetect()
|
|||
"\t%sDetected SSE3\n"
|
||||
"\t%sDetected SSSE3\n"
|
||||
"\t%sDetected SSE4.1\n"
|
||||
"\t%sDetected SSE4.2\n", params
|
||||
"\t%sDetected SSE4.2\n",
|
||||
x86caps.hasMultimediaExtensions ? "" : "Not ",
|
||||
x86caps.hasStreamingSIMDExtensions ? "" : "Not ",
|
||||
x86caps.hasStreamingSIMD2Extensions ? "" : "Not ",
|
||||
|
@ -111,7 +111,7 @@ void SysDetect()
|
|||
"\t%sDetected MMX2\n"
|
||||
"\t%sDetected 3DNOW\n"
|
||||
"\t%sDetected 3DNOW2\n"
|
||||
"\t%sDetected SSE4a\n", params
|
||||
"\t%sDetected SSE4a\n",
|
||||
x86caps.hasMultimediaExtensionsExt ? "" : "Not ",
|
||||
x86caps.has3DNOWInstructionExtensions ? "" : "Not ",
|
||||
x86caps.has3DNOWInstructionExtensionsExt ? "" : "Not ",
|
||||
|
@ -143,7 +143,7 @@ bool SysAllocateMem()
|
|||
// Failures on the core initialization of memory is bad, since it means the emulator is
|
||||
// completely non-functional.
|
||||
|
||||
//Msgbox::Alert( "Failed to allocate memory needed to run pcsx2.\n\nError: %s", params ex.cMessage() );
|
||||
//Msgbox::Alert( "Failed to allocate memory needed to run pcsx2.\n\nError: %s", ex.cMessage() );
|
||||
SysShutdownMem();
|
||||
return false;
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ u8 *SysMmapEx(uptr base, u32 size, uptr bounds, const char *caller)
|
|||
|
||||
if( (Mem == NULL) || (bounds != 0 && (((uptr)Mem + size) > bounds)) )
|
||||
{
|
||||
DevCon::Notice( "First try failed allocating %s at address 0x%x", params caller, base );
|
||||
DevCon::Notice( "First try failed allocating %s at address 0x%x", caller, base );
|
||||
|
||||
// memory allocation *must* have the top bit clear, so let's try again
|
||||
// with NULL (let the OS pick something for us).
|
||||
|
@ -394,7 +394,7 @@ u8 *SysMmapEx(uptr base, u32 size, uptr bounds, const char *caller)
|
|||
Mem = (u8*)HostSys::Mmap( NULL, size );
|
||||
if( bounds != 0 && (((uptr)Mem + size) > bounds) )
|
||||
{
|
||||
DevCon::Error( "Fatal Error:\n\tSecond try failed allocating %s, block ptr 0x%x does not meet required criteria.", params caller, Mem );
|
||||
DevCon::Error( "Fatal Error:\n\tSecond try failed allocating %s, block ptr 0x%x does not meet required criteria.", caller, Mem );
|
||||
SafeSysMunmap( Mem, size );
|
||||
|
||||
// returns NULL, caller should throw an exception.
|
||||
|
|
|
@ -120,7 +120,7 @@ namespace Tag
|
|||
{
|
||||
if (ptag == NULL) // Is ptag empty?
|
||||
{
|
||||
Console::Error("%s BUSERR", params s);
|
||||
Console::Error("%s BUSERR", s);
|
||||
UpperTransfer(tag, ptag);
|
||||
|
||||
// Set BEIS (BUSERR) in DMAC_STAT register
|
||||
|
@ -140,7 +140,7 @@ namespace Tag
|
|||
{
|
||||
if (ptag == NULL) // Is ptag empty?
|
||||
{
|
||||
Console::Error("%s BUSERR", params s);
|
||||
Console::Error("%s BUSERR", s);
|
||||
|
||||
// Set BEIS (BUSERR) in DMAC_STAT register
|
||||
psHu32(DMAC_STAT) |= DMAC_STAT_BEIS;
|
||||
|
@ -199,7 +199,7 @@ static __forceinline void PrintCHCR(const char* s, DMACh *tag)
|
|||
u8 num_addr = tag->chcr.ASP;
|
||||
u32 mode = tag->chcr.MOD;
|
||||
|
||||
Console::Write("%s chcr %s mem: ", params s, (tag->chcr.DIR) ? "from" : "to");
|
||||
Console::Write("%s chcr %s mem: ", s, (tag->chcr.DIR) ? "from" : "to");
|
||||
|
||||
if (mode == NORMAL_MODE)
|
||||
Console::Write(" normal mode; ");
|
||||
|
@ -210,7 +210,7 @@ static __forceinline void PrintCHCR(const char* s, DMACh *tag)
|
|||
else
|
||||
Console::Write(" ?? mode; ");
|
||||
|
||||
if (num_addr != 0) Console::Write("ASP = %d;", params num_addr);
|
||||
if (num_addr != 0) Console::Write("ASP = %d;", num_addr);
|
||||
if (tag->chcr.TTE) Console::Write("TTE;");
|
||||
if (tag->chcr.TIE) Console::Write("TIE;");
|
||||
if (tag->chcr.STR) Console::Write(" (DMA started)."); else Console::Write(" (DMA stopped).");
|
||||
|
|
|
@ -54,7 +54,7 @@ static void _vu0Exec(VURegs* VU)
|
|||
|
||||
if(VU0.VI[REG_TPC].UL >= VU0.maxmicro){
|
||||
#ifdef CPU_LOG
|
||||
Console::WriteLn("VU0 memory overflow!!: %x", params VU->VI[REG_TPC].UL);
|
||||
Console::WriteLn("VU0 memory overflow!!: %x", VU->VI[REG_TPC].UL);
|
||||
#endif
|
||||
VU0.VI[REG_VPU_STAT].UL&= ~0x1;
|
||||
VU->cycle++;
|
||||
|
@ -113,7 +113,7 @@ static void _vu0Exec(VURegs* VU)
|
|||
}
|
||||
if (lregs.VFread0 == uregs.VFwrite ||
|
||||
lregs.VFread1 == uregs.VFwrite) {
|
||||
// Console::WriteLn("saving reg %d at pc=%x", params i, VU->VI[REG_TPC].UL);
|
||||
// Console::WriteLn("saving reg %d at pc=%x", i, VU->VI[REG_TPC].UL);
|
||||
_VF = VU->VF[uregs.VFwrite];
|
||||
vfreg = uregs.VFwrite;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void vu0Exec(VURegs* VU)
|
|||
{
|
||||
if (VU->VI[REG_TPC].UL >= VU->maxmicro) {
|
||||
#ifdef CPU_LOG
|
||||
Console::Notice("VU0 memory overflow!!: %x", params VU->VI[REG_TPC].UL);
|
||||
Console::Notice("VU0 memory overflow!!: %x", VU->VI[REG_TPC].UL);
|
||||
#endif
|
||||
VU0.VI[REG_VPU_STAT].UL&= ~0x1;
|
||||
} else {
|
||||
|
|
|
@ -109,7 +109,7 @@ static void _vu1Exec(VURegs* VU)
|
|||
}
|
||||
if (lregs.VFread0 == uregs.VFwrite ||
|
||||
lregs.VFread1 == uregs.VFwrite) {
|
||||
// Console::WriteLn("saving reg %d at pc=%x", params i, VU->VI[REG_TPC].UL);
|
||||
// Console::WriteLn("saving reg %d at pc=%x", i, VU->VI[REG_TPC].UL);
|
||||
_VF = VU->VF[uregs.VFwrite];
|
||||
vfreg = uregs.VFwrite;
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ void _vuFMACAdd(VURegs * VU, int reg, int xyzw) {
|
|||
if (VU->fmac[i].enable == 1) continue;
|
||||
break;
|
||||
}
|
||||
//if (i==8) Console::Error("*PCSX2*: error , out of fmacs %d", params VU->cycle);
|
||||
//if (i==8) Console::Error("*PCSX2*: error , out of fmacs %d", VU->cycle);
|
||||
|
||||
|
||||
VUM_LOG("adding FMAC pipe[%d]; xyzw=%x", i, xyzw);
|
||||
|
@ -2062,7 +2062,7 @@ void _vuXGKICK(VURegs * VU)
|
|||
memcpy(&tempmem[temp], ptr, ((VU->VI[_Is_].US[0]*16) & 0x3fff));
|
||||
GSGIFTRANSFER1((u32*)&tempmem[0], 0);
|
||||
} else*/
|
||||
//DevCon::Notice("Addr %x", params VU->VI[_Is_].US[0] & 0x3fff);
|
||||
//DevCon::Notice("Addr %x", VU->VI[_Is_].US[0] & 0x3fff);
|
||||
|
||||
u32* data = (u32*)((u8*)VU->Mem + ((VU->VI[_Is_].US[0]*16) & 0x3fff));
|
||||
u32 size;
|
||||
|
@ -2072,10 +2072,10 @@ void _vuXGKICK(VURegs * VU)
|
|||
|
||||
/* if((size << 4) > (u32)(0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff)))
|
||||
{
|
||||
//DevCon::Notice("addr + Size = 0x%x, transferring %x then doing %x", params ((VU->VI[_Is_].US[0]*16) & 0x3fff) + (size << 4), (0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff)) >> 4, size - (0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff) >> 4));
|
||||
//DevCon::Notice("addr + Size = 0x%x, transferring %x then doing %x", ((VU->VI[_Is_].US[0]*16) & 0x3fff) + (size << 4), (0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff)) >> 4, size - (0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff) >> 4));
|
||||
memcpy_aligned(pmem, (u8*)VU->Mem+((VU->VI[_Is_].US[0]*16) & 0x3fff), 0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff));
|
||||
size -= (0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff)) >> 4;
|
||||
//DevCon::Notice("Size left %x", params size);
|
||||
//DevCon::Notice("Size left %x", size);
|
||||
pmem += 0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff);
|
||||
memcpy_aligned(pmem, (u8*)VU->Mem, size<<4);
|
||||
}
|
||||
|
|
|
@ -495,7 +495,7 @@ void mfifoVIF1transfer(int qwc)
|
|||
int temp = vif1ch->madr; //Temporarily Store ADDR
|
||||
vif1ch->madr = psHu32(DMAC_RBOR) + ((vif1ch->tadr + 16) & psHu32(DMAC_RBSR)); //Set MADR to QW following the tag
|
||||
vif1ch->tadr = temp; //Copy temporarily stored ADDR to Tag
|
||||
if ((temp & psHu32(DMAC_RBSR)) != psHu32(DMAC_RBOR)) Console::WriteLn("Next tag = %x outside ring %x size %x", params temp, psHu32(DMAC_RBOR), psHu32(DMAC_RBSR));
|
||||
if ((temp & psHu32(DMAC_RBSR)) != psHu32(DMAC_RBOR)) Console::WriteLn("Next tag = %x outside ring %x size %x", temp, psHu32(DMAC_RBOR), psHu32(DMAC_RBSR));
|
||||
vif1.done = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -311,7 +311,7 @@ static void ProcessMemSkip(int size, unsigned int unpackType, const unsigned int
|
|||
VIFUNPACK_LOG("Processing V4-5 skip, size = %d", size);
|
||||
break;
|
||||
default:
|
||||
Console::WriteLn("Invalid unpack type %x", params unpackType);
|
||||
Console::WriteLn("Invalid unpack type %x", unpackType);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -399,9 +399,9 @@ static int VIFalign(u32 *data, vifCode *v, unsigned int size, const unsigned int
|
|||
|
||||
if (((u32)size / (u32)ft->dsize) < ((u32)ft->qsize - vifRegs->offset))
|
||||
{
|
||||
DevCon::Error("Wasn't enough left size/dsize = %x left to write %x", params(size / ft->dsize), (ft->qsize - vifRegs->offset));
|
||||
DevCon::Error("Wasn't enough left size/dsize = %x left to write %x", (size / ft->dsize), (ft->qsize - vifRegs->offset));
|
||||
}
|
||||
unpacksize = min((size / ft->dsize), (ft->qsize - vifRegs->offset));
|
||||
unpacksize = min((size / ft->dsize), (ft->qsize - vifRegs->offset));
|
||||
|
||||
|
||||
VIFUNPACK_LOG("Increasing dest by %x from offset %x", (4 - ft->qsize) + unpacksize, vifRegs->offset);
|
||||
|
@ -416,7 +416,7 @@ static int VIFalign(u32 *data, vifCode *v, unsigned int size, const unsigned int
|
|||
}
|
||||
else
|
||||
{
|
||||
DevCon::Notice("Offset = %x", params vifRegs->offset);
|
||||
DevCon::Notice("Offset = %x", vifRegs->offset);
|
||||
vif->tag.addr += unpacksize * 4;
|
||||
return size>>2;
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
|
|||
}
|
||||
else
|
||||
{
|
||||
//DevCon::Notice("VIF%x Unpack ending %x > %x", params VIFdmanum, tempsize, VIFdmanum ? 0x4000 : 0x1000);
|
||||
//DevCon::Notice("VIF%x Unpack ending %x > %x", VIFdmanum, tempsize, VIFdmanum ? 0x4000 : 0x1000);
|
||||
tempsize = size;
|
||||
size = 0;
|
||||
}
|
||||
|
@ -822,9 +822,9 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
|
|||
|
||||
if(vifRegs->cycle.cl > 0) // Quicker and avoids zero division :P
|
||||
if((u32)(((size / ft->gsize) / vifRegs->cycle.cl) * vifRegs->cycle.wl) < vifRegs->num)
|
||||
DevCon::Notice("Filling write warning! %x < %x and CL = %x WL = %x", params (size / ft->gsize), vifRegs->num, vifRegs->cycle.cl, vifRegs->cycle.wl);
|
||||
DevCon::Notice("Filling write warning! %x < %x and CL = %x WL = %x", (size / ft->gsize), vifRegs->num, vifRegs->cycle.cl, vifRegs->cycle.wl);
|
||||
|
||||
//DevCon::Notice("filling write %d cl %d, wl %d mask %x mode %x unpacktype %x addr %x", params vifRegs->num, vifRegs->cycle.cl, vifRegs->cycle.wl, vifRegs->mask, vifRegs->mode, unpackType, vif->tag.addr);
|
||||
//DevCon::Notice("filling write %d cl %d, wl %d mask %x mode %x unpacktype %x addr %x", vifRegs->num, vifRegs->cycle.cl, vifRegs->cycle.wl, vifRegs->mask, vifRegs->mode, unpackType, vif->tag.addr);
|
||||
while (vifRegs->num > 0)
|
||||
{
|
||||
if (vif->cl == vifRegs->cycle.wl)
|
||||
|
@ -881,7 +881,7 @@ static void vuExecMicro(u32 addr, const u32 VIFdmanum)
|
|||
}
|
||||
|
||||
if (VU->vifRegs->itops > (VIFdmanum ? 0x3ffu : 0xffu))
|
||||
Console::WriteLn("VIF%d ITOP overrun! %x", params VIFdmanum, VU->vifRegs->itops);
|
||||
Console::WriteLn("VIF%d ITOP overrun! %x", VIFdmanum, VU->vifRegs->itops);
|
||||
|
||||
VU->vifRegs->itop = VU->vifRegs->itops;
|
||||
|
||||
|
@ -929,7 +929,7 @@ static __forceinline void vif0UNPACK(u32 *data)
|
|||
|
||||
if (vif0Regs->cycle.wl == 0 && vif0Regs->cycle.wl < vif0Regs->cycle.cl)
|
||||
{
|
||||
Console::WriteLn("Vif0 CL %d, WL %d", params vif0Regs->cycle.cl, vif0Regs->cycle.wl);
|
||||
Console::WriteLn("Vif0 CL %d, WL %d", vif0Regs->cycle.cl, vif0Regs->cycle.wl);
|
||||
vif0.cmd &= ~0x7f;
|
||||
return;
|
||||
}
|
||||
|
@ -963,7 +963,7 @@ static __forceinline void vif0UNPACK(u32 *data)
|
|||
|
||||
static __forceinline void vif0mpgTransfer(u32 addr, u32 *data, int size)
|
||||
{
|
||||
/* Console::WriteLn("vif0mpgTransfer addr=%x; size=%x", params addr, size);
|
||||
/* Console::WriteLn("vif0mpgTransfer addr=%x; size=%x", addr, size);
|
||||
{
|
||||
FILE *f = fopen("vu1.raw", "wb");
|
||||
fwrite(data, 1, size*4, f);
|
||||
|
@ -983,7 +983,7 @@ static __forceinline void vif0mpgTransfer(u32 addr, u32 *data, int size)
|
|||
|
||||
static int __fastcall Vif0TransNull(u32 *data) // Shouldnt go here
|
||||
{
|
||||
Console::WriteLn("VIF0 Shouldnt go here CMD = %x", params vif0Regs->code);
|
||||
Console::WriteLn("VIF0 Shouldnt go here CMD = %x", vif0Regs->code);
|
||||
vif0.cmd = 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1225,7 +1225,7 @@ static void Vif0CMDNull() // invalid opcode
|
|||
// if ME1, then force the vif to interrupt
|
||||
if (!(vif0Regs->err.ME1)) //Ignore vifcode and tag mismatch error
|
||||
{
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x", params vif0.cmd);
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x", vif0.cmd);
|
||||
vif0Regs->stat |= VIF0_STAT_ER1;
|
||||
vif0.irq++;
|
||||
}
|
||||
|
@ -1255,7 +1255,7 @@ int VIF0transfer(u32 *data, int size, int istag)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (vif0.tag.size != 0) Console::WriteLn("no vif0 cmd but tag size is left last cmd read %x", params vif0Regs->code);
|
||||
if (vif0.tag.size != 0) Console::WriteLn("no vif0 cmd but tag size is left last cmd read %x", vif0Regs->code);
|
||||
|
||||
// if interrupt and new cmd is NOT MARK
|
||||
if (vif0.irq) break;
|
||||
|
@ -1277,7 +1277,7 @@ int VIF0transfer(u32 *data, int size, int istag)
|
|||
{
|
||||
if (!(vif0Regs->err.ME1)) //Ignore vifcode and tag mismatch error
|
||||
{
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x", params vif0.cmd);
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x", vif0.cmd);
|
||||
vif0Regs->stat |= VIF0_STAT_ER1;
|
||||
vif0.irq++;
|
||||
}
|
||||
|
@ -1329,7 +1329,7 @@ int VIF0transfer(u32 *data, int size, int istag)
|
|||
vif0ch->madr += (transferred << 4);
|
||||
vif0ch->qwc -= transferred;
|
||||
}
|
||||
//else Console::WriteLn("Stall on vif0, FromSPR = %x, Vif0MADR = %x Sif0MADR = %x STADR = %x", params psHu32(0x1000d010), vif0ch->madr, psHu32(0x1000c010), psHu32(DMAC_STADR));
|
||||
//else Console::WriteLn("Stall on vif0, FromSPR = %x, Vif0MADR = %x Sif0MADR = %x STADR = %x", psHu32(0x1000d010), vif0ch->madr, psHu32(0x1000c010), psHu32(DMAC_STADR));
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
@ -1443,7 +1443,7 @@ void vif0Interrupt()
|
|||
}
|
||||
}
|
||||
|
||||
if (!vif0ch->chcr.STR) Console::WriteLn("Vif0 running when CHCR = %x", params vif0ch->chcr._u32);
|
||||
if (!vif0ch->chcr.STR) Console::WriteLn("Vif0 running when CHCR = %x", vif0ch->chcr._u32);
|
||||
|
||||
if ((vif0ch->chcr.MOD == CHAIN_MODE) && (!vif0.done) && (!vif0.vifstalled))
|
||||
{
|
||||
|
@ -1464,7 +1464,7 @@ void vif0Interrupt()
|
|||
}
|
||||
|
||||
if (vif0ch->qwc > 0) Console::WriteLn("VIF0 Ending with QWC left");
|
||||
if (vif0.cmd != 0) Console::WriteLn("vif0.cmd still set %x", params vif0.cmd);
|
||||
if (vif0.cmd != 0) Console::WriteLn("vif0.cmd still set %x", vif0.cmd);
|
||||
|
||||
vif0ch->chcr.STR = 0;
|
||||
hwDmacIrq(DMAC_VIF0);
|
||||
|
@ -1522,7 +1522,7 @@ void dmaVIF0()
|
|||
{
|
||||
if (_VIF0chain() == -2)
|
||||
{
|
||||
Console::WriteLn("Stall on normal %x", params vif0Regs->stat);
|
||||
Console::WriteLn("Stall on normal %x", vif0Regs->stat);
|
||||
vif0.vifstalled = true;
|
||||
return;
|
||||
}
|
||||
|
@ -1555,7 +1555,7 @@ void vif0Write32(u32 mem, u32 value)
|
|||
if (value & 0x1)
|
||||
{
|
||||
/* Reset VIF */
|
||||
//Console::WriteLn("Vif0 Reset %x", params vif0Regs->stat);
|
||||
//Console::WriteLn("Vif0 Reset %x", vif0Regs->stat);
|
||||
memzero_obj(vif0);
|
||||
vif0ch->qwc = 0; //?
|
||||
cpuRegs.interrupt &= ~1; //Stop all vif0 DMA's
|
||||
|
@ -1641,7 +1641,7 @@ void vif0Write32(u32 mem, u32 value)
|
|||
break;
|
||||
|
||||
default:
|
||||
Console::WriteLn("Unknown Vif0 write to %x", params mem);
|
||||
Console::WriteLn("Unknown Vif0 write to %x", mem);
|
||||
psHu32(mem) = value;
|
||||
break;
|
||||
}
|
||||
|
@ -1698,7 +1698,7 @@ static __forceinline void vif1UNPACK(u32 *data)
|
|||
{
|
||||
if (vif1Regs->cycle.wl < vif1Regs->cycle.cl)
|
||||
{
|
||||
Console::WriteLn("Vif1 CL %d, WL %d", params vif1Regs->cycle.cl, vif1Regs->cycle.wl);
|
||||
Console::WriteLn("Vif1 CL %d, WL %d", vif1Regs->cycle.cl, vif1Regs->cycle.wl);
|
||||
vif1.cmd &= ~0x7f;
|
||||
return;
|
||||
}
|
||||
|
@ -1737,7 +1737,7 @@ static __forceinline void vif1UNPACK(u32 *data)
|
|||
|
||||
static __forceinline void vif1mpgTransfer(u32 addr, u32 *data, int size)
|
||||
{
|
||||
/* Console::WriteLn("vif1mpgTransfer addr=%x; size=%x", params addr, size);
|
||||
/* Console::WriteLn("vif1mpgTransfer addr=%x; size=%x", addr, size);
|
||||
{
|
||||
FILE *f = fopen("vu1.raw", "wb");
|
||||
fwrite(data, 1, size*4, f);
|
||||
|
@ -1757,7 +1757,7 @@ static __forceinline void vif1mpgTransfer(u32 addr, u32 *data, int size)
|
|||
|
||||
static int __fastcall Vif1TransNull(u32 *data) // Shouldnt go here
|
||||
{
|
||||
Console::WriteLn("Shouldnt go here CMD = %x", params vif1Regs->code);
|
||||
Console::WriteLn("Shouldnt go here CMD = %x", vif1Regs->code);
|
||||
vif1.cmd = 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -2038,7 +2038,7 @@ u8 schedulepath3msk = 0;
|
|||
void Vif1MskPath3() // MSKPATH3
|
||||
{
|
||||
vif1Regs->mskpath3 = schedulepath3msk & 0x1;
|
||||
//Console::WriteLn("VIF MSKPATH3 %x", params vif1Regs->mskpath3);
|
||||
//Console::WriteLn("VIF MSKPATH3 %x", vif1Regs->mskpath3);
|
||||
|
||||
if (vif1Regs->mskpath3)
|
||||
{
|
||||
|
@ -2147,7 +2147,7 @@ static void Vif1CMDNull() // invalid opcode
|
|||
|
||||
if (!(vif1Regs->err.ME1)) //Ignore vifcode and tag mismatch error
|
||||
{
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x\n", params vif1.cmd);
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x\n", vif1.cmd);
|
||||
vif1Regs->stat |= VIF1_STAT_ER1;
|
||||
vif1.irq++;
|
||||
}
|
||||
|
@ -2225,7 +2225,7 @@ int VIF1transfer(u32 *data, int size, int istag)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (vif1.tag.size != 0) DevCon::Error("no vif1 cmd but tag size is left last cmd read %x", params vif1Regs->code);
|
||||
if (vif1.tag.size != 0) DevCon::Error("no vif1 cmd but tag size is left last cmd read %x", vif1Regs->code);
|
||||
|
||||
if (vif1.irq) break;
|
||||
|
||||
|
@ -2245,7 +2245,7 @@ int VIF1transfer(u32 *data, int size, int istag)
|
|||
{
|
||||
if (!(vif0Regs->err.ME1)) //Ignore vifcode and tag mismatch error
|
||||
{
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x", params vif1.cmd);
|
||||
Console::WriteLn("UNKNOWN VifCmd: %x", vif1.cmd);
|
||||
vif1Regs->stat |= VIF1_STAT_ER1;
|
||||
vif1.irq++;
|
||||
}
|
||||
|
@ -2298,7 +2298,7 @@ int VIF1transfer(u32 *data, int size, int istag)
|
|||
vif1ch->qwc -= transferred;
|
||||
|
||||
if ((vif1ch->qwc == 0) && (vif1.irqoffset == 0)) vif1.inprogress = 0;
|
||||
//Console::WriteLn("Stall on vif1, FromSPR = %x, Vif1MADR = %x Sif0MADR = %x STADR = %x", params psHu32(0x1000d010), vif1ch->madr, psHu32(0x1000c010), psHu32(DMAC_STADR));
|
||||
//Console::WriteLn("Stall on vif1, FromSPR = %x, Vif1MADR = %x Sif0MADR = %x STADR = %x", psHu32(0x1000d010), vif1ch->madr, psHu32(0x1000c010), psHu32(DMAC_STADR));
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
@ -2511,7 +2511,7 @@ __forceinline void vif1Interrupt()
|
|||
|
||||
}
|
||||
|
||||
if (!(vif1ch->chcr.STR)) Console::WriteLn("Vif1 running when CHCR == %x", params vif1ch->chcr._u32);
|
||||
if (!(vif1ch->chcr.STR)) Console::WriteLn("Vif1 running when CHCR == %x", vif1ch->chcr._u32);
|
||||
|
||||
if (vif1.irq && vif1.tag.size == 0)
|
||||
{
|
||||
|
@ -2564,7 +2564,7 @@ __forceinline void vif1Interrupt()
|
|||
}
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if (vif1ch->qwc > 0) Console::WriteLn("VIF1 Ending with %x QWC left");
|
||||
if (vif1.cmd != 0) Console::WriteLn("vif1.cmd still set %x tag size %x", params vif1.cmd, vif1.tag.size);
|
||||
if (vif1.cmd != 0) Console::WriteLn("vif1.cmd still set %x tag size %x", vif1.cmd, vif1.tag.size);
|
||||
#endif
|
||||
|
||||
vif1Regs->stat &= ~VIF1_STAT_VPS; //Vif goes idle as the stall happened between commands;
|
||||
|
@ -2593,7 +2593,7 @@ void dmaVIF1()
|
|||
{
|
||||
//Console::WriteLn("VIFMFIFO\n");
|
||||
// Test changed because the Final Fantasy 12 opening somehow has the tag in *Undefined* mode, which is not in the documentation that I saw.
|
||||
if (vif1ch->chcr.MOD == NORMAL_MODE) Console::WriteLn("MFIFO mode is normal (which isn't normal here)! %x", params vif1ch->chcr);
|
||||
if (vif1ch->chcr.MOD == NORMAL_MODE) Console::WriteLn("MFIFO mode is normal (which isn't normal here)! %x", vif1ch->chcr);
|
||||
vifMFIFOInterrupt();
|
||||
return;
|
||||
}
|
||||
|
@ -2601,7 +2601,7 @@ void dmaVIF1()
|
|||
#ifdef PCSX2_DEVBUILD
|
||||
if (dmacRegs->ctrl.STD == STD_VIF1)
|
||||
{
|
||||
//DevCon::WriteLn("VIF Stall Control Source = %x, Drain = %x", params (psHu32(0xe000) >> 4) & 0x3, (psHu32(0xe000) >> 6) & 0x3);
|
||||
//DevCon::WriteLn("VIF Stall Control Source = %x, Drain = %x", (psHu32(0xe000) >> 4) & 0x3, (psHu32(0xe000) >> 6) & 0x3);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2782,7 +2782,7 @@ void vif1Write32(u32 mem, u32 value)
|
|||
break;
|
||||
|
||||
default:
|
||||
Console::WriteLn("Unknown Vif1 write to %x", params mem);
|
||||
Console::WriteLn("Unknown Vif1 write to %x", mem);
|
||||
psHu32(mem) = value;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ void ConsoleLogFrame::OnMoveAround( wxMoveEvent& evt )
|
|||
wxRect snapzone( topright - wxSize( 8,8 ), wxSize( 16,16 ) );
|
||||
|
||||
m_conf.AutoDock = snapzone.Contains( GetPosition() );
|
||||
//Console::WriteLn( "DockCheck: %d", params g_Conf->ConLogBox.AutoDock );
|
||||
//Console::WriteLn( "DockCheck: %d", g_Conf->ConLogBox.AutoDock );
|
||||
if( m_conf.AutoDock )
|
||||
{
|
||||
SetPosition( topright + wxSize( 1,0 ) );
|
||||
|
@ -620,21 +620,6 @@ namespace Console
|
|||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall Write( const char* fmt )
|
||||
{
|
||||
_immediate_logger( fmt );
|
||||
|
||||
if( wxTheApp == NULL ) return false;
|
||||
|
||||
wxCommandEvent evt( wxEVT_LOG_Write );
|
||||
evt.SetString( wxString::FromAscii( fmt ) );
|
||||
evt.SetExtraLong( th_CurrentColor );
|
||||
wxGetApp().ProgramLog_PostEvent( evt );
|
||||
wxGetApp().ProgramLog_CountMsg();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall Write( const wxString& fmt )
|
||||
{
|
||||
_immediate_logger( fmt );
|
||||
|
@ -650,27 +635,6 @@ namespace Console
|
|||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall WriteLn( const char* fmt )
|
||||
{
|
||||
const wxString fmtline( wxString::FromAscii( fmt ) + L"\n" );
|
||||
_immediate_logger( fmtline );
|
||||
|
||||
if( emuLog != NULL )
|
||||
fflush( emuLog );
|
||||
|
||||
// Implementation note: I've duplicated Write+Newline behavior here to avoid polluting
|
||||
// the message pump with lots of erroneous messages (Newlines can be bound into Write message).
|
||||
|
||||
if( wxTheApp == NULL ) return false;
|
||||
wxCommandEvent evt( wxEVT_LOG_Write );
|
||||
evt.SetString( fmtline );
|
||||
evt.SetExtraLong( th_CurrentColor );
|
||||
wxGetApp().ProgramLog_PostEvent( evt );
|
||||
wxGetApp().ProgramLog_CountMsg();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool __fastcall WriteLn( const wxString& fmt )
|
||||
{
|
||||
const wxString fmtline( fmt + L"\n" );
|
||||
|
|
|
@ -77,7 +77,7 @@ void Pcsx2App::OnKeyDown( wxKeyEvent& evt )
|
|||
else
|
||||
StatesC = (StatesC+1) % NUM_STATES;
|
||||
|
||||
Console::Notice( " > Selected savestate slot %d", params StatesC);
|
||||
Console::Notice( " > Selected savestate slot %d", StatesC);
|
||||
|
||||
if( GSchangeSaveState != NULL )
|
||||
GSchangeSaveState(StatesC, SaveState::GetFilename(StatesC).mb_str());
|
||||
|
@ -158,7 +158,7 @@ void Pcsx2App::OnKeyDown( wxKeyEvent& evt )
|
|||
{
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
iDumpRegisters(cpuRegs.pc, 0);
|
||||
Console::Notice("hardware registers dumped EE:%x, IOP:%x\n", params cpuRegs.pc, psxRegs.pc);
|
||||
Console::Notice("hardware registers dumped EE:%x, IOP:%x\n", cpuRegs.pc, psxRegs.pc);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
|
|
@ -178,7 +178,7 @@ void IniLoader::_EnumEntry( const wxString& var, int& value, const wxChar* const
|
|||
if( enumArray[i] == NULL )
|
||||
{
|
||||
Console::Notice( wxsFormat( L"Loadini Warning: Unrecognized value '%s' on key '%s'\n\tUsing the default setting of '%s'.",
|
||||
params retval.c_str(), var.c_str(), enumArray[defvalue]
|
||||
retval.c_str(), var.c_str(), enumArray[defvalue]
|
||||
) );
|
||||
value = defvalue;
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ void MainEmuFrame::Menu_RunIso_Click( wxCommandEvent &event )
|
|||
|
||||
void MainEmuFrame::Menu_IsoRecent_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Console::Status( "%d", params event.GetId() - g_RecentIsoList->GetBaseId() );
|
||||
//Console::Status( "%d", event.GetId() - g_RecentIsoList->GetBaseId() );
|
||||
//Console::WriteLn( Color_Magenta, g_RecentIsoList->GetHistoryFile( event.GetId() - g_RecentIsoList->GetBaseId() ) );
|
||||
}
|
||||
|
||||
|
@ -174,13 +174,13 @@ void MainEmuFrame::Menu_OpenELF_Click(wxCommandEvent &event)
|
|||
void MainEmuFrame::Menu_LoadStates_Click(wxCommandEvent &event)
|
||||
{
|
||||
int id = event.GetId() - MenuId_State_Load01 - 1;
|
||||
Console::WriteLn("If this were hooked up, it would load slot %d.", params id);
|
||||
Console::WriteLn("If this were hooked up, it would load slot %d.", id);
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_SaveStates_Click(wxCommandEvent &event)
|
||||
{
|
||||
int id = event.GetId() - MenuId_State_Save01 - 1;
|
||||
Console::WriteLn("If this were hooked up, it would save slot %d.", params id);
|
||||
Console::WriteLn("If this were hooked up, it would save slot %d.", id);
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_LoadStateOther_Click(wxCommandEvent &event)
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
if ( ((version >> 16)&0xff) == tbl_PluginInfo[pluginTypeIndex].version )
|
||||
return true;
|
||||
|
||||
Console::Notice("%s Plugin %s: Version %x != %x", params info.shortname, m_plugpath.c_str(), 0xff&(version >> 16), info.version);
|
||||
Console::Notice("%s Plugin %s: Version %x != %x", info.shortname, m_plugpath.c_str(), 0xff&(version >> 16), info.version);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -74,11 +74,11 @@ void States_Load(int num)
|
|||
|
||||
if( !wxFileExists( file ) )
|
||||
{
|
||||
Console::Notice( "Savestate slot %d is empty.", params num );
|
||||
Console::Notice( "Savestate slot %d is empty.", num );
|
||||
return;
|
||||
}
|
||||
|
||||
Console::Status( "Loading savestate from slot %d...", params num );
|
||||
Console::Status( "Loading savestate from slot %d...", num );
|
||||
States_Load( file );
|
||||
HostGui::Notice( wxsFormat( _("Loaded State (slot %d)"), num ) );
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void States_Save( const wxString& file )
|
|||
|
||||
void States_Save(int num)
|
||||
{
|
||||
Console::Status( "Saving savestate to slot %d...", params num );
|
||||
Console::Status( "Saving savestate to slot %d...", num );
|
||||
States_Save( SaveState::GetFilename( num ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ bool i18n_SetLanguage( int wxLangId )
|
|||
{
|
||||
if( !wxLocale::IsAvailable( wxLangId ) )
|
||||
{
|
||||
Console::Notice( "Invalid Language Identifier (wxID=%d).", params wxLangId );
|
||||
Console::Notice( "Invalid Language Identifier (wxID=%d).", wxLangId );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ static void loadBiosRom( const wxChar *ext, u8 *dest, long maxSize )
|
|||
Bios1 = Path::ReplaceExtension( Bios, ext );
|
||||
if( (filesize=Path::GetFileSize( Bios1 ) ) <= 0 )
|
||||
{
|
||||
Console::Notice( "Load Bios Warning: %s not found (this is not an error!)", params wxString(ext).ToAscii().data() );
|
||||
Console::Notice( "Load Bios Warning: %s not found (this is not an error!)", wxString(ext).ToAscii().data() );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ void LoadBIOS()
|
|||
}
|
||||
|
||||
BiosVersion = GetBiosVersion();
|
||||
Console::Status("Bios Version %d.%d", params BiosVersion >> 8, BiosVersion & 0xff);
|
||||
Console::Status("Bios Version %d.%d", BiosVersion >> 8, BiosVersion & 0xff);
|
||||
|
||||
//injectIRX("host.irx"); //not fully tested; still buggy
|
||||
|
||||
|
|
|
@ -50,12 +50,12 @@ mem8_t __fastcall iopHwRead8_Page1( u32 addr )
|
|||
default:
|
||||
if( masked_addr >= 0x100 && masked_addr < 0x130 )
|
||||
{
|
||||
DevCon::Notice( "HwRead8 from Counter16 [ignored], addr 0x%08x = 0x%02x", params addr, psxHu8(addr) );
|
||||
DevCon::Notice( "HwRead8 from Counter16 [ignored], addr 0x%08x = 0x%02x", addr, psxHu8(addr) );
|
||||
ret = psxHu8( addr );
|
||||
}
|
||||
else if( masked_addr >= 0x480 && masked_addr < 0x4a0 )
|
||||
{
|
||||
DevCon::Notice( "HwRead8 from Counter32 [ignored], addr 0x%08x = 0x%02x", params addr, psxHu8(addr) );
|
||||
DevCon::Notice( "HwRead8 from Counter32 [ignored], addr 0x%08x = 0x%02x", addr, psxHu8(addr) );
|
||||
ret = psxHu8( addr );
|
||||
}
|
||||
else if( (masked_addr >= pgmsk(HW_USB_START)) && (masked_addr < pgmsk(HW_USB_END)) )
|
||||
|
@ -215,7 +215,7 @@ static __forceinline T _HwRead_16or32_Page1( u32 addr )
|
|||
ret = SPU2read( addr );
|
||||
else
|
||||
{
|
||||
DevCon::Notice( "HwRead32 from SPU2? (addr=0x%08X) .. What manner of trickery is this?!", params addr );
|
||||
DevCon::Notice( "HwRead32 from SPU2? (addr=0x%08X) .. What manner of trickery is this?!", addr );
|
||||
ret = psxHu32(addr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,12 +84,12 @@ void __fastcall iopHwWrite8_Page1( u32 addr, mem8_t val )
|
|||
default:
|
||||
if( masked_addr >= 0x100 && masked_addr < 0x130 )
|
||||
{
|
||||
DevCon::Notice( "HwWrite8 to Counter16 [ignored], addr 0x%08x = 0x%02x", params addr, psxHu8(addr) );
|
||||
DevCon::Notice( "HwWrite8 to Counter16 [ignored], addr 0x%08x = 0x%02x", addr, psxHu8(addr) );
|
||||
psxHu8( addr ) = val;
|
||||
}
|
||||
else if( masked_addr >= 0x480 && masked_addr < 0x4a0 )
|
||||
{
|
||||
DevCon::Notice( "HwWrite8 to Counter32 [ignored], addr 0x%08x = 0x%02x", params addr, psxHu8(addr) );
|
||||
DevCon::Notice( "HwWrite8 to Counter32 [ignored], addr 0x%08x = 0x%02x", addr, psxHu8(addr) );
|
||||
psxHu8( addr ) = val;
|
||||
}
|
||||
else if( masked_addr >= pgmsk(HW_USB_START) && masked_addr < pgmsk(HW_USB_END) )
|
||||
|
@ -240,7 +240,7 @@ static __forceinline void _HwWrite_16or32_Page1( u32 addr, T val )
|
|||
SPU2write( addr, val );
|
||||
else
|
||||
{
|
||||
DevCon::Notice( "HwWrite32 to SPU2? (addr=0x%08X) .. What manner of trickery is this?!", params addr );
|
||||
DevCon::Notice( "HwWrite32 to SPU2? (addr=0x%08X) .. What manner of trickery is this?!", addr );
|
||||
//psxHu(addr) = val;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ __forceinline DataType __fastcall MemOp_r0(u32 addr)
|
|||
//has to: translate, find function, call function
|
||||
u32 hand=(u8)vmv;
|
||||
u32 paddr=ppf-hand+0x80000000;
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X",params addr,paddr);
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X", addr,paddr);
|
||||
//return reinterpret_cast<TemplateHelper<DataSize,false>::HandlerType*>(vtlbdata.RWFT[TemplateHelper<DataSize,false>::sidx][0][hand])(paddr,data);
|
||||
|
||||
switch( DataSize )
|
||||
|
@ -113,7 +113,7 @@ __forceinline void __fastcall MemOp_r1(u32 addr, DataType* data)
|
|||
//has to: translate, find function, call function
|
||||
u32 hand=(u8)vmv;
|
||||
u32 paddr=ppf-hand+0x80000000;
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X",params addr,paddr);
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X", addr,paddr);
|
||||
//return reinterpret_cast<TemplateHelper<DataSize,false>::HandlerType*>(RWFT[TemplateHelper<DataSize,false>::sidx][0][hand])(paddr,data);
|
||||
|
||||
switch( DataSize )
|
||||
|
@ -141,7 +141,7 @@ __forceinline void __fastcall MemOp_w0(u32 addr, DataType data)
|
|||
//has to: translate, find function, call function
|
||||
u32 hand=(u8)vmv;
|
||||
u32 paddr=ppf-hand+0x80000000;
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X",params addr,paddr);
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X", addr,paddr);
|
||||
|
||||
switch( DataSize )
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ __forceinline void __fastcall MemOp_w1(u32 addr,const DataType* data)
|
|||
//has to: translate, find function, call function
|
||||
u32 hand=(u8)vmv;
|
||||
u32 paddr=ppf-hand+0x80000000;
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X",params addr,paddr);
|
||||
//Console::WriteLn("Translated 0x%08X to 0x%08X", addr,paddr);
|
||||
switch( DataSize )
|
||||
{
|
||||
case 64: return ((vtlbMemW64FP*)vtlbdata.RWFT[3][1][hand])(paddr, data);
|
||||
|
@ -236,7 +236,7 @@ static const char* _getModeStr( u32 mode )
|
|||
// Generates a tlbMiss Exception
|
||||
static __forceinline void vtlb_Miss(u32 addr,u32 mode)
|
||||
{
|
||||
//Console::Error( "vtlb miss : addr 0x%X, mode %d [%s]", params addr, mode, _getModeStr(mode) );
|
||||
//Console::Error( "vtlb miss : addr 0x%X, mode %d [%s]", addr, mode, _getModeStr(mode) );
|
||||
//verify(false);
|
||||
throw R5900Exception::TLBMiss( addr, !!mode );
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ static __forceinline void vtlb_Miss(u32 addr,u32 mode)
|
|||
// Eventually should generate a BusError exception.
|
||||
static __forceinline void vtlb_BusError(u32 addr,u32 mode)
|
||||
{
|
||||
//Console::Error( "vtlb bus error : addr 0x%X, mode %d\n", params addr, _getModeStr(mode) );
|
||||
//Console::Error( "vtlb bus error : addr 0x%X, mode %d\n", addr, _getModeStr(mode) );
|
||||
//verify(false);
|
||||
throw R5900Exception::BusError( addr, !!mode );
|
||||
}
|
||||
|
@ -295,17 +295,17 @@ template<u32 saddr>
|
|||
void __fastcall vtlbUnmappedPWrite128(u32 addr,const mem128_t* data) { vtlb_BusError(addr|saddr,1); }
|
||||
|
||||
///// VTLB mapping errors (unmapped address spaces)
|
||||
mem8_t __fastcall vtlbDefaultPhyRead8(u32 addr) { Console::Error("vtlbDefaultPhyRead8: 0x%X",params addr); verify(false); return -1; }
|
||||
mem16_t __fastcall vtlbDefaultPhyRead16(u32 addr) { Console::Error("vtlbDefaultPhyRead16: 0x%X",params addr); verify(false); return -1; }
|
||||
mem32_t __fastcall vtlbDefaultPhyRead32(u32 addr) { Console::Error("vtlbDefaultPhyRead32: 0x%X",params addr); verify(false); return -1; }
|
||||
void __fastcall vtlbDefaultPhyRead64(u32 addr,mem64_t* data) { Console::Error("vtlbDefaultPhyRead64: 0x%X",params addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyRead128(u32 addr,mem128_t* data) { Console::Error("vtlbDefaultPhyRead128: 0x%X",params addr); verify(false); }
|
||||
mem8_t __fastcall vtlbDefaultPhyRead8(u32 addr) { Console::Error("vtlbDefaultPhyRead8: 0x%X",addr); verify(false); return -1; }
|
||||
mem16_t __fastcall vtlbDefaultPhyRead16(u32 addr) { Console::Error("vtlbDefaultPhyRead16: 0x%X",addr); verify(false); return -1; }
|
||||
mem32_t __fastcall vtlbDefaultPhyRead32(u32 addr) { Console::Error("vtlbDefaultPhyRead32: 0x%X",addr); verify(false); return -1; }
|
||||
void __fastcall vtlbDefaultPhyRead64(u32 addr,mem64_t* data) { Console::Error("vtlbDefaultPhyRead64: 0x%X",addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyRead128(u32 addr,mem128_t* data) { Console::Error("vtlbDefaultPhyRead128: 0x%X",addr); verify(false); }
|
||||
|
||||
void __fastcall vtlbDefaultPhyWrite8(u32 addr,mem8_t data) { Console::Error("vtlbDefaultPhyWrite8: 0x%X",params addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite16(u32 addr,mem16_t data) { Console::Error("vtlbDefaultPhyWrite16: 0x%X",params addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite32(u32 addr,mem32_t data) { Console::Error("vtlbDefaultPhyWrite32: 0x%X",params addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite64(u32 addr,const mem64_t* data) { Console::Error("vtlbDefaultPhyWrite64: 0x%X",params addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite128(u32 addr,const mem128_t* data) { Console::Error("vtlbDefaultPhyWrite128: 0x%X",params addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite8(u32 addr,mem8_t data) { Console::Error("vtlbDefaultPhyWrite8: 0x%X",addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite16(u32 addr,mem16_t data) { Console::Error("vtlbDefaultPhyWrite16: 0x%X",addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite32(u32 addr,mem32_t data) { Console::Error("vtlbDefaultPhyWrite32: 0x%X",addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite64(u32 addr,const mem64_t* data) { Console::Error("vtlbDefaultPhyWrite64: 0x%X",addr); verify(false); }
|
||||
void __fastcall vtlbDefaultPhyWrite128(u32 addr,const mem128_t* data) { Console::Error("vtlbDefaultPhyWrite128: 0x%X",addr); verify(false); }
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -231,7 +231,7 @@ int __stdcall ProfilerThread(void* nada)
|
|||
rv += lst[i].ToString(tick_count);
|
||||
}
|
||||
|
||||
Console::WriteLn("+Sampling Profiler Results-\n%s\n+>", params rv.ToAscii().data() );
|
||||
Console::WriteLn("+Sampling Profiler Results-\n%s\n+>", rv.ToAscii().data() );
|
||||
|
||||
tick_count=0;
|
||||
|
||||
|
|
|
@ -60,10 +60,10 @@ void recCOP2_SPECIAL(s32 info);
|
|||
void recCOP2_BC2(s32 info);
|
||||
void recCOP2_SPECIAL2(s32 info);
|
||||
void rec_C2UNK( s32 info ) {
|
||||
Console::Error("Cop2 bad opcode: %x", params cpuRegs.code);
|
||||
Console::Error("Cop2 bad opcode: %x", cpuRegs.code);
|
||||
}
|
||||
void _vuRegs_C2UNK(VURegs * VU, _VURegsNum *VUregsn) {
|
||||
Console::Error("Cop2 bad _vuRegs code:%x", params cpuRegs.code);
|
||||
Console::Error("Cop2 bad _vuRegs code:%x", cpuRegs.code);
|
||||
}
|
||||
|
||||
static void recCFC2(s32 info)
|
||||
|
|
|
@ -154,7 +154,7 @@ static void iIopDumpBlock( int startpc, u8 * ptr )
|
|||
u8 used[34];
|
||||
int numused, count;
|
||||
|
||||
Console::WriteLn( "dump1 %x:%x, %x", params startpc, psxpc, psxRegs.cycle );
|
||||
Console::WriteLn( "dump1 %x:%x, %x", startpc, psxpc, psxRegs.cycle );
|
||||
g_Conf->Folders.Logs.Mkdir();
|
||||
|
||||
wxString filename( Path::Combine( g_Conf->Folders.Logs, wxsFormat( L"psxdump%.8X.txt", startpc ) ) );
|
||||
|
@ -830,7 +830,7 @@ static void checkcodefn()
|
|||
#else
|
||||
__asm__("movl %%eax, %[pctemp]" : : [pctemp]"m"(pctemp) );
|
||||
#endif
|
||||
Console::WriteLn("iop code changed! %x", params pctemp);
|
||||
Console::WriteLn("iop code changed! %x", pctemp);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1776,7 +1776,7 @@ static void rpsxCOP0() { rpsxCP0[_Rs_](); }
|
|||
//static void rpsxBASIC() { rpsxCP2BSC[_Rs_](); }
|
||||
|
||||
static void rpsxNULL() {
|
||||
Console::WriteLn("psxUNK: %8.8x", params psxRegs.code);
|
||||
Console::WriteLn("psxUNK: %8.8x", psxRegs.code);
|
||||
}
|
||||
|
||||
void (*rpsxBSC[64])() = {
|
||||
|
|
|
@ -148,32 +148,32 @@ void recMTSAH( void )
|
|||
////////////////////////////////////////////////////
|
||||
void recNULL( void )
|
||||
{
|
||||
Console::Error("EE: Unimplemented op %x", params cpuRegs.code);
|
||||
Console::Error("EE: Unimplemented op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
void recUnknown()
|
||||
{
|
||||
// TODO : Unknown ops should throw an exception.
|
||||
Console::Error("EE: Unrecognized op %x", params cpuRegs.code);
|
||||
Console::Error("EE: Unrecognized op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
void recMMI_Unknown()
|
||||
{
|
||||
// TODO : Unknown ops should throw an exception.
|
||||
Console::Error("EE: Unrecognized MMI op %x", params cpuRegs.code);
|
||||
Console::Error("EE: Unrecognized MMI op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
void recCOP0_Unknown()
|
||||
{
|
||||
// TODO : Unknown ops should throw an exception.
|
||||
Console::Error("EE: Unrecognized COP0 op %x", params cpuRegs.code);
|
||||
Console::Error("EE: Unrecognized COP0 op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
void recCOP1_Unknown()
|
||||
{
|
||||
// TODO : Unknown ops should throw an exception.
|
||||
Console::Error("EE: Unrecognized FPU/COP1 op %x", params cpuRegs.code);
|
||||
Console::Error("EE: Unrecognized FPU/COP1 op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
|
|
|
@ -103,13 +103,13 @@ static u32 runCount = 0;
|
|||
#define cmpB Console::WriteLn
|
||||
#define cmpPrint(cond) { \
|
||||
if (cond) { \
|
||||
cmpA("%s", params str1); \
|
||||
cmpA("%s", params str2); \
|
||||
cmpA("%s", str1); \
|
||||
cmpA("%s", str2); \
|
||||
mVUdebugNow = 1; \
|
||||
} \
|
||||
else { \
|
||||
cmpB("%s", params str1); \
|
||||
cmpB("%s", params str2); \
|
||||
cmpB("%s", str1); \
|
||||
cmpB("%s", str2); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ namespace VU1micro
|
|||
{
|
||||
if((VU0.VI[REG_VPU_STAT].UL & 0x100) == 0) return;
|
||||
assert((VU1.VI[ REG_TPC ].UL&7) == 0);
|
||||
if (VU1.VI[REG_TPC].UL >= VU1.maxmicro) { Console::Error("VU1 memory overflow!!: %x", params VU1.VI[REG_TPC].UL); }
|
||||
if (VU1.VI[REG_TPC].UL >= VU1.maxmicro) { Console::Error("VU1 memory overflow!!: %x", VU1.VI[REG_TPC].UL); }
|
||||
|
||||
#ifdef DEBUG_COMPARE
|
||||
SysPrintf("(%08d) StartPC = 0x%04x\n", runAmount, VU1.VI[REG_TPC].UL);
|
||||
|
@ -282,7 +282,7 @@ namespace VU1micro
|
|||
if (useMVU1) runVUrec(VU1.VI[REG_TPC].UL, 3000000, 1);
|
||||
else {
|
||||
if (VU1.VI[REG_TPC].UL >= VU1.maxmicro) {
|
||||
Console::Error("VU1 memory overflow!!: %x", params VU1.VI[REG_TPC].UL);
|
||||
Console::Error("VU1 memory overflow!!: %x", VU1.VI[REG_TPC].UL);
|
||||
}
|
||||
do { // while loop needed since not always will return finished
|
||||
SuperVUExecuteProgram(VU1.VI[REG_TPC].UL & 0x3fff, 1);
|
||||
|
|
|
@ -308,7 +308,7 @@ u32* recGetImm64(u32 hi, u32 lo)
|
|||
imm64[0] = lo;
|
||||
imm64[1] = hi;
|
||||
|
||||
//Console::Notice("Consts allocated: %d of %u", params (recConstBufPtr - recConstBuf) / 2, count);
|
||||
//Console::Notice("Consts allocated: %d of %u", (recConstBufPtr - recConstBuf) / 2, count);
|
||||
|
||||
return imm64;
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ void recEventTest()
|
|||
if( g_globalXMMSaved || g_globalMMXSaved)
|
||||
{
|
||||
DevCon::Error("Pcsx2 Foopah! Frozen regs have not been restored!!!");
|
||||
DevCon::Error("g_globalXMMSaved = %d,g_globalMMXSaved = %d",params g_globalXMMSaved, g_globalMMXSaved);
|
||||
DevCon::Error("g_globalXMMSaved = %d,g_globalMMXSaved = %d", g_globalXMMSaved, g_globalMMXSaved);
|
||||
}
|
||||
assert( !g_globalXMMSaved && !g_globalMMXSaved);
|
||||
#endif
|
||||
|
@ -896,12 +896,12 @@ void iFlushCall(int flushtype)
|
|||
// int i;
|
||||
// for(i = 0; i < 32; ++i ) {
|
||||
// if( fpuRegs.fpr[i].UL== 0x7f800000 || fpuRegs.fpr[i].UL == 0xffc00000) {
|
||||
// Console::WriteLn("bad fpu: %x %x %x", params i, cpuRegs.cycle, g_lastpc);
|
||||
// Console::WriteLn("bad fpu: %x %x %x", i, cpuRegs.cycle, g_lastpc);
|
||||
// }
|
||||
//
|
||||
// if( VU0.VF[i].UL[0] == 0xffc00000 || //(VU0.VF[i].UL[1]&0xffc00000) == 0xffc00000 ||
|
||||
// VU0.VF[i].UL[0] == 0x7f800000) {
|
||||
// Console::WriteLn("bad vu0: %x %x %x", params i, cpuRegs.cycle, g_lastpc);
|
||||
// Console::WriteLn("bad vu0: %x %x %x", i, cpuRegs.cycle, g_lastpc);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
@ -1048,7 +1048,7 @@ static void checkcodefn()
|
|||
__asm__("movl %%eax, %[pctemp]" : [pctemp]"=m"(pctemp) );
|
||||
#endif
|
||||
|
||||
Console::Error("code changed! %x", params pctemp);
|
||||
Console::Error("code changed! %x", pctemp);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
@ -1118,7 +1118,7 @@ void recompileNextInstruction(int delayslot)
|
|||
case 1:
|
||||
switch(_Rt_) {
|
||||
case 0: case 1: case 2: case 3: case 0x10: case 0x11: case 0x12: case 0x13:
|
||||
Console::Notice("branch %x in delay slot!", params cpuRegs.code);
|
||||
Console::Notice("branch %x in delay slot!", cpuRegs.code);
|
||||
_clearNeededX86regs();
|
||||
_clearNeededMMXregs();
|
||||
_clearNeededXMMregs();
|
||||
|
@ -1127,7 +1127,7 @@ void recompileNextInstruction(int delayslot)
|
|||
break;
|
||||
|
||||
case 2: case 3: case 4: case 5: case 6: case 7: case 0x14: case 0x15: case 0x16: case 0x17:
|
||||
Console::Notice("branch %x in delay slot!", params cpuRegs.code);
|
||||
Console::Notice("branch %x in delay slot!", cpuRegs.code);
|
||||
_clearNeededX86regs();
|
||||
_clearNeededMMXregs();
|
||||
_clearNeededXMMregs();
|
||||
|
@ -1197,7 +1197,7 @@ void badespfn() {
|
|||
// Called when a block under manual protection fails it's pre-execution integrity check.
|
||||
void __fastcall dyna_block_discard(u32 start,u32 sz)
|
||||
{
|
||||
DevCon::WriteLn("dyna_block_discard .. start=0x%08X size=%d", params start, sz*4);
|
||||
DevCon::WriteLn("dyna_block_discard .. start=0x%08X size=%d", start, sz*4);
|
||||
recClear(start, sz);
|
||||
}
|
||||
|
||||
|
@ -1294,7 +1294,7 @@ void recRecompile( const u32 startpc )
|
|||
willbranch3 = 1;
|
||||
s_nEndBlock = i;
|
||||
|
||||
//DevCon::Notice( "Pagesplit @ %08X : size=%d insts", params startpc, (i-startpc) / 4 );
|
||||
//DevCon::Notice( "Pagesplit @ %08X : size=%d insts", startpc, (i-startpc) / 4 );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1517,12 +1517,12 @@ StartRecomp:
|
|||
|
||||
// note: clearcnt is measured per-page, not per-block!
|
||||
//DbgCon::WriteLn( "Manual block @ %08X : size=%3d page/offs=%05X/%03X inpgsz=%d clearcnt=%d",
|
||||
// params startpc, sz, inpage_ptr>>12, inpage_ptr&0xfff, inpage_sz, manual_counter[inpage_ptr >> 12] );
|
||||
// startpc, sz, inpage_ptr>>12, inpage_ptr&0xfff, inpage_sz, manual_counter[inpage_ptr >> 12] );
|
||||
}
|
||||
else
|
||||
{
|
||||
DbgCon::Notice( "Uncounted Manual block @ %08X : size=%3d page/offs=%05X/%03X inpgsz=%d",
|
||||
params startpc, sz, inpage_ptr>>12, inpage_ptr&0xfff, pgsz, inpage_sz );
|
||||
startpc, sz, inpage_ptr>>12, inpage_ptr&0xfff, pgsz, inpage_sz );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ void assertmem()
|
|||
{
|
||||
__asm mov s_tempaddr, ecx
|
||||
__asm mov s_bCachingMem, edx
|
||||
Console::Error("%x(%x) not mem write!", params s_tempaddr, s_bCachingMem);
|
||||
Console::Error("%x(%x) not mem write!", s_tempaddr, s_bCachingMem);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ microVUf(int) mVUfindLeastUsedProg() {
|
|||
mVU->prog.prog[i].isOld = 0;
|
||||
mVU->prog.prog[i].used = 1;
|
||||
mVUsortProg(mVU, i);
|
||||
Console::Notice("microVU%d: Cached MicroPrograms = [%03d] [%03d]", params vuIndex, i+1, mVU->prog.total+1);
|
||||
Console::Notice("microVU%d: Cached MicroPrograms = [%03d] [%03d]", vuIndex, i+1, mVU->prog.total+1);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ microVUf(int) mVUfindLeastUsedProg() {
|
|||
mVU->prog.prog[pIdx].isOld = 0;
|
||||
mVU->prog.prog[pIdx].used = 1;
|
||||
mVUsortProg(mVU, pIdx);
|
||||
Console::Notice("microVU%d: Cached MicroPrograms = [%03d] [%03d]", params vuIndex, pIdx+1, mVU->prog.total+1);
|
||||
Console::Notice("microVU%d: Cached MicroPrograms = [%03d] [%03d]", vuIndex, pIdx+1, mVU->prog.total+1);
|
||||
return pIdx;
|
||||
}
|
||||
|
||||
|
@ -211,11 +211,11 @@ microVUt(void) mVUvsyncUpdate(mV) {
|
|||
mVU->prog.total--;
|
||||
if (!mVU->index) mVUclearProg<0>(i);
|
||||
else mVUclearProg<1>(i);
|
||||
DevCon::Status("microVU%d: Killing Dead Program [%03d]", params mVU->index, i+1);
|
||||
DevCon::Status("microVU%d: Killing Dead Program [%03d]", mVU->index, i+1);
|
||||
}
|
||||
else if (((mVU->prog.curFrame - mVU->prog.prog[i].frame) >= (30 * 1)) && !mVU->prog.prog[i].isOld) {
|
||||
mVU->prog.prog[i].isOld = 1;
|
||||
//DevCon::Status("microVU%d: Aging Old Program [%03d]", params mVU->index, i+1);
|
||||
//DevCon::Status("microVU%d: Aging Old Program [%03d]", mVU->index, i+1);
|
||||
}
|
||||
}
|
||||
mVU->prog.curFrame++;
|
||||
|
@ -225,7 +225,7 @@ microVUf(bool) mVUcmpPartial(int progIndex) {
|
|||
microVU* mVU = mVUx;
|
||||
for (int i = 0; i <= mVUprogI.ranges.total; i++) {
|
||||
if ((mVUprogI.ranges.range[i][0] < 0)
|
||||
|| (mVUprogI.ranges.range[i][1] < 0)) { DevCon::Error("microVU%d: Negative Range![%d][%d]", params mVU->index, i, mVUprogI.ranges.total); }
|
||||
|| (mVUprogI.ranges.range[i][1] < 0)) { DevCon::Error("microVU%d: Negative Range![%d][%d]", mVU->index, i, mVUprogI.ranges.total); }
|
||||
if (memcmp_mmx(cmpOffset(mVUprogI.data), cmpOffset(mVU->regs->Micro), ((mVUprogI.ranges.range[i][1] + 8) - mVUprogI.ranges.range[i][0]))) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
microBlockLink* linkI = &blockList;
|
||||
for (int i = 0; i <= listI; i++) {
|
||||
DevCon::Status("[%04x][Block #%d][q=%02d][p=%02d][xgkick=%d][vi15=%08x][viBackup=%02d][flags=%02x][exactMatch=%x]",
|
||||
params pc, i, linkI->block->pState.q, linkI->block->pState.p, linkI->block->pState.xgkick, linkI->block->pState.vi15,
|
||||
pc, i, linkI->block->pState.q, linkI->block->pState.p, linkI->block->pState.xgkick, linkI->block->pState.vi15,
|
||||
linkI->block->pState.viBackUp, linkI->block->pState.flags, linkI->block->pState.needExactMatch);
|
||||
linkI = linkI->next;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
case 2: regX = gprF2; break; \
|
||||
case 3: regX = gprF3; break; \
|
||||
default: \
|
||||
Console::Error("microVU Error: fInst = %d", params fInst); \
|
||||
Console::Error("microVU Error: fInst = %d", fInst); \
|
||||
regX = gprF0; \
|
||||
break; \
|
||||
} \
|
||||
|
|
|
@ -383,7 +383,7 @@ microVUt(void) analyzeBranchVI(mV, int xReg, bool &infoVar) {
|
|||
infoVar = 1;
|
||||
}
|
||||
iPC = bPC;
|
||||
DevCon::Status("microVU%d: Branch VI-Delay (%d) [%04x]", params getIndex, i, xPC);
|
||||
DevCon::Status("microVU%d: Branch VI-Delay (%d) [%04x]", getIndex, i, xPC);
|
||||
}
|
||||
else iPC = bPC;
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ microVUt(int) mVUbranchCheck(mV) {
|
|||
incPC(2);
|
||||
mVUlow.evilBranch = 1;
|
||||
mVUregs.blockType = 2;
|
||||
DevCon::Status("microVU%d Warning: Branch in Branch delay slot! [%04x]", params mVU->index, xPC);
|
||||
DevCon::Status("microVU%d Warning: Branch in Branch delay slot! [%04x]", mVU->index, xPC);
|
||||
return 1;
|
||||
}
|
||||
incPC(2);
|
||||
|
@ -434,7 +434,7 @@ microVUt(void) mVUanalyzeJump(mV, int Is, int It, bool isJALR) {
|
|||
if (mVUconstReg[Is].isValid && !CHECK_VU_CONSTHACK) {
|
||||
mVUlow.constJump.isValid = 1;
|
||||
mVUlow.constJump.regValue = mVUconstReg[Is].regValue;
|
||||
//DevCon::Status("microVU%d: Constant JR/JALR Address Optimization", params mVU->index);
|
||||
//DevCon::Status("microVU%d: Constant JR/JALR Address Optimization", mVU->index);
|
||||
}
|
||||
analyzeVIreg1(Is, mVUlow.VI_read[0]);
|
||||
if (isJALR) {
|
||||
|
|
|
@ -68,7 +68,7 @@ microVUt(void) mVUsetupRange(mV, s32 pc, bool isStartPC) {
|
|||
mVUcurProg.ranges.total = 0;
|
||||
mVUrange[0] = 0;
|
||||
mVUrange[1] = mVU->microMemSize - 8;
|
||||
DevCon::Status("microVU%d: Prog Range List Full", params mVU->index);
|
||||
DevCon::Status("microVU%d: Prog Range List Full", mVU->index);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -82,7 +82,7 @@ microVUt(void) mVUsetupRange(mV, s32 pc, bool isStartPC) {
|
|||
&& (mVUcurProg.ranges.range[i][1] <= rEnd)){
|
||||
mVUcurProg.ranges.range[i][1] = pc;
|
||||
mergedRange = 1;
|
||||
//DevCon::Status("microVU%d: Prog Range Merging", params mVU->index);
|
||||
//DevCon::Status("microVU%d: Prog Range Merging", mVU->index);
|
||||
}
|
||||
}
|
||||
if (mergedRange) {
|
||||
|
@ -92,7 +92,7 @@ microVUt(void) mVUsetupRange(mV, s32 pc, bool isStartPC) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
DevCon::Status("microVU%d: Prog Range Wrap [%04x] [%d]", params mVU->index, mVUrange[0], mVUrange[1]);
|
||||
DevCon::Status("microVU%d: Prog Range Wrap [%04x] [%d]", mVU->index, mVUrange[0], mVUrange[1]);
|
||||
mVUrange[1] = mVU->microMemSize - 8;
|
||||
if (mVUcurProg.ranges.total < mVUcurProg.ranges.max) {
|
||||
mVUcurProg.ranges.total++;
|
||||
|
@ -103,16 +103,16 @@ microVUt(void) mVUsetupRange(mV, s32 pc, bool isStartPC) {
|
|||
mVUcurProg.ranges.total = 0;
|
||||
mVUrange[0] = 0;
|
||||
mVUrange[1] = mVU->microMemSize - 8;
|
||||
DevCon::Status("microVU%d: Prog Range List Full", params mVU->index);
|
||||
DevCon::Status("microVU%d: Prog Range List Full", mVU->index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
microVUt(void) startLoop(mV) {
|
||||
if (curI & _Mbit_) { Console::Status("microVU%d: M-bit set!", params getIndex); }
|
||||
if (curI & _Dbit_) { DevCon::Status ("microVU%d: D-bit set!", params getIndex); }
|
||||
if (curI & _Tbit_) { DevCon::Status ("microVU%d: T-bit set!", params getIndex); }
|
||||
if (curI & _Mbit_) { Console::Status("microVU%d: M-bit set!", getIndex); }
|
||||
if (curI & _Dbit_) { DevCon::Status ("microVU%d: D-bit set!", getIndex); }
|
||||
if (curI & _Tbit_) { DevCon::Status ("microVU%d: T-bit set!", getIndex); }
|
||||
memset(&mVUinfo, 0, sizeof(mVUinfo));
|
||||
memset(&mVUregsTemp, 0, sizeof(mVUregsTemp));
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ microVUt(void) doIbit(mV) {
|
|||
mVU->regAlloc->clearRegVF(33);
|
||||
|
||||
if (CHECK_VU_OVERFLOW && ((curI & 0x7fffffff) >= 0x7f800000)) {
|
||||
Console::Status("microVU%d: Clamping I Reg", params mVU->index);
|
||||
Console::Status("microVU%d: Clamping I Reg", mVU->index);
|
||||
tempI = (0x80000000 & curI) | 0x7f7fffff; // Clamp I Reg
|
||||
}
|
||||
else tempI = curI;
|
||||
|
@ -136,7 +136,7 @@ microVUt(void) doIbit(mV) {
|
|||
|
||||
microVUt(void) doSwapOp(mV) {
|
||||
if (mVUinfo.backupVF && !mVUlow.noWriteVF) {
|
||||
DevCon::Status("microVU%d: Backing Up VF Reg [%04x]", params getIndex, xPC);
|
||||
DevCon::Status("microVU%d: Backing Up VF Reg [%04x]", getIndex, xPC);
|
||||
int t1 = mVU->regAlloc->allocReg(mVUlow.VF_write.reg);
|
||||
int t2 = mVU->regAlloc->allocReg();
|
||||
SSE_MOVAPS_XMM_to_XMM(t2, t1);
|
||||
|
@ -161,7 +161,7 @@ microVUt(void) branchWarning(mV) {
|
|||
incPC(-2);
|
||||
if (mVUup.eBit && mVUbranch) {
|
||||
incPC(2);
|
||||
Console::Error("microVU%d Warning: Branch in E-bit delay slot! [%04x]", params mVU->index, xPC);
|
||||
Console::Error("microVU%d Warning: Branch in E-bit delay slot! [%04x]", mVU->index, xPC);
|
||||
mVUlow.isNOP = 1;
|
||||
}
|
||||
else incPC(2);
|
||||
|
@ -181,11 +181,11 @@ microVUt(void) eBitPass1(mV, int& branch) {
|
|||
}
|
||||
|
||||
microVUt(void) eBitWarning(mV) {
|
||||
if (mVUpBlock->pState.blockType == 1) Console::Error("microVU%d Warning: Branch, E-bit, Branch! [%04x]", params mVU->index, xPC);
|
||||
if (mVUpBlock->pState.blockType == 2) Console::Error("microVU%d Warning: Branch, Branch, Branch! [%04x]", params mVU->index, xPC);
|
||||
if (mVUpBlock->pState.blockType == 1) Console::Error("microVU%d Warning: Branch, E-bit, Branch! [%04x]", mVU->index, xPC);
|
||||
if (mVUpBlock->pState.blockType == 2) Console::Error("microVU%d Warning: Branch, Branch, Branch! [%04x]", mVU->index, xPC);
|
||||
incPC(2);
|
||||
if (curI & _Ebit_) {
|
||||
DevCon::Status("microVU%d: E-bit in Branch delay slot! [%04x]", params mVU->index, xPC);
|
||||
DevCon::Status("microVU%d: E-bit in Branch delay slot! [%04x]", mVU->index, xPC);
|
||||
mVUregs.blockType = 1;
|
||||
}
|
||||
incPC(-2);
|
||||
|
@ -279,10 +279,10 @@ microVUt(void) mVUsetCycles(mV) {
|
|||
tCycles(mVUregs.xgkick, mVUregsTemp.xgkick);
|
||||
}
|
||||
|
||||
void __fastcall mVUwarning0(mV) { Console::Error("microVU0 Warning: Exiting from Possible Infinite Loop [%04x] [%x]", params xPC, mVU->prog.cur); }
|
||||
void __fastcall mVUwarning1(mV) { Console::Error("microVU1 Warning: Exiting from Possible Infinite Loop [%04x] [%x]", params xPC, mVU->prog.cur); }
|
||||
void __fastcall mVUprintPC1(u32 PC) { Console::Write("Block PC [%04x] ", params PC); }
|
||||
void __fastcall mVUprintPC2(u32 PC) { Console::Write("[%04x]\n", params PC); }
|
||||
void __fastcall mVUwarning0(mV) { Console::Error("microVU0 Warning: Exiting from Possible Infinite Loop [%04x] [%x]", xPC, mVU->prog.cur); }
|
||||
void __fastcall mVUwarning1(mV) { Console::Error("microVU1 Warning: Exiting from Possible Infinite Loop [%04x] [%x]", xPC, mVU->prog.cur); }
|
||||
void __fastcall mVUprintPC1(u32 PC) { Console::Write("Block PC [%04x] ", PC); }
|
||||
void __fastcall mVUprintPC2(u32 PC) { Console::Write("[%04x]\n", PC); }
|
||||
|
||||
microVUt(void) mVUtestCycles(mV) {
|
||||
u32* vu0jmp;
|
||||
|
@ -406,7 +406,7 @@ microVUr(void*) mVUcompile(microVU* mVU, u32 startPC, uptr pState) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if ((x == endCount) && (x!=1)) { Console::Error("microVU%d: Possible infinite compiling loop!", params mVU->index); }
|
||||
if ((x == endCount) && (x!=1)) { Console::Error("microVU%d: Possible infinite compiling loop!", mVU->index); }
|
||||
|
||||
// E-bit End
|
||||
mVUsetupRange(mVU, xPC-8, 0);
|
||||
|
@ -418,7 +418,7 @@ microVUr(void*) mVUcompile(microVU* mVU, u32 startPC, uptr pState) {
|
|||
microVUt(void*) mVUblockFetch(microVU* mVU, u32 startPC, uptr pState) {
|
||||
|
||||
using namespace x86Emitter;
|
||||
if (startPC > mVU->microMemSize-8) { DevCon::Error("microVU%d: invalid startPC [%04x]", params mVU->index, startPC); }
|
||||
if (startPC > mVU->microMemSize-8) { DevCon::Error("microVU%d: invalid startPC [%04x]", mVU->index, startPC); }
|
||||
startPC &= mVU->microMemSize-8;
|
||||
|
||||
blockCreate(startPC/8);
|
||||
|
|
|
@ -95,7 +95,7 @@ void mVUdispatcherB(mV) {
|
|||
microVUx(void*) __fastcall mVUexecute(u32 startPC, u32 cycles) {
|
||||
|
||||
microVU* mVU = mVUx;
|
||||
//mVUprint("microVU%x: startPC = 0x%x, cycles = 0x%x", params vuIndex, startPC, cycles);
|
||||
//mVUprint("microVU%x: startPC = 0x%x, cycles = 0x%x", vuIndex, startPC, cycles);
|
||||
|
||||
mVUsearchProg<vuIndex>(); // Find and set correct program
|
||||
mVU->cycles = cycles;
|
||||
|
@ -112,8 +112,8 @@ microVUx(void*) __fastcall mVUexecute(u32 startPC, u32 cycles) {
|
|||
microVUx(void) mVUcleanUp() {
|
||||
microVU* mVU = mVUx;
|
||||
//mVUprint("microVU: Program exited successfully!");
|
||||
//mVUprint("microVU: VF0 = {%x,%x,%x,%x}", params mVU->regs->VF[0].UL[0], mVU->regs->VF[0].UL[1], mVU->regs->VF[0].UL[2], mVU->regs->VF[0].UL[3]);
|
||||
//mVUprint("microVU: VI0 = %x", params mVU->regs->VI[0].UL);
|
||||
//mVUprint("microVU: VF0 = {%x,%x,%x,%x}", mVU->regs->VF[0].UL[0], mVU->regs->VF[0].UL[1], mVU->regs->VF[0].UL[2], mVU->regs->VF[0].UL[3]);
|
||||
//mVUprint("microVU: VI0 = %x", mVU->regs->VI[0].UL);
|
||||
mVU->prog.x86ptr = x86Ptr;
|
||||
mVUcacheCheck(x86Ptr, mVU->prog.x86start, (uptr)(mVU->prog.x86end - mVU->prog.x86start));
|
||||
mVU->cycles = mVU->totalCycles - mVU->cycles;
|
||||
|
|
|
@ -50,7 +50,7 @@ microVUt(void) mVUstatusFlagOp(mV) {
|
|||
}
|
||||
}
|
||||
iPC = curPC;
|
||||
DevCon::Status("microVU%d: FSSET Optimization", params getIndex);
|
||||
DevCon::Status("microVU%d: FSSET Optimization", getIndex);
|
||||
}
|
||||
|
||||
int findFlagInst(int* fFlag, int cycles) {
|
||||
|
|
|
@ -247,7 +247,7 @@ public:
|
|||
for (int i = 0; i < xmmTotal; i++) {
|
||||
if ((i == reg) || xmmReg[i].isNeeded) continue;
|
||||
if (xmmReg[i].reg == xmmReg[reg].reg) {
|
||||
if (xmmReg[i].xyzw && xmmReg[i].xyzw < 0xf) DevCon::Error("microVU Error: writeBackReg() [%d]", params xmmReg[i].reg);
|
||||
if (xmmReg[i].xyzw && xmmReg[i].xyzw < 0xf) DevCon::Error("microVU Error: writeBackReg() [%d]", xmmReg[i].reg);
|
||||
clearReg(i); // Invalidate any Cached Regs of same vf Reg
|
||||
}
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ public:
|
|||
for (int i = 0; i < xmmTotal; i++) { // Invalidate any other read-only regs of same vfReg
|
||||
if (i == reg) continue;
|
||||
if (xmmReg[i].reg == xmmReg[reg].reg) {
|
||||
if (xmmReg[i].xyzw && xmmReg[i].xyzw < 0xf) DevCon::Error("microVU Error: clearNeeded() [%d]", params xmmReg[i].reg);
|
||||
if (xmmReg[i].xyzw && xmmReg[i].xyzw < 0xf) DevCon::Error("microVU Error: clearNeeded() [%d]", xmmReg[i].reg);
|
||||
if (mergeRegs == 1) {
|
||||
mVUmergeRegs(i, reg, xmmReg[reg].xyzw, 1);
|
||||
xmmReg[i].xyzw = 0xf;
|
||||
|
|
|
@ -1111,10 +1111,10 @@ void __fastcall mVU_XGKICK_(u32 addr) {
|
|||
u32 size = mtgsThread->PrepDataPacket(GIF_PATH_1, data, (0x4000-addr) >> 4);
|
||||
u8 *pDest = mtgsThread->GetDataPacketPtr();
|
||||
/* if((size << 4) > (0x4000-(addr&0x3fff))) {
|
||||
//DevCon::Notice("addr + Size = 0x%x, transferring %x then doing %x", params (addr&0x3fff) + (size << 4), (0x4000-(addr&0x3fff)) >> 4, size - ((0x4000-(addr&0x3fff)) >> 4));
|
||||
//DevCon::Notice("addr + Size = 0x%x, transferring %x then doing %x", (addr&0x3fff) + (size << 4), (0x4000-(addr&0x3fff)) >> 4, size - ((0x4000-(addr&0x3fff)) >> 4));
|
||||
memcpy_aligned(pDest, microVU1.regs->Mem + addr, 0x4000-(addr&0x3fff));
|
||||
size -= (0x4000-(addr&0x3fff)) >> 4;
|
||||
//DevCon::Notice("Size left %x", params size);
|
||||
//DevCon::Notice("Size left %x", size);
|
||||
pDest += 0x4000-(addr&0x3fff);
|
||||
memcpy_aligned(pDest, microVU1.regs->Mem, size<<4);
|
||||
}
|
||||
|
|
|
@ -376,7 +376,7 @@ void recCOP2_BC2();
|
|||
void recCOP2_SPEC1();
|
||||
void recCOP2_SPEC2();
|
||||
void rec_C2UNK() {
|
||||
Console::Error("Cop2 bad opcode: %x", params cpuRegs.code);
|
||||
Console::Error("Cop2 bad opcode: %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
// This is called by EE Recs to setup sVU info, this isn't needed for mVU Macro (cottonvibes)
|
||||
|
|
|
@ -277,7 +277,7 @@ typedef u32 (__fastcall *mVUCall)(void*, void*);
|
|||
#define mVUcacheCheck(ptr, start, limit) { \
|
||||
uptr diff = ptr - start; \
|
||||
if (diff >= limit) { \
|
||||
Console::Status("microVU%d: Program cache limit reached. Size = 0x%x", params mVU->index, diff); \
|
||||
Console::Status("microVU%d: Program cache limit reached. Size = 0x%x", mVU->index, diff); \
|
||||
mVUreset(mVU); \
|
||||
} \
|
||||
}
|
||||
|
|
|
@ -214,7 +214,7 @@ mVUop(mVULowerOP_T3_11) { mVULowerOP_T3_11_OPCODE [((mVU->code >> 6) & 0x1f)](mX
|
|||
mVUop(mVUopU) { mVU_UPPER_OPCODE [ (mVU->code & 0x3f) ](mX); } // Gets Upper Opcode
|
||||
mVUop(mVUopL) { mVULOWER_OPCODE [ (mVU->code >> 25) ](mX); } // Gets Lower Opcode
|
||||
mVUop(mVUunknown) {
|
||||
pass2 { Console::Error("microVU%d: Unknown Micro VU opcode called (%x) [%04x]\n", params getIndex, mVU->code, xPC); }
|
||||
pass2 { Console::Error("microVU%d: Unknown Micro VU opcode called (%x) [%04x]\n", getIndex, mVU->code, xPC); }
|
||||
pass3 { mVUlog("Unknown", mVU->code); }
|
||||
}
|
||||
|
||||
|
|
|
@ -1992,10 +1992,10 @@ void VU1XGKICK_MTGSTransfer(u32 *pMem, u32 addr)
|
|||
|
||||
/* if((size << 4) > (0x4000-(addr&0x3fff)))
|
||||
{
|
||||
//DevCon::Notice("addr + Size = 0x%x, transferring %x then doing %x", params (addr&0x3fff) + (size << 4), (0x4000-(addr&0x3fff)) >> 4, size - ((0x4000-(addr&0x3fff)) >> 4));
|
||||
//DevCon::Notice("addr + Size = 0x%x, transferring %x then doing %x", (addr&0x3fff) + (size << 4), (0x4000-(addr&0x3fff)) >> 4, size - ((0x4000-(addr&0x3fff)) >> 4));
|
||||
memcpy_aligned(pmem, (u8*)pMem+addr, 0x4000-(addr&0x3fff));
|
||||
size -= (0x4000-(addr&0x3fff)) >> 4;
|
||||
//DevCon::Notice("Size left %x", params size);
|
||||
//DevCon::Notice("Size left %x", size);
|
||||
pmem += 0x4000-(addr&0x3fff);
|
||||
memcpy_aligned(pmem, (u8*)pMem, size<<4);
|
||||
}
|
||||
|
|
|
@ -392,7 +392,7 @@ void _recvuFlushFDIV(VURegs * VU) {
|
|||
if (VU->fdiv.enable == 0) return;
|
||||
|
||||
cycle = VU->fdiv.Cycle + 1 - (vucycle - VU->fdiv.sCycle); //VU->fdiv.Cycle contains the latency minus 1 (6 or 12)
|
||||
// Console::WriteLn("waiting FDIV pipe %d", params cycle);
|
||||
// Console::WriteLn("waiting FDIV pipe %d", cycle);
|
||||
VU->fdiv.enable = 0;
|
||||
vucycle+= cycle;
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ void _recvuFlushEFU(VURegs * VU) {
|
|||
if (VU->efu.enable == 0) return;
|
||||
|
||||
cycle = VU->efu.Cycle - (vucycle - VU->efu.sCycle);
|
||||
// Console::WriteLn("waiting FDIV pipe %d", params cycle);
|
||||
// Console::WriteLn("waiting FDIV pipe %d", cycle);
|
||||
VU->efu.enable = 0;
|
||||
vucycle+= cycle;
|
||||
}
|
||||
|
|
|
@ -456,7 +456,7 @@ void SuperVUReset(int vuindex)
|
|||
}
|
||||
else
|
||||
{
|
||||
DbgCon::Status("SuperVU reset [VU%d] > Resetting the recs and junk", params vuindex);
|
||||
DbgCon::Status("SuperVU reset [VU%d] > Resetting the recs and junk", vuindex);
|
||||
list<VuFunctionHeader*>::iterator it;
|
||||
if (recVUHeaders[vuindex]) memset(recVUHeaders[vuindex], 0, sizeof(VuFunctionHeader*) * (s_MemSize[vuindex] / 8));
|
||||
if (recVUBlocks[vuindex]) memset(recVUBlocks[vuindex], 0, sizeof(VuBlockHeader) * (s_MemSize[vuindex] / 8));
|
||||
|
@ -690,7 +690,7 @@ void SuperVUDumpBlock(list<VuBaseBlock*>& blocks, int vuindex)
|
|||
{
|
||||
char command[255];
|
||||
FILE* fasm = fopen("mydump1", "wb");
|
||||
//Console::WriteLn("writing: %x, %x", params (*itblock)->startpc, (uptr)(*itblock)->pendcode - (uptr)(*itblock)->pcode);
|
||||
//Console::WriteLn("writing: %x, %x", (*itblock)->startpc, (uptr)(*itblock)->pendcode - (uptr)(*itblock)->pcode);
|
||||
fwrite((*itblock)->pcode, 1, (uptr)(*itblock)->pendcode - (uptr)(*itblock)->pcode, fasm);
|
||||
fclose(fasm);
|
||||
sprintf(command, "objdump -D --target=binary --architecture=i386 -M intel mydump1 > tempdump");
|
||||
|
@ -837,7 +837,7 @@ static VuFunctionHeader* SuperVURecompileProgram(u32 startpc, int vuindex)
|
|||
{
|
||||
assert(vuindex < 2);
|
||||
assert(s_recVUPtr != NULL);
|
||||
//Console::WriteLn("svu%c rec: %x", params '0'+vuindex, startpc);
|
||||
//Console::WriteLn("svu%c rec: %x", '0'+vuindex, startpc);
|
||||
|
||||
// if recPtr reached the mem limit reset whole mem
|
||||
if (((uptr)s_recVUPtr - (uptr)s_recVUMem) >= VU_EXESIZE - 0x40000)
|
||||
|
@ -946,7 +946,7 @@ static int _recbranchAddr(u32 vucode)
|
|||
s32 bpc = pc + (_Imm11_ << 3);
|
||||
/*
|
||||
if ( bpc < 0 ) {
|
||||
Console::WriteLn("zerorec branch warning: bpc < 0 ( %x ); Using unsigned imm11", params bpc);
|
||||
Console::WriteLn("zerorec branch warning: bpc < 0 ( %x ); Using unsigned imm11", bpc);
|
||||
bpc = pc + (_UImm11_ << 3);
|
||||
}*/
|
||||
bpc &= (s_MemSize[s_vu] - 1);
|
||||
|
@ -1032,7 +1032,7 @@ static VuInstruction* getDelayInst(VuInstruction* pInst)
|
|||
}
|
||||
else break;
|
||||
}
|
||||
if (delay > 1) DevCon::WriteLn("supervu: %d cycle branch delay detected: %x %x", params delay - 1, pc, s_pFnHeader->startpc);
|
||||
if (delay > 1) DevCon::WriteLn("supervu: %d cycle branch delay detected: %x %x", delay - 1, pc, s_pFnHeader->startpc);
|
||||
return pDelayInst;
|
||||
}
|
||||
#endif
|
||||
|
@ -1040,7 +1040,7 @@ static VuInstruction* getDelayInst(VuInstruction* pInst)
|
|||
static VuBaseBlock* SuperVUBuildBlocks(VuBaseBlock* parent, u32 startpc, const VUPIPELINES& pipes)
|
||||
{
|
||||
// check if block already exists
|
||||
//Console::WriteLn("startpc %x", params startpc);
|
||||
//Console::WriteLn("startpc %x", startpc);
|
||||
startpc &= (s_vu ? 0x3fff : 0xfff);
|
||||
VuBlockHeader* pbh = &recVUBlocks[s_vu][startpc/8];
|
||||
|
||||
|
@ -1205,7 +1205,7 @@ static VuBaseBlock* SuperVUBuildBlocks(VuBaseBlock* parent, u32 startpc, const V
|
|||
if ((ptr[0]&0xc0))
|
||||
{
|
||||
// sometimes full sticky bits are needed (simple series 2000 - oane chapara)
|
||||
//Console::WriteLn("needSticky: %x-%x", params s_pFnHeader->startpc, startpc);
|
||||
//Console::WriteLn("needSticky: %x-%x", s_pFnHeader->startpc, startpc);
|
||||
needFullStatusFlag = 2;
|
||||
}
|
||||
break;
|
||||
|
@ -1217,7 +1217,7 @@ static VuBaseBlock* SuperVUBuildBlocks(VuBaseBlock* parent, u32 startpc, const V
|
|||
|
||||
if (pc >= s_MemSize[s_vu])
|
||||
{
|
||||
Console::Error("inf vu0 prog %x", params startpc);
|
||||
Console::Error("inf vu0 prog %x", startpc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3205,7 +3205,7 @@ void VuBaseBlock::Recompile()
|
|||
break;
|
||||
|
||||
default:
|
||||
DevCon::Error("Bad branch %x\n", params branch);
|
||||
DevCon::Error("Bad branch %x\n", branch);
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
|
@ -3817,7 +3817,7 @@ void VuInstruction::Recompile(list<VuInstruction>::iterator& itinst, u32 vuxyz)
|
|||
#ifdef PCSX2_DEVBUILD
|
||||
if (regs[1].VIread & regs[0].VIwrite & ~((1 << REG_Q) | (1 << REG_P) | (1 << REG_VF0_FLAG) | (1 << REG_ACC_FLAG)))
|
||||
{
|
||||
Console::Notice("*PCSX2*: Warning, VI write to the same reg %x in both lower/upper cycle %x", params regs[1].VIread & regs[0].VIwrite, s_pCurBlock->startpc);
|
||||
Console::Notice("*PCSX2*: Warning, VI write to the same reg %x in both lower/upper cycle %x", regs[1].VIread & regs[0].VIwrite, s_pCurBlock->startpc);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3834,7 +3834,7 @@ void VuInstruction::Recompile(list<VuInstruction>::iterator& itinst, u32 vuxyz)
|
|||
|
||||
if (vfwrite[0] == vfwrite[1])
|
||||
{
|
||||
//Console::WriteLn("*PCSX2*: Warning, VF write to the same reg in both lower/upper cycle %x", params s_pCurBlock->startpc);
|
||||
//Console::WriteLn("*PCSX2*: Warning, VF write to the same reg in both lower/upper cycle %x", s_pCurBlock->startpc);
|
||||
}
|
||||
|
||||
if (vfread0[0] == vfwrite[1] || vfread1[0] == vfwrite[1])
|
||||
|
|
|
@ -81,7 +81,7 @@ int LoadPatch( const wxString& crc )
|
|||
}
|
||||
else
|
||||
{
|
||||
Console::WriteLn("XML Patch Loader: '%s' Found", params pfile.c_str() );
|
||||
Console::WriteLn("XML Patch Loader: '%s' Found", pfile.c_str() );
|
||||
}
|
||||
|
||||
TiXmlNode *root = doc.FirstChild("GAME");
|
||||
|
@ -95,7 +95,7 @@ int LoadPatch( const wxString& crc )
|
|||
|
||||
const char *title=rootelement->Attribute("title");
|
||||
if(title)
|
||||
Console::WriteLn("XML Patch Loader: Game Title: %s", params title);
|
||||
Console::WriteLn("XML Patch Loader: Game Title: %s", title);
|
||||
|
||||
int result=LoadGroup(root,-1);
|
||||
if(result) {
|
||||
|
@ -117,7 +117,7 @@ int LoadGroup(TiXmlNode *group,int gParent)
|
|||
|
||||
const char *gtitle=groupelement->Attribute("title");
|
||||
if(gtitle)
|
||||
Console::WriteLn("XML Patch Loader: Group Title: %s", params gtitle);
|
||||
Console::WriteLn("XML Patch Loader: Group Title: %s", gtitle);
|
||||
|
||||
const char *enable=groupelement->Attribute("enabled");
|
||||
bool gEnabled=true;
|
||||
|
@ -136,7 +136,7 @@ int LoadGroup(TiXmlNode *group,int gParent)
|
|||
TiXmlElement *cmelement = comment->ToElement();
|
||||
const char *comment = cmelement->GetText();
|
||||
if(comment)
|
||||
Console::WriteLn("XML Patch Loader: Group Comment:\n%s\n---", params comment);
|
||||
Console::WriteLn("XML Patch Loader: Group Comment:\n%s\n---", comment);
|
||||
}
|
||||
|
||||
string t;
|
||||
|
@ -240,7 +240,7 @@ int LoadGroup(TiXmlNode *group,int gParent)
|
|||
const char *value=celement->Attribute("value");
|
||||
|
||||
if(ptitle) {
|
||||
Console::WriteLn("XML Patch Loader: Patch title: %s", params ptitle);
|
||||
Console::WriteLn("XML Patch Loader: Patch title: %s", ptitle);
|
||||
}
|
||||
|
||||
bool penabled=gEnabled;
|
||||
|
|
Loading…
Reference in New Issue