mirror of https://github.com/PCSX2/pcsx2.git
Win32: Green colors now work in the console! Yay! (so important! heh) Fixed some project file options in the plugins, and started converting all the old SysPrintf's over to color coded Console messages. (but there's... so... many... >_<) Also, interchanged the meanings of WriteLn and MsgLn since I kind of had them backwards from what I originally intended.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@543 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
898168ebae
commit
3957d1520c
|
@ -208,7 +208,7 @@ static void cdvdSetIrq( uint id = (1<<Irq_CommandComplete) )
|
|||
cdvd.PwOff |= id;
|
||||
psxHu32(0x1070)|= 0x4;
|
||||
hwIntcIrq(INTC_SBUS);
|
||||
psxSetNextBranchDelta( 24 ); // don't need to be too prompt -- that would just put unnecessary load on the emu.
|
||||
psxSetNextBranchDelta( 20 );
|
||||
}
|
||||
|
||||
static int mg_BIToffset(u8 *buffer){
|
||||
|
@ -519,7 +519,7 @@ void cdvdReadKey(u8 arg0, u16 arg1, u32 arg2, u8* key) {
|
|||
key[15] = 0x01;
|
||||
}
|
||||
|
||||
Console::MsgLn( "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] );
|
||||
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...
|
||||
if( ElfCRC == 0 )
|
||||
|
@ -936,7 +936,6 @@ __forceinline void cdvdActionInterrupt()
|
|||
cdvd.Ready = 0x40;
|
||||
cdvd.Sector = cdvd.SeekToSector;
|
||||
cdvd.Status = CDVD_STATUS_SEEK_COMPLETE;
|
||||
cdvdSetIrq();
|
||||
break;
|
||||
|
||||
case cdvdAction_Stop:
|
||||
|
@ -944,7 +943,6 @@ __forceinline void cdvdActionInterrupt()
|
|||
cdvd.Ready = 0x40;
|
||||
cdvd.Sector = 0;
|
||||
cdvd.Status = 0;
|
||||
cdvdSetIrq();
|
||||
break;
|
||||
|
||||
case cdvdAction_Break:
|
||||
|
@ -955,10 +953,13 @@ __forceinline void cdvdActionInterrupt()
|
|||
cdvd.Status = 0;
|
||||
cdvd.RErr = 0;
|
||||
cdvd.nCommand = 0;
|
||||
cdvdSetIrq();
|
||||
break;
|
||||
}
|
||||
cdvd.Action = cdvdAction_None;
|
||||
|
||||
cdvd.PwOff |= 1<<Irq_CommandComplete;
|
||||
psxHu32(0x1070)|= 0x4;
|
||||
hwIntcIrq(INTC_SBUS);
|
||||
}
|
||||
|
||||
// inlined due to being referenced in only one place.
|
||||
|
@ -1015,11 +1016,16 @@ __forceinline void cdvdReadInterrupt() {
|
|||
|
||||
if (--cdvd.nSectors <= 0)
|
||||
{
|
||||
// hmm... should we set a DataReady interrupt here?
|
||||
cdvdSetIrq( /*(1<<Irq_DataReady) |*/ (1<<Irq_CommandComplete));
|
||||
cdvd.PwOff |= 1<<Irq_CommandComplete;
|
||||
psxHu32(0x1070)|= 0x4;
|
||||
hwIntcIrq(INTC_SBUS);
|
||||
|
||||
HW_DMA3_CHCR &= ~0x01000000;
|
||||
psxDmaInterrupt(3);
|
||||
cdvd.Ready = 0x4e;
|
||||
|
||||
// All done! :D
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1280,10 +1286,6 @@ u8 cdvdRead3A(void) { // DEC_SET
|
|||
}
|
||||
|
||||
|
||||
// Initiates a Cdvd seek from the current sector to the assigned SeekSector.
|
||||
// Fixme: Should the seek set the cdvd.Sector immediately, or only when the
|
||||
// seek has finished? Current implementation is immediate. (the sector is readable
|
||||
// by HW registers so it could be important!)
|
||||
// Returns the number of IOP cycles until the event completes.
|
||||
static uint cdvdStartSeek( uint newsector )
|
||||
{
|
||||
|
@ -1471,7 +1473,7 @@ void cdvdWrite04(u8 rt) { // NCOMMAND
|
|||
//the code below handles only CdGetToc!
|
||||
//if(cdvd.Param[0]==0x01)
|
||||
//{
|
||||
DevCon::MsgLn("CDGetToc Param[0]=%d, Param[1]=%d",cdvd.Param[0],cdvd.Param[1]);
|
||||
DevCon::WriteLn("CDGetToc Param[0]=%d, Param[1]=%d",cdvd.Param[0],cdvd.Param[1]);
|
||||
//}
|
||||
cdvdGetToc( PSXM( HW_DMA3_MADR ) );
|
||||
cdvdSetIrq( (1<<Irq_CommandComplete) ); //| (1<<Irq_DataReady) );
|
||||
|
@ -1484,7 +1486,7 @@ 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::MsgLn("cdvdReadKey(%d, %d, %d)\n", arg0, arg1, arg2);
|
||||
DevCon::WriteLn("cdvdReadKey(%d, %d, %d)\n", arg0, arg1, arg2);
|
||||
cdvdReadKey(arg0, arg1, arg2, cdvd.Key);
|
||||
cdvd.KeyXor = 0x00;
|
||||
cdvdSetIrq();
|
||||
|
@ -1555,7 +1557,7 @@ void cdvdWrite0A(u8 rt) { // STATUS
|
|||
|
||||
void cdvdWrite0F(u8 rt) { // TYPE
|
||||
CDR_LOG("cdvdWrite0F(Type) %x\n", rt);
|
||||
DevCon::MsgLn("*PCSX2*: CDVD TYPE %x\n", rt);
|
||||
DevCon::WriteLn("*PCSX2*: CDVD TYPE %x\n", rt);
|
||||
}
|
||||
|
||||
void cdvdWrite14(u8 rt) { // PS1 MODE??
|
||||
|
|
|
@ -240,7 +240,7 @@ int CDVD_GetVolumeDescriptor(void){
|
|||
|
||||
cdVolDesc localVolDesc;
|
||||
|
||||
DbgCon::WriteLn("CDVD_GetVolumeDescriptor called");
|
||||
DbgCon::MsgLn("CDVD_GetVolumeDescriptor called");
|
||||
|
||||
for (volDescSector = 16; volDescSector<20; volDescSector++)
|
||||
{
|
||||
|
@ -262,14 +262,13 @@ int CDVD_GetVolumeDescriptor(void){
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (CDVolDesc.filesystemType == 1)
|
||||
SysPrintf("CD FileSystem is ISO9660\n");
|
||||
DbgCon::MsgLn( Color_Green, "CD FileSystem is ISO9660" );
|
||||
else if (CDVolDesc.filesystemType == 2)
|
||||
SysPrintf("CD FileSystem is Joliet\n");
|
||||
else SysPrintf("Could not detect CD FileSystem type\n");
|
||||
#endif
|
||||
// CdStop();
|
||||
DbgCon::MsgLn( Color_Green, "CD FileSystem is Joliet");
|
||||
else DbgCon::Notice("Could not detect CD FileSystem type");
|
||||
|
||||
// CdStop();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -291,7 +290,7 @@ int CDVD_findfile(const char* fname, TocEntry* tocEntry){
|
|||
|
||||
dirTocEntry* tocEntryPointer;
|
||||
|
||||
DbgCon::WriteLn("CDVD_findfile called");
|
||||
DbgCon::MsgLn("CDVD_findfile called");
|
||||
|
||||
//make sure we have good cdReadMode
|
||||
cdReadMode.trycount = 0;
|
||||
|
@ -405,7 +404,7 @@ int CDVD_findfile(const char* fname, TocEntry* tocEntry){
|
|||
// If we havent found the directory name we wanted then fail
|
||||
if (found_dir != TRUE)
|
||||
{
|
||||
SysPrintf("CDVD_findfile: could not find dir\n");
|
||||
Console::Notice( "CDVD_findfile: could not find dir" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -415,7 +414,7 @@ int CDVD_findfile(const char* fname, TocEntry* tocEntry){
|
|||
// Read the TOC of the found subdirectory
|
||||
if (CdRead(localTocEntry.fileLBA,1,toc,&cdReadMode) != TRUE)
|
||||
{
|
||||
SysPrintf("Couldn't Read from CD !\n");
|
||||
Console::Error("Couldn't Read from CD !");
|
||||
return -1;
|
||||
}
|
||||
// CdSync(0x00);
|
||||
|
@ -460,9 +459,7 @@ int CDVD_findfile(const char* fname, TocEntry* tocEntry){
|
|||
strcpy(tocEntry->filename, localTocEntry.filename);
|
||||
memcpy(tocEntry->date, localTocEntry.date, 7);
|
||||
|
||||
#ifdef DEBUG
|
||||
SysPrintf("CDVD_findfile: found file\n");
|
||||
#endif
|
||||
DbgCon::MsgLn("CDVD_findfile: found file");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -477,7 +474,7 @@ int CDVD_findfile(const char* fname, TocEntry* tocEntry){
|
|||
dir_lba++;
|
||||
|
||||
if (CdRead(dir_lba,1,toc,&cdReadMode) != TRUE){
|
||||
SysPrintf("Couldn't Read from CD !\n");
|
||||
Console::Error("Couldn't Read from CD !");
|
||||
return -1;
|
||||
}
|
||||
// CdSync(0x00);
|
||||
|
@ -486,9 +483,7 @@ int CDVD_findfile(const char* fname, TocEntry* tocEntry){
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
SysPrintf("CDVD_findfile: could not find file\n");
|
||||
#endif
|
||||
DbgCon::Notice("CDVD_findfile: could not find file");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ void MapTLB(int i)
|
|||
u32 saddr, eaddr;
|
||||
|
||||
#ifndef PCSX2_VIRTUAL_MEM
|
||||
DevCon::MsgLn("MAP TLB %d: %08x-> [%08x %08x] S=%d G=%d ASID=%d Mask= %03X",
|
||||
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)
|
||||
|
|
|
@ -332,7 +332,7 @@ void vSyncDebugStuff() {
|
|||
if( --g_nLeftGSFrames <= 0 ) {
|
||||
safe_delete( g_fGSSave );
|
||||
g_SaveGSStream = 0;
|
||||
Console::WriteLn("Done saving GS stream");
|
||||
Console::MsgLn("Done saving GS stream");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -487,7 +487,7 @@ struct ElfObject
|
|||
|
||||
SymNames = (char*)data.GetPtr( secthead[ i_dt ].sh_offset );
|
||||
eS = (Elf32_Sym*)data.GetPtr( secthead[ i_st ].sh_offset );
|
||||
Console::MsgLn("found %d symbols", 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 ) ) {
|
||||
|
@ -511,11 +511,11 @@ void ElfApplyPatches()
|
|||
|
||||
if(LoadPatch( str ) != 0)
|
||||
{
|
||||
Console::WriteLn("XML Loader returned an error. Trying to load a pnatch...");
|
||||
Console::MsgLn("XML Loader returned an error. Trying to load a pnatch...");
|
||||
inifile_read(str);
|
||||
}
|
||||
else
|
||||
Console::WriteLn("XML Loading success. Will not load from pnatch...");
|
||||
Console::MsgLn("XML Loading success. Will not load from pnatch...");
|
||||
|
||||
applypatch( 0 );
|
||||
}
|
||||
|
@ -529,9 +529,9 @@ void loadElfCRC( const char* filename )
|
|||
if ( CDVD_findfile( filename + strlen( "cdromN:" ), &toc ) == -1 )
|
||||
return;
|
||||
|
||||
DevCon::MsgLn( Color_Green, "loadElfFile: %d bytes", toc.fileSize);
|
||||
DevCon::WriteLn( Color_Green, "loadElfFile: %d bytes", toc.fileSize);
|
||||
ElfCRC = ElfObject( filename, toc.fileSize ).GetCRC();
|
||||
Console::MsgLn( Color_Green, "loadElfFile: %s; CRC = %8.8X\n", filename, ElfCRC);
|
||||
Console::WriteLn( Color_Green, "loadElfFile: %s; CRC = %8.8X\n", filename, ElfCRC);
|
||||
|
||||
ElfApplyPatches();
|
||||
LoadGameSpecificSettings();
|
||||
|
@ -547,7 +547,7 @@ int loadElfFile(const char *filename)
|
|||
|
||||
int elfsize;
|
||||
|
||||
Console::MsgLn("loadElfFile: %s", filename);
|
||||
Console::WriteLn("loadElfFile: %s", filename);
|
||||
if (strnicmp( filename, "cdrom0:", strlen( "cdromN:" ) ) &&
|
||||
strnicmp( filename, "cdrom1:", strlen( "cdromN:" ) ) )
|
||||
{
|
||||
|
@ -567,7 +567,7 @@ int loadElfFile(const char *filename)
|
|||
elfsize = toc.fileSize;
|
||||
}
|
||||
|
||||
Console::MsgLn( Color_Green, "loadElfFile: %d", elfsize);
|
||||
Console::WriteLn( Color_Green, "loadElfFile: %d", elfsize);
|
||||
ElfObject elfobj( filename, elfsize );
|
||||
|
||||
//2002-09-19 (Florin)
|
||||
|
@ -586,12 +586,12 @@ int loadElfFile(const char *filename)
|
|||
for ( uint i = 0; i < 0x100000; i++ ) {
|
||||
if ( strcmp( "rom0:OSDSYS", (char*)PSM( i ) ) == 0 ) {
|
||||
strcpy( (char*)PSM( i ), filename );
|
||||
SysPrintf( "addr %x \"%s\" -> \"%s\"\n", i, "rom0:OSDSYS", filename );
|
||||
Console::WriteLn( Color_Green, "addr %x \"%s\" -> \"%s\"", i, "rom0:OSDSYS", filename );
|
||||
}
|
||||
}
|
||||
|
||||
ElfCRC = elfobj.GetCRC();
|
||||
Console::MsgLn( Color_Green, "loadElfFile: %s; CRC = %8.8X\n", filename, ElfCRC);
|
||||
Console::WriteLn( Color_Green, "loadElfFile: %s; CRC = %8.8X\n", filename, ElfCRC);
|
||||
|
||||
ElfApplyPatches();
|
||||
LoadGameSpecificSettings();
|
||||
|
|
|
@ -139,7 +139,7 @@ void WriteFIFO(u32 mem, const u64 *value) {
|
|||
|
||||
//commiting every 16 bytes
|
||||
while( FIFOto_write((u32*)value, 1) == 0 ) {
|
||||
Console::WriteLn("IPU sleeping");
|
||||
Console::MsgLn("IPU sleeping");
|
||||
Threading::Timeslice();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -167,14 +167,14 @@ void gsSetVideoRegionType( u32 isPal )
|
|||
if( isPal )
|
||||
{
|
||||
if( Config.PsxType & 1 ) return;
|
||||
Console::WriteLn( "PAL Display Mode Initialized." );
|
||||
Console::MsgLn( "PAL Display Mode Initialized." );
|
||||
Config.PsxType |= 1;
|
||||
framerate = FRAMERATE_PAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !(Config.PsxType & 1 ) ) return;
|
||||
Console::WriteLn( "NTSC Display Mode Initialized." );
|
||||
Console::MsgLn( "NTSC Display Mode Initialized." );
|
||||
Config.PsxType &= ~1;
|
||||
framerate = FRAMERATE_NTSC;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ void gsInit()
|
|||
if( GSsetFrameSkip == NULL )
|
||||
{
|
||||
Config.Options &= ~PCSX2_FRAMELIMIT_MASK;
|
||||
Console::WriteLn("Notice: Disabling frameskip -- GS plugin does not support it.");
|
||||
Console::MsgLn("Notice: Disabling frameskip -- GS plugin does not support it.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -834,7 +834,7 @@ int __Deci2Call(int call, u32 *addr) {
|
|||
return 1;
|
||||
|
||||
case 0x10://kputs
|
||||
Console::Msg( Color_Cyan, "%s", PSM(*addr));
|
||||
Console::Write( Color_Cyan, "%s", PSM(*addr));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -851,7 +851,7 @@ void SYSCALL() {
|
|||
else call = cpuRegs.GPR.n.v1.UC[0];
|
||||
BIOS_LOG("Bios call: %s (%x)\n", bios[call], call);
|
||||
if (call == 0x7c && cpuRegs.GPR.n.a0.UL[0] == 0x10) {
|
||||
Console::Msg( Color_Cyan, "%s", PSM(PSMu32(cpuRegs.GPR.n.a1.UL[0])));
|
||||
Console::Write( Color_Cyan, "%s", PSM(PSMu32(cpuRegs.GPR.n.a1.UL[0])));
|
||||
} else
|
||||
//if (call == 0x7c) SysPrintf("Deci2Call: %x\n", cpuRegs.GPR.n.a0.UL[0]);
|
||||
if (call == 0x7c) __Deci2Call(cpuRegs.GPR.n.a0.UL[0], (u32*)PSM(cpuRegs.GPR.n.a1.UL[0]));
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace Console
|
|||
{
|
||||
}
|
||||
|
||||
__forceinline bool __fastcall WriteLn()
|
||||
__forceinline bool __fastcall Newline()
|
||||
{
|
||||
if (Config.PsxOut != 0)
|
||||
puts( "\n" );
|
||||
|
@ -63,7 +63,7 @@ namespace Console
|
|||
return false;
|
||||
}
|
||||
|
||||
__forceinline bool __fastcall Write( const char* fmt )
|
||||
__forceinline bool __fastcall Msg( const char* fmt )
|
||||
{
|
||||
if (Config.PsxOut != 0)
|
||||
puts( fmt );
|
||||
|
@ -77,22 +77,22 @@ namespace Console
|
|||
|
||||
void __fastcall SetColor( Colors color )
|
||||
{
|
||||
Write( tbl_color_codes[color] );
|
||||
Msg( tbl_color_codes[color] );
|
||||
}
|
||||
|
||||
void ClearColor()
|
||||
{
|
||||
Write( COLOR_RESET );
|
||||
Msg( COLOR_RESET );
|
||||
}
|
||||
|
||||
__forceinline bool __fastcall WriteLn( const char* fmt )
|
||||
__forceinline bool __fastcall MsgLn( const char* fmt )
|
||||
{
|
||||
Write( fmt );
|
||||
WriteLn();
|
||||
Msg( fmt );
|
||||
Newline();
|
||||
return false;
|
||||
}
|
||||
|
||||
static __forceinline void __fastcall _MsgLn( Colors color, const char* fmt, va_list args )
|
||||
static __forceinline void __fastcall _WriteLn( Colors color, const char* fmt, va_list args )
|
||||
{
|
||||
char msg[2048];
|
||||
|
||||
|
@ -100,7 +100,7 @@ namespace Console
|
|||
msg[2044] = '\0';
|
||||
strcat( msg, "\n" );
|
||||
SetColor( color );
|
||||
Write( msg );
|
||||
Msg( msg );
|
||||
ClearColor();
|
||||
|
||||
if( emuLog != NULL )
|
||||
|
@ -108,16 +108,16 @@ namespace Console
|
|||
}
|
||||
|
||||
// Writes a line of colored text to the console, with automatic newline appendage.
|
||||
bool MsgLn( Colors color, const char* fmt, ... )
|
||||
bool WriteLn( Colors color, const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
va_start(list,fmt);
|
||||
_MsgLn( Color_White, fmt, list );
|
||||
_WriteLn( Color_White, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Msg( Colors color, const char* fmt, ... )
|
||||
bool Write( Colors color, const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
char msg[2048];
|
||||
|
@ -128,12 +128,12 @@ namespace Console
|
|||
va_end(list);
|
||||
|
||||
SetColor( color );
|
||||
Write( msg );
|
||||
Msg( msg );
|
||||
ClearColor();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Msg( const char* fmt, ... )
|
||||
bool Write( const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
char msg[2048];
|
||||
|
@ -143,11 +143,11 @@ namespace Console
|
|||
msg[2047] = '\0';
|
||||
va_end(list);
|
||||
|
||||
Write( msg );
|
||||
Msg( msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MsgLn( const char* fmt, ... )
|
||||
bool WriteLn( const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
char msg[2048];
|
||||
|
@ -157,7 +157,7 @@ namespace Console
|
|||
va_end(list);
|
||||
|
||||
strcat( msg, "\n" ); // yeah, that newline!
|
||||
Write( msg );
|
||||
Msg( msg );
|
||||
if( emuLog != NULL )
|
||||
fflush( emuLog ); // manual flush to accomany manual newline
|
||||
return false;
|
||||
|
@ -169,7 +169,7 @@ namespace Console
|
|||
{
|
||||
va_list list;
|
||||
va_start(list,fmt);
|
||||
_MsgLn( Color_Red, fmt, list );
|
||||
_WriteLn( Color_Red, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ namespace Console
|
|||
{
|
||||
va_list list;
|
||||
va_start(list,fmt);
|
||||
_MsgLn( Color_Yellow, fmt, list );
|
||||
_WriteLn( Color_Yellow, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -470,7 +470,7 @@ void SysPrintf(const char *fmt, ...) {
|
|||
msg[511] = '\0';
|
||||
va_end(list);
|
||||
|
||||
Console::Write( msg );
|
||||
Console::Msg( msg );
|
||||
}
|
||||
|
||||
void *SysLoadLibrary(const char *lib) {
|
||||
|
|
|
@ -217,7 +217,7 @@ mtgsThreadObject::mtgsThreadObject() :
|
|||
|
||||
mtgsThreadObject::~mtgsThreadObject()
|
||||
{
|
||||
Console::WriteLn( "MTGS > Closing GS thread..." );
|
||||
Console::MsgLn( "MTGS > Closing GS thread..." );
|
||||
SetEvent();
|
||||
|
||||
// rest of the cleanup will be handled by the inherited object destructors...
|
||||
|
@ -395,7 +395,7 @@ __forceinline u32 mtgsThreadObject::_gifTransferDummy( GIF_PATH pathidx, const u
|
|||
if(!path.tag.eop && path.tag.nloop > 0)
|
||||
{
|
||||
path.tag.nloop = 0;
|
||||
DevCon::Write( "path1 hack! " );
|
||||
DevCon::Msg( "path1 hack! " );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -404,12 +404,12 @@ __forceinline u32 mtgsThreadObject::_gifTransferDummy( GIF_PATH pathidx, const u
|
|||
|
||||
int mtgsThreadObject::Callback()
|
||||
{
|
||||
Console::WriteLn("MTGS > Thread Started, Opening GS Plugin...");
|
||||
Console::MsgLn("MTGS > Thread Started, Opening GS Plugin...");
|
||||
m_returncode = GSopen((void *)&pDsp, "PCSX2", 1);
|
||||
GSCSRr = 0x551B400F; // 0x55190000
|
||||
m_wait_InitDone.Set();
|
||||
if (m_returncode != 0) { return m_returncode; } // error msg will be issued to the user by Plugins.c
|
||||
Console::WriteLn("MTGS > GSopen Finished.");
|
||||
Console::MsgLn("MTGS > GSopen Finished.");
|
||||
|
||||
#ifdef RINGBUF_DEBUG_STACK
|
||||
u32 prevCmd=0;
|
||||
|
|
|
@ -2807,7 +2807,7 @@ void memReset()
|
|||
fclose(fp);
|
||||
|
||||
BiosVersion = GetBiosVersion();
|
||||
Console::MsgLn("Bios Version %d.%d", BiosVersion >> 8, BiosVersion & 0xff);
|
||||
Console::WriteLn("Bios Version %d.%d", BiosVersion >> 8, BiosVersion & 0xff);
|
||||
|
||||
//injectIRX("host.irx"); //not fully tested; still buggy
|
||||
|
||||
|
@ -2881,7 +2881,7 @@ void mmap_MarkCountedRamPage(void* ptr,u32 vaddr)
|
|||
}
|
||||
void mmap_ResetBlockTracking()
|
||||
{
|
||||
Console::WriteLn("vtlb/mmap: Block Tracking reseted ..");
|
||||
Console::MsgLn("vtlb/mmap: Block Tracking reseted ..");
|
||||
memset(psMPWC,0,sizeof(psMPWC));
|
||||
for(u32 i=0;i<(Ps2MemSize::Base>>12);i++)
|
||||
{
|
||||
|
|
|
@ -351,7 +351,7 @@ int GetPS2ElfName(char *name){
|
|||
|
||||
u32 addr;
|
||||
|
||||
Console::WriteLn("Loading System.map...");
|
||||
Console::MsgLn("Loading System.map...");
|
||||
while (!feof(fp)) {
|
||||
fseek(fp, 8, SEEK_CUR);
|
||||
buffer[0] = '0'; buffer[1] = 'x';
|
||||
|
@ -381,7 +381,7 @@ void SaveGSState(const char *file)
|
|||
{
|
||||
if( g_SaveGSStream ) return;
|
||||
|
||||
Console::Write( "SaveGSState: " ); Console::WriteLn( file );
|
||||
Console::Msg( "SaveGSState: " ); Console::MsgLn( file );
|
||||
g_fGSSave = new gzSavingState( file );
|
||||
|
||||
g_SaveGSStream = 1;
|
||||
|
@ -396,12 +396,12 @@ void LoadGSState(const char *file)
|
|||
int ret;
|
||||
gzLoadingState* f;
|
||||
|
||||
Console::Write( "LoadGSState: " );
|
||||
Console::Msg( "LoadGSState: " );
|
||||
|
||||
try
|
||||
{
|
||||
f = new gzLoadingState( file );
|
||||
Console::WriteLn( file );
|
||||
Console::MsgLn( file );
|
||||
}
|
||||
catch( Exception::FileNotFound& )
|
||||
{
|
||||
|
@ -411,7 +411,7 @@ void LoadGSState(const char *file)
|
|||
char strfile[g_MaxPath];
|
||||
CombinePaths( strfile, SSTATES_DIR, file );
|
||||
f = new gzLoadingState( file );
|
||||
Console::WriteLn( strfile );
|
||||
Console::MsgLn( strfile );
|
||||
|
||||
// If this load attempt fails, then let the exception bubble up to
|
||||
// the caller to deal with...
|
||||
|
@ -654,7 +654,7 @@ void ProcessFKeys(int fkey, int shift)
|
|||
ppblocks++;
|
||||
}
|
||||
fclose(f);
|
||||
SysPrintf("perflog.txt written\n");
|
||||
Console::Status( "perflog.txt written" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ void applypatch(int place) {
|
|||
int i;
|
||||
|
||||
if (place == 0) {
|
||||
SysPrintf(" patchnumber: %d\n", patchnumber);
|
||||
Console::WriteLn(" patchnumber: %d", patchnumber);
|
||||
}
|
||||
|
||||
for ( i = 0; i < patchnumber; i++ ) {
|
||||
|
@ -356,13 +356,13 @@ void applypatch(int place) {
|
|||
|
||||
void patchFunc_comment( char * text1, char * text2 )
|
||||
{
|
||||
SysPrintf( "comment: %s \n", text2 );
|
||||
Console::WriteLn( "comment: %s", text2 );
|
||||
}
|
||||
|
||||
|
||||
void patchFunc_gametitle( char * text1, char * text2 )
|
||||
{
|
||||
SysPrintf( "gametitle: %s \n", text2 );
|
||||
Console::WriteLn( "gametitle: %s", text2 );
|
||||
sprintf(strgametitle,"%s",text2);
|
||||
Console::SetTitle(strgametitle);
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ void patchFunc_patch( char * cmd, char * param )
|
|||
|
||||
if ( patchnumber >= MAX_PATCH )
|
||||
{
|
||||
SysPrintf( "Patch ERROR: Maximum number of patches reached: %s=%s\n", cmd, param );
|
||||
Console::Error( "Patch ERROR: Maximum number of patches reached: %s=%s", cmd, param );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -387,7 +387,7 @@ void patchFunc_patch( char * cmd, char * param )
|
|||
patch[ patchnumber ].cpu = (patch_cpu_type)PatchTableExecute( pText, NULL, cpuCore );
|
||||
if ( patch[ patchnumber ].cpu == 0 )
|
||||
{
|
||||
SysPrintf( "Unrecognized patch '%s'\n", pText );
|
||||
Console::Error( "Unrecognized patch '%s'", pText );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ void patchFunc_patch( char * cmd, char * param )
|
|||
patch[ patchnumber ].type = (patch_data_type)PatchTableExecute( pText, NULL, dataType );
|
||||
if ( patch[ patchnumber ].type == 0 )
|
||||
{
|
||||
SysPrintf( "Unrecognized patch '%s'\n", pText );
|
||||
Console::Error( "Unrecognized patch '%s'", pText );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -522,7 +522,7 @@ void inifile_read( char * name )
|
|||
|
||||
if( !f1 )
|
||||
{
|
||||
SysPrintf( _( "No patch found.Resuming execution without a patch (this is NOT an error).\n" ));
|
||||
Console::MsgLn( _( "No patch found.Resuming execution without a patch (this is NOT an error)." ));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ int AddPatch(int Mode, int Place, int Address, int Size, u64 data)
|
|||
|
||||
if ( patchnumber >= MAX_PATCH )
|
||||
{
|
||||
SysPrintf( "Patch ERROR: Maximum number of patches reached.\n");
|
||||
Console::Error( "Patch ERROR: Maximum number of patches reached.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
while ( *param && ( *param != ',' ) ) param++; \
|
||||
if ( *param ) param++; \
|
||||
while ( *param && ( *param == ' ' ) ) param++; \
|
||||
if ( *param == 0 ) { SysPrintf( _( "Not enough params for inicommand\n" ) ); return; }
|
||||
if ( *param == 0 ) { Console::Error( _( "Not enough params for inicommand" ) ); return; }
|
||||
|
||||
//
|
||||
// Enums
|
||||
|
|
|
@ -249,18 +249,18 @@ _start:
|
|||
|
||||
memcpy((char*)PSXM(sp), save, 4*4);
|
||||
|
||||
Console::Msg( Color_Cyan, "%s", tmp);
|
||||
Console::Write( Color_Cyan, "%s", tmp);
|
||||
|
||||
pc0 = ra;
|
||||
}
|
||||
|
||||
void bios_putchar () { // 3d
|
||||
Console::Msg( Color_Cyan, "%c", a0 );
|
||||
Console::Write( Color_Cyan, "%c", a0 );
|
||||
pc0 = ra;
|
||||
}
|
||||
|
||||
void bios_puts () { // 3e/3f
|
||||
Console::Msg( Color_Cyan, Ra0 );
|
||||
Console::Write( Color_Cyan, Ra0 );
|
||||
pc0 = ra;
|
||||
}
|
||||
|
||||
|
|
|
@ -270,15 +270,15 @@ void zeroEx()
|
|||
}
|
||||
|
||||
if (!strncmp(lib, "loadcore", 8) && code == 6) {
|
||||
DevCon::MsgLn("loadcore RegisterLibraryEntries (%x): %8.8s", psxRegs.pc, PSXM(psxRegs.GPR.n.a0+12));
|
||||
DevCon::WriteLn("loadcore RegisterLibraryEntries (%x): %8.8s", psxRegs.pc, PSXM(psxRegs.GPR.n.a0+12));
|
||||
}
|
||||
|
||||
if (!strncmp(lib, "intrman", 7) && code == 4) {
|
||||
DevCon::MsgLn("intrman RegisterIntrHandler (%x): intr %s, handler %x", 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::MsgLn("sifcmd sceSifRegisterRpc (%x): rpc_id %x", 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))
|
||||
|
|
|
@ -76,7 +76,7 @@ void SaveState::GetFilename( char* dest, int slot )
|
|||
SaveState::SaveState( const char* msg, const char* destination ) :
|
||||
m_version( g_SaveVersion )
|
||||
{
|
||||
Console::MsgLn( "%s %s", msg, destination );
|
||||
Console::WriteLn( "%s %s", msg, destination );
|
||||
}
|
||||
|
||||
void SaveState::FreezeAll()
|
||||
|
@ -199,7 +199,7 @@ gzLoadingState::gzLoadingState( const char* filename ) :
|
|||
// pcsx2 vm supports opening these formats
|
||||
if( m_version < 0x7a30000d )
|
||||
{
|
||||
Console::MsgLn( "Unsupported or unrecognized savestate version: %x.", m_version );
|
||||
Console::WriteLn( "Unsupported or unrecognized savestate version: %x.", m_version );
|
||||
throw Exception::UnsupportedStateVersion();
|
||||
}
|
||||
#else
|
||||
|
@ -231,7 +231,7 @@ void gzLoadingState::FreezeMem( void* data, int size )
|
|||
|
||||
void gzSavingState::FreezePlugin( const char* name, s32 (CALLBACK *freezer)(int mode, freezeData *data) )
|
||||
{
|
||||
Console::MsgLn( "\tSaving %s", name );
|
||||
Console::WriteLn( "\tSaving %s", name );
|
||||
freezeData fP = { 0, NULL };
|
||||
|
||||
if (freezer(FREEZE_SIZE, &fP) == -1)
|
||||
|
@ -257,7 +257,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::MsgLn( "\tLoading %s", name );
|
||||
Console::WriteLn( "\tLoading %s", name );
|
||||
|
||||
gzread(m_file, &fP.size, sizeof(fP.size));
|
||||
if( fP.size == 0 ) return;
|
||||
|
@ -326,7 +326,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::MsgLn( "\tSaving %s", name );
|
||||
Console::WriteLn( "\tSaving %s", name );
|
||||
|
||||
if( freezer(FREEZE_SIZE, &fP) == -1 )
|
||||
throw Exception::FreezePluginFailure( name, "saving" );
|
||||
|
@ -347,7 +347,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::MsgLn( "\tLoading %s", name );
|
||||
Console::WriteLn( "\tLoading %s", name );
|
||||
|
||||
Freeze( fP.size );
|
||||
if( fP.size == 0 ) return;
|
||||
|
|
|
@ -196,7 +196,11 @@ __forceinline void SIF0Dma()
|
|||
//HW_DMA9_CHCR &= ~0x01000000; //reset TR flag
|
||||
//psxDmaInterrupt2(2);
|
||||
iopsifbusy[0] = 0;
|
||||
PSX_INT(IopEvt_SIF0, psxCycles);
|
||||
|
||||
// iop is 1/8th the clock rate of the EE and psxcycles is in words (not quadwords)
|
||||
// So when we're all done, the equation looks like thus:
|
||||
PSX_INT(IopEvt_SIF0, ( ( psxCycles*BIAS ) / 4 ) / 8);
|
||||
|
||||
//hwIntcIrq(INTC_SBUS);
|
||||
sif0.sifData.data = 0;
|
||||
notDone = 0;
|
||||
|
@ -234,14 +238,14 @@ __forceinline void SIF0Dma()
|
|||
SIF0write((u32*)PSXM(HW_DMA9_MADR), wTransfer);
|
||||
HW_DMA9_MADR += wTransfer << 2;
|
||||
//HW_DMA9_BCR = (HW_DMA9_BCR & 0xFFFF) | (((HW_DMA9_BCR >> 16) - wTransfer)<<16);
|
||||
psxCycles += (wTransfer / 4) * BIAS; // fixme : should be / 16
|
||||
psxCycles += wTransfer;
|
||||
sif0.counter -= wTransfer;
|
||||
|
||||
//notDone = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(eesifbusy[0] == 1) // If EE SIF enabled and there's something to transfer
|
||||
if(eesifbusy[0] == 1) // If EE SIF enabled and there's something to transfer
|
||||
{
|
||||
int size = sif0dma->qwc;
|
||||
if ((psHu32(DMAC_CTRL) & 0x30) == 0x10) { // STS == fromSIF0
|
||||
|
@ -268,7 +272,7 @@ __forceinline void SIF0Dma()
|
|||
|
||||
Cpu->Clear(sif0dma->madr, readSize*4);
|
||||
|
||||
cycles += readSize * BIAS; // fixme : BIAS is factored in below
|
||||
cycles += readSize;
|
||||
sif0dma->qwc -= readSize;
|
||||
sif0dma->madr += readSize << 4;
|
||||
|
||||
|
@ -340,7 +344,8 @@ __forceinline void SIF1Dma()
|
|||
if(eesifbusy[1] == 1) // If EE SIF1 is enabled
|
||||
{
|
||||
|
||||
if ((psHu32(DMAC_CTRL) & 0xC0) == 0xC0) SIF_LOG("SIF1 stall control\n"); // STS == fromSIF1
|
||||
if ((psHu32(DMAC_CTRL) & 0xC0) == 0xC0)
|
||||
SIF_LOG("SIF1 stall control\n"); // STS == fromSIF1
|
||||
|
||||
if(sif1dma->qwc == 0) // If there's no more to transfer
|
||||
{
|
||||
|
@ -430,7 +435,7 @@ __forceinline void SIF1Dma()
|
|||
SIF1write(data, qwTransfer << 2);
|
||||
|
||||
sif1dma->madr += qwTransfer << 4;
|
||||
cycles += qwTransfer * BIAS; // fixme : BIAS is factored in above
|
||||
cycles += qwTransfer; // 1 cycle per quadword (BIAS is factored later)
|
||||
sif1dma->qwc -= qwTransfer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ void __Log( const char* fmt, ... )
|
|||
|
||||
if (varLog & 0x80000000) // log to console enabled?
|
||||
{
|
||||
Console::Write(tmp);
|
||||
Console::Msg(tmp);
|
||||
|
||||
} else if( emuLog != NULL ) // manually write to the logfile.
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ static __forceinline void _vSourceLog( u16 protocol, u8 source, u32 cpuPc, u32 c
|
|||
|
||||
if (varLog & 0x80000000) // log to console enabled?
|
||||
{
|
||||
Console::WriteLn(tmp);
|
||||
Console::MsgLn(tmp);
|
||||
|
||||
} else if( emuLog != NULL ) // manually write to the logfile.
|
||||
{
|
||||
|
|
|
@ -98,8 +98,8 @@ void SysDetect()
|
|||
|
||||
SetColor( Console::Color_White );
|
||||
|
||||
WriteLn( "x86Init:" );
|
||||
MsgLn(
|
||||
MsgLn( "x86Init:" );
|
||||
WriteLn(
|
||||
"\tCPU vendor name = %s\n"
|
||||
"\tFamilyID = %x\n"
|
||||
"\tx86Family = %s\n"
|
||||
|
@ -115,8 +115,8 @@ void SysDetect()
|
|||
cpuinfo.x86EFlags
|
||||
);
|
||||
|
||||
WriteLn( "Features:" );
|
||||
MsgLn(
|
||||
MsgLn( "Features:" );
|
||||
WriteLn(
|
||||
"\t%sDetected MMX\n"
|
||||
"\t%sDetected SSE\n"
|
||||
"\t%sDetected SSE2\n"
|
||||
|
@ -131,8 +131,8 @@ void SysDetect()
|
|||
|
||||
if ( cpuinfo.x86ID[0] == 'A' ) //AMD cpu
|
||||
{
|
||||
WriteLn( " Extended AMD Features:" );
|
||||
MsgLn(
|
||||
MsgLn( " Extended AMD Features:" );
|
||||
WriteLn(
|
||||
"\t%sDetected MMX2\n"
|
||||
"\t%sDetected 3DNOW\n"
|
||||
"\t%sDetected 3DNOW2\n",
|
||||
|
|
|
@ -99,29 +99,33 @@ namespace Console
|
|||
// them from different buildypes. The return values are always zero.
|
||||
|
||||
// Writes a newline to the console.
|
||||
extern bool __fastcall WriteLn();
|
||||
extern bool __fastcall Newline();
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// No newline is appended.
|
||||
extern bool __fastcall Write( const char* fmt );
|
||||
extern bool __fastcall Msg( const char* fmt );
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// A newline is automatically appended.
|
||||
extern bool __fastcall WriteLn( const char* fmt );
|
||||
extern bool __fastcall MsgLn( const char* fmt );
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// A newline is automatically appended, and the console color reset to default.
|
||||
extern bool __fastcall MsgLn( Colors color, const char* fmt );
|
||||
|
||||
// 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 MsgLn( Colors color, const char* fmt, ... );
|
||||
extern bool WriteLn( Colors color, 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 Msg( Colors color, const char* fmt, ... );
|
||||
extern bool Write( Colors color, const char* fmt, ... );
|
||||
|
||||
// Writes a formatted message to the console (no newline)
|
||||
extern bool Msg( const char* fmt, ... );
|
||||
extern bool Write( const char* fmt, ... );
|
||||
|
||||
// Writes a formatted message to the console, with appended newline.
|
||||
extern bool MsgLn( const char* fmt, ... );
|
||||
extern bool WriteLn( const char* fmt, ... );
|
||||
|
||||
// Displays a message in the console with red emphasis.
|
||||
// Newline is automatically appended.
|
||||
|
@ -130,6 +134,10 @@ namespace Console
|
|||
// Displays a message in the console with yellow emphasis.
|
||||
// Newline is automatically appended.
|
||||
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, ... );
|
||||
}
|
||||
|
||||
using Console::Color_Red;
|
||||
|
|
|
@ -79,7 +79,7 @@ int vu0Init()
|
|||
VU0.Mem = (u8*)VirtualAlloc((void*)0x11000000, 0x10000, MEM_RESERVE|MEM_PHYSICAL, PAGE_READWRITE);
|
||||
|
||||
if( VU0.Mem != (void*)0x11000000 ) {
|
||||
Console::MsgLn("Failed to alloc vu0mem 0x11000000 %d", GetLastError());
|
||||
Console::WriteLn("Failed to alloc vu0mem 0x11000000 %d", GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,107 +24,147 @@
|
|||
#include "plugins.h"
|
||||
#include "resource.h"
|
||||
|
||||
#define ComboAddPlugin(hw, str) { \
|
||||
sprintf(tmpStr, "%s %d.%d.%d", PS2E_GetLibName(), (version>>8)&0xff, version&0xff, (version>>24)&0xff); \
|
||||
lp = (char *)malloc(strlen(FindData.cFileName)+8); \
|
||||
sprintf(lp, "%s", FindData.cFileName); \
|
||||
i = ComboBox_AddString(hw, tmpStr); \
|
||||
ComboBox_SetItemData(hw, i, lp); \
|
||||
if (_stricmp(str, lp)==0) \
|
||||
ComboBox_SetCurSel(hw, i); \
|
||||
}
|
||||
struct ComboInitializer
|
||||
{
|
||||
HWND hwnd;
|
||||
|
||||
BOOL OnConfigureDialog(HWND hW) {
|
||||
WIN32_FIND_DATA FindData;
|
||||
HANDLE Find;
|
||||
HANDLE Lib;
|
||||
|
||||
WIN32_FIND_DATA FindData;
|
||||
|
||||
_PS2EgetLibType PS2E_GetLibType;
|
||||
_PS2EgetLibName PS2E_GetLibName;
|
||||
_PS2EgetLibVersion2 PS2E_GetLibVersion2;
|
||||
HWND hWC_GS=GetDlgItem(hW,IDC_LISTGS);
|
||||
HWND hWC_PAD1=GetDlgItem(hW,IDC_LISTPAD1);
|
||||
HWND hWC_PAD2=GetDlgItem(hW,IDC_LISTPAD2);
|
||||
HWND hWC_SPU2=GetDlgItem(hW,IDC_LISTSPU2);
|
||||
HWND hWC_CDVD=GetDlgItem(hW,IDC_LISTCDVD);
|
||||
HWND hWC_DEV9=GetDlgItem(hW,IDC_LISTDEV9);
|
||||
HWND hWC_USB=GetDlgItem(hW,IDC_LISTUSB);
|
||||
HWND hWC_FW=GetDlgItem(hW,IDC_LISTFW);
|
||||
HWND hWC_BIOS=GetDlgItem(hW,IDC_LISTBIOS);
|
||||
char tmpStr[g_MaxPath];
|
||||
char *lp;
|
||||
int i;
|
||||
|
||||
strcpy(tmpStr, Config.PluginsDir);
|
||||
strcat(tmpStr, "*.dll");
|
||||
Find = FindFirstFile(tmpStr, &FindData);
|
||||
long version;
|
||||
u32 type;
|
||||
|
||||
do {
|
||||
if (Find==INVALID_HANDLE_VALUE) break;
|
||||
ComboInitializer( HWND hwndDlg ) :
|
||||
hwnd( hwndDlg )
|
||||
, Find( INVALID_HANDLE_VALUE )
|
||||
, Lib( NULL )
|
||||
, PS2E_GetLibType( NULL )
|
||||
, PS2E_GetLibName( NULL )
|
||||
, PS2E_GetLibVersion2( NULL )
|
||||
{
|
||||
char tmpStr[g_MaxPath];
|
||||
CombinePaths(tmpStr, Config.PluginsDir, "*.dll");
|
||||
Find = FindFirstFile(tmpStr, &FindData);
|
||||
}
|
||||
|
||||
~ComboInitializer()
|
||||
{
|
||||
if (Find!=INVALID_HANDLE_VALUE)
|
||||
FindClose(Find);
|
||||
}
|
||||
|
||||
bool FindNext()
|
||||
{
|
||||
return !!FindNextFile( Find, &FindData );
|
||||
}
|
||||
|
||||
bool LoadNextLibrary()
|
||||
{
|
||||
char tmpStr[g_MaxPath];
|
||||
CombinePaths( tmpStr, Config.PluginsDir, FindData.cFileName );
|
||||
Lib = LoadLibrary(tmpStr);
|
||||
if (Lib == NULL) { SysPrintf("%s: %s\n", tmpStr, SysLibError()); continue; }
|
||||
if (Lib == NULL) { Console::Error("%s: %s", tmpStr, SysLibError()); return false; }
|
||||
|
||||
PS2E_GetLibType = (_PS2EgetLibType) GetProcAddress((HMODULE)Lib,"PS2EgetLibType");
|
||||
PS2E_GetLibName = (_PS2EgetLibName) GetProcAddress((HMODULE)Lib,"PS2EgetLibName");
|
||||
PS2E_GetLibVersion2 = (_PS2EgetLibVersion2) GetProcAddress((HMODULE)Lib,"PS2EgetLibVersion2");
|
||||
|
||||
if (PS2E_GetLibType != NULL && PS2E_GetLibName != NULL && PS2E_GetLibVersion2 != NULL) {
|
||||
u32 version;
|
||||
long type;
|
||||
if( PS2E_GetLibType == NULL || PS2E_GetLibName == NULL || PS2E_GetLibVersion2 == NULL )
|
||||
return false;
|
||||
|
||||
type = PS2E_GetLibType();
|
||||
if (type & PS2E_LT_GS) {
|
||||
version = PS2E_GetLibVersion2(PS2E_LT_GS);
|
||||
if ( ((version >> 16)&0xff) == PS2E_GS_VERSION) {
|
||||
ComboAddPlugin(hWC_GS, winConfig.GS);
|
||||
} else SysPrintf("Plugin %s: Version %x != %x\n", FindData.cFileName, 0xff&(version >> 16), PS2E_GS_VERSION);
|
||||
}
|
||||
if (type & PS2E_LT_PAD) {
|
||||
_PADquery query;
|
||||
type = PS2E_GetLibType();
|
||||
return true;
|
||||
}
|
||||
|
||||
query = (_PADquery)GetProcAddress((HMODULE)Lib, "PADquery");
|
||||
version = PS2E_GetLibVersion2(PS2E_LT_PAD);
|
||||
if (((version >> 16)&0xff) == PS2E_PAD_VERSION && query) {
|
||||
void AddPlugin(HWND hwndCombo, const char* str)
|
||||
{
|
||||
char tmpStr[g_MaxPath];
|
||||
int i;
|
||||
|
||||
sprintf(tmpStr, "%s %d.%d.%d", PS2E_GetLibName(), (version>>8)&0xff, version&0xff, (version>>24)&0xff);
|
||||
char* lp = (char *)malloc(strlen(FindData.cFileName)+8);
|
||||
sprintf(lp, "%s", FindData.cFileName);
|
||||
i = ComboBox_AddString(hwndCombo, tmpStr);
|
||||
ComboBox_SetItemData(hwndCombo, i, lp);
|
||||
if (_stricmp(str, lp)==0)
|
||||
ComboBox_SetCurSel(hwndCombo, i);
|
||||
}
|
||||
|
||||
bool CheckVersion( const char* typeStr, u32 pluginType, long checkver )
|
||||
{
|
||||
if( type & pluginType )
|
||||
{
|
||||
version = PS2E_GetLibVersion2( pluginType );
|
||||
if ( ((version >> 16)&0xff) == checkver )
|
||||
return true;
|
||||
|
||||
Console::Notice("%s Plugin %s: Version %x != %x", typeStr, FindData.cFileName, 0xff&(version >> 16), checkver);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
BOOL OnConfigureDialog(HWND hW) {
|
||||
HWND const hWC_GS=GetDlgItem(hW,IDC_LISTGS);
|
||||
HWND const hWC_PAD1=GetDlgItem(hW,IDC_LISTPAD1);
|
||||
HWND const hWC_PAD2=GetDlgItem(hW,IDC_LISTPAD2);
|
||||
HWND const hWC_SPU2=GetDlgItem(hW,IDC_LISTSPU2);
|
||||
HWND const hWC_CDVD=GetDlgItem(hW,IDC_LISTCDVD);
|
||||
HWND const hWC_DEV9=GetDlgItem(hW,IDC_LISTDEV9);
|
||||
HWND const hWC_USB=GetDlgItem(hW,IDC_LISTUSB);
|
||||
HWND const hWC_FW=GetDlgItem(hW,IDC_LISTFW);
|
||||
HWND const hWC_BIOS=GetDlgItem(hW,IDC_LISTBIOS);
|
||||
|
||||
ComboInitializer tool(hW);
|
||||
if( tool.Find == INVALID_HANDLE_VALUE ) // epic fail?
|
||||
return FALSE;
|
||||
|
||||
do
|
||||
{
|
||||
if( !tool.LoadNextLibrary() ) continue;
|
||||
|
||||
if( tool.CheckVersion( "GS", PS2E_LT_GS, PS2E_GS_VERSION ) )
|
||||
tool.AddPlugin(hWC_GS, winConfig.GS);
|
||||
|
||||
if (tool.type & PS2E_LT_PAD)
|
||||
{
|
||||
_PADquery query;
|
||||
|
||||
query = (_PADquery)GetProcAddress((HMODULE)tool.Lib, "PADquery");
|
||||
if( query != NULL )
|
||||
{
|
||||
if( tool.CheckVersion( "PAD", PS2E_LT_PAD, PS2E_PAD_VERSION ) )
|
||||
{
|
||||
if (query() & 0x1)
|
||||
ComboAddPlugin(hWC_PAD1, winConfig.PAD1);
|
||||
tool.AddPlugin(hWC_PAD1, winConfig.PAD1);
|
||||
if (query() & 0x2)
|
||||
ComboAddPlugin(hWC_PAD2, winConfig.PAD2);
|
||||
} else SysPrintf("Plugin %s: Version %x != %x\n", FindData.cFileName, (version >> 16)&0xff, PS2E_PAD_VERSION);
|
||||
}
|
||||
if (type & PS2E_LT_SPU2) {
|
||||
version = PS2E_GetLibVersion2(PS2E_LT_SPU2);
|
||||
if ( ((version >> 16)&0xff) == PS2E_SPU2_VERSION) {
|
||||
ComboAddPlugin(hWC_SPU2, winConfig.SPU2);
|
||||
} else SysPrintf("Plugin %s: Version %x != %x\n", FindData.cFileName, (version >> 16)&0xff, PS2E_SPU2_VERSION);
|
||||
}
|
||||
if (type & PS2E_LT_CDVD) {
|
||||
version = PS2E_GetLibVersion2(PS2E_LT_CDVD);
|
||||
if (((version >> 16)&0xff) == PS2E_CDVD_VERSION) {
|
||||
ComboAddPlugin(hWC_CDVD, winConfig.CDVD);
|
||||
} else SysPrintf("Plugin %s: Version %x != %x\n", FindData.cFileName, (version >> 16)&0xff, PS2E_CDVD_VERSION);
|
||||
}
|
||||
if (type & PS2E_LT_DEV9) {
|
||||
version = PS2E_GetLibVersion2(PS2E_LT_DEV9);
|
||||
if (((version >> 16)&0xff) == PS2E_DEV9_VERSION) {
|
||||
ComboAddPlugin(hWC_DEV9, winConfig.DEV9);
|
||||
} else SysPrintf("Plugin %s: Version %x != %x\n", FindData.cFileName, (version >> 16)&0xff, PS2E_DEV9_VERSION);
|
||||
}
|
||||
if (type & PS2E_LT_USB) {
|
||||
version = PS2E_GetLibVersion2(PS2E_LT_USB);
|
||||
if (((version >> 16)&0xff) == PS2E_USB_VERSION) {
|
||||
ComboAddPlugin(hWC_USB, winConfig.USB);
|
||||
} else SysPrintf("Plugin %s: Version %x != %x\n", FindData.cFileName, (version >> 16)&0xff, PS2E_USB_VERSION);
|
||||
}
|
||||
if (type & PS2E_LT_FW) {
|
||||
version = PS2E_GetLibVersion2(PS2E_LT_FW);
|
||||
if (((version >> 16)&0xff) == PS2E_FW_VERSION) {
|
||||
ComboAddPlugin(hWC_FW, winConfig.FW);
|
||||
} else SysPrintf("Plugin %s: Version %x != %x\n", FindData.cFileName, (version >> 16)&0xff, PS2E_FW_VERSION);
|
||||
tool.AddPlugin(hWC_PAD2, winConfig.PAD2);
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (FindNextFile(Find,&FindData));
|
||||
|
||||
if (Find!=INVALID_HANDLE_VALUE) FindClose(Find);
|
||||
if( tool.CheckVersion( "SPU2", PS2E_LT_SPU2, PS2E_SPU2_VERSION ) )
|
||||
tool.AddPlugin(hWC_SPU2, winConfig.SPU2);
|
||||
|
||||
if( tool.CheckVersion( "CDVD", PS2E_LT_CDVD, PS2E_CDVD_VERSION ) )
|
||||
tool.AddPlugin(hWC_CDVD, winConfig.CDVD);
|
||||
|
||||
if( tool.CheckVersion( "DEV9", PS2E_LT_DEV9, PS2E_DEV9_VERSION ) )
|
||||
tool.AddPlugin(hWC_DEV9, winConfig.DEV9);
|
||||
|
||||
if( tool.CheckVersion( "USB", PS2E_LT_USB, PS2E_USB_VERSION ) )
|
||||
tool.AddPlugin(hWC_USB, winConfig.USB);
|
||||
|
||||
if( tool.CheckVersion( "FW", PS2E_LT_FW, PS2E_FW_VERSION ) )
|
||||
tool.AddPlugin(hWC_FW, winConfig.FW);
|
||||
|
||||
} while( tool.FindNext() );
|
||||
|
||||
// BIOS
|
||||
|
||||
|
@ -135,11 +175,20 @@ BOOL OnConfigureDialog(HWND hW) {
|
|||
if (_stricmp(Config.Bios, lp)==0)
|
||||
ComboBox_SetCurSel(hWC_BIOS, i);*/
|
||||
|
||||
HANDLE Find;
|
||||
|
||||
WIN32_FIND_DATA FindData;
|
||||
char tmpStr[g_MaxPath];
|
||||
|
||||
strcpy(tmpStr, Config.BiosDir);
|
||||
strcat(tmpStr, "*");
|
||||
Find=FindFirstFile(tmpStr, &FindData);
|
||||
|
||||
do {
|
||||
do
|
||||
{
|
||||
char* lp;
|
||||
int i;
|
||||
|
||||
char description[50]; //2002-09-22 (Florin)
|
||||
if (Find==INVALID_HANDLE_VALUE) break;
|
||||
if (!strcmp(FindData.cFileName, ".")) continue;
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace Console
|
|||
|
||||
|
||||
// Writes a newline to the console.
|
||||
__forceinline bool __fastcall WriteLn()
|
||||
__forceinline bool __fastcall Newline()
|
||||
{
|
||||
if (hConsole != NULL)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ namespace Console
|
|||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// No newline is appended.
|
||||
__forceinline bool __fastcall Write( const char* fmt )
|
||||
__forceinline bool __fastcall Msg( const char* fmt )
|
||||
{
|
||||
if (hConsole != NULL)
|
||||
{
|
||||
|
@ -121,15 +121,26 @@ namespace Console
|
|||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// A newline is automatically appended.
|
||||
__forceinline bool __fastcall WriteLn( const char* fmt )
|
||||
__forceinline bool __fastcall MsgLn( const char* fmt )
|
||||
{
|
||||
Write( fmt );
|
||||
WriteLn();
|
||||
Newline();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Writes an unformatted string of text to the console (fast!)
|
||||
// A newline is automatically appended.
|
||||
__forceinline bool __fastcall MsgLn( Colors color, const char* fmt )
|
||||
{
|
||||
SetColor( color );
|
||||
Write( fmt );
|
||||
ClearColor();
|
||||
Newline();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Writes a formatted message to the console, with appended newline.
|
||||
static __forceinline void __fastcall _MsgLn( Colors color, const char* fmt, va_list args )
|
||||
static __forceinline void __fastcall _WriteLn( Colors color, const char* fmt, va_list args )
|
||||
{
|
||||
char msg[2048];
|
||||
|
||||
|
@ -144,17 +155,17 @@ namespace Console
|
|||
}
|
||||
|
||||
// Writes a line of colored text to the console, with automatic newline appendage.
|
||||
bool MsgLn( Colors color, const char* fmt, ... )
|
||||
bool WriteLn( Colors color, const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
va_start(list,fmt);
|
||||
_MsgLn( Color_White, fmt, list );
|
||||
_WriteLn( color, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
// writes a formatted message to the console (no newline and no color)
|
||||
bool Msg( const char* fmt, ... )
|
||||
bool Write( const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
char msg[2048];
|
||||
|
@ -164,12 +175,12 @@ namespace Console
|
|||
msg[2047] = '\0';
|
||||
va_end(list);
|
||||
|
||||
Write( msg );
|
||||
Msg( msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
// writes a formatted message to the console (no newline and no color)
|
||||
bool Msg( Colors color, const char* fmt, ... )
|
||||
bool Write( Colors color, const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
char msg[2048];
|
||||
|
@ -180,14 +191,14 @@ namespace Console
|
|||
va_end(list);
|
||||
|
||||
SetColor( color );
|
||||
Write( msg );
|
||||
Msg( msg );
|
||||
ClearColor();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Writes a formatted message to the console, with appended newline.
|
||||
// (no coloring)
|
||||
bool MsgLn( const char* fmt, ... )
|
||||
bool WriteLn( const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
char msg[2048];
|
||||
|
@ -197,7 +208,7 @@ namespace Console
|
|||
va_end(list);
|
||||
|
||||
strcat( msg, "\n" );
|
||||
Write( msg );
|
||||
Msg( msg );
|
||||
if( emuLog != NULL )
|
||||
fflush( emuLog ); // manual flush to accomany manual newline
|
||||
return false;
|
||||
|
@ -209,7 +220,7 @@ namespace Console
|
|||
{
|
||||
va_list list;
|
||||
va_start(list,fmt);
|
||||
_MsgLn( Color_Red, fmt, list );
|
||||
_WriteLn( Color_Red, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
@ -220,8 +231,20 @@ namespace Console
|
|||
{
|
||||
va_list list;
|
||||
va_start(list,fmt);
|
||||
_MsgLn( Color_Yellow, fmt, list );
|
||||
_WriteLn( Color_Yellow, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Displays a message in the console with green emphasis.
|
||||
// Newline is automatically appended.
|
||||
bool Status( const char* fmt, ... )
|
||||
{
|
||||
va_list list;
|
||||
va_start(list,fmt);
|
||||
_WriteLn( Color_Green, fmt, list );
|
||||
va_end(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -658,9 +658,7 @@ class MemoryCard
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
SysPrintf("IFC: %d\n\n", IFC);
|
||||
#endif
|
||||
DbgCon::WriteLn("IFC: %d", IFC);
|
||||
|
||||
// Read the cluster with the indirect data to the FAT.
|
||||
fseek(fp, 0x420 * IFC, SEEK_SET);
|
||||
|
|
|
@ -266,7 +266,7 @@ void ProfilerInit()
|
|||
if (ProfRunning)
|
||||
return;
|
||||
|
||||
//Console::Write( "Profiler Thread Initializing..." );
|
||||
//Console::Msg( "Profiler Thread Initializing..." );
|
||||
ProfRunning=true;
|
||||
DuplicateHandle(GetCurrentProcess(),
|
||||
GetCurrentThread(),
|
||||
|
@ -280,12 +280,12 @@ void ProfilerInit()
|
|||
|
||||
hProfThread=CreateThread(0,0,(LPTHREAD_START_ROUTINE)ProfilerThread,0,0,0);
|
||||
SetThreadPriority(hProfThread,THREAD_PRIORITY_HIGHEST);
|
||||
//Console::WriteLn( " Done!" );
|
||||
//Console::MsgLn( " Done!" );
|
||||
}
|
||||
|
||||
void ProfilerTerm()
|
||||
{
|
||||
//Console::Write( "Profiler Terminating..." );
|
||||
//Console::Msg( "Profiler Terminating..." );
|
||||
if (!ProfRunning)
|
||||
return;
|
||||
|
||||
|
@ -305,7 +305,7 @@ void ProfilerTerm()
|
|||
CloseHandle( hMtgsThread );
|
||||
|
||||
DeleteCriticalSection( &ProfModulesLock );
|
||||
//Console::WriteLn( " Done!" );
|
||||
//Console::MsgLn( " Done!" );
|
||||
}
|
||||
|
||||
void ProfilerSetEnabled(bool Enabled)
|
||||
|
|
|
@ -2943,7 +2943,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
UsePrecompiledHeader="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
|
@ -2951,7 +2951,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
UsePrecompiledHeader="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
|
@ -2959,7 +2959,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
UsePrecompiledHeader="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
|
@ -2967,7 +2967,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
UsePrecompiledHeader="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
|
@ -2975,7 +2975,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
UsePrecompiledHeader="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
|
@ -2983,7 +2983,7 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="0"
|
||||
UsePrecompiledHeader="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
|
|
|
@ -312,7 +312,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
Console::Open();
|
||||
|
||||
//if( lpCmdLine == NULL || *lpCmdLine == 0 )
|
||||
// Console::WriteLn("-help to see arguments");
|
||||
// Console::MsgLn("-help to see arguments");
|
||||
}
|
||||
|
||||
// Load the command line overrides for plugins:
|
||||
|
@ -377,15 +377,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
// output the help commands
|
||||
Console::SetColor( Console::Color_White );
|
||||
|
||||
Console::WriteLn( "Hotkeys:" );
|
||||
Console::MsgLn( "Hotkeys:" );
|
||||
|
||||
Console::WriteLn(
|
||||
Console::MsgLn(
|
||||
"\tF1 - save state\n"
|
||||
"\t(Shift +) F2 - cycle states\n"
|
||||
"\tF3 - load state"
|
||||
);
|
||||
|
||||
DevCon::WriteLn(
|
||||
DevCon::MsgLn(
|
||||
"\tF10 - dump performance counters\n"
|
||||
"\tF11 - save GS state\n"
|
||||
"\tF12 - dump hardware registers"
|
||||
|
|
|
@ -460,11 +460,6 @@ void CALLBACK KeyEvent(keyEvent* ev)
|
|||
}
|
||||
break;
|
||||
|
||||
/*case VK_NUMPAD0:
|
||||
Config.Hacks ^= 2;
|
||||
if (Config.Hacks & 2) {SysPrintf( "Overflow Check OFF\n" );} else {SysPrintf( "Overflow Check ON\n" );}
|
||||
break;*/
|
||||
|
||||
case VK_ESCAPE:
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if( g_SaveGSStream >= 3 ) {
|
||||
|
@ -585,7 +580,7 @@ void SysPrintf(const char *fmt, ...)
|
|||
msg[511] = '\0';
|
||||
va_end(list);
|
||||
|
||||
Console::Write( msg );
|
||||
Console::Msg( msg );
|
||||
}
|
||||
|
||||
void SysMessage(const char *fmt, ...)
|
||||
|
|
|
@ -368,7 +368,7 @@ int SysPhysicalAlloc(u32 size, PSMEMORYBLOCK* pblock)
|
|||
pblock->aPFNs = (uptr*)HeapAlloc (GetProcessHeap (), 0, PFNArraySize);
|
||||
|
||||
if (pblock->aPFNs == NULL) {
|
||||
SysPrintf("Failed to allocate on heap.\n");
|
||||
Console::Error("Failed to allocate on heap.");
|
||||
goto eCleanupAndExit;
|
||||
}
|
||||
|
||||
|
@ -378,13 +378,13 @@ int SysPhysicalAlloc(u32 size, PSMEMORYBLOCK* pblock)
|
|||
|
||||
if( bResult != TRUE )
|
||||
{
|
||||
SysPrintf("Cannot allocate physical pages, error %u.\n", GetLastError() );
|
||||
Console::Error("Virtual Memory Error %u > Cannot allocate physical pages.", GetLastError() );
|
||||
goto eCleanupAndExit;
|
||||
}
|
||||
|
||||
if( NumberOfPagesInitial != pblock->NumberPages )
|
||||
{
|
||||
SysPrintf("Allocated only %p of %p pages.\n", pblock->NumberPages, NumberOfPagesInitial );
|
||||
Console::Error("Virtual Memory > Physical allocation failed!\n\tAllocated only %p of %p pages.", pblock->NumberPages, NumberOfPagesInitial );
|
||||
goto eCleanupAndExit;
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ int SysVirtualPhyAlloc(void* base, u32 size, PSMEMORYBLOCK* pblock)
|
|||
LPVOID lpMemReserved = VirtualAlloc( base, size, MEM_RESERVE | MEM_PHYSICAL, PAGE_READWRITE );
|
||||
if( lpMemReserved == NULL || base != lpMemReserved )
|
||||
{
|
||||
Console::MsgLn("VirtualMemory Error %d > Cannot reserve memory at 0x%8.8x(%x).", base, lpMemReserved, GetLastError());
|
||||
Console::WriteLn("VirtualMemory Error %d > Cannot reserve memory at 0x%8.8x(%x).", base, lpMemReserved, GetLastError());
|
||||
goto eCleanupAndExit;
|
||||
}
|
||||
|
||||
|
@ -429,7 +429,7 @@ int SysVirtualPhyAlloc(void* base, u32 size, PSMEMORYBLOCK* pblock)
|
|||
|
||||
if( bResult != TRUE )
|
||||
{
|
||||
Console::MsgLn("VirtualMemory Error %u > MapUserPhysicalPages failed to map.", GetLastError() );
|
||||
Console::WriteLn("VirtualMemory Error %u > MapUserPhysicalPages failed to map.", GetLastError() );
|
||||
goto eCleanupAndExit;
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,7 @@ void SysVirtualFree(void* lpMemReserved, u32 size)
|
|||
// unmap
|
||||
if( MapUserPhysicalPages( lpMemReserved, (size+s_dwPageSize-1)/s_dwPageSize, NULL ) != TRUE )
|
||||
{
|
||||
Console::MsgLn("VirtualMemory Error %u > MapUserPhysicalPages failed to unmap", GetLastError() );
|
||||
Console::WriteLn("VirtualMemory Error %u > MapUserPhysicalPages failed to unmap", GetLastError() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ int _getFreeXMMreg()
|
|||
_freeXMMreg(tempi);
|
||||
return tempi;
|
||||
}
|
||||
SysPrintf("*PCSX2*: XMM Reg Allocation Error in _getFreeXMMreg()!\n");
|
||||
Console::Error("*PCSX2*: XMM Reg Allocation Error in _getFreeXMMreg()!");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ void fpuFloat2(int regd) { // +NaN -> +fMax, -NaN -> -fMax, +Inf -> +fMax, -Inf
|
|||
_freeXMMreg(t1reg);
|
||||
}
|
||||
else {
|
||||
SysPrintf("fpuFloat2() allocation error\n");
|
||||
Console::Error("fpuFloat2() allocation error");
|
||||
t1reg = (regd == 0) ? 1 : 0; // get a temp reg thats not regd
|
||||
SSE_MOVAPS_XMM_to_M128( (uptr)&FPU_FLOAT_TEMP[0], t1reg ); // backup data in t1reg to a temp address
|
||||
SSE_MOVSS_XMM_to_XMM(t1reg, regd);
|
||||
|
@ -483,9 +483,9 @@ void FPU_ADD_SUB(int regd, int regt, int issub)
|
|||
int xmmtemp = _allocTempXMMreg(XMMT_FPS, -1); //temporary for anding with regd/regt
|
||||
int roundmodeFlag = 0;
|
||||
|
||||
if (tempecx != ECX) { SysPrintf("FPU: ADD/SUB Allocation Error!\n"); tempecx = ECX;}
|
||||
if (temp2 == -1) { SysPrintf("FPU: ADD/SUB Allocation Error!\n"); temp2 = EAX;}
|
||||
if (xmmtemp == -1) { SysPrintf("FPU: ADD/SUB Allocation Error!\n"); xmmtemp = XMM0;}
|
||||
if (tempecx != ECX) { Console::Error("FPU: ADD/SUB Allocation Error!"); tempecx = ECX;}
|
||||
if (temp2 == -1) { Console::Error("FPU: ADD/SUB Allocation Error!"); temp2 = EAX;}
|
||||
if (xmmtemp == -1) { Console::Error("FPU: ADD/SUB Allocation Error!"); xmmtemp = XMM0;}
|
||||
|
||||
if ((g_sseMXCSR & 0x00006000) != 0x00006000) { // Set roundmode to chop if it isn't already
|
||||
roundmode_temp[0] = (g_sseMXCSR & 0xFFFF9FFF) | 0x00006000; // Set new roundmode
|
||||
|
@ -640,7 +640,7 @@ int recCommutativeOp(int info, int regd, int op)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
SysPrintf("FPU: recCommutativeOp case 4\n");
|
||||
Console::Status("FPU: recCommutativeOp case 4");
|
||||
SSE_MOVSS_M32_to_XMM(regd, (uptr)&fpuRegs.fpr[_Fs_]);
|
||||
SSE_MOVSS_M32_to_XMM(t0reg, (uptr)&fpuRegs.fpr[_Ft_]);
|
||||
if (CHECK_FPU_EXTRA_OVERFLOW || (op >= 2)) { fpuFloat2(regd); fpuFloat2(t0reg); }
|
||||
|
@ -801,9 +801,9 @@ void recC_EQ_xmm(int info)
|
|||
SSE_UCOMISS_XMM_to_XMM(EEREC_S, EEREC_T);
|
||||
break;
|
||||
default:
|
||||
SysPrintf("recC_EQ_xmm: Default\n");
|
||||
Console::Status("recC_EQ_xmm: Default");
|
||||
tempReg = _allocX86reg(-1, X86TYPE_TEMP, 0, 0);
|
||||
if (tempReg < 0) {SysPrintf("FPU: DIV Allocation Error!\n"); tempReg = EAX;}
|
||||
if (tempReg < 0) {Console::Error("FPU: DIV Allocation Error!"); tempReg = EAX;}
|
||||
MOV32MtoR(tempReg, (uptr)&fpuRegs.fpr[_Fs_]);
|
||||
CMP32MtoR(tempReg, (uptr)&fpuRegs.fpr[_Ft_]);
|
||||
|
||||
|
@ -881,9 +881,9 @@ void recC_LE_xmm(int info )
|
|||
SSE_UCOMISS_XMM_to_XMM(EEREC_S, EEREC_T);
|
||||
break;
|
||||
default: // Untested and incorrect, but this case is never reached AFAIK (cottonvibes)
|
||||
SysPrintf("recC_LE_xmm: Default\n");
|
||||
Console::Status("recC_LE_xmm: Default");
|
||||
tempReg = _allocX86reg(-1, X86TYPE_TEMP, 0, 0);
|
||||
if (tempReg < 0) {SysPrintf("FPU: DIV Allocation Error!\n"); tempReg = EAX;}
|
||||
if (tempReg < 0) {Console::Error("FPU: DIV Allocation Error!"); tempReg = EAX;}
|
||||
MOV32MtoR(tempReg, (uptr)&fpuRegs.fpr[_Fs_]);
|
||||
CMP32MtoR(tempReg, (uptr)&fpuRegs.fpr[_Ft_]);
|
||||
|
||||
|
@ -958,9 +958,9 @@ void recC_LT_xmm(int info)
|
|||
SSE_UCOMISS_XMM_to_XMM(EEREC_S, EEREC_T);
|
||||
break;
|
||||
default:
|
||||
SysPrintf("recC_LT_xmm: Default\n");
|
||||
Console::Status("recC_LT_xmm: Default");
|
||||
tempReg = _allocX86reg(-1, X86TYPE_TEMP, 0, 0);
|
||||
if (tempReg < 0) {SysPrintf("FPU: DIV Allocation Error!\n"); tempReg = EAX;}
|
||||
if (tempReg < 0) {Console::Error("FPU: DIV Allocation Error!"); tempReg = EAX;}
|
||||
MOV32MtoR(tempReg, (uptr)&fpuRegs.fpr[_Fs_]);
|
||||
CMP32MtoR(tempReg, (uptr)&fpuRegs.fpr[_Ft_]);
|
||||
|
||||
|
@ -1044,8 +1044,8 @@ void recDIVhelper1(int regd, int regt) // Sets flags
|
|||
u32 *ajmp32, *bjmp32;
|
||||
int t1reg = _allocTempXMMreg(XMMT_FPS, -1);
|
||||
int tempReg = _allocX86reg(-1, X86TYPE_TEMP, 0, 0);
|
||||
//if (t1reg == -1) {SysPrintf("FPU: DIV Allocation Error!\n");}
|
||||
if (tempReg == -1) {SysPrintf("FPU: DIV Allocation Error!\n"); tempReg = EAX;}
|
||||
//if (t1reg == -1) {Console::Error("FPU: DIV Allocation Error!");}
|
||||
if (tempReg == -1) {Console::Error("FPU: DIV Allocation Error!"); tempReg = EAX;}
|
||||
|
||||
AND32ItoM((uptr)&fpuRegs.fprc[31], ~(FPUflagI|FPUflagD)); // Clear I and D flags
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ void recDIVhelper2(int regd, int regt) // Doesn't sets flags
|
|||
void recDIV_S_xmm(int info)
|
||||
{
|
||||
int t0reg = _allocTempXMMreg(XMMT_FPS, -1);
|
||||
//if (t0reg == -1) {SysPrintf("FPU: DIV Allocation Error!\n");}
|
||||
//if (t0reg == -1) {Console::Error("FPU: DIV Allocation Error!");}
|
||||
|
||||
switch(info & (PROCESS_EE_S|PROCESS_EE_T) ) {
|
||||
case PROCESS_EE_S:
|
||||
|
@ -1607,7 +1607,7 @@ void recSUBop(int info, int regd)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
SysPrintf("FPU: SUB case 4\n");
|
||||
Console::Notice("FPU: SUB case 4");
|
||||
SSE_MOVSS_M32_to_XMM(t0reg, (uptr)&fpuRegs.fpr[_Ft_]);
|
||||
SSE_MOVSS_M32_to_XMM(regd, (uptr)&fpuRegs.fpr[_Fs_]);
|
||||
recSUBhelper(regd, t0reg);
|
||||
|
@ -1642,7 +1642,7 @@ void recSQRT_S_xmm(int info)
|
|||
{
|
||||
u8* pjmp;
|
||||
int tempReg = _allocX86reg(-1, X86TYPE_TEMP, 0, 0);
|
||||
if (tempReg == -1) {SysPrintf("FPU: SQRT Allocation Error!\n"); tempReg = EAX;}
|
||||
if (tempReg == -1) {Console::Error("FPU: SQRT Allocation Error!"); tempReg = EAX;}
|
||||
//SysPrintf("FPU: SQRT\n");
|
||||
|
||||
if( info & PROCESS_EE_T ) SSE_MOVSS_XMM_to_XMM(EEREC_D, EEREC_T);
|
||||
|
@ -1681,8 +1681,8 @@ void recRSQRThelper1(int regd, int t0reg) // Preforms the RSQRT function when re
|
|||
u32 *pjmp32;
|
||||
int t1reg = _allocTempXMMreg(XMMT_FPS, -1);
|
||||
int tempReg = _allocX86reg(-1, X86TYPE_TEMP, 0, 0);
|
||||
//if (t1reg == -1) {SysPrintf("FPU: RSQRT Allocation Error!\n");}
|
||||
if (tempReg == -1) {SysPrintf("FPU: RSQRT Allocation Error!\n"); tempReg = EAX;}
|
||||
//if (t1reg == -1) {Console::Error("FPU: RSQRT Allocation Error!");}
|
||||
if (tempReg == -1) {Console::Error("FPU: RSQRT Allocation Error!"); tempReg = EAX;}
|
||||
|
||||
AND32ItoM((uptr)&fpuRegs.fprc[31], ~(FPUflagI|FPUflagD)); // Clear I and D flags
|
||||
|
||||
|
@ -1737,7 +1737,7 @@ void recRSQRThelper2(int regd, int t0reg) // Preforms the RSQRT function when re
|
|||
void recRSQRT_S_xmm(int info)
|
||||
{
|
||||
int t0reg = _allocTempXMMreg(XMMT_FPS, -1);
|
||||
//if (t0reg == -1) {SysPrintf("FPU: RSQRT Allocation Error!\n");}
|
||||
//if (t0reg == -1) {Console::Error("FPU: RSQRT Allocation Error!");}
|
||||
//SysPrintf("FPU: RSQRT\n");
|
||||
|
||||
switch(info & (PROCESS_EE_S|PROCESS_EE_T) ) {
|
||||
|
|
|
@ -39,10 +39,8 @@ extern int sio_count;
|
|||
|
||||
int hwConstRead8(u32 x86reg, u32 mem, u32 sign)
|
||||
{
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if( mem >= 0x10000000 && mem < 0x10008000 )
|
||||
SysPrintf("hwRead8 to %x\n", mem);
|
||||
#endif
|
||||
DevCon::WriteLn("hwRead8 to %x", mem);
|
||||
|
||||
if ((mem & 0xffffff0f) == 0x1000f200) {
|
||||
if(mem == 0x1000f260) {
|
||||
|
@ -82,15 +80,11 @@ int hwConstRead8(u32 x86reg, u32 mem, u32 sign)
|
|||
static u32 s_regreads[3] = {0x010200000, 0xbfff0000, 0xF0000102};
|
||||
int hwConstRead16(u32 x86reg, u32 mem, u32 sign)
|
||||
{
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if( mem >= 0x10002000 && mem < 0x10008000 )
|
||||
SysPrintf("hwRead16 to %x\n", mem);
|
||||
#endif
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if( mem >= 0x10000000 && mem < 0x10002000 ){
|
||||
EECNT_LOG("cnt read to %x\n", mem);
|
||||
}
|
||||
#endif
|
||||
DevCon::WriteLn("hwRead16 to %x", mem);
|
||||
|
||||
if( mem >= 0x10000000 && mem < 0x10002000 )
|
||||
EECNT_LOG("cnt read to %x\n", mem);
|
||||
|
||||
switch (mem) {
|
||||
case 0x10000000:
|
||||
|
@ -490,7 +484,7 @@ static void PrintDebug(u8 value)
|
|||
{
|
||||
if (value == '\n') {
|
||||
sio_buffer[sio_count] = 0;
|
||||
SysPrintf("%s\n", sio_buffer);
|
||||
Console::Write( sio_buffer );
|
||||
sio_count = 0;
|
||||
} else {
|
||||
if (sio_count < 1023) {
|
||||
|
|
|
@ -276,7 +276,7 @@ CPU_SSE2_XMMCACHE_START(XMMINFO_WRITED|XMMINFO_READLO|XMMINFO_READHI)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
SysPrintf("PMFHL??\n");
|
||||
Console::Error("PMFHL?? *pcsx2 head esplode!*");
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -595,7 +595,7 @@ static int recInit() {
|
|||
|
||||
static void recReset()
|
||||
{
|
||||
DevCon::WriteLn("IOP Recompiler data reset");
|
||||
DevCon::MsgLn("IOP Recompiler data reset");
|
||||
|
||||
memset(recRAM, 0, sizeof(BASEBLOCK)/4*0x200000);
|
||||
memset(recROM, 0, sizeof(BASEBLOCK)/4*0x400000);
|
||||
|
@ -989,10 +989,7 @@ void psxSetBranchImm( u32 imm )
|
|||
|
||||
static u32 psxScaleBlockCycles()
|
||||
{
|
||||
/*return s_psxBlockCycles *
|
||||
(CHECK_IOPSYNC_HACK ? (CHECK_EE_IOP_EXTRA ? 3.1875 : 2.125) : (17/16));*/
|
||||
return s_psxBlockCycles *
|
||||
(CHECK_IOP_CYCLERATE ? 2 : 1);
|
||||
return s_psxBlockCycles * (CHECK_IOP_CYCLERATE ? 2 : 1);
|
||||
}
|
||||
|
||||
static void iPsxBranchTest(u32 newpc, u32 cpuBranch)
|
||||
|
|
|
@ -1152,7 +1152,7 @@ static VuBaseBlock* SuperVUBuildBlocks(VuBaseBlock* parent, u32 startpc, const V
|
|||
((ppprevinst->regs[0].VIwrite & pinst->regs[0].VIread) & 0xffff) == ((ppprevinst->regs[0].VIwrite & pprevinst->regs[0].VIread) & 0xffff) &&
|
||||
!(ppprevinst->regs[0].VIread&((1<<REG_STATUS_FLAG)|(1<<REG_MAC_FLAG)|(1<<REG_CLIP_FLAG)))) {
|
||||
|
||||
Console::MsgLn("supervu: 2 cycle branch delay detected: %x %x", pc, s_pFnHeader->startpc);
|
||||
Console::WriteLn("supervu: 2 cycle branch delay detected: %x %x", pc, s_pFnHeader->startpc);
|
||||
|
||||
// ignore if prev instruction is ILW or ILWR (xenosaga 2)
|
||||
lowercode = *(int*)&VU->Micro[pc-24];
|
||||
|
@ -2531,7 +2531,7 @@ void svudispfntemp()
|
|||
{
|
||||
//static int curesp;
|
||||
//__asm mov curesp, esp
|
||||
Console::MsgLn("tVU: %x %x %x", s_svulast, s_vucount, s_vufnheader);
|
||||
Console::WriteLn("tVU: %x %x %x", s_svulast, s_vucount, s_vufnheader);
|
||||
if( g_curdebugvu ) iDumpVU1Registers();
|
||||
else iDumpVU0Registers();
|
||||
s_vucount++;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
////////////////////////////////////////////////////
|
||||
void recNULL( void )
|
||||
{
|
||||
SysPrintf("EE: Unimplemented op %x\n", cpuRegs.code);
|
||||
Console::Error("EE: Unimplemented op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
namespace EE { namespace Dynarec
|
||||
|
@ -70,13 +70,13 @@ namespace OpcodeImpl
|
|||
void recUnknown()
|
||||
{
|
||||
// TODO : Unknown ops should throw an exception.
|
||||
SysPrintf("EE: Unrecognized op %x\n", cpuRegs.code);
|
||||
Console::Error("EE: Unrecognized op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
void recMMI_Unknown()
|
||||
{
|
||||
// TODO : Unknown ops should throw an exception.
|
||||
SysPrintf("EE: Unrecognized MMI op %x\n", cpuRegs.code);
|
||||
Console::Error("EE: Unrecognized MMI op %x", cpuRegs.code);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
|
|
@ -117,7 +117,7 @@ int _getFreeX86reg(int mode)
|
|||
_freeX86reg(tempi);
|
||||
return tempi;
|
||||
}
|
||||
SysPrintf("*PCSX2*: x86 error\n");
|
||||
Console::Error("*PCSX2*: x86 error");
|
||||
assert(0);
|
||||
|
||||
return -1;
|
||||
|
@ -432,7 +432,7 @@ int _getFreeMMXreg()
|
|||
_freeMMXreg(tempi);
|
||||
return tempi;
|
||||
}
|
||||
SysPrintf("*PCSX2*: mmx error\n");
|
||||
Console::Error("*PCSX2*: mmx error");
|
||||
assert(0);
|
||||
|
||||
return -1;
|
||||
|
|
|
@ -143,7 +143,7 @@ static void iDumpBlock( int startpc, u8 * ptr )
|
|||
u8 fpuused[33];
|
||||
int numused, count, fpunumused;
|
||||
|
||||
SysPrintf( "dump1 %x:%x, %x\n", startpc, pc, cpuRegs.cycle );
|
||||
Console::Status( "dump1 %x:%x, %x\n", startpc, pc, cpuRegs.cycle );
|
||||
#ifdef _WIN32
|
||||
CreateDirectory("dumps", NULL);
|
||||
sprintf_s( filename, g_MaxPath, "dumps\\dump%.8X.txt", startpc);
|
||||
|
@ -1577,7 +1577,7 @@ static void recInit()
|
|||
////////////////////////////////////////////////////
|
||||
static void recReset( void ) {
|
||||
|
||||
DevCon::WriteLn( "EE Recompiler data reset" );
|
||||
DevCon::MsgLn( "EE Recompiler data reset" );
|
||||
|
||||
s_nNextBlock = 0;
|
||||
maxrecmem = 0;
|
||||
|
@ -2457,7 +2457,7 @@ static void checkcodefn()
|
|||
__asm__("movl %%eax, %0" : "=m"(pctemp) );
|
||||
#endif
|
||||
|
||||
SysPrintf("code changed! %x\n", pctemp);
|
||||
Console::Error("code changed! %x", pctemp);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
@ -2526,7 +2526,7 @@ void recompileNextInstruction(int delayslot)
|
|||
recClearMem(pblock);
|
||||
x86Ptr = oldX86;
|
||||
if( delayslot )
|
||||
SysPrintf("delay slot %x\n", pc);
|
||||
Console::Notice("delay slot %x", pc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2633,7 +2633,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:
|
||||
SysPrintf("branch %x in delay slot!\n", cpuRegs.code);
|
||||
Console::Notice("branch %x in delay slot!", cpuRegs.code);
|
||||
_clearNeededX86regs();
|
||||
_clearNeededMMXregs();
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2642,7 +2642,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:
|
||||
SysPrintf("branch %x in delay slot!\n", cpuRegs.code);
|
||||
Console::Notice("branch %x in delay slot!", cpuRegs.code);
|
||||
_clearNeededX86regs();
|
||||
_clearNeededMMXregs();
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2793,8 +2793,8 @@ static void printfn()
|
|||
u32 s_recblocks[] = {0};
|
||||
|
||||
void badespfn() {
|
||||
Console::Error("Bad esp!");
|
||||
assert(0);
|
||||
SysPrintf("Bad esp!\n");
|
||||
}
|
||||
|
||||
#define OPTIMIZE_COP2 0//CHECK_VU0REC
|
||||
|
@ -2806,7 +2806,7 @@ void __fastcall dyna_block_discard(u32 start,u32 sz)
|
|||
#else
|
||||
__asm__("push %ebp\n");
|
||||
#endif
|
||||
SysPrintf("dyna_block_discard %08X , count %d\n",start,sz);
|
||||
Console::WriteLn("dyna_block_discard %08X , count %d",start,sz);
|
||||
Cpu->Clear(start,sz);
|
||||
#ifdef _MSC_VER
|
||||
__asm pop ebp;
|
||||
|
@ -2836,9 +2836,7 @@ void recRecompile( u32 startpc )
|
|||
recReset();
|
||||
}
|
||||
if ( ( (uptr)recStackPtr - (uptr)recStack ) >= RECSTACK_SIZE-0x100 ) {
|
||||
#ifdef _DEBUG
|
||||
SysPrintf("stack reset\n");
|
||||
#endif
|
||||
DevCon::MsgLn("stack reset");
|
||||
recReset();
|
||||
}
|
||||
|
||||
|
@ -3273,7 +3271,7 @@ StartRecomp:
|
|||
stg-=4;
|
||||
lpc+=4;
|
||||
}
|
||||
DbgCon::MsgLn("Manual block @ %08X : %08X %d %d %d %d",
|
||||
DbgCon::WriteLn("Manual block @ %08X : %08X %d %d %d %d",
|
||||
startpc,inpage_ptr,pgsz,0x1000-inpage_offs,inpage_sz,sz*4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -525,8 +525,6 @@ void recBLTZAL()
|
|||
return;
|
||||
}
|
||||
|
||||
SysPrintf("BLTZAL\n");
|
||||
|
||||
recSetBranchL(1);
|
||||
|
||||
SaveBranchState();
|
||||
|
@ -566,8 +564,6 @@ void recBGEZAL( void )
|
|||
return;
|
||||
}
|
||||
|
||||
SysPrintf("BLTZAL\n");
|
||||
|
||||
recSetBranchL(0);
|
||||
|
||||
SaveBranchState();
|
||||
|
@ -818,7 +814,6 @@ void recBLTZAL( void )
|
|||
////////////////////////////////////////////////////
|
||||
void recBGEZAL( void )
|
||||
{
|
||||
SysPrintf("BGEZAL\n");
|
||||
MOV32ItoM( (int)&cpuRegs.code, cpuRegs.code );
|
||||
MOV32ItoM( (int)&cpuRegs.pc, pc );
|
||||
iFlushCall(FLUSH_EVERYTHING);
|
||||
|
@ -829,7 +824,6 @@ void recBGEZAL( void )
|
|||
////////////////////////////////////////////////////
|
||||
void recBLTZALL( void )
|
||||
{
|
||||
SysPrintf("BLTZALL\n");
|
||||
MOV32ItoM( (int)&cpuRegs.code, cpuRegs.code );
|
||||
MOV32ItoM( (int)&cpuRegs.pc, pc );
|
||||
iFlushCall(FLUSH_EVERYTHING);
|
||||
|
@ -840,7 +834,6 @@ void recBLTZALL( void )
|
|||
////////////////////////////////////////////////////
|
||||
void recBGEZALL( void )
|
||||
{
|
||||
SysPrintf("BGEZALL\n");
|
||||
MOV32ItoM( (int)&cpuRegs.code, cpuRegs.code );
|
||||
MOV32ItoM( (int)&cpuRegs.pc, pc );
|
||||
iFlushCall(FLUSH_EVERYTHING);
|
||||
|
|
|
@ -191,7 +191,7 @@ void assertmem()
|
|||
{
|
||||
__asm mov s_tempaddr, ecx
|
||||
__asm mov s_bCachingMem, edx
|
||||
SysPrintf("%x(%x) not mem write!\n", s_tempaddr, s_bCachingMem);
|
||||
Console::Error("%x(%x) not mem write!", s_tempaddr, s_bCachingMem);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
* zerofrog(@gmail.com)
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "System.h"
|
||||
|
||||
#include "ix86.h"
|
||||
|
||||
#define SWAP(x, y) { *(u32*)&y ^= *(u32*)&x; *(u32*)&x ^= *(u32*)&y; *(u32*)&y ^= *(u32*)&x; }
|
||||
|
@ -192,8 +192,8 @@ __forceinline void x86SetJ8( u8* j8 )
|
|||
u32 jump = ( x86Ptr - j8 ) - 1;
|
||||
|
||||
if ( jump > 0x7f ) {
|
||||
Console::Error( "j8 greater than 0x7f!!" );
|
||||
assert(0);
|
||||
SysPrintf( "j8 greater than 0x7f!!\n" );
|
||||
}
|
||||
*j8 = (u8)jump;
|
||||
}
|
||||
|
@ -203,8 +203,8 @@ __forceinline void x86SetJ8A( u8* j8 )
|
|||
u32 jump = ( x86Ptr - j8 ) - 1;
|
||||
|
||||
if ( jump > 0x7f ) {
|
||||
Console::Error( "j8 greater than 0x7f!!" );
|
||||
assert(0);
|
||||
SysPrintf( "j8 greater than 0x7f!!\n" );
|
||||
}
|
||||
|
||||
if( ((uptr)x86Ptr&0xf) > 4 ) {
|
||||
|
@ -225,8 +225,8 @@ __forceinline void x86SetJ16( u16 *j16 )
|
|||
u32 jump = ( x86Ptr - (u8*)j16 ) - 2;
|
||||
|
||||
if ( jump > 0x7fff ) {
|
||||
Console::Error( "j16 greater than 0x7fff!!" );
|
||||
assert(0);
|
||||
SysPrintf( "j16 greater than 0x7fff!!\n" );
|
||||
}
|
||||
*j16 = (u16)jump;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,6 @@ using namespace std;
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
extern void SysPrintf(const char *fmt, ...);
|
||||
|
||||
#if !defined(_WIN32) && !defined(__MINGW32__)
|
||||
#ifndef strnicmp
|
||||
#define strnicmp strncasecmp
|
||||
|
|
|
@ -295,14 +295,6 @@
|
|||
RelativePath="..\libiso.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\PS2Edefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\PS2Etypes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
|
|
|
@ -1000,14 +1000,6 @@
|
|||
RelativePath="defs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="PS2Edefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="PS2Etypes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="regs.h"
|
||||
>
|
||||
|
|
|
@ -38,14 +38,14 @@ BOOL AVI_FileOpenWrite(PAVIFILE * pfile, const char *filename)
|
|||
|
||||
DWORD getFOURCC(const char* value)
|
||||
{
|
||||
if(stricmp(value, "DIB") == 0)
|
||||
if(_stricmp(value, "DIB") == 0)
|
||||
{
|
||||
return mmioFOURCC(value[0],value[1],value[2],' ');
|
||||
}
|
||||
else if((stricmp(value, "CVID") == 0)
|
||||
|| (stricmp(value, "IV32") == 0)
|
||||
|| (stricmp(value, "MSVC") == 0)
|
||||
|| (stricmp(value, "IV50") == 0))
|
||||
else if((_stricmp(value, "CVID") == 0)
|
||||
|| (_stricmp(value, "IV32") == 0)
|
||||
|| (_stricmp(value, "MSVC") == 0)
|
||||
|| (_stricmp(value, "IV50") == 0))
|
||||
{
|
||||
return mmioFOURCC(value[0],value[1],value[2],value[3]);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
OutputDirectory="$(SolutionDir)\bin\plugins\"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
|
@ -123,7 +122,6 @@
|
|||
OutputDirectory="$(SolutionDir)\bin\plugins\"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
|
@ -206,7 +204,6 @@
|
|||
OutputDirectory="$(SolutionDir)\bin\plugins\"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
|
@ -408,14 +405,6 @@
|
|||
RelativePath="plugin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\PS2Edefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\PS2Etypes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Regs.h"
|
||||
>
|
||||
|
|
|
@ -206,14 +206,6 @@
|
|||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\PS2Edefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PS2Etypes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue