diff --git a/Source/Core/Core/Core.vcproj b/Source/Core/Core/Core.vcproj index cfbb9b9ef0..0cf020fbc9 100644 --- a/Source/Core/Core/Core.vcproj +++ b/Source/Core/Core/Core.vcproj @@ -45,7 +45,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -942,10 +774,6 @@ RelativePath=".\Src\HW\DSPHLE\DSPHLE.h" > - - @@ -1901,6 +1729,174 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1997,6 +1993,10 @@ RelativePath=".\Src\SConscript" > + + diff --git a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp index 1920558c0a..7603d36a2e 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.cpp @@ -17,8 +17,6 @@ #include -#include "DSPHLEGlobals.h" // Local - #include "ChunkFile.h" #include "IniFile.h" #include "HLEMixer.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.h b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.h index 3b3d7a294b..eae192e180 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.h +++ b/Source/Core/Core/Src/HW/DSPHLE/DSPHLE.h @@ -20,7 +20,6 @@ #include "AudioCommon.h" #include "SoundStream.h" -#include "DSPHLEGlobals.h" // Local #include "MailHandler.h" #include "../../PluginDSP.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/DSPHLEGlobals.h b/Source/Core/Core/Src/HW/DSPHLE/DSPHLEGlobals.h deleted file mode 100644 index b92001856d..0000000000 --- a/Source/Core/Core/Src/HW/DSPHLE/DSPHLEGlobals.h +++ /dev/null @@ -1,51 +0,0 @@ -// 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/ - -// TODO: Get rid of this file. - -#ifndef _GLOBALS_H -#define _GLOBALS_H - -#include "Common.h" -#include "StringUtil.h" -#include "../Memmap.h" - -inline u8 HLEMemory_Read_U8(u32 _uAddress) -{ - _uAddress &= Memory::RAM_MASK; - return Memory::m_pRAM[_uAddress]; -} - -inline u16 HLEMemory_Read_U16(u32 _uAddress) -{ - _uAddress &= Memory::RAM_MASK; - return Common::swap16(*(u16*)&Memory::m_pRAM[_uAddress]); -} - -inline u32 HLEMemory_Read_U32(u32 _uAddress) -{ - _uAddress &= Memory::RAM_MASK; - return Common::swap32(*(u32*)&Memory::m_pRAM[_uAddress]); -} - -inline void* HLEMemory_Get_Pointer(u32 _uAddress) -{ - _uAddress &= Memory::RAM_MASK; - return &Memory::m_pRAM[_uAddress]; -} - -#endif diff --git a/Source/Core/Core/Src/HW/DSPHLE/HLEMixer.cpp b/Source/Core/Core/Src/HW/DSPHLE/HLEMixer.cpp index 3ea0c2ed5b..69c4b6aee6 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/HLEMixer.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/HLEMixer.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "DSPHLEGlobals.h" #include "DSPHLE.h" #include "HLEMixer.h" #include "UCodes/UCodes.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp index c696a1973c..4ba77f3add 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp @@ -19,7 +19,6 @@ #include "StringUtil.h" // For StringFromFormat() #include -#include "../DSPHLEGlobals.h" #include "Mixer.h" #include "../MailHandler.h" #include "../../DSP.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_ADPCM.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_ADPCM.h index 1bb05c7c23..3e60477fc1 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_ADPCM.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_ADPCM.h @@ -18,7 +18,6 @@ #ifndef _UCODE_AX_ADPCM_H #define _UCODE_AX_ADPCM_H -#include "../DSPHLEGlobals.h" #include "../../DSP.h" inline s16 ADPCM_Step(PBADPCMInfo &adpcm, u32& samplePos, u32 newSamplePos, u16 frac) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp index 0292e44fba..31afa26c9f 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "../DSPHLEGlobals.h" #include "../DSPHLE.h" #include "UCodes.h" #include "UCode_CARD.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp index 633dafaca7..140c13c999 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "../DSPHLEGlobals.h" #include "UCodes.h" #include "UCode_GBA.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp index 578536003d..663d4beadd 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_InitAudioSystem.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "../DSPHLEGlobals.h" #include "UCodes.h" #include "UCode_InitAudioSystem.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.cpp index 51d9843bc7..09ca95552b 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_ROM.cpp @@ -15,7 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "../DSPHLEGlobals.h" #include "UCodes.h" #include "UCode_ROM.h" #include "Hash.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp index 72f4dab1ac..fae869b8f4 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp @@ -19,7 +19,6 @@ // Zelda: The Windwaker, Mario Sunshine, Mario Kart, Twilight Princess, // Super Mario Galaxy -#include "../DSPHLEGlobals.h" #include "UCodes.h" #include "UCode_Zelda.h" #include "../MailHandler.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp index 4fe86fdc4d..9b9da85492 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp @@ -17,7 +17,6 @@ #include -#include "../DSPHLEGlobals.h" #include "UCodes.h" #include "UCode_Zelda.h" #include "AudioCommon.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp index 61d87ce5fb..81c932733c 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp @@ -17,11 +17,9 @@ #include -#include "../DSPHLEGlobals.h" #include "UCodes.h" #include "UCode_Zelda.h" -// #include "../main.h" #include "AudioCommon.h" #include "Mixer.h" #include "../../Memmap.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp index 32f84fd2f2..c93b7754dd 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.cpp @@ -15,8 +15,6 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "../DSPHLEGlobals.h" - #include "UCodes.h" #include "UCode_AX.h" diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h index 360ca9f8f9..8b0772a26a 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCodes.h @@ -23,12 +23,37 @@ #include "Thread.h" #include "../DSPHLE.h" +#include "../../Memmap.h" #define UCODE_ROM 0x0000000 #define UCODE_INIT_AUDIO_SYSTEM 0x0000001 class CMailHandler; +inline u8 HLEMemory_Read_U8(u32 _uAddress) +{ + _uAddress &= Memory::RAM_MASK; + return Memory::m_pRAM[_uAddress]; +} + +inline u16 HLEMemory_Read_U16(u32 _uAddress) +{ + _uAddress &= Memory::RAM_MASK; + return Common::swap16(*(u16*)&Memory::m_pRAM[_uAddress]); +} + +inline u32 HLEMemory_Read_U32(u32 _uAddress) +{ + _uAddress &= Memory::RAM_MASK; + return Common::swap32(*(u32*)&Memory::m_pRAM[_uAddress]); +} + +inline void* HLEMemory_Get_Pointer(u32 _uAddress) +{ + _uAddress &= Memory::RAM_MASK; + return &Memory::m_pRAM[_uAddress]; +} + class IUCode { public: