diff --git a/.gitignore b/.gitignore index 72a128650..77fdc2e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,14 @@ *.sdf *.suo *.user + +# compiler-generated sources (MSVC, GCC) +*.asm +*.s + +# assembled linker objects (GCC) +*.o + Thumbs.db /Bin/Debug /Bin/Debug64 diff --git a/Artwork/publisherlogo.psd b/Artwork/publisherlogo.psd new file mode 100644 index 000000000..2eeaaed6f Binary files /dev/null and b/Artwork/publisherlogo.psd differ diff --git a/Config/Project64.rdb b/Config/Project64.rdb index ce2dbb1d9..5966b07e6 100644 --- a/Config/Project64.rdb +++ b/Config/Project64.rdb @@ -1430,6 +1430,7 @@ Plugin Note=[video] unsupported Good Name=Dezaemon 3D (J) Internal Name=DEZAEMON3D Status=Compatible +Save Type=Sram [FD73F775-9724755A-C:50] Good Name=Diddy Kong Racing (E) (M3) (V1.0) diff --git a/Lang/Brazilian Portuguese.pj.Lang b/Lang/Brazilian Portuguese.pj.Lang index c92e66dd9..45b18603f 100644 --- a/Lang/Brazilian Portuguese.pj.Lang +++ b/Lang/Brazilian Portuguese.pj.Lang @@ -318,7 +318,7 @@ #620# "Usar o Primeiro Tipo de Salvamento Usado" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/Bulgarian.pj.Lang b/Lang/Bulgarian.pj.Lang index ca053d826..dc93495e8 100644 --- a/Lang/Bulgarian.pj.Lang +++ b/Lang/Bulgarian.pj.Lang @@ -266,7 +266,7 @@ #620# "* открий първият използван тип" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Intergration Tab diff --git a/Lang/Catalan.pj.Lang b/Lang/Catalan.pj.Lang index 4be6344af..8b32cdbc6 100644 --- a/Lang/Catalan.pj.Lang +++ b/Lang/Catalan.pj.Lang @@ -318,7 +318,7 @@ #620# "Primer tipus de desat usat" #621# "EEPROM de 4 kbits" #622# "EEPROM de 16 kbits" -#623# "SRAM de 32kbytes" +#623# "SRAM" #624# "FlashRAM de 128kbytes" //Shell Integration Tab diff --git a/Lang/Chinese (Simplified).pj.Lang b/Lang/Chinese (Simplified).pj.Lang index 38271ce56..41a77dbcb 100644 --- a/Lang/Chinese (Simplified).pj.Lang +++ b/Lang/Chinese (Simplified).pj.Lang @@ -88,6 +88,7 @@ #198# "插槽 8" #199# "插槽 9" #200# "插槽 10" +#201# "插槽 (%ws) 被选" //Pop up Menu #210# "运行游戏" @@ -224,7 +225,7 @@ #452# " 选择材质包目录" //Options Dialog -#460# "当窗口处于非活动状态时暂停模拟器" +#460# "当模拟器窗口不是处于屏幕最上方,暂停模拟器" #461# "载入ROM后切换为全屏模式" #462# "隐藏高级设置" #463# "记住已选择的金手指" @@ -255,7 +256,7 @@ #503# "自我修改码方案:" #504# "默认存档容量:" #505# "高级模块连接" -#506# "当ROM加载后,开始模拟" +#506# "当读取完ROM后,开始模拟" #507# "总是从 RDB 中覆盖默认设置" #508# "自动压缩即时存档文件" #509# "开启调试器" @@ -318,7 +319,7 @@ #620# "使用最初的存档类型" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/Chinese (Traditional).pj.Lang b/Lang/Chinese (Traditional).pj.Lang index 2ce4c7b0e..85edac4a8 100644 --- a/Lang/Chinese (Traditional).pj.Lang +++ b/Lang/Chinese (Traditional).pj.Lang @@ -270,7 +270,7 @@ #620# "使用最初使用的存檔類型" #621# "4-Kbit EEPROM" #622# "16-Kbit EEPROM" -#623# "32-KByte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/Czech.pj.Lang b/Lang/Czech.pj.Lang index f43ab53e2..61757ad8e 100644 --- a/Lang/Czech.pj.Lang +++ b/Lang/Czech.pj.Lang @@ -266,7 +266,7 @@ RDB není pøítomno nebo volba dole 'pøepsat' je nezaškrtnutá" #620# "* detek. první užívaný typ" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbajtù SRAM" +#623# "SRAM" #624# "128-kbajtù flash RAM" //Shell Intergration Tab diff --git a/Lang/Danish.pj.Lang b/Lang/Danish.pj.Lang index 89e55cb11..4fb0a0a52 100644 --- a/Lang/Danish.pj.Lang +++ b/Lang/Danish.pj.Lang @@ -265,7 +265,7 @@ #620# "* Find den først anvendte type" #621# "4kbit EEPROM" #622# "16kbit EEPROM" -#623# "32kbyte SRAM" +#623# "SRAM" #624# "128kbyte FlashRAM" //Shell Intergration Tab diff --git a/Lang/Dutch.pj.Lang b/Lang/Dutch.pj.Lang index e53d95210..70cdc9c13 100644 --- a/Lang/Dutch.pj.Lang +++ b/Lang/Dutch.pj.Lang @@ -265,7 +265,7 @@ #620# "Gebruik de eerst gebruikte save" #621# "4kbit EEPROM" #622# "16kbit EEPROM" -#623# "32kbytes SRAM" +#623# "SRAM" #624# "Flashram" //Shell Integration Tab diff --git a/Lang/English.pj.Lang b/Lang/English.pj.Lang index 07465641d..ea3a5e8ac 100644 --- a/Lang/English.pj.Lang +++ b/Lang/English.pj.Lang @@ -88,6 +88,7 @@ #198# "Slot 8" #199# "Slot 9" #200# "Slot 10" +#201# "Save Slot (%ws) selected" //Pop up Menu #210# "Play Game" diff --git a/Lang/English_alternative.pj.Lang b/Lang/English_alternative.pj.Lang index 00f916e40..c9d7d8cf8 100644 --- a/Lang/English_alternative.pj.Lang +++ b/Lang/English_alternative.pj.Lang @@ -277,7 +277,7 @@ no RDB is present, or 'overwrite' option below is unchecked" #620# "* detect first-used type" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Intergration Tab diff --git a/Lang/Finnish.pj.Lang b/Lang/Finnish.pj.Lang index 18413dd1a..fe84bb875 100644 --- a/Lang/Finnish.pj.Lang +++ b/Lang/Finnish.pj.Lang @@ -269,7 +269,7 @@ #620# "Käytä 1. tallennustyyppiä" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/French.pj.Lang b/Lang/French.pj.Lang index 4a9ca43fb..cde442eb8 100644 --- a/Lang/French.pj.Lang +++ b/Lang/French.pj.Lang @@ -318,7 +318,7 @@ #620# "Par défaut" #621# "4 kbit EEPROM" #622# "16 kbit EEPROM" -#623# "32 ko SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/German.pj.Lang b/Lang/German.pj.Lang index cad611b57..1e96872f4 100644 --- a/Lang/German.pj.Lang +++ b/Lang/German.pj.Lang @@ -269,7 +269,7 @@ #620# "Automatisch" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Intergration Tab diff --git a/Lang/German_localised.pj.Lang b/Lang/German_localised.pj.Lang index b43dc7865..41d9e922a 100644 --- a/Lang/German_localised.pj.Lang +++ b/Lang/German_localised.pj.Lang @@ -265,7 +265,7 @@ #620# "Automatisch" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Intergration Tab diff --git a/Lang/Greek.pj.Lang b/Lang/Greek.pj.Lang index 41e84edd2..f48338989 100644 --- a/Lang/Greek.pj.Lang +++ b/Lang/Greek.pj.Lang @@ -266,7 +266,7 @@ #620# "Αυτόματος" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Integration Tab diff --git a/Lang/Hungarian.pj.Lang b/Lang/Hungarian.pj.Lang index eb4c767e5..a73e4c550 100644 --- a/Lang/Hungarian.pj.Lang +++ b/Lang/Hungarian.pj.Lang @@ -269,7 +269,7 @@ #620# "Elõszöri mentés fajta használata" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/Italian.pj.Lang b/Lang/Italian.pj.Lang index c9b1619ea..a1cad2baf 100644 --- a/Lang/Italian.pj.Lang +++ b/Lang/Italian.pj.Lang @@ -269,7 +269,7 @@ #620# "Riconosci automaticamente" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-ko SRAM" +#623# "SRAM" #624# "128-ko flash RAM" //Shell Intergration Tab diff --git a/Lang/Italian_alternative.pj.Lang b/Lang/Italian_alternative.pj.Lang index f8e9acb05..3af6744cb 100644 --- a/Lang/Italian_alternative.pj.Lang +++ b/Lang/Italian_alternative.pj.Lang @@ -265,7 +265,7 @@ #620# "Riconosci il salvataggio automaticamente" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-ko SRAM" +#623# "SRAM" #624# "128-ko flash RAM" //Shell Intergration Tab diff --git a/Lang/Japanese.pj.Lang b/Lang/Japanese.pj.Lang index 779b3c9b8..3358098e9 100644 --- a/Lang/Japanese.pj.Lang +++ b/Lang/Japanese.pj.Lang @@ -5,7 +5,7 @@ #1 # "Japanese" // LANGUAGE ID #2 # "Nekokabu" // Author #3 # "2.2" // Version -#4 # "2015/3/5" // Date +#4 # "2015/11/6" // Date //About DLL Dialog #5 # "現在の言語" @@ -317,7 +317,7 @@ #620# "自動検出" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/Lithuanian.pj.Lang b/Lang/Lithuanian.pj.Lang index 942a8134a..0188fd014 100644 --- a/Lang/Lithuanian.pj.Lang +++ b/Lang/Lithuanian.pj.Lang @@ -269,7 +269,7 @@ #620# "Naudoti pirmà naudotà tipà" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Intergration Tab diff --git a/Lang/Norwegian.pj.Lang b/Lang/Norwegian.pj.Lang index 1a6935333..c74e63fdf 100644 --- a/Lang/Norwegian.pj.Lang +++ b/Lang/Norwegian.pj.Lang @@ -271,7 +271,7 @@ De vil ta effekt når ROM'en er resatt eller en ny er startet." #620# "bruk den første brukte lagrings typen" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Integration Tab @@ -430,4 +430,4 @@ Skift plugin og restart spill nå?" #2043# "Det kode navnet er allerede i bruk" #2044# "Du har nådd det maksimumme antall koder for denne ROM'en" -//The End \ No newline at end of file +//The End diff --git a/Lang/Polish.pj.Lang b/Lang/Polish.pj.Lang index 42906f7cb..91a27a9f5 100644 --- a/Lang/Polish.pj.Lang +++ b/Lang/Polish.pj.Lang @@ -269,7 +269,7 @@ #620# "Pierwszy u¿yty format" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/Russian.pj.Lang b/Lang/Russian.pj.Lang index fc77e81a5..9bd8d491d 100644 --- a/Lang/Russian.pj.Lang +++ b/Lang/Russian.pj.Lang @@ -267,7 +267,7 @@ #620# "По умолчанию" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Integration Tab diff --git a/Lang/Spanish.pj.Lang b/Lang/Spanish.pj.Lang index e82095789..3d1013f96 100644 --- a/Lang/Spanish.pj.Lang +++ b/Lang/Spanish.pj.Lang @@ -318,7 +318,7 @@ #620# "Usar primer tipo de guardado usado" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab diff --git a/Lang/Swedish.pj.Lang b/Lang/Swedish.pj.Lang index 6f0f8ab7e..620862644 100644 --- a/Lang/Swedish.pj.Lang +++ b/Lang/Swedish.pj.Lang @@ -269,7 +269,7 @@ #620# "Använd Första sparnings typ" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbytes SRAM" +#623# "SRAM" #624# "Flash RAM" //Shell Integration Tab @@ -422,5 +422,5 @@ Byta plugin och starta om nu?" #2040# "Kan inte öppna filen på grund av att grafik pluginen inte är helt OK" #2041# "Är du säker på att du vill ta bort det?" #2042# "Borttagna fusk" -#2043# "Fuskets namn används redan" +#2043# "Fuskets namn används redan" #2044# "Du har nåt max antalet av fusk för detta spelet" diff --git a/Lang/Ukrainian.pj.Lang b/Lang/Ukrainian.pj.Lang index 1f1651af7..aea9cd443 100644 --- a/Lang/Ukrainian.pj.Lang +++ b/Lang/Ukrainian.pj.Lang @@ -267,7 +267,7 @@ #620# "Обирає програма" #621# "4-kbit EEPROM" #622# "16-kbit EEPROM" -#623# "32-kbyte SRAM" +#623# "SRAM" #624# "128-kbyte flash RAM" //Shell Integration Tab diff --git a/Project64.sln b/Project64.sln index 55bdfbdfd..25ada1938 100644 Binary files a/Project64.sln and b/Project64.sln differ diff --git a/PropertySheets/Platform.props b/PropertySheets/Platform.props index d7b451c62..8e043f9db 100644 --- a/PropertySheets/Platform.props +++ b/PropertySheets/Platform.props @@ -2,13 +2,13 @@ - v140_xp + $(DefaultPlatformToolset)_xp - + $(SolutionDir)bin\$(Configuration)\ @@ -192,15 +192,18 @@ - + + + MachineX86 + MachineX86 - + $(SolutionDir)bin\$(Configuration)64\ @@ -212,6 +215,9 @@ + + MachineX64 + MachineX64 diff --git a/Source/3rd Party/directx/include/Xinput.h b/Source/3rd Party/directx/include/Xinput.h new file mode 100644 index 000000000..67ee4b08b --- /dev/null +++ b/Source/3rd Party/directx/include/Xinput.h @@ -0,0 +1,145 @@ +/*************************************************************************** +* * +* XInput.h -- This module defines XBOX controller APIs * +* and constansts for the Windows platform. * +* * +* Copyright (c) Microsoft Corp. All rights reserved. * +* * +***************************************************************************/ +#ifndef _XINPUT_H_ +#define _XINPUT_H_ + +#include + +// Current name of the DLL shipped in the same SDK as this header. +// The name reflects the current version +#define XINPUT_DLL_A "xinput9_1_0.dll" +#define XINPUT_DLL_W L"xinput9_1_0.dll" +#ifdef UNICODE + #define XINPUT_DLL XINPUT_DLL_W +#else + #define XINPUT_DLL XINPUT_DLL_A +#endif + +// +// Device types available in XINPUT_CAPABILITIES +// +#define XINPUT_DEVTYPE_GAMEPAD 0x01 + +// +// Device subtypes available in XINPUT_CAPABILITIES +// +#define XINPUT_DEVSUBTYPE_GAMEPAD 0x01 + +// +// Flags for XINPUT_CAPABILITIES +// +#define XINPUT_CAPS_VOICE_SUPPORTED 0x0004 + +// +// Constants for gamepad buttons +// +#define XINPUT_GAMEPAD_DPAD_UP 0x0001 +#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002 +#define XINPUT_GAMEPAD_DPAD_LEFT 0x0004 +#define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008 +#define XINPUT_GAMEPAD_START 0x0010 +#define XINPUT_GAMEPAD_BACK 0x0020 +#define XINPUT_GAMEPAD_LEFT_THUMB 0x0040 +#define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080 +#define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100 +#define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200 +#define XINPUT_GAMEPAD_A 0x1000 +#define XINPUT_GAMEPAD_B 0x2000 +#define XINPUT_GAMEPAD_X 0x4000 +#define XINPUT_GAMEPAD_Y 0x8000 + +// +// Gamepad thresholds +// +#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849 +#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689 +#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30 + +// +// Flags to pass to XInputGetCapabilities +// +#define XINPUT_FLAG_GAMEPAD 0x00000001 + + +// +// Structures used by XInput APIs +// +typedef struct _XINPUT_GAMEPAD +{ + WORD wButtons; + BYTE bLeftTrigger; + BYTE bRightTrigger; + SHORT sThumbLX; + SHORT sThumbLY; + SHORT sThumbRX; + SHORT sThumbRY; +} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD; + +typedef struct _XINPUT_STATE +{ + DWORD dwPacketNumber; + XINPUT_GAMEPAD Gamepad; +} XINPUT_STATE, *PXINPUT_STATE; + +typedef struct _XINPUT_VIBRATION +{ + WORD wLeftMotorSpeed; + WORD wRightMotorSpeed; +} XINPUT_VIBRATION, *PXINPUT_VIBRATION; + +typedef struct _XINPUT_CAPABILITIES +{ + BYTE Type; + BYTE SubType; + WORD Flags; + XINPUT_GAMEPAD Gamepad; + XINPUT_VIBRATION Vibration; +} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES; + + +// +// XInput APIs +// +#ifdef __cplusplus +extern "C" { +#endif + +DWORD WINAPI XInputGetState +( + DWORD dwUserIndex, // [in] Index of the gamer associated with the device + XINPUT_STATE* pState // [out] Receives the current state +); + +DWORD WINAPI XInputSetState +( + DWORD dwUserIndex, // [in] Index of the gamer associated with the device + XINPUT_VIBRATION* pVibration // [in, out] The vibration information to send to the controller +); + +DWORD WINAPI XInputGetCapabilities +( + DWORD dwUserIndex, // [in] Index of the gamer associated with the device + DWORD dwFlags, // [in] Input flags that identify the device type + XINPUT_CAPABILITIES* pCapabilities // [out] Receives the capabilities +); + +DWORD WINAPI XInputGetDSoundAudioDeviceGuids +( + DWORD dwUserIndex, // [in] Index of the gamer associated with the device + GUID* pDSoundRenderGuid, // [out] DSound device ID for render + GUID* pDSoundCaptureGuid // [out] DSound device ID for capture +); + +#ifdef __cplusplus +} +#endif + +#endif //_XINPUT_H_ + + diff --git a/Source/3rd Party/wx/include/wx/msw/gccpriv.h b/Source/3rd Party/wx/include/wx/msw/gccpriv.h new file mode 100644 index 000000000..db4c72a84 --- /dev/null +++ b/Source/3rd Party/wx/include/wx/msw/gccpriv.h @@ -0,0 +1,127 @@ +/* + Name: wx/msw/gccpriv.h + Purpose: MinGW/Cygwin definitions + Author: Vadim Zeitlin + Modified by: + Created: + RCS-ID: $Id: gccpriv.h 36155 2005-11-10 16:16:05Z ABX $ + Copyright: (c) Vadim Zeitlin + Licence: wxWindows Licence +*/ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_MSW_GCCPRIV_H_ +#define _WX_MSW_GCCPRIV_H_ + +#if defined(__MINGW32__) && !defined(__GNUWIN32__) + #define __GNUWIN32__ +#endif + +#if defined(__MINGW32__) && ( ( __GNUC__ > 2 ) || ( ( __GNUC__ == 2 ) && ( __GNUC_MINOR__ >= 95 ) ) ) + #include <_mingw.h> +#endif + +#if defined( __MINGW32__ ) && !defined(__WINE__) && !defined( HAVE_W32API_H ) + #if __MINGW32_MAJOR_VERSION >= 1 + #define HAVE_W32API_H + #endif +#elif defined( __CYGWIN__ ) && !defined( HAVE_W32API_H ) + #if ( __GNUC__ > 2 ) + #define HAVE_W32API_H + #endif +#endif + +#if wxCHECK_WATCOM_VERSION(1,0) + #define HAVE_W32API_H +#endif + +/* check for MinGW/Cygwin w32api version ( releases >= 0.5, only ) */ +#if defined( HAVE_W32API_H ) +#include +#endif + +/* Watcom can't handle defined(xxx) here: */ +#if defined(__W32API_MAJOR_VERSION) && defined(__W32API_MINOR_VERSION) + #define wxCHECK_W32API_VERSION( major, minor ) \ + ( ( ( __W32API_MAJOR_VERSION > (major) ) \ + || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor) ) ) ) +#else + #define wxCHECK_W32API_VERSION( major, minor ) (0) +#endif + +/* Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which + are more ms-like (header author is Anders Norlander, hence the name) */ +#if (defined(__MINGW32__) || defined(__CYGWIN__) || defined(__WINE__)) && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>=95))) + #ifndef wxUSE_NORLANDER_HEADERS + #define wxUSE_NORLANDER_HEADERS 1 + #endif +#else + #ifndef wxUSE_NORLANDER_HEADERS + #define wxUSE_NORLANDER_HEADERS 0 + #endif +#endif + +/* "old" GNUWIN32 is the one without Norlander's headers: it lacks the + standard Win32 headers and we define the used stuff ourselves for it + in wx/msw/gnuwin32/extra.h */ +#if defined(__GNUC__) && !wxUSE_NORLANDER_HEADERS + #define __GNUWIN32_OLD__ +#endif + +/* Cygwin 1.0 */ +#if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9)) + #define __CYGWIN10__ +#endif + +/* Check for Mingw runtime version: */ +#if defined(__MINGW32_MAJOR_VERSION) && defined(__MINGW32_MINOR_VERSION) + #define wxCHECK_MINGW32_VERSION( major, minor ) \ + ( ( ( __MINGW32_MAJOR_VERSION > (major) ) \ + || ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) ) +#else + #define wxCHECK_MINGW32_VERSION( major, minor ) (0) +#endif + +/* Mingw runtime 1.0-20010604 has some missing _tXXXX functions, + so let's define them ourselves: */ +#if defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 1, 0 ) \ + && !wxCHECK_W32API_VERSION( 1, 1 ) + #ifndef _tsetlocale + #if wxUSE_UNICODE + #define _tsetlocale _wsetlocale + #else + #define _tsetlocale setlocale + #endif + #endif + #ifndef _tgetenv + #if wxUSE_UNICODE + #define _tgetenv _wgetenv + #else + #define _tgetenv getenv + #endif + #endif + #ifndef _tfopen + #if wxUSE_UNICODE + #define _tfopen _wfopen + #else + #define _tfopen fopen + #endif + #endif +#endif + +/* current (= before mingw-runtime 3.3) mingw32 headers forget to + define _puttchar, this will probably be fixed in the next versions but + for now do it ourselves + */ +#if defined( __MINGW32__ ) && \ + !wxCHECK_MINGW32_VERSION(3,3) && !defined( _puttchar ) + #ifdef wxUSE_UNICODE + #define _puttchar putwchar + #else + #define _puttchar puttchar + #endif +#endif + +#endif + /* _WX_MSW_GCCPRIV_H_ */ diff --git a/Source/3rd Party/wx/wx_core.vcproj b/Source/3rd Party/wx/wx_core.vcproj index ba8c88e53..3b185d741 100644 --- a/Source/3rd Party/wx/wx_core.vcproj +++ b/Source/3rd Party/wx/wx_core.vcproj @@ -94,7 +94,7 @@ /> @@ -2394,9 +2394,9 @@ > @@ -3763,11 +3763,11 @@ > + + + + + + + + + + + + @@ -238,6 +250,10 @@ RelativePath="TraceDefs.h" > + + diff --git a/Source/Common/Common.vcxproj b/Source/Common/Common.vcxproj index caa307a36..0a2d5b051 100644 --- a/Source/Common/Common.vcxproj +++ b/Source/Common/Common.vcxproj @@ -43,7 +43,9 @@ Create + + @@ -57,7 +59,9 @@ + + \ No newline at end of file diff --git a/Source/Common/Common.vcxproj.filters b/Source/Common/Common.vcxproj.filters index 852dc95bd..1f3aa4e29 100644 --- a/Source/Common/Common.vcxproj.filters +++ b/Source/Common/Common.vcxproj.filters @@ -41,6 +41,12 @@ Source Files + + Source Files + + + Source Files + @@ -82,5 +88,11 @@ Header Files + + Header Files + + + Header Files + \ No newline at end of file diff --git a/Source/Common/File Class.cpp b/Source/Common/File Class.cpp index c5035fb97..cc73de345 100644 --- a/Source/Common/File Class.cpp +++ b/Source/Common/File Class.cpp @@ -79,20 +79,14 @@ bool CFile::Open(const char * lpszFileName, uint32_t nOpenFlags) sa.bInheritHandle = (nOpenFlags & modeNoInherit) == 0; // map creation flags - ULONG dwCreateFlag = 0; + ULONG dwCreateFlag = OPEN_EXISTING; if (nOpenFlags & modeCreate) { - if (nOpenFlags & modeNoTruncate) - dwCreateFlag = OPEN_ALWAYS; - else - dwCreateFlag = CREATE_ALWAYS; + dwCreateFlag = ((nOpenFlags & modeNoTruncate) != 0) ? OPEN_ALWAYS : CREATE_ALWAYS; } - else - dwCreateFlag = OPEN_EXISTING; // attempt file creation - HANDLE hFile = ::CreateFile(lpszFileName, dwAccess, dwShareMode, &sa, - dwCreateFlag, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE hFile = ::CreateFile(lpszFileName, dwAccess, dwShareMode, &sa, dwCreateFlag, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { //#define ERROR_PATH_NOT_FOUND 3L //ULONG err = GetLastError(); @@ -169,12 +163,12 @@ uint32_t CFile::Read(void* lpBuf, uint32_t nCount) return 0; // avoid Win32 "null-read" } - ULONG dwRead = 0; + DWORD dwRead = 0; if (!::ReadFile(m_hFile, lpBuf, nCount, &dwRead, NULL)) { return 0; } - return (UINT)dwRead; + return (uint32_t)dwRead; } long CFile::Seek(long lOff, SeekPosition nFrom) diff --git a/Source/Common/File Class.h b/Source/Common/File Class.h index a491febaf..fc734f633 100644 --- a/Source/Common/File Class.h +++ b/Source/Common/File Class.h @@ -5,7 +5,8 @@ class CFileBase { public: - enum OpenFlags { + enum OpenFlags + { modeRead = 0x0000, modeWrite = 0x0001, modeReadWrite = 0x0002, @@ -19,7 +20,8 @@ public: modeNoTruncate = 0x2000, }; - enum Attribute { + enum Attribute + { normal = 0x00, readOnly = 0x01, hidden = 0x02, diff --git a/Source/Common/Log Class.cpp b/Source/Common/Log Class.cpp index 86fa8e088..95f001dba 100644 --- a/Source/Common/Log Class.cpp +++ b/Source/Common/Log Class.cpp @@ -2,7 +2,6 @@ #include #include #include -#include CLog::CLog (void ) : m_FlushOnWrite(false), @@ -16,7 +15,7 @@ CLog::~CLog (void) { } -bool CLog::Open( LPCTSTR FileName, LOG_OPEN_MODE mode /* = Log_New */) +bool CLog::Open( const char * FileName, LOG_OPEN_MODE mode /* = Log_New */) { if (FileName == NULL) { @@ -34,14 +33,14 @@ bool CLog::Open( LPCTSTR FileName, LOG_OPEN_MODE mode /* = Log_New */) m_hLogFile.Close(); } - ULONG nOpenFlags = CFile::modeReadWrite | CFile::modeCreate; + uint32_t nOpenFlags = CFile::modeReadWrite | CFile::modeCreate; if (mode == Log_Append) { nOpenFlags |= CFile::modeNoTruncate; } if (!m_hLogFile.Open(File, nOpenFlags)) { return false; } - m_FileName = (LPCTSTR)File; + m_FileName = (const char *)File; m_hLogFile.Seek(0,mode == Log_Append ? CFile::end : CFile::begin); #ifdef _UNICODE @@ -64,7 +63,7 @@ void CLog::Close ( void ) } } -void CLog::LogF(LPCTSTR Message, ...) +void CLog::LogF(const char * Message, ...) { va_list ap; va_start( ap, Message ); @@ -72,7 +71,7 @@ void CLog::LogF(LPCTSTR Message, ...) va_end( ap ); } -void CLog::LogArgs(LPCTSTR Message, va_list & args ) +void CLog::LogArgs(const char * Message, va_list & args ) { if (!m_hLogFile.IsOpen()) { return; } @@ -112,14 +111,16 @@ void CLog::LogArgs(LPCTSTR Message, va_list & args ) } if (buffer) + { delete [] buffer; + } #endif } -void CLog::Log( LPCTSTR Message ) +void CLog::Log( const char * Message ) { if (!m_hLogFile.IsOpen()) { return; } - m_hLogFile.Write(Message,(ULONG)_tcslen(Message)*sizeof(TCHAR)); + m_hLogFile.Write(Message,(uint32_t)strlen(Message)*sizeof(TCHAR)); if (m_FlushOnWrite) { m_hLogFile.Flush(); @@ -128,7 +129,7 @@ void CLog::Log( LPCTSTR Message ) if (m_TruncateFileLog) { // check file size - ULONG FileSize = m_hLogFile.GetLength(); + uint32_t FileSize = m_hLogFile.GetLength(); // if larger then max size then if (FileSize > m_MaxFileSize) { @@ -138,16 +139,17 @@ void CLog::Log( LPCTSTR Message ) FileSize = m_hLogFile.GetLength(); } - DWORD end = m_hLogFile.SeekToEnd(); + uint32_t end = m_hLogFile.SeekToEnd(); // move to reduce size m_hLogFile.Seek((end - m_MaxFileSize) + m_FileChangeSize,CFile::begin); // Find next end of line - DWORD NextEnter = 0, dwRead = 0; - do { + uint32_t NextEnter = 0, dwRead = 0; + do + { BYTE Data[300]; - DWORD dwRead; + uint32_t dwRead; dwRead = m_hLogFile.Read(Data,sizeof(Data)); if (dwRead == 0) @@ -168,9 +170,10 @@ void CLog::Log( LPCTSTR Message ) } while(dwRead != 0); // copy content of log to the new file - DWORD ReadPos = (end - m_MaxFileSize) + m_FileChangeSize + NextEnter; - DWORD SizeToRead, WritePos = 0; - do { + uint32_t ReadPos = (end - m_MaxFileSize) + m_FileChangeSize + NextEnter; + uint32_t SizeToRead, WritePos = 0; + do + { enum { fIS_MvSize = 0x5000 }; unsigned char Data[fIS_MvSize + 1]; @@ -179,7 +182,7 @@ void CLog::Log( LPCTSTR Message ) m_hLogFile.Seek(ReadPos,CFile::begin); - DWORD dwRead; + uint32_t dwRead; dwRead = m_hLogFile.Read(Data,SizeToRead); m_hLogFile.Seek(WritePos,CFile::begin); diff --git a/Source/Common/Log Class.h b/Source/Common/Log Class.h index e507ef1a6..69d322cb1 100644 --- a/Source/Common/Log Class.h +++ b/Source/Common/Log Class.h @@ -1,11 +1,13 @@ -#ifndef __LOG_CLASS__H__ -#define __LOG_CLASS__H__ +#pragma once +#include "File Class.h" -enum LOG_OPEN_MODE { +enum LOG_OPEN_MODE +{ Log_New, Log_Append }; -class CLog { +class CLog +{ enum { MB = 1024 * 1024 }; enum { MAX_FILE_SIZE = 10 * MB }; @@ -13,24 +15,24 @@ class CLog { bool m_FlushOnWrite; stdstr m_FileName; bool m_TruncateFileLog; - ULONG m_MaxFileSize; - ULONG m_FileChangeSize; + uint32_t m_MaxFileSize; + uint32_t m_FileChangeSize; public: CLog ( void ); ~CLog ( void ); - bool Open ( LPCTSTR FileName, LOG_OPEN_MODE mode = Log_New ); - void Log ( LPCTSTR Message ); - void LogF ( LPCTSTR Message, ... ); - void LogArgs ( LPCTSTR Message, va_list & args ); + bool Open ( const char * FileName, LOG_OPEN_MODE mode = Log_New ); + void Log ( const char * Message ); + void LogF ( const char * Message, ... ); + void LogArgs ( const char * Message, va_list & args ); bool Empty ( void ); void Close ( void ); - inline void SetMaxFileSize ( ULONG Size ) + inline void SetMaxFileSize ( uint32_t Size ) { m_MaxFileSize = Size; - m_FileChangeSize = (ULONG)(Size * 0.1); + m_FileChangeSize = (uint32_t)(Size * 0.1); } inline void SetTruncateFile( bool Truncate ) { m_TruncateFileLog = Truncate; } inline void SetFlush ( bool Always ) { m_FlushOnWrite = Always; } @@ -38,5 +40,3 @@ public: inline bool Flush ( void ) { return m_hLogFile.Flush(); } inline const stdstr & FileName ( void ) const { return m_FileName; } }; - -#endif diff --git a/Source/Common/SyncEvent.cpp b/Source/Common/SyncEvent.cpp new file mode 100644 index 000000000..cdf4b4735 --- /dev/null +++ b/Source/Common/SyncEvent.cpp @@ -0,0 +1,31 @@ +#include "stdafx.h" + +SyncEvent::SyncEvent(bool bManualReset) +{ + m_Event = CreateEvent(NULL, bManualReset, FALSE, NULL); +} + +SyncEvent::~SyncEvent() +{ + CloseHandle(m_Event); +} + +void SyncEvent::Trigger() +{ + SetEvent(m_Event); +} + +bool SyncEvent::IsTriggered(int32_t iWaitTime) +{ + return (WAIT_OBJECT_0 == WaitForSingleObject(m_Event,iWaitTime)); +} + +void SyncEvent::Reset() +{ + ResetEvent(m_Event); +} + +void * SyncEvent::GetHandle() +{ + return m_Event; +} \ No newline at end of file diff --git a/Source/Common/SyncEvent.h b/Source/Common/SyncEvent.h new file mode 100644 index 000000000..3b95e8c77 --- /dev/null +++ b/Source/Common/SyncEvent.h @@ -0,0 +1,21 @@ +#pragma once + +class SyncEvent +{ +public: + enum { INFINITE_TIMEOUT = 0xFFFFFFFF }; + + SyncEvent(bool bManualReset = true); + ~SyncEvent(void); + + void Trigger (void); + bool IsTriggered (int32_t iWaitTime = 0); + void Reset(); + void * GetHandle(); + +protected: + SyncEvent(const SyncEvent&); // Disable copy constructor + SyncEvent& operator=(const SyncEvent&); // Disable assignment + + void * m_Event; +}; \ No newline at end of file diff --git a/Source/Common/Trace.cpp b/Source/Common/Trace.cpp index 15c9c18f5..e74519fe8 100644 --- a/Source/Common/Trace.cpp +++ b/Source/Common/Trace.cpp @@ -12,20 +12,20 @@ public: CTraceLog() { } - ~CTraceLog() { CloseTrace (); } + ~CTraceLog() { CloseTrace(); } - CTraceModule * AddTraceModule ( CTraceModule * TraceModule ); - CTraceModule * RemoveTraceModule ( CTraceModule * TraceModule ); - void CloseTrace ( void ); - void WriteTrace ( TraceType Type, LPCTSTR Message ); - void WriteTraceF ( TraceType Type, LPCTSTR strFormat, va_list args); + CTraceModule * AddTraceModule(CTraceModule * TraceModule); + CTraceModule * RemoveTraceModule(CTraceModule * TraceModule); + void CloseTrace(void); + void WriteTrace(TraceType Type, LPCTSTR Message); + void WriteTraceF(TraceType Type, LPCTSTR strFormat, va_list args); }; -CTraceModule * CTraceLog::AddTraceModule ( CTraceModule * TraceModule ) +CTraceModule * CTraceLog::AddTraceModule(CTraceModule * TraceModule) { CGuard Guard(m_CS); - - for (int i = 0; i < (int)m_Modules.size(); i++ ) + + for (int i = 0; i < (int)m_Modules.size(); i++) { if (m_Modules[i] == TraceModule) { @@ -36,7 +36,7 @@ CTraceModule * CTraceLog::AddTraceModule ( CTraceModule * TraceModule ) return TraceModule; } -CTraceModule * CTraceLog::RemoveTraceModule ( CTraceModule * TraceModule ) +CTraceModule * CTraceLog::RemoveTraceModule(CTraceModule * TraceModule) { CGuard Guard(m_CS); @@ -51,38 +51,38 @@ CTraceModule * CTraceLog::RemoveTraceModule ( CTraceModule * TraceModule ) return NULL; } -void CTraceLog::CloseTrace ( void) +void CTraceLog::CloseTrace(void) { CGuard Guard(m_CS); - for (int i = 0; i < (int)m_Modules.size(); i++ ) + for (int i = 0; i < (int)m_Modules.size(); i++) { - if(m_Modules[i]) + if (m_Modules[i]) delete m_Modules[i]; } m_Modules.clear(); } -void CTraceLog::WriteTraceF ( TraceType Type, LPCTSTR strFormat, va_list args) +void CTraceLog::WriteTraceF(TraceType Type, LPCTSTR strFormat, va_list args) { - const int nMaxSize = 32*1024; + const int nMaxSize = 32 * 1024; TCHAR pBuffer[nMaxSize]; - - _vsntprintf(pBuffer,nMaxSize,strFormat,args); + + _vsntprintf(pBuffer, nMaxSize, strFormat, args); pBuffer[nMaxSize - 1] = 0; - WriteTrace(Type,pBuffer); + WriteTrace(Type, pBuffer); } -void CTraceLog::WriteTrace ( TraceType Type, LPCTSTR Message) +void CTraceLog::WriteTrace(TraceType Type, LPCTSTR Message) { CGuard Guard(m_CS); if (Type != TraceNone) { bool WriteToLog = false; - for (int i = 0; i < (int)m_Modules.size(); i++ ) + for (int i = 0; i < (int)m_Modules.size(); i++) { - if ((m_Modules[i]->GetTraceLevel() & Type) != 0) + if ((m_Modules[i]->GetTraceLevel() & Type) != 0) { WriteToLog = true; break; @@ -99,58 +99,57 @@ void CTraceLog::WriteTrace ( TraceType Type, LPCTSTR Message) SYSTEMTIME sysTime; ::GetLocalTime(&sysTime); - nPos = _stprintf( pBuffer, _T("%04d/%02d/%02d %02d:%02d:%02d.%03d %05d: "), sysTime.wYear, - sysTime.wMonth,sysTime.wDay,sysTime.wHour,sysTime.wMinute,sysTime.wSecond,sysTime.wMilliseconds, + nPos = _stprintf(pBuffer, _T("%04d/%02d/%02d %02d:%02d:%02d.%03d %05d: "), sysTime.wYear, + sysTime.wMonth, sysTime.wDay, sysTime.wHour, sysTime.wMinute, sysTime.wSecond, sysTime.wMilliseconds, ::GetCurrentThreadId() - ); + ); // show the debug level - if (Type == TraceNone) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("None : ")); } - else if ((Type & TraceError) != 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Error : ")); } - else if ((Type & TraceSettings) != 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Setting: ")); } - else if ((Type & TraceGfxPlugin) != 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Gfx : ")); } - else if ((Type & TraceDebug) != 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Debug : ")); } - else if ((Type & TraceRecompiler)!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Recomp : ")); } - else if ((Type & TraceRSP )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("RSP : ")); } - else if ((Type & TraceTLB )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("TLB : ")); } - else if ((Type & TraceValidate )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Valid : ")); } - else if ((Type & TraceAudio )!= 0) { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Audio : ")); } - else { nPos += _stprintf(pBuffer+nPos,_T("%s"),_T("Unknown: ")); } + if (Type == TraceNone) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("None : ")); } + else if ((Type & TraceError) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Error : ")); } + else if ((Type & TraceSettings) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Setting: ")); } + else if ((Type & TraceGfxPlugin) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Gfx : ")); } + else if ((Type & TraceDebug) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Debug : ")); } + else if ((Type & TraceRecompiler) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Recomp : ")); } + else if ((Type & TraceRSP) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("RSP : ")); } + else if ((Type & TraceTLB) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("TLB : ")); } + else if ((Type & TraceValidate) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Valid : ")); } + else if ((Type & TraceAudio) != 0) { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Audio : ")); } + else { nPos += _stprintf(pBuffer + nPos, _T("%s"), _T("Unknown: ")); } - for (int i = 0; i < (int)m_Modules.size(); i++ ) + for (int i = 0; i < (int)m_Modules.size(); i++) { - if ((m_Modules[i]->GetTraceLevel() & Type) != 0) + if ((m_Modules[i]->GetTraceLevel() & Type) != 0) { m_Modules[i]->Write(pBuffer, false); } } } - for (int i = 0; i < (int)m_Modules.size(); i++ ) + for (int i = 0; i < (int)m_Modules.size(); i++) { - if ((m_Modules[i]->GetTraceLevel() & Type) != 0) + if ((m_Modules[i]->GetTraceLevel() & Type) != 0) { m_Modules[i]->Write(Message, true); } } } - -CTraceLog & GetTraceObjet ( void ) +CTraceLog & GetTraceObjet(void) { static CTraceLog TraceLog; return TraceLog; } -void WriteTrace (TraceType Type, LPCTSTR Message ) +void WriteTrace(TraceType Type, LPCTSTR Message) { if (TraceClosed) { return; } - GetTraceObjet().WriteTrace(Type,Message); + GetTraceObjet().WriteTrace(Type, Message); } -void WriteTraceF ( TraceType Type, LPCTSTR strFormat, ... ) +void WriteTraceF(TraceType Type, LPCTSTR strFormat, ...) { if (TraceClosed) { @@ -158,11 +157,11 @@ void WriteTraceF ( TraceType Type, LPCTSTR strFormat, ... ) } va_list args; va_start(args, strFormat); - GetTraceObjet().WriteTraceF(Type,strFormat,args); + GetTraceObjet().WriteTraceF(Type, strFormat, args); va_end(args); } -CTraceModule * AddTraceModule ( CTraceModule * TraceModule ) +CTraceModule * AddTraceModule(CTraceModule * TraceModule) { if (TraceClosed) { @@ -172,52 +171,52 @@ CTraceModule * AddTraceModule ( CTraceModule * TraceModule ) return TraceModule; } -CTraceModule * RemoveTraceModule ( CTraceModule * TraceModule ) +CTraceModule * RemoveTraceModule(CTraceModule * TraceModule) { return GetTraceObjet().RemoveTraceModule(TraceModule); } -void CloseTrace ( void ) +void CloseTrace(void) { TraceClosed = true; GetTraceObjet().CloseTrace(); } -CTraceFileLog::CTraceFileLog(LPCTSTR FileName, bool FlushFile ) : - m_FlushFile(FlushFile) +CTraceFileLog::CTraceFileLog(LPCTSTR FileName, bool FlushFile) : +m_FlushFile(FlushFile) { m_hLogFile.SetFlush(false); m_hLogFile.SetTruncateFile(true); m_hLogFile.SetMaxFileSize(5 * MB); - m_hLogFile.Open(FileName,Log_Append); + m_hLogFile.Open(FileName, Log_Append); } -CTraceFileLog::CTraceFileLog (LPCTSTR FileName, bool FlushFile, LOG_OPEN_MODE eMode, DWORD dwMaxFileSize) : - m_FlushFile(FlushFile) +CTraceFileLog::CTraceFileLog(LPCTSTR FileName, bool FlushFile, LOG_OPEN_MODE eMode, size_t dwMaxFileSize) : +m_FlushFile(FlushFile) { - enum { MB = 1024 * 1024 }; + enum { MB = 1024 * 1024 }; m_hLogFile.SetFlush(false); m_hLogFile.SetTruncateFile(true); - if(dwMaxFileSize < 2048 && dwMaxFileSize > 2) - m_hLogFile.SetMaxFileSize(dwMaxFileSize * MB); - else - m_hLogFile.SetMaxFileSize(5 * MB); + if (dwMaxFileSize < 3 || dwMaxFileSize > 2047) + { /* Clamp file size to 5 MB if it exceeds 2047 or falls short of 3. */ + dwMaxFileSize = 5; + } + m_hLogFile.SetMaxFileSize(dwMaxFileSize * MB); - m_hLogFile.Open(FileName,eMode); + m_hLogFile.Open(FileName, eMode); } - CTraceFileLog::~CTraceFileLog() { TraceClosed = true; } -void CTraceFileLog::Write(LPCTSTR Message, bool EndOfLine ) +void CTraceFileLog::Write(LPCTSTR Message, bool EndOfLine) { if (!m_hLogFile.IsOpen()) { return; } - + CGuard Section(m_CriticalSection); m_hLogFile.Log(Message); if (EndOfLine) @@ -230,7 +229,16 @@ void CTraceFileLog::Write(LPCTSTR Message, bool EndOfLine ) } } -void CTraceFileLog::SetFlushFile( bool bFlushFile ) +void CTraceFileLog::SetFlushFile(bool bFlushFile) { m_FlushFile = bFlushFile; } + +void CDebugTraceLog::Write(const char * Message, bool EndOfLine) +{ + OutputDebugString(Message); + if (EndOfLine) + { + OutputDebugString("\n"); + } +} diff --git a/Source/Common/Trace.h b/Source/Common/Trace.h index 3bda9afb4..2e8e2f0cd 100644 --- a/Source/Common/Trace.h +++ b/Source/Common/Trace.h @@ -1,5 +1,8 @@ #pragma once +#include "CriticalSection.h" +#include "Log Class.h" + class CTraceModule { TraceLevel m_Type; @@ -10,7 +13,7 @@ public: inline void SetTraceLevel ( TraceLevel Type ) { m_Type = Type; } inline TraceLevel GetTraceLevel ( void ) const { return m_Type; } - virtual void Write ( LPCTSTR Message, bool EndOfLine ) = 0; + virtual void Write ( const char * Message, bool EndOfLine ) = 0; }; class CTraceFileLog : public CTraceModule @@ -22,25 +25,18 @@ class CTraceFileLog : public CTraceModule bool m_FlushFile; public: - CTraceFileLog (LPCTSTR FileName, bool FlushFile = true); - CTraceFileLog (LPCTSTR FileName, bool FlushFile, LOG_OPEN_MODE eMode, DWORD dwMaxFileSize = 5); + CTraceFileLog (const char * FileName, bool FlushFile = true); + CTraceFileLog(const char * FileName, bool FlushFile, LOG_OPEN_MODE eMode, size_t dwMaxFileSize = 5); virtual ~CTraceFileLog (); - void Write ( LPCTSTR Message, bool EndOfLine ); + void Write ( const char * Message, bool EndOfLine ); void SetFlushFile ( bool bFlushFile ); }; class CDebugTraceLog : public CTraceModule { public: - void Write ( LPCTSTR Message, bool EndOfLine ) - { - OutputDebugString(Message); - if (EndOfLine) - { - OutputDebugString("\n"); - } - } + void Write ( const char * Message, bool EndOfLine ); }; CTraceModule * AddTraceModule ( CTraceModule * TraceModule ); // Must be created with new diff --git a/Source/Common/Util.cpp b/Source/Common/Util.cpp new file mode 100644 index 000000000..ab32891a2 --- /dev/null +++ b/Source/Common/Util.cpp @@ -0,0 +1,61 @@ +#include "stdafx.h" +#include "Util.h" +#include + +void pjutil::Sleep(uint32_t timeout) +{ + ::Sleep(timeout); +} + +bool pjutil::TerminatedExistingExe() +{ + bool bTerminated = false; + bool AskedUser = false; + DWORD pid = GetCurrentProcessId(); + + HANDLE nSearch = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if (nSearch != INVALID_HANDLE_VALUE) + { + PROCESSENTRY32 lppe; + + memset(&lppe, 0, sizeof(PROCESSENTRY32)); + lppe.dwSize = sizeof(PROCESSENTRY32); + stdstr ModuleName = CPath(CPath::MODULE_FILE).GetNameExtension(); + + if (Process32First(nSearch, &lppe)) + { + do + { + if (_stricmp(lppe.szExeFile, ModuleName.c_str()) != 0 || + lppe.th32ProcessID == pid) + { + continue; + } + if (!AskedUser) + { + AskedUser = true; + int res = MessageBox(NULL, stdstr_f("%s currently running\n\nTerminate pid %d now?", ModuleName.c_str(), lppe.th32ProcessID).c_str(), stdstr_f("Terminate %s",ModuleName.c_str()).c_str(), MB_YESNO | MB_ICONEXCLAMATION); + if (res != IDYES) + { + break; + } + } + HANDLE hHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, lppe.th32ProcessID); + if (hHandle != NULL) + { + if (TerminateProcess(hHandle, 0)) + { + bTerminated = true; + } + else + { + MessageBox(NULL, stdstr_f("Failed to terminate pid %d", lppe.th32ProcessID).c_str(), stdstr_f("Terminate %s failed!",ModuleName.c_str()).c_str(), MB_YESNO | MB_ICONEXCLAMATION); + } + CloseHandle(hHandle); + } + } while (Process32Next(nSearch, &lppe)); + } + CloseHandle(nSearch); + } + return bTerminated; +} \ No newline at end of file diff --git a/Source/Common/Util.h b/Source/Common/Util.h new file mode 100644 index 000000000..4dc0a48a1 --- /dev/null +++ b/Source/Common/Util.h @@ -0,0 +1,14 @@ +#pragma once +#include "stdtypes.h" + +class pjutil +{ +public: + static void Sleep(uint32_t timeout); + static bool TerminatedExistingExe(); + +private: + pjutil(void); // Disable default constructor + pjutil(const pjutil&); // Disable copy constructor + pjutil& operator=(const pjutil&); // Disable assignment +}; \ No newline at end of file diff --git a/Source/Common/md5.h b/Source/Common/md5.h index 423b9e0fe..037e8512c 100644 --- a/Source/Common/md5.h +++ b/Source/Common/md5.h @@ -1,22 +1,22 @@ -// MD5.CC - source code for the C++/object oriented translation and +// MD5.CC - source code for the C++/object oriented translation and // modification of MD5. -// Translation and modification (c) 1995 by Mordechai T. Abzug +// Translation and modification (c) 1995 by Mordechai T. Abzug -// This translation/ modification is provided "as is," without express or +// This translation/ modification is provided "as is," without express or // implied warranty of any kind. -// The translator/ modifier does not claim (1) that MD5 will do what you think -// it does; (2) that this translation/ modification is accurate; or (3) that -// this software is "merchantible." (Language for this disclaimer partially +// The translator/ modifier does not claim (1) that MD5 will do what you think +// it does; (2) that this translation/ modification is accurate; or (3) that +// this software is "merchantible." (Language for this disclaimer partially // copied from the disclaimer below). /* based on: - MD5.H - header file for MD5C.C - MDDRIVER.C - test driver for MD2, MD4 and MD5 +MD5.H - header file for MD5C.C +MDDRIVER.C - test driver for MD2, MD4 and MD5 - Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All +Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it @@ -39,11 +39,7 @@ documentation and/or software. */ -#if !defined(AFX_MD5_H__6DD6923B_E241_40CE_81A3_4C2C88C140E4__INCLUDED_) -#define AFX_MD5_H__6DD6923B_E241_40CE_81A3_4C2C88C140E4__INCLUDED_ - -/* sprintf() */ -#include +#pragma once #include #include @@ -51,106 +47,102 @@ documentation and/or software. struct MD5Digest { - MD5Digest() { Reset(); } - unsigned char digest[16]; + MD5Digest() { Reset(); } + unsigned char digest[16]; - void Reset() { ::memset(digest, 0, sizeof(digest)); } - BOOL IsClear() - { - int isClear = 0; - for (int i=0; i < 16; i++) - isClear += digest[i]; - return (isClear == 0); - } - std::string String ( void ) - { - char s[33]; + void Reset() { ::memset(digest, 0, sizeof(digest)); } + bool IsClear() + { + int isClear = 0; + for (int i=0; i < 16; i++) + { + isClear += digest[i]; + } + return (isClear == 0); + } + std::string String ( void ) + { + char s[33]; - ::memset(s, 0, sizeof(s)); + ::memset(s, 0, sizeof(s)); - for (int i = 0; i < 16; i++) - { - sprintf(s+i*2, "%02X", digest[i]); - } - s[32]='\0'; - - return s; - } + for (int i = 0; i < 16; i++) + { + sprintf(s+i*2, "%02X", digest[i]); + } + s[32]='\0'; + + return s; + } }; -struct MD5Digest_less : std::binary_function +struct MD5Digest_less : std::binary_function { - bool operator()(const MD5Digest& x, const MD5Digest& y) const - { - return (memcmp(x.digest, y.digest, sizeof(x.digest)) < 0); - } + bool operator()(const MD5Digest& x, const MD5Digest& y) const + { + return (memcmp(x.digest, y.digest, sizeof(x.digest)) < 0); + } }; -class MD5 +class MD5 { - public: -// methods for controlled operation: - MD5 (); // simple initializer - ~MD5 (); - void update (const unsigned char *input, unsigned int input_length); - void update (FILE *file); - void finalize (); + // methods for controlled operation: + MD5 (); // simple initializer + ~MD5 (); + void update (const unsigned char *input, unsigned int input_length); + void update (FILE *file); + void finalize (); -// constructors for special circumstances. All these constructors finalize -// the MD5 context. - MD5 (CPath File); // digest File, finalize - MD5 (const unsigned char *string); // digest string, finalize - MD5 (FILE *file); // digest file, close, finalize - MD5 (const unsigned char *input, unsigned int input_length); - MD5 (const stdstr & string); + // constructors for special circumstances. All these constructors finalize + // the MD5 context. + MD5 (CPath File); // digest File, finalize + MD5 (const unsigned char *string); // digest string, finalize + MD5 (FILE *file); // digest file, close, finalize + MD5 (const unsigned char *input, unsigned int input_length); + MD5 (const stdstr & string); -// methods to acquire finalized result - void get_digest(MD5Digest& extdigest); //Digest into a digest structure - const unsigned char *raw_digest (); // digest as a 16-byte binary array - const char * hex_digest (); // digest as a 33-byte ascii-hex string + // methods to acquire finalized result + void get_digest(MD5Digest& extdigest); //Digest into a digest structure + const unsigned char *raw_digest (); // digest as a 16-byte binary array + const char * hex_digest (); // digest as a 33-byte ascii-hex string private: -// first, some types: - typedef unsigned int uint4; // assumes integer is 4 words long - typedef unsigned short int uint2; // assumes short integer is 2 words long - typedef unsigned char uint1; // assumes char is 1 word long + // first, some types: + typedef unsigned int uint4; // assumes integer is 4 words long + typedef unsigned short int uint2; // assumes short integer is 2 words long + typedef unsigned char uint1; // assumes char is 1 word long -// next, the private data: - uint4 state[4]; - uint4 count[2]; // number of *bits*, mod 2^64 - uint1 buffer[64]; // input buffer - uint1 digest[16]; - uint1 finalized; - stdstr m_hex_digest; + // next, the private data: + uint4 state[4]; + uint4 count[2]; // number of *bits*, mod 2^64 + uint1 buffer[64]; // input buffer + uint1 digest[16]; + uint1 finalized; + stdstr m_hex_digest; -// last, the private methods, mostly static: - void init (); // called by all constructors - void transform (uint1 *buffer); // does the real update work. Note - // that length is implied to be 64. + // last, the private methods, mostly static: + void init (); // called by all constructors + void transform (uint1 *buffer); // does the real update work. Note + // that length is implied to be 64. - static void encode (uint1 *dest, uint4 *src, uint4 length); - static void decode (uint4 *dest, uint1 *src, uint4 length); - static void memcpy (uint1 *dest, uint1 *src, uint4 length); - static void memset (uint1 *start, uint1 val, uint4 length); - - static inline uint4 rotate_left (uint4 x, uint4 n); - static inline uint4 F (uint4 x, uint4 y, uint4 z); - static inline uint4 G (uint4 x, uint4 y, uint4 z); - static inline uint4 H (uint4 x, uint4 y, uint4 z); - static inline uint4 I (uint4 x, uint4 y, uint4 z); - static inline void FF (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); - static inline void GG (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); - static inline void HH (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); - static inline void II (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, - uint4 s, uint4 ac); + static void encode (uint1 *dest, uint4 *src, uint4 length); + static void decode (uint4 *dest, uint1 *src, uint4 length); + static void memcpy (uint1 *dest, uint1 *src, uint4 length); + static void memset (uint1 *start, uint1 val, uint4 length); + static inline uint4 rotate_left (uint4 x, uint4 n); + static inline uint4 F (uint4 x, uint4 y, uint4 z); + static inline uint4 G (uint4 x, uint4 y, uint4 z); + static inline uint4 H (uint4 x, uint4 y, uint4 z); + static inline uint4 I (uint4 x, uint4 y, uint4 z); + static inline void FF (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, + uint4 s, uint4 ac); + static inline void GG (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, + uint4 s, uint4 ac); + static inline void HH (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, + uint4 s, uint4 ac); + static inline void II (uint4& a, uint4 b, uint4 c, uint4 d, uint4 x, + uint4 s, uint4 ac); }; - - - -#endif // !defined(AFX_MD5_H__6DD6923B_E241_40CE_81A3_4C2C88C140E4__INCLUDED_) diff --git a/Source/Common/std string.cpp b/Source/Common/std string.cpp index 6fe620904..9deb6067c 100644 --- a/Source/Common/std string.cpp +++ b/Source/Common/std string.cpp @@ -1,4 +1,5 @@ #include "stdafx.h" +#include #include stdstr::stdstr() diff --git a/Source/Common/std string.h b/Source/Common/std string.h index 8b61aa99b..c7ebd007e 100644 --- a/Source/Common/std string.h +++ b/Source/Common/std string.h @@ -51,5 +51,22 @@ public: } }; +class stdwstr_f : public std::wstring +{ +public: + stdwstr_f(const wchar_t * strFormat, ...) + { + va_list args; + va_start(args, strFormat); + + wchar_t Msg[1000]; + _vsnwprintf(Msg, sizeof(Msg) - 1, strFormat, args); + + va_end(args); + + this->assign(Msg); + } +}; + typedef std::list strlist; typedef strlist::iterator strlist_iter; diff --git a/Source/Common/stdafx.h b/Source/Common/stdafx.h index e601c4074..feed741db 100644 --- a/Source/Common/stdafx.h +++ b/Source/Common/stdafx.h @@ -16,3 +16,4 @@ #include "Trace.h" #include "md5.h" #include "Smart Pointer.h" +#include "SyncEvent.h" diff --git a/Source/Glide64/DepthBufferRender.cpp b/Source/Glide64/DepthBufferRender.cpp index ae4f367aa..2ed36e116 100644 --- a/Source/Glide64/DepthBufferRender.cpp +++ b/Source/Glide64/DepthBufferRender.cpp @@ -87,41 +87,17 @@ static int left_z, left_dzdy; __inline int imul16(int x, int y) // (x * y) >> 16 { - return (((long long)x) * ((long long)y)) >> 16; + return ((int64_t)x * (int64_t)y) >> 16; } __inline int imul14(int x, int y) // (x * y) >> 14 { - return (((long long)x) * ((long long)y)) >> 14; + return ((int64_t)x * (int64_t)y) >> 14; } __inline int idiv16(int x, int y) // (x << 16) / y { - //x = (((long long)x) << 16) / ((long long)y); - /* - eax = x; - ebx = y; - edx = x; - (x << 16) | () - */ -#if !defined(__GNUC__) && !defined(NO_ASM) - __asm { - mov eax, x - mov ebx, y - mov edx,eax - sar edx,16 - shl eax,16 - idiv ebx - mov x, eax - } -#elif !defined(NO_ASM) - int reminder; - asm ("idivl %[divisor]" - : "=a" (x), "=d" (reminder) - : [divisor] "g" (y), "d" (x >> 16), "a" (x << 16)); -#else - x = (((long long)x) << 16) / ((long long)y); -#endif + x = ((int64_t)x << 16) / (int64_t)y; return x; } diff --git a/Source/Glide64/Main.cpp b/Source/Glide64/Main.cpp index 07a8ecd04..ab9c4802b 100644 --- a/Source/Glide64/Main.cpp +++ b/Source/Glide64/Main.cpp @@ -37,9 +37,9 @@ // //**************************************************************** +#include #include "Gfx_1.3.h" #include "Version.h" -#include #include #include @@ -1197,7 +1197,7 @@ int DllUnload(void) void wxSetInstance(HINSTANCE hInstance); extern "C" int WINAPI DllMain (HINSTANCE hinst, - wxUint32 fdwReason, + DWORD fdwReason, LPVOID /*lpReserved*/) { sprintf (out_buf, "DllMain (%0p - %d)\n", hinst, fdwReason); diff --git a/Source/Glide64/rdp.h b/Source/Glide64/rdp.h index 9dfa8d7b0..64d6e7804 100644 --- a/Source/Glide64/rdp.h +++ b/Source/Glide64/rdp.h @@ -830,12 +830,20 @@ extern const char *CIStatus[]; #define FBL_D_1 2 #define FBL_D_0 3 +/* + * taken straight from MSVC in case of other compilers + * + * Careful! These macros can sabotage std::max and std::min from . + * The only solution is to include first, before or + * before defining the below macros (or just don't use ). + */ #ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define max(a, b) (((a) > (b)) ? (a) : (b)) #endif #ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) +#define min(a, b) (((a) < (b)) ? (a) : (b)) #endif + #ifndef TRUE #define TRUE 1 #endif diff --git a/Source/Installer/Installer.iss b/Source/Installer/Installer.iss index b5d9a4e49..dcf06ef5c 100644 --- a/Source/Installer/Installer.iss +++ b/Source/Installer/Installer.iss @@ -3,7 +3,7 @@ [Setup] AppId={{BEB5FB69-4080-466F-96C4-F15DF271718B} -AppName=Project 64 +AppName=Project64 AppVersion={#AppVersion} DefaultDirName={pf}\Project64 2.2 VersionInfoVersion={#AppVersion} @@ -19,7 +19,7 @@ UninstallDisplayIcon={uninstallexe} SetupIconFile={#BaseDir}\Source\Project64\User Interface\Icons\pj64.ico [Run] -Filename: "{app}\Project64.exe"; Description: "{cm:LaunchProgram,{#StringChange('Project 64', '&', '&&')}}"; Flags: nowait postinstall skipifsilent +Filename: "{app}\Project64.exe"; Description: "{cm:LaunchProgram,{#StringChange('Project64', '&', '&&')}}"; Flags: nowait postinstall skipifsilent [Files] Source: "{#BaseDir}\Bin\{#Configuration}\Project64.exe"; DestDir: "{app}"; Flags: ignoreversion @@ -42,9 +42,9 @@ Name: "{app}\Screenshots"; Permissions: users-modify Name: "{app}\Textures"; Permissions: users-modify [Icons] -Name: "{commonprograms}\Project 64 2.2\Project 64"; Filename: "{app}\Project64.exe" -Name: "{commonprograms}\Project 64 2.2\Uninstall Project64 2.2"; Filename: "{uninstallexe}"; Parameters: "/LOG" -Name: "{commonprograms}\Project 64 2.2\Support"; Filename: "http://forum.pj64-emu.com" +Name: "{commonprograms}\Project64 2.2\Project64"; Filename: "{app}\Project64.exe" +Name: "{commonprograms}\Project64 2.2\Uninstall Project64 2.2"; Filename: "{uninstallexe}"; Parameters: "/LOG" +Name: "{commonprograms}\Project64 2.2\Support"; Filename: "http://forum.pj64-emu.com" [Code] function HaveCommandlineParam (inParam: String): Boolean; diff --git a/Source/Project64/AppInit.cpp b/Source/Project64/AppInit.cpp new file mode 100644 index 000000000..9937de1c9 --- /dev/null +++ b/Source/Project64/AppInit.cpp @@ -0,0 +1,139 @@ +#include "stdafx.h" +#include + +void FixDirectories(void); +void FixLocale(void); + +static void IncreaseThreadPriority(void); + +static CTraceFileLog * g_LogFile = NULL; + +void LogLevelChanged(CTraceFileLog * LogFile) +{ + LogFile->SetTraceLevel((TraceLevel)g_Settings->LoadDword(Debugger_AppLogLevel)); +} + +void LogFlushChanged(CTraceFileLog * LogFile) +{ + LogFile->SetFlushFile(g_Settings->LoadDword(Debugger_AppLogFlush) != 0); +} + +void InitializeLog(void) +{ + CPath LogFilePath(CPath::MODULE_DIRECTORY); + LogFilePath.AppendDirectory("Logs"); + if (!LogFilePath.DirectoryExists()) + { + LogFilePath.DirectoryCreate(); + } + LogFilePath.SetNameExtension("Project64.log"); + + g_LogFile = new CTraceFileLog(LogFilePath, g_Settings->LoadDword(Debugger_AppLogFlush) != 0, Log_New, 500); +#ifdef VALIDATE_DEBUG + g_LogFile->SetTraceLevel((TraceLevel)(g_Settings->LoadDword(Debugger_AppLogLevel) | TraceValidate | TraceDebug)); +#else + g_LogFile->SetTraceLevel((TraceLevel)g_Settings->LoadDword(Debugger_AppLogLevel)); +#endif + AddTraceModule(g_LogFile); + + g_Settings->RegisterChangeCB(Debugger_AppLogLevel, g_LogFile, (CSettings::SettingChangedFunc)LogLevelChanged); + g_Settings->RegisterChangeCB(Debugger_AppLogFlush, g_LogFile, (CSettings::SettingChangedFunc)LogFlushChanged); +} + +void AppInit(CNotification * Notify) +{ + try + { + g_Notify = Notify; + + FixDirectories(); + FixLocale(); + + stdstr_f AppName("Project64 %s", VER_FILE_VERSION_STR); + IncreaseThreadPriority(); + + g_Settings = new CSettings; + g_Settings->Initialize(AppName.c_str()); + + if (g_Settings->LoadBool(Setting_CheckEmuRunning) && + pjutil::TerminatedExistingExe()) + { + delete g_Settings; + g_Settings = new CSettings; + g_Settings->Initialize(AppName.c_str()); + } + + InitializeLog(); + + WriteTrace(TraceDebug, __FUNCTION__ ": Application Starting"); + CMipsMemoryVM::ReserveMemory(); + + //Create the plugin container + WriteTrace(TraceDebug, __FUNCTION__ ": Create Plugins"); + g_Plugins = new CPlugins(g_Settings->LoadStringVal(Directory_Plugin)); + + g_Lang = new CLanguage(); + g_Lang->LoadCurrentStrings(); + g_Notify->AppInitDone(); + } + catch (...) + { + g_Notify->DisplayError(stdstr_f("Exception caught\nFile: %s\nLine: %d", __FILE__, __LINE__).ToUTF16().c_str()); + } +} + +void AppCleanup(void) +{ + g_Settings->UnregisterChangeCB(Debugger_AppLogLevel, g_LogFile, (CSettings::SettingChangedFunc)LogLevelChanged); + g_Settings->UnregisterChangeCB(Debugger_AppLogFlush, g_LogFile, (CSettings::SettingChangedFunc)LogFlushChanged); + WriteTrace(TraceDebug, __FUNCTION__ ": cleaning up global objects"); + + if (g_Rom) { delete g_Rom; g_Rom = NULL; } + if (g_Plugins) { delete g_Plugins; g_Plugins = NULL; } + if (g_Settings) { delete g_Settings; g_Settings = NULL; } + if (g_Lang) { delete g_Lang; g_Lang = NULL; } + + CMipsMemoryVM::FreeReservedMemory(); + + WriteTrace(TraceDebug, __FUNCTION__ ": Done"); + CloseTrace(); +} + +void FixDirectories(void) +{ + CPath Directory(CPath::MODULE_DIRECTORY); + Directory.AppendDirectory("Config"); + if (!Directory.DirectoryExists()) Directory.DirectoryCreate(); + + Directory.UpDirectory(); + Directory.AppendDirectory("Logs"); + if (!Directory.DirectoryExists()) Directory.DirectoryCreate(); + + Directory.UpDirectory(); + Directory.AppendDirectory("Save"); + if (!Directory.DirectoryExists()) Directory.DirectoryCreate(); + + Directory.UpDirectory(); + Directory.AppendDirectory("Screenshots"); + if (!Directory.DirectoryExists()) Directory.DirectoryCreate(); + + Directory.UpDirectory(); + Directory.AppendDirectory("textures"); + if (!Directory.DirectoryExists()) Directory.DirectoryCreate(); +} + +#include +void FixLocale(void) +{ + char *lbuffer = new char[10]; + if (GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SABBREVLANGNAME, lbuffer, 10)) + { + setlocale(LC_ALL, lbuffer); + } + delete[] lbuffer; +} + +void IncreaseThreadPriority(void) +{ + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL); +} \ No newline at end of file diff --git a/Source/Project64/AppInit.h b/Source/Project64/AppInit.h new file mode 100644 index 000000000..6c62a2395 --- /dev/null +++ b/Source/Project64/AppInit.h @@ -0,0 +1,6 @@ +#pragma once + +#include + +void AppInit(CNotification * Notify); +void AppCleanup(void); diff --git a/Source/Project64/N64 System/Recompiler/Delay Slot Map Class.h b/Source/Project64/Debugger.h similarity index 65% rename from Source/Project64/N64 System/Recompiler/Delay Slot Map Class.h rename to Source/Project64/Debugger.h index d68152166..e80f8e1b6 100644 --- a/Source/Project64/N64 System/Recompiler/Delay Slot Map Class.h +++ b/Source/Project64/Debugger.h @@ -1,29 +1,16 @@ -/**************************************************************************** -* * -* Project 64 - A Nintendo 64 emulator. * -* http://www.pj64-emu.com/ * -* Copyright (C) 2012 Project64. All rights reserved. * -* * -* License: * -* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * -* * -****************************************************************************/ -#pragma once - -class CDelaySlotFunctionMap -{ - typedef std::map FUNCTION_MAP; - - FUNCTION_MAP FunctionMap; - -public: - CDelaySlotFunctionMap(); - ~CDelaySlotFunctionMap(); - - CCompiledFunc* AddFunctionInfo(DWORD vAddr, DWORD pAddr); - CCompiledFunc* FindFunction(DWORD vAddr, int Length); - CCompiledFunc* FindFunction(DWORD vAddr) const; - - void Remove(CCompiledFunc* info); - void Reset(); -}; +/**************************************************************************** +* * +* Project 64 - A Nintendo 64 emulator. * +* http://www.pj64-emu.com/ * +* Copyright (C) 2012 Project64. All rights reserved. * +* * +* License: * +* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * +* * +****************************************************************************/ +#pragma once + +__interface CDebugger +{ + virtual void TLBChanged(void) = 0; +}; diff --git a/Source/Project64/Logging.h b/Source/Project64/Logging.h new file mode 100644 index 000000000..3a98a5a06 --- /dev/null +++ b/Source/Project64/Logging.h @@ -0,0 +1,28 @@ +/**************************************************************************** +* * +* Project64 - A Nintendo 64 emulator. * +* http://www.pj64-emu.com/ * +* Copyright (C) 2012 Project64. All rights reserved. * +* * +* License: * +* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * +* * +****************************************************************************/ +#pragma once +#include +#include + +class CLogging : + public CLogSettings +{ +public: + static void StartLog(void); + static void StopLog(void); + + static void Log_LW(uint32_t PC, uint32_t VAddr); + static void Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value); + static void LogMessage(const char * Message, ...); + +private: + static CFile * m_hLogFile; +}; \ No newline at end of file diff --git a/Source/Project64/Multilanguage.h b/Source/Project64/Multilanguage.h index d0cf68ff3..9b37d1418 100644 --- a/Source/Project64/Multilanguage.h +++ b/Source/Project64/Multilanguage.h @@ -1,6 +1,6 @@ /**************************************************************************** * * -* Project 64 - A Nintendo 64 emulator. * +* Project64 - A Nintendo 64 emulator. * * http://www.pj64-emu.com/ * * Copyright (C) 2012 Project64. All rights reserved. * * * @@ -11,520 +11,521 @@ #pragma once enum LanguageStringID{ - EMPTY_STRING = 0, + EMPTY_STRING = 0, -/********************************************************************************* -* Meta Information * -*********************************************************************************/ -//About DLL - LANGUAGE_NAME = 1, - LANGUAGE_AUTHOR =2, - LANGUAGE_VERSION =3, - LANGUAGE_DATE =4, + /********************************************************************************* + * Meta Information * + *********************************************************************************/ + //About DLL + LANGUAGE_NAME = 1, + LANGUAGE_AUTHOR = 2, + LANGUAGE_VERSION = 3, + LANGUAGE_DATE = 4, -//About DLL Dialog - INI_CURRENT_LANG =5, - INI_AUTHOR =6, - INI_VERSION =7, - INI_DATE =8, - INI_HOMEPAGE =9, - INI_CURRENT_RDB =10, - INI_CURRENT_CHT =11, - INI_CURRENT_RDX =12, + //About DLL Dialog + INI_CURRENT_LANG = 5, + INI_AUTHOR = 6, + INI_VERSION = 7, + INI_DATE = 8, + INI_HOMEPAGE = 9, + INI_CURRENT_RDB = 10, + INI_CURRENT_CHT = 11, + INI_CURRENT_RDX = 12, -//About INI title - INI_TITLE =20, + //About INI title + INI_TITLE = 20, -/********************************************************************************* -* Numbers * -*********************************************************************************/ - NUMBER_0 =50, - NUMBER_1 = 51, - NUMBER_2 = 52, - NUMBER_3 = 53, - NUMBER_4 = 54, - NUMBER_5 = 55, - NUMBER_6 = 56, - NUMBER_7 = 57, - NUMBER_8 = 58, - NUMBER_9 = 59, + /********************************************************************************* + * Numbers * + *********************************************************************************/ + NUMBER_0 = 50, + NUMBER_1 = 51, + NUMBER_2 = 52, + NUMBER_3 = 53, + NUMBER_4 = 54, + NUMBER_5 = 55, + NUMBER_6 = 56, + NUMBER_7 = 57, + NUMBER_8 = 58, + NUMBER_9 = 59, -/********************************************************************************* -* Menu * -*********************************************************************************/ -//File Menu - MENU_FILE =100, - MENU_OPEN =101, - MENU_ROM_INFO =102, - MENU_START =103, - MENU_END =104, - MENU_CHOOSE_ROM =105, - MENU_REFRESH =106, - MENU_RECENT_ROM =107, - MENU_RECENT_DIR =108, - MENU_EXIT =109, + /********************************************************************************* + * Menu * + *********************************************************************************/ + //File Menu + MENU_FILE = 100, + MENU_OPEN = 101, + MENU_ROM_INFO = 102, + MENU_START = 103, + MENU_END = 104, + MENU_CHOOSE_ROM = 105, + MENU_REFRESH = 106, + MENU_RECENT_ROM = 107, + MENU_RECENT_DIR = 108, + MENU_EXIT = 109, -//System Menu - MENU_SYSTEM =120, - MENU_RESET =121, - MENU_PAUSE =122, - MENU_BITMAP =123, - MENU_LIMIT_FPS =124, - MENU_SAVE =125, - MENU_SAVE_AS =126, - MENU_RESTORE =127, - MENU_LOAD =128, - MENU_CURRENT_SAVE =129, - MENU_CHEAT =130, - MENU_GS_BUTTON =131, - MENU_RESUME =132, - MENU_RESET_SOFT =133, //added in build 1.7.50 - MENU_RESET_HARD =134, //added in build 1.7.50 + //System Menu + MENU_SYSTEM = 120, + MENU_RESET = 121, + MENU_PAUSE = 122, + MENU_BITMAP = 123, + MENU_LIMIT_FPS = 124, + MENU_SAVE = 125, + MENU_SAVE_AS = 126, + MENU_RESTORE = 127, + MENU_LOAD = 128, + MENU_CURRENT_SAVE = 129, + MENU_CHEAT = 130, + MENU_GS_BUTTON = 131, + MENU_RESUME = 132, + MENU_RESET_SOFT = 133, //added in build 1.7.50 + MENU_RESET_HARD = 134, //added in build 1.7.50 -//Options Menu - MENU_OPTIONS = 140, - MENU_FULL_SCREEN= 141, - MENU_ON_TOP = 142, - MENU_CONFG_GFX = 143, - MENU_CONFG_AUDIO= 144, - MENU_CONFG_CTRL = 145, - MENU_CONFG_RSP = 146, - MENU_SHOW_CPU = 147, - MENU_SETTINGS = 148, + //Options Menu + MENU_OPTIONS = 140, + MENU_FULL_SCREEN = 141, + MENU_ON_TOP = 142, + MENU_CONFG_GFX = 143, + MENU_CONFG_AUDIO = 144, + MENU_CONFG_CTRL = 145, + MENU_CONFG_RSP = 146, + MENU_SHOW_CPU = 147, + MENU_SETTINGS = 148, -//Debugger Menu - MENU_DEBUGGER = 160, + //Debugger Menu + MENU_DEBUGGER = 160, -//Language Menu - MENU_LANGUAGE = 175, + //Language Menu + MENU_LANGUAGE = 175, -//Help Menu - MENU_HELP = 180, - MENU_ABOUT_INI = 181, - MENU_ABOUT_PJ64 = 182, - MENU_FORUM = 183, - MENU_HOMEPAGE = 184, + //Help Menu + MENU_HELP = 180, + MENU_ABOUT_INI = 181, + MENU_ABOUT_PJ64 = 182, + MENU_FORUM = 183, + MENU_HOMEPAGE = 184, -//Current Save Slot menu - MENU_SLOT_DEFAULT = 190, - MENU_SLOT_1 = 191, - MENU_SLOT_2 = 192, - MENU_SLOT_3 = 193, - MENU_SLOT_4 = 194, - MENU_SLOT_5 = 195, - MENU_SLOT_6 = 196, - MENU_SLOT_7 = 197, - MENU_SLOT_8 = 198, - MENU_SLOT_9 = 199, - MENU_SLOT_10 = 200, + //Current Save Slot menu + MENU_SLOT_DEFAULT = 190, + MENU_SLOT_1 = 191, + MENU_SLOT_2 = 192, + MENU_SLOT_3 = 193, + MENU_SLOT_4 = 194, + MENU_SLOT_5 = 195, + MENU_SLOT_6 = 196, + MENU_SLOT_7 = 197, + MENU_SLOT_8 = 198, + MENU_SLOT_9 = 199, + MENU_SLOT_10 = 200, + MENU_SLOT_SAVE = 201, -//Pop up Menu - POPUP_PLAY = 210, - POPUP_INFO = 211, - POPUP_SETTINGS = 212, - POPUP_CHEATS = 213, - POPUP_GFX_PLUGIN = 214, + //Pop up Menu + POPUP_PLAY = 210, + POPUP_INFO = 211, + POPUP_SETTINGS = 212, + POPUP_CHEATS = 213, + POPUP_GFX_PLUGIN = 214, -//selecting save slot - SAVE_SLOT_DEFAULT = 220, - SAVE_SLOT_1 = 221, - SAVE_SLOT_2 = 222, - SAVE_SLOT_3 = 223, - SAVE_SLOT_4 = 224, - SAVE_SLOT_5 = 225, - SAVE_SLOT_6 = 226, - SAVE_SLOT_7 = 227, - SAVE_SLOT_8 = 228, - SAVE_SLOT_9 = 229, - SAVE_SLOT_10 = 230, + //selecting save slot + SAVE_SLOT_DEFAULT = 220, + SAVE_SLOT_1 = 221, + SAVE_SLOT_2 = 222, + SAVE_SLOT_3 = 223, + SAVE_SLOT_4 = 224, + SAVE_SLOT_5 = 225, + SAVE_SLOT_6 = 226, + SAVE_SLOT_7 = 227, + SAVE_SLOT_8 = 228, + SAVE_SLOT_9 = 229, + SAVE_SLOT_10 = 230, -// Menu Descriptions (TODO: unused ? implement or remove) - MENUDES_OPEN = 250, - MENUDES_ROM_INFO = 251, - MENUDES_START = 252, - MENUDES_END = 253, - MENUDES_CHOOSE_ROM = 254, - MENUDES_REFRESH = 255, - MENUDES_EXIT = 256, - MENUDES_RESET = 257, - MENUDES_PAUSE = 258, - MENUDES_BITMAP = 259, - MENUDES_LIMIT_FPS = 260, - MENUDES_SAVE = 261, - MENUDES_SAVE_AS = 262, - MENUDES_RESTORE = 263, - MENUDES_LOAD = 264, - MENUDES_CHEAT = 265, - MENUDES_GS_BUTTON = 266, - MENUDES_FULL_SCREEN = 267, - MENUDES_ON_TOP = 268, - MENUDES_CONFG_GFX = 269, - MENUDES_CONFG_AUDIO = 270, - MENUDES_CONFG_CTRL = 271, - MENUDES_CONFG_RSP = 272, - MENUDES_SHOW_CPU = 273, - MENUDES_SETTINGS = 274, - MENUDES_USER_MAN = 275, - MENUDES_GAME_FAQ = 276, - MENUDES_ABOUT_INI = 277, - MENUDES_ABOUT_PJ64 = 278, - MENUDES_RECENT_ROM = 279, - MENUDES_RECENT_DIR = 280, - MENUDES_LANGUAGES = 281, - MENUDES_GAME_SLOT = 282, - MENUDES_PLAY_GAME = 283, - MENUDES_GAME_INFO = 284, - MENUDES_GAME_SETTINGS= 285, - MENUDES_GAME_CHEATS = 286, + // Menu Descriptions (TODO: unused ? implement or remove) + MENUDES_OPEN = 250, + MENUDES_ROM_INFO = 251, + MENUDES_START = 252, + MENUDES_END = 253, + MENUDES_CHOOSE_ROM = 254, + MENUDES_REFRESH = 255, + MENUDES_EXIT = 256, + MENUDES_RESET = 257, + MENUDES_PAUSE = 258, + MENUDES_BITMAP = 259, + MENUDES_LIMIT_FPS = 260, + MENUDES_SAVE = 261, + MENUDES_SAVE_AS = 262, + MENUDES_RESTORE = 263, + MENUDES_LOAD = 264, + MENUDES_CHEAT = 265, + MENUDES_GS_BUTTON = 266, + MENUDES_FULL_SCREEN = 267, + MENUDES_ON_TOP = 268, + MENUDES_CONFG_GFX = 269, + MENUDES_CONFG_AUDIO = 270, + MENUDES_CONFG_CTRL = 271, + MENUDES_CONFG_RSP = 272, + MENUDES_SHOW_CPU = 273, + MENUDES_SETTINGS = 274, + MENUDES_USER_MAN = 275, + MENUDES_GAME_FAQ = 276, + MENUDES_ABOUT_INI = 277, + MENUDES_ABOUT_PJ64 = 278, + MENUDES_RECENT_ROM = 279, + MENUDES_RECENT_DIR = 280, + MENUDES_LANGUAGES = 281, + MENUDES_GAME_SLOT = 282, + MENUDES_PLAY_GAME = 283, + MENUDES_GAME_INFO = 284, + MENUDES_GAME_SETTINGS = 285, + MENUDES_GAME_CHEATS = 286, -/********************************************************************************* -* Rom Browser * -*********************************************************************************/ -//Rom Browser Fields - RB_FILENAME = 300, - RB_INTERNALNAME = 301, - RB_GOODNAME = 302, - RB_STATUS = 303, - RB_ROMSIZE = 304, - RB_NOTES_CORE = 305, - RB_NOTES_PLUGIN = 306, - RB_NOTES_USER = 307, - RB_CART_ID = 308, - RB_MANUFACTUER = 309, - RB_COUNTRY = 310, - RB_DEVELOPER = 311, - RB_CRC1 = 312, - RB_CRC2 = 313, - RB_CICCHIP = 314, - RB_RELEASE_DATE = 315, - RB_GENRE = 316, - RB_PLAYERS = 317, - RB_FORCE_FEEDBACK = 318, - RB_FILE_FORMAT = 319, + /********************************************************************************* + * Rom Browser * + *********************************************************************************/ + //Rom Browser Fields + RB_FILENAME = 300, + RB_INTERNALNAME = 301, + RB_GOODNAME = 302, + RB_STATUS = 303, + RB_ROMSIZE = 304, + RB_NOTES_CORE = 305, + RB_NOTES_PLUGIN = 306, + RB_NOTES_USER = 307, + RB_CART_ID = 308, + RB_MANUFACTUER = 309, + RB_COUNTRY = 310, + RB_DEVELOPER = 311, + RB_CRC1 = 312, + RB_CRC2 = 313, + RB_CICCHIP = 314, + RB_RELEASE_DATE = 315, + RB_GENRE = 316, + RB_PLAYERS = 317, + RB_FORCE_FEEDBACK = 318, + RB_FILE_FORMAT = 319, -//Select Rom - SELECT_ROM_DIR = 320, + //Select Rom + SELECT_ROM_DIR = 320, -//Messages - RB_NOT_GOOD_FILE = 340, + //Messages + RB_NOT_GOOD_FILE = 340, -/********************************************************************************* -* Options * -*********************************************************************************/ -//Options Title - OPTIONS_TITLE = 400, + /********************************************************************************* + * Options * + *********************************************************************************/ + //Options Title + OPTIONS_TITLE = 400, -//Tabs - TAB_PLUGIN = 401, - TAB_DIRECTORY = 402, - TAB_OPTIONS = 403, - TAB_ROMSELECTION = 404, - TAB_ADVANCED = 405, - TAB_ROMSETTINGS = 406, - TAB_SHELLINTERGATION= 407, - TAB_ROMNOTES = 408, - TAB_SHORTCUTS = 409, - TAB_ROMSTATUS = 410, - TAB_RECOMPILER = 411, //Added in 1.7.0.50 + //Tabs + TAB_PLUGIN = 401, + TAB_DIRECTORY = 402, + TAB_OPTIONS = 403, + TAB_ROMSELECTION = 404, + TAB_ADVANCED = 405, + TAB_ROMSETTINGS = 406, + TAB_SHELLINTERGATION = 407, + TAB_ROMNOTES = 408, + TAB_SHORTCUTS = 409, + TAB_ROMSTATUS = 410, + TAB_RECOMPILER = 411, //Added in 1.7.0.50 -//Plugin Dialog - PLUG_ABOUT = 420, - PLUG_RSP = 421, - PLUG_GFX = 422, - PLUG_AUDIO = 423, - PLUG_CTRL = 424, - PLUG_HLE_GFX = 425, - PLUG_HLE_AUDIO = 426, - PLUG_DEFAULT = 427, + //Plugin Dialog + PLUG_ABOUT = 420, + PLUG_RSP = 421, + PLUG_GFX = 422, + PLUG_AUDIO = 423, + PLUG_CTRL = 424, + PLUG_HLE_GFX = 425, + PLUG_HLE_AUDIO = 426, + PLUG_DEFAULT = 427, -//Directory Dialog - DIR_PLUGIN = 440, - DIR_ROM = 441, - DIR_AUTO_SAVE = 442, - DIR_INSTANT_SAVE = 443, - DIR_SCREEN_SHOT = 444, - DIR_ROM_DEFAULT = 445, - DIR_SELECT_PLUGIN = 446, - DIR_SELECT_ROM = 447, - DIR_SELECT_AUTO = 448, - DIR_SELECT_INSTANT = 449, - DIR_SELECT_SCREEN = 450, - DIR_TEXTURE = 451, - DIR_SELECT_TEXTURE = 452, + //Directory Dialog + DIR_PLUGIN = 440, + DIR_ROM = 441, + DIR_AUTO_SAVE = 442, + DIR_INSTANT_SAVE = 443, + DIR_SCREEN_SHOT = 444, + DIR_ROM_DEFAULT = 445, + DIR_SELECT_PLUGIN = 446, + DIR_SELECT_ROM = 447, + DIR_SELECT_AUTO = 448, + DIR_SELECT_INSTANT = 449, + DIR_SELECT_SCREEN = 450, + DIR_TEXTURE = 451, + DIR_SELECT_TEXTURE = 452, -//Options (general) Tab - OPTION_AUTO_SLEEP =460, - OPTION_AUTO_FULLSCREEN =461, - OPTION_BASIC_MODE =462, - OPTION_REMEMBER_CHEAT =463, - OPTION_DISABLE_SS =464, - OPTION_DISPLAY_FR =465, - OPTION_CHANGE_FR =466, - OPTION_CHECK_RUNNING =467, + //Options (general) Tab + OPTION_AUTO_SLEEP = 460, + OPTION_AUTO_FULLSCREEN = 461, + OPTION_BASIC_MODE = 462, + OPTION_REMEMBER_CHEAT = 463, + OPTION_DISABLE_SS = 464, + OPTION_DISPLAY_FR = 465, + OPTION_CHANGE_FR = 466, + OPTION_CHECK_RUNNING = 467, -//Rom Browser Tab - RB_MAX_ROMS = 480, - RB_ROMS = 481, - RB_MAX_DIRS = 482, - RB_DIRS = 483, - RB_USE = 484, - RB_DIR_RECURSION = 485, - RB_AVALIABLE_FIELDS = 486, - RB_SHOW_FIELDS = 487, - RB_ADD = 488, - RB_REMOVE = 489, - RB_UP = 490, - RB_DOWN = 491, - RB_REFRESH = 492, + //Rom Browser Tab + RB_MAX_ROMS = 480, + RB_ROMS = 481, + RB_MAX_DIRS = 482, + RB_DIRS = 483, + RB_USE = 484, + RB_DIR_RECURSION = 485, + RB_AVALIABLE_FIELDS = 486, + RB_SHOW_FIELDS = 487, + RB_ADD = 488, + RB_REMOVE = 489, + RB_UP = 490, + RB_DOWN = 491, + RB_REFRESH = 492, -//Advanced Options - ADVANCE_INFO = 500, - ADVANCE_DEFAULTS = 501, - ADVANCE_CPU_STYLE = 502, - ADVANCE_SMCM = 503, - ADVANCE_MEM_SIZE = 504, - ADVANCE_ABL = 505, - ADVANCE_AUTO_START = 506, - ADVANCE_OVERWRITE = 507, - ADVANCE_COMPRESS = 508, - ADVANCE_DEBUGGER = 509, - ADVANCE_SMM_CACHE = 510, - ADVANCE_SMM_PIDMA = 511, - ADVANCE_SMM_VALIDATE= 512, - ADVANCE_SMM_PROTECT = 513, - ADVANCE_SMM_TLB = 514, + //Advanced Options + ADVANCE_INFO = 500, + ADVANCE_DEFAULTS = 501, + ADVANCE_CPU_STYLE = 502, + ADVANCE_SMCM = 503, + ADVANCE_MEM_SIZE = 504, + ADVANCE_ABL = 505, + ADVANCE_AUTO_START = 506, + ADVANCE_OVERWRITE = 507, + ADVANCE_COMPRESS = 508, + ADVANCE_DEBUGGER = 509, + ADVANCE_SMM_CACHE = 510, + ADVANCE_SMM_PIDMA = 511, + ADVANCE_SMM_VALIDATE = 512, + ADVANCE_SMM_PROTECT = 513, + ADVANCE_SMM_TLB = 514, -//Rom Options - ROM_CPU_STYLE = 520, - ROM_VIREFRESH = 521, - ROM_MEM_SIZE = 522, - ROM_ABL = 523, - ROM_SAVE_TYPE = 524, - ROM_COUNTER_FACTOR = 525, - ROM_LARGE_BUFFER = 526, - ROM_USE_TLB = 527, - ROM_REG_CACHE = 528, - ROM_DELAY_SI = 529, - ROM_FAST_SP = 530, - ROM_DEFAULT = 531, - ROM_AUDIO_SIGNAL = 532, - ROM_FIXED_AUDIO = 533, - ROM_FUNC_FIND = 534, - ROM_CUSTOM_SMM = 535, - ROM_SYNC_AUDIO = 536, - ROM_COUNTPERBYTE = 537, - ROM_32BIT = 538, - ROM_DELAY_DP = 539, + //Rom Options + ROM_CPU_STYLE = 520, + ROM_VIREFRESH = 521, + ROM_MEM_SIZE = 522, + ROM_ABL = 523, + ROM_SAVE_TYPE = 524, + ROM_COUNTER_FACTOR = 525, + ROM_LARGE_BUFFER = 526, + ROM_USE_TLB = 527, + ROM_REG_CACHE = 528, + ROM_DELAY_SI = 529, + ROM_FAST_SP = 530, + ROM_DEFAULT = 531, + ROM_AUDIO_SIGNAL = 532, + ROM_FIXED_AUDIO = 533, + ROM_FUNC_FIND = 534, + ROM_CUSTOM_SMM = 535, + ROM_SYNC_AUDIO = 536, + ROM_COUNTPERBYTE = 537, + ROM_32BIT = 538, + ROM_DELAY_DP = 539, -//Core Styles - CORE_INTERPTER = 540, - CORE_RECOMPILER = 541, - CORE_SYNC = 542, + //Core Styles + CORE_INTERPTER = 540, + CORE_RECOMPILER = 541, + CORE_SYNC = 542, -//Self Mod Methods - SMCM_NONE = 560, - SMCM_CACHE = 561, - SMCM_PROECTED = 562, - SMCM_CHECK_MEM = 563, - SMCM_CHANGE_MEM = 564, - SMCM_CHECK_ADV = 565, - SMCM_CACHE2 = 566, + //Self Mod Methods + SMCM_NONE = 560, + SMCM_CACHE = 561, + SMCM_PROECTED = 562, + SMCM_CHECK_MEM = 563, + SMCM_CHANGE_MEM = 564, + SMCM_CHECK_ADV = 565, + SMCM_CACHE2 = 566, -//Function Lookup memthod - FLM_PLOOKUP = 570, - FLM_VLOOKUP = 571, - FLM_CHANGEMEM = 572, + //Function Lookup memthod + FLM_PLOOKUP = 570, + FLM_VLOOKUP = 571, + FLM_CHANGEMEM = 572, -//RDRAM Size - RDRAM_4MB = 580, - RDRAM_8MB = 581, + //RDRAM Size + RDRAM_4MB = 580, + RDRAM_8MB = 581, -//Advanced Block Linking - ABL_ON = 600, - ABL_OFF = 601, + //Advanced Block Linking + ABL_ON = 600, + ABL_OFF = 601, -//Save Type - SAVE_FIRST_USED = 620, - SAVE_4K_EEPROM = 621, - SAVE_16K_EEPROM = 622, - SAVE_SRAM = 623, - SAVE_FLASHRAM = 624, + //Save Type + SAVE_FIRST_USED = 620, + SAVE_4K_EEPROM = 621, + SAVE_16K_EEPROM = 622, + SAVE_SRAM = 623, + SAVE_FLASHRAM = 624, -//Shell Integration Tab - SHELL_TEXT = 640, + //Shell Integration Tab + SHELL_TEXT = 640, -//Rom Notes - NOTE_STATUS = 660, - NOTE_CORE = 661, - NOTE_PLUGIN = 662, + //Rom Notes + NOTE_STATUS = 660, + NOTE_CORE = 661, + NOTE_PLUGIN = 662, -// Accelerator Selector - ACCEL_CPUSTATE_TITLE = 680, - ACCEL_MENUITEM_TITLE = 681, - ACCEL_CURRENTKEYS_TITLE = 682, - ACCEL_SELKEY_TITLE = 683, - ACCEL_ASSIGNEDTO_TITLE = 684, - ACCEL_ASSIGN_BTN = 685, - ACCEL_REMOVE_BTN = 686, - ACCEL_RESETALL_BTN = 687, - ACCEL_CPUSTATE_1 = 688, - ACCEL_CPUSTATE_2 = 689, - ACCEL_CPUSTATE_3 = 690, - ACCEL_CPUSTATE_4 = 691, - ACCEL_DETECTKEY = 692, + // Accelerator Selector + ACCEL_CPUSTATE_TITLE = 680, + ACCEL_MENUITEM_TITLE = 681, + ACCEL_CURRENTKEYS_TITLE = 682, + ACCEL_SELKEY_TITLE = 683, + ACCEL_ASSIGNEDTO_TITLE = 684, + ACCEL_ASSIGN_BTN = 685, + ACCEL_REMOVE_BTN = 686, + ACCEL_RESETALL_BTN = 687, + ACCEL_CPUSTATE_1 = 688, + ACCEL_CPUSTATE_2 = 689, + ACCEL_CPUSTATE_3 = 690, + ACCEL_CPUSTATE_4 = 691, + ACCEL_DETECTKEY = 692, -// Frame Rate Option - STR_FR_VIS = 700, - STR_FR_DLS = 701, - STR_FR_PERCENT = 702, + // Frame Rate Option + STR_FR_VIS = 700, + STR_FR_DLS = 701, + STR_FR_PERCENT = 702, -// Increase speed - STR_INSREASE_SPEED = 710, - STR_DECREASE_SPEED = 711, + // Increase speed + STR_INSREASE_SPEED = 710, + STR_DECREASE_SPEED = 711, -//Bottom page buttons - BOTTOM_RESET_PAGE = 720, - BOTTOM_RESET_ALL = 721, - BOTTOM_APPLY = 722, - BOTTOM_CLOSE = 723, + //Bottom page buttons + BOTTOM_RESET_PAGE = 720, + BOTTOM_RESET_ALL = 721, + BOTTOM_APPLY = 722, + BOTTOM_CLOSE = 723, -/********************************************************************************* -* ROM Information * -*********************************************************************************/ -//Rom Info Title Title - INFO_TITLE = 800, + /********************************************************************************* + * ROM Information * + *********************************************************************************/ + //Rom Info Title Title + INFO_TITLE = 800, -//Rom Info Text - INFO_ROM_NAME_TEXT = 801, - INFO_FILE_NAME_TEXT = 802, - INFO_LOCATION_TEXT = 803, - INFO_SIZE_TEXT = 804, - INFO_CART_ID_TEXT = 805, - INFO_MANUFACTURER_TEXT= 806, - INFO_COUNTRY_TEXT = 807, - INFO_CRC1_TEXT = 808, - INFO_CRC2_TEXT = 809, - INFO_CIC_CHIP_TEXT = 810, - INFO_MD5_TEXT = 811, + //Rom Info Text + INFO_ROM_NAME_TEXT = 801, + INFO_FILE_NAME_TEXT = 802, + INFO_LOCATION_TEXT = 803, + INFO_SIZE_TEXT = 804, + INFO_CART_ID_TEXT = 805, + INFO_MANUFACTURER_TEXT = 806, + INFO_COUNTRY_TEXT = 807, + INFO_CRC1_TEXT = 808, + INFO_CRC2_TEXT = 809, + INFO_CIC_CHIP_TEXT = 810, + INFO_MD5_TEXT = 811, -/********************************************************************************* -* Cheats * -*********************************************************************************/ -//Cheat List - CHEAT_TITLE = 1000, - CHEAT_LIST_FRAME = 1001, - CHEAT_NOTES_FRAME = 1002, - CHEAT_MARK_ALL = 1003, - CHEAT_MARK_NONE = 1004, + /********************************************************************************* + * Cheats * + *********************************************************************************/ + //Cheat List + CHEAT_TITLE = 1000, + CHEAT_LIST_FRAME = 1001, + CHEAT_NOTES_FRAME = 1002, + CHEAT_MARK_ALL = 1003, + CHEAT_MARK_NONE = 1004, -//Add Cheat - CHEAT_ADDCHEAT_FRAME =1005, - CHEAT_ADDCHEAT_NAME =1006, - CHEAT_ADDCHEAT_CODE = 1007, - CHEAT_ADDCHEAT_INSERT= 1008, - CHEAT_ADDCHEAT_CLEAR= 1009, - CHEAT_ADDCHEAT_NOTES= 1010, - CHEAT_ADD_TO_DB = 1011, + //Add Cheat + CHEAT_ADDCHEAT_FRAME = 1005, + CHEAT_ADDCHEAT_NAME = 1006, + CHEAT_ADDCHEAT_CODE = 1007, + CHEAT_ADDCHEAT_INSERT = 1008, + CHEAT_ADDCHEAT_CLEAR = 1009, + CHEAT_ADDCHEAT_NOTES = 1010, + CHEAT_ADD_TO_DB = 1011, -//Code extension - CHEAT_CODE_EXT_TITLE =1012, - CHEAT_CODE_EXT_TXT =1013, - CHEAT_OK =1014, - CHEAT_CANCEL =1015, + //Code extension + CHEAT_CODE_EXT_TITLE = 1012, + CHEAT_CODE_EXT_TXT = 1013, + CHEAT_OK = 1014, + CHEAT_CANCEL = 1015, -//Digital Value - CHEAT_QUANTITY_TITLE =1016, - CHEAT_CHOOSE_VALUE =1017, - CHEAT_VALUE =1018, - CHEAT_FROM =1019, - CHEAT_TO =1020, - CHEAT_NOTES =1021, - CHEAT_ADDCHEAT_ADD = 1022, - CHEAT_ADDCHEAT_NEW = 1023, - CHEAT_ADDCHEAT_CODEDES =1024, - CHEAT_ADDCHEAT_OPT =1025, - CHEAT_ADDCHEAT_OPTDES =1026, + //Digital Value + CHEAT_QUANTITY_TITLE = 1016, + CHEAT_CHOOSE_VALUE = 1017, + CHEAT_VALUE = 1018, + CHEAT_FROM = 1019, + CHEAT_TO = 1020, + CHEAT_NOTES = 1021, + CHEAT_ADDCHEAT_ADD = 1022, + CHEAT_ADDCHEAT_NEW = 1023, + CHEAT_ADDCHEAT_CODEDES = 1024, + CHEAT_ADDCHEAT_OPT = 1025, + CHEAT_ADDCHEAT_OPTDES = 1026, -//Edit Cheat - CHEAT_EDITCHEAT_WINDOW =1027, - CHEAT_EDITCHEAT_UPDATE =1028, - CHEAT_CHANGED_MSG =1029, - CHEAT_CHANGED_TITLE =1030, + //Edit Cheat + CHEAT_EDITCHEAT_WINDOW = 1027, + CHEAT_EDITCHEAT_UPDATE = 1028, + CHEAT_CHANGED_MSG = 1029, + CHEAT_CHANGED_TITLE = 1030, -//Cheat Popup Menu - CHEAT_ADDNEW =1040, - CHEAT_EDIT = 1041, - CHEAT_DELETE = 1042, + //Cheat Popup Menu + CHEAT_ADDNEW = 1040, + CHEAT_EDIT = 1041, + CHEAT_DELETE = 1042, -// short cut editor - STR_SHORTCUT_RESET_TITLE = 1100, - STR_SHORTCUT_RESET_TEXT = 1101, - STR_SHORTCUT_FILEMENU = 1102, - STR_SHORTCUT_SYSTEMMENU = 1103, - STR_SHORTCUT_OPTIONS = 1104, - STR_SHORTCUT_SAVESLOT = 1105, + // short cut editor + STR_SHORTCUT_RESET_TITLE = 1100, + STR_SHORTCUT_RESET_TEXT = 1101, + STR_SHORTCUT_FILEMENU = 1102, + STR_SHORTCUT_SYSTEMMENU = 1103, + STR_SHORTCUT_OPTIONS = 1104, + STR_SHORTCUT_SAVESLOT = 1105, -/********************************************************************************* -* Messages * -*********************************************************************************/ - MSG_CPU_PAUSED = 2000, - MSG_CPU_RESUMED = 2001, - MSG_PERM_LOOP = 2002, - MSG_MEM_ALLOC_ERROR = 2003, - MSG_FAIL_INIT_GFX = 2004, - MSG_FAIL_INIT_AUDIO = 2005, - MSG_FAIL_INIT_RSP = 2006, - MSG_FAIL_INIT_CONTROL = 2007, - MSG_FAIL_LOAD_PLUGIN = 2008, - MSG_FAIL_LOAD_WORD = 2009, - MSG_FAIL_OPEN_SAVE = 2010, - MSG_FAIL_OPEN_EEPROM = 2011, - MSG_FAIL_OPEN_FLASH = 2012, - MSG_FAIL_OPEN_MEMPAK = 2013, - MSG_FAIL_OPEN_ZIP = 2014, - MSG_FAIL_OPEN_IMAGE = 2015, - MSG_FAIL_ZIP = 2016, - MSG_FAIL_IMAGE = 2017, - MSG_UNKNOWN_COUNTRY = 2018, - MSG_UNKNOWN_CIC_CHIP = 2019, - MSG_UNKNOWN_FILE_FORMAT= 2020, - MSG_UNKNOWN_MEM_ACTION = 2021, - MSG_UNHANDLED_OP = 2022, - MSG_NONMAPPED_SPACE = 2023, - MSG_SAVE_STATE_HEADER = 2024, - MSG_MSGBOX_TITLE =2025, - MSG_PIF2_ERROR = 2026, - MSG_PIF2_TITLE = 2027, - MSG_PLUGIN_CHANGE = 2028, - MSG_PLUGIN_CHANGE_TITLE= 2029, - MSG_EMULATION_ENDED = 2030, - MSG_EMULATION_STARTED = 2031, - MSG_UNABLED_LOAD_STATE = 2032, - MSG_LOADED_STATE = 2033, - MSG_SAVED_STATE = 2034, - MSG_SAVE_SLOT = 2035, - MSG_BYTESWAP =2036, - MSG_CHOOSE_IMAGE = 2037, - MSG_LOADED = 2038, - MSG_LOADING = 2039, - MSG_PLUGIN_NOT_INIT = 2040, - MSG_DEL_SURE = 2041, - MSG_DEL_TITLE = 2042, - MSG_CHEAT_NAME_IN_USE = 2043, - MSG_MAX_CHEATS = 2044, - MSG_PLUGIN_INIT = 2045, //Added in pj64 1.6 - MSG_NO_SHORTCUT_SEL = 2046, //Added in pj64 1.6 - MSG_NO_MENUITEM_SEL = 2047, //Added in pj64 1.6 - MSG_MENUITEM_ASSIGNED = 2048, //Added in pj64 1.6 - MSG_NO_SEL_SHORTCUT = 2049, //Added in pj64 1.6 - MSG_WAITING_FOR_START = 2050, //Added in pj64 1.7 - MSG_INVALID_EXE = 2051, //Added in pj64 1.7 - MSG_INVALID_EXE_TITLE = 2052, //Added in pj64 1.7 - MSG_7Z_FILE_NOT_FOUND = 2053, //Added in pj64 1.7 - MSG_SET_LLE_GFX_TITLE = 2054, //Added in pj64 1.7 - MSG_SET_LLE_GFX_MSG = 2055, //Added in pj64 1.7 - MSG_SET_HLE_AUD_TITLE = 2056, //Added in pj64 1.7 - MSG_SET_HLE_AUD_MSG = 2057, //Added in pj64 1.7 + /********************************************************************************* + * Messages * + *********************************************************************************/ + MSG_CPU_PAUSED = 2000, + MSG_CPU_RESUMED = 2001, + MSG_PERM_LOOP = 2002, + MSG_MEM_ALLOC_ERROR = 2003, + MSG_FAIL_INIT_GFX = 2004, + MSG_FAIL_INIT_AUDIO = 2005, + MSG_FAIL_INIT_RSP = 2006, + MSG_FAIL_INIT_CONTROL = 2007, + MSG_FAIL_LOAD_PLUGIN = 2008, + MSG_FAIL_LOAD_WORD = 2009, + MSG_FAIL_OPEN_SAVE = 2010, + MSG_FAIL_OPEN_EEPROM = 2011, + MSG_FAIL_OPEN_FLASH = 2012, + MSG_FAIL_OPEN_MEMPAK = 2013, + MSG_FAIL_OPEN_ZIP = 2014, + MSG_FAIL_OPEN_IMAGE = 2015, + MSG_FAIL_ZIP = 2016, + MSG_FAIL_IMAGE = 2017, + MSG_UNKNOWN_COUNTRY = 2018, + MSG_UNKNOWN_CIC_CHIP = 2019, + MSG_UNKNOWN_FILE_FORMAT = 2020, + MSG_UNKNOWN_MEM_ACTION = 2021, + MSG_UNHANDLED_OP = 2022, + MSG_NONMAPPED_SPACE = 2023, + MSG_SAVE_STATE_HEADER = 2024, + MSG_MSGBOX_TITLE = 2025, + MSG_PIF2_ERROR = 2026, + MSG_PIF2_TITLE = 2027, + MSG_PLUGIN_CHANGE = 2028, + MSG_PLUGIN_CHANGE_TITLE = 2029, + MSG_EMULATION_ENDED = 2030, + MSG_EMULATION_STARTED = 2031, + MSG_UNABLED_LOAD_STATE = 2032, + MSG_LOADED_STATE = 2033, + MSG_SAVED_STATE = 2034, + MSG_SAVE_SLOT = 2035, + MSG_BYTESWAP = 2036, + MSG_CHOOSE_IMAGE = 2037, + MSG_LOADED = 2038, + MSG_LOADING = 2039, + MSG_PLUGIN_NOT_INIT = 2040, + MSG_DEL_SURE = 2041, + MSG_DEL_TITLE = 2042, + MSG_CHEAT_NAME_IN_USE = 2043, + MSG_MAX_CHEATS = 2044, + MSG_PLUGIN_INIT = 2045, //Added in pj64 1.6 + MSG_NO_SHORTCUT_SEL = 2046, //Added in pj64 1.6 + MSG_NO_MENUITEM_SEL = 2047, //Added in pj64 1.6 + MSG_MENUITEM_ASSIGNED = 2048, //Added in pj64 1.6 + MSG_NO_SEL_SHORTCUT = 2049, //Added in pj64 1.6 + MSG_WAITING_FOR_START = 2050, //Added in pj64 1.7 + MSG_INVALID_EXE = 2051, //Added in pj64 1.7 + MSG_INVALID_EXE_TITLE = 2052, //Added in pj64 1.7 + MSG_7Z_FILE_NOT_FOUND = 2053, //Added in pj64 1.7 + MSG_SET_LLE_GFX_TITLE = 2054, //Added in pj64 1.7 + MSG_SET_LLE_GFX_MSG = 2055, //Added in pj64 1.7 + MSG_SET_HLE_AUD_TITLE = 2056, //Added in pj64 1.7 + MSG_SET_HLE_AUD_MSG = 2057, //Added in pj64 1.7 }; #include ".\\Multilanguage\Language Class.h" diff --git a/Source/Project64/Multilanguage/Language Class.cpp b/Source/Project64/Multilanguage/Language Class.cpp index d9ba7ca31..0321de0fc 100644 --- a/Source/Project64/Multilanguage/Language Class.cpp +++ b/Source/Project64/Multilanguage/Language Class.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * * -* Project 64 - A Nintendo 64 emulator. * +* Project64 - A Nintendo 64 emulator. * * http://www.pj64-emu.com/ * * Copyright (C) 2012 Project64. All rights reserved. * * * @@ -14,499 +14,500 @@ CLanguage * g_Lang = NULL; -void CLanguage::LoadDefaultStrings (void) +void CLanguage::LoadDefaultStrings(void) { #define DEF_STR(ID,str) m_DefaultStrings.insert(LANG_STRINGS::value_type(ID,str)) - DEF_STR(EMPTY_STRING, L"" ); + DEF_STR(EMPTY_STRING, L""); /********************************************************************************* * Meta Information * *********************************************************************************/ //About DLL - DEF_STR(LANGUAGE_NAME, L"" ); - DEF_STR(LANGUAGE_AUTHOR, L"" ); - DEF_STR(LANGUAGE_VERSION, L"" ); - DEF_STR(LANGUAGE_DATE, L"" ); + DEF_STR(LANGUAGE_NAME, L""); + DEF_STR(LANGUAGE_AUTHOR, L""); + DEF_STR(LANGUAGE_VERSION, L""); + DEF_STR(LANGUAGE_DATE, L""); //About DLL Dialog - DEF_STR(INI_CURRENT_LANG, L"Current Language" ); - DEF_STR(INI_AUTHOR, L"Author" ); - DEF_STR(INI_VERSION, L"Version" ); - DEF_STR(INI_DATE, L"Date" ); - DEF_STR(INI_HOMEPAGE, L"Visit Home Page" ); - DEF_STR(INI_CURRENT_RDB, L"ROM Database (.RDB)" ); - DEF_STR(INI_CURRENT_CHT, L"Cheat Code File (.CHT)" ); - DEF_STR(INI_CURRENT_RDX, L"Extended ROM Info (.RDX)"); + DEF_STR(INI_CURRENT_LANG, L"Current Language"); + DEF_STR(INI_AUTHOR, L"Author"); + DEF_STR(INI_VERSION, L"Version"); + DEF_STR(INI_DATE, L"Date"); + DEF_STR(INI_HOMEPAGE, L"Visit Home Page"); + DEF_STR(INI_CURRENT_RDB, L"ROM Database (.RDB)"); + DEF_STR(INI_CURRENT_CHT, L"Cheat Code File (.CHT)"); + DEF_STR(INI_CURRENT_RDX, L"Extended ROM Info (.RDX)"); //About INI title - DEF_STR(INI_TITLE, L"About Config Files" ); + DEF_STR(INI_TITLE, L"About Config Files"); /********************************************************************************* * Numbers * *********************************************************************************/ - DEF_STR(NUMBER_0, L"0" ); - DEF_STR(NUMBER_1, L"1" ); - DEF_STR(NUMBER_2, L"2" ); - DEF_STR(NUMBER_3, L"3" ); - DEF_STR(NUMBER_4, L"4" ), - DEF_STR(NUMBER_5, L"5" ); - DEF_STR(NUMBER_6, L"6" ); - DEF_STR(NUMBER_7, L"7" ); - DEF_STR(NUMBER_8, L"8" ); - DEF_STR(NUMBER_9, L"9" ); + DEF_STR(NUMBER_0, L"0"); + DEF_STR(NUMBER_1, L"1"); + DEF_STR(NUMBER_2, L"2"); + DEF_STR(NUMBER_3, L"3"); + DEF_STR(NUMBER_4, L"4"), + DEF_STR(NUMBER_5, L"5"); + DEF_STR(NUMBER_6, L"6"); + DEF_STR(NUMBER_7, L"7"); + DEF_STR(NUMBER_8, L"8"); + DEF_STR(NUMBER_9, L"9"); /********************************************************************************* * Menu * *********************************************************************************/ //File Menu - DEF_STR(MENU_FILE, L"&File" ); - DEF_STR(MENU_OPEN, L"&Open ROM" ); - DEF_STR(MENU_ROM_INFO, L"ROM &Info...." ); - DEF_STR(MENU_START, L"Start Emulation" ); - DEF_STR(MENU_END, L"&End Emulation" ); - DEF_STR(MENU_CHOOSE_ROM, L"Choose ROM Directory..." ); - DEF_STR(MENU_REFRESH, L"Refresh ROM List" ); - DEF_STR(MENU_RECENT_ROM, L"Recent ROM" ); - DEF_STR(MENU_RECENT_DIR, L"Recent ROM Directories" ); - DEF_STR(MENU_EXIT, L"E&xit" ); + DEF_STR(MENU_FILE, L"&File"); + DEF_STR(MENU_OPEN, L"&Open ROM"); + DEF_STR(MENU_ROM_INFO, L"ROM &Info...."); + DEF_STR(MENU_START, L"Start Emulation"); + DEF_STR(MENU_END, L"&End Emulation"); + DEF_STR(MENU_CHOOSE_ROM, L"Choose ROM Directory..."); + DEF_STR(MENU_REFRESH, L"Refresh ROM List"); + DEF_STR(MENU_RECENT_ROM, L"Recent ROM"); + DEF_STR(MENU_RECENT_DIR, L"Recent ROM Directories"); + DEF_STR(MENU_EXIT, L"E&xit"); //System Menu - DEF_STR(MENU_SYSTEM, L"&System" ); - DEF_STR(MENU_RESET, L"&Reset" ); - DEF_STR(MENU_PAUSE, L"&Pause" ); - DEF_STR(MENU_BITMAP, L"Generate Bitmap" ); - DEF_STR(MENU_LIMIT_FPS, L"Limit FPS" ); - DEF_STR(MENU_SAVE, L"&Save State" ); - DEF_STR(MENU_SAVE_AS, L"Save As..." ); - DEF_STR(MENU_RESTORE, L"&Load State" ); - DEF_STR(MENU_LOAD, L"Load..." ); - DEF_STR(MENU_CURRENT_SAVE,L"Current Save S&tate" ); - DEF_STR(MENU_CHEAT, L"Cheats..." ); - DEF_STR(MENU_GS_BUTTON, L"GS Button" ); - DEF_STR(MENU_RESUME, L"R&esume" ); - DEF_STR(MENU_RESET_SOFT, L"&Soft Reset" ); - DEF_STR(MENU_RESET_HARD, L"&Hard Reset" ); + DEF_STR(MENU_SYSTEM, L"&System"); + DEF_STR(MENU_RESET, L"&Reset"); + DEF_STR(MENU_PAUSE, L"&Pause"); + DEF_STR(MENU_BITMAP, L"Generate Bitmap"); + DEF_STR(MENU_LIMIT_FPS, L"Limit FPS"); + DEF_STR(MENU_SAVE, L"&Save State"); + DEF_STR(MENU_SAVE_AS, L"Save As..."); + DEF_STR(MENU_RESTORE, L"&Load State"); + DEF_STR(MENU_LOAD, L"Load..."); + DEF_STR(MENU_CURRENT_SAVE, L"Current Save S&tate"); + DEF_STR(MENU_CHEAT, L"Cheats..."); + DEF_STR(MENU_GS_BUTTON, L"GS Button"); + DEF_STR(MENU_RESUME, L"R&esume"); + DEF_STR(MENU_RESET_SOFT, L"&Soft Reset"); + DEF_STR(MENU_RESET_HARD, L"&Hard Reset"); //Options Menu - DEF_STR(MENU_OPTIONS, L"&Options" ); - DEF_STR(MENU_FULL_SCREEN, L"&Full Screen" ); - DEF_STR(MENU_ON_TOP, L"&Always on &Top" ); - DEF_STR(MENU_CONFG_GFX, L"Configure Graphics Plugin..." ); - DEF_STR(MENU_CONFG_AUDIO, L"Configure Audio Plugin..." ); - DEF_STR(MENU_CONFG_CTRL, L"Configure Controller Plugin..." ); - DEF_STR(MENU_CONFG_RSP, L"Configure RSP Plugin..." ); - DEF_STR(MENU_SHOW_CPU, L"Show CPU Usage" ); - DEF_STR(MENU_SETTINGS, L"&Settings..." ); + DEF_STR(MENU_OPTIONS, L"&Options"); + DEF_STR(MENU_FULL_SCREEN, L"&Full Screen"); + DEF_STR(MENU_ON_TOP, L"&Always on &Top"); + DEF_STR(MENU_CONFG_GFX, L"Configure Graphics Plugin..."); + DEF_STR(MENU_CONFG_AUDIO, L"Configure Audio Plugin..."); + DEF_STR(MENU_CONFG_CTRL, L"Configure Controller Plugin..."); + DEF_STR(MENU_CONFG_RSP, L"Configure RSP Plugin..."); + DEF_STR(MENU_SHOW_CPU, L"Show CPU Usage"); + DEF_STR(MENU_SETTINGS, L"&Settings..."); //Debugger Menu - DEF_STR(MENU_DEBUGGER, L"&Debugger" ); + DEF_STR(MENU_DEBUGGER, L"&Debugger"); //Language Menu - DEF_STR(MENU_LANGUAGE, L"&Language" ); + DEF_STR(MENU_LANGUAGE, L"&Language"); //Help Menu - DEF_STR(MENU_HELP, L"&Help" ); - DEF_STR(MENU_ABOUT_INI, L"About Conf&ig Files" ); - DEF_STR(MENU_ABOUT_PJ64, L"&About Project64" ); - DEF_STR(MENU_FORUM, L"Support &Forum" ); - DEF_STR(MENU_HOMEPAGE, L"&Homepage" ); + DEF_STR(MENU_HELP, L"&Help"); + DEF_STR(MENU_ABOUT_INI, L"About Conf&ig Files"); + DEF_STR(MENU_ABOUT_PJ64, L"&About Project64"); + DEF_STR(MENU_FORUM, L"Support &Forum"); + DEF_STR(MENU_HOMEPAGE, L"&Homepage"); //Current Save Slot menu - DEF_STR(MENU_SLOT_DEFAULT,L"Default" ); - DEF_STR(MENU_SLOT_1, L"Slot 1" ); - DEF_STR(MENU_SLOT_2, L"Slot 2" ); - DEF_STR(MENU_SLOT_3, L"Slot 3" ); - DEF_STR(MENU_SLOT_4, L"Slot 4" ); - DEF_STR(MENU_SLOT_5, L"Slot 5" ); - DEF_STR(MENU_SLOT_6, L"Slot 6" ); - DEF_STR(MENU_SLOT_7, L"Slot 7" ); - DEF_STR(MENU_SLOT_8, L"Slot 8" ); - DEF_STR(MENU_SLOT_9, L"Slot 9" ); - DEF_STR(MENU_SLOT_10, L"Slot 10" ); + DEF_STR(MENU_SLOT_DEFAULT, L"Default"); + DEF_STR(MENU_SLOT_1, L"Slot 1"); + DEF_STR(MENU_SLOT_2, L"Slot 2"); + DEF_STR(MENU_SLOT_3, L"Slot 3"); + DEF_STR(MENU_SLOT_4, L"Slot 4"); + DEF_STR(MENU_SLOT_5, L"Slot 5"); + DEF_STR(MENU_SLOT_6, L"Slot 6"); + DEF_STR(MENU_SLOT_7, L"Slot 7"); + DEF_STR(MENU_SLOT_8, L"Slot 8"); + DEF_STR(MENU_SLOT_9, L"Slot 9"); + DEF_STR(MENU_SLOT_10, L"Slot 10"); + DEF_STR(MENU_SLOT_SAVE, L"Save slot (%ws) selected"); //Pop up Menu - DEF_STR(POPUP_PLAY, L"Play Game" ); - DEF_STR(POPUP_INFO, L"ROM Information" ); - DEF_STR(POPUP_SETTINGS, L"Edit Game Settings" ); - DEF_STR(POPUP_CHEATS, L"Edit Cheats" ); - DEF_STR(POPUP_GFX_PLUGIN,L"Graphics Plugin" ); + DEF_STR(POPUP_PLAY, L"Play Game"); + DEF_STR(POPUP_INFO, L"ROM Information"); + DEF_STR(POPUP_SETTINGS, L"Edit Game Settings"); + DEF_STR(POPUP_CHEATS, L"Edit Cheats"); + DEF_STR(POPUP_GFX_PLUGIN, L"Graphics Plugin"); //Alternate Name to save Slot - DEF_STR(SAVE_SLOT_DEFAULT,L"Save Slot - Default" ); - DEF_STR(SAVE_SLOT_1, L"Save Slot - 1" ); - DEF_STR(SAVE_SLOT_2, L"Save Slot - 2" ); - DEF_STR(SAVE_SLOT_3, L"Save Slot - 3" ); - DEF_STR(SAVE_SLOT_4, L"Save Slot - 4" ); - DEF_STR(SAVE_SLOT_5, L"Save Slot - 5" ); - DEF_STR(SAVE_SLOT_6, L"Save Slot - 6" ); - DEF_STR(SAVE_SLOT_7, L"Save Slot - 7" ); - DEF_STR(SAVE_SLOT_8, L"Save Slot - 8" ); - DEF_STR(SAVE_SLOT_9, L"Save Slot - 9" ); - DEF_STR(SAVE_SLOT_10, L"Save Slot - 10" ); + DEF_STR(SAVE_SLOT_DEFAULT, L"Save Slot - Default"); + DEF_STR(SAVE_SLOT_1, L"Save Slot - 1"); + DEF_STR(SAVE_SLOT_2, L"Save Slot - 2"); + DEF_STR(SAVE_SLOT_3, L"Save Slot - 3"); + DEF_STR(SAVE_SLOT_4, L"Save Slot - 4"); + DEF_STR(SAVE_SLOT_5, L"Save Slot - 5"); + DEF_STR(SAVE_SLOT_6, L"Save Slot - 6"); + DEF_STR(SAVE_SLOT_7, L"Save Slot - 7"); + DEF_STR(SAVE_SLOT_8, L"Save Slot - 8"); + DEF_STR(SAVE_SLOT_9, L"Save Slot - 9"); + DEF_STR(SAVE_SLOT_10, L"Save Slot - 10"); /********************************************************************************* * ROM Browser * *********************************************************************************/ //ROM Browser Fields - DEF_STR(RB_FILENAME, L"File Name" ); - DEF_STR(RB_INTERNALNAME, L"Internal Name" ); - DEF_STR(RB_GOODNAME, L"Good Name" ); - DEF_STR(RB_STATUS, L"Status" ); - DEF_STR(RB_ROMSIZE, L"ROM Size" ); - DEF_STR(RB_NOTES_CORE, L"Notes (core)" ); - DEF_STR(RB_NOTES_PLUGIN, L"Notes (default plugins)" ); - DEF_STR(RB_NOTES_USER, L"Notes (user)" ); - DEF_STR(RB_CART_ID, L"Cartridge ID" ); - DEF_STR(RB_MANUFACTUER, L"Manufacturer" ); - DEF_STR(RB_COUNTRY, L"Country" ); - DEF_STR(RB_DEVELOPER, L"Developer" ); - DEF_STR(RB_CRC1, L"CRC1" ); - DEF_STR(RB_CRC2, L"CRC2" ); - DEF_STR(RB_CICCHIP, L"CIC Chip" ); - DEF_STR(RB_RELEASE_DATE, L"Release Date" ); - DEF_STR(RB_GENRE, L"Genre" ); - DEF_STR(RB_PLAYERS, L"Players" ); - DEF_STR(RB_FORCE_FEEDBACK,L"Force Feedback" ); - DEF_STR(RB_FILE_FORMAT, L"File Format" ); + DEF_STR(RB_FILENAME, L"File Name"); + DEF_STR(RB_INTERNALNAME, L"Internal Name"); + DEF_STR(RB_GOODNAME, L"Good Name"); + DEF_STR(RB_STATUS, L"Status"); + DEF_STR(RB_ROMSIZE, L"ROM Size"); + DEF_STR(RB_NOTES_CORE, L"Notes (core)"); + DEF_STR(RB_NOTES_PLUGIN, L"Notes (default plugins)"); + DEF_STR(RB_NOTES_USER, L"Notes (user)"); + DEF_STR(RB_CART_ID, L"Cartridge ID"); + DEF_STR(RB_MANUFACTUER, L"Manufacturer"); + DEF_STR(RB_COUNTRY, L"Country"); + DEF_STR(RB_DEVELOPER, L"Developer"); + DEF_STR(RB_CRC1, L"CRC1"); + DEF_STR(RB_CRC2, L"CRC2"); + DEF_STR(RB_CICCHIP, L"CIC Chip"); + DEF_STR(RB_RELEASE_DATE, L"Release Date"); + DEF_STR(RB_GENRE, L"Genre"); + DEF_STR(RB_PLAYERS, L"Players"); + DEF_STR(RB_FORCE_FEEDBACK, L"Force Feedback"); + DEF_STR(RB_FILE_FORMAT, L"File Format"); //Select ROM - DEF_STR(SELECT_ROM_DIR, L"Select current ROM directory" ); + DEF_STR(SELECT_ROM_DIR, L"Select current ROM directory"); //Messages - DEF_STR(RB_NOT_GOOD_FILE,L"Bad ROM? Use GoodN64 & check for updated RDB." ); + DEF_STR(RB_NOT_GOOD_FILE, L"Bad ROM? Use GoodN64 & check for updated RDB."); /********************************************************************************* * Options * *********************************************************************************/ //Options Title - DEF_STR(OPTIONS_TITLE,L"Settings"); + DEF_STR(OPTIONS_TITLE, L"Settings"); //Tabs - DEF_STR(TAB_PLUGIN, L"Plugins"); - DEF_STR(TAB_DIRECTORY, L"Directories"); - DEF_STR(TAB_OPTIONS, L"Options"); - DEF_STR(TAB_ROMSELECTION,L"ROM Selection"); - DEF_STR(TAB_ADVANCED, L"Advanced"); + DEF_STR(TAB_PLUGIN, L"Plugins"); + DEF_STR(TAB_DIRECTORY, L"Directories"); + DEF_STR(TAB_OPTIONS, L"Options"); + DEF_STR(TAB_ROMSELECTION, L"ROM Selection"); + DEF_STR(TAB_ADVANCED, L"Advanced"); DEF_STR(TAB_ROMSETTINGS, L"General Settings"); - DEF_STR(TAB_SHELLINTERGATION,L"Shell Integration"); - DEF_STR(TAB_ROMNOTES, L"Notes"); - DEF_STR(TAB_SHORTCUTS, L"Keyboard Shortcuts"); - DEF_STR(TAB_ROMSTATUS, L"Status"); - DEF_STR(TAB_RECOMPILER, L"Recompiler"); + DEF_STR(TAB_SHELLINTERGATION, L"Shell Integration"); + DEF_STR(TAB_ROMNOTES, L"Notes"); + DEF_STR(TAB_SHORTCUTS, L"Keyboard Shortcuts"); + DEF_STR(TAB_ROMSTATUS, L"Status"); + DEF_STR(TAB_RECOMPILER, L"Recompiler"); //Plugin Dialog - DEF_STR(PLUG_ABOUT, L"About"); - DEF_STR(PLUG_RSP, L" RSP (Reality Signal Processor) plugin: "); - DEF_STR(PLUG_GFX, L" Video (graphics) plugin: "); - DEF_STR(PLUG_AUDIO, L" Audio (sound) plugin: "); - DEF_STR(PLUG_CTRL, L" Input (controller) plugin: "); - DEF_STR(PLUG_HLE_GFX, L"Graphics HLE"); - DEF_STR(PLUG_HLE_AUDIO,L"Audio HLE"); - DEF_STR(PLUG_DEFAULT, L"** Use System Plugin **"); + DEF_STR(PLUG_ABOUT, L"About"); + DEF_STR(PLUG_RSP, L" RSP (Reality Signal Processor) plugin: "); + DEF_STR(PLUG_GFX, L" Video (graphics) plugin: "); + DEF_STR(PLUG_AUDIO, L" Audio (sound) plugin: "); + DEF_STR(PLUG_CTRL, L" Input (controller) plugin: "); + DEF_STR(PLUG_HLE_GFX, L"Graphics HLE"); + DEF_STR(PLUG_HLE_AUDIO, L"Audio HLE"); + DEF_STR(PLUG_DEFAULT, L"** Use System Plugin **"); //Directory Dialog - DEF_STR(DIR_PLUGIN, L" Plugin directory: "); - DEF_STR(DIR_ROM, L" ROM directory: "); - DEF_STR(DIR_AUTO_SAVE, L" N64 native saves directory: "); - DEF_STR(DIR_INSTANT_SAVE, L" Saved states directory: "); - DEF_STR(DIR_SCREEN_SHOT, L" Screenshot directory: "); - DEF_STR(DIR_ROM_DEFAULT, L"Last folder that a ROM was open from"); + DEF_STR(DIR_PLUGIN, L" Plugin directory: "); + DEF_STR(DIR_ROM, L" ROM directory: "); + DEF_STR(DIR_AUTO_SAVE, L" N64 native saves directory: "); + DEF_STR(DIR_INSTANT_SAVE, L" Saved states directory: "); + DEF_STR(DIR_SCREEN_SHOT, L" Screenshot directory: "); + DEF_STR(DIR_ROM_DEFAULT, L"Last folder that a ROM was open from"); DEF_STR(DIR_SELECT_PLUGIN, L"Select plugin directory"); - DEF_STR(DIR_SELECT_ROM, L"Select ROM directory"); - DEF_STR(DIR_SELECT_AUTO, L"Select N64 native saves directory"); - DEF_STR(DIR_SELECT_INSTANT,L"Select saved states directory"); + DEF_STR(DIR_SELECT_ROM, L"Select ROM directory"); + DEF_STR(DIR_SELECT_AUTO, L"Select N64 native saves directory"); + DEF_STR(DIR_SELECT_INSTANT, L"Select saved states directory"); DEF_STR(DIR_SELECT_SCREEN, L"Select screenshot directory"); - DEF_STR(DIR_TEXTURE, L" Texture pack directory: "); + DEF_STR(DIR_TEXTURE, L" Texture pack directory: "); DEF_STR(DIR_SELECT_TEXTURE, L"Select texture pack directory"); //Options (general) Tab - DEF_STR(OPTION_AUTO_SLEEP, L"Pause emulation when window is not active"); + DEF_STR(OPTION_AUTO_SLEEP, L"Pause emulation when window is not active"); DEF_STR(OPTION_AUTO_FULLSCREEN, L"Enter full-screen mode when loading a ROM"); - DEF_STR(OPTION_BASIC_MODE, L"Hide advanced settings"); - DEF_STR(OPTION_REMEMBER_CHEAT, L"Remember selected cheats"); - DEF_STR(OPTION_DISABLE_SS, L"Disable screen saver when running a ROM"); - DEF_STR(OPTION_DISPLAY_FR, L"Display speed"); - DEF_STR(OPTION_CHECK_RUNNING, L"Check if Project64 is already running"); - DEF_STR(OPTION_CHANGE_FR, L"Speed display:"); + DEF_STR(OPTION_BASIC_MODE, L"Hide advanced settings"); + DEF_STR(OPTION_REMEMBER_CHEAT, L"Remember selected cheats"); + DEF_STR(OPTION_DISABLE_SS, L"Disable screen saver when running a ROM"); + DEF_STR(OPTION_DISPLAY_FR, L"Display speed"); + DEF_STR(OPTION_CHECK_RUNNING, L"Check if Project64 is already running"); + DEF_STR(OPTION_CHANGE_FR, L"Speed display:"); //ROM Browser Tab - DEF_STR(RB_MAX_ROMS, L"Max # of ROMs remembered (0-10):"); - DEF_STR(RB_ROMS, L"ROMs"); - DEF_STR(RB_MAX_DIRS, L"Max # of ROM dirs remembered (0-10):"); - DEF_STR(RB_DIRS, L"dirs"); - DEF_STR(RB_USE, L"Use ROM browser"); - DEF_STR(RB_DIR_RECURSION, L"Use directory recursion"); + DEF_STR(RB_MAX_ROMS, L"Max # of ROMs remembered (0-10):"); + DEF_STR(RB_ROMS, L"ROMs"); + DEF_STR(RB_MAX_DIRS, L"Max # of ROM dirs remembered (0-10):"); + DEF_STR(RB_DIRS, L"dirs"); + DEF_STR(RB_USE, L"Use ROM browser"); + DEF_STR(RB_DIR_RECURSION, L"Use directory recursion"); DEF_STR(RB_AVALIABLE_FIELDS, L"Available fields:"); - DEF_STR(RB_SHOW_FIELDS, L"Order of fields:"); - DEF_STR(RB_ADD, L"Add ->"); - DEF_STR(RB_REMOVE, L"<- Remove"); - DEF_STR(RB_UP, L"Up"); - DEF_STR(RB_DOWN, L"Down"); - DEF_STR(RB_REFRESH, L"Automatically refresh browser"); + DEF_STR(RB_SHOW_FIELDS, L"Order of fields:"); + DEF_STR(RB_ADD, L"Add ->"); + DEF_STR(RB_REMOVE, L"<- Remove"); + DEF_STR(RB_UP, L"Up"); + DEF_STR(RB_DOWN, L"Down"); + DEF_STR(RB_REFRESH, L"Automatically refresh browser"); //Advanced Options - DEF_STR(ADVANCE_INFO, L"Most of these changes will not take effect until a new ROM is opened or current ROM is reset."); - DEF_STR(ADVANCE_DEFAULTS, L"Core Defaults"); - DEF_STR(ADVANCE_CPU_STYLE, L"CPU core style:"); - DEF_STR(ADVANCE_SMCM, L"Self-mod methods:"); - DEF_STR(ADVANCE_MEM_SIZE, L"Default memory size:"); - DEF_STR(ADVANCE_ABL, L"Advanced block linking"); - DEF_STR(ADVANCE_AUTO_START, L"Start emulation when ROM is opened"); - DEF_STR(ADVANCE_OVERWRITE, L"Always override default settings with ones from RDB"); - DEF_STR(ADVANCE_COMPRESS, L"Automatically compress saved states"); - DEF_STR(ADVANCE_DEBUGGER, L"Enable debugger"); - DEF_STR(ADVANCE_SMM_CACHE, L"Cache"); - DEF_STR(ADVANCE_SMM_PIDMA, L"PI DMA"); - DEF_STR(ADVANCE_SMM_VALIDATE,L"Start changed"); + DEF_STR(ADVANCE_INFO, L"Most of these changes will not take effect until a new ROM is opened or current ROM is reset."); + DEF_STR(ADVANCE_DEFAULTS, L"Core Defaults"); + DEF_STR(ADVANCE_CPU_STYLE, L"CPU core style:"); + DEF_STR(ADVANCE_SMCM, L"Self-mod methods:"); + DEF_STR(ADVANCE_MEM_SIZE, L"Default memory size:"); + DEF_STR(ADVANCE_ABL, L"Advanced block linking"); + DEF_STR(ADVANCE_AUTO_START, L"Start emulation when ROM is opened"); + DEF_STR(ADVANCE_OVERWRITE, L"Always override default settings with ones from RDB"); + DEF_STR(ADVANCE_COMPRESS, L"Automatically compress saved states"); + DEF_STR(ADVANCE_DEBUGGER, L"Enable debugger"); + DEF_STR(ADVANCE_SMM_CACHE, L"Cache"); + DEF_STR(ADVANCE_SMM_PIDMA, L"PI DMA"); + DEF_STR(ADVANCE_SMM_VALIDATE, L"Start changed"); DEF_STR(ADVANCE_SMM_PROTECT, L"Protect memory"); - DEF_STR(ADVANCE_SMM_TLB, L"TLB unmapping"); + DEF_STR(ADVANCE_SMM_TLB, L"TLB unmapping"); //ROM Options - DEF_STR(ROM_CPU_STYLE, L"CPU core style:"); - DEF_STR(ROM_VIREFRESH, L"VI refresh rate:"); - DEF_STR(ROM_MEM_SIZE, L"Memory size:"); - DEF_STR(ROM_ABL, L"Advanced block linking"); - DEF_STR(ROM_SAVE_TYPE, L"Default save type:"); - DEF_STR(ROM_COUNTER_FACTOR, L"Counter factor:"); - DEF_STR(ROM_LARGE_BUFFER, L"Larger compile buffer"); - DEF_STR(ROM_USE_TLB, L"Use TLB"); - DEF_STR(ROM_REG_CACHE, L"Register caching"); - DEF_STR(ROM_DELAY_SI, L"Delay SI interrupt"); - DEF_STR(ROM_FAST_SP, L"Fast SP"); - DEF_STR(ROM_DEFAULT, L"Default"); - DEF_STR(ROM_AUDIO_SIGNAL, L"RSP audio signal"); - DEF_STR(ROM_FIXED_AUDIO, L"Fixed audio timing"); - DEF_STR(ROM_FUNC_FIND, L"Function lookup method:"); - DEF_STR(ROM_CUSTOM_SMM, L"Custom self mod Method"); - DEF_STR(ROM_SYNC_AUDIO, L"Sync using audio"); - DEF_STR(ROM_COUNTPERBYTE, L"AI count per byte:"); - DEF_STR(ROM_32BIT, L"32-bit engine:"); - DEF_STR(ROM_DELAY_DP, L"Delay DP interrupt:"); + DEF_STR(ROM_CPU_STYLE, L"CPU core style:"); + DEF_STR(ROM_VIREFRESH, L"VI refresh rate:"); + DEF_STR(ROM_MEM_SIZE, L"Memory size:"); + DEF_STR(ROM_ABL, L"Advanced block linking"); + DEF_STR(ROM_SAVE_TYPE, L"Default save type:"); + DEF_STR(ROM_COUNTER_FACTOR, L"Counter factor:"); + DEF_STR(ROM_LARGE_BUFFER, L"Larger compile buffer"); + DEF_STR(ROM_USE_TLB, L"Use TLB"); + DEF_STR(ROM_REG_CACHE, L"Register caching"); + DEF_STR(ROM_DELAY_SI, L"Delay SI interrupt"); + DEF_STR(ROM_FAST_SP, L"Fast SP"); + DEF_STR(ROM_DEFAULT, L"Default"); + DEF_STR(ROM_AUDIO_SIGNAL, L"RSP audio signal"); + DEF_STR(ROM_FIXED_AUDIO, L"Fixed audio timing"); + DEF_STR(ROM_FUNC_FIND, L"Function lookup method:"); + DEF_STR(ROM_CUSTOM_SMM, L"Custom self mod Method"); + DEF_STR(ROM_SYNC_AUDIO, L"Sync using audio"); + DEF_STR(ROM_COUNTPERBYTE, L"AI count per byte:"); + DEF_STR(ROM_32BIT, L"32-bit engine:"); + DEF_STR(ROM_DELAY_DP, L"Delay DP interrupt:"); //Core Styles - DEF_STR(CORE_INTERPTER, L"Interpreter"); - DEF_STR(CORE_RECOMPILER, L"Recompiler"); - DEF_STR(CORE_SYNC, L"Synchronize cores"); + DEF_STR(CORE_INTERPTER, L"Interpreter"); + DEF_STR(CORE_RECOMPILER, L"Recompiler"); + DEF_STR(CORE_SYNC, L"Synchronize cores"); //Self Mod Methods - DEF_STR(SMCM_NONE, L"None"); - DEF_STR(SMCM_CACHE, L"Cache"); - DEF_STR(SMCM_PROECTED, L"Protect memory"); - DEF_STR(SMCM_CHECK_MEM, L"Check memory & cache"); - DEF_STR(SMCM_CHANGE_MEM, L"Change memory & cache"); - DEF_STR(SMCM_CHECK_ADV, L"Check memory advance"); - DEF_STR(SMCM_CACHE2, L"Clear code on cache"); + DEF_STR(SMCM_NONE, L"None"); + DEF_STR(SMCM_CACHE, L"Cache"); + DEF_STR(SMCM_PROECTED, L"Protect memory"); + DEF_STR(SMCM_CHECK_MEM, L"Check memory & cache"); + DEF_STR(SMCM_CHANGE_MEM, L"Change memory & cache"); + DEF_STR(SMCM_CHECK_ADV, L"Check memory advance"); + DEF_STR(SMCM_CACHE2, L"Clear code on cache"); //Function Lookup method - DEF_STR(FLM_PLOOKUP, L"Physical lookup table"); - DEF_STR(FLM_VLOOKUP, L"Virtual lookup table"); - DEF_STR(FLM_CHANGEMEM, L"Change memory"); + DEF_STR(FLM_PLOOKUP, L"Physical lookup table"); + DEF_STR(FLM_VLOOKUP, L"Virtual lookup table"); + DEF_STR(FLM_CHANGEMEM, L"Change memory"); //RDRAM Size - DEF_STR(RDRAM_4MB, L"4 MB"); - DEF_STR(RDRAM_8MB, L"8 MB"); + DEF_STR(RDRAM_4MB, L"4 MB"); + DEF_STR(RDRAM_8MB, L"8 MB"); //Advanced Block Linking - DEF_STR(ABL_ON, L"On"); - DEF_STR(ABL_OFF, L"Off"); + DEF_STR(ABL_ON, L"On"); + DEF_STR(ABL_OFF, L"Off"); //Save Type - DEF_STR(SAVE_FIRST_USED, L"Use first-used save type"); - DEF_STR(SAVE_4K_EEPROM, L"4-kbit EEPROM"); - DEF_STR(SAVE_16K_EEPROM, L"16-kbit EEPROM"); - DEF_STR(SAVE_SRAM, L"32-kbyte SRAM"); - DEF_STR(SAVE_FLASHRAM, L"Flash RAM"); + DEF_STR(SAVE_FIRST_USED, L"Use first-used save type"); + DEF_STR(SAVE_4K_EEPROM, L"4-kbit EEPROM"); + DEF_STR(SAVE_16K_EEPROM, L"16-kbit EEPROM"); + DEF_STR(SAVE_SRAM, L"SRAM"); + DEF_STR(SAVE_FLASHRAM, L"Flash RAM"); //Shell Integration Tab - DEF_STR(SHELL_TEXT, L"File extension association:"); + DEF_STR(SHELL_TEXT, L"File extension association:"); //ROM Notes - DEF_STR(NOTE_STATUS, L"ROM status:"); - DEF_STR(NOTE_CORE, L"Core note:"); - DEF_STR(NOTE_PLUGIN, L"Plugin note:"); + DEF_STR(NOTE_STATUS, L"ROM status:"); + DEF_STR(NOTE_CORE, L"Core note:"); + DEF_STR(NOTE_PLUGIN, L"Plugin note:"); // Accelerator Selector - DEF_STR(ACCEL_CPUSTATE_TITLE, L"CPU state:"); - DEF_STR(ACCEL_MENUITEM_TITLE, L"Menu item:"); + DEF_STR(ACCEL_CPUSTATE_TITLE, L"CPU state:"); + DEF_STR(ACCEL_MENUITEM_TITLE, L"Menu item:"); DEF_STR(ACCEL_CURRENTKEYS_TITLE, L"Current keys:"); - DEF_STR(ACCEL_SELKEY_TITLE, L"Select new shortcut key:"); - DEF_STR(ACCEL_ASSIGNEDTO_TITLE, L"Currently assigned to:"); - DEF_STR(ACCEL_ASSIGN_BTN, L"Assign"); - DEF_STR(ACCEL_REMOVE_BTN, L"Remove"); - DEF_STR(ACCEL_RESETALL_BTN, L"Reset all"); - DEF_STR(ACCEL_CPUSTATE_1, L"Game not playing"); - DEF_STR(ACCEL_CPUSTATE_2, L"Game playing"); - DEF_STR(ACCEL_CPUSTATE_3, L"Game playing (windowed)"); - DEF_STR(ACCEL_CPUSTATE_4, L"Game playing (full-screen)"); - DEF_STR(ACCEL_DETECTKEY, L"Detect Key"); + DEF_STR(ACCEL_SELKEY_TITLE, L"Select new shortcut key:"); + DEF_STR(ACCEL_ASSIGNEDTO_TITLE, L"Currently assigned to:"); + DEF_STR(ACCEL_ASSIGN_BTN, L"Assign"); + DEF_STR(ACCEL_REMOVE_BTN, L"Remove"); + DEF_STR(ACCEL_RESETALL_BTN, L"Reset all"); + DEF_STR(ACCEL_CPUSTATE_1, L"Game not playing"); + DEF_STR(ACCEL_CPUSTATE_2, L"Game playing"); + DEF_STR(ACCEL_CPUSTATE_3, L"Game playing (windowed)"); + DEF_STR(ACCEL_CPUSTATE_4, L"Game playing (full-screen)"); + DEF_STR(ACCEL_DETECTKEY, L"Detect Key"); // Frame Rate Option - DEF_STR(STR_FR_VIS, L"Vertical interrupts per second"); - DEF_STR(STR_FR_DLS, L"Display lists per second"); - DEF_STR(STR_FR_PERCENT, L"Percentage of full speed"); + DEF_STR(STR_FR_VIS, L"Vertical interrupts per second"); + DEF_STR(STR_FR_DLS, L"Display lists per second"); + DEF_STR(STR_FR_PERCENT, L"Percentage of full speed"); // Increase speed - DEF_STR(STR_INSREASE_SPEED, L"Increase Game Speed"); - DEF_STR(STR_DECREASE_SPEED, L"Decrease Game Speed"); + DEF_STR(STR_INSREASE_SPEED, L"Increase Game Speed"); + DEF_STR(STR_DECREASE_SPEED, L"Decrease Game Speed"); //Bottom page buttons - DEF_STR(BOTTOM_RESET_PAGE, L"Reset Page"); - DEF_STR(BOTTOM_RESET_ALL, L"Reset All"); - DEF_STR(BOTTOM_APPLY, L"Apply"); - DEF_STR(BOTTOM_CLOSE, L"Close"); + DEF_STR(BOTTOM_RESET_PAGE, L"Reset Page"); + DEF_STR(BOTTOM_RESET_ALL, L"Reset All"); + DEF_STR(BOTTOM_APPLY, L"Apply"); + DEF_STR(BOTTOM_CLOSE, L"Close"); /********************************************************************************* * ROM Information * *********************************************************************************/ //ROM Info Title - DEF_STR(INFO_TITLE, L"ROM Information"); + DEF_STR(INFO_TITLE, L"ROM Information"); //ROM Info Text - DEF_STR(INFO_ROM_NAME_TEXT, L"ROM name:"); - DEF_STR(INFO_FILE_NAME_TEXT, L"File name:"); - DEF_STR(INFO_LOCATION_TEXT, L"Location:"); - DEF_STR(INFO_SIZE_TEXT, L"ROM size:"); - DEF_STR(INFO_CART_ID_TEXT, L"Cartridge ID:"); + DEF_STR(INFO_ROM_NAME_TEXT, L"ROM name:"); + DEF_STR(INFO_FILE_NAME_TEXT, L"File name:"); + DEF_STR(INFO_LOCATION_TEXT, L"Location:"); + DEF_STR(INFO_SIZE_TEXT, L"ROM size:"); + DEF_STR(INFO_CART_ID_TEXT, L"Cartridge ID:"); DEF_STR(INFO_MANUFACTURER_TEXT, L"Manufacturer:"); - DEF_STR(INFO_COUNTRY_TEXT, L"Country:"); - DEF_STR(INFO_CRC1_TEXT, L"CRC1:"); - DEF_STR(INFO_CRC2_TEXT, L"CRC2:"); - DEF_STR(INFO_CIC_CHIP_TEXT, L"CIC chip:"); - DEF_STR(INFO_MD5_TEXT, L"MD5:"); + DEF_STR(INFO_COUNTRY_TEXT, L"Country:"); + DEF_STR(INFO_CRC1_TEXT, L"CRC1:"); + DEF_STR(INFO_CRC2_TEXT, L"CRC2:"); + DEF_STR(INFO_CIC_CHIP_TEXT, L"CIC chip:"); + DEF_STR(INFO_MD5_TEXT, L"MD5:"); /********************************************************************************* * Cheats * *********************************************************************************/ //Cheat List - DEF_STR(CHEAT_TITLE, L"Cheats"); - DEF_STR(CHEAT_LIST_FRAME, L"Cheats:"); - DEF_STR(CHEAT_NOTES_FRAME, L" Notes: "); - DEF_STR(CHEAT_MARK_ALL, L"Mark All"); - DEF_STR(CHEAT_MARK_NONE, L"Unmark All"); + DEF_STR(CHEAT_TITLE, L"Cheats"); + DEF_STR(CHEAT_LIST_FRAME, L"Cheats:"); + DEF_STR(CHEAT_NOTES_FRAME, L" Notes: "); + DEF_STR(CHEAT_MARK_ALL, L"Mark All"); + DEF_STR(CHEAT_MARK_NONE, L"Unmark All"); //Add Cheat - DEF_STR(CHEAT_ADDCHEAT_FRAME, L"Add Cheat"); - DEF_STR(CHEAT_ADDCHEAT_NAME, L"Name:"); - DEF_STR(CHEAT_ADDCHEAT_CODE, L"Code:"); + DEF_STR(CHEAT_ADDCHEAT_FRAME, L"Add Cheat"); + DEF_STR(CHEAT_ADDCHEAT_NAME, L"Name:"); + DEF_STR(CHEAT_ADDCHEAT_CODE, L"Code:"); DEF_STR(CHEAT_ADDCHEAT_INSERT, L"Insert"); - DEF_STR(CHEAT_ADDCHEAT_CLEAR, L"Clear"); - DEF_STR(CHEAT_ADDCHEAT_NOTES, L" Cheat Notes: "); - DEF_STR(CHEAT_ADD_TO_DB, L"Add to DB"); + DEF_STR(CHEAT_ADDCHEAT_CLEAR, L"Clear"); + DEF_STR(CHEAT_ADDCHEAT_NOTES, L" Cheat Notes: "); + DEF_STR(CHEAT_ADD_TO_DB, L"Add to DB"); //Code extension - DEF_STR(CHEAT_CODE_EXT_TITLE, L"Code Extensions"); - DEF_STR(CHEAT_CODE_EXT_TXT, L"Please choose a value to be used for:"); - DEF_STR(CHEAT_OK, L"OK"); - DEF_STR(CHEAT_CANCEL, L"Cancel"); + DEF_STR(CHEAT_CODE_EXT_TITLE, L"Code Extensions"); + DEF_STR(CHEAT_CODE_EXT_TXT, L"Please choose a value to be used for:"); + DEF_STR(CHEAT_OK, L"OK"); + DEF_STR(CHEAT_CANCEL, L"Cancel"); //Digital Value - DEF_STR(CHEAT_QUANTITY_TITLE, L"Quantity Digit"); - DEF_STR(CHEAT_CHOOSE_VALUE, L"Please choose a value for:"); - DEF_STR(CHEAT_VALUE, L"&Value"); - DEF_STR(CHEAT_FROM, L"from"); - DEF_STR(CHEAT_TO, L"to"); - DEF_STR(CHEAT_NOTES, L"&Notes:"); - DEF_STR(CHEAT_ADDCHEAT_ADD, L"Add Cheat"); - DEF_STR(CHEAT_ADDCHEAT_NEW, L"New Cheat"); - DEF_STR(CHEAT_ADDCHEAT_CODEDES,L"
"); - DEF_STR(CHEAT_ADDCHEAT_OPT, L"Options:"); + DEF_STR(CHEAT_QUANTITY_TITLE, L"Quantity Digit"); + DEF_STR(CHEAT_CHOOSE_VALUE, L"Please choose a value for:"); + DEF_STR(CHEAT_VALUE, L"&Value"); + DEF_STR(CHEAT_FROM, L"from"); + DEF_STR(CHEAT_TO, L"to"); + DEF_STR(CHEAT_NOTES, L"&Notes:"); + DEF_STR(CHEAT_ADDCHEAT_ADD, L"Add Cheat"); + DEF_STR(CHEAT_ADDCHEAT_NEW, L"New Cheat"); + DEF_STR(CHEAT_ADDCHEAT_CODEDES, L"
"); + DEF_STR(CHEAT_ADDCHEAT_OPT, L"Options:"); DEF_STR(CHEAT_ADDCHEAT_OPTDES, L"