Project64: Clean up external release to be beta release

This commit is contained in:
zilmar 2013-03-22 16:47:20 +11:00
parent f41cdf8989
commit 48d8925a80
40 changed files with 519 additions and 1125 deletions

30
.gitignore vendored
View File

@ -26,3 +26,33 @@
/Plugin/RSP/pdb
/Plugin/RSP/RSP 1.7.dll
/Source/Project64/User Interface/UI Resources.aps
/Bin/Beta Release/Config/Project64.cache3
/Bin/Beta Release/Config/Project64.cfg
/Bin/Beta Release/Config/Project64.cht
/Bin/Beta Release/Config/Project64.rdb
/Bin/Beta Release/Config/Project64.rdn
/Bin/Beta Release/Config/Project64.rdx
/Bin/Beta Release/Config/Project64.zcache
/Bin/Beta Release/Logs/Project64.log
/Bin/Beta Release/Project64.exe
/Bin/Beta Release/map/Project64.map
/Bin/Beta Release/pdb/Project64.pdb
/Bin/Debug/Config/Project64.cache3
/Bin/Debug/Config/Project64.cht
/Bin/Debug/Config/Project64.rdb
/Bin/Debug/Config/Project64.rdn
/Bin/Debug/Config/Project64.rdx
/Bin/Debug/Config/Project64.zcache
/Bin/Debug/Project64.exe
/Bin/External Release/Config/Project64.cache3
/Bin/External Release/Config/Project64.cfg
/Bin/External Release/Config/Project64.cht
/Bin/External Release/Config/Project64.rdb
/Bin/External Release/Config/Project64.rdn
/Bin/External Release/Config/Project64.rdx
/Bin/External Release/Config/Project64.zcache
/Bin/External Release/Logs/CPUoutput.log
/Bin/External Release/Logs/Project64.log
/Bin/External Release/Logs/RSP_x86Log.txt
/Bin/External Release/Project64.exe
/Bin/External Release/d3d syslog.txt

View File

