diff --git a/README.md b/README.md index 1d64675ab..efee03834 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ We use semantic versioning for Project64. For the versions available, see the [t * **Smiff** - *Previous contributor* - Smiff * **Gent** - *Previous contributor* - Gent -See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project. +See also the list of [contributors](https://github.com/project64/project64/contributors) who participated in this project. ## License diff --git a/Source/Project64-audio/AudioMain.cpp b/Source/Project64-audio/AudioMain.cpp index 33ff66318..6b99c5598 100644 --- a/Source/Project64-audio/AudioMain.cpp +++ b/Source/Project64-audio/AudioMain.cpp @@ -7,6 +7,7 @@ // Copyright(C) 2003 JttL // Copyright(C) 2002 Hacktarux // GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html + #include #ifdef _WIN32 #include @@ -30,7 +31,7 @@ void SetTimerResolution ( void ); #define ENDIAN_SWAP_BYTE (~0 & 0x7 & 3) #define BES(address) ((address) ^ ENDIAN_SWAP_BYTE) -/* Read header for type definition */ +// Read header for type definition AUDIO_INFO g_AudioInfo; bool g_PluginInit = false; @@ -71,7 +72,7 @@ EXPORT void CALL AiDacrateChanged(int SystemType) WriteTrace(TraceAudioInterface, TraceDebug, "Start (SystemType: %d)", SystemType); if (!g_PluginInit) { - WriteTrace(TraceAudioInterface, TraceNotice, "Plugin has not been initilized"); + WriteTrace(TraceAudioInterface, TraceNotice, "Plugin has not been initialized"); WriteTrace(TraceAudioInterface, TraceDebug, "Done"); return; } @@ -97,7 +98,7 @@ EXPORT void CALL AiDacrateChanged(int SystemType) if (Frequency < 8000) { - WriteTrace(TraceAudioDriver, TraceDebug, "Not Audio Data!"); + WriteTrace(TraceAudioDriver, TraceDebug, "Not audio data!"); return; } @@ -156,7 +157,7 @@ EXPORT void CALL AiUpdate(int32_t Wait) } else { - pjutil::Sleep(1); // TODO: Fixme -- Ai Update appears to be problematic + pjutil::Sleep(1); // TODO: Fix this: Ai update appears to be problematic } WriteTrace(TraceAudioInterface, TraceDebug, "Done"); } @@ -200,9 +201,9 @@ EXPORT void CALL GetDllInfo(PLUGIN_INFO * PluginInfo) PluginInfo->Version = 0x0101; PluginInfo->Type = PLUGIN_TYPE_AUDIO; #ifdef _DEBUG - sprintf(PluginInfo->Name, "Project64 Audio Plugin (Debug): %s", VER_FILE_VERSION_STR); + sprintf(PluginInfo->Name, "Project64 audio plugin (Debug): %s", VER_FILE_VERSION_STR); #else - sprintf(PluginInfo->Name, "Project64 Audio Plugin: %s", VER_FILE_VERSION_STR); + sprintf(PluginInfo->Name, "Project64 audio plugin: %s", VER_FILE_VERSION_STR); #endif PluginInfo->MemoryBswaped = true; PluginInfo->NormalMemory = false; diff --git a/Source/Project64-audio/Audio_1.1.h b/Source/Project64-audio/Audio_1.1.h index 5fe997949..c7e9f45fa 100644 --- a/Source/Project64-audio/Audio_1.1.h +++ b/Source/Project64-audio/Audio_1.1.h @@ -1,14 +1,12 @@ -/********************************************************************************** -Common Audio plugin spec, version #1.1 -********************************************************************************** -Notes: ------- +// Common audio plugin spec, version 1.1 -Setting the approprate bits in the MI_INTR_REG and calling CheckInterrupts which +/* +Notes: +Setting the appropriate bits in the MI_INTR_REG and calling CheckInterrupts which are both passed to the DLL in InitiateAudio will generate an Interrupt from with in the plugin. +*/ -**********************************************************************************/ #pragma once #include @@ -32,20 +30,21 @@ enum enum { - AI_STATUS_FIFO_FULL = 0x80000000, /* Bit 31: full */ - AI_STATUS_DMA_BUSY = 0x40000000, /* Bit 30: busy */ + AI_STATUS_FIFO_FULL = 0x80000000, // Bit 31: full + AI_STATUS_DMA_BUSY = 0x40000000, // Bit 30: busy - MI_INTR_AI = 0x04, /* Bit 2: AI intr */ + MI_INTR_AI = 0x04, // Bit 2: AI INTR AI_CONTROL_DMA_ON = 0x01, AI_CONTROL_DMA_OFF = 0x00, }; -/***** Structures *****/ +// Structures + typedef struct { - uint16_t Version; /* Should be set to 0x0101 */ - uint16_t Type; /* Set to PLUGIN_TYPE_AUDIO */ - char Name[100]; /* Name of the DLL */ + uint16_t Version; // Should be set to 0x0101 + uint16_t Type; // Set to PLUGIN_TYPE_AUDIO + char Name[100]; // Name of the DLL int32_t NormalMemory; int32_t MemoryBswaped; } PLUGIN_INFO; @@ -55,12 +54,10 @@ typedef struct void * hwnd; void * hinst; - int32_t MemoryBswaped; // If this is set to TRUE, then the memory has been pre - - // bswap on a dword (32 bits) boundry + int32_t MemoryBswaped; // If this is set to TRUE, then the memory has been pre-bswap'd on a DWORD (32-bit) boundary // eg. the first 8 bytes are stored like this: // 4 3 2 1 8 7 6 5 - uint8_t * HEADER; // This is the rom header (first 40h bytes of the rom + uint8_t * HEADER; // This is the ROM header (first 40h bytes of the ROM) // This will be in the same memory format as the rest of the memory. uint8_t * RDRAM; uint8_t * DMEM; @@ -78,127 +75,139 @@ typedef struct void(CALL *CheckInterrupts)(void); } AUDIO_INFO; -/****************************************************************** +/* Function: AiDacrateChanged -Purpose: This function is called to notify the dll that the +Purpose: This function is called to notify the DLL that the AiDacrate registers value has been changed. input: The System type: SYSTEM_NTSC 0 SYSTEM_PAL 1 SYSTEM_MPAL 2 output: none -*******************************************************************/ +*/ + EXPORT void CALL AiDacrateChanged(int32_t SystemType); -/****************************************************************** +/* Function: AiLenChanged -Purpose: This function is called to notify the dll that the +Purpose: This function is called to notify the DLL that the AiLen registers value has been changed. input: none output: none -*******************************************************************/ +*/ + EXPORT void CALL AiLenChanged(void); -/****************************************************************** +/* Function: AiReadLength -Purpose: This function is called to allow the dll to return the +Purpose: This function is called to allow the DLL to return the value that AI_LEN_REG should equal input: none output: The amount of bytes still left to play. -*******************************************************************/ +*/ + EXPORT uint32_t CALL AiReadLength(void); -/****************************************************************** +/* Function: AiUpdate -Purpose: This function is called to allow the dll to update +Purpose: This function is called to allow the DLL to update things on a regular basis (check how long to sound to -go, copy more stuff to the buffer, anyhting you like). +go, copy more stuff to the buffer, anything you like). The function is designed to go in to the message loop -of the main window ... but can be placed anywhere you +of the main window...but can be placed anywhere you like. input: if Wait is set to true, then this function should wait -till there is a messgae in the its message queue. +till there is a message in its message queue. output: none -*******************************************************************/ +*/ + EXPORT void CALL AiUpdate(int32_t Wait); -/****************************************************************** +/* Function: CloseDLL Purpose: This function is called when the emulator is closing -down allowing the dll to de-initialise. +down allowing the DLL to de-initialize. input: none output: none -*******************************************************************/ +*/ + EXPORT void CALL CloseDLL(void); -/****************************************************************** +/* Function: DllAbout Purpose: This function is optional function that is provided to give further information about the DLL. input: a handle to the window that calls this function output: none -*******************************************************************/ +*/ + EXPORT void CALL DllAbout(void * hParent); -/****************************************************************** +/* Function: DllConfig Purpose: This function is optional function that is provided -to allow the user to configure the dll +to allow the user to configure the DLL input: a handle to the window that calls this function output: none -*******************************************************************/ +*/ + EXPORT void CALL DllConfig(void * hParent); -/****************************************************************** +/* Function: DllTest Purpose: This function is optional function that is provided -to allow the user to test the dll +to allow the user to test the DLL input: a handle to the window that calls this function output: none -*******************************************************************/ +*/ + EXPORT void CALL DllTest(void * hParent); -/****************************************************************** +/* Function: GetDllInfo Purpose: This function allows the emulator to gather information -about the dll by filling in the PluginInfo structure. -input: a pointer to a PLUGIN_INFO stucture that needs to be +about the DLL by filling in the PluginInfo structure. +input: a pointer to a PLUGIN_INFO structure that needs to be filled by the function. (see def above) output: none -*******************************************************************/ +*/ + EXPORT void CALL GetDllInfo(PLUGIN_INFO * PluginInfo); -/****************************************************************** +/* Function: InitiateSound Purpose: This function is called when the DLL is started to give -information from the emulator that the n64 audio +information from the emulator that the N64 audio interface needs Input: Audio_Info is passed to this function which is defined above. Output: TRUE on success -FALSE on failure to initialise +FALSE on failure to initialize -** note on interrupts **: +** Note on interrupts **: To generate an interrupt set the appropriate bit in MI_INTR_REG and then call the function CheckInterrupts to tell the emulator that there is a waiting interrupt. -*******************************************************************/ +*/ + EXPORT int32_t CALL InitiateAudio(AUDIO_INFO Audio_Info); -/****************************************************************** +/* Function: ProcessAList Purpose: This function is called when there is a Alist to be -processed. The Dll will have to work out all the info +processed. The DLL will have to work out all the info about the AList itself. input: none output: none -*******************************************************************/ +*/ + EXPORT void CALL ProcessAList(void); -/****************************************************************** +/* Function: RomClosed -Purpose: This function is called when a rom is closed. +Purpose: This function is called when a ROM is closed. input: none output: none -*******************************************************************/ +*/ + EXPORT void CALL RomClosed(void); diff --git a/Source/Project64-audio/ConfigUI.h b/Source/Project64-audio/ConfigUI.h index d8f468415..9c99fd2bd 100644 --- a/Source/Project64-audio/ConfigUI.h +++ b/Source/Project64-audio/ConfigUI.h @@ -1,3 +1,3 @@ #pragma once -void ConfigAudio(void * hParent); \ No newline at end of file +void ConfigAudio(void * hParent); diff --git a/Source/Project64-audio/Driver/DirectSound.cpp b/Source/Project64-audio/Driver/DirectSound.cpp index 47356fd27..013a530f0 100644 --- a/Source/Project64-audio/Driver/DirectSound.cpp +++ b/Source/Project64-audio/Driver/DirectSound.cpp @@ -3,6 +3,7 @@ // Copyright(C) 2001-2021 Project64. // Copyright(C) 2000-2015 Azimer // GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html + #include #include #include @@ -87,7 +88,7 @@ void DirectSoundDriver::StopAudio() m_AudioIsDone = true; if (WaitForSingleObject((HANDLE)m_handleAudioThread, 5000) == WAIT_TIMEOUT) { - WriteTrace(TraceAudioDriver, TraceError, "time out on close"); + WriteTrace(TraceAudioDriver, TraceError, "Time out on close"); TerminateThread((HANDLE)m_handleAudioThread, 1); } @@ -184,7 +185,7 @@ void DirectSoundDriver::AudioThreadProc() if (!m_AudioIsDone) { - WriteTrace(TraceAudioDriver, TraceDebug, "Audio Thread Started..."); + WriteTrace(TraceAudioDriver, TraceDebug, "Audio thread started..."); DWORD dwStatus; lpdsbuff->GetStatus(&dwStatus); if ((dwStatus & DSBSTATUS_PLAYING) == 0) @@ -223,7 +224,7 @@ void DirectSoundDriver::AudioThreadProc() // This means we had a buffer segment skipped if (next_pos != write_pos) { - WriteTrace(TraceAudioDriver, TraceDebug, "segment skipped"); + WriteTrace(TraceAudioDriver, TraceDebug, "Buffer segment skipped"); } // Store our last position @@ -244,7 +245,7 @@ void DirectSoundDriver::AudioThreadProc() // Time to write out to the buffer LPVOID lpvPtr1, lpvPtr2; DWORD dwBytes1, dwBytes2; - WriteTrace(TraceAudioDriver, TraceVerbose, "Lock Buffer"); + WriteTrace(TraceAudioDriver, TraceVerbose, "Lock buffer"); if (lpdsbuff->Lock(write_pos, m_LOCK_SIZE, &lpvPtr1, &dwBytes1, &lpvPtr2, &dwBytes2, 0) != DS_OK) { WriteTrace(TraceAudioDriver, TraceError, "Error locking sound buffer"); @@ -262,8 +263,8 @@ void DirectSoundDriver::AudioThreadProc() } } - // Fills dwBytes to the Sound Buffer - WriteTrace(TraceAudioDriver, TraceVerbose, "Unlock Buffer"); + // Fills dwBytes to the sound buffer + WriteTrace(TraceAudioDriver, TraceVerbose, "Unlock buffer"); if (FAILED(lpdsbuff->Unlock(lpvPtr1, dwBytes1, lpvPtr2, dwBytes2))) { WriteTrace(TraceAudioDriver, TraceError, "Error unlocking sound buffer"); @@ -276,5 +277,5 @@ void DirectSoundDriver::AudioThreadProc() { lpdsbuf->Stop(); } - WriteTrace(TraceAudioDriver, TraceDebug, "Audio Thread Terminated..."); + WriteTrace(TraceAudioDriver, TraceDebug, "Audio thread terminated..."); } diff --git a/Source/Project64-audio/Driver/DirectSound.h b/Source/Project64-audio/Driver/DirectSound.h index d119e7d1c..d104f4f83 100644 --- a/Source/Project64-audio/Driver/DirectSound.h +++ b/Source/Project64-audio/Driver/DirectSound.h @@ -9,8 +9,8 @@ class DirectSoundDriver : public: DirectSoundDriver(); bool Initialize(); - void StopAudio(); // Stops the Audio PlayBack (as if paused) - void StartAudio(); // Starts the Audio PlayBack (as if unpaused) + void StopAudio(); // Stops the audio playback (as if paused) + void StartAudio(); // Starts the audio playback (as if unpaused) void SetFrequency(uint32_t Frequency, uint32_t BufferSize); void SetVolume(uint32_t Volume); diff --git a/Source/Project64-audio/Driver/OpenSLES.h b/Source/Project64-audio/Driver/OpenSLES.h index 9217faa09..274e5716a 100644 --- a/Source/Project64-audio/Driver/OpenSLES.h +++ b/Source/Project64-audio/Driver/OpenSLES.h @@ -7,6 +7,7 @@ // Copyright(C) 2003 JttL // Copyright(C) 2002 Hacktarux // GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html + #pragma once #include #include @@ -24,4 +25,4 @@ public: private: SyncEvent m_AiUpdateEvent; -}; \ No newline at end of file +}; diff --git a/Source/Project64-audio/Driver/SoundBase.cpp b/Source/Project64-audio/Driver/SoundBase.cpp index 7a04f6aa6..d2fb00a54 100644 --- a/Source/Project64-audio/Driver/SoundBase.cpp +++ b/Source/Project64-audio/Driver/SoundBase.cpp @@ -3,6 +3,7 @@ // Copyright(C) 2001-2021 Project64 // Copyright(C) 2000-2015 Azimer // GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html + #include "SoundBase.h" #include #include @@ -164,7 +165,7 @@ void SoundDriverBase::BufferAudio() m_AI_DMAPrimaryBytes -= 4; if (m_AI_DMAPrimaryBytes == 0) { - WriteTrace(TraceAudioDriver, TraceVerbose, "Emptied Primary Buffer"); + WriteTrace(TraceAudioDriver, TraceVerbose, "Emptied primary buffer"); m_AI_DMAPrimaryBytes = m_AI_DMASecondaryBytes; m_AI_DMAPrimaryBuffer = m_AI_DMASecondaryBuffer; // Switch m_AI_DMASecondaryBytes = 0; m_AI_DMASecondaryBuffer = nullptr; *g_AudioInfo.AI_STATUS_REG = AI_STATUS_DMA_BUSY; diff --git a/Source/Project64-audio/Driver/SoundBase.h b/Source/Project64-audio/Driver/SoundBase.h index 9f1154b2a..b6de81ede 100644 --- a/Source/Project64-audio/Driver/SoundBase.h +++ b/Source/Project64-audio/Driver/SoundBase.h @@ -3,6 +3,7 @@ // Copyright(C) 2001-2021 Project64 // Copyright(C) 2000-2015 Azimer // GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html + #pragma once #include #include @@ -24,11 +25,11 @@ public: virtual void StopAudio(); protected: - enum { MAX_SIZE = 48000 * 2 * 2 }; // Max Buffer Size (44100Hz * 16bit * Stereo) + enum { MAX_SIZE = 48000 * 2 * 2 }; // Max buffer size (44100Hz * 16-bit * stereo) virtual bool Initialize(); void LoadAiBuffer(uint8_t *start, uint32_t length); // Reads in length amount of audio bytes - uint32_t m_MaxBufferSize; // Variable size determined by Playback rate + uint32_t m_MaxBufferSize; // Variable size determined by playback rate CriticalSection m_CS; private: @@ -38,7 +39,7 @@ private: uint8_t *m_AI_DMAPrimaryBuffer, *m_AI_DMASecondaryBuffer; uint32_t m_AI_DMAPrimaryBytes, m_AI_DMASecondaryBytes; uint32_t m_BufferRemaining; // Buffer remaining - uint32_t m_CurrentReadLoc; // Currently playing Buffer - uint32_t m_CurrentWriteLoc; // Currently writing Buffer + uint32_t m_CurrentReadLoc; // Currently playing buffer + uint32_t m_CurrentWriteLoc; // Currently writing buffer uint8_t m_Buffer[MAX_SIZE]; // Emulated buffers }; diff --git a/Source/Project64-audio/resource.h b/Source/Project64-audio/resource.h index 58effa34e..3e58312fd 100644 --- a/Source/Project64-audio/resource.h +++ b/Source/Project64-audio/resource.h @@ -2,10 +2,6 @@ // Microsoft Visual C++ generated include file. // Used by Project64-audio.rc // -#define VERSION_MINOR 0 -#define VER_VER_DEBUG 0 -#define VERSION_MAJOR 1 -#define VERSION_REVISION 1 #define IDD_CONFIG 9 #define IDD_LOG_SETTINGS 103 #define IDD_GAME_SETTING 104 @@ -23,7 +19,6 @@ #define IDC_TXT_TRACE_INTERFACE 1082 #define IDC_TXT_TRACE_AUDIO_DRIVER 1083 #define IDC_CMB_TRACE_THREAD 1090 -#define VERSION_BUILD 9999 // Next default values for new objects // diff --git a/Source/Project64-core/3rdParty/7zip.h b/Source/Project64-core/3rdParty/7zip.h index c1468b6b7..a6e02a537 100644 --- a/Source/Project64-core/3rdParty/7zip.h +++ b/Source/Project64-core/3rdParty/7zip.h @@ -49,13 +49,13 @@ private: int m_CurrentFile; bool m_Opened; - //Used for extraction - UInt32 m_blockIndex; // it can have any value before first call (if outBuffer = 0) - Byte * m_outBuffer; // it must be 0 before first call for each new archive. - size_t m_outBufferSize; // it can have any value before first call (if outBuffer = 0) + // Used for extraction + UInt32 m_blockIndex; // It can have any value before first call (if outBuffer = 0) + Byte * m_outBuffer; // It must be 0 before first call for each new archive + size_t m_outBufferSize; // It can have any value before first call (if outBuffer = 0) static void * AllocAllocImp(void *p, size_t size); - static void AllocFreeImp(void *p, void *address); /* address can be 0 */ + static void AllocFreeImp(void *p, void *address); // Address can be 0 static SRes SzFileReadImp(void *object, void *buffer, size_t *processedSize); static SRes SzFileSeekImp(void *p, Int64 *pos, ESzSeek origin); diff --git a/Source/Project64-core/Logging.cpp b/Source/Project64-core/Logging.cpp index 5e1232490..fe979f678 100644 --- a/Source/Project64-core/Logging.cpp +++ b/Source/Project64-core/Logging.cpp @@ -271,7 +271,7 @@ void CLogging::Log_LW(uint32_t PC, uint32_t VAddr) return; } g_MMU->LW_VAddr(VAddr, Value); - LogMessage("%08X: read word from Pif Ram at 0x%X (%08X)", PC, VAddr - 0xBFC007C0, Value); + LogMessage("%08X: read word from PIF RAM at 0x%X (%08X)", PC, VAddr - 0xBFC007C0, Value); return; } if (VAddr >= 0xB0000040 && ((VAddr - 0xB0000000) < g_Rom->GetRomSize())) @@ -288,12 +288,12 @@ void CLogging::Log_LW(uint32_t PC, uint32_t VAddr) g_MMU->LW_VAddr(VAddr, Value); switch (VAddr) { - case 0xB0000004: LogMessage("%08X: read from Rom Clock Rate (%08X)", PC, Value); break; - case 0xB0000008: LogMessage("%08X: read from Rom Boot address offset (%08X)", PC, Value); break; - case 0xB000000C: LogMessage("%08X: read from Rom Release offset (%08X)", PC, Value); break; - case 0xB0000010: LogMessage("%08X: read from Rom CRC1 (%08X)", PC, Value); break; - case 0xB0000014: LogMessage("%08X: read from Rom CRC2 (%08X)", PC, Value); break; - default: LogMessage("%08X: read from Rom header 0x%X (%08X)", PC, VAddr & 0xFF, Value); break; + case 0xB0000004: LogMessage("%08X: read from ROM clock rate (%08X)", PC, Value); break; + case 0xB0000008: LogMessage("%08X: read from ROM boot address offset (%08X)", PC, Value); break; + case 0xB000000C: LogMessage("%08X: read from ROM release offset (%08X)", PC, Value); break; + case 0xB0000010: LogMessage("%08X: read from ROM CRC1 (%08X)", PC, Value); break; + case 0xB0000014: LogMessage("%08X: read from ROM CRC2 (%08X)", PC, Value); break; + default: LogMessage("%08X: read from ROM header 0x%X (%08X)", PC, VAddr & 0xFF, Value); break; } return; } @@ -524,7 +524,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { if (LogPRDMAOperations()) { - LogMessage("%08X: A DMA transfer from the PIF ram has occured", PC); + LogMessage("%08X: A DMA transfer from the PIF RAM has occurred", PC); } if (!LogSerialInterface()) { @@ -536,7 +536,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { if (LogPRDMAOperations()) { - LogMessage("%08X: A DMA transfer to the PIF ram has occured", PC); + LogMessage("%08X: A DMA transfer to the PIF RAM has occurred", PC); } if (!LogSerialInterface()) { @@ -559,7 +559,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { return; } - LogMessage("%08X: Writing 0x%08X to Pif Ram at 0x%X", PC, Value, VAddr - 0xBFC007C0); + LogMessage("%08X: Writing 0x%08X to PIF RAM at 0x%X", PC, Value, VAddr - 0xBFC007C0); return; } if (!LogUnknown()) @@ -615,4 +615,4 @@ void CLogging::StopLog(void) delete m_hLogFile; m_hLogFile = nullptr; } -} \ No newline at end of file +} diff --git a/Source/Project64-core/Logging.h b/Source/Project64-core/Logging.h index 0dca880f5..092722e9b 100644 --- a/Source/Project64-core/Logging.h +++ b/Source/Project64-core/Logging.h @@ -15,4 +15,4 @@ public: private: static CFile * m_hLogFile; -}; \ No newline at end of file +}; diff --git a/Source/Project64-core/MemoryExceptionFilter.cpp b/Source/Project64-core/MemoryExceptionFilter.cpp index 123d0c391..71b5d4dc6 100644 --- a/Source/Project64-core/MemoryExceptionFilter.cpp +++ b/Source/Project64-core/MemoryExceptionFilter.cpp @@ -27,7 +27,7 @@ bool CMipsMemoryVM::FilterX86Exception(uint32_t MemAddress, X86_CONTEXT & contex if ((int32_t)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) { - WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory adderess: %X", MemAddress); + WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory address: %X", MemAddress); if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); @@ -445,7 +445,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context { if ((int32_t)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) { - WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory adderess: %X", MemAddress); + WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory address: %X", MemAddress); DumpArmExceptionInfo(MemAddress, context); g_Notify->BreakPoint(__FILE__, __LINE__); return false; @@ -488,7 +488,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm2.opcode == 0xF84 && OpCode32->imm2.Opcode2 == 0) { - //42 f8 03 c0 str.w ip, [r2, r3] + // 42 f8 03 c0 str.w ip, [r2, r3] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -502,7 +502,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm12.opcode == 0xF8C) { - //c9 f8 00 b0 str.w r11, [r9] + // c9 f8 00 b0 str.w r11, [r9] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -516,7 +516,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm12.opcode == 0xF8D) { - //dc f8 70 70 ldr.w r7, [ip, #112] + // dc f8 70 70 ldr.w r7, [ip, #112] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->imm12.rt])) { if (ShowUnhandledMemory()) @@ -530,8 +530,8 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 0 && OpCode32->reg_cond_imm5.opcode2 == 0 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //17847001 strne r7, [r4, r1] - //e789300c str r3, [r9, ip] + // 17847001 strne r7, [r4, r1] + // e789300c str r3, [r9, ip] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -543,7 +543,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context return true; } - if (OpCode->Reg.opcode == 0x2A) //STRB + if (OpCode->Reg.opcode == 0x2A) // STRB { if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode->Reg.rt])) { @@ -558,7 +558,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 1 && OpCode32->reg_cond_imm5.opcode2 == 0 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //17c32001 strbne r2, [r3, r1] + // 17c32001 strbne r2, [r3, r1] if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -572,7 +572,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm8.opcode == 0 && OpCode32->reg_cond_imm8.opcode1 == 1 && OpCode32->reg_cond_imm8.opcode2 == 0 && OpCode32->reg_cond_imm8.opcode3 == 0xB) { - //11c020b0 strhne r2, [r0] + // 11c020b0 strhne r2, [r0] if (!g_MMU->SH_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm8.rt])) { if (ShowUnhandledMemory()) @@ -614,7 +614,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xC) { - //2e 60 str r6, [r5, #0] + // 2e 60 str r6, [r5, #0] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -628,7 +628,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xD) { - //3F 68 ldr r7, [r7, #0] + // 3F 68 ldr r7, [r7, #0] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -642,7 +642,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xE) { - //b8 70 strb r0, [r7, #2] + // b8 70 strb r0, [r7, #2] if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -656,7 +656,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond.opcode == 0 && OpCode32->reg_cond.opcode1 == 0 && OpCode32->reg_cond.opcode2 == 0 && OpCode32->reg_cond.opcode3 == 0xB) { - //118320b1 strhne r2, [r3, r1] + // 118320b1 strhne r2, [r3, r1] if (!g_MMU->SH_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond.rt])) { if (ShowUnhandledMemory()) @@ -670,7 +670,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm12.opcode == 2 && OpCode32->reg_cond_imm12.opcode1 == 0 && OpCode32->reg_cond_imm12.opcode2 == 0) { - //e48a1004 str r1, [sl], #4 + // e48a1004 str r1, [sl], #4 if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm12.rt])) { if (ShowUnhandledMemory()) @@ -684,7 +684,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->uint16.opcode == ArmLDRH_W) { - //f833 c001 ldrh.w ip, [r3, r1] + // f833 c001 ldrh.w ip, [r3, r1] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->uint16.rt], false)) { if (ShowUnhandledMemory()) @@ -698,7 +698,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->uint32.opcode == ArmLDRH_Reg && OpCode32->uint32.opcode2 == 0xB) { - //e19a20b2 ldrh r2, [sl, r2] + // e19a20b2 ldrh r2, [sl, r2] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->uint32.rt], false)) { if (ShowUnhandledMemory()) @@ -712,8 +712,8 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond.opcode == 0 && OpCode32->reg_cond.opcode1 == 0 && OpCode32->reg_cond.opcode2 == 1 && OpCode32->reg_cond.opcode3 == 0xB) { - //119330b1 ldrhne r3, [r3, r1] - //11d000b0 ldrhne r0, [r0] + // 119330b1 ldrhne r3, [r3, r1] + // 11d000b0 ldrhne r0, [r0] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->reg_cond.rt], false)) { if (ShowUnhandledMemory()) @@ -727,7 +727,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 0 && OpCode32->reg_cond_imm5.opcode2 == 1 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //1790a001 ldrne sl, [r0, r1] + // 1790a001 ldrne sl, [r0, r1] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -741,7 +741,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm2.opcode == 0xF85 && OpCode32->imm2.Opcode2 == 0) { - //52 f8 21 30 ldr.w r3, [r2, r1, lsl #2] + // 52 f8 21 30 ldr.w r3, [r2, r1, lsl #2] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -771,7 +771,7 @@ void CMipsMemoryVM::segv_handler(int signal, siginfo_t *siginfo, void *sigcontex { ucontext_t *ucontext = (ucontext_t*)sigcontext; - WriteTrace(TraceExceptionHandler, TraceNotice, "Segmentation Fault!"); + WriteTrace(TraceExceptionHandler, TraceNotice, "Segmentation fault!"); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_signo = %d", signal); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_errno = %d", siginfo->si_errno); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_code = %d", siginfo->si_code); @@ -818,8 +818,8 @@ void CMipsMemoryVM::segv_handler(int signal, siginfo_t *siginfo, void *sigcontex return; } #endif - WriteTrace(TraceExceptionHandler, TraceError, "Failed quiting now"); - exit(0); //can't return to main, it's where the segfault occured. + WriteTrace(TraceExceptionHandler, TraceError, "Failed! Quitting now..."); + exit(0); // Can't return to main, this is where the segmentation fault occurred } #else @@ -834,7 +834,7 @@ int32_t CMipsMemoryVM::MemoryFilter(uint32_t dwExptCode, void * lpExceptionPoint } } - //convert the pointer since we are not having win32 structures in headers + // Convert the pointer since we are not having win32 structures in headers LPEXCEPTION_POINTERS lpEP = (LPEXCEPTION_POINTERS)lpExceptionPointer; uint32_t MemAddress = (char *)lpEP->ExceptionRecord->ExceptionInformation[1] - (char *)g_MMU->Rdram(); @@ -859,4 +859,4 @@ int32_t CMipsMemoryVM::MemoryFilter(uint32_t dwExptCode, void * lpExceptionPoint return EXCEPTION_EXECUTE_HANDLER; #endif } -#endif \ No newline at end of file +#endif diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index 037be7723..6a0ec58e5 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -4,16 +4,15 @@ enum LanguageStringID { EMPTY_STRING = 0, - /********************************************************************************* - * Meta Information * - *********************************************************************************/ - //About DLL + // Meta Information + + // About DLL LANGUAGE_NAME = 1, LANGUAGE_AUTHOR = 2, LANGUAGE_VERSION = 3, LANGUAGE_DATE = 4, - //About DLL Dialog + // About DLL dialog INI_CURRENT_LANG = 5, INI_AUTHOR = 6, INI_VERSION = 7, @@ -23,12 +22,11 @@ enum LanguageStringID INI_CURRENT_CHT = 11, INI_CURRENT_RDX = 12, - //About INI title + // About INI title INI_TITLE = 20, - /********************************************************************************* - * Numbers * - *********************************************************************************/ + // Numbers + NUMBER_0 = 50, NUMBER_1 = 51, NUMBER_2 = 52, @@ -40,10 +38,9 @@ enum LanguageStringID NUMBER_8 = 58, NUMBER_9 = 59, - /********************************************************************************* - * Menu * - *********************************************************************************/ - //File Menu + // Menu + + // File menu MENU_FILE = 100, MENU_OPEN = 101, MENU_ROM_INFO = 102, @@ -56,7 +53,7 @@ enum LanguageStringID MENU_EXIT = 109, MENU_OPEN_COMBO = 110, - //System Menu + // System menu MENU_SYSTEM = 120, MENU_RESET = 121, MENU_PAUSE = 122, @@ -75,7 +72,7 @@ enum LanguageStringID MENU_SWAPDISK = 135, MENU_ENHANCEMENT = 136, - //Options Menu + // Options menu MENU_OPTIONS = 140, MENU_FULL_SCREEN = 141, MENU_ON_TOP = 142, @@ -86,20 +83,20 @@ enum LanguageStringID MENU_SHOW_CPU = 147, MENU_SETTINGS = 148, - //Debugger Menu + // Debugger menu MENU_DEBUGGER = 160, - //Language Menu + // Language menu MENU_LANGUAGE = 175, - //Help Menu + // Help menu MENU_HELP = 180, MENU_ABOUT_PJ64 = 182, MENU_WEBSITE = 184, MENU_SUPPORT_PROJECT64 = 185, MENU_DISCORD = 186, - //Current Save Slot menu + // Current save slot menu MENU_SLOT_DEFAULT = 190, MENU_SLOT_1 = 191, MENU_SLOT_2 = 192, @@ -113,7 +110,7 @@ enum LanguageStringID MENU_SLOT_10 = 200, MENU_SLOT_SAVE = 201, - //Pop up Menu + // Pop up menu POPUP_PLAY = 210, POPUP_INFO = 211, POPUP_SETTINGS = 212, @@ -122,7 +119,7 @@ enum LanguageStringID POPUP_PLAYDISK = 215, POPUP_ENHANCEMENTS = 216, - //selecting save slot + // Selecting save slot SAVE_SLOT_DEFAULT = 220, SAVE_SLOT_1 = 221, SAVE_SLOT_2 = 222, @@ -135,7 +132,7 @@ enum LanguageStringID SAVE_SLOT_9 = 229, SAVE_SLOT_10 = 230, - // Menu Descriptions (TODO: unused ? implement or remove) + // Menu descriptions (TODO: Unused? Implement or remove) MENUDES_OPEN = 250, MENUDES_ROM_INFO = 251, MENUDES_START = 252, @@ -174,10 +171,10 @@ enum LanguageStringID MENUDES_GAME_SETTINGS = 285, MENUDES_GAME_CHEATS = 286, - /********************************************************************************* - * Rom Browser * - *********************************************************************************/ - //Rom Browser Fields + + // ROM browser + + // ROM browser fields RB_FILENAME = 300, RB_INTERNALNAME = 301, RB_GOODNAME = 302, @@ -201,19 +198,18 @@ enum LanguageStringID RB_NAME = 321, - //Select Rom + // Select ROM SELECT_ROM_DIR = 320, - //Messages + // Messages RB_NOT_GOOD_FILE = 340, - /********************************************************************************* - * Options * - *********************************************************************************/ - //Options Title + // Options + + // Options title OPTIONS_TITLE = 400, - //Tabs + // Tabs TAB_PLUGIN = 401, TAB_DIRECTORY = 402, TAB_OPTIONS = 403, @@ -229,7 +225,7 @@ enum LanguageStringID TAB_DISKDRIVE = 413, TAB_DISKSETTINGS = 414, - //Plugin Dialog + // Plugin dialog PLUG_ABOUT = 420, PLUG_RSP = 421, PLUG_GFX = 422, @@ -239,7 +235,7 @@ enum LanguageStringID PLUG_HLE_AUDIO = 426, PLUG_DEFAULT = 427, - //Directory Dialog + // Directory dialog DIR_PLUGIN = 440, DIR_ROM = 441, DIR_AUTO_SAVE = 442, @@ -254,7 +250,7 @@ enum LanguageStringID DIR_TEXTURE = 451, DIR_SELECT_TEXTURE = 452, - //Options (general) Tab + // Options (general) tab OPTION_AUTO_SLEEP = 460, OPTION_AUTO_FULLSCREEN = 461, OPTION_BASIC_MODE = 462, @@ -273,7 +269,7 @@ enum LanguageStringID OPTION_SHOW_STATUS_BAR = 474, OPTION_EXIT_FULLSCREEN_ON_LOSE_FOCUS = 475, - //Rom Browser Tab + // ROM browser tab RB_MAX_ROMS = 480, RB_ROMS = 481, RB_MAX_DIRS = 482, @@ -289,7 +285,7 @@ enum LanguageStringID RB_REFRESH = 492, RB_FILEEXT = 493, - //Advanced Options + // Advanced options ADVANCE_INFO = 500, ADVANCE_DEFAULTS = 501, ADVANCE_CPU_STYLE = 502, @@ -306,7 +302,7 @@ enum LanguageStringID ADVANCE_SMM_PROTECT = 513, ADVANCE_SMM_TLB = 514, - //Rom Options + // ROM options ROM_CPU_STYLE = 520, ROM_VIREFRESH = 521, ROM_MEM_SIZE = 522, @@ -335,12 +331,12 @@ enum LanguageStringID ROM_DISK_SEEK_TIMING_TURBO = 5441, ROM_DISK_SEEK_TIMING_SLOW = 5442, - //Core Styles + // Core styles CORE_INTERPTER = 540, CORE_RECOMPILER = 541, CORE_SYNC = 542, - //Self Mod Methods + // Self-mod methods SMCM_NONE = 560, SMCM_CACHE = 561, SMCM_PROECTED = 562, @@ -349,35 +345,35 @@ enum LanguageStringID SMCM_CHECK_ADV = 565, SMCM_CACHE2 = 566, - //Function Lookup memthod + // Function lookup method FLM_PLOOKUP = 570, FLM_VLOOKUP = 571, FLM_CHANGEMEM = 572, - //RDRAM Size + // RDRAM size RDRAM_4MB = 580, RDRAM_8MB = 581, - //Advanced Block Linking + // Advanced block linking ABL_ON = 600, ABL_OFF = 601, - //Save Type + // Save type SAVE_FIRST_USED = 620, SAVE_4K_EEPROM = 621, SAVE_16K_EEPROM = 622, SAVE_SRAM = 623, SAVE_FLASHRAM = 624, - //Shell Integration Tab + // Shell integration tab SHELL_TEXT = 640, - //Rom Notes + // ROM notes NOTE_STATUS = 660, NOTE_CORE = 661, NOTE_PLUGIN = 662, - // Accelerator Selector + // Accelerator selector ACCEL_CPUSTATE_TITLE = 680, ACCEL_MENUITEM_TITLE = 681, ACCEL_CURRENTKEYS_TITLE = 682, @@ -392,7 +388,7 @@ enum LanguageStringID ACCEL_CPUSTATE_4 = 691, ACCEL_DETECTKEY = 692, - // Frame Rate Option + // Frame rate option STR_FR_VIS = 700, STR_FR_DLS = 701, STR_FR_PERCENT = 702, @@ -403,23 +399,22 @@ enum LanguageStringID STR_INSREASE_SPEED = 710, STR_DECREASE_SPEED = 711, - //Bottom page buttons + // Bottom page buttons BOTTOM_RESET_PAGE = 720, BOTTOM_RESET_ALL = 721, BOTTOM_APPLY = 722, BOTTOM_CLOSE = 723, - //Disk Save Type + // Disk save type DISKSAVE_SHADOW = 730, DISKSAVE_RAM = 731, - /********************************************************************************* - * ROM Information * - *********************************************************************************/ - //Rom Info Title Title + // ROM information + + // ROM info title INFO_TITLE = 800, - //Rom Info Text + // ROM info text INFO_ROM_NAME_TEXT = 801, INFO_FILE_NAME_TEXT = 802, INFO_LOCATION_TEXT = 803, @@ -432,17 +427,16 @@ enum LanguageStringID INFO_CIC_CHIP_TEXT = 810, INFO_MD5_TEXT = 811, - /********************************************************************************* - * Cheats * - *********************************************************************************/ - //Cheat List + // Cheats + + // Cheat list CHEAT_TITLE = 1000, CHEAT_LIST_FRAME = 1001, CHEAT_NOTES_FRAME = 1002, CHEAT_MARK_ALL = 1003, CHEAT_MARK_NONE = 1004, - //Add Cheat + // Add cheat CHEAT_ADDCHEAT_FRAME = 1005, CHEAT_ADDCHEAT_NAME = 1006, CHEAT_ADDCHEAT_CODE = 1007, @@ -451,13 +445,13 @@ enum LanguageStringID CHEAT_ADDCHEAT_NOTES = 1010, CHEAT_ADD_TO_DB = 1011, - //Code extension + // Code extension CHEAT_CODE_EXT_TITLE = 1012, CHEAT_CODE_EXT_TXT = 1013, CHEAT_OK = 1014, CHEAT_CANCEL = 1015, - //Digital Value + // Digital value CHEAT_QUANTITY_TITLE = 1016, CHEAT_CHOOSE_VALUE = 1017, CHEAT_VALUE = 1018, @@ -470,18 +464,18 @@ enum LanguageStringID CHEAT_ADDCHEAT_OPT = 1025, CHEAT_ADDCHEAT_OPTDES = 1026, - //Edit Cheat + // Edit cheat CHEAT_EDITCHEAT_WINDOW = 1027, CHEAT_EDITCHEAT_UPDATE = 1028, CHEAT_CHANGED_MSG = 1029, CHEAT_CHANGED_TITLE = 1030, - //Cheat Popup Menu + // Cheat popup menu CHEAT_ADDNEW = 1040, CHEAT_EDIT = 1041, CHEAT_DELETE = 1042, - // short cut editor + // Short cut editor STR_SHORTCUT_RESET_TITLE = 1100, STR_SHORTCUT_RESET_TEXT = 1101, STR_SHORTCUT_FILEMENU = 1102, @@ -489,9 +483,8 @@ enum LanguageStringID STR_SHORTCUT_OPTIONS = 1104, STR_SHORTCUT_SAVESLOT = 1105, - /********************************************************************************* - * Support Window * - *********************************************************************************/ + // Support window + MSG_SUPPORT_TITLE = 1200, MSG_SUPPORT_INFO = 1201, MSG_SUPPORT_ENTER_CODE = 1202, @@ -508,14 +501,12 @@ enum LanguageStringID MSG_SUPPORT_REQUESTCODE_SUCCESS = 1213, MSG_SUPPORT_REQUESTCODE_FAIL = 1214, - /********************************************************************************* - * Enhancements * - *********************************************************************************/ + // Enhancements + ENHANCEMENT_TITLE = 1300, - /********************************************************************************* - * Messages * - *********************************************************************************/ + // Messages + MSG_CPU_PAUSED = 2000, MSG_CPU_RESUMED = 2001, MSG_PERM_LOOP = 2002, @@ -582,9 +573,8 @@ enum LanguageStringID MSG_CHEAT_INVALID_MSG = 2063, MSG_CHEAT_INVALID_TITLE = 2064, - /********************************************************************************* - * Android * - *********************************************************************************/ + // Android + ANDROID_SETTINGS = 3000, ANDROID_FORUM = 3001, ANDROID_REPORT_BUG = 3002, @@ -610,7 +600,7 @@ enum LanguageStringID ANDROID_SUPPORT_PJ64 = 3022, ANDROID_REVIEW_PJ64 = 3023, - //In game menu + // In-game menu ANDROID_MENU_SETTINGS = 3100, ANDROID_MENU_SAVESTATE = 3101, ANDROID_MENU_LOADSTATE = 3102, @@ -626,7 +616,7 @@ enum LanguageStringID ANDROID_MENU_RESETFUNCTIONTIMES = 3112, ANDROID_MENU_DUMPFUNCTIONTIMES = 3113, - //Video plugin + // Video plugin ANDROID_VIDEO_NATIVE_RES = 3200, }; diff --git a/Source/Project64-core/Multilanguage/Language.cpp b/Source/Project64-core/Multilanguage/Language.cpp index 80a020565..b6ef06215 100644 --- a/Source/Project64-core/Multilanguage/Language.cpp +++ b/Source/Project64-core/Multilanguage/Language.cpp @@ -11,16 +11,15 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(EMPTY_STRING, ""); - /********************************************************************************* - * Meta Information * - *********************************************************************************/ - //About DLL + // Meta information + + // About DLL DEF_STR(LANGUAGE_NAME, ""); DEF_STR(LANGUAGE_AUTHOR, ""); DEF_STR(LANGUAGE_VERSION, ""); DEF_STR(LANGUAGE_DATE, ""); - //About DLL Dialog + // About DLL dialog DEF_STR(INI_CURRENT_LANG, "Current Language"); DEF_STR(INI_AUTHOR, "Author"); DEF_STR(INI_VERSION, "Version"); @@ -30,12 +29,11 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(INI_CURRENT_CHT, "Cheat Code File (.CHT)"); DEF_STR(INI_CURRENT_RDX, "Extended ROM Info (.RDX)"); - //About INI title + // About INI title DEF_STR(INI_TITLE, "About Config Files"); - /********************************************************************************* - * Numbers * - *********************************************************************************/ + // Numbers + DEF_STR(NUMBER_0, "0"); DEF_STR(NUMBER_1, "1"); DEF_STR(NUMBER_2, "2"); @@ -47,10 +45,9 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(NUMBER_8, "8"); DEF_STR(NUMBER_9, "9"); - /********************************************************************************* - * Menu * - *********************************************************************************/ - //File Menu + // Menu + + // File menu DEF_STR(MENU_FILE, "&File"); DEF_STR(MENU_OPEN, "&Open ROM"); DEF_STR(MENU_ROM_INFO, "ROM &Info...."); @@ -63,7 +60,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_EXIT, "E&xit"); DEF_STR(MENU_OPEN_COMBO, "Open &Combo"); - //System Menu + // System menu DEF_STR(MENU_SYSTEM, "&System"); DEF_STR(MENU_RESET, "&Reset"); DEF_STR(MENU_PAUSE, "&Pause"); @@ -82,7 +79,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SWAPDISK, "Swap &Disk"); DEF_STR(MENU_ENHANCEMENT, "Enhancement..."); - //Options Menu + // Options menu DEF_STR(MENU_OPTIONS, "&Options"); DEF_STR(MENU_FULL_SCREEN, "&Full Screen"); DEF_STR(MENU_ON_TOP, "&Always on &Top"); @@ -93,20 +90,20 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SHOW_CPU, "Show CPU Usage"); DEF_STR(MENU_SETTINGS, "&Settings..."); - //Debugger Menu + // Debugger menu DEF_STR(MENU_DEBUGGER, "&Debugger"); - //Language Menu + // Language menu DEF_STR(MENU_LANGUAGE, "&Language"); - //Help Menu + // Help menu DEF_STR(MENU_HELP, "&Help"); DEF_STR(MENU_ABOUT_PJ64, "&About Project64"); DEF_STR(MENU_WEBSITE, "&Website"); DEF_STR(MENU_SUPPORT_PROJECT64, "&Support Project64"); DEF_STR(MENU_DISCORD, "&Discord"); - //Current Save Slot menu + // Current save slot menu DEF_STR(MENU_SLOT_DEFAULT, "Default"); DEF_STR(MENU_SLOT_1, "Slot 1"); DEF_STR(MENU_SLOT_2, "Slot 2"); @@ -120,7 +117,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SLOT_10, "Slot 10"); DEF_STR(MENU_SLOT_SAVE, "Save slot (%s) selected"); - //Pop up Menu + // Pop-up menu DEF_STR(POPUP_PLAY, "Play Game"); DEF_STR(POPUP_INFO, "ROM Information"); DEF_STR(POPUP_SETTINGS, "Edit Game Settings"); @@ -129,7 +126,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(POPUP_PLAYDISK, "Play Game with Disk"); DEF_STR(POPUP_ENHANCEMENTS, "Choose Enhancement"); - //Alternate Name to save Slot + // Alternate name to save slot DEF_STR(SAVE_SLOT_DEFAULT, "Save Slot - Default"); DEF_STR(SAVE_SLOT_1, "Save Slot - 1"); DEF_STR(SAVE_SLOT_2, "Save Slot - 2"); @@ -142,10 +139,9 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(SAVE_SLOT_9, "Save Slot - 9"); DEF_STR(SAVE_SLOT_10, "Save Slot - 10"); - /********************************************************************************* - * ROM Browser * - *********************************************************************************/ - //ROM Browser Fields + // ROM browser + + // ROM browser fields DEF_STR(RB_FILENAME, "File Name"); DEF_STR(RB_INTERNALNAME, "Internal Name"); DEF_STR(RB_GOODNAME, "Good Name"); @@ -168,19 +164,18 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(RB_FORCE_FEEDBACK, "Force Feedback"); DEF_STR(RB_FILE_FORMAT, "File Format"); - //Select ROM + // Select ROM DEF_STR(SELECT_ROM_DIR, "Select current ROM directory"); - //Messages + // Messages (TODO: GoodN64 is no longer maintained and perhaps should be replaced with references to something else?) DEF_STR(RB_NOT_GOOD_FILE, "Bad ROM? Use GoodN64 & check that the RDB is up-to-date."); - /********************************************************************************* - * Options * - *********************************************************************************/ - //Options Title + // Options + + // Options title DEF_STR(OPTIONS_TITLE, "Settings"); - //Tabs + // Tabs DEF_STR(TAB_PLUGIN, "Plugins"); DEF_STR(TAB_DIRECTORY, "Directories"); DEF_STR(TAB_OPTIONS, "Options"); @@ -196,7 +191,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(TAB_DISKDRIVE, "64DD"); DEF_STR(TAB_DISKSETTINGS, "64DD"); - //Plugin Dialog + // Plugin dialog DEF_STR(PLUG_ABOUT, "About"); DEF_STR(PLUG_RSP, " RSP (Reality Signal Processor) plugin: "); DEF_STR(PLUG_GFX, " Video (graphics) plugin: "); @@ -206,7 +201,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(PLUG_HLE_AUDIO, "Audio HLE"); DEF_STR(PLUG_DEFAULT, "** Use System Plugin **"); - //Directory Dialog + // Directory dialog DEF_STR(DIR_PLUGIN, " Plugin directory: "); DEF_STR(DIR_ROM, " ROM directory: "); DEF_STR(DIR_AUTO_SAVE, " N64 native saves directory: "); @@ -221,7 +216,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(DIR_TEXTURE, " Texture pack directory: "); DEF_STR(DIR_SELECT_TEXTURE, "Select texture pack directory"); - //Options (general) Tab + // Options (general) tab DEF_STR(OPTION_AUTO_SLEEP, "Pause emulation when window is not active"); DEF_STR(OPTION_AUTO_FULLSCREEN, "Enter full-screen mode when loading a ROM"); DEF_STR(OPTION_BASIC_MODE, "Hide advanced settings"); @@ -239,7 +234,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(OPTION_SHOW_STATUS_BAR, "Show Status Bar"); DEF_STR(OPTION_EXIT_FULLSCREEN_ON_LOSE_FOCUS, "Exit full screen on lose focus"); - //ROM Browser Tab + // ROM browser tab DEF_STR(RB_MAX_ROMS, "Max # of ROMs remembered (0-10):"); DEF_STR(RB_ROMS, "ROMs"); DEF_STR(RB_MAX_DIRS, "Max # of ROM dirs remembered (0-10):"); @@ -255,7 +250,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(RB_DOWN, "Down"); DEF_STR(RB_REFRESH, "Automatically refresh browser"); - //Advanced Options + // Advanced options DEF_STR(ADVANCE_INFO, "Most of these changes will not take effect until a new ROM is opened or current ROM is reset."); DEF_STR(ADVANCE_DEFAULTS, "Core Defaults"); DEF_STR(ADVANCE_CPU_STYLE, "CPU core style:"); @@ -272,7 +267,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ADVANCE_SMM_PROTECT, "Protect memory"); DEF_STR(ADVANCE_SMM_TLB, "TLB unmapping"); - //ROM Options + // ROM options DEF_STR(ROM_CPU_STYLE, "CPU core style:"); DEF_STR(ROM_VIREFRESH, "VI refresh rate:"); DEF_STR(ROM_MEM_SIZE, "Memory size:"); @@ -301,12 +296,12 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ROM_DISK_SEEK_TIMING_TURBO, "Turbo"); DEF_STR(ROM_DISK_SEEK_TIMING_SLOW, "Slow"); - //Core Styles + // Core styles DEF_STR(CORE_INTERPTER, "Interpreter"); DEF_STR(CORE_RECOMPILER, "Recompiler"); DEF_STR(CORE_SYNC, "Synchronize cores"); - //Self Mod Methods + // Self-mod methods DEF_STR(SMCM_NONE, "None"); DEF_STR(SMCM_CACHE, "Cache"); DEF_STR(SMCM_PROECTED, "Protect memory"); @@ -315,35 +310,35 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(SMCM_CHECK_ADV, "Check memory advance"); DEF_STR(SMCM_CACHE2, "Clear code on cache"); - //Function Lookup method + // Function lookup method DEF_STR(FLM_PLOOKUP, "Physical lookup table"); DEF_STR(FLM_VLOOKUP, "Virtual lookup table"); DEF_STR(FLM_CHANGEMEM, "Change memory"); - //RDRAM Size + // RDRAM size DEF_STR(RDRAM_4MB, "4 MB"); DEF_STR(RDRAM_8MB, "8 MB"); - //Advanced Block Linking + // Advanced block linking DEF_STR(ABL_ON, "On"); DEF_STR(ABL_OFF, "Off"); - //Save Type + // Save type DEF_STR(SAVE_FIRST_USED, "Use first-used save type"); DEF_STR(SAVE_4K_EEPROM, "4-kbit EEPROM"); DEF_STR(SAVE_16K_EEPROM, "16-kbit EEPROM"); DEF_STR(SAVE_SRAM, "SRAM"); DEF_STR(SAVE_FLASHRAM, "Flash RAM"); - //Shell Integration Tab + // Shell integration tab DEF_STR(SHELL_TEXT, "File extension association:"); - //ROM Notes + // ROM notes DEF_STR(NOTE_STATUS, "ROM status:"); DEF_STR(NOTE_CORE, "Core note:"); DEF_STR(NOTE_PLUGIN, "Plugin note:"); - // Accelerator Selector + // Accelerator selector DEF_STR(ACCEL_CPUSTATE_TITLE, "CPU state:"); DEF_STR(ACCEL_MENUITEM_TITLE, "Menu item:"); DEF_STR(ACCEL_CURRENTKEYS_TITLE, "Current keys:"); @@ -358,7 +353,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ACCEL_CPUSTATE_4, "Game playing (full-screen)"); DEF_STR(ACCEL_DETECTKEY, "Detect Key"); - // Frame Rate Option + // Frame rate option DEF_STR(STR_FR_VIS, "Vertical interrupts per second"); DEF_STR(STR_FR_DLS, "Display lists per second"); DEF_STR(STR_FR_PERCENT, "Percentage of full speed"); @@ -368,23 +363,22 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(STR_INSREASE_SPEED, "Increase Game Speed"); DEF_STR(STR_DECREASE_SPEED, "Decrease Game Speed"); - //Bottom page buttons + // Bottom page buttons DEF_STR(BOTTOM_RESET_PAGE, "Reset Page"); DEF_STR(BOTTOM_RESET_ALL, "Reset All"); DEF_STR(BOTTOM_APPLY, "Apply"); DEF_STR(BOTTOM_CLOSE, "Close"); - //Disk Save Type + // Disk save type DEF_STR(DISKSAVE_SHADOW, "Full Disk Copy"); DEF_STR(DISKSAVE_RAM, "Save Area Only"); - /********************************************************************************* - * ROM Information * - *********************************************************************************/ - //ROM Info Title + // ROM Information + + // ROM info title DEF_STR(INFO_TITLE, "ROM Information"); - //ROM Info Text + // ROM info text DEF_STR(INFO_ROM_NAME_TEXT, "ROM name:"); DEF_STR(INFO_FILE_NAME_TEXT, "File name:"); DEF_STR(INFO_LOCATION_TEXT, "Location:"); @@ -397,17 +391,16 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(INFO_CIC_CHIP_TEXT, "CIC chip:"); DEF_STR(INFO_MD5_TEXT, "MD5:"); - /********************************************************************************* - * Cheats * - *********************************************************************************/ - //Cheat List + // Cheats + + // Cheat list DEF_STR(CHEAT_TITLE, "Cheats"); DEF_STR(CHEAT_LIST_FRAME, "Cheats:"); DEF_STR(CHEAT_NOTES_FRAME, " Notes: "); DEF_STR(CHEAT_MARK_ALL, "Mark All"); DEF_STR(CHEAT_MARK_NONE, "Unmark All"); - //Add Cheat + // Add cheat DEF_STR(CHEAT_ADDCHEAT_FRAME, "Add Cheat"); DEF_STR(CHEAT_ADDCHEAT_NAME, "Name:"); DEF_STR(CHEAT_ADDCHEAT_CODE, "Code:"); @@ -416,13 +409,13 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(CHEAT_ADDCHEAT_NOTES, " Cheat Notes: "); DEF_STR(CHEAT_ADD_TO_DB, "Add to DB"); - //Code extension + // Code extension DEF_STR(CHEAT_CODE_EXT_TITLE, "Code Extensions"); DEF_STR(CHEAT_CODE_EXT_TXT, "Please choose a value to be used for:"); DEF_STR(CHEAT_OK, "OK"); DEF_STR(CHEAT_CANCEL, "Cancel"); - //Digital Value + // Digital value DEF_STR(CHEAT_QUANTITY_TITLE, "Quantity Digit"); DEF_STR(CHEAT_CHOOSE_VALUE, "Please choose a value for:"); DEF_STR(CHEAT_VALUE, "&Value"); @@ -435,60 +428,56 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(CHEAT_ADDCHEAT_OPT, "Options:"); DEF_STR(CHEAT_ADDCHEAT_OPTDES, "