mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
add *.user, Win32, and x64 build dir to ignore list for DebuggerUICommon and Unit Tests
add *.aps to ignore list for DolphinWX dir add eol-style native to 120 or so files git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3689 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
// 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
|
||||
// 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/
|
||||
|
||||
// Dummy file for common to compile
|
||||
// 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
|
||||
// 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/
|
||||
|
||||
// Dummy file for common to compile
|
||||
|
@ -1,119 +1,119 @@
|
||||
// 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
|
||||
// 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/
|
||||
|
||||
// Stubs to make DSPCore compile as part of DSPSpy.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Thread.h"
|
||||
|
||||
void *AllocateMemoryPages(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void FreeMemoryPages(void *pages, size_t size)
|
||||
{
|
||||
free(pages);
|
||||
}
|
||||
|
||||
void WriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
bool DSPHost_OnThread()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Well, it's just RAM right? :)
|
||||
u8 DSPHost_ReadHostMemory(u32 address)
|
||||
{
|
||||
u8 *ptr = (u8*)address;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void DSPHost_WriteHostMemory(u8 value, u32 addr) {}
|
||||
|
||||
|
||||
void DSPHost_CodeLoaded(const u8 *code, int size)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
CriticalSection::CriticalSection(int)
|
||||
{
|
||||
}
|
||||
CriticalSection::~CriticalSection()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Enter()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Leave()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace File
|
||||
{
|
||||
|
||||
bool WriteStringToFile(bool text_file, const std::string &str, const char *filename)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "w" : "wb");
|
||||
if (!f)
|
||||
return false;
|
||||
size_t len = str.size();
|
||||
if (len != fwrite(str.data(), 1, str.size(), f))
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReadFileToString(bool text_file, const char *filename, std::string &str)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "r" : "rb");
|
||||
if (!f)
|
||||
return false;
|
||||
fseek(f, 0, SEEK_END);
|
||||
size_t len = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
char *buf = new char[len + 1];
|
||||
buf[fread(buf, 1, len, f)] = 0;
|
||||
str = std::string(buf, len);
|
||||
fclose(f);
|
||||
delete [] buf;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
// 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
|
||||
// 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/
|
||||
|
||||
// Stubs to make DSPCore compile as part of DSPSpy.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Thread.h"
|
||||
|
||||
void *AllocateMemoryPages(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void FreeMemoryPages(void *pages, size_t size)
|
||||
{
|
||||
free(pages);
|
||||
}
|
||||
|
||||
void WriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute)
|
||||
{
|
||||
}
|
||||
|
||||
bool DSPHost_OnThread()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Well, it's just RAM right? :)
|
||||
u8 DSPHost_ReadHostMemory(u32 address)
|
||||
{
|
||||
u8 *ptr = (u8*)address;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void DSPHost_WriteHostMemory(u8 value, u32 addr) {}
|
||||
|
||||
|
||||
void DSPHost_CodeLoaded(const u8 *code, int size)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
namespace Common
|
||||
{
|
||||
|
||||
CriticalSection::CriticalSection(int)
|
||||
{
|
||||
}
|
||||
CriticalSection::~CriticalSection()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Enter()
|
||||
{
|
||||
}
|
||||
|
||||
void CriticalSection::Leave()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace File
|
||||
{
|
||||
|
||||
bool WriteStringToFile(bool text_file, const std::string &str, const char *filename)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "w" : "wb");
|
||||
if (!f)
|
||||
return false;
|
||||
size_t len = str.size();
|
||||
if (len != fwrite(str.data(), 1, str.size(), f))
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReadFileToString(bool text_file, const char *filename, std::string &str)
|
||||
{
|
||||
FILE *f = fopen(filename, text_file ? "r" : "rb");
|
||||
if (!f)
|
||||
return false;
|
||||
fseek(f, 0, SEEK_END);
|
||||
size_t len = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
char *buf = new char[len + 1];
|
||||
buf[fread(buf, 1, len, f)] = 0;
|
||||
str = std::string(buf, len);
|
||||
fclose(f);
|
||||
delete [] buf;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,43 +1,43 @@
|
||||
// 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
|
||||
// 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 "dsp_interface.h"
|
||||
|
||||
void IDSP::SendTask(void *addr, u16 iram_addr, u16 len, u16 start)
|
||||
{
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3A001);
|
||||
while (CheckMailTo());
|
||||
SendMailTo((u32)addr);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3C002);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(iram_addr);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3A002);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(len);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3B002);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3D001);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(start);
|
||||
while (CheckMailTo());
|
||||
// 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
|
||||
// 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 "dsp_interface.h"
|
||||
|
||||
void IDSP::SendTask(void *addr, u16 iram_addr, u16 len, u16 start)
|
||||
{
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3A001);
|
||||
while (CheckMailTo());
|
||||
SendMailTo((u32)addr);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3C002);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(iram_addr);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3A002);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(len);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3B002);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(0x80F3D001);
|
||||
while (CheckMailTo());
|
||||
SendMailTo(start);
|
||||
while (CheckMailTo());
|
||||
}
|
@ -1,50 +1,50 @@
|
||||
// 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
|
||||
// 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 _DSP_INTERFACE_H
|
||||
#define _DSP_INTERFACE_H
|
||||
|
||||
#include <gccore.h>
|
||||
|
||||
// DSPCR bits
|
||||
#define DSPCR_DSPRESET 0x0800 // Reset DSP
|
||||
#define DSPCR_ARDMA 0x0200 // ARAM dma in progress, if set
|
||||
#define DSPCR_DSPINTMSK 0x0100 // * interrupt mask (RW)
|
||||
#define DSPCR_DSPINT 0x0080 // * interrupt active (RWC)
|
||||
#define DSPCR_ARINTMSK 0x0040
|
||||
#define DSPCR_ARINT 0x0020
|
||||
#define DSPCR_AIINTMSK 0x0010
|
||||
#define DSPCR_AIINT 0x0008
|
||||
#define DSPCR_HALT 0x0004 // halt DSP
|
||||
#define DSPCR_PIINT 0x0002 // assert DSP PI interrupt
|
||||
#define DSPCR_RES 0x0001 // reset DSP
|
||||
|
||||
class IDSP {
|
||||
public:
|
||||
virtual ~IDSP() {}
|
||||
|
||||
virtual void Init() = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual u32 CheckMailTo() = 0;
|
||||
virtual void SendMailTo(u32 mail) = 0;
|
||||
|
||||
// Yeah, yeah, having a method here makes this not a pure interface - but
|
||||
// the implementation does nothing but calling the virtual methods above.
|
||||
void SendTask(void *addr, u16 iram_addr, u16 len, u16 start);
|
||||
};
|
||||
|
||||
#endif // _DSP_INTERFACE_H
|
||||
// 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
|
||||
// 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 _DSP_INTERFACE_H
|
||||
#define _DSP_INTERFACE_H
|
||||
|
||||
#include <gccore.h>
|
||||
|
||||
// DSPCR bits
|
||||
#define DSPCR_DSPRESET 0x0800 // Reset DSP
|
||||
#define DSPCR_ARDMA 0x0200 // ARAM dma in progress, if set
|
||||
#define DSPCR_DSPINTMSK 0x0100 // * interrupt mask (RW)
|
||||
#define DSPCR_DSPINT 0x0080 // * interrupt active (RWC)
|
||||
#define DSPCR_ARINTMSK 0x0040
|
||||
#define DSPCR_ARINT 0x0020
|
||||
#define DSPCR_AIINTMSK 0x0010
|
||||
#define DSPCR_AIINT 0x0008
|
||||
#define DSPCR_HALT 0x0004 // halt DSP
|
||||
#define DSPCR_PIINT 0x0002 // assert DSP PI interrupt
|
||||
#define DSPCR_RES 0x0001 // reset DSP
|
||||
|
||||
class IDSP {
|
||||
public:
|
||||
virtual ~IDSP() {}
|
||||
|
||||
virtual void Init() = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual u32 CheckMailTo() = 0;
|
||||
virtual void SendMailTo(u32 mail) = 0;
|
||||
|
||||
// Yeah, yeah, having a method here makes this not a pure interface - but
|
||||
// the implementation does nothing but calling the virtual methods above.
|
||||
void SendTask(void *addr, u16 iram_addr, u16 len, u16 start);
|
||||
};
|
||||
|
||||
#endif // _DSP_INTERFACE_H
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,68 +1,68 @@
|
||||
// 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
|
||||
// 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 <gccore.h>
|
||||
#include <ogcsys.h>
|
||||
#include <ogc/dsp.h>
|
||||
#include <ogc/irq.h>
|
||||
#include <ogc/machine/asm.h>
|
||||
#include <ogc/machine/processor.h>
|
||||
|
||||
#include "dsp_interface.h"
|
||||
#include "real_dsp.h"
|
||||
|
||||
static vu16* const _dspReg = (u16*)0xCC005000;
|
||||
|
||||
// Handler for DSP interrupt.
|
||||
static void dsp_irq_handler(u32 nIrq, void *pCtx)
|
||||
{
|
||||
// Acknowledge interrupt?
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_AIINT|DSPCR_ARINT)) | DSPCR_DSPINT;
|
||||
}
|
||||
|
||||
void RealDSP::Init()
|
||||
{
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT)) | DSPCR_DSPRESET;
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_HALT|DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT));
|
||||
|
||||
// This code looks odd - shouldn't we initialize level?
|
||||
u32 level;
|
||||
_CPU_ISR_Disable(level);
|
||||
IRQ_Request(IRQ_DSP_DSP, dsp_irq_handler, NULL);
|
||||
_CPU_ISR_Restore(level);
|
||||
}
|
||||
|
||||
void RealDSP::Reset()
|
||||
{
|
||||
// Reset the DSP.
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT)) | DSPCR_DSPRESET;
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_HALT|DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT));
|
||||
_dspReg[5] |= DSPCR_RES;
|
||||
while (_dspReg[5] & DSPCR_RES)
|
||||
;
|
||||
_dspReg[9] = 0x63;
|
||||
}
|
||||
|
||||
u32 RealDSP::CheckMailTo()
|
||||
{
|
||||
return DSP_CheckMailTo();
|
||||
}
|
||||
|
||||
void RealDSP::SendMailTo(u32 mail)
|
||||
{
|
||||
DSP_SendMailTo(mail);
|
||||
}
|
||||
// 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
|
||||
// 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 <gccore.h>
|
||||
#include <ogcsys.h>
|
||||
#include <ogc/dsp.h>
|
||||
#include <ogc/irq.h>
|
||||
#include <ogc/machine/asm.h>
|
||||
#include <ogc/machine/processor.h>
|
||||
|
||||
#include "dsp_interface.h"
|
||||
#include "real_dsp.h"
|
||||
|
||||
static vu16* const _dspReg = (u16*)0xCC005000;
|
||||
|
||||
// Handler for DSP interrupt.
|
||||
static void dsp_irq_handler(u32 nIrq, void *pCtx)
|
||||
{
|
||||
// Acknowledge interrupt?
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_AIINT|DSPCR_ARINT)) | DSPCR_DSPINT;
|
||||
}
|
||||
|
||||
void RealDSP::Init()
|
||||
{
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT)) | DSPCR_DSPRESET;
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_HALT|DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT));
|
||||
|
||||
// This code looks odd - shouldn't we initialize level?
|
||||
u32 level;
|
||||
_CPU_ISR_Disable(level);
|
||||
IRQ_Request(IRQ_DSP_DSP, dsp_irq_handler, NULL);
|
||||
_CPU_ISR_Restore(level);
|
||||
}
|
||||
|
||||
void RealDSP::Reset()
|
||||
{
|
||||
// Reset the DSP.
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT)) | DSPCR_DSPRESET;
|
||||
_dspReg[5] = (_dspReg[5] & ~(DSPCR_HALT|DSPCR_AIINT|DSPCR_ARINT|DSPCR_DSPINT));
|
||||
_dspReg[5] |= DSPCR_RES;
|
||||
while (_dspReg[5] & DSPCR_RES)
|
||||
;
|
||||
_dspReg[9] = 0x63;
|
||||
}
|
||||
|
||||
u32 RealDSP::CheckMailTo()
|
||||
{
|
||||
return DSP_CheckMailTo();
|
||||
}
|
||||
|
||||
void RealDSP::SendMailTo(u32 mail)
|
||||
{
|
||||
DSP_SendMailTo(mail);
|
||||
}
|
||||
|
@ -1,31 +1,31 @@
|
||||
// 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
|
||||
// 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 _REAL_DSP_H
|
||||
#define _REAL_DSP_H
|
||||
|
||||
#include "dsp_interface.h"
|
||||
|
||||
class RealDSP : public IDSP {
|
||||
public:
|
||||
virtual void Init();
|
||||
virtual void Reset();
|
||||
virtual u32 CheckMailTo();
|
||||
virtual void SendMailTo(u32 mail);
|
||||
};
|
||||
|
||||
#endif // _REAL_DSP_H
|
||||
// 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
|
||||
// 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 _REAL_DSP_H
|
||||
#define _REAL_DSP_H
|
||||
|
||||
#include "dsp_interface.h"
|
||||
|
||||
class RealDSP : public IDSP {
|
||||
public:
|
||||
virtual void Init();
|
||||
virtual void Reset();
|
||||
virtual u32 CheckMailTo();
|
||||
virtual void SendMailTo(u32 mail);
|
||||
};
|
||||
|
||||
#endif // _REAL_DSP_H
|
||||
|
Reference in New Issue
Block a user