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
This commit is contained in:
XTra.KrazzY
2009-07-07 15:12:52 +00:00
parent 13290204b4
commit 92e63e3ac4
13 changed files with 68 additions and 46 deletions

View File

@ -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()

View File

@ -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();

View File

@ -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

View File

@ -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;

View File

@ -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()