mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
Merge pull request #1436 from phire/DumbGetPointers
Remove some dumb GetPointers.
This commit is contained in:
commit
1ac9008243
@ -241,7 +241,7 @@ void Init(bool hle)
|
|||||||
g_ARAM.wii_mode = true;
|
g_ARAM.wii_mode = true;
|
||||||
g_ARAM.size = Memory::EXRAM_SIZE;
|
g_ARAM.size = Memory::EXRAM_SIZE;
|
||||||
g_ARAM.mask = Memory::EXRAM_MASK;
|
g_ARAM.mask = Memory::EXRAM_MASK;
|
||||||
g_ARAM.ptr = Memory::GetPointer(0x10000000);
|
g_ARAM.ptr = Memory::m_pEXRAM;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -438,7 +438,7 @@ void ZeldaUCode::RenderVoice_Raw(ZeldaVoicePB &PB, s16 *_Buffer, int _Size)
|
|||||||
Decoder21_ReadAudio(PB, _RealSize, _Buffer);
|
Decoder21_ReadAudio(PB, _RealSize, _Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Decoder21_ReadAudio(ZeldaVoicePB &PB, int size, s16 *_Buffer)
|
void Decoder21_ReadAudio(ZeldaVoicePB &PB, int size, s16* _Buffer)
|
||||||
{
|
{
|
||||||
// 0af6
|
// 0af6
|
||||||
if (!size)
|
if (!size)
|
||||||
@ -461,9 +461,7 @@ void Decoder21_ReadAudio(ZeldaVoicePB &PB, int size, s16 *_Buffer)
|
|||||||
// ACC0 is the address
|
// ACC0 is the address
|
||||||
// ACC1 is the read size
|
// ACC1 is the read size
|
||||||
|
|
||||||
const u32 ram_mask = 0x1FFFFFF;
|
const u16* src = (u16*) Memory::GetPointer(ACC0 & Memory::RAM_MASK);
|
||||||
const u8 *source = Memory::GetPointer(0x80000000);
|
|
||||||
const u16 *src = (u16 *)(source + (ACC0 & ram_mask));
|
|
||||||
|
|
||||||
for (u32 i = 0; i < (ACC1 >> 16); i++)
|
for (u32 i = 0; i < (ACC1 >> 16); i++)
|
||||||
{
|
{
|
||||||
|
@ -168,7 +168,7 @@ bool DSPLLE::Initialize(bool bWii, bool bDSPThread)
|
|||||||
if (!DSPCore_Init(opts))
|
if (!DSPCore_Init(opts))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
g_dsp.cpu_ram = Memory::GetPointer(0);
|
g_dsp.cpu_ram = Memory::m_pRAM;
|
||||||
DSPCore_Reset();
|
DSPCore_Reset();
|
||||||
|
|
||||||
m_bIsRunning = true;
|
m_bIsRunning = true;
|
||||||
|
@ -811,7 +811,9 @@ static u32 TranslatePageAddress(const u32 _Address, const XCheckTLBFlag _Flag)
|
|||||||
u32 VSID = SR_VSID(sr); // 24 bit
|
u32 VSID = SR_VSID(sr); // 24 bit
|
||||||
u32 api = EA_API(_Address); // 6 bit (part of page_index)
|
u32 api = EA_API(_Address); // 6 bit (part of page_index)
|
||||||
|
|
||||||
u8* pRAM = GetPointer(0);
|
// Direct access to the fastmem Arena
|
||||||
|
// FIXME: is this the best idea for clean code?
|
||||||
|
u8* pRAM = Memory::base;
|
||||||
|
|
||||||
// hash function no 1 "xor" .360
|
// hash function no 1 "xor" .360
|
||||||
u32 hash1 = (VSID ^ page_index);
|
u32 hash1 = (VSID ^ page_index);
|
||||||
|
@ -126,7 +126,7 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent)
|
|||||||
|
|
||||||
void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED (event))
|
void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
const u8* const memptr = Memory::GetPointer(0);
|
const u8* const memptr = Memory::m_pRAM;
|
||||||
if (memptr == nullptr)
|
if (memptr == nullptr)
|
||||||
{
|
{
|
||||||
WxUtils::ShowErrorDialog(_("A game is not currently running."));
|
WxUtils::ShowErrorDialog(_("A game is not currently running."));
|
||||||
@ -158,7 +158,7 @@ void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED (event))
|
|||||||
|
|
||||||
void CheatSearchTab::FilterCheatSearchResults(wxCommandEvent&)
|
void CheatSearchTab::FilterCheatSearchResults(wxCommandEvent&)
|
||||||
{
|
{
|
||||||
const u8* const memptr = Memory::GetPointer(0);
|
const u8* const memptr = Memory::m_pRAM;
|
||||||
if (memptr == nullptr)
|
if (memptr == nullptr)
|
||||||
{
|
{
|
||||||
WxUtils::ShowErrorDialog(_("A game is not currently running."));
|
WxUtils::ShowErrorDialog(_("A game is not currently running."));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user