@ -31,76 +31,57 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project64Setup", "Source\In
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Beta Release|Win32 = Beta Release|Win32
Debug|Win32 = Debug|Win32
External Release|Win32 = External Release|Win32
Release|Win32 = Release|Win32
StaticRelease|Win32 = StaticRelease|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Beta Release|Win32.ActiveCfg = Release|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Beta Release|Win32.Build.0 = Release|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|Win32.ActiveCfg = Debug|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|Win32.Build.0 = Debug|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.External Release|Win32.ActiveCfg = Release|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.External Release|Win32.Build.0 = Release|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Release|Win32.ActiveCfg = Release|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Release|Win32.Build.0 = Release|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.StaticRelease|Win32.ActiveCfg = Release|Win32
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.StaticRelease|Win32.Build.0 = Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Beta Release|Win32.ActiveCfg = Beta Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Beta Release|Win32.Build.0 = Beta Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|Win32.ActiveCfg = Debug|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|Win32.Build.0 = Debug|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.External Release|Win32.ActiveCfg = External Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.External Release|Win32.Build.0 = External Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|Win32.ActiveCfg = Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|Win32.Build.0 = Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.StaticRelease|Win32.ActiveCfg = Release|Win32
{7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.StaticRelease|Win32.Build.0 = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Beta Release|Win32.ActiveCfg = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Beta Release|Win32.Build.0 = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Debug|Win32.ActiveCfg = Debug|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Debug|Win32.Build.0 = Debug|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.External Release|Win32.ActiveCfg = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.External Release|Win32.Build.0 = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Release|Win32.ActiveCfg = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Release|Win32.Build.0 = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.StaticRelease|Win32.ActiveCfg = Release|Win32
{A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.StaticRelease|Win32.Build.0 = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Beta Release|Win32.ActiveCfg = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Beta Release|Win32.Build.0 = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Debug|Win32.ActiveCfg = Debug|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Debug|Win32.Build.0 = Debug|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.External Release|Win32.ActiveCfg = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.External Release|Win32.Build.0 = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Release|Win32.ActiveCfg = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Release|Win32.Build.0 = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.StaticRelease|Win32.ActiveCfg = Release|Win32
{8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.StaticRelease|Win32.Build.0 = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.Beta Release|Win32.ActiveCfg = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.Beta Release|Win32.Build.0 = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|Win32.ActiveCfg = Debug|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|Win32.Build.0 = Debug|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.External Release|Win32.ActiveCfg = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.External Release|Win32.Build.0 = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.Release|Win32.ActiveCfg = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.Release|Win32.Build.0 = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.StaticRelease|Win32.ActiveCfg = Release|Win32
{3326E128-33AF-422C-BB7C-67CC6B915610}.StaticRelease|Win32.Build.0 = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Beta Release|Win32.ActiveCfg = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Beta Release|Win32.Build.0 = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Debug|Win32.ActiveCfg = Debug|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Debug|Win32.Build.0 = Debug|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.External Release|Win32.ActiveCfg = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.External Release|Win32.Build.0 = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Release|Win32.ActiveCfg = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.Release|Win32.Build.0 = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.StaticRelease|Win32.ActiveCfg = Release|Win32
{4BC6906B-213E-40D7-9FC7-1A93E228393D}.StaticRelease|Win32.Build.0 = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.Beta Release|Win32.ActiveCfg = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.Beta Release|Win32.Build.0 = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.Debug|Win32.ActiveCfg = Debug|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.Debug|Win32.Build.0 = Debug|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.External Release|Win32.ActiveCfg = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.External Release|Win32.Build.0 = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.ActiveCfg = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.Build.0 = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.StaticRelease|Win32.ActiveCfg = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.StaticRelease|Win32.Build.0 = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Beta Release|Win32.ActiveCfg = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|Win32.ActiveCfg = Debug|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|Win32.Build.0 = Debug|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.External Release|Win32.ActiveCfg = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.External Release|Win32.Build.0 = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.ActiveCfg = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.Build.0 = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.StaticRelease|Win32.ActiveCfg = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.StaticRelease|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -1,7 +1,5 @@
#ifdef _DEBUG
#ifndef EXTERNAL_RELEASE
#define MEM_LEAK_TEST
#endif
#ifdef MEM_LEAK_TEST

View File

@ -10,8 +10,6 @@
****************************************************************************/
#include "stdafx.h"
#if (!defined(EXTERNAL_RELEASE))
void LoadLogSetting (HKEY hKey,char * String, BOOL * Value);
void SaveLogOptions (void);
@ -707,4 +705,3 @@ void StopLog (void) {
}
hLogFile = NULL;
}
#endif

View File

@ -711,680 +711,4 @@ char * R4300iOpcodeName ( DWORD OpCode, DWORD PC ) {
}
return CommandName;
}
#ifdef OLD_CODE
#include <Windows.h>
#include <commctrl.h>
#include <stdio.h>
#include "main.h"
#include "CPU.h"
#include "debugger.h"
#if (!defined(EXTERNAL_RELEASE))
#define R4300i_MaxCommandLines 30
typedef struct {
DWORD Location;
char String[150];
DWORD status;
} R4300ICOMMANDLINE;
#define R4300i_Status_PC 1
#define R4300i_Status_BP 2
#define IDC_LIST 1000
#define IDC_ADDRESS 1001
#define IDCfunctION_COMBO 1002
#define IDC_GO_BUTTON 1003
#define IDC_BREAK_BUTTON 1004
#define IDC_STEP_BUTTON 1005
#define IDC_SKIP_BUTTON 1006
#define IDC_BP_BUTTON 1007
#define IDC_R4300I_REGISTERS_BUTTON 1008
#define IDCrsP_DEBUGGER_BUTTON 1009
#define IDCrsP_REGISTERS_BUTTON 1010
#define IDC_MEMORY_BUTTON 1011
#define IDC_SCRL_BAR 1012
void Paint_R4300i_Commands ( HWND hDlg );
void R4300i_Commands_Setup ( HWND hDlg );
void RefreshR4300iCommands ( void );
LRESULT CALLBACK R4300i_Commands_Proc ( HWND, UINT, WPARAM, LPARAM );
static HWND R4300i_Commands_hDlg, hList, hAddress, hFunctionlist, hGoButton, hBreakButton,
hStepButton, hSkipButton, hBPButton, hR4300iRegisters, hRSPDebugger, hRSPRegisters,
hMemory, hScrlBar;
static R4300ICOMMANDLINE r4300iCommandLine[30];
BOOL InR4300iCommandsWindow = FALSE;
void Create_R4300i_Commands_Window ( int Child ) {
DWORD ThreadID;
if ( Child ) {
InR4300iCommandsWindow = TRUE;
DialogBox( GetModuleHandle(NULL), "BLANK", NULL,(DLGPROC) R4300i_Commands_Proc );
InR4300iCommandsWindow = FALSE;
memset(r4300iCommandLine,0,sizeof(r4300iCommandLine));
SetR4300iCommandToRunning();
} else {
if (!InR4300iCommandsWindow) {
SetCoreToStepping();
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)Create_R4300i_Commands_Window,
(LPVOID)TRUE,0, &ThreadID);
} else {
SetForegroundWindow(R4300i_Commands_hDlg);
}
}
}
void Disable_R4300i_Commands_Window ( void ) {
SCROLLINFO si;
EnableWindow(hList, FALSE);
EnableWindow(hAddress, FALSE);
EnableWindow(hScrlBar, FALSE);
EnableWindow(hGoButton, FALSE);
EnableWindow(hStepButton, FALSE);
EnableWindow(hSkipButton, FALSE);
EnableWindow(hR4300iRegisters, FALSE);
EnableWindow(hRSPRegisters, FALSE);
EnableWindow(hRSPDebugger, FALSE);
EnableWindow(hMemory, FALSE);
si.cbSize = sizeof(si);
si.fMask = SIF_RANGE | SIF_POS | SIF_PAGE;
si.nMin = 0;
si.nMax = 0;
si.nPos = 1;
si.nPage = 1;
SetScrollInfo(hScrlBar,SB_CTL,&si,TRUE);
}
int DisplayR4300iCommand (DWORD location, int InsertPos) {
DWORD OpCode, count, LinesUsed = 1, status;
BOOL Redraw = FALSE;
for (count = 0; count < NoOfMapEntries; count ++ ) {
if (MapTable[count].VAddr == location) {
if (strcmp(r4300iCommandLine[InsertPos].String, MapTable[count].Label) !=0 ) {
Redraw = TRUE;
}
if (Redraw) {
r4300iCommandLine[InsertPos].Location = -1;
r4300iCommandLine[InsertPos].status = 0;
sprintf(r4300iCommandLine[InsertPos].String," %s:",MapTable[count].Label);
if ( SendMessage(hList,LB_GETCOUNT,0,0) <= InsertPos) {
SendMessage(hList,LB_INSERTSTRING,(WPARAM)InsertPos, (LPARAM)location);
} else {
RECT ItemRC;
SendMessage(hList,LB_GETITEMRECT,(WPARAM)InsertPos, (LPARAM)&ItemRC);
RedrawWindow(hList,&ItemRC,NULL, RDW_INVALIDATE );
}
}
InsertPos += 1;
if (InsertPos >= R4300i_MaxCommandLines) {
return LinesUsed;
}
LinesUsed = 2;
count = NoOfMapEntries;
}
}
Redraw = FALSE;
__try {
if (!r4300i_LW_VAddr(location, &OpCode)) {
r4300iCommandLine[InsertPos].Location = location;
r4300iCommandLine[InsertPos].status = 0;
sprintf(r4300iCommandLine[InsertPos].String," 0x%08X\tCould not resolve address",location);
if ( SendMessage(hList,LB_GETCOUNT,0,0) <= InsertPos) {
SendMessage(hList,LB_INSERTSTRING,(WPARAM)InsertPos, (LPARAM)location);
} else {
RECT ItemRC;
SendMessage(hList,LB_GETITEMRECT,(WPARAM)InsertPos, (LPARAM)&ItemRC);
RedrawWindow(hList,&ItemRC,NULL, RDW_INVALIDATE );
}
return LinesUsed;
}
} __except( r4300i_Command_MemoryFilter( GetExceptionCode(), GetExceptionInformation()) ) {
g_Notify->DisplayError(GS(MSG_UNKNOWN_MEM_ACTION));
ExitThread(0);
}
if (SelfModCheck == ModCode_ChangeMemory) {
if ( (OpCode >> 16) == 0x7C7C) {
OpCode = OrigMem[(OpCode & 0xFFFF)].OriginalValue;
}
}
status = 0;
if (location == PROGRAM_COUNTER) {status = R4300i_Status_PC; }
if (CheckForR4300iBPoint(location)) { status |= R4300i_Status_BP; }
if (r4300iCommandLine[InsertPos].Location != location) { Redraw = TRUE; }
if (r4300iCommandLine[InsertPos].status != status) { Redraw = TRUE; }
if (Redraw) {
r4300iCommandLine[InsertPos].Location = location;
r4300iCommandLine[InsertPos].status = status;
sprintf(r4300iCommandLine[InsertPos].String," 0x%08X\t%s",location,
R4300iOpcodeName ( OpCode, location ));
if ( SendMessage(hList,LB_GETCOUNT,0,0) <= InsertPos) {
SendMessage(hList,LB_INSERTSTRING,(WPARAM)InsertPos, (LPARAM)location);
} else {
RECT ItemRC;
SendMessage(hList,LB_GETITEMRECT,(WPARAM)InsertPos, (LPARAM)&ItemRC);
RedrawWindow(hList,&ItemRC,NULL, RDW_INVALIDATE );
}
}
return LinesUsed;
}
void DrawR4300iCommand ( LPARAM lParam ) {
char Command[150], Offset[30], Instruction[30], Arguments[40];
LPDRAWITEMSTRUCT ditem;
COLORREF oldColor;
int ResetColor;
HBRUSH hBrush;
RECT TextRect;
char *p1, *p2;
ditem = (LPDRAWITEMSTRUCT)lParam;
strcpy(Command, r4300iCommandLine[ditem->itemID].String);
if (strchr(Command,'\t')) {
p1 = strchr(Command,'\t');
sprintf(Offset,"%.*s",p1 - Command, Command);
p1++;
if (strchr(p1,'\t')) {
p2 = strchr(p1,'\t');
sprintf(Instruction,"%.*s",p2 - p1, p1);
sprintf(Arguments,"%s",p2 + 1);
} else {
sprintf(Instruction,"%s",p1);
sprintf(Arguments,"\0");
}
sprintf(Command,"\0");
} else {
sprintf(Offset,"\0");
sprintf(Instruction,"\0");
sprintf(Arguments,"\0");
}
if (PROGRAM_COUNTER == r4300iCommandLine[ditem->itemID].Location) {
ResetColor = TRUE;
hBrush = (HBRUSH)(COLOR_HIGHLIGHT + 1);
oldColor = SetTextColor(ditem->hDC,RGB(255,255,255));
} else {
ResetColor = FALSE;
hBrush = (HBRUSH)GetStockObject(WHITE_BRUSH);
}
if (CheckForR4300iBPoint( r4300iCommandLine[ditem->itemID].Location )) {
ResetColor = TRUE;
if (PROGRAM_COUNTER == r4300iCommandLine[ditem->itemID].Location) {
SetTextColor(ditem->hDC,RGB(255,0,0));
} else {
oldColor = SetTextColor(ditem->hDC,RGB(255,0,0));
}
}
FillRect( ditem->hDC, &ditem->rcItem,hBrush);
SetBkMode( ditem->hDC, TRANSPARENT );
if (strlen (Command) == 0 ) {
SetRect(&TextRect,ditem->rcItem.left,ditem->rcItem.top, ditem->rcItem.left + 83,
ditem->rcItem.bottom);
DrawText(ditem->hDC,Offset,strlen(Offset), &TextRect,DT_SINGLELINE | DT_VCENTER);
SetRect(&TextRect,ditem->rcItem.left + 83,ditem->rcItem.top, ditem->rcItem.left + 165,
ditem->rcItem.bottom);
DrawText(ditem->hDC,Instruction,strlen(Instruction), &TextRect,DT_SINGLELINE | DT_VCENTER);
SetRect(&TextRect,ditem->rcItem.left + 165,ditem->rcItem.top, ditem->rcItem.right,
ditem->rcItem.bottom);
DrawText(ditem->hDC,Arguments,strlen(Arguments), &TextRect,DT_SINGLELINE | DT_VCENTER);
} else {
DrawText(ditem->hDC,Command,strlen(Command), &ditem->rcItem,DT_SINGLELINE | DT_VCENTER);
}
if (ResetColor == TRUE) {
SetTextColor( ditem->hDC, oldColor );
}
}
void Enable_R4300i_Commands_Window ( void ) {
SCROLLINFO si;
char Location[10];
if (!InR4300iCommandsWindow) { return; }
EnableWindow(hList, TRUE);
EnableWindow(hAddress, TRUE);
EnableWindow(hScrlBar, TRUE);
EnableWindow(hGoButton, TRUE);
EnableWindow(hStepButton, TRUE);
EnableWindow(hSkipButton, FALSE);
EnableWindow(hR4300iRegisters, TRUE);
EnableWindow(hRSPRegisters, FALSE);
EnableWindow(hRSPDebugger, FALSE);
EnableWindow(hMemory, TRUE);
Update_r4300iCommandList();
si.cbSize = sizeof(si);
si.fMask = SIF_RANGE | SIF_POS | SIF_PAGE;
si.nMin = 0;
si.nMax = 300;
si.nPos = 145;
si.nPage = 10;
SetScrollInfo(hScrlBar,SB_CTL,&si,TRUE);
sprintf(Location,"%X",PROGRAM_COUNTER);
SetWindowText(hAddress,Location);
SetForegroundWindow(R4300i_Commands_hDlg);
}
void __cdecl Enter_R4300i_Commands_Window ( void ) {
if (!HaveDebugger) { return; }
Create_R4300i_Commands_Window ( FALSE );
}
void Paint_R4300i_Commands (HWND hDlg) {
PAINTSTRUCT ps;
RECT rcBox;
HFONT hOldFont;
int OldBkMode;
BeginPaint( hDlg, &ps );
rcBox.left = 5; rcBox.top = 5;
rcBox.right = 343; rcBox.bottom = 463;
DrawEdge( ps.hdc, &rcBox, EDGE_RAISED, BF_RECT );
rcBox.left = 8; rcBox.top = 8;
rcBox.right = 340; rcBox.bottom = 460;
DrawEdge( ps.hdc, &rcBox, EDGE_ETCHED, BF_RECT );
rcBox.left = 347; rcBox.top = 7;
rcBox.right = 446; rcBox.bottom = 42;
DrawEdge( ps.hdc, &rcBox, EDGE_ETCHED, BF_RECT );
rcBox.left = 352; rcBox.top = 2;
rcBox.right = 400; rcBox.bottom = 15;
FillRect( ps.hdc, &rcBox,(HBRUSH)COLOR_WINDOW);
if (NoOfMapEntries) {
rcBox.left = 347; rcBox.top = 49;
rcBox.right = 446; rcBox.bottom = 84;
DrawEdge( ps.hdc, &rcBox, EDGE_ETCHED, BF_RECT );
rcBox.left = 352; rcBox.top = 44;
rcBox.right = 390; rcBox.bottom = 57;
FillRect( ps.hdc, &rcBox,(HBRUSH)COLOR_WINDOW);
}
rcBox.left = 14; rcBox.top = 14;
rcBox.right = 88; rcBox.bottom = 32;
DrawEdge( ps.hdc, &rcBox, EDGE_ETCHED , BF_RECT );
rcBox.left = 86; rcBox.top = 14;
rcBox.right = 173; rcBox.bottom = 32;
DrawEdge( ps.hdc, &rcBox, EDGE_ETCHED , BF_RECT );
rcBox.left = 171; rcBox.top = 14;
rcBox.right = 320; rcBox.bottom = 32;
DrawEdge( ps.hdc, &rcBox, EDGE_ETCHED , BF_RECT );
hOldFont = (HFONT)SelectObject( ps.hdc,GetStockObject(DEFAULT_GUI_FONT ) );
OldBkMode = SetBkMode( ps.hdc, TRANSPARENT );
TextOut( ps.hdc, 23,16,"Offset",6);
TextOut( ps.hdc, 97,16,"Instruction",11);
TextOut( ps.hdc, 180,16,"Arguments",9);
TextOut( ps.hdc, 354,2," Address ",9);
TextOut( ps.hdc, 354,19,"0x",2);
if (NoOfMapEntries) {
TextOut( ps.hdc, 354,44," goto:",6);
}
SelectObject( ps.hdc,hOldFont );
SetBkMode( ps.hdc, OldBkMode );
EndPaint( hDlg, &ps );
}
LRESULT CALLBACK R4300i_Commands_Proc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {
case WM_INITDIALOG:
R4300i_Commands_hDlg = hDlg;
R4300i_Commands_Setup( hDlg );
break;
case WM_MOVE:
StoreCurrentWinPos("R4300i Commands",hDlg);
break;
case WM_DRAWITEM:
if (wParam == IDC_LIST) {
DrawR4300iCommand (lParam);
}
break;
case WM_PAINT:
Paint_R4300i_Commands( hDlg );
RedrawWindow(hScrlBar,NULL,NULL, RDW_INVALIDATE |RDW_ERASE);
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDCfunctION_COMBO:
if (HIWORD(wParam) == CBN_SELENDOK ) {
DWORD Selected, Location;
char Value[20];
Selected = SendMessage(hFunctionlist,CB_GETCURSEL,0,0);
if ((int)Selected >= 0) {
Location = SendMessage(hFunctionlist,CB_GETITEMDATA,(WPARAM)Selected,0);
sprintf(Value,"%08X",Location);
SetWindowText(hAddress,Value);
}
}
break;
case IDC_LIST:
if (HIWORD(wParam) == LBN_DBLCLK ) {
DWORD Location, Selected;
Selected = SendMessage(hList,LB_GETCURSEL,(WPARAM)0, (LPARAM)0);
Location = r4300iCommandLine[Selected].Location;
if (Location != (DWORD)-1) {
if (CheckForR4300iBPoint(Location)) {
RemoveR4300iBreakPoint(Location);
} else {
Add_R4300iBPoint(Location, FALSE);
}
RefreshR4300iCommands();
}
}
break;
case IDC_ADDRESS:
if (HIWORD(wParam) == EN_CHANGE ) {
RefreshR4300iCommands();
}
break;
case IDC_GO_BUTTON:
SetR4300iCommandToRunning();
break;
case IDC_BREAK_BUTTON:
SetR4300iCommandToStepping();
break;
case IDC_STEP_BUTTON:
StepOpcode();
break;
/*case IDC_SKIP_BUTTON:
SkipNextR4300iOpCode = TRUE;
WaitingForrsPStep = FALSE;
break;*/
case IDC_BP_BUTTON: Enter_BPoint_Window(); break;
case IDC_R4300I_REGISTERS_BUTTON: Enter_R4300i_Register_Window(); break;
case IDC_MEMORY_BUTTON: Enter_Memory_Window(); break;
case IDCANCEL:
EndDialog( hDlg, IDCANCEL );
break;
}
break;
case WM_VSCROLL:
if ((HWND)lParam == hScrlBar) {
DWORD location;
char Value[20];
GetWindowText(hAddress,Value,sizeof(Value));
location = AsciiToHex(Value) & ~3;
switch (LOWORD(wParam)) {
case SB_LINEDOWN:
if (location < 0xFFFFFFFC) {
sprintf(Value,"%08X",location + 0x4);
SetWindowText(hAddress,Value);
} else {
sprintf(Value,"%08X",0xFFFFFFFC);
SetWindowText(hAddress,Value);
}
break;
case SB_LINEUP:
if (location > 0x4 ) {
sprintf(Value,"%08X",location - 0x4);
SetWindowText(hAddress,Value);
} else {
sprintf(Value,"%08X",0);
SetWindowText(hAddress,Value);
}
break;
case SB_PAGEDOWN:
if (location < 0xFFFFFF8C) {
sprintf(Value,"%08X",location + 0x74);
SetWindowText(hAddress,Value);
} else {
sprintf(Value,"%08X",0xFFFFFF8F);
SetWindowText(hAddress,Value);
}
break;
case SB_PAGEUP:
if (location > 0x74 ) {
sprintf(Value,"%08X",location - 0x74);
SetWindowText(hAddress,Value);
} else {
sprintf(Value,"%08X",0);
SetWindowText(hAddress,Value);
}
break;
}
}
break;
default:
return FALSE;
}
return TRUE;
}
void R4300i_Commands_Setup ( HWND hDlg ) {
#define WindowWidth 457
#define WindowHeight 494
DWORD X, Y;
hList = CreateWindowEx(WS_EX_STATICEDGE, "LISTBOX","", WS_CHILD | WS_VISIBLE |
LBS_OWNERDRAWFIXED | LBS_NOTIFY,14,30,303,445, hDlg,
(HMENU)IDC_LIST, GetModuleHandle(NULL),NULL );
if ( hList) {
SendMessage(hList,WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
SendMessage(hList,LB_SETITEMHEIGHT, (WPARAM)0,(LPARAM)MAKELPARAM(14, 0));
}
hAddress = CreateWindowEx(0,"EDIT","", WS_CHILD | ES_UPPERCASE | WS_VISIBLE |
WS_BORDER | WS_TABSTOP,372,17,65,18, hDlg,(HMENU)IDC_ADDRESS,GetModuleHandle(NULL), NULL );
if (hAddress) {
SendMessage(hAddress,WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
SendMessage(hAddress,EM_SETLIMITTEXT, (WPARAM)8,(LPARAM)0);
}
hFunctionlist = CreateWindowEx(0,"COMBOBOX","", WS_CHILD | WS_VSCROLL |
CBS_DROPDOWNLIST | CBS_SORT | WS_TABSTOP,352,56,89,150,hDlg,
(HMENU)IDCfunctION_COMBO,GetModuleHandle(NULL),NULL);
if (hFunctionlist) {
SendMessage(hFunctionlist,WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hGoButton = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON","&Go", WS_CHILD |
BS_DEFPUSHBUTTON | WS_VISIBLE | WS_TABSTOP, 347,56,100,24, hDlg,(HMENU)IDC_GO_BUTTON,
GetModuleHandle(NULL),NULL );
if (hGoButton) {
SendMessage(hGoButton,WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hBreakButton = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON","&Break", WS_DISABLED |
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,85,100,24,hDlg,
(HMENU)IDC_BREAK_BUTTON,GetModuleHandle(NULL),NULL );
if (hBreakButton) {
SendMessage(hBreakButton,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hStepButton = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON","&Step", WS_CHILD |
BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,114,100,24,hDlg,
(HMENU)IDC_STEP_BUTTON,GetModuleHandle(NULL),NULL );
if (hStepButton) {
SendMessage(hStepButton,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hSkipButton = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON","&Skip", WS_CHILD |
BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,143,100,24,hDlg,
(HMENU)IDC_SKIP_BUTTON,GetModuleHandle(NULL),NULL );
if (hSkipButton) {
SendMessage(hSkipButton,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hBPButton = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON","&Break Points", WS_CHILD |
BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,324,100,24,hDlg,
(HMENU)IDC_BP_BUTTON,GetModuleHandle(NULL),NULL );
if (hBPButton) {
SendMessage(hBPButton,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hR4300iRegisters = CreateWindowEx(WS_EX_STATICEDGE,"BUTTON","R4300i &Registers...",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,353,100,24,hDlg,
(HMENU)IDC_R4300I_REGISTERS_BUTTON,GetModuleHandle(NULL),NULL );
if (hR4300iRegisters) {
SendMessage(hR4300iRegisters,WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hRSPDebugger = CreateWindowEx(WS_EX_STATICEDGE,"BUTTON", "RSP &Debugger...",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,382,100,24,hDlg,
(HMENU)IDCrsP_DEBUGGER_BUTTON,GetModuleHandle(NULL),NULL );
if (hRSPDebugger) {
SendMessage(hRSPDebugger,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hRSPRegisters = CreateWindowEx(WS_EX_STATICEDGE,"BUTTON", "RSP R&egisters...",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,411,100,24,hDlg,
(HMENU)IDCrsP_REGISTERS_BUTTON,GetModuleHandle(NULL),NULL );
if (hRSPRegisters) {
SendMessage(hRSPRegisters,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hMemory = CreateWindowEx(WS_EX_STATICEDGE,"BUTTON", "&Memory...", WS_CHILD |
BS_PUSHBUTTON | WS_VISIBLE | WS_TABSTOP | BS_TEXT, 347,440,100,24,hDlg,
(HMENU)IDC_MEMORY_BUTTON,GetModuleHandle(NULL),NULL );
if (hMemory) {
SendMessage(hMemory,WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
}
hScrlBar = CreateWindowEx(WS_EX_STATICEDGE, "SCROLLBAR","", WS_CHILD | WS_VISIBLE |
WS_TABSTOP | SBS_VERT, 318,14,18,439, hDlg, (HMENU)IDC_SCRL_BAR, GetModuleHandle(NULL), NULL );
if ( RomFileSize != 0 ) {
Enable_R4300i_Commands_Window();
} else {
Disable_R4300i_Commands_Window();
}
if ( !GetStoredWinPos( "R4300i Commands", &X, &Y ) ) {
X = (GetSystemMetrics( SM_CXSCREEN ) - WindowWidth) / 2;
Y = (GetSystemMetrics( SM_CYSCREEN ) - WindowHeight) / 2;
}
SetWindowText(hDlg,"R4300i Commands");
SetWindowPos(hDlg,NULL,X,Y,WindowWidth,WindowHeight, SWP_NOZORDER |
SWP_SHOWWINDOW);
}
#endif
#if (!defined(EXTERNAL_RELEASE))
void RefreshR4300iCommands ( void ) {
DWORD location, LinesUsed;
char AsciiAddress[20];
int count;
if (InR4300iCommandsWindow == FALSE) { return; }
GetWindowText(hAddress,AsciiAddress,sizeof(AsciiAddress));
location = AsciiToHex(AsciiAddress) & ~3;
if (location > 0xFFFFFF88) { location = 0xFFFFFF88; }
for (count = 0 ; count < R4300i_MaxCommandLines; count += LinesUsed ){
LinesUsed = DisplayR4300iCommand ( location, count );
location += 4;
}
}
void SetR4300iCommandToRunning ( void ) {
if (CheckForR4300iBPoint(PROGRAM_COUNTER)) {
StepOpcode();
}
SetCoreToRunning();
if (InR4300iCommandsWindow == FALSE) { return; }
EnableWindow(hGoButton, FALSE);
EnableWindow(hBreakButton, TRUE);
EnableWindow(hStepButton, FALSE);
EnableWindow(hSkipButton, FALSE);
SendMessage(hGoButton, BM_SETSTYLE,BS_PUSHBUTTON,TRUE);
SendMessage(hBreakButton, BM_SETSTYLE,BS_DEFPUSHBUTTON,TRUE);
SetFocus(hBreakButton);
}
void SetR4300iCommandToStepping ( void ) {
EnableWindow(hGoButton, TRUE);
EnableWindow(hBreakButton, FALSE);
EnableWindow(hStepButton, TRUE);
EnableWindow(hSkipButton, TRUE);
SendMessage(hBreakButton, BM_SETSTYLE, BS_PUSHBUTTON,TRUE);
SendMessage(hStepButton, BM_SETSTYLE, BS_DEFPUSHBUTTON,TRUE);
SetFocus(hStepButton);
SetCoreToStepping();
}
void SetR4300iCommandViewto ( UINT NewLocation ) {
unsigned int location;
char Value[20];
if (InR4300iCommandsWindow == FALSE) { return; }
GetWindowText(hAddress,Value,sizeof(Value));
location = AsciiToHex(Value) & ~3;
if ( NewLocation < location || NewLocation >= location + 120 ) {
sprintf(Value,"%08X",NewLocation);
SetWindowText(hAddress,Value);
} else {
RefreshR4300iCommands();
}
}
void Update_r4300iCommandList (void) {
if (!InR4300iCommandsWindow) { return; }
if (NoOfMapEntries == 0) {
ShowWindow(hFunctionlist, FALSE);
SetWindowPos(hGoButton,0,347,56,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
SetWindowPos(hBreakButton,0,347,85,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
SetWindowPos(hStepButton,0,347,114,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
SetWindowPos(hSkipButton,0,347,143,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
} else {
DWORD count, pos;
ShowWindow(hFunctionlist, TRUE);
SetWindowPos(hGoButton,0,347,86,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
SetWindowPos(hBreakButton,0,347,115,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
SetWindowPos(hStepButton,0,347,144,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
SetWindowPos(hSkipButton,0,347,173,0,0, SWP_NOZORDER | SWP_NOSIZE| SWP_SHOWWINDOW);
SendMessage(hFunctionlist,CB_RESETCONTENT,(WPARAM)0,(LPARAM)0);
for (count = 0; count < NoOfMapEntries; count ++ ) {
pos = SendMessage(hFunctionlist,CB_ADDSTRING,(WPARAM)0,(LPARAM)MapTable[count].Label);
SendMessage(hFunctionlist,CB_SETITEMDATA,(WPARAM)pos,(LPARAM)MapTable[count].VAddr);
}
SendMessage(hFunctionlist,CB_SETCURSEL,(WPARAM)-1,(LPARAM)0);
InvalidateRect( R4300i_Commands_hDlg, NULL, TRUE );
}
}
#endif
#endif
}

View File

@ -14,7 +14,7 @@
extern "C" {
#endif
#if (!defined(EXTERNAL_RELEASE))
#ifdef _DEBUG
void Disable_R4300i_Commands_Window ( void );
void Enable_R4300i_Commands_Window ( void );
void __cdecl Enter_R4300i_Commands_Window ( void );

View File

@ -76,9 +76,10 @@ bool DelaySlotEffectsCompare (DWORD PC, DWORD Reg1, DWORD Reg2) {
case R4300i_SPECIAL_DDIVU:
break;
default:
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Does %s effect Delay slot at %X?",R4300iOpcodeName(Command.Hex,PC+4), PC);
#endif
if (g_Settings->LoadBool(Debugger_Enabled))
{
g_Notify->DisplayError("Does %s effect Delay slot at %X?",R4300iOpcodeName(Command.Hex,PC+4), PC);
}
return TRUE;
}
break;
@ -98,15 +99,17 @@ bool DelaySlotEffectsCompare (DWORD PC, DWORD Reg1, DWORD Reg2) {
case R4300i_COP0_CO_TLBWR: break;
case R4300i_COP0_CO_TLBP: break;
default:
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Does %s effect Delay slot at %X?\n6",R4300iOpcodeName(Command.Hex,PC+4), PC);
#endif
if (g_Settings->LoadBool(Debugger_Enabled))
{
g_Notify->DisplayError("Does %s effect Delay slot at %X?\n6",R4300iOpcodeName(Command.Hex,PC+4), PC);
}
return TRUE;
}
} else {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Does %s effect Delay slot at %X?\n7",R4300iOpcodeName(Command.Hex,PC+4), PC);
#endif
if (g_Settings->LoadBool(Debugger_Enabled))
{
g_Notify->DisplayError("Does %s effect Delay slot at %X?\n7",R4300iOpcodeName(Command.Hex,PC+4), PC);
}
return TRUE;
}
}
@ -125,10 +128,11 @@ bool DelaySlotEffectsCompare (DWORD PC, DWORD Reg1, DWORD Reg2) {
case R4300i_COP1_D: break;
case R4300i_COP1_W: break;
case R4300i_COP1_L: break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("Does %s effect Delay slot at %X?",R4300iOpcodeName(Command.Hex,PC+4), PC);
#endif
if (g_Settings->LoadBool(Debugger_Enabled))
{
g_Notify->DisplayError("Does %s effect Delay slot at %X?",R4300iOpcodeName(Command.Hex,PC+4), PC);
}
return TRUE;
}
break;
@ -168,9 +172,10 @@ bool DelaySlotEffectsCompare (DWORD PC, DWORD Reg1, DWORD Reg2) {
case R4300i_SDC1: break;
case R4300i_SD: break;
default:
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Does %s effect Delay slot at %X?",R4300iOpcodeName(Command.Hex,PC+4), PC);
#endif
if (g_Settings->LoadBool(Debugger_Enabled))
{
g_Notify->DisplayError("Does %s effect Delay slot at %X?",R4300iOpcodeName(Command.Hex,PC+4), PC);
}
return TRUE;
}
return FALSE;

View File

@ -843,9 +843,7 @@ void R4300iOp32::LB (void) {
if (m_Opcode.rt == 0) { return; }
if (!g_MMU->LB_VAddr(Address,_GPR[m_Opcode.rt].UB[0])) {
if (bShowTLBMisses()) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("LB TLB: %X",Address);
#endif
}
TLB_READ_EXCEPTION(Address);
} else {
@ -889,12 +887,10 @@ void R4300iOp32::LW (void) {
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 3) != 0) { ADDRESS_ERROR_EXCEPTION(Address,TRUE); }
#ifndef EXTERNAL_RELEASE
if (LogOptions.GenerateLog)
{
Log_LW((*_PROGRAM_COUNTER),Address);
}
#endif
if (m_Opcode.rt == 0) { return; }
@ -1069,10 +1065,9 @@ void R4300iOp32::SPECIAL_SLTU (void) {
}
void R4300iOp32::SPECIAL_TEQ (void) {
if (_GPR[m_Opcode.rs].W[0] == _GPR[m_Opcode.rt].W[0]) {
#ifndef EXTERNAL_RELEASE
if (_GPR[m_Opcode.rs].W[0] == _GPR[m_Opcode.rt].W[0] && g_Settings->LoadBool(Debugger_Enabled))
{
g_Notify->DisplayError("Should trap this ???");
#endif
}
}
@ -1188,12 +1183,11 @@ void R4300iOp32::REGIMM_BGEZAL (void) {
}
/************************** COP0 functions **************************/
void R4300iOp32::COP0_MF (void) {
#if (!defined(EXTERNAL_RELEASE))
if (LogOptions.LogCP0reads) {
LogMessage("%08X: R4300i Read from %s (0x%08X)", (*_PROGRAM_COUNTER),
CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
if (LogOptions.LogCP0reads)
{
LogMessage("%08X: R4300i Read from %s (0x%08X)", (*_PROGRAM_COUNTER), CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
}
#endif
if (m_Opcode.rd == 9)
{
g_SystemTimer->UpdateTimers();
@ -1202,16 +1196,14 @@ void R4300iOp32::COP0_MF (void) {
}
void R4300iOp32::COP0_MT (void) {
#if (!defined(EXTERNAL_RELEASE))
if (LogOptions.LogCP0changes) {
LogMessage("%08X: Writing 0x%X to %s register (Originally: 0x%08X)",(*_PROGRAM_COUNTER),
_GPR[m_Opcode.rt].UW[0],CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
if (LogOptions.LogCP0changes)
{
LogMessage("%08X: Writing 0x%X to %s register (Originally: 0x%08X)",(*_PROGRAM_COUNTER), _GPR[m_Opcode.rt].UW[0],CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
if (m_Opcode.rd == 11) { //Compare
LogMessage("%08X: Cause register changed from %08X to %08X",(*_PROGRAM_COUNTER),
g_Reg->CAUSE_REGISTER, (g_Reg->CAUSE_REGISTER & ~CAUSE_IP7));
LogMessage("%08X: Cause register changed from %08X to %08X",(*_PROGRAM_COUNTER), g_Reg->CAUSE_REGISTER, (g_Reg->CAUSE_REGISTER & ~CAUSE_IP7));
}
}
#endif
switch (m_Opcode.rd) {
case 0: //Index
case 2: //EntryLo0
@ -1252,18 +1244,18 @@ void R4300iOp32::COP0_MT (void) {
} else {
_CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0];
}
if ((_CP0[m_Opcode.rd] & 0x18) != 0) {
#ifndef EXTERNAL_RELEASE
if ((_CP0[m_Opcode.rd] & 0x18) != 0 && g_Settings->LoadBool(Debugger_Enabled))
{
g_Notify->DisplayError("Left kernel mode ??");
#endif
}
g_Reg->CheckInterrupts();
break;
case 13: //cause
_CP0[m_Opcode.rd] &= 0xFFFFCFF;
#ifndef EXTERNAL_RELEASE
if ((_GPR[m_Opcode.rt].UW[0] & 0x300) != 0 ){ g_Notify->DisplayError("Set IP0 or IP1"); }
#endif
if ((_GPR[m_Opcode.rt].UW[0] & 0x300) != 0 && g_Settings->LoadBool(Debugger_Enabled) )
{
g_Notify->DisplayError("Set IP0 or IP1");
}
break;
default:
UnknownOpcode();
@ -1278,10 +1270,9 @@ void R4300iOp32::COP1_MF (void) {
void R4300iOp32::COP1_CF (void) {
TEST_COP1_USABLE_EXCEPTION
if (m_Opcode.fs != 31 && m_Opcode.fs != 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("CFC1 what register are you writing to ?");
#endif
if (m_Opcode.fs != 31 && m_Opcode.fs != 0)
{
if (g_Settings->LoadBool(Debugger_Enabled)) { g_Notify->DisplayError("CFC1 what register are you writing to ?"); }
return;
}
_GPR[m_Opcode.rt].W[0] = (int)_FPCR[m_Opcode.fs];

View File

@ -987,9 +987,7 @@ void R4300iOp::LB (void) {
if (m_Opcode.rt == 0) { return; }
if (!g_MMU->LB_VAddr(Address,_GPR[m_Opcode.rt].UB[0])) {
if (bShowTLBMisses()) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("LB TLB: %X",Address);
#endif
}
TLB_READ_EXCEPTION(Address);
} else {
@ -1034,12 +1032,10 @@ void R4300iOp::LW (void) {
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 3) != 0) { ADDRESS_ERROR_EXCEPTION(Address,TRUE); }
#ifndef EXTERNAL_RELEASE
if (LogOptions.GenerateLog)
{
Log_LW((*_PROGRAM_COUNTER),Address);
}
#endif
if (m_Opcode.rt == 0) { return; }
@ -1113,24 +1109,34 @@ void R4300iOp::LWU (void) {
}
}
void R4300iOp::SB (void) {
void R4300iOp::SB (void)
{
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if (!g_MMU->SB_VAddr(Address,_GPR[m_Opcode.rt].UB[0])) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SB TLB: %X",Address);
#endif
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SB TLB: %X",Address);
}
}
}
void R4300iOp::SH (void) {
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 1) != 0) { ADDRESS_ERROR_EXCEPTION(Address,FALSE); }
if (!g_MMU->SH_VAddr(Address,_GPR[m_Opcode.rt].UHW[0])) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SH TLB: %X",Address);
#endif
if (!g_MMU->SH_VAddr(Address,_GPR[m_Opcode.rt].UHW[0]))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SH TLB: %X",Address);
}
}
}
@ -1140,22 +1146,32 @@ void R4300iOp::SWL (void) {
Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
Offset = Address & 3;
if (!g_MMU->LW_VAddr((Address & ~3),Value)) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SWL TLB: %X",Address);
#endif
g_Notify->BreakPoint(__FILE__,__LINE__);
if (!g_MMU->LW_VAddr((Address & ~3),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SWL TLB: %X",Address);
}
return;
}
Value &= SWL_MASK[Offset];
Value += _GPR[m_Opcode.rt].UW[0] >> SWL_SHIFT[Offset];
if (!g_MMU->SW_VAddr((Address & ~0x03),Value)) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SWL TLB: %X",Address);
#endif
g_Notify->BreakPoint(__FILE__,__LINE__);
if (!g_MMU->SW_VAddr((Address & ~0x03),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SWL TLB: %X",Address);
}
}
}
@ -1163,15 +1179,16 @@ void R4300iOp::SWL (void) {
void R4300iOp::SW (void) {
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 3) != 0) { ADDRESS_ERROR_EXCEPTION(Address,FALSE); }
#if (!defined(EXTERNAL_RELEASE))
if (LogOptions.GenerateLog)
{
Log_SW((*_PROGRAM_COUNTER),Address,_GPR[m_Opcode.rt].UW[0]);
}
#endif
if (!g_MMU->SW_VAddr(Address,_GPR[m_Opcode.rt].UW[0]))
{
g_Notify->BreakPoint(__FILE__,__LINE__);
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SW TLB: %X",Address);
@ -1196,22 +1213,32 @@ void R4300iOp::SDL (void) {
Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
Offset = Address & 7;
if (!g_MMU->LD_VAddr((Address & ~7),Value)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SDL TLB: %X",Address);
#endif
if (!g_MMU->LD_VAddr((Address & ~7),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SDL TLB: %X",Address);
}
return;
}
Value &= SDL_MASK[Offset];
Value += _GPR[m_Opcode.rt].UDW >> SDL_SHIFT[Offset];
if (!g_MMU->SD_VAddr((Address & ~7),Value)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SDL TLB: %X",Address);
#endif
if (!g_MMU->SD_VAddr((Address & ~7),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SDL TLB: %X",Address);
}
}
}
@ -1233,22 +1260,32 @@ void R4300iOp::SDR (void) {
Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
Offset = Address & 7;
if (!g_MMU->LD_VAddr((Address & ~7),Value)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SDL TLB: %X",Address);
#endif
if (!g_MMU->LD_VAddr((Address & ~7),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SDR TLB: %X",Address);
}
return;
}
Value &= SDR_MASK[Offset];
Value += _GPR[m_Opcode.rt].UDW << SDR_SHIFT[Offset];
if (!g_MMU->SD_VAddr((Address & ~7),Value)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SDL TLB: %X",Address);
#endif
if (!g_MMU->SD_VAddr((Address & ~7),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SDR TLB: %X",Address);
}
}
}
@ -1258,41 +1295,53 @@ void R4300iOp::SWR (void) {
Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
Offset = Address & 3;
if (!g_MMU->LW_VAddr((Address & ~3),Value)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SWL TLB: %X",Address);
#endif
if (!g_MMU->LW_VAddr((Address & ~3),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SWR TLB: %X",Address);
}
return;
}
Value &= SWR_MASK[Offset];
Value += _GPR[m_Opcode.rt].UW[0] << SWR_SHIFT[Offset];
if (!g_MMU->SW_VAddr((Address & ~0x03),Value)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SWL TLB: %X",Address);
#endif
if (!g_MMU->SW_VAddr((Address & ~0x03),Value))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SWR TLB: %X",Address);
}
}
}
void R4300iOp::CACHE (void) {
#if (!defined(EXTERNAL_RELEASE))
void R4300iOp::CACHE (void)
{
if (!LogOptions.LogCache) { return; }
LogMessage("%08X: Cache operation %d, 0x%08X", (*_PROGRAM_COUNTER), m_Opcode.rt,
_GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset );
#endif
}
void R4300iOp::LL (void) {
void R4300iOp::LL (void)
{
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 3) != 0) { ADDRESS_ERROR_EXCEPTION(Address,TRUE); }
if (m_Opcode.rt == 0) { return; }
if (!g_MMU->LW_VAddr(Address,_GPR[m_Opcode.rt].UW[0])) {
if (bShowTLBMisses()) {
if (!g_MMU->LW_VAddr(Address,_GPR[m_Opcode.rt].UW[0]))
{
if (bShowTLBMisses())
{
g_Notify->DisplayError("LL TLB: %X",Address);
}
TLB_READ_EXCEPTION(Address);
@ -1302,7 +1351,8 @@ void R4300iOp::LL (void) {
}
}
void R4300iOp::LWC1 (void) {
void R4300iOp::LWC1 (void)
{
DWORD Address = _GPR[m_Opcode.base].UW[0] + (DWORD)((short)m_Opcode.offset);
TEST_COP1_USABLE_EXCEPTION
if ((Address & 3) != 0) { ADDRESS_ERROR_EXCEPTION(Address,TRUE); }
@ -1317,10 +1367,9 @@ void R4300iOp::LWC1 (void) {
void R4300iOp::SC (void) {
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 3) != 0) { ADDRESS_ERROR_EXCEPTION(Address,FALSE); }
#if (!defined(EXTERNAL_RELEASE))
Log_SW((*_PROGRAM_COUNTER),Address,_GPR[m_Opcode.rt].UW[0]);
#endif
if ((*_LLBit) == 1) {
if ((*_LLBit) == 1)
{
if (!g_MMU->SW_VAddr(Address,_GPR[m_Opcode.rt].UW[0]))
{
g_Notify->BreakPoint(__FILE__,__LINE__);
@ -1336,11 +1385,17 @@ void R4300iOp::SC (void) {
void R4300iOp::LD (void) {
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 7) != 0) { ADDRESS_ERROR_EXCEPTION(Address,TRUE); }
if (!g_MMU->LD_VAddr(Address,_GPR[m_Opcode.rt].UDW)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("LD TLB: %X",Address);
#endif
if (!g_MMU->LD_VAddr(Address,_GPR[m_Opcode.rt].UDW))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("LD TLB: %X",Address);
}
return;
}
#ifdef Interpreter_StackTest
if (m_Opcode.rt == 29) {
@ -1355,11 +1410,16 @@ void R4300iOp::LDC1 (void) {
TEST_COP1_USABLE_EXCEPTION
if ((Address & 7) != 0) { ADDRESS_ERROR_EXCEPTION(Address,TRUE); }
if (!g_MMU->LD_VAddr(Address,*(unsigned __int64 *)_FPR_D[m_Opcode.ft])) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("LD TLB: %X",Address);
#endif
if (!g_MMU->LD_VAddr(Address,*(unsigned __int64 *)_FPR_D[m_Opcode.ft]))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("LDC1 TLB: %X",Address);
}
}
}
@ -1368,11 +1428,16 @@ void R4300iOp::SWC1 (void) {
TEST_COP1_USABLE_EXCEPTION
if ((Address & 3) != 0) { ADDRESS_ERROR_EXCEPTION(Address,FALSE); }
if (!g_MMU->SW_VAddr(Address,*(DWORD *)_FPR_S[m_Opcode.ft])) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SWC1 TLB: %X",Address);
#endif
if (!g_MMU->SW_VAddr(Address,*(DWORD *)_FPR_S[m_Opcode.ft]))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SWC1 TLB: %X",Address);
}
}
}
@ -1381,22 +1446,33 @@ void R4300iOp::SDC1 (void) {
TEST_COP1_USABLE_EXCEPTION
if ((Address & 7) != 0) { ADDRESS_ERROR_EXCEPTION(Address,FALSE); }
if (!g_MMU->SD_VAddr(Address,*(__int64 *)_FPR_D[m_Opcode.ft])) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SDC1 TLB: %X",Address);
#endif
if (!g_MMU->SD_VAddr(Address,*(__int64 *)_FPR_D[m_Opcode.ft]))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SDC1 TLB: %X",Address);
}
}
}
void R4300iOp::SD (void) {
void R4300iOp::SD (void)
{
DWORD Address = _GPR[m_Opcode.base].UW[0] + (short)m_Opcode.offset;
if ((Address & 7) != 0) { ADDRESS_ERROR_EXCEPTION(Address,FALSE); }
if (!g_MMU->SD_VAddr(Address,_GPR[m_Opcode.rt].UDW)) {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SD TLB: %X",Address);
#endif
if (!g_MMU->SD_VAddr(Address,_GPR[m_Opcode.rt].UDW))
{
if (bHaveDebugger())
{
g_Notify->BreakPoint(__FILE__,__LINE__);
}
if (bShowTLBMisses())
{
g_Notify->DisplayError("SD TLB: %X",Address);
}
}
}
/********************** R4300i OpCodes: Special **********************/
@ -1547,9 +1623,10 @@ void R4300iOp::SPECIAL_DDIV (void) {
_RegLO->DW = _GPR[m_Opcode.rs].DW / _GPR[m_Opcode.rt].DW;
_RegHI->DW = _GPR[m_Opcode.rs].DW % _GPR[m_Opcode.rt].DW;
} else {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("DDIV by 0 ???");
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("DDIV by 0 ???");
}
}
}
@ -1558,9 +1635,10 @@ void R4300iOp::SPECIAL_DDIVU (void) {
_RegLO->UDW = _GPR[m_Opcode.rs].UDW / _GPR[m_Opcode.rt].UDW;
_RegHI->UDW = _GPR[m_Opcode.rs].UDW % _GPR[m_Opcode.rt].UDW;
} else {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("DDIVU by 0 ???");
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("DDIVU by 0 ???");
}
}
}
@ -1634,10 +1712,9 @@ void R4300iOp::SPECIAL_DSUBU (void) {
}
void R4300iOp::SPECIAL_TEQ (void) {
if (_GPR[m_Opcode.rs].DW == _GPR[m_Opcode.rt].DW) {
#ifndef EXTERNAL_RELEASE
if (_GPR[m_Opcode.rs].DW == _GPR[m_Opcode.rt].DW && bHaveDebugger())
{
g_Notify->DisplayError("Should trap this ???");
#endif
}
}
@ -1766,13 +1843,13 @@ void R4300iOp::REGIMM_BGEZAL (void) {
_GPR[31].DW = (long)((*_PROGRAM_COUNTER) + 8);
}
/************************** COP0 functions **************************/
void R4300iOp::COP0_MF (void) {
#if (!defined(EXTERNAL_RELEASE))
if (LogOptions.LogCP0reads) {
LogMessage("%08X: R4300i Read from %s (0x%08X)", (*_PROGRAM_COUNTER),
CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
void R4300iOp::COP0_MF (void)
{
if (LogOptions.LogCP0reads)
{
LogMessage("%08X: R4300i Read from %s (0x%08X)", (*_PROGRAM_COUNTER), CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
}
#endif
if (m_Opcode.rd == 9)
{
g_SystemTimer->UpdateTimers();
@ -1781,16 +1858,15 @@ void R4300iOp::COP0_MF (void) {
}
void R4300iOp::COP0_MT (void) {
#if (!defined(EXTERNAL_RELEASE))
if (LogOptions.LogCP0changes) {
LogMessage("%08X: Writing 0x%X to %s register (Originally: 0x%08X)",(*_PROGRAM_COUNTER),
_GPR[m_Opcode.rt].UW[0],CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
if (m_Opcode.rd == 11) { //Compare
LogMessage("%08X: Cause register changed from %08X to %08X",(*_PROGRAM_COUNTER),
g_Reg->CAUSE_REGISTER, (g_Reg->CAUSE_REGISTER & ~CAUSE_IP7));
if (LogOptions.LogCP0changes)
{
LogMessage("%08X: Writing 0x%X to %s register (Originally: 0x%08X)",(*_PROGRAM_COUNTER), _GPR[m_Opcode.rt].UW[0],CRegName::Cop0[m_Opcode.rd], _CP0[m_Opcode.rd]);
if (m_Opcode.rd == 11) //Compare
{
LogMessage("%08X: Cause register changed from %08X to %08X",(*_PROGRAM_COUNTER), g_Reg->CAUSE_REGISTER, (g_Reg->CAUSE_REGISTER & ~CAUSE_IP7));
}
}
#endif
switch (m_Opcode.rd) {
case 0: //Index
case 2: //EntryLo0
@ -1831,18 +1907,18 @@ void R4300iOp::COP0_MT (void) {
} else {
_CP0[m_Opcode.rd] = _GPR[m_Opcode.rt].UW[0];
}
if ((_CP0[m_Opcode.rd] & 0x18) != 0) {
#ifndef EXTERNAL_RELEASE
if ((_CP0[m_Opcode.rd] & 0x18) != 0 && bHaveDebugger())
{
g_Notify->DisplayError("Left kernel mode ??");
#endif
}
g_Reg->CheckInterrupts();
break;
case 13: //cause
_CP0[m_Opcode.rd] &= 0xFFFFCFF;
#ifndef EXTERNAL_RELEASE
if ((_GPR[m_Opcode.rt].UW[0] & 0x300) != 0 ){ g_Notify->DisplayError("Set IP0 or IP1"); }
#endif
if ((_GPR[m_Opcode.rt].UW[0] & 0x300) != 0 && bHaveDebugger())
{
g_Notify->DisplayError("Set IP0 or IP1");
}
break;
default:
UnknownOpcode();
@ -1897,10 +1973,9 @@ void R4300iOp::COP1_DMF (void) {
void R4300iOp::COP1_CF (void) {
TEST_COP1_USABLE_EXCEPTION
if (m_Opcode.fs != 31 && m_Opcode.fs != 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("CFC1 what register are you writing to ?");
#endif
if (m_Opcode.fs != 31 && m_Opcode.fs != 0)
{
if (bHaveDebugger()) { g_Notify->DisplayError("CFC1 what register are you writing to ?"); }
return;
}
_GPR[m_Opcode.rt].DW = (int)_FPCR[m_Opcode.fs];
@ -1928,9 +2003,7 @@ void R4300iOp::COP1_CT (void) {
}
return;
}
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("CTC1 what register are you writing to ?");
#endif
if (bHaveDebugger()) { g_Notify->DisplayError("CTC1 what register are you writing to ?"); }
}
/************************* COP1: BC1 functions ***********************/
@ -2122,18 +2195,15 @@ void R4300iOp::COP1_S_CMP (void) {
Temp0 = *(float *)_FPR_S[m_Opcode.fs];
Temp1 = *(float *)_FPR_S[m_Opcode.ft];
if (_isnan(Temp0) || _isnan(Temp1)) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Nan ?");
#endif
if (_isnan(Temp0) || _isnan(Temp1))
{
if (bHaveDebugger()) { g_Notify->DisplayError(__FUNCTION__ ": Nan ?"); }
less = FALSE;
equal = FALSE;
unorded = TRUE;
if ((m_Opcode.funct & 8) != 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Signal InvalidOperationException\nin r4300i_COP1_S_CMP\n%X %ff\n%X %ff",
Temp0,Temp0,Temp1,Temp1);
#endif
if ((m_Opcode.funct & 8) != 0)
{
if (bHaveDebugger()) { g_Notify->DisplayError("Signal InvalidOperationException\nin r4300i_COP1_S_CMP\n%X %ff\n%X %ff", Temp0,Temp0,Temp1,Temp1); }
}
} else {
less = Temp0 < Temp1;
@ -2288,17 +2358,15 @@ void R4300iOp::COP1_D_CMP (void) {
Temp0.DW = *(__int64 *)_FPR_D[m_Opcode.fs];
Temp1.DW = *(__int64 *)_FPR_D[m_Opcode.ft];
if (_isnan(Temp0.D) || _isnan(Temp1.D)) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Nan ?");
#endif
if (_isnan(Temp0.D) || _isnan(Temp1.D))
{
if (bHaveDebugger()) { g_Notify->DisplayError(__FUNCTION__ ": Nan ?"); }
less = FALSE;
equal = FALSE;
unorded = TRUE;
if ((m_Opcode.funct & 8) != 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Signal InvalidOperationException\nin r4300i_COP1_D_CMP");
#endif
if ((m_Opcode.funct & 8) != 0)
{
if (bHaveDebugger()) { g_Notify->DisplayError("Signal InvalidOperationException\nin "__FUNCTION__); }
}
} else {
less = Temp0.D < Temp1.D;

View File

@ -30,10 +30,9 @@ void CDMA::OnFirstDMA (void) {
void CDMA::PI_DMA_READ (void) {
// PI_STATUS_REG |= PI_STATUS_DMA_BUSY;
if ( g_Reg->PI_DRAM_ADDR_REG + g_Reg->PI_RD_LEN_REG + 1 > g_MMU->RdramSize()) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("PI_DMA_READ not in Memory");
#endif
if ( g_Reg->PI_DRAM_ADDR_REG + g_Reg->PI_RD_LEN_REG + 1 > g_MMU->RdramSize())
{
if (bHaveDebugger()) { g_Notify->DisplayError("PI_DMA_READ not in Memory"); }
g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
g_Reg->MI_INTR_REG |= MI_INTR_PI;
g_Reg->CheckInterrupts();
@ -73,9 +72,10 @@ void CDMA::PI_DMA_READ (void) {
g_Reg->CheckInterrupts();
return;
}
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("PI_DMA_READ where are you dmaing to ?");
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("PI_DMA_READ where are you dmaing to ?");
}
g_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
g_Reg->MI_INTR_REG |= MI_INTR_PI;
g_Reg->CheckInterrupts();
@ -177,19 +177,23 @@ void CDMA::PI_DMA_WRITE (void) {
void CDMA::SP_DMA_READ (void) {
g_Reg->SP_DRAM_ADDR_REG &= 0x1FFFFFFF;
if (g_Reg->SP_DRAM_ADDR_REG > g_MMU->RdramSize()) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SP DMA\nSP_DRAM_ADDR_REG not in RDRam space");
#endif
if (g_Reg->SP_DRAM_ADDR_REG > g_MMU->RdramSize())
{
if (bHaveDebugger())
{
g_Notify->DisplayError(__FUNCTION__ "\nSP_DRAM_ADDR_REG not in RDRam space");
}
g_Reg->SP_DMA_BUSY_REG = 0;
g_Reg->SP_STATUS_REG &= ~SP_STATUS_DMA_BUSY;
return;
}
if (g_Reg->SP_RD_LEN_REG + 1 + (g_Reg->SP_MEM_ADDR_REG & 0xFFF) > 0x1000) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SP DMA\ncould not fit copy in memory segement");
#endif
if (g_Reg->SP_RD_LEN_REG + 1 + (g_Reg->SP_MEM_ADDR_REG & 0xFFF) > 0x1000)
{
if (bHaveDebugger())
{
g_Notify->DisplayError(__FUNCTION__ "\ncould not fit copy in memory segement");
}
return;
}
@ -204,18 +208,23 @@ void CDMA::SP_DMA_READ (void) {
g_Reg->SP_STATUS_REG &= ~SP_STATUS_DMA_BUSY;
}
void CDMA::SP_DMA_WRITE (void) {
if (g_Reg->SP_DRAM_ADDR_REG > g_MMU->RdramSize()) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SP DMA WRITE\nSP_DRAM_ADDR_REG not in RDRam space");
#endif
void CDMA::SP_DMA_WRITE (void)
{
if (g_Reg->SP_DRAM_ADDR_REG > g_MMU->RdramSize())
{
if (bHaveDebugger())
{
g_Notify->DisplayError("SP DMA WRITE\nSP_DRAM_ADDR_REG not in RDRam space");
}
return;
}
if (g_Reg->SP_WR_LEN_REG + 1 + (g_Reg->SP_MEM_ADDR_REG & 0xFFF) > 0x1000) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("SP DMA WRITE\ncould not fit copy in memory segement");
#endif
if (g_Reg->SP_WR_LEN_REG + 1 + (g_Reg->SP_MEM_ADDR_REG & 0xFFF) > 0x1000)
{
if (bHaveDebugger())
{
g_Notify->DisplayError("SP DMA WRITE\ncould not fit copy in memory segement");
}
return;
}

View File

@ -10,7 +10,8 @@
****************************************************************************/
#pragma once
class CDMA
class CDMA :
private CDebugSettings
{
CDMA();

View File

@ -60,17 +60,13 @@ void CEeprom::EepromCommand ( BYTE * Command) {
}
break;
case 4: // Read from Eeprom
#ifndef EXTERNAL_RELEASE
if (Command[0] != 2) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
if (Command[1] != 8) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
#endif
if (Command[0] != 2 && bHaveDebugger()) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
if (Command[1] != 8 && bHaveDebugger()) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
ReadFrom(&Command[4],Command[3]);
break;
case 5:
#ifndef EXTERNAL_RELEASE
if (Command[0] != 10) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
if (Command[1] != 1) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
#endif
if (Command[0] != 10 && bHaveDebugger()) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
if (Command[1] != 1 && bHaveDebugger()) { g_Notify->DisplayError("What am I meant to do with this Eeprom Command"); }
WriteTo(&Command[4],Command[3]);
break;
case 6: //RTC Status query

View File

@ -10,7 +10,8 @@
****************************************************************************/
#pragma once
class CEeprom
class CEeprom :
private CDebugSettings
{
public:
CEeprom ( bool ReadOnly );

View File

@ -37,16 +37,20 @@ void CFlashram::DmaFromFlashram ( BYTE * dest, int StartOffset, int len)
if (m_hFile == NULL) {
if (!LoadFlashram()) { return; }
}
if (len > 0x10000) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("DmaFromFlashram FlipBuffer to small (len: %d)",len);
#endif
if (len > 0x10000)
{
if (bHaveDebugger())
{
g_Notify->DisplayError("DmaFromFlashram FlipBuffer to small (len: %d)",len);
}
len = 0x10000;
}
if ((len & 3) != 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Unaligned flash ram read ???");
#endif
if ((len & 3) != 0)
{
if (bHaveDebugger())
{
g_Notify->DisplayError("Unaligned flash ram read ???");
}
return;
}
memset(FlipBuffer,0,sizeof(FlipBuffer));
@ -72,18 +76,21 @@ void CFlashram::DmaFromFlashram ( BYTE * dest, int StartOffset, int len)
}
break;
case FLASHRAM_MODE_STATUS:
if (StartOffset != 0 && len != 8) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Reading m_FlashStatus not being handled correctly\nStart: %X len: %X",StartOffset,len);
#endif
if (StartOffset != 0 && len != 8)
{
if (bHaveDebugger())
{
g_Notify->DisplayError("Reading m_FlashStatus not being handled correctly\nStart: %X len: %X",StartOffset,len);
}
}
*((DWORD *)(dest)) = (DWORD)((m_FlashStatus >> 32) & 0xFFFFFFFF);
*((DWORD *)(dest) + 1) = (DWORD)(m_FlashStatus & 0xFFFFFFFF);
break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("DmaFromFlashram Start: %X, Offset: %X len: %X",dest - g_MMU->Rdram(),StartOffset,len);
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("DmaFromFlashram Start: %X, Offset: %X len: %X",dest - g_MMU->Rdram(),StartOffset,len);
}
}
}
@ -92,10 +99,11 @@ void CFlashram::DmaToFlashram(BYTE * Source, int StartOffset, int len) {
case FLASHRAM_MODE_WRITE:
m_FlashRamPointer = Source;
break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("DmaToFlashram Start: %X, Offset: %X len: %X",Source - g_MMU->Rdram(),StartOffset,len);
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("DmaToFlashram Start: %X, Offset: %X len: %X",Source - g_MMU->Rdram(),StartOffset,len);
}
}
}
@ -105,9 +113,10 @@ DWORD CFlashram::ReadFromFlashStatus (DWORD PAddr)
switch (PAddr) {
case 0x08000000: return (DWORD)(m_FlashStatus >> 32);
default:
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Reading from flash ram status (%X)",PAddr);
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("Reading from flash ram status (%X)",PAddr);
}
break;
}
return (DWORD)(m_FlashStatus >> 32);
@ -210,9 +219,10 @@ void CFlashram::WriteToFlashCommand(DWORD FlashRAM_Command) {
m_FlashRAM_Offset = (FlashRAM_Command & 0xffff) * 128;
m_FlashStatus = 0x1111800400C20000;
break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("Writing %X to flash ram command register",FlashRAM_Command);
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("Writing %X to flash ram command register",FlashRAM_Command);
}
}
}

View File

@ -10,7 +10,8 @@
****************************************************************************/
#pragma once
class CFlashram
class CFlashram :
private CDebugSettings
{
enum Modes {
FLASHRAM_MODE_NOPES = 0,

View File

@ -2211,9 +2211,7 @@ int CMipsMemoryVM::SW_NonMemory ( DWORD PAddr, DWORD Value ) {
g_Reg->m_RspIntrReg &= ~MI_INTR_SP;
g_Reg->CheckInterrupts();
}
#ifndef EXTERNAL_RELEASE
if ( ( Value & SP_SET_INTR ) != 0) { g_Notify->DisplayError("SP_SET_INTR"); }
#endif
if ( ( Value & SP_CLR_SSTEP ) != 0) {
g_Reg->SP_STATUS_REG &= ~SP_STATUS_SSTEP;
}
@ -4034,9 +4032,7 @@ void CMipsMemoryVM::ChangeSpStatus (void)
g_Reg->m_RspIntrReg &= ~MI_INTR_SP;
g_Reg->CheckInterrupts();
}
#ifndef EXTERNAL_RELEASE
if ( ( RegModValue & SP_SET_INTR ) != 0) { g_Notify->DisplayError("SP_SET_INTR"); }
#endif
if ( ( RegModValue & SP_SET_INTR ) != 0 && bHaveDebugger()) { g_Notify->DisplayError("SP_SET_INTR"); }
if ( ( RegModValue & SP_CLR_SSTEP ) != 0)
{
g_Reg->SP_STATUS_REG &= ~SP_STATUS_SSTEP;

View File

@ -267,7 +267,6 @@ void CPifRam::SI_DMA_READ (void)
}
}
#ifndef EXTERNAL_RELEASE
if (LogOptions.LogPRDMAMemStores) {
int count;
char HexData[100], AsciiData[100], Addon[20];
@ -298,7 +297,6 @@ void CPifRam::SI_DMA_READ (void)
}
LogMessage("");
}
#endif
if (g_System->bDelaySI()) {
g_SystemTimer->SetTimer(CSystemTimer::SiTimer,0x900,false);
@ -360,7 +358,6 @@ void CPifRam::SI_DMA_WRITE (void)
}
}
#ifndef EXTERNAL_RELEASE
if (LogOptions.LogPRDMAMemLoads) {
int count;
char HexData[100], AsciiData[100], Addon[20];
@ -392,7 +389,6 @@ void CPifRam::SI_DMA_WRITE (void)
}
LogMessage("");
}
#endif
PifRamWrite();
@ -442,9 +438,7 @@ void CPifRam::ProcessControllerCommand ( int Control, BYTE * Command)
}
break;
case 0x02: //read from controller pack
#ifndef EXTERNAL_RELEASE
if (LogOptions.LogControllerPak) { LogControllerPakData("Read: Before Gettting Results"); }
#endif
if (bShowPifRamErrors())
{
if (Command[0] != 3) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); }
@ -467,14 +461,10 @@ void CPifRam::ProcessControllerCommand ( int Control, BYTE * Command)
} else {
Command[1] |= 0x80;
}
#ifndef EXTERNAL_RELEASE
if (LogOptions.LogControllerPak) { LogControllerPakData("Read: After Gettting Results"); }
#endif
break;
case 0x03: //write controller pak
#ifndef EXTERNAL_RELEASE
if (LogOptions.LogControllerPak) { LogControllerPakData("Write: Before Processing"); }
#endif
if (bShowPifRamErrors())
{
if (Command[0] != 35) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); }
@ -495,9 +485,7 @@ void CPifRam::ProcessControllerCommand ( int Control, BYTE * Command)
} else {
Command[1] |= 0x80;
}
#ifndef EXTERNAL_RELEASE
if (LogOptions.LogControllerPak) { LogControllerPakData("Write: After Processing"); }
#endif
break;
default:
if (bShowPifRamErrors()) { g_Notify->DisplayError("Unknown ControllerCommand %d",Command[2]); }
@ -540,7 +528,6 @@ void CPifRam::LogControllerPakData (char * Description)
{
BYTE * PIF_Ram = g_MMU->PifRam();
#if (!defined(EXTERNAL_RELEASE))
int count, count2;
char HexData[100], AsciiData[100], Addon[20];
LogMessage("\t%s:",Description);
@ -574,5 +561,4 @@ void CPifRam::LogControllerPakData (char * Description)
}
}
LogMessage("");
#endif
}

View File

@ -307,15 +307,17 @@ void CRegisters::CheckInterrupts ( void )
void CRegisters::DoAddressError ( BOOL DelaySlot, DWORD BadVaddr, BOOL FromRead)
{
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("AddressError");
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in AddressError Exception");
if (bHaveDebugger())
{
g_Notify->DisplayError("AddressError");
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in AddressError Exception");
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in AddressError Exception");
}
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in AddressError Exception");
}
#endif
if (FromRead) {
CAUSE_REGISTER = EXC_RADE;
} else {
@ -348,14 +350,15 @@ void CRegisters::FixFpuLocations ( void ) {
void CRegisters::DoBreakException ( BOOL DelaySlot)
{
#ifndef EXTERNAL_RELEASE
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in Break Exception");
if (bHaveDebugger())
{
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in Break Exception");
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in Break Exception");
}
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in Break Exception");
}
#endif
CAUSE_REGISTER = EXC_BREAK;
if (DelaySlot) {
@ -370,14 +373,15 @@ void CRegisters::DoBreakException ( BOOL DelaySlot)
void CRegisters::DoCopUnusableException ( BOOL DelaySlot, int Coprocessor )
{
#ifndef EXTERNAL_RELEASE
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in Break Exception");
if (bHaveDebugger())
{
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in Break Exception");
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in Break Exception");
}
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in Break Exception");
}
#endif
CAUSE_REGISTER = EXC_CPU;
if (Coprocessor == 1) { CAUSE_REGISTER |= 0x10000000; }
@ -397,11 +401,9 @@ BOOL CRegisters::DoIntrException ( BOOL DelaySlot )
if (( STATUS_REGISTER & STATUS_IE ) == 0 ) { return FALSE; }
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) { return FALSE; }
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) { return FALSE; }
#if (!defined(EXTERNAL_RELEASE))
if (LogOptions.GenerateLog && LogOptions.LogExceptions && !LogOptions.NoInterrupts) {
LogMessage("%08X: Interupt Generated", m_PROGRAM_COUNTER );
}
#endif
CAUSE_REGISTER = FAKE_CAUSE_REGISTER;
CAUSE_REGISTER |= EXC_INT;
if (DelaySlot) {
@ -437,23 +439,25 @@ void CRegisters::DoTLBReadMiss ( BOOL DelaySlot, DWORD BadVaddr )
}
STATUS_REGISTER |= STATUS_EXL;
} else {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("TLBMiss - EXL Set\nBadVaddr = %X\nAddress Defined: %s",BadVaddr,g_TLB->AddressDefined(BadVaddr)?"TRUE":"FALSE");
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("TLBMiss - EXL Set\nBadVaddr = %X\nAddress Defined: %s",BadVaddr,g_TLB->AddressDefined(BadVaddr)?"TRUE":"FALSE");
}
m_PROGRAM_COUNTER = 0x80000180;
}
}
void CRegisters::DoSysCallException ( BOOL DelaySlot)
{
#ifndef EXTERNAL_RELEASE
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in SysCall Exception");
if (bHaveDebugger())
{
if (( STATUS_REGISTER & STATUS_EXL ) != 0 ) {
g_Notify->DisplayError("EXL set in SysCall Exception");
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in SysCall Exception");
}
}
if (( STATUS_REGISTER & STATUS_ERL ) != 0 ) {
g_Notify->DisplayError("ERL set in SysCall Exception");
}
#endif
CAUSE_REGISTER = EXC_SYSCALL;
if (DelaySlot) {

View File

@ -474,7 +474,8 @@ protected:
class CN64System;
class CSystemEvents;
class CRegisters:
class CRegisters :
private CDebugSettings,
protected CSystemRegisters,
public CP0registers,
public Rdram_InterfaceReg,

View File

@ -171,11 +171,9 @@ void CSystemTimer::TimerDone (void)
if (Profiling) {
LastTimer = StartTimer(Timer_Done);
}
#if (!defined(EXTERNAL_RELEASE))
if (LogOptions.GenerateLog && LogOptions.LogExceptions && !LogOptions.NoInterrupts) {
LogMessage("%08X: Timer Done (Type: %d CurrentTimer: %d)", *_PROGRAM_COUNTER, m_Current, *_Timer );
}
#endif
*/
switch (m_Current) {
case CSystemTimer::CompareTimer:

View File

@ -276,11 +276,12 @@ void CN64System::StartEmulation2 ( bool NewThread )
g_Notify->HideRomBrowser();
#ifndef EXTERNAL_RELEASE
LogOptions.GenerateLog = g_Settings->LoadDword(Debugger_GenerateDebugLog);
LoadLogOptions(&LogOptions, FALSE);
StartLog();
#endif
if (bHaveDebugger())
{
LogOptions.GenerateLog = g_Settings->LoadDword(Debugger_GenerateDebugLog);
LoadLogOptions(&LogOptions, FALSE);
StartLog();
}
CInterpreterCPU::BuildCPU();
@ -322,10 +323,12 @@ void CN64System::StartEmulation2 ( bool NewThread )
}
g_Notify->MakeWindowOnTop(g_Settings->LoadBool(UserInterface_AlwaysOnTop));
#ifdef BETA_RELEASE
if (!g_Settings->LoadBool(Beta_IsValidExe))
{
return;
}
#endif
ThreadInfo * Info = new ThreadInfo;
HANDLE * hThread = new HANDLE;

View File

@ -10,7 +10,7 @@
****************************************************************************/
#include "stdafx.h"
#ifndef EXTERNAL_RELEASE
#ifdef _DEBUG
#define CHECKED_BUILD 1
#endif

View File

@ -718,9 +718,7 @@ void CRecompiler::RecompilerMain_ChangeMemory ( void )
DoTLBMiss(NextInstruction == DELAY_SLOT,PROGRAM_COUNTER);
NextInstruction = NORMAL;
if (!TranslateVaddr(PROGRAM_COUNTER, &Addr)) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Failed to translate PC to a PAddr: %X\n\nEmulation stopped",PROGRAM_COUNTER);
#endif
ExitThread(0);
}
}
@ -732,9 +730,7 @@ void CRecompiler::RecompilerMain_ChangeMemory ( void )
__try {
Value = (DWORD)(*(DelaySlotTable + (Addr >> 12)));
} __except(EXCEPTION_EXECUTE_HANDLER) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Executing Delay Slot from non maped space\nPROGRAM_COUNTER = 0x%X",PROGRAM_COUNTER);
#endif
ExitThread(0);
}
if ( (Value >> 16) == 0x7C7C) {

View File

@ -79,10 +79,8 @@ void CRecompilerOps::Compile_Branch (CRecompilerOps::BranchFunction CompareFunc,
}
}
break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("Unknown branch type");
#endif
if (bHaveDebugger()) { g_Notify->DisplayError("Unknown branch type"); }
}
} else {
EffectDelaySlot = true;
@ -298,9 +296,10 @@ void CRecompilerOps::Compile_Branch (CRecompilerOps::BranchFunction CompareFunc,
m_Section->GenerateSectionLinkage();
m_NextInstruction = END_BLOCK;
} else {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("WTF\n\nBranch\nNextInstruction = %X", m_NextInstruction);
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("WTF\n\nBranch\nNextInstruction = %X", m_NextInstruction);
}
}
}
@ -419,10 +418,8 @@ void CRecompilerOps::Compile_BranchLikely (BranchFunction CompareFunc, BOOL Link
m_Section->m_Jump.RegSet = m_RegWorkingSet;
m_Section->GenerateSectionLinkage();
m_NextInstruction = END_BLOCK;
} else {
#ifndef EXTERNAL_RELEASE
} else if (bHaveDebugger()) {
g_Notify->DisplayError("WTF\n\nBranchLikely\nNextInstruction = %X", m_NextInstruction);
#endif
}
}
@ -1344,10 +1341,8 @@ void CRecompilerOps::J (void) {
m_Section->m_Jump.RegSet = m_RegWorkingSet;
m_Section->GenerateSectionLinkage();
m_NextInstruction = END_BLOCK;
} else {
#ifndef EXTERNAL_RELEASE
} else if (bHaveDebugger()) {
g_Notify->DisplayError("WTF\n\nJ\nNextInstruction = %X", m_NextInstruction);
#endif
}
}
@ -1748,10 +1743,11 @@ void CRecompilerOps::CACHE (void){
case 21:
case 25:
break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("cache: %d",m_Opcode.rt);
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("cache: %d",m_Opcode.rt);
}
}
}
@ -1944,10 +1940,8 @@ void CRecompilerOps::SPECIAL_JR (void) {
}
}
m_NextInstruction = END_BLOCK;
} else {
#ifndef EXTERNAL_RELEASE
} else if (bHaveDebugger()) {
g_Notify->DisplayError("WTF\n\nBranch\nNextInstruction = %X", m_NextInstruction);
#endif
}
}
@ -2000,10 +1994,8 @@ void CRecompilerOps::SPECIAL_JALR (void)
m_Section->GenerateSectionLinkage();
}
m_NextInstruction = END_BLOCK;
} else {
#ifndef EXTERNAL_RELEASE
} else if (bHaveDebugger()) {
g_Notify->DisplayError("WTF\n\nBranch\nNextInstruction = %X", m_NextInstruction);
#endif
}
}
@ -2872,9 +2864,7 @@ void CRecompilerOps::SPECIAL_XOR (void) {
if (IsConst(m_Opcode.rt) && IsConst(m_Opcode.rs)) {
if (IsMapped(m_Opcode.rd)) { UnMap_GPR(m_Opcode.rd, FALSE); }
if (Is64Bit(m_Opcode.rt) || Is64Bit(m_Opcode.rs)) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("XOR 1");
#endif
if (bHaveDebugger()) { g_Notify->DisplayError("XOR 1"); }
CRecompilerOps::UnknownOpcode();
} else {
m_RegWorkingSet.SetMipsRegState(m_Opcode.rd,CRegInfo::STATE_CONST_32);
@ -4023,14 +4013,10 @@ void CRecompilerOps::COP0_MT (void) {
case 13: //cause
if (IsConst(m_Opcode.rt)) {
AndConstToVariable(0xFFFFCFF,&_CP0[m_Opcode.rd], CRegName::Cop0[m_Opcode.rd]);
#ifndef EXTERNAL_RELEASE
if ((GetMipsRegLo(m_Opcode.rt) & 0x300) != 0 ){ g_Notify->DisplayError("Set IP0 or IP1"); }
#endif
if ((GetMipsRegLo(m_Opcode.rt) & 0x300) != 0 && bHaveDebugger() ){ g_Notify->DisplayError("Set IP0 or IP1"); }
} else {
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifdef tofix
CRecompilerOps::UnknownOpcode();
#endif
UnknownOpcode();
return;
}
BeforeCallDirect(m_RegWorkingSet);
MoveConstToX86reg((DWORD)g_Reg,x86_ECX);
@ -4038,10 +4024,7 @@ void CRecompilerOps::COP0_MT (void) {
AfterCallDirect(m_RegWorkingSet);
break;
default:
g_Notify->BreakPoint(__FILE__,__LINE__);
#ifdef tofix
CRecompilerOps::UnknownOpcode();
#endif
UnknownOpcode();
}
}

View File

@ -13,6 +13,7 @@
class CCodeSection;
class CRecompilerOps :
protected CDebugSettings,
protected CX86Ops,
protected CSystemRegisters,
protected CN64SystemSettings,

View File

@ -191,9 +191,10 @@ void CRegInfo::ChangeFPURegFormat (int Reg, FPU_STATE OldFormat, FPU_STATE NewFo
return;
}
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("ChangeFormat: Register not on stack!!");
#endif
if (bHaveDebugger())
{
g_Notify->DisplayError("ChangeFormat: Register not on stack!!");
}
}
void CRegInfo::Load_FPR_ToTop ( int Reg, int RegToLoad, FPU_STATE Format)
@ -335,10 +336,8 @@ void CRegInfo::Load_FPR_ToTop ( int Reg, int RegToLoad, FPU_STATE Format)
MoveVariableToX86reg(&g_Reg->m_FPR_D[RegToLoad],Name,TempReg);
fpuLoadQwordFromX86Reg(&StackTopPos(),TempReg);
break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("Load_FPR_ToTop\nUnkown format to load %d",Format);
#endif
if (bHaveDebugger()) { g_Notify->DisplayError("Load_FPR_ToTop\nUnkown format to load %d",Format); }
}
SetX86Protected(TempReg,FALSE);
FpuRoundingModel(StackTopPos()) = RoundDefault;
@ -563,9 +562,7 @@ void CRegInfo::Map_GPR_32bit (int MipsReg, bool SignValue, int MipsRegToLoad)
{
Reg = FreeX86Reg();
if (Reg < 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Map_GPR_32bit\n\nOut of registers");
#endif
if (bHaveDebugger()) { g_Notify->DisplayError("Map_GPR_32bit\n\nOut of registers"); }
g_Notify->BreakPoint(__FILE__,__LINE__);
return;
}
@ -619,16 +616,18 @@ void CRegInfo::Map_GPR_64bit ( int MipsReg, int MipsRegToLoad)
int count;
if (MipsReg == 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("Map_GPR_32bit\n\nWhy are you trying to map reg 0");
#endif
if (bHaveDebugger()) { g_Notify->DisplayError("Map_GPR_32bit\n\nWhy are you trying to map reg 0"); }
return;
}
ProtectGPR(MipsReg);
if (IsUnknown(MipsReg) || IsConst(MipsReg)) {
x86Hi = FreeX86Reg();
if (x86Hi < 0) { g_Notify->DisplayError("Map_GPR_64bit\n\nOut of registers"); return; }
if (x86Hi < 0)
{
if (bHaveDebugger()) { g_Notify->DisplayError("Map_GPR_64bit\n\nOut of registers"); }
return;
}
SetX86Protected(x86Hi,TRUE);
x86lo = FreeX86Reg();
@ -971,10 +970,8 @@ void CRegInfo::UnMap_FPR (int Reg, int WriteBackValue )
MoveVariableToX86reg(&_FPR_D[x86fpu_MappedTo[StackTopPos()]],Name,TempReg);
fpuStoreQwordFromX86Reg(&StackTopPos(),TempReg, TRUE);
break;
#ifndef EXTERNAL_RELEASE
default:
g_Notify->DisplayError("UnMap_FPR\nUnknown format to load %d",x86fpu_State[StackTopPos()]);
#endif
if (bHaveDebugger()) { g_Notify->DisplayError(__FUNCTION__ "\nUnknown format to load %d",x86fpu_State[StackTopPos()]); }
}
SetX86Protected(TempReg,FALSE);
FpuRoundingModel(RegPos) = RoundDefault;
@ -994,10 +991,9 @@ void CRegInfo::UnMap_FPR (int Reg, int WriteBackValue )
void CRegInfo::UnMap_GPR (DWORD Reg, bool WriteBackValue)
{
if (Reg == 0) {
#ifndef EXTERNAL_RELEASE
g_Notify->DisplayError("UnMap_GPR\n\nWhy are you trying to unmap reg 0");
#endif
if (Reg == 0)
{
if (bHaveDebugger()) { g_Notify->DisplayError(__FUNCTION__ "\n\nWhy are you trying to unmap reg 0"); }
return;
}

View File

@ -11,6 +11,7 @@
#pragma once
class CRegInfo :
private CDebugSettings,
private CX86Ops,
private CSystemRegisters
{

View File

@ -135,7 +135,7 @@
/>
</Configuration>
<Configuration
Name="External Release|Win32"
Name="Beta Release|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(SolutionDir)PropertySheets/Win32.Release.vsprops"
>
@ -156,7 +156,7 @@
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="EXTERNAL_RELEASE;"
PreprocessorDefinitions="BETA_RELEASE;"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -225,7 +225,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="External Release|Win32"
Name="Beta Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -692,7 +692,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="External Release|Win32"
Name="Beta Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -720,7 +720,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="External Release|Win32"
Name="Beta Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -755,7 +755,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="External Release|Win32"
Name="Beta Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -789,7 +789,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="External Release|Win32"
Name="Beta Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -888,7 +888,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="External Release|Win32"
Name="Beta Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"

View File

@ -216,6 +216,7 @@ enum SettingID {
Debugger_ShowDListAListCount,
Debugger_ShowRecompMemSize,
#ifdef BETA_RELEASE
//Beta Information
Beta_IsBetaVersion,
Beta_UserName,
@ -223,7 +224,8 @@ enum SettingID {
Beta_EmailAddress,
Beta_EmailAddressMD5,
Beta_IsValidExe,
#endif
//Plugins
Plugin_RSP_Current,
Plugin_RSP_CurVer,

View File

@ -16,12 +16,14 @@ bool CDebugSettings::m_bHaveDebugger = false;
bool CDebugSettings::m_bLogX86Code = false;
bool CDebugSettings::m_bShowTLBMisses = false;
bool CDebugSettings::m_bShowDivByZero = false;
bool CDebugSettings::m_Registered = false;
CDebugSettings::CDebugSettings()
{
m_RefCount += 1;
if (m_RefCount == 1)
if (!m_Registered && g_Settings)
{
m_Registered = true;
g_Settings->RegisterChangeCB(Debugger_Enabled,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_GenerateLogFiles,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_ShowTLBMisses,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
@ -34,7 +36,7 @@ CDebugSettings::CDebugSettings()
CDebugSettings::~CDebugSettings()
{
m_RefCount -= 1;
if (m_RefCount == 0)
if (m_RefCount == 0 && g_Settings)
{
g_Settings->UnregisterChangeCB(Debugger_Enabled,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_GenerateLogFiles,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);

View File

@ -38,4 +38,5 @@ private:
static bool m_bShowDivByZero;
static int m_RefCount;
static bool m_Registered;
};

View File

@ -117,7 +117,7 @@ void CSettings::AddHowToHandleSetting ()
AddHandler(Rdb_GoodName, new CSettingTypeRomDatabase("Good Name",Game_GameName));
AddHandler(Rdb_SaveChip, new CSettingTypeRDBSaveChip("Save Type",SaveChip_Auto));
#ifndef EXTERNAL_RELEASE
#ifdef _DEBUG
AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type",CPU_SyncCores));
#else
AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type",CPU_Recompiler));
@ -282,12 +282,14 @@ void CSettings::AddHowToHandleSetting ()
AddHandler(Debugger_GenerateLogFiles, new CSettingTypeApplication("Debugger","Generate Log Files", false));
#ifdef BETA_RELEASE
AddHandler(Beta_IsBetaVersion, new CSettingTypeTempBool(true));
AddHandler(Beta_UserName, new CSettingTypeTempString("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"));
AddHandler(Beta_EmailAddress, new CSettingTypeTempString("????????????????????????????????????????????????????????????????????????????????"));
AddHandler(Beta_UserNameMD5, new CSettingTypeTempString("CBBABA8D2262FF1F7A47CEAD87FC4304"));
AddHandler(Beta_EmailAddressMD5, new CSettingTypeTempString("47A3D7CBF1DA291D5EB30DCAAF21B9F8"));
AddHandler(Beta_IsValidExe, new CSettingTypeTempBool(true));
#endif
//Plugin
AddHandler(Plugin_RSP_Current, new CSettingTypeApplication("Plugin","RSP Dll", "RSP\\RSP 1.7.dll"));

View File

@ -42,6 +42,7 @@ CMainGui::CMainGui (bool bMainWindow, const char * WindowTitle ) :
m_ThreadId(GetCurrentThreadId()),
m_bMainWindow(bMainWindow)
{
#ifdef BETA_RELEASE
m_hacked = false;
if (g_Settings)
{
@ -51,6 +52,7 @@ CMainGui::CMainGui (bool bMainWindow, const char * WindowTitle ) :
m_hacked = true;
}
}
#endif
m_Menu = NULL;
m_hMainWindow = 0;
@ -63,7 +65,9 @@ CMainGui::CMainGui (bool bMainWindow, const char * WindowTitle ) :
m_SaveRomBrowserTop = 0;
m_SaveRomBrowserLeft = 0;
#ifdef BETA_RELEASE
m_InvalidExeMsg = RegisterWindowMessage("Invalid");
#endif
if (m_bMainWindow)
{
@ -374,9 +378,7 @@ void CMainGui::Show (bool Visible) {
void CMainGui::EnterLogOptions (void)
{
#ifndef EXTERNAL_RELEASE
::EnterLogOptions((HWND)m_hMainWindow);
#endif
}
int CMainGui::Height (void) {
@ -472,7 +474,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
CMainGui * _this = (CMainGui *)lpcs->lpCreateParams;
SetProp((HWND)hWnd,"Class",_this);
#if defined(EXTERNAL_RELEASE) || defined(VALIDATE_BIN_LOCAL)
#if defined(BETA_RELEASE) || defined(VALIDATE_BIN_LOCAL)
TestValidBinary();
SetTimer((HWND)hWnd,0,10000,NULL);
#endif
@ -488,10 +490,12 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
_this->ChangeWinSize(640,480);
#ifdef BETA_RELEASE
if (_this->m_hacked)
{
MessageBox(NULL,"Exe has been corrupted","Stopping",MB_OK|MB_ICONEXCLAMATION);
}
#endif
}
break;
case WM_SYSCOMMAND:
@ -560,6 +564,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
}
}
break;
#ifdef BETA_RELEASE
case WM_TIMER:
{
CMainGui * _this = (CMainGui *)GetProp((HWND)hWnd,"Class");
@ -582,6 +587,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
}
}
break;
#endif
case WM_SIZE:
{
CMainGui * _this = (CMainGui *)GetProp((HWND)hWnd,"Class");
@ -871,6 +877,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
WriteTrace(TraceDebug,__FUNCTION__ ": WM_DESTROY - Done");
break;
default:
#ifdef BETA_RELEASE
{
CMainGui * _this = (CMainGui *)GetProp((HWND)hWnd,"Class");
if (_this)
@ -883,6 +890,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
}
}
}
#endif
return DefWindowProc((HWND)hWnd,uMsg,wParam,lParam);
}
return TRUE;
@ -922,6 +930,7 @@ DWORD CALLBACK AboutBoxCancelProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lP
return CallWindowProc(pfnWndAboutBoxCancelProc, hWnd, uMsg, wParam, lParam);
}
#ifdef BETA_RELEASE
LPSTR ValidateDecryptString (LPSTR String, int Len);
LPSTR ValidateEncryptString (LPSTR String, int Len);
@ -936,7 +945,6 @@ LPSTR ValidateDecryptString2 (LPSTR String, int Len)
return String;
}
DWORD CALLBACK AboutUserProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD /*lParam*/)
{
static char UserInfo[] = "hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
@ -989,6 +997,7 @@ DWORD CALLBACK AboutUserProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD /*lPara
}
return TRUE;
}
#endif
DWORD CALLBACK AboutBoxProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam)
{
@ -1208,12 +1217,14 @@ DWORD CALLBACK AboutBoxProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam)
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
#ifdef BETA_RELEASE
case IDC_VERSION:
if ((GetKeyState(VK_CONTROL) & 0x80))
{
DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_About_UserInfo), (HWND)hWnd, (DLGPROC)AboutUserProc);
}
break;
#endif
case IDOK:
case IDCANCEL:
if (hbmpBackgroundTop)

View File

@ -100,9 +100,11 @@ private:
WND_HANDLE m_hMainWindow, m_hStatusWnd;
DWORD m_ThreadId;
#ifdef BETA_RELEASE
bool m_hacked;
const bool m_bMainWindow;
DWORD m_InvalidExeMsg;
#endif
const bool m_bMainWindow;
CriticalSection m_CS;
bool m_SaveMainWindowPos;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1123,6 +1123,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
/* Help Menu
****************/
MenuItemList HelpMenu;
#ifdef BETA_RELEASE
if (g_Settings->LoadBool(Beta_IsBetaVersion))
{
stdstr_f User("Beta For: %s",g_Settings->LoadString(Beta_UserName).c_str());
@ -1131,6 +1132,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
HelpMenu.push_back(MENU_ITEM(NO_ID, EMPTY_STRING,EMPTY_STDSTR,NULL,Email ));
HelpMenu.push_back(MENU_ITEM(SPLITER ));
}
#endif
HelpMenu.push_back(MENU_ITEM(ID_HELP_CONTENTS, MENU_USER_MAN ));
HelpMenu.push_back(MENU_ITEM(ID_HELP_GAMEFAQ, MENU_GAME_FAQ ));

View File

@ -1581,8 +1581,9 @@ void CRomBrowser::FixRomListWindow (void) {
SetWindowPos((HWND)m_MainWindow,NULL,0,0,WindowWidth,WindowHeight,SWP_NOMOVE|SWP_NOZORDER);
}
void CRomBrowser::ShowRomList (void) {
if (g_Settings->LoadBool(GameRunning_CPU_Running)) { return; }
void CRomBrowser::ShowRomList (void)
{
if (m_Visible || g_Settings->LoadBool(GameRunning_CPU_Running)) { return; }
m_ShowingRomBrowser = true;
WatchThreadStop();
if (m_hRomList == NULL) { CreateRomListControl(); }

View File

@ -1,4 +1,6 @@
#include "stdafx.h"
#ifdef BETA_RELEASE
#include <Wininet.h>
#pragma comment(lib, "Wininet.lib")
@ -413,7 +415,7 @@ void TestValidBinaryThread ( )
void TestValidBinary ( )
{
#if defined(EXTERNAL_RELEASE) || defined(VALIDATE_BIN_LOCAL)
#if defined(BETA_RELEASE) || defined(VALIDATE_BIN_LOCAL)
static DWORD ThreadID = 0;
if (ThreadID == 0)
{
@ -422,3 +424,5 @@ void TestValidBinary ( )
}
#endif
}
#endif

View File

@ -337,15 +337,17 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
//Create the main window with Menu
WriteTrace(TraceDebug,__FUNCTION__ ": Create Main Window");
stdstr WinTitle(AppName);
if (g_Settings->LoadBool(Beta_IsBetaVersion))
{
WinTitle.Format("Project64 %s (%s)",VersionInfo(VERSION_PRODUCT_VERSION).c_str(),g_Settings->LoadString(Beta_UserName).c_str());
}
#ifdef BETA_RELEASE
WinTitle.Format("Project64 %s (%s)",VersionInfo(VERSION_PRODUCT_VERSION).c_str(),g_Settings->LoadString(Beta_UserName).c_str());
#else
WinTitle.Format("Project64 %s",VersionInfo(VERSION_PRODUCT_VERSION).c_str());
#endif
CMainGui MainWindow(true,WinTitle.c_str()), HiddenWindow(false);
CMainMenu MainMenu(&MainWindow);
g_Plugins->SetRenderWindows(&MainWindow,&HiddenWindow);
g_Notify->SetMainWindow(&MainWindow);
#ifdef BETA_RELEASE
{
stdstr_f User("%s",g_Settings->LoadString(Beta_UserName).c_str());
stdstr_f Email("%s",g_Settings->LoadString(Beta_EmailAddress).c_str());
@ -356,7 +358,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
return false;
}
}
#endif
if (__argc > 1) {
WriteTraceF(TraceDebug,__FUNCTION__ ": Cmd line found \"%s\"",__argv[1]);
MainWindow.Show(true); //Show the main window

View File

@ -205,8 +205,6 @@ __declspec(dllexport) void GetDllInfo ( PLUGIN_INFO * PluginInfo ) {
output: none
*******************************************************************/
#if !defined(EXTERNAL_RELEASE)
void FixMenuState (void)
{
EnableMenuItem(hRSPMenu,ID_RSPCOMMANDS,MF_BYCOMMAND| (DebuggingEnabled ? MF_ENABLED : (MF_GRAYED | MF_DISABLED)));
@ -251,8 +249,6 @@ __declspec(dllexport) void GetRspDebugInfo ( RSPDEBUG_INFO * DebugInfo )
DebugInfo->Enter_RSP_Commands_Window = Enter_RSP_Commands_Window;
}
#endif
/******************************************************************
Function: InitiateRSP
Purpose: This function is called when the DLL is started to give
@ -328,9 +324,6 @@ __declspec(dllexport) void InitiateRSP ( RSP_INFO Rsp_Info, DWORD * CycleCount)
above.
output: none
*******************************************************************/
#if !defined(EXTERNAL_RELEASE)
__declspec(dllexport) void InitiateRSPDebugger ( DEBUG_INFO Debug_Info) {
DebugInfo = Debug_Info;
}
@ -476,8 +469,6 @@ void ProcessMenuItem(int ID) {
}
}
#endif
/******************************************************************
Function: RomOpen
Purpose: This function is called when a rom is opened.
@ -518,8 +509,6 @@ static BOOL GetBooleanCheck(HWND hDlg, DWORD DialogID) {
return (IsDlgButtonChecked(hDlg, DialogID) == BST_CHECKED) ? TRUE : FALSE;
}
#if !defined(EXTERNAL_RELEASE)
BOOL CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
char Buffer[256];
@ -598,7 +587,6 @@ BOOL CALLBACK CompilerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
}
return TRUE;
}
#endif
BOOL CALLBACK ConfigDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
HWND hWndItem;