diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 8f6e36a3e1..9bcbc46dc5 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -137,7 +137,7 @@ bool CBoot::LoadMapFromFilename(const std::string &_rFilename, const char *_game } -////////////////////////////////////////////////////////////////////////////////////////// + // Load a GC or Wii BIOS file bool CBoot::Load_BIOS(const std::string& _rBiosFilename) { @@ -150,7 +150,7 @@ bool CBoot::Load_BIOS(const std::string& _rBiosFilename) return true; } -////////////////////////////////////////////////////////////////////////////////////////// + // Third boot step after BootManager and Core. See Call schedule in BootManager.cpp bool CBoot::BootUp() { diff --git a/Source/Core/Core/Src/Boot/ElfTypes.h b/Source/Core/Core/Src/Boot/ElfTypes.h index ab89f2de92..941f825cb2 100644 --- a/Source/Core/Core/Src/Boot/ElfTypes.h +++ b/Source/Core/Core/Src/Boot/ElfTypes.h @@ -60,7 +60,7 @@ enum ElfMachine #define ELFDATA2MSB 2 -///////////////////// + // Sections constants // Section indexes diff --git a/Source/Core/Core/Src/CoreRerecording.cpp b/Source/Core/Core/Src/CoreRerecording.cpp index 10e776b6c7..70cb81e719 100644 --- a/Source/Core/Core/Src/CoreRerecording.cpp +++ b/Source/Core/Core/Src/CoreRerecording.cpp @@ -20,7 +20,7 @@ #ifdef RERECORDING -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #ifdef _WIN32 @@ -60,11 +60,11 @@ #include "MemTools.h" #include "Host.h" #include "LogManager.h" -//////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////// + + // File description: Rerecording Functions /* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -83,16 +83,16 @@ namespace Core { -/////////////////////////////////////////////////////////////////////////////////////////// + // Declarations and definitions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ int g_FrameCounter = 0; bool g_FrameStep = false; Common::Timer ReRecTimer; -//////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////// + + // Control Run, Pause, Stop and the Timer. // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -160,10 +160,10 @@ void WindBack(int Counter) // Logging DEBUG_LOG(CONSOLE, "WindBack: %i %u\n", Counter, (u64)CurrentTimeSeconds); } -//////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////// + + // Frame advance // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void FrameAdvance() @@ -202,10 +202,10 @@ void FrameStepOnOff() Core::SetState(Core::CORE_RUN); } } -//////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////// + + // General functions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -240,7 +240,7 @@ void FrameUpdate() // Count one frame g_FrameCounter++; } -//////////////////////////////////////// + } // Core diff --git a/Source/Core/Core/Src/DolLoader.h b/Source/Core/Core/Src/DolLoader.h index 494da2bf8e..ae5bd6de56 100644 --- a/Source/Core/Core/Src/DolLoader.h +++ b/Source/Core/Core/Src/DolLoader.h @@ -14,17 +14,17 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -///////////////////////////////////////////////////////////////////////////////////////////////////// -// M O D U L E B E G I N /////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////// + +// M O D U L E B E G I N + #pragma once #include "Common.h" -///////////////////////////////////////////////////////////////////////////////////////////////////// -// C L A S S///////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////// + +// C L A S S + class CDolLoader { diff --git a/Source/Core/Core/Src/HW/EXI_Device.cpp b/Source/Core/Core/Src/HW/EXI_Device.cpp index 82d9568dd6..52da128ac1 100644 --- a/Source/Core/Core/Src/HW/EXI_Device.cpp +++ b/Source/Core/Core/Src/HW/EXI_Device.cpp @@ -27,9 +27,9 @@ #include "../Core.h" #include "../ConfigManager.h" -////////////////////////////////////////////////////////////////////////// + // --- interface IEXIDevice --- -////////////////////////////////////////////////////////////////////////// + void IEXIDevice::ImmWrite(u32 _uData, u32 _uSize) { while (_uSize--) @@ -74,9 +74,9 @@ void IEXIDevice::DMARead(u32 _uAddr, u32 _uSize) } }; -////////////////////////////////////////////////////////////////////////// + // --- class CEXIDummy --- -////////////////////////////////////////////////////////////////////////// + // Just a dummy that logs reads and writes // to be used for EXI devices we haven't emulated class CEXIDummy : public IEXIDevice @@ -99,9 +99,9 @@ public: void DMARead (u32 addr, u32 size) {INFO_LOG(EXPANSIONINTERFACE, "EXI DUMMY %s DMARead: %08x bytes, from device to %08x", m_strName.c_str(), size, addr);} }; -////////////////////////////////////////////////////////////////////////// -// F A C T O R Y ///////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + +// F A C T O R Y + IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice) { diff --git a/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp b/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp index 745efd2d7d..b28ebb5702 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp @@ -41,7 +41,7 @@ void CEXIMic::TransferByte(u8 &byte){} bool CEXIMic::IsInterruptSet(){return false;} #else -////////////////////////////////////////////////////////////////////////// + // We use PortAudio for cross-platform audio input. // It needs the headers and a lib file for the dll #include @@ -95,9 +95,9 @@ int patestCallback( const void *inputBuffer, void *outputBuffer, return paContinue; } -////////////////////////////////////////////////////////////////////////// + // EXI Mic Device -////////////////////////////////////////////////////////////////////////// + CEXIMic::CEXIMic(int _Index) { Index = _Index; diff --git a/Source/Core/Core/Src/HW/Memmap.cpp b/Source/Core/Core/Src/HW/Memmap.cpp index aa07b4bb28..ff223726d8 100644 --- a/Source/Core/Core/Src/HW/Memmap.cpp +++ b/Source/Core/Core/Src/HW/Memmap.cpp @@ -47,10 +47,10 @@ may be redirected here (for example to Read_U32()). #include "WII_IPC.h" #include "../ConfigManager.h" #include "../Debugger/Debugger_SymbolMap.h" -///////////////////////////// -/////////////////////////////////////////////////////////////////////////////////// + + // Declarations and definitions // ---------------- namespace Memory @@ -122,10 +122,10 @@ readFn32 hwReadWii32[NUMHWMEMFUN]; readFn64 hwReadWii64[NUMHWMEMFUN]; // =============== -///////////////////////////// -/////////////////////////////////////////////////////////////////////////////////// + + // Default read and write functions // ---------------- u32 CheckDTLB(u32 _Address, XCheckTLBFlag _Flag); @@ -143,10 +143,10 @@ void HW_Default_Read(T _Data, const u32 _Address){ ERROR_LOG(MASTER_LOG, "Illega template void HW_Read_Memory(T &_Data, const u32 _Address) { _Data = *(T*)&P[_Address & PAGE_MASK]; } template void HW_Write_Memory(T _Data, const u32 _Address) { *(T*)&P[_Address & PAGE_MASK] = _Data; } -///////////////////////////// -/////////////////////////////////////////////////////////////////////////////////// + + /* Create shortcuts to the hardware devices' read and write functions. This can be seen as an alternative to a switch() or if() table. */ // ---------------- @@ -327,11 +327,11 @@ writeFn32 GetHWWriteFun32(const u32 _Address) { return hwWrite32[(_Address >> HWSHIFT) & (NUMHWMEMFUN-1)]; } -///////////////////////////// -/////////////////////////////////////////////////////////////////////////////////// + + // Init and Shutdown // ---------------- bool IsInitialized() @@ -537,7 +537,7 @@ u32 Read_Instruction(const u32 em_address) return inst.hex; } -////////////////////////////////////////////////////////// + @@ -677,7 +677,7 @@ void CheckForBadAddresses64(u32 Address, u64 Data, bool Read) -/////////////////////////////////////////////////////////////////////////////////// + // Other functions // ---------------- void WriteBigEData(const u8 *_pData, const u32 _Address, const u32 _iSize) @@ -857,7 +857,7 @@ bool IsRAMAddress(const u32 addr, bool allow_locked_cache) return false; } } -///////////////////////////// + } // namespace diff --git a/Source/Core/Core/Src/HW/MemmapFunctions.cpp b/Source/Core/Core/Src/HW/MemmapFunctions.cpp index 8f49702908..14341522d9 100644 --- a/Source/Core/Core/Src/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/Src/HW/MemmapFunctions.cpp @@ -84,7 +84,7 @@ inline u32 bswap(u32 val) {return Common::swap32(val);} inline u64 bswap(u64 val) {return Common::swap64(val);} // ================= -/////////////////////////////////////////////////////////////////////////////////// + // Read and write // ---------------- // The read and write macros that direct us to the right functions @@ -452,7 +452,7 @@ void WriteUnchecked_U32(const u32 _iValue, const u32 _Address) } // ===================== -////////////////////////////////////////////////////////// + diff --git a/Source/Core/Core/Src/HW/SI.cpp b/Source/Core/Core/Src/HW/SI.cpp index 270d3d6a35..f34d317cda 100644 --- a/Source/Core/Core/Src/HW/SI.cpp +++ b/Source/Core/Core/Src/HW/SI.cpp @@ -275,9 +275,9 @@ void Read32(u32& _uReturnValue, const u32 _iAddress) // registers switch (_iAddress & 0x3FF) { - ////////////////////////////////////////////////////////////////////////// + // Channel 0 - ////////////////////////////////////////////////////////////////////////// + case SI_CHANNEL_0_OUT: _uReturnValue = g_Channel[0].m_Out.Hex; return; @@ -294,9 +294,9 @@ void Read32(u32& _uReturnValue, const u32 _iAddress) _uReturnValue = g_Channel[0].m_InLo.Hex; return; - ////////////////////////////////////////////////////////////////////////// + // Channel 1 - ////////////////////////////////////////////////////////////////////////// + case SI_CHANNEL_1_OUT: _uReturnValue = g_Channel[1].m_Out.Hex; return; @@ -313,9 +313,9 @@ void Read32(u32& _uReturnValue, const u32 _iAddress) _uReturnValue = g_Channel[1].m_InLo.Hex; return; - ////////////////////////////////////////////////////////////////////////// + // Channel 2 - ////////////////////////////////////////////////////////////////////////// + case SI_CHANNEL_2_OUT: _uReturnValue = g_Channel[2].m_Out.Hex; return; @@ -332,9 +332,9 @@ void Read32(u32& _uReturnValue, const u32 _iAddress) _uReturnValue = g_Channel[2].m_InLo.Hex; return; - ////////////////////////////////////////////////////////////////////////// + // Channel 3 - ////////////////////////////////////////////////////////////////////////// + case SI_CHANNEL_3_OUT: _uReturnValue = g_Channel[3].m_Out.Hex; return; diff --git a/Source/Core/Core/Src/HW/SI_Device.cpp b/Source/Core/Core/Src/HW/SI_Device.cpp index 7d664529e4..228d722b3d 100644 --- a/Source/Core/Core/Src/HW/SI_Device.cpp +++ b/Source/Core/Core/Src/HW/SI_Device.cpp @@ -19,9 +19,9 @@ #include "SI_DeviceGCController.h" #include "SI_DeviceGBA.h" -////////////////////////////////////////////////////////////////////////// + // --- interface ISIDevice --- -////////////////////////////////////////////////////////////////////////// + int ISIDevice::RunBuffer(u8* _pBuffer, int _iLength) { #ifdef _DEBUG @@ -47,9 +47,9 @@ int ISIDevice::RunBuffer(u8* _pBuffer, int _iLength) return 0; }; -////////////////////////////////////////////////////////////////////////// + // --- class CSIDummy --- -////////////////////////////////////////////////////////////////////////// + // Just a dummy that logs reads and writes // to be used for SI devices we haven't emulated // and hopefully as an "emtpy" device @@ -75,9 +75,9 @@ public: void SendCommand(u32 _Cmd, u8 _Poll){INFO_LOG(SERIALINTERFACE, "SI DUMMY %i SendCommand: %08x", this->m_iDeviceNumber, _Cmd);} }; -////////////////////////////////////////////////////////////////////////// -// F A C T O R Y ///////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + +// F A C T O R Y + ISIDevice* SIDevice_Create(TSIDevices _SIDevice, int _iDeviceNumber) { diff --git a/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp b/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp index ca8cc4a7b5..ec6983edaa 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp +++ b/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp @@ -19,9 +19,9 @@ #include "SI_DeviceGBA.h" #include "GBAPipe.h" -////////////////////////////////////////////////////////////////////////// + // --- GameBoy Advance --- -////////////////////////////////////////////////////////////////////////// + CSIDevice_GBA::CSIDevice_GBA(int _iDeviceNumber) : ISIDevice(_iDeviceNumber) @@ -130,9 +130,9 @@ int CSIDevice_GBA::RunBuffer(u8* _pBuffer, int _iLength) return iPosition; } -////////////////////////////////////////////////////////////////////////// + // GetData -////////////////////////////////////////////////////////////////////////// + bool CSIDevice_GBA::GetData(u32& _Hi, u32& _Low) { @@ -141,9 +141,9 @@ CSIDevice_GBA::GetData(u32& _Hi, u32& _Low) return true; } -////////////////////////////////////////////////////////////////////////// + // SendCommand -////////////////////////////////////////////////////////////////////////// + void CSIDevice_GBA::SendCommand(u32 _Cmd, u8 _Poll) { diff --git a/Source/Core/Core/Src/HW/SI_DeviceGBA.h b/Source/Core/Core/Src/HW/SI_DeviceGBA.h index 86569eb644..ed09586235 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGBA.h +++ b/Source/Core/Core/Src/HW/SI_DeviceGBA.h @@ -18,9 +18,9 @@ #ifndef _SI_DEVICEGBA_H #define _SI_DEVICEGBA_H -////////////////////////////////////////////////////////////////////////// + // GameBoy Advance -////////////////////////////////////////////////////////////////////////// + class CSIDevice_GBA : public ISIDevice { @@ -51,9 +51,9 @@ private: }; }; FAKE_JOYSTAT js; - ////////////////////////////////////////////////////////////////////////// + //0x4000158 - JOYSTAT - Receive Status Register (R/W) (ON THE GBA) - ////////////////////////////////////////////////////////////////////////// + // NOTE: there is a typo in GBATEK! // in the JOY BUS command descriptions, SIOSTAT==JOYSTAT //Bit Expl. diff --git a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp index 76dbea22f0..843c45ac95 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp +++ b/Source/Core/Core/Src/HW/SI_DeviceGCController.cpp @@ -27,9 +27,9 @@ #include "../OnFrame.h" -////////////////////////////////////////////////////////////////////////// + // --- standard gamecube controller --- -////////////////////////////////////////////////////////////////////////// + CSIDevice_GCController::CSIDevice_GCController(int _iDeviceNumber) : ISIDevice(_iDeviceNumber) @@ -117,9 +117,9 @@ int CSIDevice_GCController::RunBuffer(u8* _pBuffer, int _iLength) return iPosition; } -////////////////////////////////////////////////////////////////////////// + // GetData -////////////////////////////////////////////////////////////////////////// + // Return true on new data (max 7 Bytes and 6 bits ;) // [00?SYXBA] [1LRZUDRL] [x] [y] [cx] [cy] [l] [r] // |\_ ERR_LATCH (error latched - check SISR) @@ -219,9 +219,9 @@ CSIDevice_GCController::GetData(u32& _Hi, u32& _Low) return true; } -////////////////////////////////////////////////////////////////////////// + // SendCommand -////////////////////////////////////////////////////////////////////////// + void CSIDevice_GCController::SendCommand(u32 _Cmd, u8 _Poll) { diff --git a/Source/Core/Core/Src/HW/SI_DeviceGCController.h b/Source/Core/Core/Src/HW/SI_DeviceGCController.h index ba918c88ec..051d4c78d0 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGCController.h +++ b/Source/Core/Core/Src/HW/SI_DeviceGCController.h @@ -21,9 +21,9 @@ #include "../PluginManager.h" #include "SI_Device.h" -////////////////////////////////////////////////////////////////////////// + // standard gamecube controller -////////////////////////////////////////////////////////////////////////// + class CSIDevice_GCController : public ISIDevice { diff --git a/Source/Core/Core/Src/HW/SystemTimers.cpp b/Source/Core/Core/Src/HW/SystemTimers.cpp index a8cab724d5..0027f55e17 100644 --- a/Source/Core/Core/Src/HW/SystemTimers.cpp +++ b/Source/Core/Core/Src/HW/SystemTimers.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -///////////////////////////////////////////////////////////////////////////// + // File description: This file controls all system timers /* ------------- "Time" is measured in frames, not time: These update frequencies are determined by the passage @@ -57,7 +57,7 @@ //////////////////////////*/ -///////////////////////////////////////////////////////////////////////////// + // Inlude // ------------- #include "Common.h" @@ -77,12 +77,12 @@ #include "Thread.h" #include "Timer.h" -///////////////////////////// + namespace SystemTimers { -///////////////////////////////////////////////////////////////////////////// + // Declarations and definitions // ------------- u32 CPU_CORE_CLOCK = 486000000u; // 486 mhz (its not 485, stop bugging me!) @@ -131,7 +131,7 @@ int // TODO: make it VI output frame rate compliant (30/60 and 25/50) // Assuming game's frame-finish-watchdog wait more than 4 emulated frame-period before starting its mess. FAKE_GP_WATCHDOG_PERIOD; -/////////////////////////////////// + u32 GetTicksPerSecond() diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp index 7644a3776d..854d263d72 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -////////////////////////////////////////////////////////////////////////// + // Include #include "../Core.h" // Local core functions #include "../Debugger/Debugger_SymbolMap.h" @@ -30,7 +30,7 @@ int g_HCICount = 0; int g_GlobalHandle = 0; -////////////////////////////////////////////////////////////////////////// + // The device class CWII_IPC_HLE_Device_usb_oh1_57e_305::CWII_IPC_HLE_Device_usb_oh1_57e_305(u32 _DeviceID, const std::string& _rDeviceName) : IWII_IPC_HLE_Device(_DeviceID, _rDeviceName) @@ -436,13 +436,13 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update() } -//////////////////////////////////////////////////////////////////////////////////////////////////// + // Events // ----------------- // This is messages send from the Wiimote to the game, for example RequestConnection() // or ConnectionComplete(). // -//////////////////////////////////////////////////////////////////////////////////////////////////// + void CWII_IPC_HLE_Device_usb_oh1_57e_305::AddEventToQueue(const SQueuedEvent& _event) { @@ -588,7 +588,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRemoteNameReq(bdaddr_t _bd) } -///////////////////////////////////////////////////////////// + /* This is called from Update() after ScanEnable has been enabled. */ // ØØØØØØØØØ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRequestConnection(CWII_IPC_HLE_WiiMote& _rWiiMote) @@ -631,7 +631,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRequestConnection(CWII_IPC_HL return true; }; -////////////////////////////// + bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRequestLinkKey(bdaddr_t _bd) @@ -991,13 +991,13 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventDisconnect(u16 _connectionHan } -//////////////////////////////////////////////////////////////////////////////////////////////////// + // Command dispacther // ----------------- // This is called from the USB_IOCTL_HCI_COMMAND_MESSAGE Ioctlv // // -//////////////////////////////////////////////////////////////////////////////////////////////////// + void CWII_IPC_HLE_Device_usb_oh1_57e_305::ExecuteHCICommandMessage(const SHCICommandMessage& _rHCICommandMessage) { @@ -1182,13 +1182,13 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::ExecuteHCICommandMessage(const SHCICom } } -//////////////////////////////////////////////////////////////////////////////////////////////////// + // // // --- command helper // // -//////////////////////////////////////////////////////////////////////////////////////////////////// + void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReset(u8* _Input) { @@ -1427,7 +1427,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageTimeOut(u8* _Input) } -///////////////////////////////////////////////////////////// + /* This will enable ScanEnable so that Update() can start the Wiimote. */ // ØØØØØØØØØ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input) @@ -1456,7 +1456,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input) SendEventCommandComplete(HCI_CMD_WRITE_SCAN_ENABLE, &Reply, sizeof(hci_write_scan_enable_rp)); } -///////////////////////////// + void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input) @@ -1907,13 +1907,13 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandLinkKeyRep(u8* _Input) -//////////////////////////////////////////////////////////////////////////////////////////////////// + // // // --- helper // // -//////////////////////////////////////////////////////////////////////////////////////////////////// + CWII_IPC_HLE_WiiMote* CWII_IPC_HLE_Device_usb_oh1_57e_305::AccessWiiMote(const bdaddr_t& _rAddr) { @@ -1951,11 +1951,11 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::LOG_LinkKey(const u8* _pLinkKey) } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // // CWII_IPC_HLE_Device_usb_oh0 // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// + CWII_IPC_HLE_Device_usb_oh0::CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const std::string& _rDeviceName) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp index c3b469910b..ec705cb965 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp @@ -77,7 +77,7 @@ CWII_IPC_HLE_WiiMote::CWII_IPC_HLE_WiiMote(CWII_IPC_HLE_Device_usb_oh1_57e_305* memset(m_LinkKey, 0xA0 + _Number, 16); } -///////////////////////////////////////////////////////////////////////////////////////////////// + // // // @@ -88,7 +88,7 @@ CWII_IPC_HLE_WiiMote::CWII_IPC_HLE_WiiMote(CWII_IPC_HLE_Device_usb_oh1_57e_305* // // // -///////////////////////////////////////////////////////////////////////////////////////////////// + bool CWII_IPC_HLE_WiiMote::Update() { @@ -149,7 +149,7 @@ bool CWII_IPC_HLE_WiiMote::Update() return false; } -///////////////////////////////////////////////////////////////////////////////////////////////// + // // // @@ -160,7 +160,7 @@ bool CWII_IPC_HLE_WiiMote::Update() // // // -///////////////////////////////////////////////////////////////////////////////////////////////// + void CWII_IPC_HLE_WiiMote::EventConnectionAccepted() { @@ -197,7 +197,7 @@ void CWII_IPC_HLE_WiiMote::EventCommandWriteLinkPolicy() m_HIDInterruptChannel_ConfigWait = false; } -///////////////////////////////////////////////////////////////////////////////////////////////// + // // // @@ -208,7 +208,7 @@ void CWII_IPC_HLE_WiiMote::EventCommandWriteLinkPolicy() // // // -///////////////////////////////////////////////////////////////////////////////////////////////// + // =================================================== @@ -390,7 +390,7 @@ void CWII_IPC_HLE_WiiMote::SignalChannel(u8* _pData, u32 _Size) } } -///////////////////////////////////////////////////////////////////////////////////////////////// + // // // @@ -401,7 +401,7 @@ void CWII_IPC_HLE_WiiMote::SignalChannel(u8* _pData, u32 _Size) // // // -///////////////////////////////////////////////////////////////////////////////////////////////// + void CWII_IPC_HLE_WiiMote::CommandConnectionReq(u8 _Ident, u8* _pData, u32 _Size) @@ -576,7 +576,7 @@ void CWII_IPC_HLE_WiiMote::CommandDisconnectionReq(u8 _Ident, u8* _pData, u32 _S SendCommandToACL(_Ident, L2CAP_DISCONN_RSP, sizeof(SL2CAP_CommandDisconnectionResponse), (u8*)&Rsp); } -///////////////////////////////////////////////////////////////////////////////////////////////// + // // // @@ -587,7 +587,7 @@ void CWII_IPC_HLE_WiiMote::CommandDisconnectionReq(u8 _Ident, u8* _pData, u32 _S // // // -///////////////////////////////////////////////////////////////////////////////////////////////// + void CWII_IPC_HLE_WiiMote::SendConnectionRequest(u16 scid, u16 psm) @@ -669,7 +669,7 @@ void CWII_IPC_HLE_WiiMote::SendConfigurationRequest(u16 scid, u16* MTU, u16* Flu SendCommandToACL(L2CAP_CONF_REQ, L2CAP_CONF_REQ, Offset, Buffer); } -///////////////////////////////////////////////////////////////////////////////////////////////// + // // // @@ -680,7 +680,7 @@ void CWII_IPC_HLE_WiiMote::SendConfigurationRequest(u16 scid, u16* MTU, u16* Flu // // // -///////////////////////////////////////////////////////////////////////////////////////////////// + #define SDP_UINT8 0x08 #define SDP_UINT16 0x09 @@ -855,7 +855,7 @@ void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size) } } -///////////////////////////////////////////////////////////////////////////////////////////////// + // // // @@ -866,7 +866,7 @@ void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size) // // // -///////////////////////////////////////////////////////////////////////////////////////////////// + void CWII_IPC_HLE_WiiMote::SendCommandToACL(u8 _Ident, u8 _Code, u8 _CommandLength, u8* _pCommandData) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.h index 6ebb8ae8b9..fbfdddfe4a 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.h @@ -188,7 +188,7 @@ public: virtual ~CWII_IPC_HLE_WiiMote() {} - ////////////////////////////////////////////////////////////// + // ugly Host handling.... // we really have to clean all this code @@ -292,7 +292,7 @@ private: void CommandConfigurationResponse(u8 _Ident, u8* _pData, u32 _Size); - ////////////////// + // some new ugly stuff // // should be inside the plugin diff --git a/Source/Core/Core/Src/PluginManager.cpp b/Source/Core/Core/Src/PluginManager.cpp index 3069609d36..82da44bcf0 100644 --- a/Source/Core/Core/Src/PluginManager.cpp +++ b/Source/Core/Core/Src/PluginManager.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -////////////////////////////////////////////////////////////////////////////////////////// + // File description /* ¯¯¯¯¯¯¯¯¯¯¯¯ @@ -25,7 +25,7 @@ created once when Dolphin starts and is closed when Dolphin is closed. */ -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯ #include // System @@ -44,10 +44,10 @@ // Create the plugin manager class CPluginManager CPluginManager::m_Instance; -///////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // The Plugin Manager Class // ¯¯¯¯¯¯¯¯¯¯¯¯ @@ -96,10 +96,10 @@ CPluginManager::~CPluginManager() delete m_video; } -////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Init and Shutdown Plugins // ¯¯¯¯¯¯¯¯¯¯¯¯ // Function: Point the m_pad[] and other variables to a certain plugin @@ -200,7 +200,7 @@ void CPluginManager::ShutdownVideoPlugin() } -//////////////////////////////////////////////////////////////////////////////// + // The PluginInfo class: Find Valid Plugins // ¯¯¯¯¯¯¯¯¯¯¯¯ /* Function: This info is used in ScanForPlugins() to check for valid plugins and and in LoadPlugin() to @@ -229,10 +229,10 @@ CPluginInfo::CPluginInfo(const char *_rFilename) WARN_LOG(CONSOLE, "PluginInfo: %s is not a valid Dolphin plugin. Ignoring.", _rFilename); } } -/////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Supporting functions // ¯¯¯¯¯¯¯¯¯¯¯¯ @@ -369,10 +369,10 @@ void CPluginManager::ScanForPlugins() } } } -///////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + /* Create or return the already created plugin pointers. This will be called often for the Pad and Wiimote from the SI_.cpp files. And often for the DSP from the DSP files. @@ -469,10 +469,10 @@ void CPluginManager::FreeWiimote(u32 Wiimote) m_wiimote[Wiimote] = NULL; } } -/////////////////////////////////////////// -////////////////////////////////////////////////////////////////////// + + // Call DLL functions // ¯¯¯¯¯¯¯¯¯¯¯¯ diff --git a/Source/Core/Core/Src/PowerPC/Gekko.h b/Source/Core/Core/Src/PowerPC/Gekko.h index 2829397b1d..957c26e208 100644 --- a/Source/Core/Core/Src/PowerPC/Gekko.h +++ b/Source/Core/Core/Src/PowerPC/Gekko.h @@ -22,9 +22,9 @@ #include "Common.h" -///////////////////////////////////////////////////////////////////////////////////////////////////// + // --- Gekko Instruction --- -////////////////////////////////////////////////////////////////////////////////////////////////////// + union UGeckoInstruction { @@ -265,11 +265,11 @@ union UGeckoInstruction }; }; -///////////////////////////////////////////////////////////////////////////////////////////////////// + // // --- Gekko Special Registers --- // -////////////////////////////////////////////////////////////////////////////////////////////////////// + // GQR Register union UGQR @@ -531,11 +531,11 @@ union UReg_PTE u32 Hex32[2]; }; -///////////////////////////////////////////////////////////////////////////////////////////////////// + // // --- Gekko Types and Defs --- // -////////////////////////////////////////////////////////////////////////////////////////////////////// + // quantize types enum EQuantizeType diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.h b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.h index e532345b7c..60d503a2b3 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.h +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Tables.h @@ -1,28 +1,28 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#ifndef INTERPRETER_TABLES_H -#define INTERPRETER_TABLES_H -#include "../Gekko.h" -#include "../PPCTables.h" -#include "Interpreter.h" - -namespace InterpreterTables -{ - void InitTables(); -} -#endif +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#ifndef INTERPRETER_TABLES_H +#define INTERPRETER_TABLES_H +#include "../Gekko.h" +#include "../PPCTables.h" +#include "Interpreter.h" + +namespace InterpreterTables +{ + void InitTables(); +} +#endif diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.h b/Source/Core/Core/Src/PowerPC/Jit64/Jit.h index c852c71273..8be8614313 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.h +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.h @@ -28,14 +28,14 @@ // * If flag available, branch code can become absolutely trivial. -////////////////////////////////////////////////////////////////////////////////////////// + // Settings // ¯¯¯¯¯¯¯¯¯¯ #define JIT_OFF_OPTIONS // Compile with JIT off options -//////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Include // ¯¯¯¯¯¯¯¯¯¯ #if JITTEST @@ -54,10 +54,10 @@ #ifdef _WIN32 #include #endif -/////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Declarations and definitions // ¯¯¯¯¯¯¯¯¯¯ @@ -84,7 +84,7 @@ void Jit(u32 em_address); // #define INSTRUCTION_START Default(inst); return; // #define INSTRUCTION_START PPCTables::CountInstruction(inst); #define INSTRUCTION_START -/////////////////////////////////// + class TrampolineCache : public Gen::XCodeBlock diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.cpp b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.cpp index f73fb5c3fa..bcdd8bdbf9 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.cpp +++ b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.cpp @@ -1,515 +1,515 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#include "Jit_Tables.h" - -// Should be moved in to the Jit class -typedef void (Jit64::*_Instruction) (UGeckoInstruction instCode); - -_Instruction dynaOpTable[64]; -_Instruction dynaOpTable4[1024]; -_Instruction dynaOpTable19[1024]; -_Instruction dynaOpTable31[1024]; -_Instruction dynaOpTable59[32]; -_Instruction dynaOpTable63[1024]; -void Jit64::DynaRunTable4(UGeckoInstruction _inst) {(this->*dynaOpTable4 [_inst.SUBOP10])(_inst);} -void Jit64::DynaRunTable19(UGeckoInstruction _inst) {(this->*dynaOpTable19[_inst.SUBOP10])(_inst);} -void Jit64::DynaRunTable31(UGeckoInstruction _inst) {(this->*dynaOpTable31[_inst.SUBOP10])(_inst);} -void Jit64::DynaRunTable59(UGeckoInstruction _inst) {(this->*dynaOpTable59[_inst.SUBOP5 ])(_inst);} -void Jit64::DynaRunTable63(UGeckoInstruction _inst) {(this->*dynaOpTable63[_inst.SUBOP10])(_inst);} - - - -struct GekkoOPTemplate -{ - int opcode; - _Instruction Inst; - //GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out - int runCount; -}; - -static GekkoOPTemplate primarytable[] = -{ - {4, &Jit64::DynaRunTable4}, //"RunTable4", OPTYPE_SUBTABLE | (4<<24), 0}}, - {19, &Jit64::DynaRunTable19}, //"RunTable19", OPTYPE_SUBTABLE | (19<<24), 0}}, - {31, &Jit64::DynaRunTable31}, //"RunTable31", OPTYPE_SUBTABLE | (31<<24), 0}}, - {59, &Jit64::DynaRunTable59}, //"RunTable59", OPTYPE_SUBTABLE | (59<<24), 0}}, - {63, &Jit64::DynaRunTable63}, //"RunTable63", OPTYPE_SUBTABLE | (63<<24), 0}}, - - {16, &Jit64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {18, &Jit64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - - {1, &Jit64::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {2, &Jit64::Default}, //"DynaBlock", OPTYPE_SYSTEM, 0}}, - {3, &Jit64::Default}, //"twi", OPTYPE_SYSTEM, 0}}, - {17, &Jit64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, - - {7, &Jit64::mulli}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}}, - {8, &Jit64::subfic}, //"subfic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {10, &Jit64::cmpXX}, //"cmpli", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {11, &Jit64::cmpXX}, //"cmpi", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, - {12, &Jit64::reg_imm}, //"addic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, - {13, &Jit64::reg_imm}, //"addic_rc", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CR0}}, - {14, &Jit64::reg_imm}, //"addi", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, - {15, &Jit64::reg_imm}, //"addis", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, - - {20, &Jit64::rlwimix}, //"rlwimix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_A | FL_IN_S | FL_RC_BIT}}, - {21, &Jit64::rlwinmx}, //"rlwinmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {23, &Jit64::rlwnmx}, //"rlwnmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_IN_B | FL_RC_BIT}}, - - {24, &Jit64::reg_imm}, //"ori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {25, &Jit64::reg_imm}, //"oris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {26, &Jit64::reg_imm}, //"xori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {27, &Jit64::reg_imm}, //"xoris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, - {28, &Jit64::reg_imm}, //"andi_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, - {29, &Jit64::reg_imm}, //"andis_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, - -#if JITTEST - {32, &Jit64::lXz}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {33, &Jit64::lXz}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {34, &Jit64::lXz}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {35, &Jit64::lXz}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {40, &Jit64::lXz}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {41, &Jit64::lXz}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, -#else - {32, &Jit64::lXz}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {33, &Jit64::Default}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {34, &Jit64::lXz}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {35, &Jit64::Default}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - {40, &Jit64::lXz}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {41, &Jit64::Default}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, -#endif - {42, &Jit64::lha}, //"lha", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, - {43, &Jit64::Default}, //"lhau", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, - - {44, &Jit64::stX}, //"sth", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {45, &Jit64::stX}, //"sthu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {36, &Jit64::stX}, //"stw", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {37, &Jit64::stX}, //"stwu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - {38, &Jit64::stX}, //"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, - {39, &Jit64::stX}, //"stbu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, - - {46, &Jit64::lmw}, //"lmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, - {47, &Jit64::stmw}, //"stmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, - - {48, &Jit64::lfs}, //"lfs", OPTYPE_LOADFP, FL_IN_A}}, - {49, &Jit64::Default}, //"lfsu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, - {50, &Jit64::lfd}, //"lfd", OPTYPE_LOADFP, FL_IN_A}}, - {51, &Jit64::Default}, //"lfdu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, - - {52, &Jit64::stfs}, //"stfs", OPTYPE_STOREFP, FL_IN_A}}, - {53, &Jit64::stfs}, //"stfsu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, - {54, &Jit64::stfd}, //"stfd", OPTYPE_STOREFP, FL_IN_A}}, - {55, &Jit64::Default}, //"stfdu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, - - {56, &Jit64::psq_l}, //"psq_l", OPTYPE_PS, FL_IN_A}}, - {57, &Jit64::psq_l}, //"psq_lu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - {60, &Jit64::psq_st}, //"psq_st", OPTYPE_PS, FL_IN_A}}, - {61, &Jit64::psq_st}, //"psq_stu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, - - //missing: 0, 5, 6, 9, 22, 30, 62, 58 - {0, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {5, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {6, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {9, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {22, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {30, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {62, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, - {58, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, -}; - -static GekkoOPTemplate table4[] = -{ //SUBOP10 - {0, &Jit64::Default}, //"ps_cmpu0", OPTYPE_PS, FL_SET_CRn}}, - {32, &Jit64::Default}, //"ps_cmpo0", OPTYPE_PS, FL_SET_CRn}}, - {40, &Jit64::ps_sign}, //"ps_neg", OPTYPE_PS, FL_RC_BIT}}, - {136, &Jit64::ps_sign}, //"ps_nabs", OPTYPE_PS, FL_RC_BIT}}, - {264, &Jit64::ps_sign}, //"ps_abs", OPTYPE_PS, FL_RC_BIT}}, - {64, &Jit64::Default}, //"ps_cmpu1", OPTYPE_PS, FL_RC_BIT}}, - {72, &Jit64::ps_mr}, //"ps_mr", OPTYPE_PS, FL_RC_BIT}}, - {96, &Jit64::Default}, //"ps_cmpo1", OPTYPE_PS, FL_RC_BIT}}, - {528, &Jit64::ps_mergeXX}, //"ps_merge00", OPTYPE_PS, FL_RC_BIT}}, - {560, &Jit64::ps_mergeXX}, //"ps_merge01", OPTYPE_PS, FL_RC_BIT}}, - {592, &Jit64::ps_mergeXX}, //"ps_merge10", OPTYPE_PS, FL_RC_BIT}}, - {624, &Jit64::ps_mergeXX}, //"ps_merge11", OPTYPE_PS, FL_RC_BIT}}, - - {1014, &Jit64::Default}, //"dcbz_l", OPTYPE_SYSTEM, 0}}, -}; - -static GekkoOPTemplate table4_2[] = -{ - {10, &Jit64::ps_sum}, //"ps_sum0", OPTYPE_PS, 0}}, - {11, &Jit64::ps_sum}, //"ps_sum1", OPTYPE_PS, 0}}, - {12, &Jit64::ps_muls}, //"ps_muls0", OPTYPE_PS, 0}}, - {13, &Jit64::ps_muls}, //"ps_muls1", OPTYPE_PS, 0}}, - {14, &Jit64::ps_maddXX}, //"ps_madds0", OPTYPE_PS, 0}}, - {15, &Jit64::ps_maddXX}, //"ps_madds1", OPTYPE_PS, 0}}, - {18, &Jit64::ps_arith}, //"ps_div", OPTYPE_PS, 0, 16}}, - {20, &Jit64::ps_arith}, //"ps_sub", OPTYPE_PS, 0}}, - {21, &Jit64::ps_arith}, //"ps_add", OPTYPE_PS, 0}}, - {23, &Jit64::ps_sel}, //"ps_sel", OPTYPE_PS, 0}}, - {24, &Jit64::Default}, //"ps_res", OPTYPE_PS, 0}}, - {25, &Jit64::ps_arith}, //"ps_mul", OPTYPE_PS, 0}}, - {26, &Jit64::ps_rsqrte}, //"ps_rsqrte", OPTYPE_PS, 0, 1}}, - {28, &Jit64::ps_maddXX}, //"ps_msub", OPTYPE_PS, 0}}, - {29, &Jit64::ps_maddXX}, //"ps_madd", OPTYPE_PS, 0}}, - {30, &Jit64::ps_maddXX}, //"ps_nmsub", OPTYPE_PS, 0}}, - {31, &Jit64::ps_maddXX}, //"ps_nmadd", OPTYPE_PS, 0}}, -}; - - -static GekkoOPTemplate table4_3[] = -{ - {6, &Jit64::Default}, //"psq_lx", OPTYPE_PS, 0}}, - {7, &Jit64::Default}, //"psq_stx", OPTYPE_PS, 0}}, - {38, &Jit64::Default}, //"psq_lux", OPTYPE_PS, 0}}, - {39, &Jit64::Default}, //"psq_stux", OPTYPE_PS, 0}}, -}; - -static GekkoOPTemplate table19[] = -{ - {528, &Jit64::bcctrx}, //"bcctrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {16, &Jit64::bclrx}, //"bclrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, - {257, &Jit64::Default}, //"crand", OPTYPE_CR, FL_EVIL}}, - {129, &Jit64::Default}, //"crandc", OPTYPE_CR, FL_EVIL}}, - {289, &Jit64::Default}, //"creqv", OPTYPE_CR, FL_EVIL}}, - {225, &Jit64::Default}, //"crnand", OPTYPE_CR, FL_EVIL}}, - {33, &Jit64::Default}, //"crnor", OPTYPE_CR, FL_EVIL}}, - {449, &Jit64::Default}, //"cror", OPTYPE_CR, FL_EVIL}}, - {417, &Jit64::Default}, //"crorc", OPTYPE_CR, FL_EVIL}}, - {193, &Jit64::Default}, //"crxor", OPTYPE_CR, FL_EVIL}}, - - {150, &Jit64::DoNothing}, //"isync", OPTYPE_ICACHE, FL_EVIL}}, - {0, &Jit64::Default}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}}, - - {50, &Jit64::rfi}, //"rfi", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS, 1}}, - {18, &Jit64::Default}, //"rfid", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS}} -}; - - -static GekkoOPTemplate table31[] = -{ - {28, &Jit64::andx}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {60, &Jit64::Default}, //"andcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {444, &Jit64::orx}, //"orx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {124, &Jit64::Default}, //"norx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {316, &Jit64::xorx}, //"xorx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {412, &Jit64::Default}, //"orcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {476, &Jit64::Default}, //"nandx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {284, &Jit64::Default}, //"eqvx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, - {0, &Jit64::cmpXX}, //"cmp", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {32, &Jit64::cmpXX}, //"cmpl", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, - {26, &Jit64::cntlzwx}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {922, &Jit64::extshx}, //"extshx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {954, &Jit64::extsbx}, //"extsbx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, - {536, &Jit64::srwx}, //"srwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {792, &Jit64::srawx}, //"srawx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {824, &Jit64::srawix}, //"srawix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - {24, &Jit64::slwx}, //"slwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, - - {54, &Jit64::Default}, //"dcbst", OPTYPE_DCACHE, 0, 4}}, - {86, &Jit64::DoNothing}, //"dcbf", OPTYPE_DCACHE, 0, 4}}, - {246, &Jit64::Default}, //"dcbtst", OPTYPE_DCACHE, 0, 1}}, - {278, &Jit64::Default}, //"dcbt", OPTYPE_DCACHE, 0, 1}}, - {470, &Jit64::Default}, //"dcbi", OPTYPE_DCACHE, 0, 4}}, - {758, &Jit64::Default}, //"dcba", OPTYPE_DCACHE, 0, 4}}, - {1014, &Jit64::dcbz}, //"dcbz", OPTYPE_DCACHE, 0, 4}}, -#if JITTEST - //load word - {23, &Jit64::lXzx}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {55, &Jit64::lXzx}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //load halfword - {279, &Jit64::lXzx}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {311, &Jit64::lXzx}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //load halfword signextend - {343, &Jit64::lhax}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {375, &Jit64::Default}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //load byte - {87, &Jit64::lXzx}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {119, &Jit64::lXzx}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, -#else - //load word - {23, &Jit64::lwzx}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {55, &Jit64::lwzux}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //load halfword - {279, &Jit64::Default}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {311, &Jit64::Default}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //load halfword signextend - {343, &Jit64::lhax}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {375, &Jit64::Default}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //load byte - {87, &Jit64::lbzx}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {119, &Jit64::Default}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, -#endif - //load byte reverse - {534, &Jit64::Default}, //"lwbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - {790, &Jit64::Default}, //"lhbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, - - // Conditional load/store (Wii SMP) - {150, &Jit64::Default}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}}, - {20, &Jit64::Default}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | FL_SET_CR0}}, - - //load string (interpret these) - {533, &Jit64::Default}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}}, - {597, &Jit64::Default}, //"lswi", OPTYPE_LOAD, FL_EVIL | FL_IN_AB | FL_OUT_D}}, - - //store word - {151, &Jit64::stXx}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {183, &Jit64::stXx}, //"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //store halfword - {407, &Jit64::stXx}, //"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {439, &Jit64::stXx}, //"sthux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //store byte - {215, &Jit64::stXx}, //"stbx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {247, &Jit64::stXx}, //"stbux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, - - //store bytereverse - {662, &Jit64::Default}, //"stwbrx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, - {918, &Jit64::Default}, //"sthbrx", OPTYPE_STORE, FL_IN_A | FL_IN_B}}, - - {661, &Jit64::Default}, //"stswx", OPTYPE_STORE, FL_EVIL}}, - {725, &Jit64::Default}, //"stswi", OPTYPE_STORE, FL_EVIL}}, - - // fp load/store - {535, &Jit64::lfsx}, //"lfsx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {567, &Jit64::Default}, //"lfsux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, - {599, &Jit64::Default}, //"lfdx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, - {631, &Jit64::Default}, //"lfdux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, - - {663, &Jit64::stfsx}, //"stfsx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {695, &Jit64::Default}, //"stfsux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {727, &Jit64::Default}, //"stfdx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - {759, &Jit64::Default}, //"stfdux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, - {983, &Jit64::Default}, //"stfiwx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, - - {19, &Jit64::mfcr}, //"mfcr", OPTYPE_SYSTEM, FL_OUT_D}}, - {83, &Jit64::mfmsr}, //"mfmsr", OPTYPE_SYSTEM, FL_OUT_D}}, - {144, &Jit64::mtcrf}, //"mtcrf", OPTYPE_SYSTEM, 0}}, - {146, &Jit64::mtmsr}, //"mtmsr", OPTYPE_SYSTEM, FL_ENDBLOCK}}, - {210, &Jit64::Default}, //"mtsr", OPTYPE_SYSTEM, 0}}, - {242, &Jit64::Default}, //"mtsrin", OPTYPE_SYSTEM, 0}}, - {339, &Jit64::mfspr}, //"mfspr", OPTYPE_SPR, FL_OUT_D}}, - {467, &Jit64::mtspr}, //"mtspr", OPTYPE_SPR, 0, 2}}, - {371, &Jit64::mftb}, //"mftb", OPTYPE_SYSTEM, FL_OUT_D | FL_TIMER}}, - {512, &Jit64::Default}, //"mcrxr", OPTYPE_SYSTEM, 0}}, - {595, &Jit64::Default}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}}, - {659, &Jit64::Default}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}}, - - {4, &Jit64::Default}, //"tw", OPTYPE_SYSTEM, 0, 1}}, - {598, &Jit64::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}}, - {982, &Jit64::Default}, //"icbi", OPTYPE_SYSTEM, 0, 3}}, - - // Unused instructions on GC - {310, &Jit64::Default}, //"eciwx", OPTYPE_INTEGER, FL_RC_BIT}}, - {438, &Jit64::Default}, //"ecowx", OPTYPE_INTEGER, FL_RC_BIT}}, - {854, &Jit64::Default}, //"eieio", OPTYPE_INTEGER, FL_RC_BIT}}, - {306, &Jit64::Default}, //"tlbie", OPTYPE_SYSTEM, 0}}, - {370, &Jit64::Default}, //"tlbia", OPTYPE_SYSTEM, 0}}, - {566, &Jit64::Default}, //"tlbsync", OPTYPE_SYSTEM, 0}}, -}; - -static GekkoOPTemplate table31_2[] = -{ - {266, &Jit64::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {10, &Jit64::Default}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {138, &Jit64::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {234, &Jit64::Default}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, -#if JITTEST - {202, &Jit64::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, -#else - {202, &Jit64::Default}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, -#endif - {491, &Jit64::Default}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {459, &Jit64::divwux}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, - {75, &Jit64::Default}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {11, &Jit64::mulhwux}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {235, &Jit64::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, - {104, &Jit64::negx}, //"negx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {40, &Jit64::subfx}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, - {8, &Jit64::subfcx}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, - {136, &Jit64::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {232, &Jit64::Default}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, - {200, &Jit64::Default}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, -}; - -static GekkoOPTemplate table59[] = -{ - {18, &Jit64::Default}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}}, - {20, &Jit64::fp_arith_s}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &Jit64::fp_arith_s}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}}, -// {22, &Jit64::Default}, //"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F}}, // Not implemented on gekko - {24, &Jit64::Default}, //"fresx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &Jit64::fp_arith_s}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &Jit64::fmaddXX}, //"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &Jit64::fmaddXX}, //"fmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &Jit64::fmaddXX}, //"fnmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &Jit64::fmaddXX}, //"fnmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, -}; - -static GekkoOPTemplate table63[] = -{ - {264, &Jit64::fsign}, //"fabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {32, &Jit64::fcmpx}, //"fcmpo", OPTYPE_FPU, FL_RC_BIT_F}}, - {0, &Jit64::fcmpx}, //"fcmpu", OPTYPE_FPU, FL_RC_BIT_F}}, - {14, &Jit64::Default}, //"fctiwx", OPTYPE_FPU, FL_RC_BIT_F}}, - {15, &Jit64::Default}, //"fctiwzx", OPTYPE_FPU, FL_RC_BIT_F}}, - {72, &Jit64::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}}, - {136, &Jit64::fsign}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}}, - {40, &Jit64::fsign}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}}, - {12, &Jit64::Default}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}}, - - {64, &Jit64::Default}, //"mcrfs", OPTYPE_SYSTEMFP, 0}}, - {583, &Jit64::Default}, //"mffsx", OPTYPE_SYSTEMFP, 0}}, - {70, &Jit64::Default}, //"mtfsb0x", OPTYPE_SYSTEMFP, 0, 2}}, - {38, &Jit64::Default}, //"mtfsb1x", OPTYPE_SYSTEMFP, 0, 2}}, - {134, &Jit64::Default}, //"mtfsfix", OPTYPE_SYSTEMFP, 0, 2}}, - {711, &Jit64::Default}, //"mtfsfx", OPTYPE_SYSTEMFP, 0, 2}}, -}; - -static GekkoOPTemplate table63_2[] = -{ - {18, &Jit64::Default}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}}, - {20, &Jit64::Default}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {21, &Jit64::Default}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {22, &Jit64::Default}, //"fsqrtx", OPTYPE_FPU, FL_RC_BIT_F}}, - {23, &Jit64::Default}, //"fselx", OPTYPE_FPU, FL_RC_BIT_F}}, - {25, &Jit64::fp_arith_s}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}}, - {26, &Jit64::fp_arith_s}, //"frsqrtex", OPTYPE_FPU, FL_RC_BIT_F}}, - {28, &Jit64::fmaddXX}, //"fmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {29, &Jit64::fmaddXX}, //"fmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, - {30, &Jit64::fmaddXX}, //"fnmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, - {31, &Jit64::fmaddXX}, //"fnmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, -}; - -namespace JitTables -{ -void CompileInstruction(UGeckoInstruction _inst) -{ - (jit.*dynaOpTable[_inst.OPCD])(_inst); - GekkoOPInfo *info = GetOpInfo(_inst); - if (info) { -#ifdef OPLOG - if (!strcmp(info->opname, OP_TO_LOG)){ ///"mcrfs" - rsplocations.push_back(jit.js.compilerPC); - } -#endif - info->compileCount++; - info->lastUse = jit.js.compilerPC; - } else { - PanicAlert("Tried to compile illegal (or unknown) instruction %08x, at %08x", _inst.hex, jit.js.compilerPC); - } -} -void InitTables() -{ - //clear - for (int i = 0; i < 32; i++) - { - dynaOpTable59[i] = &Jit64::unknown_instruction; - } - - for (int i = 0; i < 1024; i++) - { - dynaOpTable4 [i] = &Jit64::unknown_instruction; - dynaOpTable19[i] = &Jit64::unknown_instruction; - dynaOpTable31[i] = &Jit64::unknown_instruction; - dynaOpTable63[i] = &Jit64::unknown_instruction; - } - - for (int i = 0; i < (int)(sizeof(primarytable) / sizeof(GekkoOPTemplate)); i++) - { - dynaOpTable[primarytable[i].opcode] = primarytable[i].Inst; - } - - for (int i = 0; i < 32; i++) - { - int fill = i << 5; - for (int j = 0; j < (int)(sizeof(table4_2) / sizeof(GekkoOPTemplate)); j++) - { - int op = fill+table4_2[j].opcode; - dynaOpTable4[op] = table4_2[j].Inst; - } - } - - for (int i = 0; i < 16; i++) - { - int fill = i << 6; - for (int j = 0; j < (int)(sizeof(table4_3) / sizeof(GekkoOPTemplate)); j++) - { - int op = fill+table4_3[j].opcode; - dynaOpTable4[op] = table4_3[j].Inst; - } - } - - for (int i = 0; i < (int)(sizeof(table4) / sizeof(GekkoOPTemplate)); i++) - { - int op = table4[i].opcode; - dynaOpTable4[op] = table4[i].Inst; - } - - for (int i = 0; i < (int)(sizeof(table31) / sizeof(GekkoOPTemplate)); i++) - { - int op = table31[i].opcode; - dynaOpTable31[op] = table31[i].Inst; - } - - for (int i = 0; i < 1; i++) - { - int fill = i << 9; - for (int j = 0; j < (int)(sizeof(table31_2) / sizeof(GekkoOPTemplate)); j++) - { - int op = fill + table31_2[j].opcode; - dynaOpTable31[op] = table31_2[j].Inst; - } - } - - for (int i = 0; i < (int)(sizeof(table19) / sizeof(GekkoOPTemplate)); i++) - { - int op = table19[i].opcode; - dynaOpTable19[op] = table19[i].Inst; - } - - for (int i = 0; i < (int)(sizeof(table59) / sizeof(GekkoOPTemplate)); i++) - { - int op = table59[i].opcode; - dynaOpTable59[op] = table59[i].Inst; - } - - for (int i = 0; i < (int)(sizeof(table63) / sizeof(GekkoOPTemplate)); i++) - { - int op = table63[i].opcode; - dynaOpTable63[op] = table63[i].Inst; - } - - for (int i = 0; i < 32; i++) - { - int fill = i << 5; - for (int j = 0; j < (int)(sizeof(table63_2) / sizeof(GekkoOPTemplate)); j++) - { - int op = fill + table63_2[j].opcode; - dynaOpTable63[op] = table63_2[j].Inst; - } - } -} -} +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#include "Jit_Tables.h" + +// Should be moved in to the Jit class +typedef void (Jit64::*_Instruction) (UGeckoInstruction instCode); + +_Instruction dynaOpTable[64]; +_Instruction dynaOpTable4[1024]; +_Instruction dynaOpTable19[1024]; +_Instruction dynaOpTable31[1024]; +_Instruction dynaOpTable59[32]; +_Instruction dynaOpTable63[1024]; +void Jit64::DynaRunTable4(UGeckoInstruction _inst) {(this->*dynaOpTable4 [_inst.SUBOP10])(_inst);} +void Jit64::DynaRunTable19(UGeckoInstruction _inst) {(this->*dynaOpTable19[_inst.SUBOP10])(_inst);} +void Jit64::DynaRunTable31(UGeckoInstruction _inst) {(this->*dynaOpTable31[_inst.SUBOP10])(_inst);} +void Jit64::DynaRunTable59(UGeckoInstruction _inst) {(this->*dynaOpTable59[_inst.SUBOP5 ])(_inst);} +void Jit64::DynaRunTable63(UGeckoInstruction _inst) {(this->*dynaOpTable63[_inst.SUBOP10])(_inst);} + + + +struct GekkoOPTemplate +{ + int opcode; + _Instruction Inst; + //GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out + int runCount; +}; + +static GekkoOPTemplate primarytable[] = +{ + {4, &Jit64::DynaRunTable4}, //"RunTable4", OPTYPE_SUBTABLE | (4<<24), 0}}, + {19, &Jit64::DynaRunTable19}, //"RunTable19", OPTYPE_SUBTABLE | (19<<24), 0}}, + {31, &Jit64::DynaRunTable31}, //"RunTable31", OPTYPE_SUBTABLE | (31<<24), 0}}, + {59, &Jit64::DynaRunTable59}, //"RunTable59", OPTYPE_SUBTABLE | (59<<24), 0}}, + {63, &Jit64::DynaRunTable63}, //"RunTable63", OPTYPE_SUBTABLE | (63<<24), 0}}, + + {16, &Jit64::bcx}, //"bcx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + {18, &Jit64::bx}, //"bx", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + + {1, &Jit64::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + {2, &Jit64::Default}, //"DynaBlock", OPTYPE_SYSTEM, 0}}, + {3, &Jit64::Default}, //"twi", OPTYPE_SYSTEM, 0}}, + {17, &Jit64::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}}, + + {7, &Jit64::mulli}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}}, + {8, &Jit64::subfic}, //"subfic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, + {10, &Jit64::cmpXX}, //"cmpli", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, + {11, &Jit64::cmpXX}, //"cmpi", OPTYPE_INTEGER, FL_IN_A | FL_SET_CRn}}, + {12, &Jit64::reg_imm}, //"addic", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CA}}, + {13, &Jit64::reg_imm}, //"addic_rc", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_SET_CR0}}, + {14, &Jit64::reg_imm}, //"addi", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, + {15, &Jit64::reg_imm}, //"addis", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A0}}, + + {20, &Jit64::rlwimix}, //"rlwimix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_A | FL_IN_S | FL_RC_BIT}}, + {21, &Jit64::rlwinmx}, //"rlwinmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, + {23, &Jit64::rlwnmx}, //"rlwnmx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_IN_B | FL_RC_BIT}}, + + {24, &Jit64::reg_imm}, //"ori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, + {25, &Jit64::reg_imm}, //"oris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, + {26, &Jit64::reg_imm}, //"xori", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, + {27, &Jit64::reg_imm}, //"xoris", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S}}, + {28, &Jit64::reg_imm}, //"andi_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, + {29, &Jit64::reg_imm}, //"andis_rc", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_SET_CR0}}, + +#if JITTEST + {32, &Jit64::lXz}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, + {33, &Jit64::lXz}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + {34, &Jit64::lXz}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, + {35, &Jit64::lXz}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + {40, &Jit64::lXz}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, + {41, &Jit64::lXz}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, +#else + {32, &Jit64::lXz}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, + {33, &Jit64::Default}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + {34, &Jit64::lXz}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, + {35, &Jit64::Default}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + {40, &Jit64::lXz}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, + {41, &Jit64::Default}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, +#endif + {42, &Jit64::lha}, //"lha", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}}, + {43, &Jit64::Default}, //"lhau", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}}, + + {44, &Jit64::stX}, //"sth", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, + {45, &Jit64::stX}, //"sthu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, + {36, &Jit64::stX}, //"stw", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, + {37, &Jit64::stX}, //"stwu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, + {38, &Jit64::stX}, //"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S}}, + {39, &Jit64::stX}, //"stbu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S}}, + + {46, &Jit64::lmw}, //"lmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, + {47, &Jit64::stmw}, //"stmw", OPTYPE_SYSTEM, FL_EVIL, 10}}, + + {48, &Jit64::lfs}, //"lfs", OPTYPE_LOADFP, FL_IN_A}}, + {49, &Jit64::Default}, //"lfsu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, + {50, &Jit64::lfd}, //"lfd", OPTYPE_LOADFP, FL_IN_A}}, + {51, &Jit64::Default}, //"lfdu", OPTYPE_LOADFP, FL_OUT_A | FL_IN_A}}, + + {52, &Jit64::stfs}, //"stfs", OPTYPE_STOREFP, FL_IN_A}}, + {53, &Jit64::stfs}, //"stfsu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, + {54, &Jit64::stfd}, //"stfd", OPTYPE_STOREFP, FL_IN_A}}, + {55, &Jit64::Default}, //"stfdu", OPTYPE_STOREFP, FL_OUT_A | FL_IN_A}}, + + {56, &Jit64::psq_l}, //"psq_l", OPTYPE_PS, FL_IN_A}}, + {57, &Jit64::psq_l}, //"psq_lu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, + {60, &Jit64::psq_st}, //"psq_st", OPTYPE_PS, FL_IN_A}}, + {61, &Jit64::psq_st}, //"psq_stu", OPTYPE_PS, FL_OUT_A | FL_IN_A}}, + + //missing: 0, 5, 6, 9, 22, 30, 62, 58 + {0, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + {5, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + {6, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + {9, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + {22, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + {30, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + {62, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, + {58, &Jit64::Default}, //"unknown_instruction", OPTYPE_UNKNOWN, 0}}, +}; + +static GekkoOPTemplate table4[] = +{ //SUBOP10 + {0, &Jit64::Default}, //"ps_cmpu0", OPTYPE_PS, FL_SET_CRn}}, + {32, &Jit64::Default}, //"ps_cmpo0", OPTYPE_PS, FL_SET_CRn}}, + {40, &Jit64::ps_sign}, //"ps_neg", OPTYPE_PS, FL_RC_BIT}}, + {136, &Jit64::ps_sign}, //"ps_nabs", OPTYPE_PS, FL_RC_BIT}}, + {264, &Jit64::ps_sign}, //"ps_abs", OPTYPE_PS, FL_RC_BIT}}, + {64, &Jit64::Default}, //"ps_cmpu1", OPTYPE_PS, FL_RC_BIT}}, + {72, &Jit64::ps_mr}, //"ps_mr", OPTYPE_PS, FL_RC_BIT}}, + {96, &Jit64::Default}, //"ps_cmpo1", OPTYPE_PS, FL_RC_BIT}}, + {528, &Jit64::ps_mergeXX}, //"ps_merge00", OPTYPE_PS, FL_RC_BIT}}, + {560, &Jit64::ps_mergeXX}, //"ps_merge01", OPTYPE_PS, FL_RC_BIT}}, + {592, &Jit64::ps_mergeXX}, //"ps_merge10", OPTYPE_PS, FL_RC_BIT}}, + {624, &Jit64::ps_mergeXX}, //"ps_merge11", OPTYPE_PS, FL_RC_BIT}}, + + {1014, &Jit64::Default}, //"dcbz_l", OPTYPE_SYSTEM, 0}}, +}; + +static GekkoOPTemplate table4_2[] = +{ + {10, &Jit64::ps_sum}, //"ps_sum0", OPTYPE_PS, 0}}, + {11, &Jit64::ps_sum}, //"ps_sum1", OPTYPE_PS, 0}}, + {12, &Jit64::ps_muls}, //"ps_muls0", OPTYPE_PS, 0}}, + {13, &Jit64::ps_muls}, //"ps_muls1", OPTYPE_PS, 0}}, + {14, &Jit64::ps_maddXX}, //"ps_madds0", OPTYPE_PS, 0}}, + {15, &Jit64::ps_maddXX}, //"ps_madds1", OPTYPE_PS, 0}}, + {18, &Jit64::ps_arith}, //"ps_div", OPTYPE_PS, 0, 16}}, + {20, &Jit64::ps_arith}, //"ps_sub", OPTYPE_PS, 0}}, + {21, &Jit64::ps_arith}, //"ps_add", OPTYPE_PS, 0}}, + {23, &Jit64::ps_sel}, //"ps_sel", OPTYPE_PS, 0}}, + {24, &Jit64::Default}, //"ps_res", OPTYPE_PS, 0}}, + {25, &Jit64::ps_arith}, //"ps_mul", OPTYPE_PS, 0}}, + {26, &Jit64::ps_rsqrte}, //"ps_rsqrte", OPTYPE_PS, 0, 1}}, + {28, &Jit64::ps_maddXX}, //"ps_msub", OPTYPE_PS, 0}}, + {29, &Jit64::ps_maddXX}, //"ps_madd", OPTYPE_PS, 0}}, + {30, &Jit64::ps_maddXX}, //"ps_nmsub", OPTYPE_PS, 0}}, + {31, &Jit64::ps_maddXX}, //"ps_nmadd", OPTYPE_PS, 0}}, +}; + + +static GekkoOPTemplate table4_3[] = +{ + {6, &Jit64::Default}, //"psq_lx", OPTYPE_PS, 0}}, + {7, &Jit64::Default}, //"psq_stx", OPTYPE_PS, 0}}, + {38, &Jit64::Default}, //"psq_lux", OPTYPE_PS, 0}}, + {39, &Jit64::Default}, //"psq_stux", OPTYPE_PS, 0}}, +}; + +static GekkoOPTemplate table19[] = +{ + {528, &Jit64::bcctrx}, //"bcctrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, + {16, &Jit64::bclrx}, //"bclrx", OPTYPE_BRANCH, FL_ENDBLOCK}}, + {257, &Jit64::Default}, //"crand", OPTYPE_CR, FL_EVIL}}, + {129, &Jit64::Default}, //"crandc", OPTYPE_CR, FL_EVIL}}, + {289, &Jit64::Default}, //"creqv", OPTYPE_CR, FL_EVIL}}, + {225, &Jit64::Default}, //"crnand", OPTYPE_CR, FL_EVIL}}, + {33, &Jit64::Default}, //"crnor", OPTYPE_CR, FL_EVIL}}, + {449, &Jit64::Default}, //"cror", OPTYPE_CR, FL_EVIL}}, + {417, &Jit64::Default}, //"crorc", OPTYPE_CR, FL_EVIL}}, + {193, &Jit64::Default}, //"crxor", OPTYPE_CR, FL_EVIL}}, + + {150, &Jit64::DoNothing}, //"isync", OPTYPE_ICACHE, FL_EVIL}}, + {0, &Jit64::Default}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}}, + + {50, &Jit64::rfi}, //"rfi", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS, 1}}, + {18, &Jit64::Default}, //"rfid", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS}} +}; + + +static GekkoOPTemplate table31[] = +{ + {28, &Jit64::andx}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {60, &Jit64::Default}, //"andcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {444, &Jit64::orx}, //"orx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {124, &Jit64::Default}, //"norx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {316, &Jit64::xorx}, //"xorx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {412, &Jit64::Default}, //"orcx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {476, &Jit64::Default}, //"nandx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {284, &Jit64::Default}, //"eqvx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, + {0, &Jit64::cmpXX}, //"cmp", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, + {32, &Jit64::cmpXX}, //"cmpl", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}}, + {26, &Jit64::cntlzwx}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, + {922, &Jit64::extshx}, //"extshx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, + {954, &Jit64::extsbx}, //"extsbx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}}, + {536, &Jit64::srwx}, //"srwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, + {792, &Jit64::srawx}, //"srawx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, + {824, &Jit64::srawix}, //"srawix", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, + {24, &Jit64::slwx}, //"slwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}}, + + {54, &Jit64::Default}, //"dcbst", OPTYPE_DCACHE, 0, 4}}, + {86, &Jit64::DoNothing}, //"dcbf", OPTYPE_DCACHE, 0, 4}}, + {246, &Jit64::Default}, //"dcbtst", OPTYPE_DCACHE, 0, 1}}, + {278, &Jit64::Default}, //"dcbt", OPTYPE_DCACHE, 0, 1}}, + {470, &Jit64::Default}, //"dcbi", OPTYPE_DCACHE, 0, 4}}, + {758, &Jit64::Default}, //"dcba", OPTYPE_DCACHE, 0, 4}}, + {1014, &Jit64::dcbz}, //"dcbz", OPTYPE_DCACHE, 0, 4}}, +#if JITTEST + //load word + {23, &Jit64::lXzx}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {55, &Jit64::lXzx}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //load halfword + {279, &Jit64::lXzx}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {311, &Jit64::lXzx}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //load halfword signextend + {343, &Jit64::lhax}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {375, &Jit64::Default}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //load byte + {87, &Jit64::lXzx}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {119, &Jit64::lXzx}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, +#else + //load word + {23, &Jit64::lwzx}, //"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {55, &Jit64::lwzux}, //"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //load halfword + {279, &Jit64::Default}, //"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {311, &Jit64::Default}, //"lhzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //load halfword signextend + {343, &Jit64::lhax}, //"lhax", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {375, &Jit64::Default}, //"lhaux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //load byte + {87, &Jit64::lbzx}, //"lbzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {119, &Jit64::Default}, //"lbzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}}, +#endif + //load byte reverse + {534, &Jit64::Default}, //"lwbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + {790, &Jit64::Default}, //"lhbrx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}}, + + // Conditional load/store (Wii SMP) + {150, &Jit64::Default}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}}, + {20, &Jit64::Default}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | FL_SET_CR0}}, + + //load string (interpret these) + {533, &Jit64::Default}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}}, + {597, &Jit64::Default}, //"lswi", OPTYPE_LOAD, FL_EVIL | FL_IN_AB | FL_OUT_D}}, + + //store word + {151, &Jit64::stXx}, //"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, + {183, &Jit64::stXx}, //"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //store halfword + {407, &Jit64::stXx}, //"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, + {439, &Jit64::stXx}, //"sthux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //store byte + {215, &Jit64::stXx}, //"stbx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, + {247, &Jit64::stXx}, //"stbux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}}, + + //store bytereverse + {662, &Jit64::Default}, //"stwbrx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}}, + {918, &Jit64::Default}, //"sthbrx", OPTYPE_STORE, FL_IN_A | FL_IN_B}}, + + {661, &Jit64::Default}, //"stswx", OPTYPE_STORE, FL_EVIL}}, + {725, &Jit64::Default}, //"stswi", OPTYPE_STORE, FL_EVIL}}, + + // fp load/store + {535, &Jit64::lfsx}, //"lfsx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, + {567, &Jit64::Default}, //"lfsux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, + {599, &Jit64::Default}, //"lfdx", OPTYPE_LOADFP, FL_IN_A0 | FL_IN_B}}, + {631, &Jit64::Default}, //"lfdux", OPTYPE_LOADFP, FL_IN_A | FL_IN_B}}, + + {663, &Jit64::stfsx}, //"stfsx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, + {695, &Jit64::Default}, //"stfsux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, + {727, &Jit64::Default}, //"stfdx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, + {759, &Jit64::Default}, //"stfdux", OPTYPE_STOREFP, FL_IN_A | FL_IN_B}}, + {983, &Jit64::Default}, //"stfiwx", OPTYPE_STOREFP, FL_IN_A0 | FL_IN_B}}, + + {19, &Jit64::mfcr}, //"mfcr", OPTYPE_SYSTEM, FL_OUT_D}}, + {83, &Jit64::mfmsr}, //"mfmsr", OPTYPE_SYSTEM, FL_OUT_D}}, + {144, &Jit64::mtcrf}, //"mtcrf", OPTYPE_SYSTEM, 0}}, + {146, &Jit64::mtmsr}, //"mtmsr", OPTYPE_SYSTEM, FL_ENDBLOCK}}, + {210, &Jit64::Default}, //"mtsr", OPTYPE_SYSTEM, 0}}, + {242, &Jit64::Default}, //"mtsrin", OPTYPE_SYSTEM, 0}}, + {339, &Jit64::mfspr}, //"mfspr", OPTYPE_SPR, FL_OUT_D}}, + {467, &Jit64::mtspr}, //"mtspr", OPTYPE_SPR, 0, 2}}, + {371, &Jit64::mftb}, //"mftb", OPTYPE_SYSTEM, FL_OUT_D | FL_TIMER}}, + {512, &Jit64::Default}, //"mcrxr", OPTYPE_SYSTEM, 0}}, + {595, &Jit64::Default}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}}, + {659, &Jit64::Default}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}}, + + {4, &Jit64::Default}, //"tw", OPTYPE_SYSTEM, 0, 1}}, + {598, &Jit64::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}}, + {982, &Jit64::Default}, //"icbi", OPTYPE_SYSTEM, 0, 3}}, + + // Unused instructions on GC + {310, &Jit64::Default}, //"eciwx", OPTYPE_INTEGER, FL_RC_BIT}}, + {438, &Jit64::Default}, //"ecowx", OPTYPE_INTEGER, FL_RC_BIT}}, + {854, &Jit64::Default}, //"eieio", OPTYPE_INTEGER, FL_RC_BIT}}, + {306, &Jit64::Default}, //"tlbie", OPTYPE_SYSTEM, 0}}, + {370, &Jit64::Default}, //"tlbia", OPTYPE_SYSTEM, 0}}, + {566, &Jit64::Default}, //"tlbsync", OPTYPE_SYSTEM, 0}}, +}; + +static GekkoOPTemplate table31_2[] = +{ + {266, &Jit64::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, + {10, &Jit64::Default}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, + {138, &Jit64::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, + {234, &Jit64::Default}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, +#if JITTEST + {202, &Jit64::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, +#else + {202, &Jit64::Default}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, +#endif + {491, &Jit64::Default}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, + {459, &Jit64::divwux}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, + {75, &Jit64::Default}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, + {11, &Jit64::mulhwux}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, + {235, &Jit64::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, + {104, &Jit64::negx}, //"negx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, + {40, &Jit64::subfx}, //"subfx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, + {8, &Jit64::subfcx}, //"subfcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, + {136, &Jit64::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, + {232, &Jit64::Default}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, + {200, &Jit64::Default}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, +}; + +static GekkoOPTemplate table59[] = +{ + {18, &Jit64::Default}, //{"fdivsx", OPTYPE_FPU, FL_RC_BIT_F, 16}}, + {20, &Jit64::fp_arith_s}, //"fsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {21, &Jit64::fp_arith_s}, //"faddsx", OPTYPE_FPU, FL_RC_BIT_F}}, +// {22, &Jit64::Default}, //"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F}}, // Not implemented on gekko + {24, &Jit64::Default}, //"fresx", OPTYPE_FPU, FL_RC_BIT_F}}, + {25, &Jit64::fp_arith_s}, //"fmulsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {28, &Jit64::fmaddXX}, //"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {29, &Jit64::fmaddXX}, //"fmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {30, &Jit64::fmaddXX}, //"fnmsubsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {31, &Jit64::fmaddXX}, //"fnmaddsx", OPTYPE_FPU, FL_RC_BIT_F}}, +}; + +static GekkoOPTemplate table63[] = +{ + {264, &Jit64::fsign}, //"fabsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {32, &Jit64::fcmpx}, //"fcmpo", OPTYPE_FPU, FL_RC_BIT_F}}, + {0, &Jit64::fcmpx}, //"fcmpu", OPTYPE_FPU, FL_RC_BIT_F}}, + {14, &Jit64::Default}, //"fctiwx", OPTYPE_FPU, FL_RC_BIT_F}}, + {15, &Jit64::Default}, //"fctiwzx", OPTYPE_FPU, FL_RC_BIT_F}}, + {72, &Jit64::fmrx}, //"fmrx", OPTYPE_FPU, FL_RC_BIT_F}}, + {136, &Jit64::fsign}, //"fnabsx", OPTYPE_FPU, FL_RC_BIT_F}}, + {40, &Jit64::fsign}, //"fnegx", OPTYPE_FPU, FL_RC_BIT_F}}, + {12, &Jit64::Default}, //"frspx", OPTYPE_FPU, FL_RC_BIT_F}}, + + {64, &Jit64::Default}, //"mcrfs", OPTYPE_SYSTEMFP, 0}}, + {583, &Jit64::Default}, //"mffsx", OPTYPE_SYSTEMFP, 0}}, + {70, &Jit64::Default}, //"mtfsb0x", OPTYPE_SYSTEMFP, 0, 2}}, + {38, &Jit64::Default}, //"mtfsb1x", OPTYPE_SYSTEMFP, 0, 2}}, + {134, &Jit64::Default}, //"mtfsfix", OPTYPE_SYSTEMFP, 0, 2}}, + {711, &Jit64::Default}, //"mtfsfx", OPTYPE_SYSTEMFP, 0, 2}}, +}; + +static GekkoOPTemplate table63_2[] = +{ + {18, &Jit64::Default}, //"fdivx", OPTYPE_FPU, FL_RC_BIT_F, 30}}, + {20, &Jit64::Default}, //"fsubx", OPTYPE_FPU, FL_RC_BIT_F}}, + {21, &Jit64::Default}, //"faddx", OPTYPE_FPU, FL_RC_BIT_F}}, + {22, &Jit64::Default}, //"fsqrtx", OPTYPE_FPU, FL_RC_BIT_F}}, + {23, &Jit64::Default}, //"fselx", OPTYPE_FPU, FL_RC_BIT_F}}, + {25, &Jit64::fp_arith_s}, //"fmulx", OPTYPE_FPU, FL_RC_BIT_F}}, + {26, &Jit64::fp_arith_s}, //"frsqrtex", OPTYPE_FPU, FL_RC_BIT_F}}, + {28, &Jit64::fmaddXX}, //"fmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, + {29, &Jit64::fmaddXX}, //"fmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, + {30, &Jit64::fmaddXX}, //"fnmsubx", OPTYPE_FPU, FL_RC_BIT_F}}, + {31, &Jit64::fmaddXX}, //"fnmaddx", OPTYPE_FPU, FL_RC_BIT_F}}, +}; + +namespace JitTables +{ +void CompileInstruction(UGeckoInstruction _inst) +{ + (jit.*dynaOpTable[_inst.OPCD])(_inst); + GekkoOPInfo *info = GetOpInfo(_inst); + if (info) { +#ifdef OPLOG + if (!strcmp(info->opname, OP_TO_LOG)){ ///"mcrfs" + rsplocations.push_back(jit.js.compilerPC); + } +#endif + info->compileCount++; + info->lastUse = jit.js.compilerPC; + } else { + PanicAlert("Tried to compile illegal (or unknown) instruction %08x, at %08x", _inst.hex, jit.js.compilerPC); + } +} +void InitTables() +{ + //clear + for (int i = 0; i < 32; i++) + { + dynaOpTable59[i] = &Jit64::unknown_instruction; + } + + for (int i = 0; i < 1024; i++) + { + dynaOpTable4 [i] = &Jit64::unknown_instruction; + dynaOpTable19[i] = &Jit64::unknown_instruction; + dynaOpTable31[i] = &Jit64::unknown_instruction; + dynaOpTable63[i] = &Jit64::unknown_instruction; + } + + for (int i = 0; i < (int)(sizeof(primarytable) / sizeof(GekkoOPTemplate)); i++) + { + dynaOpTable[primarytable[i].opcode] = primarytable[i].Inst; + } + + for (int i = 0; i < 32; i++) + { + int fill = i << 5; + for (int j = 0; j < (int)(sizeof(table4_2) / sizeof(GekkoOPTemplate)); j++) + { + int op = fill+table4_2[j].opcode; + dynaOpTable4[op] = table4_2[j].Inst; + } + } + + for (int i = 0; i < 16; i++) + { + int fill = i << 6; + for (int j = 0; j < (int)(sizeof(table4_3) / sizeof(GekkoOPTemplate)); j++) + { + int op = fill+table4_3[j].opcode; + dynaOpTable4[op] = table4_3[j].Inst; + } + } + + for (int i = 0; i < (int)(sizeof(table4) / sizeof(GekkoOPTemplate)); i++) + { + int op = table4[i].opcode; + dynaOpTable4[op] = table4[i].Inst; + } + + for (int i = 0; i < (int)(sizeof(table31) / sizeof(GekkoOPTemplate)); i++) + { + int op = table31[i].opcode; + dynaOpTable31[op] = table31[i].Inst; + } + + for (int i = 0; i < 1; i++) + { + int fill = i << 9; + for (int j = 0; j < (int)(sizeof(table31_2) / sizeof(GekkoOPTemplate)); j++) + { + int op = fill + table31_2[j].opcode; + dynaOpTable31[op] = table31_2[j].Inst; + } + } + + for (int i = 0; i < (int)(sizeof(table19) / sizeof(GekkoOPTemplate)); i++) + { + int op = table19[i].opcode; + dynaOpTable19[op] = table19[i].Inst; + } + + for (int i = 0; i < (int)(sizeof(table59) / sizeof(GekkoOPTemplate)); i++) + { + int op = table59[i].opcode; + dynaOpTable59[op] = table59[i].Inst; + } + + for (int i = 0; i < (int)(sizeof(table63) / sizeof(GekkoOPTemplate)); i++) + { + int op = table63[i].opcode; + dynaOpTable63[op] = table63[i].Inst; + } + + for (int i = 0; i < 32; i++) + { + int fill = i << 5; + for (int j = 0; j < (int)(sizeof(table63_2) / sizeof(GekkoOPTemplate)); j++) + { + int op = fill + table63_2[j].opcode; + dynaOpTable63[op] = table63_2[j].Inst; + } + } +} +} diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.h b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.h index f82120f37e..fb75dc6ba6 100644 --- a/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.h +++ b/Source/Core/Core/Src/PowerPC/JitCommon/Jit_Tables.h @@ -1,34 +1,34 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#ifndef JIT_TABLES_H -#define JIT_TABLES_H -#include "../Gekko.h" -#include "../PPCTables.h" -#if defined JITTEST && JITTEST -#include "../Jit64IL/Jit.h" -#else -#include "../Jit64/Jit.h" -#endif - - -namespace JitTables -{ - void CompileInstruction(UGeckoInstruction _inst); - void InitTables(); -} -#endif +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#ifndef JIT_TABLES_H +#define JIT_TABLES_H +#include "../Gekko.h" +#include "../PPCTables.h" +#if defined JITTEST && JITTEST +#include "../Jit64IL/Jit.h" +#else +#include "../Jit64/Jit.h" +#endif + + +namespace JitTables +{ + void CompileInstruction(UGeckoInstruction _inst); + void InitTables(); +} +#endif diff --git a/Source/Core/Core/Src/State.cpp b/Source/Core/Core/Src/State.cpp index 8a2801d006..ac31fff4bd 100644 --- a/Source/Core/Core/Src/State.cpp +++ b/Source/Core/Core/Src/State.cpp @@ -32,9 +32,9 @@ #include "minilzo.h" -/////////// + // TODO: Investigate a memory leak on save/load state -/////////// + #if defined(__LZO_STRICT_16BIT) #define IN_LEN (8*1024u) diff --git a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp index c5f3bdda70..02db5cdb1a 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp +++ b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp @@ -176,7 +176,7 @@ void CBreakPointWindow::OnActivated(wxListEvent& event) } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + // Breakpoint actions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -227,10 +227,10 @@ void CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event) } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Memory check actions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void @@ -327,4 +327,4 @@ void CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event) wxMessageBox(_T("You have no ") T_FULL_GAMECONFIG_DIR _T("MemoryChecks.ini file")); } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index fd22ae2e0e..36635f6cd9 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -74,7 +74,7 @@ class CPluginInfo; class CPluginManager; -///////////////////////////////////////////////////////////////////////////////////////////////////// + // Main // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ BEGIN_EVENT_TABLE(CCodeWindow, wxPanel) @@ -187,10 +187,10 @@ wxAuiToolBar *CCodeWindow::GetToolBar() { return Parent->m_ToolBarDebug; } -///////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Events // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void CCodeWindow::OnKeyDown(wxKeyEvent& event) @@ -414,7 +414,7 @@ void CCodeWindow::UpdateCallstack() callstack->Append(wxString::FromAscii("invalid callstack")); } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + // Load these settings before CreateGUIControls() @@ -538,7 +538,7 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart } -///////////////////////////////////////////////////////////////////////////////////////////////////// + // Menus // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Create CPU Mode and Views menus @@ -721,10 +721,10 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event) } } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Toolbar // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void CCodeWindow::InitBitmaps() @@ -766,10 +766,10 @@ void CCodeWindow::PopulateToolbar(wxAuiToolBar* toolBar) // the changes toolBar->Realize(); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Update GUI // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -916,4 +916,4 @@ void CCodeWindow::OnStatusBar_(wxUpdateUIEvent& event) //if(event.GetId() != IDM_ADDRBOX) DoTip(wxEmptyString); #endif } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + diff --git a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp index 987c4502cd..8fa52e73ad 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindowFunctions.cpp @@ -17,7 +17,7 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #include "Common.h" @@ -76,10 +76,10 @@ extern "C" // Bitmaps #include "../resources/toolbar_delete.c" #include "../resources/toolbar_add_breakpoint.c" } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Symbols, JIT, Profiler // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void CCodeWindow::CreateSymbolsMenu() @@ -318,10 +318,10 @@ void CCodeWindow::OnChangeFont(wxCommandEvent& event) if ( dialog.ShowModal() == wxID_OK ) DebuggerFont = dialog.GetFontData().GetChosenFont(); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Toogle windows // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -538,4 +538,4 @@ void CCodeWindow::OnToggleVideoWindow(bool _show, int i) } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp index 012b660501..9fd7d1afc5 100644 --- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp @@ -215,7 +215,7 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath) memcpy(m_TicketView, pTMD + 0x180, TICKET_VIEW_SIZE); memcpy(m_TmdHeader, pTMD, TMD_HEADER_SIZE); - ////// + m_TileVersion = Common::swap16(pTMD + 0x01dc); m_numEntries = Common::swap16(pTMD + 0x01de); m_BootIndex = Common::swap16(pTMD + 0x01e0); diff --git a/Source/Core/DolphinWX/Src/BootManager.cpp b/Source/Core/DolphinWX/Src/BootManager.cpp index 5e98123b07..d5b78bfd2d 100644 --- a/Source/Core/DolphinWX/Src/BootManager.cpp +++ b/Source/Core/DolphinWX/Src/BootManager.cpp @@ -38,7 +38,7 @@ -/////////////////////////////////////////////////////////////////////////////////// + // Includes // ---------------- #include @@ -71,10 +71,10 @@ namespace BootManager #ifdef _WIN32 extern "C" HINSTANCE wxGetInstance(); #endif -///////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////// + + // Boot the ISO or file // ---------------- bool BootCore(const std::string& _rFilename) @@ -207,7 +207,7 @@ void Stop() { Core::Stop(); } -///////////////////////////////// + } // namespace diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 8217d3404e..1b569b5b8d 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -126,7 +126,7 @@ CConfigMain::~CConfigMain() { } -////////////////////////////////////////////////////////////////////////// + // Used to restrict changing of some options while emulator is running void CConfigMain::UpdateGUI() { @@ -203,7 +203,7 @@ void CConfigMain::CreateGUIControls() Notebook->AddPage(PluginPage, wxT("Plugins")); - ////////////////////////////////////////////////////////////////////////// + // General page // Core Settings - Basic @@ -347,7 +347,7 @@ void CConfigMain::CreateGUIControls() sGeneralPage->Layout(); - ////////////////////////////////////////////////////////////////////////// + // Gamecube page // IPL settings sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, wxT("IPL Settings")); @@ -438,7 +438,7 @@ void CConfigMain::CreateGUIControls() sGamecube->Layout(); - ////////////////////////////////////////////////////////////////////////// + // Wii page sbWiimoteSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("Wiimote Settings")); arrayStringFor_WiiSensBarPos.Add(wxT("Bottom")); arrayStringFor_WiiSensBarPos.Add(wxT("Top")); @@ -483,7 +483,7 @@ void CConfigMain::CreateGUIControls() sWii->Layout(); - ////////////////////////////////////////////////////////////////////////// + // Paths page sbISOPaths = new wxStaticBoxSizer(wxVERTICAL, PathsPage, wxT("ISO Directories")); ISOPaths = new wxListBox(PathsPage, ID_ISOPATHS, wxDefaultPosition, wxDefaultSize, arrayStringFor_ISOPaths, wxLB_SINGLE, wxDefaultValidator); @@ -524,7 +524,7 @@ void CConfigMain::CreateGUIControls() PathsPage->SetSizer(sPaths); sPaths->Layout(); - ////////////////////////////////////////////////////////////////////////// + // Plugins page sbGraphicsPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Graphics")); GraphicSelection = new wxChoice(PluginPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator); @@ -620,7 +620,7 @@ void CConfigMain::CloseClick(wxCommandEvent& WXUNUSED (event)) Close(); } -////////////////////////////////////////////////////////////////////////// + // Core AND Interface settings void CConfigMain::CoreSettingsChanged(wxCommandEvent& event) { @@ -687,7 +687,7 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event) } } -///////////////////////////////////////////////////////////////////////////////////// + // GC settings // ----------------------- void CConfigMain::GCSettingsChanged(wxCommandEvent& event) @@ -809,10 +809,10 @@ void CConfigMain::ChooseEXIDevice(std::string deviceName, int deviceNum) (deviceNum == 2) ? 2 : 0); // SP1 is device 2, slots are device 0 } } -/////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Wii settings // ------------------- void CConfigMain::WiiSettingsChanged(wxCommandEvent& event) @@ -842,11 +842,11 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event) break; } } -/////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + + // Paths settings // ------------------- void CConfigMain::ISOPathsSelectionChanged(wxCommandEvent& WXUNUSED (event)) @@ -912,7 +912,7 @@ void CConfigMain::DVDRootChanged(wxFileDirPickerEvent& WXUNUSED (event)) SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot = DVDRoot->GetPath().mb_str(); } -////////////////////////////////////////////////////////////////////////// + // Plugin settings void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event)) { diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 9c7c23ccf3..bc3cbc7b21 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -496,7 +496,7 @@ void CFrame::OnQuit(wxCommandEvent& WXUNUSED (event)) Close(true); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + // Events // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -794,10 +794,10 @@ void CFrame::Update() } } #endif -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Functions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ wxPanel* CFrame::CreateEmptyPanel() @@ -827,4 +827,4 @@ void CFrame::DoFullscreen(bool _F) m_Mgr->LoadPerspective(AuiCurrent, true); } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file + diff --git a/Source/Core/DolphinWX/Src/FrameAui.cpp b/Source/Core/DolphinWX/Src/FrameAui.cpp index 9c88e092ed..58a8b178b3 100644 --- a/Source/Core/DolphinWX/Src/FrameAui.cpp +++ b/Source/Core/DolphinWX/Src/FrameAui.cpp @@ -67,7 +67,7 @@ Core::GetWindowHandle(). #include // wxWidgets -///////////////////////////////////////////////////////////////////////////////////////////////////////// + // Aui events // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -208,10 +208,10 @@ void CFrame::ToggleConsole(bool _show, int i) // Make sure the check is updated (if wxw isn't calling this func) //GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(Show); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Notebooks // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #ifdef _WIN32 @@ -664,11 +664,11 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event) break; } } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Functions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -1158,4 +1158,4 @@ void CFrame::AddPane() } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index d7535112f7..c8dd02c767 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -93,7 +93,7 @@ extern "C" { wxCheatsWindow* CheatsWindow; wxInfoWindow* InfoWindow; -///////////////////////////// + // Create menu items // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void CFrame::CreateMenu() @@ -237,10 +237,10 @@ void CFrame::CreateMenu() // Associate the menu bar with the frame SetMenuBar(menuBar); } -///////////////////////////// -///////////////////////////// + + // Create toolbar items // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar) @@ -421,10 +421,10 @@ void CFrame::InitBitmaps() aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Menu items // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -704,7 +704,7 @@ void CFrame::ClearStatusBar() } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + // Miscellaneous menus // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // NetPlay stuff @@ -829,10 +829,10 @@ void CFrame::OnFrameSkip(wxCommandEvent& event) Frame::SetFrameSkipping((unsigned int)amount); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// + + // GUI // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -1011,4 +1011,4 @@ void CFrame::OnToggleStatusbar(wxCommandEvent& event) this->SendSizeEvent(); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// + diff --git a/Source/Core/DolphinWX/Src/FrameWiimote.cpp b/Source/Core/DolphinWX/Src/FrameWiimote.cpp index 47893cd9dc..cd68083b2d 100644 --- a/Source/Core/DolphinWX/Src/FrameWiimote.cpp +++ b/Source/Core/DolphinWX/Src/FrameWiimote.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -//////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯ #include "Globals.h" @@ -39,7 +39,7 @@ #include "AboutDolphin.h" #include -///////////////////////////////////////// + namespace WiimoteLeds diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 3d9156831e..f9ecd7030c 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -290,7 +290,7 @@ void CISOProperties::CreateGUIControls(bool IsWad) sButtons->Add(m_Close, 0, wxALL, 5); - ////////////////////////////////////////////////////////////////////////// + // GameConfig editing - Overrides and emulation state sbGameConfig = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Game-Specific Settings")); OverrideText = new wxStaticText(m_GameConfig, ID_OVERRIDE_TEXT, _("These settings override core Dolphin settings.\nUndetermined means the game uses Dolphin's setting."), wxDefaultPosition, wxDefaultSize); @@ -380,7 +380,7 @@ void CISOProperties::CreateGUIControls(bool IsWad) m_GameConfig->SetSizer(sConfigPage); sConfigPage->Layout(); - ////////////////////////////////////////////////////////////////////////// + // Patches sPatches = new wxBoxSizer(wxVERTICAL); Patches = new wxCheckListBox(m_PatchPage, ID_PATCHES_LIST, wxDefaultPosition, wxDefaultSize, arrayStringFor_Patches, wxLB_HSCROLL, wxDefaultValidator); @@ -403,7 +403,7 @@ void CISOProperties::CreateGUIControls(bool IsWad) m_PatchPage->SetSizer(sPatchPage); sPatchPage->Layout(); - ////////////////////////////////////////////////////////////////////////// + // Action Replay Cheats sCheats = new wxBoxSizer(wxVERTICAL); Cheats = new wxCheckListBox(m_CheatPage, ID_CHEATS_LIST, wxDefaultPosition, wxDefaultSize, arrayStringFor_Cheats, wxLB_HSCROLL, wxDefaultValidator); @@ -426,7 +426,7 @@ void CISOProperties::CreateGUIControls(bool IsWad) m_CheatPage->SetSizer(sCheatPage); sCheatPage->Layout(); - ////////////////////////////////////////////////////////////////////////// + // ISO Details sbISODetails = new wxStaticBoxSizer(wxVERTICAL, m_Information, _("ISO Details")); sISODetails = new wxGridBagSizer(0, 0); @@ -498,7 +498,7 @@ void CISOProperties::CreateGUIControls(bool IsWad) m_Information->SetSizer(sInfoPage); sInfoPage->Layout(); - ////////////////////////////////////////////////////////////////////////// + // Filesystem tree m_Treectrl = new wxTreeCtrl(m_Filesystem, ID_TREECTRL, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE, wxDefaultValidator); RootId = m_Treectrl->AddRoot(wxT("Disc"), -1, -1, 0); @@ -513,7 +513,7 @@ void CISOProperties::CreateGUIControls(bool IsWad) if (IsWad) m_Notebook->RemovePage(4); - ////////////////////////////////////////////////////////////////////////// + // Add notebook and buttons to the dialog wxBoxSizer* sMain; sMain = new wxBoxSizer(wxVERTICAL); diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index ab8be10128..19c7479716 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -429,7 +429,7 @@ void Host_UpdateBreakPointView() } -///////////////////////////////////////////////////////////// + // Update Wiimote status bar // ¯¯¯¯¯¯¯¯¯¯¯¯¯ void Host_UpdateLeds(int led_bits) @@ -466,7 +466,7 @@ void Host_UpdateStatus() memcpy(main_frame->g_Speakers_, main_frame->g_Speakers, sizeof(main_frame->g_Speakers)); } } -/////////////////////////// + void Host_UpdateMemoryView() diff --git a/Source/Core/DolphinWX/Src/NetSockets.cpp b/Source/Core/DolphinWX/Src/NetSockets.cpp index 3d5d18fd01..f9201b9fae 100644 --- a/Source/Core/DolphinWX/Src/NetSockets.cpp +++ b/Source/Core/DolphinWX/Src/NetSockets.cpp @@ -254,9 +254,9 @@ bool ServerSide::SyncValues(unsigned char socketnb, sf::IPAddress Address) m_client[socketnb].nick = std::string(buffer); m_client[socketnb].ready = false; - /////////////////// + // Test UDP Socket - /////////////////// + if (m_socketUDP.Send((const char*)&m_numplayers, 1, Address, m_client[m_numplayers].port) == sf::Socket::Done) { // Test UDP Socket Receive, 2s timeout @@ -525,9 +525,9 @@ bool ClientSide::SyncValues() m_socket.Receive(buffer, buffer_size + 1, recv_size); m_hostnick = std::string(buffer); - /////////////////// + // Test UDP Socket - /////////////////// + if (m_socketUDP.Send((const char*)&m_numplayers, 1, host.c_str(), server_port) == sf::Socket::Done) { // Test UDP Socket Receive, 2s timeout diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp index f311659a28..fc831acd30 100644 --- a/Source/Core/DolphinWX/Src/NetWindow.cpp +++ b/Source/Core/DolphinWX/Src/NetWindow.cpp @@ -18,7 +18,7 @@ #include "NetSockets.h" #include "NetWindow.h" -/////////////////////// + // Main Frame window BEGIN_EVENT_TABLE(NetPlay, wxFrame) @@ -509,7 +509,7 @@ void NetPlay::OnGUIEvent(wxCommandEvent& event) } } -///////////////////////// + // GameList popup window BEGIN_EVENT_TABLE(GameListPopup, wxDialog) diff --git a/Source/Core/InputCommon/Src/Configuration.cpp b/Source/Core/InputCommon/Src/Configuration.cpp index 47e7c4ecab..1909fe2264 100644 --- a/Source/Core/InputCommon/Src/Configuration.cpp +++ b/Source/Core/InputCommon/Src/Configuration.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: Input Configuration and Calibration @@ -7,7 +7,7 @@ // Author: Falcon4ever (nJoy@falcon4ever.com, www.multigesture.net), JPeterson etc // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -26,11 +26,11 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #if defined HAVE_WX && HAVE_WX @@ -43,14 +43,14 @@ #endif #include "SDL.h" // Local -//////////////////////////////////// + namespace InputCommon { -////////////////////////////////////////////////////////////////////////////////////////// + // Degree to radian and back // ¯¯¯¯¯¯¯¯¯¯¯¯¯ float Deg2Rad(float Deg) @@ -61,10 +61,10 @@ float Rad2Deg(float Rad) { return (Rad * 180.0f) / (float)M_PI; } -///////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Check if the pad is within the dead zone, we assume the range is 0x8000 // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ float CoordinatesToRadius(int x, int y) @@ -85,10 +85,10 @@ bool IsDeadZone(float DeadZone, int x, int y) else return false; } -///////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Scale down stick values from 0x8000 to 0x80 /* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ The value returned by SDL_JoystickGetAxis is a signed integer s16 @@ -114,10 +114,10 @@ int Pad_Convert(int _val) return _val; } -///////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Adjust the radius // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void RadiusAdjustment(int &_x, int &_y, int _pad, std::string SRadius) @@ -138,10 +138,10 @@ void RadiusAdjustment(int &_x, int &_y, int _pad, std::string SRadius) // Update values _x = (int)x, _y = (int)y; } -///////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + /* Convert the stick raidus from a square or rounded box to a circular radius. I don't know what input values the actual GC controller produce for the GC, it may be a square, a circle or something in between. But one thing that is certain is that PC pads differ in their output @@ -228,10 +228,10 @@ void Square2Circle(int &_x, int &_y, int _pad, std::string SDiagonal, bool Circl // Debugging //Console::Print("%f %f %i", corner_circle_dist, Diagonal, Tmp)); } -///////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Windows Virtual Key Codes Names // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #ifdef _WIN32 @@ -271,7 +271,7 @@ std::string VKToString(int keycode) #endif } #endif -///////////////////////////////////////////////////////////////////// + } diff --git a/Source/Core/InputCommon/Src/DirectInputBase.cpp b/Source/Core/InputCommon/Src/DirectInputBase.cpp index eabb5ec0b3..80a6a93f5c 100644 --- a/Source/Core/InputCommon/Src/DirectInputBase.cpp +++ b/Source/Core/InputCommon/Src/DirectInputBase.cpp @@ -16,11 +16,11 @@ // http://code.google.com/p/dolphin-emu/ -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #include "DirectInputBase.h" -//////////////////////////////////// + DInput::DInput() diff --git a/Source/Core/InputCommon/Src/DirectInputBase.h b/Source/Core/InputCommon/Src/DirectInputBase.h index ffb572288b..e9c4678eb8 100644 --- a/Source/Core/InputCommon/Src/DirectInputBase.h +++ b/Source/Core/InputCommon/Src/DirectInputBase.h @@ -19,7 +19,7 @@ #define _DIRECTINPUTBASE_H -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #include // System @@ -29,7 +29,7 @@ #include //#include "ConsoleWindow.h" // Common -/////////////////////////////// + class DInput diff --git a/Source/Core/InputCommon/Src/SDL.cpp b/Source/Core/InputCommon/Src/SDL.cpp index f556769df6..601915562d 100644 --- a/Source/Core/InputCommon/Src/SDL.cpp +++ b/Source/Core/InputCommon/Src/SDL.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: SDL Input @@ -7,7 +7,7 @@ // Author: Falcon4ever (nJoy@falcon4ever.com, www.multigesture.net), JPeterson etc // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -26,36 +26,36 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #define _SDL_MAIN_ // Avoid certain declarations in SDL.h #include "SDL.h" // Local #include "XInput.h" -//////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Definitions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ int g_LastPad = 0; -//////////////////////////////////// + namespace InputCommon { -////////////////////////////////////////////////////////////////////////////////////////// + // Definitions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ -//////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Search attached devices. Populate joyinfo for all attached physical devices. // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ bool SearchDevices(std::vector &_joyinfo, int &_NumPads, int &_NumGoodPads) @@ -108,10 +108,10 @@ bool SearchDevices(std::vector &_joyinfo, int &_NumPads, int &_ return true; } -//////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Supporting functions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -235,12 +235,12 @@ void GetJoyState(CONTROLLER_STATE &_PadState, CONTROLLER_MAPPING _PadMapping, in ); #endif } -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Configure button mapping // ¯¯¯¯¯¯¯¯¯¯ diff --git a/Source/Core/InputCommon/Src/SDL.h b/Source/Core/InputCommon/Src/SDL.h index 580f6fb5bf..1539111e8c 100644 --- a/Source/Core/InputCommon/Src/SDL.h +++ b/Source/Core/InputCommon/Src/SDL.h @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: SDL Input @@ -7,7 +7,7 @@ // Author: Falcon4ever (nJoy@falcon4ever.com, www.multigesture.net), JPeterson etc // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -26,12 +26,12 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + #ifndef _SDL_h #define _SDL_h -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #include // System @@ -45,20 +45,20 @@ #endif #include "Common.h" // Common -//////////////////////////// + namespace InputCommon { -////////////////////////////////////////////////////////////////////////////////////////// + // Settings // ¯¯¯¯¯¯¯¯¯¯ // Show a status window with the detected axes, buttons and so on //#define SHOW_PAD_STATUS -////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Structures /* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ CONTROLLER_STATE buttons (PadState) = 0 or 1 @@ -220,10 +220,10 @@ struct CONTROLLER_MAPPING_NEW // GC PAD MAPPING bool bRollInvert; bool bPitchInvert; }; -//////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Declarations // ¯¯¯¯¯¯¯¯¯ @@ -247,7 +247,7 @@ std::string VKToString(int keycode); #ifndef _SDL_MAIN_ extern int g_LastPad; #endif -//////////////////////////// + } // InputCommon diff --git a/Source/Core/InputCommon/Src/XInput.cpp b/Source/Core/InputCommon/Src/XInput.cpp index 024d9e44b9..e49fe65ade 100644 --- a/Source/Core/InputCommon/Src/XInput.cpp +++ b/Source/Core/InputCommon/Src/XInput.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -17,10 +17,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // File description /* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Function: This file will get the status of the analog triggers of any connected XInput device. @@ -31,21 +31,21 @@ #ifdef _WIN32 -////////////////////////////////////////////////////////////////////////////////////////// + // Includes // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #include #include // XInput API #include "SDL.h" // Local -/////////////////////////////////////////////// + namespace XInput { -////////////////////////////////////////////////////////////////////////////////////////// + // Declarations // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -57,10 +57,10 @@ struct CONTROLER_STATE bool bConnected; }; CONTROLER_STATE g_Controllers[MAX_CONTROLLERS]; -/////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Init // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ /* Function: Calculate the number of connected XInput devices @@ -87,10 +87,10 @@ void Init() } } -/////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Get the trigger status // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ int GetXI(int Controller, int Button) @@ -113,10 +113,10 @@ int GetXI(int Controller, int Button) return 0; } } -/////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Check if a certain controller is connected // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ bool IsConnected(int Controller) @@ -129,7 +129,7 @@ bool IsConnected(int Controller) else return false; } -/////////////////////////////////////////// + } // XInput diff --git a/Source/Core/InputCommon/Src/XInput.h b/Source/Core/InputCommon/Src/XInput.h index 631f67a81e..0c43381bd8 100644 --- a/Source/Core/InputCommon/Src/XInput.h +++ b/Source/Core/InputCommon/Src/XInput.h @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -17,28 +17,28 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + #ifdef _WIN32 -////////////////////////////////////////////////////////////////////////////////////////// + // Includes // ¯¯¯¯¯¯¯¯¯¯ #include -////////////////////////////// + namespace XInput { -////////////////////////////////////////////////////////////////////////////////////////// + // Declarations // ¯¯¯¯¯¯¯¯¯¯ void Init(); int GetXI(int Controller, int Button); bool IsConnected(int Controller); -////////////////////////////// + } // XInput diff --git a/Source/Core/VideoCommon/Src/BPMemory.h b/Source/Core/VideoCommon/Src/BPMemory.h index c0b09fd97c..1ca48d70df 100644 --- a/Source/Core/VideoCommon/Src/BPMemory.h +++ b/Source/Core/VideoCommon/Src/BPMemory.h @@ -105,9 +105,9 @@ #define BPMEM_TEV_KSEL 0xF6 // 0xF6 + 8 #define BPMEM_BP_MASK 0xFE -////////////////////////////////////////////////////////////////////////// + // Tev/combiner things -////////////////////////////////////////////////////////////////////////// + #define TEVOP_ADD 0 #define TEVOP_SUB 1 @@ -439,9 +439,9 @@ union RAS1_IREF u32 getTexMap(int i) { return (hex>>(6*i))&3; } }; -////////////////////////////////////////////////////////////////////////// + // Texture structs -////////////////////////////////////////////////////////////////////////// + union TexMode0 { struct @@ -559,9 +559,9 @@ struct FourTexUnits }; -////////////////////////////////////////////////////////////////////////// + // Geometry/other structs -////////////////////////////////////////////////////////////////////////// + union GenMode { struct @@ -611,9 +611,9 @@ union X10Y10 u32 hex; }; -////////////////////////////////////////////////////////////////////////// + // Framebuffer/pixel stuff (incl fog) -////////////////////////////////////////////////////////////////////////// + union BlendMode { struct @@ -736,9 +736,9 @@ union PE_CONTROL u32 hex; }; -////////////////////////////////////////////////////////////////////////// + // Texture coordinate stuff -////////////////////////////////////////////////////////////////////////// + union TCInfo { struct @@ -823,9 +823,9 @@ union UPE_Copy }; }; -////////////////////////////////////////////////////////////////////////// + // All of BP memory -////////////////////////////////////////////////////////////////////////// + struct BPCmd { diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index 660aac3399..7c8422f45a 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -35,12 +35,12 @@ extern const unsigned char sfont_raw[][9*10]; // STATE_TO_SAVE u8 texMem[TMEM_SIZE]; -////////////////////////////////////////////////////////////////////////// + // Gamecube/Wii texture decoder -////////////////////////////////////////////////////////////////////////// + // Decodes all known Gamecube/Wii texture formats. // by ector -////////////////////////////////////////////////////////////////////////// + int TexDecoder_GetTexelSizeInNibbles(int format) { switch (format & 0x3f) { diff --git a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp index 44b4b87069..1b8fc73f5d 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp @@ -65,8 +65,8 @@ void _SetCol565(u16 val) col |= Convert5To8(val & 0x1F) << BSHIFT; _SetCol(col | (0xFF << ASHIFT)); } -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + + inline u32 _Read24(const u8 *addr) { return addr[0] | (addr[1] << 8) | (addr[2] << 16) | 0xFF000000; @@ -77,8 +77,8 @@ inline u32 _Read32(const u8 *addr) return *(const u32 *)addr; } -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + + void LOADERDECL Color_ReadDirect_24b_888() { @@ -129,9 +129,9 @@ void LOADERDECL Color_ReadDirect_32b_8888() _SetCol(col); } -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + + + void LOADERDECL Color_ReadIndex8_16b_565() { u8 Index = DataReadU8(); @@ -169,9 +169,9 @@ void LOADERDECL Color_ReadIndex8_32b_8888() const u8 *iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]); _SetCol(_Read32(iAddress)); } -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + + + void LOADERDECL Color_ReadIndex16_16b_565() { u16 Index = DataReadU16(); diff --git a/Source/Core/VideoCommon/Src/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/Src/VertexLoader_Normal.cpp index 62b5c13311..e5d2cc8327 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader_Normal.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader_Normal.cpp @@ -108,9 +108,9 @@ TPipelineFunction VertexLoader_Normal::GetFunction(unsigned int _type, unsigned return pFunc; } -///////////////////////////////////////////////////////////////////////////////////////////////////// + // --- Direct --- -///////////////////////////////////////////////////////////////////////////////////////////////////// + void LOADERDECL VertexLoader_Normal::Normal_DirectByte() { *VertexManager::s_pCurBufferPointer++ = DataReadU8(); @@ -178,9 +178,9 @@ void LOADERDECL VertexLoader_Normal::Normal_DirectFloat3() } } -///////////////////////////////////////////////////////////////////////////////////////////////////// + // --- Index8 --- -///////////////////////////////////////////////////////////////////////////////////////////////////// + void LOADERDECL VertexLoader_Normal::Normal_Index8_Byte() { u8 Index = DataReadU8(); @@ -302,9 +302,9 @@ void LOADERDECL VertexLoader_Normal::Normal_Index8_Float3_Indices3() } } -///////////////////////////////////////////////////////////////////////////////////////////////////// + // --- Index16 --- -///////////////////////////////////////////////////////////////////////////////////////////////////// + void LOADERDECL VertexLoader_Normal::Normal_Index16_Byte() { diff --git a/Source/Core/VideoCommon/Src/VideoCommon.h b/Source/Core/VideoCommon/Src/VideoCommon.h index 91653bcc01..00d4782a56 100644 --- a/Source/Core/VideoCommon/Src/VideoCommon.h +++ b/Source/Core/VideoCommon/Src/VideoCommon.h @@ -60,7 +60,7 @@ enum extern SVideoInitialize g_VideoInitialize; -////////////////////////////////////////////////////////////////////////// + inline u8 *Memory_GetPtr(u32 _uAddress) { return g_VideoInitialize.pGetMemoryPointer(_uAddress); @@ -80,7 +80,7 @@ inline u32 Memory_Read_U32(u32 _uAddress) { return Common::swap32(*(u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress)); } -////////////////////////////////////////////////////////////////////////// + inline u8* Memory_Read_U8_Ptr(u32 _uAddress) { return (u8*)g_VideoInitialize.pGetMemoryPointer(_uAddress); @@ -95,7 +95,7 @@ inline u32* Memory_Read_U32_Unswapped_Ptr(u32 _uAddress) { return (u32*)g_VideoInitialize.pGetMemoryPointer(_uAddress); } -////////////////////////////////////////////////////////////////////////// + inline float Memory_Read_Float(u32 _uAddress) { diff --git a/Source/Core/VideoCommon/Src/XFMemory.h b/Source/Core/VideoCommon/Src/XFMemory.h index 10f554072a..200fdadb11 100644 --- a/Source/Core/VideoCommon/Src/XFMemory.h +++ b/Source/Core/VideoCommon/Src/XFMemory.h @@ -20,9 +20,9 @@ #include "Common.h" -///////////// + // Lighting -///////////// + #define XF_TEXPROJ_ST 0 #define XF_TEXPROJ_STQ 1 diff --git a/Source/PluginSpecs/PluginSpecs.h b/Source/PluginSpecs/PluginSpecs.h index 216410945f..d30d125a1b 100644 --- a/Source/PluginSpecs/PluginSpecs.h +++ b/Source/PluginSpecs/PluginSpecs.h @@ -1,23 +1,23 @@ -////////////////////////////////////////////////////////////////////////////////////////// + //________________________________________________________________________________________ // File description: Common plugin spec, version #1.0 maintained by F|RES -/////////////////////////// + #ifndef _PLUGINS_H_INCLUDED__ #define _PLUGINS_H_INCLUDED__ -////////////////////////////////////////////////////////////////////////////////////////// + // Includes // ------------ #ifdef _WIN32 #include #endif #include "CommonTypes.h" -/////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + /* Plugin communication. I place this here rather in Common.h since these messages are only received at one place, by the CPanel in Frame.cpp. That way I don't have to rebuild if any of this is changed */ // ----------------- @@ -31,10 +31,10 @@ enum PLUGIN_COMM INPUT_FRAME_COUNTER, // Wind back the frame counter for rerecording OPENGL_VIDEO_STOP }; -/////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // System specific declarations and definitions // ------------ @@ -59,10 +59,10 @@ enum PLUGIN_COMM #if defined(__cplusplus) extern "C" { #endif -/////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Global values // ------------ @@ -81,10 +81,10 @@ enum PLUGIN_TYPE { #define STATE_MODE_WRITE 2 #define STATE_MODE_MEASURE 3 -/////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Export structs // ------------ typedef struct @@ -100,11 +100,11 @@ typedef struct void *config; void *logManager; } PLUGIN_GLOBALS; -/////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// GLOBAL I N T E R F A C E /////////////////////////////////////////////////// + + +// GLOBAL I N T E R F A C E // ____________________________________________________________________________ // Function: GetDllInfo // Purpose: This function allows the emulator to gather information @@ -164,7 +164,7 @@ EXPORT void CALL Shutdown(void); // input: mode // EXPORT void CALL DoState(unsigned char **ptr, int mode); -/////////////////////////////// + #if defined(__cplusplus) diff --git a/Source/PluginSpecs/pluginspecs_pad.h b/Source/PluginSpecs/pluginspecs_pad.h index 161d0c1063..3cfebdee51 100644 --- a/Source/PluginSpecs/pluginspecs_pad.h +++ b/Source/PluginSpecs/pluginspecs_pad.h @@ -53,8 +53,8 @@ typedef struct signed char err; // one of PAD_ERR_* number } SPADStatus; -///////////////////////////////////////////////////////////////////////////////////////////////////// -// I N T E R F A C E /////////////////////////////////////////////////////////// + +// I N T E R F A C E // __________________________________________________________________________________________________ // Function: diff --git a/Source/PluginSpecs/pluginspecs_video.h b/Source/PluginSpecs/pluginspecs_video.h index 045e12efcb..4315384034 100644 --- a/Source/PluginSpecs/pluginspecs_video.h +++ b/Source/PluginSpecs/pluginspecs_video.h @@ -94,9 +94,9 @@ typedef struct } SVideoInitialize; -///////////////////////////////////////////////////////////////////////////////////////////////////// -// I N T E R F A C E //////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////// + +// I N T E R F A C E + // __________________________________________________________________________________________________ // Function: Video_Prepare diff --git a/Source/PluginSpecs/pluginspecs_wiimote.h b/Source/PluginSpecs/pluginspecs_wiimote.h index 07fa427b36..2bc53a9666 100644 --- a/Source/PluginSpecs/pluginspecs_wiimote.h +++ b/Source/PluginSpecs/pluginspecs_wiimote.h @@ -24,9 +24,9 @@ typedef struct TWiimoteInput pWiimoteInput; } SWiimoteInitialize; -///////////////////////////////////////////////////////////////////////////////////////////////////// -// I N T E R F A C E //////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////// + +// I N T E R F A C E + // __________________________________________________________________________________________________ // Function: Wiimote_Output diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Blocks.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Blocks.cpp index cd2a976aea..32ac16b50b 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Blocks.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Blocks.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -17,10 +17,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Includes // ------------- #include @@ -38,7 +38,7 @@ #include "StringUtil.h" #include "FileSearch.h" //#include "../Logging/File.h" // Write to file -/////////////////////////////// + // Make the wxTextCtrls scroll with each other diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp index 850711b8f3..9bf8c123ee 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -17,10 +17,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Includes // ------------- // includes @@ -40,7 +40,7 @@ #include "Debugger.h" #include "PBView.h" #include "../Debugger/File.h" // Write to file -////////////////////////////// + // ======================================================================================= // Event table and class @@ -228,7 +228,7 @@ void DSPDebuggerHLE::Load(IniFile& _IniFile) // =================== -////////////////////////////////////////////////////////////////////////////////////////// + // Create GUI controls // ------------- void DSPDebuggerHLE::CreateGUIControls() diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h index 46f585eb31..4340a5199f 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Debugger.h @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -17,7 +17,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + #ifndef __DSPDebuggerHLE_h__ #define __DSPDebuggerHLE_h__ diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.cpp index d5e3dea54d..2e3c89ae75 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.cpp @@ -67,7 +67,7 @@ void StartFile(int width, int height, char* fname) // ====================== -////////////////////////////////////////////////////////////////////////////////////////// + /* Close the file handles */ // ------------- void CloseFile() @@ -78,7 +78,7 @@ void CloseFile() if(__fStdOut[i]) fclose(__fStdOut[i]); } } -////////////////////////////// + // --------------------------------------------------------------------------------------- diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h index 48d4fbfda2..a2a3a708c5 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/File.h @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -////////////////////////////////////////////////////////////////////////////////////////// + // Declarations and definitions // ------------- @@ -37,5 +37,5 @@ void CloseConsole(); #ifdef _WIN32 HWND GetConsoleHwnd(void); #endif -///////////////////////////// + diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Logging.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Logging.cpp index 3eb54acdf5..138e544c1f 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Logging.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Logging.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -17,10 +17,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Includes // ------------- @@ -43,10 +43,10 @@ #include "../UCodes/UCode_AX.h" #include "../UCodes/UCode_AXWii.h" #include "../UCodes/UCode_AX_Voice.h" -////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Declarations and definitions // ------------- @@ -149,7 +149,7 @@ std::vector numberRunning(NUMBER_OF_PBS); // Classes extern DSPDebuggerHLE* m_DebuggerFrame; -////////////////////////// + // ======================================================================================= diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp index f129816c01..394f4935a6 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Debugger/Mails.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -17,10 +17,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Includes // ------------- #include @@ -39,15 +39,15 @@ #include "FileUtil.h" #include "StringUtil.h" #include "FileSearch.h" -/////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Declarations and definitions // ------------- extern std::vector sMailLog, sMailTime; extern DSPDebuggerHLE* m_DebuggerFrame; -/////////////////////////////// + // ======================================================================================= diff --git a/Source/Plugins/Plugin_PadSimple/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_PadSimple/Src/GUI/ConfigDlg.cpp index e928b58ee7..286c495146 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_PadSimple/Src/GUI/ConfigDlg.cpp @@ -87,7 +87,7 @@ PADConfigDialogSimple::~PADConfigDialogSimple() } -////////////////////////////////////////////////////////////////////////////////////////// + // Create input button controls // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ inline void AddControl(wxPanel *pan, wxButton **button, wxStaticBoxSizer *sizer, @@ -114,7 +114,7 @@ inline void AddControl(wxPanel *pan, wxButton **button, wxStaticBoxSizer *sizer, hButton->Add(*button, 0, wxALIGN_RIGHT|wxALL); sizer->Add(hButton, 0, wxALIGN_RIGHT|wxALL); } -//////////////////////////////////// + void PADConfigDialogSimple::CreateGUIControls() @@ -220,7 +220,7 @@ void PADConfigDialogSimple::CreateGUIControls() // ----------------------------------- - ///////////////////////////////////////////////////////////////////////////////////// + // Rerecording // ¯¯¯¯¯¯¯¯¯ #ifdef RERECORDING @@ -257,7 +257,7 @@ void PADConfigDialogSimple::CreateGUIControls() //DEBUG_LOG(CONSOLE, "m_CheckRecording: %i\n", pad[0].bRecording, pad[0].bPlayback); #endif - ////////////////////////////////////// + // -------------------------------------------------------------------- diff --git a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp index a3043d7ca1..7ccf41a431 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp +++ b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp @@ -16,7 +16,7 @@ // http://code.google.com/p/dolphin-emu/ -////////////////////////////////////////////////////////////////////////// + // Include #include #include @@ -58,12 +58,12 @@ #endif -////////////////////////////////////////////////////////////////////////// + // Declarations SPads pad[4]; SPADInitialize g_PADInitialize; -////////////////////////////////////////////////////////////////////////// + // Standard crap to make wxWidgets happy #ifdef _WIN32 HINSTANCE g_hInstance; @@ -129,7 +129,7 @@ wxWindow* GetParentedWxWindow(HWND Parent) #endif -////////////////////////////////////////////////////////////////////////// + // Input Recording // Enable these to record or play back diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index 03848cd387..10b257a605 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -330,7 +330,7 @@ void Renderer::SwapBuffers() DEBUGGER_PAUSE_COUNT_N_WITHOUT_UPDATE(NEXT_FRAME); //D3D frame is now over - ////////////////////////////////////////////////////////////////////////// + //clean out old stuff from caches frameCount++; @@ -338,7 +338,7 @@ void Renderer::SwapBuffers() VertexShaderCache::Cleanup(); TextureCache::Cleanup(); - ////////////////////////////////////////////////////////////////////////// + //Begin new frame //Set default viewport and scissor, for the clear to work correctly stats.ResetFrame(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index 790fe9d491..cf8b6cd7dd 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -92,7 +92,7 @@ GFXConfigDialogOGL::GFXConfigDialogOGL(wxWindow *parent, wxWindowID id, const wx g_Config.UpdateProjectionHack(); } -/////////////////////////////////////////////////////////////////////////////////////////////// + // Close and unload the window // --------------- GFXConfigDialogOGL::~GFXConfigDialogOGL() @@ -127,9 +127,9 @@ void GFXConfigDialogOGL::CloseClick(wxCommandEvent& WXUNUSED (event)) //Close(); CloseWindow(); } -/////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////// + + // Add avaliable resolutions and other settings // --------------- void GFXConfigDialogOGL::AddFSReso(const char *reso) @@ -142,7 +142,7 @@ void GFXConfigDialogOGL::AddWindowReso(const char *reso) arrayStringFor_WindowResolutionCB.Add(wxString::FromAscii(reso)); } -/////////////////////////////////////// + void GFXConfigDialogOGL::CreateGUIControls() diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index b757bb5661..47e2770906 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -74,7 +74,7 @@ #else #endif -////////////////////////////////////////////////////////////////////////////////////////// + // Declarations and definitions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ CGcontext g_cgcontext; @@ -646,7 +646,7 @@ GLuint Renderer::ResolveAndGetDepthTarget(const EFBRectangle &source_rect) } -///////////////////////////////////////////////////////////////////////////// + // Function: This function handles the OpenGL glScissor() function // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg() @@ -1049,7 +1049,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight) } -////////////////////////////////////////////////////////////////////////////////////////// + // We can now draw whatever we want on top of the picture. Then we copy the final picture to the output. // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void Renderer::SwapBuffers() diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Win32Window.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Win32Window.cpp index cec96f8a59..b871b12e7d 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Win32Window.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Win32Window.cpp @@ -375,9 +375,9 @@ void Win32Window::Cleanup() } } -//////////////////////////////////////////////////////////// + /// Process a Win32 Event -//////////////////////////////////////////////////////////// + void Win32Window::ProcessEvent(UINT Message, WPARAM WParam, LPARAM LParam) { // Don't process any message until window is created @@ -628,10 +628,10 @@ void Win32Window::ProcessEvent(UINT Message, WPARAM WParam, LPARAM LParam) } } -/////////////////////////////////////////////////////////// + /// Check the state of the shift keys on a key sf::Event, /// and return the corresponding SF key code -//////////////////////////////////////////////////////////// + sf::Key::Code Win32Window::GetShiftState(bool KeyDown) { static bool LShiftPrevDown = false; @@ -658,9 +658,9 @@ sf::Key::Code Win32Window::GetShiftState(bool KeyDown) return Code; } -/////////////////////////////////////////////////////////// + /// Convert a Win32 virtual key code to a SFML key code -//////////////////////////////////////////////////////////// + sf::Key::Code Win32Window::VirtualKeyCodeToSF(WPARAM VirtualKey, LPARAM Flags) { switch (VirtualKey) @@ -768,9 +768,9 @@ sf::Key::Code Win32Window::VirtualKeyCodeToSF(WPARAM VirtualKey, LPARAM Flags) return sf::Key::Code(0); } -/////////////////////////////////////////////////////////// + /// Win32 Callback for the window class -//////////////////////////////////////////////////////////// + LRESULT CALLBACK Win32Window::GlobalOnEvent(HWND Handle, UINT Message, WPARAM WParam, LPARAM LParam) { // Associate handle and Window instance when the creation message is received diff --git a/Source/Plugins/Plugin_VideoOGL/Src/nmain.cpp b/Source/Plugins/Plugin_VideoOGL/Src/nmain.cpp index 39efdc5f16..2ce28acf0c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/nmain.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/nmain.cpp @@ -47,9 +47,9 @@ SVideoInitialize g_VideoInitialize; PLUGIN_GLOBALS* globals; -////////////////////////////////////////////////////////////////////////// + // Nasty stuff which win32 needs for wxw -////////////////////////////////////////////////////////////////////////// + #if defined(_WIN32) && defined(HAVE_WX) && HAVE_WX HINSTANCE g_hInstance; @@ -92,7 +92,7 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle return TRUE; } #endif -////////////////////////////////////////////////////////////////////////// + /* Create debugging window. There's currently a strange crash that occurs whe a game is loaded if the OpenGL plugin was loaded before. I'll try to fix that. Currently you may have to diff --git a/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp b/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp index ababc6322d..7b32dae144 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/ConfigGamepad.cpp @@ -582,7 +582,7 @@ void WiimotePadConfigDialog::PadGetStatus() WiiMoteEmu::GetJoyState(WiiMoteEmu::PadState[Page], WiiMoteEmu::PadMapping[Page], Page, WiiMoteEmu::joyinfo.at(WiiMoteEmu::PadMapping[Page].ID).NumButtons); - ////////////////////////////////////// + // Analog stick // Set Deadzones perhaps out of function //int deadzone = (int)(((float)(128.00/100.00)) * (float)(PadMapping[_numPAD].deadzone+1)); diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp index d3340bd07f..7a8e295954 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,10 +27,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////// + + // Include // ¯¯¯¯¯¯¯¯¯ #include "nJoy.h" @@ -40,7 +40,7 @@ Config g_Config; #if defined(HAVE_WX) && HAVE_WX extern PADConfigDialognJoy* m_ConfigFrame; #endif -////////////////////////////////// + // Run when created @@ -92,7 +92,7 @@ void DEBUG_QUIT() } -///////////////////////////////////////////////////////////////////////////////////// + // Save settings to file // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ void Config::Save(int Slot) diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.cpp index 1a23aece71..726209e308 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,7 +27,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + #include "AboutBox.h" #include "../nJoy.h" diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.h b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.h index d559a52f53..e80abd9ce8 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/AboutBox.h @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,7 +27,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + #ifndef __ABOUTBOX_h__ #define __ABOUTBOX_h__ diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigAdvanced.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigAdvanced.cpp index d31a6c5843..3c2f50a89d 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigAdvanced.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigAdvanced.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,10 +27,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Include // ¯¯¯¯¯¯¯¯¯ #include "ConfigBox.h" @@ -38,7 +38,7 @@ #include "Images/controller.xpm" extern bool g_EmulatorRunning; -//////////////////////// + /* If we don't use this hack m_MainSizer->GetMinSize().GetWidth() will not change when we enable and disable bShowAdvanced */ @@ -62,7 +62,7 @@ void PADConfigDialognJoy::PadGetStatus() int PhysicalDevice = PadMapping[notebookpage].ID; int TriggerType = PadMapping[notebookpage].triggertype; - ////////////////////////////////////// + // Analog stick // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Set Deadzones perhaps out of function @@ -121,7 +121,7 @@ void PADConfigDialognJoy::PadGetStatus() ///////////////////// Analog stick - ////////////////////////////////////// + // Triggers // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ int TriggerValue = 255; @@ -318,7 +318,7 @@ void PADConfigDialognJoy::CreateAdvancedControls(int i) m_bmpDotOutC[i] = new wxStaticBitmap(m_pOutStatusC[i], wxID_ANY, CreateBitmapDot(), wxPoint(BoxW / 2, BoxH / 2), wxDefaultSize); - ///////////////////////////////////////////////////////////////////////////////////// + // Rerecording // ¯¯¯¯¯¯¯¯¯ #ifdef RERECORDING @@ -355,7 +355,7 @@ void PADConfigDialognJoy::CreateAdvancedControls(int i) //Console::Print("m_CheckRecording: %i\n", g_Config.bRecording, g_Config.bPlayback); #endif - ////////////////////////////////////// + } diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigBox.h b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigBox.h index 7a73ccef35..9d3f855ef9 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigBox.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigBox.h @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,7 +27,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + #ifndef __CONFIGBOX_h__ @@ -94,7 +94,7 @@ class PADConfigDialognJoy : public wxDialog wxStaticBoxSizer * m_sKeys[4]; wxBoxSizer *m_sMain[4], *m_sMainLeft[4], *m_sMainRight[4]; - ///////////////////////////// + // Settings // ¯¯¯¯¯¯¯¯¯ @@ -131,7 +131,7 @@ class PADConfigDialognJoy : public wxDialog wxStaticBoxSizer *m_gStatusTriggers[4]; // Triggers wxStaticText *m_TStatusTriggers[4]; - ///////////////////////////// + // Keys // ¯¯¯¯¯¯¯¯¯ int g_Pressed; // Keyboard input diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigJoypad.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigJoypad.cpp index 5eeb627349..99fc9e962a 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigJoypad.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/GUI/ConfigJoypad.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,10 +27,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Include // ¯¯¯¯¯¯¯¯¯ #include "math.h" // System @@ -40,7 +40,7 @@ #include "Images/controller.xpm" extern bool g_EmulatorRunning; -//////////////////////// + // Set dialog items from saved values @@ -251,7 +251,7 @@ wxString PADConfigDialognJoy::GetButtonText(int id, int Page) } -////////////////////////////////////////////////////////////////////////////////////////// + // Configure button mapping // ¯¯¯¯¯¯¯¯¯¯ diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp index a829ff918d..8a0c29b5ae 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/ReRecording.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,10 +27,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + -////////////////////////////////////////////////////////////////////////////////////////// + // File description /* ¯¯¯¯¯¯¯¯¯ @@ -39,13 +39,13 @@ Rerecording options ////////////////////////*/ -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯ #include "nJoy.h" #include "FileUtil.h" #include "ChunkFile.h" -///////////////////////// + #ifdef RERECORDING @@ -55,18 +55,18 @@ namespace Recording { -////////////////////////////////////////////////////////////////////////////////////////// + // Definitions // ¯¯¯¯¯¯¯¯¯¯¯¯¯ // Pre defined maxium storage limit #define RECORD_SIZE (1024 * 128) SPADStatus RecordBuffer[RECORD_SIZE]; int count = 0; -//////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Recording functions // ¯¯¯¯¯¯¯¯¯¯¯¯¯ void RecordInput(const SPADStatus& _rPADStatus) @@ -130,7 +130,7 @@ void Save() //PanicAlert("SaveRecord()"); //Console::Print("SaveRecord()"); } -//////////////////////////////// + diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/Rumble.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/Rumble.cpp index a394afe080..a641d18741 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/Rumble.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/Rumble.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,16 +27,16 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////// + + // Include // ¯¯¯¯¯¯¯¯¯ #include "nJoy.h" -////////////////////////////////////////////////////////////////////////////////////////// + // Enable or disable rumble. // ¯¯¯¯¯¯¯¯¯ @@ -72,7 +72,7 @@ bool CanRumble = false; #endif -////////////////////// + // Use PAD rumble // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -128,7 +128,7 @@ void Pad_Use_Rumble(u8 _numPAD) #endif } -//////////////////////////////////////////////////// + // Set PAD rumble. Explanation: Stop = 0, Rumble = 1 // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -187,7 +187,7 @@ void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength) } #ifdef _WIN32 -////////////////////////////////////////////////////////////////////////////////////////// + // Rumble stuff :D! // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp index d6f0e34b9f..d1fe09ba00 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,11 +27,11 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + -//////////////////////////////////////////////////////////////////////////////////////// + // Issues /* ¯¯¯¯¯¯¯¯¯ @@ -44,7 +44,7 @@ -//////////////////////////////////////////////////////////////////////////////////////// + // Variables guide /* ¯¯¯¯¯¯¯¯¯ @@ -65,7 +65,7 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Include // ¯¯¯¯¯¯¯¯¯ #include "nJoy.h" @@ -75,10 +75,10 @@ #if defined(HAVE_WX) && HAVE_WX PADConfigDialognJoy* m_ConfigFrame = NULL; #endif -///////////////////////// + -////////////////////////////////////////////////////////////////////////////////////////// + // Variables // ¯¯¯¯¯¯¯¯¯ @@ -165,7 +165,7 @@ wxWindow* GetParentedWxWindow(HWND Parent) #endif -////////////////////////////////////////////////////////////////////////////////////////// + // Input Plugin Functions (from spec's) // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -416,7 +416,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) int TriggerType = PadMapping[_numPAD].triggertype; int TriggerValue = PadState[_numPAD].halfpress ? 100 : 255; - /////////////////////////////////////////////////// + // The analog controls // ----------- @@ -466,7 +466,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) _pPADStatus->substickY = sub_stick_y; } - /////////////////////////////////////////////////// + // The L and R triggers // ----------- @@ -500,7 +500,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) if (TriggerRight > 0xf0) _pPADStatus->button |= PAD_TRIGGER_R; - /////////////////////////////////////////////////// + // The digital buttons // ----------- if (PadState[_numPAD].buttons[InputCommon::CTL_A_BUTTON]) @@ -519,7 +519,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) if (PadState[_numPAD].buttons[InputCommon::CTL_START]) _pPADStatus->button|=PAD_BUTTON_START; - /////////////////////////////////////////////////// + // The D-pad // ----------- if (PadMapping[_numPAD].controllertype == InputCommon::CTL_DPAD_HAT) @@ -593,7 +593,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) //****************************************************************************** -////////////////////////////////////////////////////////////////////////////////////////// + // Search for SDL devices // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ bool Search_Devices(std::vector &_joyinfo, int &_NumPads, int &_NumGoodPads) @@ -622,7 +622,7 @@ bool Search_Devices(std::vector &_joyinfo, int &_N } -////////////////////////////////////////////////////////////////////////////////////////// + /* Check if any of the pads failed to open. In Windows there is a strange "IDirectInputDevice2:: SetDataFormat() DirectX error -2147024809" after exactly four SDL_Init() and SDL_Quit() */ // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -652,7 +652,7 @@ bool ReloadDLL() return false; } -////////////////////////////////////////////////////////////////////////////////////////// + // Check if Dolphin is in focus // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ bool IsFocus() diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h index 61a8c4141e..9fe8ed2740 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.h @@ -1,4 +1,4 @@ -////////////////////////////////////////////////////////////////////////////////////////// + // Project description // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ // Name: nJoy @@ -8,7 +8,7 @@ // Site: www.multigesture.net // Copyright (C) 2003 Dolphin Project. // -////////////////////////////////////////////////////////////////////////////////////////// + // // Licensetype: GNU General Public License (GPL) // @@ -27,13 +27,13 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ // -////////////////////////////////////////////////////////////////////////////////////////// + #ifndef __NJOY_h__ #define __NJOY_h__ -////////////////////////////////////////////////////////////////////////////////////////// + // Includes // ¯¯¯¯¯¯¯¯¯¯ #include // System @@ -75,10 +75,10 @@ #ifdef __linux__ #include #endif -////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Define // ¯¯¯¯¯¯¯¯¯¯ @@ -90,7 +90,7 @@ #define THANKYOU wxT("`plot`, Absolute0, Aprentice, Bositman, Brice, ChaosCode, CKemu, CoDeX, Dave2001, dn, drk||Raziel, Florin, Gent, Gigaherz, Hacktarux, JegHegy, Linker, Linuzappz, Martin64, Muad, Knuckles, Raziel, Refraction, Rudy_x, Shadowprince, Snake785, Saqib, vEX, yaz0r, Zilmar, Zenogais and ZeZu.") #define PLUGIN_VER_STR wxT("nJoy v")wxT(INPUT_VERSION)wxT(" by Falcon4ever\nRelease: ") RELDAY wxT("/") RELMONTH wxT("/") RELYEAR wxT("\nwww.multigesture.net") -////////////////////////////////////////////////////////////////////////////////////////// + // Input vector. Todo: Save the configured keys here instead of in joystick // ¯¯¯¯¯¯¯¯¯ /* @@ -101,7 +101,7 @@ extern std::vector Keys; -////////////////////////////////////////////////////////////////////////////////////////// + // Variables // ¯¯¯¯¯¯¯¯¯ #ifndef _EXCLUDE_MAIN_ @@ -115,10 +115,10 @@ extern std::vector Keys; #endif extern int NumPads, NumGoodPads, LastPad; // Number of goods pads #endif -//////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // Custom Functions // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ bool Search_Devices(std::vector &_joyinfo, int &_NumPads, int &_NumGoodPads); @@ -130,10 +130,10 @@ bool ReloadDLL(); HRESULT InitRumble(HWND hWnd); #endif -//////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////// + + // ReRecording // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #ifdef RERECORDING @@ -148,7 +148,7 @@ namespace Recording void RecordInput(const SPADStatus& _rPADStatus); } #endif -//////////////////////////////// + #endif // __NJOY_h__