summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorXTra.KrazzY <XTra.KrazzY@gmail.com>2009-07-07 15:12:52 +0000
committerXTra.KrazzY <XTra.KrazzY@gmail.com>2009-07-07 15:12:52 +0000
commit92e63e3ac4ef11e01b83202069842b9da88c08e9 (patch)
tree0879447b5939ec1e8a7226b938b0c9d0b3dbf6f5 /Source
parent13290204b402f8939cb38fe317d03155aa11c66d (diff)
Various changes: Fixed linux build, added some zelda ucode RE, added HLE mail logging features
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3704 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/AudioCommon/Src/AOSoundStream.cpp4
-rw-r--r--Source/Core/Common/Src/Log.h1
-rw-r--r--Source/Core/Common/Src/LogManager.cpp1
-rw-r--r--Source/Core/Core/Src/Debugger/Debugger_SymbolMap.cpp2
-rw-r--r--Source/Core/DSPCore/Src/DSPHWInterface.cpp8
-rw-r--r--Source/Core/DebuggerWX/Src/BreakPointDlg.cpp2
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp8
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp4
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp7
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp3
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/main.cpp3
11 files changed, 24 insertions, 19 deletions
diff --git a/Source/Core/AudioCommon/Src/AOSoundStream.cpp b/Source/Core/AudioCommon/Src/AOSoundStream.cpp
index c3cae83f74..ba2623d156 100644
--- a/Source/Core/AudioCommon/Src/AOSoundStream.cpp
+++ b/Source/Core/AudioCommon/Src/AOSoundStream.cpp
@@ -46,7 +46,7 @@ void AOSound::SoundLoop()
while (!threadData)
{
soundCriticalSection.Enter();
- m_mixer->Mix(realtimeBuffer, numBytesToRender >> 2);
+ m_mixer->Mix(realtimeBuffer, numBytesToRender >> 2);
ao_play(device, (char*)realtimeBuffer, numBytesToRender);
soundCriticalSection.Leave();
@@ -65,7 +65,7 @@ void *soundThread(void *args)
bool AOSound::Start()
{
- memset(realtimeBuffer, 0, sizeof(realtimeBuffer));
+ memset(realtimeBuffer, 0, sizeof(realtimeBuffer));
soundSyncEvent.Init();
diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h
index dd7ce841c3..d5f7f3d725 100644
--- a/Source/Core/Common/Src/Log.h
+++ b/Source/Core/Common/Src/Log.h
@@ -38,6 +38,7 @@ enum LOG_TYPE {
DISCIO,
DSPHLE,
DSPLLE,
+ DSP_MAIL,
DSPINTERFACE,
DVDINTERFACE,
DYNA_REC,
diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp
index da2898c9b2..0159ddc174 100644
--- a/Source/Core/Common/Src/LogManager.cpp
+++ b/Source/Core/Common/Src/LogManager.cpp
@@ -45,6 +45,7 @@ LogManager::LogManager()\
m_Log[LogTypes::HLE] = new LogContainer("HLE", "HLE");
m_Log[LogTypes::DSPHLE] = new LogContainer("DSPHLE", "DSP HLE");
m_Log[LogTypes::DSPLLE] = new LogContainer("DSPLLE", "DSP LLE");
+ m_Log[LogTypes::DSP_MAIL] = new LogContainer("DSPMails", "DSP Mails");
m_Log[LogTypes::VIDEO] = new LogContainer("Video", "Video Plugin");
m_Log[LogTypes::AUDIO] = new LogContainer("Audio", "Audio Plugin");
m_Log[LogTypes::DYNA_REC] = new LogContainer("JIT", "Dynamic Recompiler");
diff --git a/Source/Core/Core/Src/Debugger/Debugger_SymbolMap.cpp b/Source/Core/Core/Src/Debugger/Debugger_SymbolMap.cpp
index e25dcf1247..ed83e27a20 100644
--- a/Source/Core/Core/Src/Debugger/Debugger_SymbolMap.cpp
+++ b/Source/Core/Core/Src/Debugger/Debugger_SymbolMap.cpp
@@ -23,7 +23,7 @@
#include "../PowerPC/PowerPC.h"
#include "../PowerPC/PPCAnalyst.h"
#include "../PowerPC/PPCSymbolDB.h"
-#include "Bochs_disasm/PowerPCDisasm.h"
+#include "PowerPCDisasm.h"
namespace Dolphin_Debugger
{
diff --git a/Source/Core/DSPCore/Src/DSPHWInterface.cpp b/Source/Core/DSPCore/Src/DSPHWInterface.cpp
index e87314bdb0..727fb8d54a 100644
--- a/Source/Core/DSPCore/Src/DSPHWInterface.cpp
+++ b/Source/Core/DSPCore/Src/DSPHWInterface.cpp
@@ -90,9 +90,9 @@ void gdsp_mbox_write_l(u8 mbx, u16 val)
#ifdef DEBUG_EXP
if (mbx == GDSP_MBOX_DSP)
{
- NOTICE_LOG(DSPLLE, "DSP(WM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.pc);
+ NOTICE_LOG(DSP_MAIL, "DSP(WM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.pc);
} else {
- NOTICE_LOG(DSPLLE, "CPU(WM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_CPU), g_dsp.pc);
+ NOTICE_LOG(DSP_MAIL, "CPU(WM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_CPU), g_dsp.pc);
}
#endif
}
@@ -119,9 +119,9 @@ u16 gdsp_mbox_read_l(u8 mbx)
#ifdef DEBUG_EXP
if (mbx == GDSP_MBOX_DSP)
{
- NOTICE_LOG(DSPLLE, "DSP(RM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.pc);
+ NOTICE_LOG(DSP_MAIL, "DSP(RM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.pc);
} else {
- NOTICE_LOG(DSPLLE, "CPU(RM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_CPU), g_dsp.pc);
+ NOTICE_LOG(DSP_MAIL, "CPU(RM) B:%i M:0x%08x (pc=0x%04x)", mbx, gdsp_mbox_peek(GDSP_MBOX_CPU), g_dsp.pc);
}
#endif
diff --git a/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp b/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp
index bd01a3526d..f51eb1a9fb 100644
--- a/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp
+++ b/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp
@@ -20,7 +20,7 @@
#include "Host.h"
#include "Debugger.h"
#include "StringUtil.h"
-#include "PowerPC.h"
+#include "PowerPC/PowerPC.h"
BEGIN_EVENT_TABLE(BreakPointDlg,wxDialog)
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp
index 987ef6db41..dbe74da60b 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/DSPHandler.cpp
@@ -15,10 +15,6 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifdef _WIN32
-#include "DSoundStream.h"
-#endif
-
#include "DSPHandler.h"
CDSPHandler* CDSPHandler::m_pInstance = NULL;
@@ -72,8 +68,10 @@ unsigned short CDSPHandler::ReadControlRegister()
void CDSPHandler::SendMailToDSP(u32 _uMail)
{
- if (m_pUCode != NULL)
+ if (m_pUCode != NULL) {
+ DEBUG_LOG(DSP_MAIL, "CPU writes 0x%08x", _uMail);
m_pUCode->HandleMail(_uMail);
+ }
}
IUCode* CDSPHandler::GetUCode()
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp
index dd7b806599..047e61c85c 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp
@@ -30,7 +30,7 @@ CMailHandler::~CMailHandler()
void CMailHandler::PushMail(u32 _Mail)
{
m_Mails.push(_Mail);
-
+ DEBUG_LOG(DSP_MAIL, "DSP writes 0x%08x", _Mail);
Update();
}
@@ -53,7 +53,7 @@ u16 CMailHandler::ReadDSPMailboxLow()
if (!m_Mails.empty())
{
u16 result = m_Mails.front() & 0xFFFF;
- m_Mails.pop();
+ m_Mails.pop();
Update();
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
index 451c169601..6ad0b50ac1 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 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
@@ -16,7 +16,8 @@
// http://code.google.com/p/dolphin-emu/
// Games that uses this UCode:
-// Zelda: The Windwaker, Mario Sunshine, Mario Kart, Twilight Princess
+// Zelda: The Windwaker, Mario Sunshine, Mario Kart, Twilight Princess,
+// Super Mario Galaxy
#include "../Globals.h"
#include "UCodes.h"
@@ -273,7 +274,7 @@ void CUCode_Zelda::ExecuteList()
// SyncFrame ... zelda ww jumps to 0x0243
case 0x02:
{
- // soundStream->GetMixer()->SetHLEReady(true);
+ //soundStream->GetMixer()->SetHLEReady(true);
// DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
//soundStream->Update(); //do it in this thread to avoid sync problems
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp
index be5c7c5cf0..64d34a2023 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp
@@ -50,6 +50,9 @@ void CUCode_Zelda::AFCdecodebuffer(const s16 *coef, const char *input, signed sh
else
{
// untested !!! i havnt seen such a sample yet :)
+
+ ERROR_LOG(DSPHLE, "Untested AFC sample");
+
for (int i = 0; i < 16; i += 4)
{
int j = (*src >> 0) & 0x02;
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
index a3a084b21e..2a5bb7c74d 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp
@@ -203,7 +203,8 @@ void Initialize(void *init)
CDSPHandler::CreateInstance();
soundStream = AudioCommon::InitSoundStream(new HLEMixer());
-
+ if(!soundStream)
+ PanicAlert("Error starting up sound stream");
}
void DSP_StopSoundStream()