Merge branch 'master' of https://github.com/project64/project64
This commit is contained in:
commit
2b6e70cde0
|
@ -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
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
// Copyright(C) 2003 JttL
|
||||
// Copyright(C) 2002 Hacktarux
|
||||
// GNU/GPLv2 licensed: https://gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
#include <Common/Util.h>
|
||||
#ifdef _WIN32
|
||||
#include <Project64-audio/Driver/DirectSound.h>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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 <stdint.h>
|
||||
|
@ -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);
|
||||
|
|
|
@ -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 <windows.h>
|
||||
#include <mmreg.h>
|
||||
#include <dsound.h>
|
||||
|
@ -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...");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 <Common/SyncEvent.h>
|
||||
#include <Project64-audio/Audio_1.1.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
|
||||
|
||||
#include "SoundBase.h"
|
||||
#include <Common/Util.h>
|
||||
#include <Project64-audio/AudioSettings.h>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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 <Common/SyncEvent.h>
|
||||
#include <Common/CriticalSection.h>
|
||||
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
@ -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, "<value> <label>");
|
||||
|
||||
//Edit Cheat
|
||||
// Edit cheat
|
||||
DEF_STR(CHEAT_EDITCHEAT_WINDOW, "Edit Cheat");
|
||||
DEF_STR(CHEAT_EDITCHEAT_UPDATE, "Update Cheat");
|
||||
DEF_STR(CHEAT_CHANGED_MSG, "Cheat has been changed.\n\nDo you want to update?");
|
||||
DEF_STR(CHEAT_CHANGED_TITLE, "Cheat updated");
|
||||
|
||||
//Cheat Popup Menu
|
||||
// Cheat Pop-up menu
|
||||
DEF_STR(CHEAT_ADDNEW, "Add New Cheat...");
|
||||
DEF_STR(CHEAT_EDIT, "Edit");
|
||||
DEF_STR(CHEAT_DELETE, "Delete");
|
||||
|
||||
// short-cut editor
|
||||
DEF_STR(STR_SHORTCUT_RESET_TITLE, "Reset short-cuts");
|
||||
DEF_STR(STR_SHORTCUT_RESET_TEXT, "Are you sure you want to reset the short-cuts?\n\nThis action cannot be undone.");
|
||||
// Shortcut editor
|
||||
DEF_STR(STR_SHORTCUT_RESET_TITLE, "Reset shortcuts");
|
||||
DEF_STR(STR_SHORTCUT_RESET_TEXT, "Are you sure you want to reset the shortcuts?\n\nThis action cannot be undone.");
|
||||
DEF_STR(STR_SHORTCUT_FILEMENU, "File Menu");
|
||||
DEF_STR(STR_SHORTCUT_SYSTEMMENU, "System Menu");
|
||||
DEF_STR(STR_SHORTCUT_OPTIONS, "Options");
|
||||
DEF_STR(STR_SHORTCUT_SAVESLOT, "Save Slots");
|
||||
|
||||
/*********************************************************************************
|
||||
* Support Window *
|
||||
*********************************************************************************/
|
||||
// Support window
|
||||
DEF_STR(MSG_SUPPORT_TITLE, "Support Project64");
|
||||
DEF_STR(MSG_SUPPORT_INFO, "Project64 is a free and open source Nintendo64 emulator. This allows you to play real N64 software in much the same way as it would be on the original hardware system.\n\nI am sorry about the inconvenience of this prompt, but you are being asked to wait for a few seconds in order to enjoy the result of hundreds of hours of work.\n\nIf you can and would like to support Project64 or you have gotten some value out of it then please support project64 as either a thank you, or your a desire to see removal of this prompt.\n\nIf you have supported Project64:");
|
||||
DEF_STR(MSG_SUPPORT_INFO, "Project64 is a free and open-source Nintendo 64 emulator. This allows you to play real Nintendo 64 software in much the same way as it would be on the original hardware.\n\nI am sorry about the inconvenience of this prompt, but you are being asked to wait for a few seconds in order to enjoy the result of hundreds of hours of work.\n\nIf you can and would like to support Project64 or you have gotten some value out of it then please support Project64 as either a thank you, or if you would like to see removal of this prompt.\n\nIf you have supported Project64:");
|
||||
DEF_STR(MSG_SUPPORT_ENTER_CODE, "Enter/Request Notification Code");
|
||||
DEF_STR(MSG_SUPPORT_PROJECT64, "Support Project64");
|
||||
DEF_STR(MSG_SUPPORT_CONTINUE, "Continue");
|
||||
DEF_STR(MSG_SUPPORT_ENTER_SUPPORT_CODE, "Please enter the support code");
|
||||
DEF_STR(MSG_SUPPORT_INCORRECT_CODE, "Failed to validate the code\n\nMake sure the code matches in email based on your machine");
|
||||
DEF_STR(MSG_SUPPORT_INCORRECT_CODE, "Failed to validate the code\n\nMake sure the code matches the code in the email, which is based on your machine");
|
||||
DEF_STR(MSG_SUPPORT_COMPLETE, "Thank you");
|
||||
DEF_STR(MSG_SUPPORT_ENTER_CODE_TITLE, "Please enter your support code");
|
||||
DEF_STR(MSG_SUPPORT_ENTER_CODE_DESC, "Please enter the code you recieved in the email.\n\nThis email will be sent to the email address used to support project64.\n\nPlease note that the code is will only work for a unique machine. This computer id is:");
|
||||
DEF_STR(MSG_SUPPORT_ENTER_CODE_DESC, "Please enter the code you received in the email.\n\nThis email will be sent to the email address used to support Project64.\n\nPlease note that the code is will only work for a unique machine. This computer ID is:");
|
||||
DEF_STR(MSG_SUPPORT_OK, "OK");
|
||||
DEF_STR(MSG_SUPPORT_CANCEL, "Cancel");
|
||||
DEF_STR(MSG_SUPPORT_REQUESTCODE_TITLE, "Request Code");
|
||||
DEF_STR(MSG_SUPPORT_REQUESTCODE_SUCCESS, "Code has been sent to your email");
|
||||
DEF_STR(MSG_SUPPORT_REQUESTCODE_FAIL, "Failed to send code, please make sure it is the email you supported with");
|
||||
DEF_STR(MSG_SUPPORT_REQUESTCODE_FAIL, "Failed to send code, please make sure it is the email you used when you supported Project64");
|
||||
|
||||
// Enhancements
|
||||
|
||||
/*********************************************************************************
|
||||
* Enhancements *
|
||||
*********************************************************************************/
|
||||
DEF_STR(ENHANCEMENT_TITLE, "Enhancements");
|
||||
|
||||
/*********************************************************************************
|
||||
* Messages *
|
||||
*********************************************************************************/
|
||||
// Messages
|
||||
|
||||
DEF_STR(MSG_CPU_PAUSED, "*** CPU PAUSED ***");
|
||||
DEF_STR(MSG_CPU_RESUMED, "CPU resumed");
|
||||
DEF_STR(MSG_PERM_LOOP, "In a permanent loop that cannot be exited.\nEmulation will now stop.\n\nVerify ROM and its settings.");
|
||||
DEF_STR(MSG_MEM_ALLOC_ERROR, "Failed to allocate memory");
|
||||
DEF_STR(MSG_FAIL_INIT_GFX, "The default or selected video plugin is missing or invalid.\n\nYou need to go into Settings and select a video (graphics) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_INIT_AUDIO, "The default or selected audio plugin is missing or invalid.\n\nYou need to go into Settings and select a audio (sound) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_INIT_RSP, "The default or selected RSP plugin is missing or invalid.\n\nYou need to go into Settings and select a RSP (Reality Signal Processor) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_INIT_CONTROL, "The default or selected input plugin is missing or invalid.\n\nYou need to go into Settings and select an input (controller) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_INIT_GFX, "The default or selected video plugin is missing or invalid.\n\nYou need to go into settings and select a video (graphics) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_INIT_AUDIO, "The default or selected audio plugin is missing or invalid.\n\nYou need to go into settings and select a audio (sound) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_INIT_RSP, "The default or selected RSP plugin is missing or invalid.\n\nYou need to go into settings and select an RSP (Reality Signal Processor) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_INIT_CONTROL, "The default or selected input plugin is missing or invalid.\n\nYou need to go into settings and select an input (controller) plugin.\nCheck that you have at least one compatible plugin file in your plugin folder.");
|
||||
DEF_STR(MSG_FAIL_LOAD_PLUGIN, "Failed to load plugin:");
|
||||
DEF_STR(MSG_FAIL_LOAD_WORD, "Failed to load word.\n\nVerify ROM and its settings.");
|
||||
DEF_STR(MSG_FAIL_OPEN_SAVE, "Failed to open save file");
|
||||
|
@ -510,7 +499,7 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(MSG_MSGBOX_ERROR_TITLE, "Error");
|
||||
DEF_STR(MSG_PIF2_ERROR, "Copyright sequence not found in LUT. Game will no longer function.");
|
||||
DEF_STR(MSG_PIF2_TITLE, "Copy Protection Failure");
|
||||
DEF_STR(MSG_PLUGIN_CHANGE, "Changing a plugin requires Project64 to reset a running ROM.\nIf you don't want to lose your place, answer No and save the current state first.\n\nChange plugins and reset ROM now?");
|
||||
DEF_STR(MSG_PLUGIN_CHANGE, "Changing a plugin requires Project64 to reset a running ROM.\nIf you don't want to lose your place, answer no and save the current state first.\n\nChange plugins and reset ROM now?");
|
||||
DEF_STR(MSG_PLUGIN_CHANGE_TITLE, "Change Plugins");
|
||||
DEF_STR(MSG_EMULATION_ENDED, "Emulation ended");
|
||||
DEF_STR(MSG_EMULATION_STARTED, "Emulation started");
|
||||
|
@ -530,7 +519,7 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(MSG_PLUGIN_INIT, "Plugin initializing");
|
||||
DEF_STR(MSG_NO_SHORTCUT_SEL, "You have not selected a virtual key to assign to the menu item.");
|
||||
DEF_STR(MSG_NO_MENUITEM_SEL, "You need to select a menu item to assign this key to.");
|
||||
DEF_STR(MSG_MENUITEM_ASSIGNED, "Short-cut has already been assigned to another menu item.");
|
||||
DEF_STR(MSG_MENUITEM_ASSIGNED, "Shortcut has already been assigned to another menu item.");
|
||||
DEF_STR(MSG_NO_SEL_SHORTCUT, "No shortcut has been selected to be removed.");
|
||||
DEF_STR(MSG_WAITING_FOR_START, "ROM loaded. Waiting for emulation to start.");
|
||||
DEF_STR(MSG_INVALID_EXE, "Project64 beta versions are for members only.\n\nIf you have an account at www.pj64-emu.com, you should not be seeing this error!!\nPlease contact us on the site.");
|
||||
|
@ -541,15 +530,14 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(MSG_SET_HLE_AUD_TITLE, "Audio High-Level Emulation");
|
||||
DEF_STR(MSG_SET_HLE_AUD_MSG, "Audio HLE requires a third-party plugin!!!\nIf you do not use a third-party audio plugin that supports HLE, you will hear no sound.\n\nChange to audio HLE?");
|
||||
DEF_STR(MSG_FAIL_IMAGE_IPL, "File loaded does not appear to be a valid 64DD IPL ROM.\n\nVerify your ROMs with GoodN64.");
|
||||
DEF_STR(MSG_IPL_REQUIRED, "Nintendo 64DD Japanese Retail IPL ROM not found.\nIt is required to play japanese region 64DD disk images.\n\nPlease select the required ROM in the Settings.");
|
||||
DEF_STR(MSG_USA_IPL_REQUIRED, "Nintendo 64DD American Retail IPL ROM not found.\nIt is required to play american region 64DD disk images.\n\nPlease select the required ROM in the Settings.");
|
||||
DEF_STR(MSG_TOOL_IPL_REQUIRED, "Nintendo 64DD Development IPL ROM not found.\nIt is required to play development 64DD disk images.\n\nPlease select the required ROM in the Settings.");
|
||||
DEF_STR(MSG_IPL_REQUIRED, "Nintendo 64DD Japanese retail IPL ROM not found.\nIt is required to play Japanese region 64DD disk images.\n\nPlease select the required ROM in the settings.");
|
||||
DEF_STR(MSG_USA_IPL_REQUIRED, "Nintendo 64DD American retail IPL ROM not found.\nIt is required to play American region 64DD disk images.\n\nPlease select the required ROM in the settings.");
|
||||
DEF_STR(MSG_TOOL_IPL_REQUIRED, "Nintendo 64DD development IPL ROM not found.\nIt is required to play development 64DD disk images.\n\nPlease select the required ROM in the settings.");
|
||||
DEF_STR(MSG_CHEAT_INVALID_MSG, "Failed to update cheat, it is invalid");
|
||||
DEF_STR(MSG_CHEAT_INVALID_TITLE, "Invalid Cheat");
|
||||
|
||||
/*********************************************************************************
|
||||
* Android *
|
||||
*********************************************************************************/
|
||||
// Android
|
||||
|
||||
DEF_STR(ANDROID_SETTINGS, "Settings");
|
||||
DEF_STR(ANDROID_FORUM, "Help/Forum");
|
||||
DEF_STR(ANDROID_REPORT_BUG, "Report Issue");
|
||||
|
@ -557,7 +545,7 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(ANDROID_GALLERY_RECENTLYPLAYED, "Recently played");
|
||||
DEF_STR(ANDROID_GALLERY_LIBRARY, "Games");
|
||||
DEF_STR(ANDROID_GAMEDIR, "Game Dir");
|
||||
DEF_STR(ANDROID_SELECTDIR, "Select an folder to scan");
|
||||
DEF_STR(ANDROID_SELECTDIR, "Select a folder to scan");
|
||||
DEF_STR(ANDROID_INCLUDE_SUBDIRECTORIES, "Include subdirectories");
|
||||
DEF_STR(ANDROID_PARENTFOLDER, "Parent folder");
|
||||
DEF_STR(ANDROID_DIRECTORIES, "Directories");
|
||||
|
@ -569,13 +557,13 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(ANDROID_ABOUT_APP_NAME, "Project64 for Android");
|
||||
DEF_STR(ANDROID_ABOUT_LICENCE, "License");
|
||||
DEF_STR(ANDROID_ABOUT_REVISION, "Revision");
|
||||
DEF_STR(ANDROID_ABOUT_TEXT, "Project64 for Android\u2122 is a port of the windows version of project64.The Android\u2122 version can play most N64 games.");
|
||||
DEF_STR(ANDROID_ABOUT_TEXT, "Project64 for Android\u2122 is a port of the Windows version of Project64.The Android\u2122 version can play most N64 games.");
|
||||
DEF_STR(ANDROID_ABOUT_PJ64_AUTHORS, "Project64 Authors.");
|
||||
DEF_STR(ANDROID_DISCORD, "Discord");
|
||||
DEF_STR(ANDROID_SUPPORT_PJ64, "Support Project64");
|
||||
DEF_STR(ANDROID_REVIEW_PJ64, "Review Project64");
|
||||
|
||||
//In game menu
|
||||
// In-game menu
|
||||
DEF_STR(ANDROID_MENU_SETTINGS, "Settings");
|
||||
DEF_STR(ANDROID_MENU_SAVESTATE, "Save State");
|
||||
DEF_STR(ANDROID_MENU_LOADSTATE, "Load State");
|
||||
|
@ -591,7 +579,7 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(ANDROID_MENU_RESETFUNCTIONTIMES, "Reset Function Times");
|
||||
DEF_STR(ANDROID_MENU_DUMPFUNCTIONTIMES, "Dump Function Times");
|
||||
|
||||
//Video plugin
|
||||
// Video plugin
|
||||
DEF_STR(ANDROID_VIDEO_NATIVE_RES, "Native");
|
||||
}
|
||||
|
||||
|
@ -617,7 +605,7 @@ CLanguage::~CLanguage()
|
|||
|
||||
bool CLanguage::LoadCurrentStrings(void)
|
||||
{
|
||||
//clear all the current strings loaded
|
||||
// Clear all the current strings loaded
|
||||
m_CurrentStrings.clear();
|
||||
|
||||
if (g_Settings->LoadBool(Debugger_DebugLanguage))
|
||||
|
@ -629,7 +617,7 @@ bool CLanguage::LoadCurrentStrings(void)
|
|||
LanguageList LangList = GetLangList();
|
||||
stdstr Filename;
|
||||
|
||||
//Find the file name of the current language
|
||||
// Find the file name of the current language
|
||||
for (LanguageList::iterator Language = LangList.begin(); Language != LangList.end(); Language++)
|
||||
{
|
||||
if (g_Lang->IsCurrentLang(*Language))
|
||||
|
@ -644,14 +632,14 @@ bool CLanguage::LoadCurrentStrings(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
//Process the file
|
||||
// Process the file
|
||||
FILE *file = fopen(Filename.c_str(), "rb");
|
||||
if (file == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//Search for utf8 file marker
|
||||
// Search for UTF8 file marker
|
||||
uint8_t utf_bom[3];
|
||||
if (fread(&utf_bom, sizeof(utf_bom), 1, file) != 1 ||
|
||||
utf_bom[0] != 0xEF ||
|
||||
|
@ -662,7 +650,7 @@ bool CLanguage::LoadCurrentStrings(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
//String;
|
||||
// String
|
||||
while (!feof(file))
|
||||
{
|
||||
m_CurrentStrings.insert(GetNextLangString(file));
|
||||
|
@ -684,7 +672,7 @@ LanguageList & CLanguage::GetLangList(void)
|
|||
{
|
||||
do
|
||||
{
|
||||
LanguageFile File; //We temporally store the values in here to added to the list
|
||||
LanguageFile File; // We temporally store the values in here to add to the list
|
||||
|
||||
File.Filename = (const std::string &)LanguageFiles;
|
||||
File.LanguageName = GetLangString(LanguageFiles, LANGUAGE_NAME);
|
||||
|
@ -694,7 +682,7 @@ LanguageList & CLanguage::GetLangList(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
//get the name of the language from inside the file
|
||||
// Get the name of the language from inside the file
|
||||
m_LanguageList.push_back(File);
|
||||
} while (LanguageFiles.FindNext());
|
||||
}
|
||||
|
@ -737,7 +725,7 @@ std::string CLanguage::GetLangString(const char * FileName, LanguageStringID ID)
|
|||
return "";
|
||||
}
|
||||
|
||||
//Search for utf8 file marker
|
||||
// Search for UTF8 file marker
|
||||
uint8_t utf_bom[3];
|
||||
if (fread(&utf_bom, sizeof(utf_bom), 1, file) != 1 ||
|
||||
utf_bom[0] != 0xEF ||
|
||||
|
@ -748,7 +736,7 @@ std::string CLanguage::GetLangString(const char * FileName, LanguageStringID ID)
|
|||
return "";
|
||||
}
|
||||
|
||||
//String;
|
||||
// String
|
||||
while (!feof(file))
|
||||
{
|
||||
LANG_STR String = GetNextLangString(file);
|
||||
|
@ -766,7 +754,7 @@ LANG_STR CLanguage::GetNextLangString(void * OpenFile)
|
|||
{
|
||||
enum { MAX_STRING_LEN = 800 };
|
||||
int32_t StringID;
|
||||
char szString[MAX_STRING_LEN]; //temp store the string from the file
|
||||
char szString[MAX_STRING_LEN]; // Temporarily store the string from the file
|
||||
|
||||
FILE * file = (FILE *)OpenFile;
|
||||
|
||||
|
@ -776,7 +764,7 @@ LANG_STR CLanguage::GetNextLangString(void * OpenFile)
|
|||
return LANG_STR(0, "");
|
||||
}
|
||||
|
||||
//Search for token #
|
||||
// Search for token number
|
||||
char token = 0;
|
||||
while (token != '#' && !feof(file))
|
||||
{
|
||||
|
@ -787,10 +775,10 @@ LANG_STR CLanguage::GetNextLangString(void * OpenFile)
|
|||
return LANG_STR(0, "");
|
||||
}
|
||||
|
||||
//get StringID after token
|
||||
// Get StringID after token
|
||||
fscanf(file, "%d", &StringID);
|
||||
|
||||
//Search for token #
|
||||
// Search for token number
|
||||
while (token != '#' && !feof(file))
|
||||
{
|
||||
fread(&token, 1, 1, file);
|
||||
|
@ -800,7 +788,7 @@ LANG_STR CLanguage::GetNextLangString(void * OpenFile)
|
|||
StringID = EMPTY_STRING; return LANG_STR(0, "");
|
||||
}
|
||||
|
||||
//Search for start of string '"'
|
||||
// Search for start of string '"'
|
||||
while (token != '"' && !feof(file))
|
||||
{
|
||||
fread(&token, 1, 1, file);
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
__interface CNotification
|
||||
{
|
||||
public:
|
||||
//Error Messages
|
||||
// Error messages
|
||||
virtual void DisplayError(const char * Message) const = 0;
|
||||
virtual void DisplayError(LanguageStringID StringID) const = 0;
|
||||
|
||||
virtual void FatalError(const char * Message) const = 0;
|
||||
virtual void FatalError(LanguageStringID StringID) const = 0;
|
||||
|
||||
//User Feedback
|
||||
// User feedback
|
||||
virtual void DisplayWarning(const char * Message) const = 0;
|
||||
virtual void DisplayWarning(LanguageStringID StringID) const = 0;
|
||||
|
||||
|
@ -24,7 +24,7 @@ public:
|
|||
virtual void DisplayMessage(int DisplayTime, LanguageStringID StringID) const = 0;
|
||||
virtual void DisplayMessage2(const char * Message) const = 0;
|
||||
|
||||
// Ask a Yes/No Question to the user, yes = true, no = false
|
||||
// Ask a yes/no question to the user, yes = true, no = false
|
||||
virtual bool AskYesNoQuestion(const char * Question) const = 0;
|
||||
|
||||
virtual void BreakPoint(const char * FileName, int32_t LineNumber) = 0;
|
||||
|
|
|
@ -93,7 +93,7 @@ void CRomList::RefreshRomList(void)
|
|||
{
|
||||
if (m_RefreshThread.isRunning())
|
||||
{
|
||||
WriteTrace(TraceRomList, TraceVerbose, "already refreshing, ignoring");
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Already refreshing, ignoring");
|
||||
return;
|
||||
}
|
||||
WriteTrace(TraceRomList, TraceDebug, "Starting thread");
|
||||
|
@ -105,11 +105,11 @@ void CRomList::RefreshRomList(void)
|
|||
void CRomList::RefreshRomListThread(void)
|
||||
{
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Start");
|
||||
//delete cache
|
||||
// Delete cache
|
||||
CPath(g_Settings->LoadStringVal(RomList_RomListCache)).Delete();
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Cache Deleted");
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Cache deleted");
|
||||
|
||||
//clear all current items
|
||||
// Clear all current items
|
||||
RomListReset();
|
||||
m_RomInfo.clear();
|
||||
|
||||
|
@ -134,7 +134,7 @@ void CRomList::AddRomToList(const char * RomLocation)
|
|||
}
|
||||
else
|
||||
{
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Failed to fill rom information, ignoring");
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Failed to fill ROM information, ignoring");
|
||||
}
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Done");
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory)
|
|||
WriteTrace(TraceRomList, TraceVerbose, "Found: \"%s\" m_StopRefresh = %s", (const char *)SearchDir, m_StopRefresh ? "true" : "false");
|
||||
if (m_StopRefresh)
|
||||
{
|
||||
WriteTrace(TraceRomList, TraceVerbose, "stop refresh set, stopping");
|
||||
WriteTrace(TraceRomList, TraceVerbose, "Stop refresh set, stopping");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -262,7 +262,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory)
|
|||
WriteTrace(TraceUserInterface, TraceDebug, "11a %s", RomHeader.c_str());
|
||||
int32_t CicChip = CN64Rom::GetCicChipID(RomData);
|
||||
|
||||
//save this info
|
||||
// Save this info
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "12");
|
||||
m_ZipIniFile->SaveString(SectionName.c_str(), FileName.c_str(), RomHeader.c_str());
|
||||
m_ZipIniFile->SaveNumber(SectionName.c_str(), stdstr_f("%s-Cic", FileName.c_str()).c_str(), CicChip);
|
||||
|
@ -310,7 +310,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory)
|
|||
}
|
||||
catch (...)
|
||||
{
|
||||
WriteTrace(TraceUserInterface, TraceError, "exception processing %s", (LPCSTR)SearchDir);
|
||||
WriteTrace(TraceUserInterface, TraceError, "Exception processing %s", (LPCSTR)SearchDir);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -421,9 +421,9 @@ bool CRomList::LoadDataFromRomFile(const char * FileName, uint8_t * Data, int32_
|
|||
uint32_t diskidoffset = 0x43670;
|
||||
uint32_t romdataoffset = 0x738C0;
|
||||
bool isValidDisk = false;
|
||||
//Could still be a Disk Image
|
||||
// Could still be a disk image
|
||||
|
||||
//System Data
|
||||
// System data
|
||||
const uint8_t blocks[7] = { 2, 3, 10, 11, 1, 8, 9 };
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
|
@ -462,7 +462,7 @@ bool CRomList::LoadDataFromRomFile(const char * FileName, uint8_t * Data, int32_
|
|||
}
|
||||
else if (CN64Disk::IsValidDiskImage(Test))
|
||||
{
|
||||
//Is a Disk Image
|
||||
// If it is a disk image
|
||||
uint32_t sysdataoffset = 0;
|
||||
uint32_t diskidoffset = 0x100;
|
||||
uint32_t romdataoffset = 0x200;
|
||||
|
@ -564,7 +564,7 @@ bool CRomList::FillRomInfo(ROM_INFO * pRomInfo)
|
|||
|
||||
void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo)
|
||||
{
|
||||
//Initialize the structure
|
||||
// Initialize the structure
|
||||
pRomInfo->UserNotes[0] = '\0';
|
||||
pRomInfo->Developer[0] = '\0';
|
||||
pRomInfo->ReleaseDate[0] = '\0';
|
||||
|
@ -588,29 +588,29 @@ void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo)
|
|||
}
|
||||
}
|
||||
|
||||
//Rom Notes
|
||||
// ROM notes
|
||||
strncpy(pRomInfo->UserNotes, m_NotesIniFile->GetString(Identifier, "Note", "").c_str(), sizeof(pRomInfo->UserNotes) / sizeof(char));
|
||||
|
||||
//Rom Extension info
|
||||
// ROM extension info
|
||||
strncpy(pRomInfo->Developer, m_ExtIniFile->GetString(Identifier, "Developer", "").c_str(), sizeof(pRomInfo->Developer) / sizeof(char));
|
||||
strncpy(pRomInfo->ReleaseDate, m_ExtIniFile->GetString(Identifier, "ReleaseDate", "").c_str(), sizeof(pRomInfo->ReleaseDate) / sizeof(char));
|
||||
strncpy(pRomInfo->Genre, m_ExtIniFile->GetString(Identifier, "Genre", "").c_str(), sizeof(pRomInfo->Genre) / sizeof(char));
|
||||
m_ExtIniFile->GetNumber(Identifier, "Players", 1, (uint32_t &)pRomInfo->Players);
|
||||
strncpy(pRomInfo->ForceFeedback, m_ExtIniFile->GetString(Identifier, "ForceFeedback", "unknown").c_str(), sizeof(pRomInfo->ForceFeedback) / sizeof(char));
|
||||
|
||||
//Rom Settings
|
||||
// ROM settings
|
||||
strncpy(pRomInfo->GoodName, m_RomIniFile->GetString(Identifier, "Good Name", pRomInfo->GoodName).c_str(), sizeof(pRomInfo->GoodName) / sizeof(char));
|
||||
strncpy(pRomInfo->Name, m_RomIniFile->GetString(Identifier, "Good Name", pRomInfo->Name).c_str(), sizeof(pRomInfo->Name) / sizeof(char));
|
||||
strncpy(pRomInfo->Status, m_RomIniFile->GetString(Identifier, "Status", pRomInfo->Status).c_str(), sizeof(pRomInfo->Status) / sizeof(char));
|
||||
strncpy(pRomInfo->CoreNotes, m_RomIniFile->GetString(Identifier, "Core Note", "").c_str(), sizeof(pRomInfo->CoreNotes) / sizeof(char));
|
||||
strncpy(pRomInfo->PluginNotes, m_RomIniFile->GetString(Identifier, "Plugin Note", "").c_str(), sizeof(pRomInfo->PluginNotes) / sizeof(char));
|
||||
|
||||
//Get the text color
|
||||
// Get the text color
|
||||
stdstr String = m_RomIniFile->GetString("Rom Status", pRomInfo->Status, "000000");
|
||||
pRomInfo->TextColor = (strtoul(String.c_str(), 0, 16) & 0xFFFFFF);
|
||||
pRomInfo->TextColor = (pRomInfo->TextColor & 0x00FF00) | ((pRomInfo->TextColor >> 0x10) & 0xFF) | ((pRomInfo->TextColor & 0xFF) << 0x10);
|
||||
|
||||
//Get the selected color
|
||||
// Get the selected color
|
||||
String.Format("%s.Sel", pRomInfo->Status);
|
||||
String = m_RomIniFile->GetString("Rom Status", String.c_str(), "FFFFFFFF");
|
||||
uint32_t selcol = strtoul(String.c_str(), nullptr, 16);
|
||||
|
@ -624,7 +624,7 @@ void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo)
|
|||
pRomInfo->SelColor = selcol;
|
||||
}
|
||||
|
||||
//Get the selected text color
|
||||
// Get the selected text color
|
||||
String.Format("%s.Seltext", pRomInfo->Status);
|
||||
String = m_RomIniFile->GetString("Rom Status", String.c_str(), "FFFFFF");
|
||||
pRomInfo->SelTextColor = (strtoul(String.c_str(), 0, 16) & 0xFFFFFF);
|
||||
|
@ -638,9 +638,9 @@ void CRomList::ByteSwapRomData(uint8_t * Data, int32_t DataLen)
|
|||
switch (*((uint32_t *)&Data[0]))
|
||||
{
|
||||
case 0x12408037:
|
||||
case 0x07408027: //64DD IPL
|
||||
case 0xD316E848: //64DD JP Disk
|
||||
case 0xEE562263: //64DD US Disk
|
||||
case 0x07408027: // 64DD IPL
|
||||
case 0xD316E848: // 64DD JP disk
|
||||
case 0xEE562263: // 64DD US disk
|
||||
for (count = 0; count < DataLen; count += 4)
|
||||
{
|
||||
Data[count] ^= Data[count + 2];
|
||||
|
@ -651,11 +651,11 @@ void CRomList::ByteSwapRomData(uint8_t * Data, int32_t DataLen)
|
|||
Data[count + 1] ^= Data[count + 3];
|
||||
}
|
||||
break;
|
||||
case 0x40072780: //64DD IPL
|
||||
case 0x16D348E8: //64DD JP Disk
|
||||
case 0x56EE6322: //64DD US Disk
|
||||
case 0x40072780: // 64DD IPL
|
||||
case 0x16D348E8: // 64DD JP disk
|
||||
case 0x56EE6322: // 64DD US disk
|
||||
case 0x40123780:
|
||||
case 0x00000000: //64DD DEV Disk
|
||||
case 0x00000000: // 64DD DEV disk
|
||||
for (count = 0; count < DataLen; count += 4)
|
||||
{
|
||||
Data[count] ^= Data[count + 3];
|
||||
|
@ -667,9 +667,9 @@ void CRomList::ByteSwapRomData(uint8_t * Data, int32_t DataLen)
|
|||
}
|
||||
break;
|
||||
case 0x80371240:
|
||||
case 0x80270740: //64DD IPL
|
||||
case 0xE848D316: //64DD JP Disk
|
||||
case 0x2263EE56: //64DD US Disk
|
||||
case 0x80270740: // 64DD IPL
|
||||
case 0xE848D316: // 64DD JP disk
|
||||
case 0x2263EE56: // 64DD US disk
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ void CRomList::LoadRomList(void)
|
|||
|
||||
if (!file.IsOpen())
|
||||
{
|
||||
//if file does not exist then refresh the data
|
||||
// If file does not exist then refresh the data
|
||||
RefreshRomList();
|
||||
return;
|
||||
}
|
||||
|
@ -694,7 +694,7 @@ void CRomList::LoadRomList(void)
|
|||
return;
|
||||
}
|
||||
|
||||
//Read the size of ROM_INFO
|
||||
// Read the size of ROM_INFO
|
||||
int32_t RomInfoSize = 0;
|
||||
if (!file.Read(&RomInfoSize, sizeof(RomInfoSize)) || RomInfoSize != sizeof(ROM_INFO))
|
||||
{
|
||||
|
@ -703,11 +703,11 @@ void CRomList::LoadRomList(void)
|
|||
return;
|
||||
}
|
||||
|
||||
//Read the Number of entries
|
||||
// Read the number of entries
|
||||
int32_t Entries = 0;
|
||||
file.Read(&Entries, sizeof(Entries));
|
||||
|
||||
//Read Every Entry
|
||||
// Read every entry
|
||||
m_RomInfo.clear();
|
||||
RomListReset();
|
||||
for (int32_t count = 0; count < Entries; count++)
|
||||
|
@ -722,10 +722,9 @@ void CRomList::LoadRomList(void)
|
|||
WriteTrace(TraceRomList, TraceVerbose, "Done");
|
||||
}
|
||||
|
||||
/*
|
||||
* SaveRomList - save all the rom information about the current roms in the rom brower
|
||||
* to a cache file, so it is quick to reload the information
|
||||
*/
|
||||
// SaveRomList - save all the ROM information about the current ROMs in the ROM browser
|
||||
// to a cache file, so it is quick to reload the information
|
||||
|
||||
void CRomList::SaveRomList(strlist & FileList)
|
||||
{
|
||||
MD5 ListHash = RomListHash(FileList);
|
||||
|
@ -734,21 +733,21 @@ void CRomList::SaveRomList(strlist & FileList)
|
|||
CFile file(FileName, CFileBase::modeWrite | CFileBase::modeCreate);
|
||||
file.Write(ListHash.raw_digest(), 16);
|
||||
|
||||
//Write the size of ROM_INFO
|
||||
// Write the size of ROM_INFO
|
||||
int32_t RomInfoSize = sizeof(ROM_INFO);
|
||||
file.Write(&RomInfoSize, sizeof(RomInfoSize));
|
||||
|
||||
//Write the Number of entries
|
||||
// Write the number of entries
|
||||
int32_t Entries = m_RomInfo.size();
|
||||
file.Write(&Entries, sizeof(Entries));
|
||||
|
||||
//Write Every Entry
|
||||
// Write every entry
|
||||
for (int32_t count = 0; count < Entries; count++)
|
||||
{
|
||||
file.Write(&m_RomInfo[count], RomInfoSize);
|
||||
}
|
||||
|
||||
//Close the file handle
|
||||
// Close the file handle
|
||||
file.Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -72,13 +72,13 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
{
|
||||
WriteTrace(TraceAppInit, TraceDebug, "Start");
|
||||
|
||||
//Command Settings
|
||||
// Command settings
|
||||
AddHandler(Cmd_BaseDirectory, new CSettingTypeTempString(BaseDirectory));
|
||||
AddHandler(Cmd_ShowHelp, new CSettingTypeTempBool(false));
|
||||
AddHandler(Cmd_RomFile, new CSettingTypeTempString(""));
|
||||
AddHandler(Cmd_ComboDiskFile, new CSettingTypeTempString(""));
|
||||
|
||||
//Support Files
|
||||
// Support files
|
||||
AddHandler(SupportFile_Settings, new CSettingTypeApplicationPath("Settings", "ConfigFile", SupportFile_SettingsDefault));
|
||||
AddHandler(SupportFile_SettingsDefault, new CSettingTypeRelativePath("Config", "Project64.cfg"));
|
||||
AddHandler(SupportFile_RomDatabase, new CSettingTypeApplicationPath("Settings", "RomDatabase", SupportFile_RomDatabaseDefault));
|
||||
|
@ -100,7 +100,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(SupportFile_ExtInfo, new CSettingTypeApplicationPath("Settings", "ExtInfo", SupportFile_ExtInfoDefault));
|
||||
AddHandler(SupportFile_ExtInfoDefault, new CSettingTypeRelativePath("Config", "Project64.rdx"));
|
||||
|
||||
//Settings location
|
||||
// Settings location
|
||||
AddHandler(Setting_ApplicationName, new CSettingTypeTempString(""));
|
||||
AddHandler(Setting_UseFromRegistry, new CSettingTypeApplication("Settings", "Use Registry", (uint32_t)false));
|
||||
AddHandler(Setting_RdbEditor, new CSettingTypeApplication("Settings", "Rdb Editor", false));
|
||||
|
@ -245,7 +245,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(Game_RPCKey, new CSettingTypeTempString(""));
|
||||
AddHandler(Game_DiskSeekTiming, new CSettingTypeGame("DiskSeekTiming", Rdb_DiskSeekTiming));
|
||||
|
||||
//User Interface
|
||||
// User interface
|
||||
AddHandler(UserInterface_ShowCPUPer, new CSettingTypeApplication("Settings", "Display CPU Usage", (uint32_t)false));
|
||||
AddHandler(UserInterface_DisplayFrameRate, new CSettingTypeApplication("Settings", "Display Frame Rate", (uint32_t)false));
|
||||
AddHandler(UserInterface_FrameDisplayType, new CSettingTypeApplication("Settings", "Frame Rate Display Type", (uint32_t)FR_VIs));
|
||||
|
@ -347,7 +347,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(Debugger_AppLogFlush, new CSettingTypeApplication("Logging", "Log Auto Flush", (uint32_t)false));
|
||||
AddHandler(Debugger_RecordRecompilerAsm, new CSettingTypeApplication("Debugger", "Record Recompiler Asm", false));
|
||||
|
||||
//Logging
|
||||
// Logging
|
||||
AddHandler(Debugger_TraceMD5, new CSettingTypeApplication("Logging", "MD5", (uint32_t)g_ModuleLogLevel[TraceMD5]));
|
||||
AddHandler(Debugger_TraceThread, new CSettingTypeApplication("Logging", "Thread", (uint32_t)g_ModuleLogLevel[TraceThread]));
|
||||
AddHandler(Debugger_TracePath, new CSettingTypeApplication("Logging", "Path", (uint32_t)g_ModuleLogLevel[TracePath]));
|
||||
|
@ -371,7 +371,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(Debugger_TraceRomList, new CSettingTypeApplication("Logging", "Rom List", (uint32_t)g_ModuleLogLevel[TraceRomList]));
|
||||
AddHandler(Debugger_TraceExceptionHandler, new CSettingTypeApplication("Logging", "Exception Handler", (uint32_t)g_ModuleLogLevel[TraceExceptionHandler]));
|
||||
|
||||
//Plugin
|
||||
// Plugin
|
||||
#ifdef _WIN32
|
||||
AddHandler(Plugin_RSP_Current, new CSettingTypeApplication("Plugin", "RSP Dll", "RSP\\RSP 1.7.dll"));
|
||||
#ifdef _DEBUG
|
||||
|
@ -400,7 +400,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
|
|||
AddHandler(Plugin_UseHleAudio, new CSettingTypeApplication("RSP", "HLE Audio Plugin", false));
|
||||
AddHandler(Plugin_EnableAudio, new CSettingTypeApplication("Audio", "Enable Audio", true));
|
||||
|
||||
//Logging
|
||||
// Logging
|
||||
AddHandler(Logging_GenerateLog, new CSettingTypeApplication("Logging", "Generate Log Files", false));
|
||||
AddHandler(Logging_LogRDRamRegisters, new CSettingTypeApplication("Logging", "Log RDRam Registers", false));
|
||||
AddHandler(Logging_LogSPRegisters, new CSettingTypeApplication("Logging", "Log SP Registers", false));
|
||||
|
@ -698,7 +698,7 @@ bool CSettings::LoadBool(SettingID Type, bool & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return 0;
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ bool CSettings::LoadBoolIndex(SettingID Type, uint32_t index, bool & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return false;
|
||||
}
|
||||
|
@ -752,7 +752,7 @@ bool CSettings::LoadDword(SettingID Type, uint32_t & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return false;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ bool CSettings::LoadDwordIndex(SettingID Type, uint32_t index, uint32_t & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return 0;
|
||||
}
|
||||
|
@ -806,7 +806,7 @@ bool CSettings::LoadStringVal(SettingID Type, std::string & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return 0;
|
||||
}
|
||||
|
@ -826,7 +826,7 @@ bool CSettings::LoadStringVal(SettingID Type, char * Buffer, uint32_t BufferSize
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return 0;
|
||||
}
|
||||
|
@ -861,7 +861,7 @@ bool CSettings::LoadStringIndex(SettingID Type, uint32_t index, std::string & Va
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return 0;
|
||||
}
|
||||
|
@ -882,7 +882,7 @@ bool CSettings::LoadStringIndex(SettingID /*Type*/, uint32_t /*index*/, char * /
|
|||
return false;
|
||||
}
|
||||
|
||||
//Load the default value for the setting
|
||||
// Load the default value for the setting
|
||||
bool CSettings::LoadDefaultBool(SettingID Type)
|
||||
{
|
||||
bool Value = false;
|
||||
|
@ -895,7 +895,7 @@ void CSettings::LoadDefaultBool(SettingID Type, bool & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
}
|
||||
else
|
||||
|
@ -934,7 +934,7 @@ void CSettings::LoadDefaultDword(SettingID Type, uint32_t & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
}
|
||||
else
|
||||
|
@ -973,7 +973,7 @@ void CSettings::LoadDefaultString(SettingID Type, std::string & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
}
|
||||
else
|
||||
|
@ -1015,7 +1015,7 @@ void CSettings::SaveBool(SettingID Type, bool Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return;
|
||||
}
|
||||
|
@ -1035,7 +1035,7 @@ void CSettings::SaveBoolIndex(SettingID Type, uint32_t index, bool Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return;
|
||||
}
|
||||
|
@ -1055,7 +1055,7 @@ void CSettings::SaveDword(SettingID Type, uint32_t Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return;
|
||||
}
|
||||
|
@ -1075,7 +1075,7 @@ void CSettings::SaveDwordIndex(SettingID Type, uint32_t index, uint32_t Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return;
|
||||
}
|
||||
|
@ -1095,7 +1095,7 @@ void CSettings::SaveString(SettingID Type, const std::string & Value)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
return;
|
||||
}
|
||||
|
@ -1115,7 +1115,7 @@ void CSettings::SaveString(SettingID Type, const char * Buffer)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
}
|
||||
else if (FindInfo->second->IndexBasedSetting())
|
||||
|
@ -1134,7 +1134,7 @@ void CSettings::SaveStringIndex(SettingID Type, uint32_t index, const char * Buf
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
}
|
||||
if (FindInfo->second->IndexBasedSetting())
|
||||
|
@ -1158,7 +1158,7 @@ void CSettings::DeleteSetting(SettingID Type)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
}
|
||||
if (FindInfo->second->IndexBasedSetting())
|
||||
|
@ -1177,7 +1177,7 @@ void CSettings::DeleteSettingIndex(SettingID Type, uint32_t index)
|
|||
SETTING_HANDLER FindInfo = m_SettingInfo.find(Type);
|
||||
if (FindInfo == m_SettingInfo.end())
|
||||
{
|
||||
//if not found do nothing
|
||||
// If not found do nothing
|
||||
UnknownSetting(Type);
|
||||
}
|
||||
if (FindInfo->second->IndexBasedSetting())
|
||||
|
@ -1285,7 +1285,7 @@ void CSettings::UnregisterChangeCB(SettingID Type, void * Data, SettingChangedFu
|
|||
{
|
||||
bool bRemoved = false;
|
||||
|
||||
//Find out the information for handling the setting type from the list
|
||||
// Find out the information for handling the setting type from the list
|
||||
SETTING_CALLBACK::iterator Callback = m_Callback.find(Type);
|
||||
if (Callback != m_Callback.end())
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
|
||||
bool Initialize(const char * BaseDirectory, const char * AppName);
|
||||
|
||||
//return the values
|
||||
// Return the values
|
||||
bool LoadBool(SettingID Type);
|
||||
bool LoadBool(SettingID Type, bool & Value);
|
||||
bool LoadBoolIndex(SettingID Type, uint32_t index);
|
||||
|
@ -41,7 +41,7 @@ public:
|
|||
bool LoadStringIndex(SettingID Type, uint32_t index, std::string & Value);
|
||||
bool LoadStringIndex(SettingID Type, uint32_t index, char * Buffer, uint32_t BufferSize);
|
||||
|
||||
//Load the default value for the setting
|
||||
// Load the default value for the setting
|
||||
bool LoadDefaultBool(SettingID Type);
|
||||
void LoadDefaultBool(SettingID Type, bool & Value);
|
||||
bool LoadDefaultBoolIndex(SettingID Type, uint32_t index);
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
void LoadDefaultStringIndex(SettingID Type, uint32_t index, std::string & Value);
|
||||
void LoadDefaultStringIndex(SettingID Type, uint32_t index, char * Buffer, uint32_t BufferSize);
|
||||
|
||||
//Update the settings
|
||||
// Update the settings
|
||||
void SaveBool(SettingID Type, bool Value);
|
||||
void SaveBoolIndex(SettingID Type, uint32_t index, bool Value);
|
||||
void SaveDword(SettingID Type, uint32_t Value);
|
||||
|
@ -71,17 +71,17 @@ public:
|
|||
void DeleteSetting(SettingID Type);
|
||||
void DeleteSettingIndex(SettingID Type, uint32_t index);
|
||||
|
||||
//Register Notification of change
|
||||
// Register notification of change
|
||||
void RegisterChangeCB(SettingID Type, void * Data, SettingChangedFunc Func);
|
||||
void UnregisterChangeCB(SettingID Type, void * Data, SettingChangedFunc Func);
|
||||
|
||||
// information about setting
|
||||
// Information about setting
|
||||
SettingType GetSettingType(SettingID Type);
|
||||
bool IndexBasedSetting(SettingID Type);
|
||||
void SettingTypeChanged(SettingType Type);
|
||||
bool IsSettingSet(SettingID Type);
|
||||
|
||||
// static functions for plugins
|
||||
// Static functions for plugins
|
||||
static uint32_t GetSetting(CSettings * _this, SettingID Type);
|
||||
static const char * GetSettingSz(CSettings * _this, SettingID Type, char * Buffer, uint32_t BufferSize);
|
||||
static void SetSetting(CSettings * _this, SettingID ID, uint32_t Value);
|
||||
|
@ -93,7 +93,7 @@ public:
|
|||
static void sRegisterChangeCB(CSettings * _this, SettingID Type, void * Data, SettingChangedFunc Func);
|
||||
static void sUnregisterChangeCB(CSettings * _this, SettingID Type, void * Data, SettingChangedFunc Func);
|
||||
|
||||
//Notification
|
||||
// Notification
|
||||
void NotifyCallBacks(SettingID Type);
|
||||
void AddHandler(SettingID TypeID, CSettingType * Handler);
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/**********************************************************************************
|
||||
Project64 Controller plugin spec, version #1.1
|
||||
**********************************************************************************/
|
||||
// Project64 controller plugin spec, version 1.1
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -28,12 +27,13 @@ enum
|
|||
PLUGIN_RAW = 5,
|
||||
};
|
||||
|
||||
/***** Structures *****/
|
||||
// Structures
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t Version; /* Should be set to 0x0101 */
|
||||
uint16_t Type; /* Set to PLUGIN_TYPE_CONTROLLER */
|
||||
char Name[100]; /* Name of the DLL */
|
||||
uint16_t Version; // Should be set to 0x0101
|
||||
uint16_t Type; // Set to PLUGIN_TYPE_CONTROLLER
|
||||
char Name[100]; // Name of the DLL
|
||||
int32_t NormalMemory;
|
||||
int32_t MemoryBswaped;
|
||||
} PLUGIN_INFO;
|
||||
|
@ -46,7 +46,7 @@ typedef struct
|
|||
} CONTROL;
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201) // warning C4201: nonstandard extension used : nameless struct/union
|
||||
#pragma warning(disable : 4201) // warning C4201: nonstandard extension used: nameless struct/union
|
||||
|
||||
typedef union
|
||||
{
|
||||
|
@ -84,140 +84,152 @@ typedef struct
|
|||
void * hwnd;
|
||||
void * hinst;
|
||||
int32_t MemoryBswaped; // Set this to true
|
||||
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)
|
||||
CONTROL * Controls; // A pointer to an array of 4 controllers .. eg:
|
||||
} CONTROL_INFO;
|
||||
|
||||
/******************************************************************
|
||||
Function: CloseDLL
|
||||
Purpose: This function is called when the emulator is closing
|
||||
down allowing the dll to de-initialise.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: CloseDLL
|
||||
Purpose: This function is called when the emulator is closing
|
||||
down allowing the DLL to de-initialize.
|
||||
input: none
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL CloseDLL(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ControllerCommand
|
||||
Purpose: To process the raw data that has just been sent to a
|
||||
specific controller.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
/*
|
||||
Function: ControllerCommand
|
||||
Purpose: To process the raw data that has just been sent to a
|
||||
specific controller.
|
||||
input: - Controller Number (0 to 3) and -1 signaling end of
|
||||
processing the PIF RAM.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data, or the plugin is set to raw
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data, or the plugin is set to raw
|
||||
|
||||
The data that is being processed looks like this:
|
||||
Initialize controller: 01 03 00 FF FF FF
|
||||
Read controller: 01 04 01 FF FF FF FF
|
||||
*/
|
||||
|
||||
the data that is being processed looks like this:
|
||||
initilize controller: 01 03 00 FF FF FF
|
||||
read controller: 01 04 01 FF FF FF FF
|
||||
*******************************************************************/
|
||||
EXPORT void CALL ControllerCommand(int32_t Control, uint8_t * Command);
|
||||
|
||||
/******************************************************************
|
||||
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
|
||||
*******************************************************************/
|
||||
/*
|
||||
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
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: DllConfig
|
||||
Purpose: This function is optional function that is provided
|
||||
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
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: DllTest
|
||||
Purpose: This function is optional function that is provided
|
||||
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
|
||||
filled by the function. (see def above)
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
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 structure that needs to be
|
||||
filled by the function. (see def above)
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL GetDllInfo(PLUGIN_INFO * PluginInfo);
|
||||
|
||||
/******************************************************************
|
||||
Function: GetKeys
|
||||
Purpose: To get the current state of the controllers buttons.
|
||||
input: - Controller Number (0 to 3)
|
||||
- A pointer to a BUTTONS structure to be filled with
|
||||
the controller state.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: GetKeys
|
||||
Purpose: To get the current state of the controllers buttons.
|
||||
input: - Controller Number (0 to 3)
|
||||
- A pointer to a BUTTONS structure to be filled with
|
||||
the controller state.
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL GetKeys(int32_t Control, BUTTONS * Keys);
|
||||
|
||||
/******************************************************************
|
||||
Function: InitiateControllers
|
||||
Purpose: This function initialises how each of the controllers
|
||||
should be handled.
|
||||
input: - The handle to the main window.
|
||||
- A controller structure that needs to be filled for
|
||||
the emulator to know how to handle each controller.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: InitiateControllers
|
||||
Purpose: This function initializes how each of the controllers
|
||||
should be handled.
|
||||
input: - The handle to the main window.
|
||||
- A controller structure that needs to be filled for
|
||||
the emulator to know how to handle each controller.
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL InitiateControllers(CONTROL_INFO * ControlInfo);
|
||||
|
||||
/******************************************************************
|
||||
Function: ReadController
|
||||
Purpose: To process the raw data in the pif ram that is about to
|
||||
be read.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data.
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: ReadController
|
||||
Purpose: To process the raw data in the PIF RAM that is about to
|
||||
be read.
|
||||
input: - Controller Number (0 to 3) and -1 signaling end of
|
||||
processing the PIF RAM.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data.
|
||||
*/
|
||||
|
||||
EXPORT void CALL ReadController(int Control, uint8_t * Command);
|
||||
|
||||
/******************************************************************
|
||||
Function: RomClosed
|
||||
Purpose: This function is called when a rom is closed.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: RomClosed
|
||||
Purpose: This function is called when a ROM is closed.
|
||||
input: none
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL RomClosed(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: RomOpen
|
||||
Purpose: This function is called when a rom is open. (from the
|
||||
emulation thread)
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: RomOpen
|
||||
Purpose: This function is called when a ROM is open. (from the
|
||||
emulation thread)
|
||||
input: none
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL RomOpen(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: WM_KeyDown
|
||||
Purpose: To pass the WM_KeyDown message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
/*
|
||||
Function: WM_KeyDown
|
||||
Purpose: To pass the WM_KeyDown message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL WM_KeyDown(uint32_t wParam, uint32_t lParam);
|
||||
|
||||
/******************************************************************
|
||||
Function: WM_KeyUp
|
||||
Purpose: To pass the WM_KEYUP message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL WM_KeyUp(uint32_t wParam, uint32_t lParam);
|
||||
/*
|
||||
Function: WM_KeyUp
|
||||
Purpose: To pass the WM_KEYUP message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*/
|
||||
|
||||
EXPORT void CALL WM_KeyUp(uint32_t wParam, uint32_t lParam);
|
||||
|
|
|
@ -100,7 +100,7 @@ BOOL CDirectInput::EnumMakeDeviceList(LPCDIDEVICEINSTANCE lpddi)
|
|||
uint32_t DeviceType = GET_DIDEVICE_TYPE(lpddi->dwDevType);
|
||||
if (DeviceType == DI8DEVTYPE_DEVICE)
|
||||
{
|
||||
// ignore generic devices
|
||||
// Ignore generic devices
|
||||
return DIENUM_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ CInputConfigUI::CInputConfigUI() :
|
|||
m_pgController2(2),
|
||||
m_pgController3(3)
|
||||
{
|
||||
m_psh.pszCaption = L"Configure Input";
|
||||
m_psh.pszCaption = L"Configure input";
|
||||
AddPage(&m_pgController0.m_psp);
|
||||
AddPage(&m_pgController1.m_psp);
|
||||
AddPage(&m_pgController2.m_psp);
|
||||
|
|
|
@ -5,24 +5,25 @@
|
|||
#include "InputSettings.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
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)
|
||||
{
|
||||
CleanupInputSettings();
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: ControllerCommand
|
||||
Purpose: To process the raw data that has just been sent to a
|
||||
specific controller.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
input: - Controller Number (0 to 3) and -1 signaling end of
|
||||
processing the PIF RAM.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
|
||||
|
@ -30,14 +31,15 @@ note: This function is only needed if the DLL is allowing raw
|
|||
data, or the plugin is set to raw
|
||||
|
||||
the data that is being processed looks like this:
|
||||
initilize controller: 01 03 00 FF FF FF
|
||||
read controller: 01 04 01 FF FF FF FF
|
||||
*******************************************************************/
|
||||
Initialize controller: 01 03 00 FF FF FF
|
||||
Read controller: 01 04 01 FF FF FF FF
|
||||
*/
|
||||
|
||||
EXPORT void CALL ControllerCommand(int32_t /*Control*/, uint8_t * /*Command*/)
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: DllAbout
|
||||
Purpose: This function is optional function that is provided
|
||||
to give further information about the DLL.
|
||||
|
@ -51,10 +53,11 @@ output: none
|
|||
/******************************************************************
|
||||
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
|
||||
*******************************************************************/
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
EXPORT void CALL DllConfig(void * hParent)
|
||||
{
|
||||
|
@ -62,59 +65,63 @@ EXPORT void CALL DllConfig(void * hParent)
|
|||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
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)
|
||||
{
|
||||
PluginInfo->Version = CONTROLLER_SPECS_VERSION;
|
||||
PluginInfo->Type = PLUGIN_TYPE_CONTROLLER;
|
||||
#ifdef _DEBUG
|
||||
sprintf(PluginInfo->Name, "Project64 Input Plugin (Debug): %s", VER_FILE_VERSION_STR);
|
||||
sprintf(PluginInfo->Name, "Project64 input plugin (Debug): %s", VER_FILE_VERSION_STR);
|
||||
#else
|
||||
sprintf(PluginInfo->Name, "Project64 Input Plugin: %s", VER_FILE_VERSION_STR);
|
||||
sprintf(PluginInfo->Name, "Project64 input plugin: %s", VER_FILE_VERSION_STR);
|
||||
#endif
|
||||
PluginInfo->MemoryBswaped = true;
|
||||
PluginInfo->NormalMemory = false;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: GetKeys
|
||||
Purpose: To get the current state of the controllers buttons.
|
||||
input: - Controller Number (0 to 3)
|
||||
- A pointer to a BUTTONS structure to be filled with
|
||||
the controller state.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
*/
|
||||
|
||||
EXPORT void CALL GetKeys(int32_t Control, BUTTONS * Keys)
|
||||
{
|
||||
g_InputPlugin->GetKeys(Control, Keys);
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: InitiateControllers
|
||||
Purpose: This function initialises how each of the controllers
|
||||
Purpose: This function initializes how each of the controllers
|
||||
should be handled.
|
||||
input: - A controller structure that needs to be filled for
|
||||
the emulator to know how to handle each controller.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
*/
|
||||
|
||||
EXPORT void CALL InitiateControllers(CONTROL_INFO * ControlInfo)
|
||||
{
|
||||
if (g_InputPlugin != nullptr)
|
||||
|
@ -123,60 +130,65 @@ EXPORT void CALL InitiateControllers(CONTROL_INFO * ControlInfo)
|
|||
}
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: ReadController
|
||||
Purpose: To process the raw data in the pif ram that is about to
|
||||
Purpose: To process the raw data in the PIF RAM that is about to
|
||||
be read.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
input: - Controller Number (0 to 3) and -1 signaling end of
|
||||
processing the PIF RAM.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data.
|
||||
*******************************************************************/
|
||||
*/
|
||||
|
||||
EXPORT void CALL ReadController(int /*Control*/, uint8_t * /*Command*/)
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: RomOpen
|
||||
Purpose: This function is called when a rom is open. (from the
|
||||
Purpose: This function is called when a ROM is open. (from the
|
||||
emulation thread)
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
*/
|
||||
|
||||
EXPORT void CALL RomOpen(void)
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: WM_KeyDown
|
||||
Purpose: To pass the WM_KeyDown message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
*/
|
||||
|
||||
EXPORT void CALL WM_KeyDown(uint32_t /*wParam*/, uint32_t /*lParam*/)
|
||||
{
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
/*
|
||||
Function: WM_KeyUp
|
||||
Purpose: To pass the WM_KEYUP message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
*/
|
||||
|
||||
EXPORT void CALL WM_KeyUp(uint32_t /*wParam*/, uint32_t /*lParam*/)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ void CScanButton::OnTimer(UINT_PTR nIDEvent)
|
|||
time_t Now = time(nullptr);
|
||||
if (10 - (Now - m_ScanStart) > 0)
|
||||
{
|
||||
Dialog.SetWindowText(stdstr_f("Configure Input: Press Key ... (%d seconds)", 10 - (Now - m_ScanStart)).ToUTF16().c_str());
|
||||
Dialog.SetWindowText(stdstr_f("Configure input: Press key... (%d seconds)", 10 - (Now - m_ScanStart)).ToUTF16().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ void CScanButton::OnTimer(UINT_PTR nIDEvent)
|
|||
{
|
||||
m_ScanBtn.KillTimer(DETECT_KEY_TIMER);
|
||||
CWindow Dialog = m_ScanBtn.GetParent().GetParent();
|
||||
Dialog.SetWindowText(L"Configure Input");
|
||||
Dialog.SetWindowText(L"Configure input");
|
||||
|
||||
if (m_Overlay.m_hWnd != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue