diff options
| author | hrydgard <hrydgard@gmail.com> | 2009-05-03 11:15:17 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2009-05-03 11:15:17 +0000 |
| commit | 0772db6af6f35c700c6ff169bc94bef13d9b8cb7 (patch) | |
| tree | d04f72f205695cd4f0b068894b3a3959452c82f9 /Source/Core/DSPCore | |
| parent | 90ae2a8e55362bc06867ba8d44a39818b7aa31b9 (diff) | |
DSP: add a crazy little shell script that will build DSPCore into DSPSpy. make DSPCore build in gekko mode. re-add GC-pad controls to DSPSpy (now it can run inside Dolphin, kind of neat but not super useful for the obvious reasons).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3141 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DSPCore')
| -rw-r--r-- | Source/Core/DSPCore/Src/DSPAnalyzer.h | 2 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/DSPCodeUtil.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/DSPCodeUtil.h | 2 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/DSPCore.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/DSPHost.h | 2 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/DSPTables.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/DspIntMultiplier.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/assemble.cpp | 1 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/disassemble.cpp | 1 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/gdsp_interface.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/gdsp_interpreter.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DSPCore/Src/gdsp_registers.cpp | 2 |
12 files changed, 15 insertions, 14 deletions
diff --git a/Source/Core/DSPCore/Src/DSPAnalyzer.h b/Source/Core/DSPCore/Src/DSPAnalyzer.h index b187eef2a7..89e1e6c980 100644 --- a/Source/Core/DSPCore/Src/DSPAnalyzer.h +++ b/Source/Core/DSPCore/Src/DSPAnalyzer.h @@ -48,4 +48,4 @@ extern u8 code_flags[ISPACE]; // some pretty expensive analysis if necessary.
void Analyze();
-} // namespace
\ No newline at end of file +} // namespace
diff --git a/Source/Core/DSPCore/Src/DSPCodeUtil.cpp b/Source/Core/DSPCore/Src/DSPCodeUtil.cpp index a75582a5c8..2d247231e4 100644 --- a/Source/Core/DSPCore/Src/DSPCodeUtil.cpp +++ b/Source/Core/DSPCore/Src/DSPCodeUtil.cpp @@ -90,7 +90,7 @@ bool Compare(const std::vector<u16> &code1, const std::vector<u16> &code2) {
printf("Extra code words:\n");
const std::vector<u16> &longest = code1.size() > code2.size() ? code1 : code2;
- for (int i = min_size; i < longest.size(); i++)
+ for (int i = min_size; i < (int)longest.size(); i++)
{
u16 pc = i;
std::string line;
@@ -140,7 +140,7 @@ void CodeToHeader(const std::vector<u16> &code, const char *name, std::string &h void CodeToBinaryStringBE(const std::vector<u16> &code, std::string &str)
{
str.resize(code.size() * 2);
- for (int i = 0; i < code.size(); i++)
+ for (int i = 0; i < (int)code.size(); i++)
{
str[i * 2 + 0] = code[i] >> 8;
str[i * 2 + 1] = code[i] & 0xff;
@@ -150,7 +150,7 @@ void CodeToBinaryStringBE(const std::vector<u16> &code, std::string &str) void BinaryStringBEToCode(const std::string &str, std::vector<u16> &code)
{
code.resize(str.size() / 2);
- for (int i = 0; i < code.size(); i++)
+ for (int i = 0; i < (int)code.size(); i++)
{
code[i] = ((u16)(u8)str[i * 2 + 0] << 8) | ((u16)(u8)str[i * 2 + 1]);
}
diff --git a/Source/Core/DSPCore/Src/DSPCodeUtil.h b/Source/Core/DSPCore/Src/DSPCodeUtil.h index 5e4d32568c..86477051bc 100644 --- a/Source/Core/DSPCore/Src/DSPCodeUtil.h +++ b/Source/Core/DSPCore/Src/DSPCodeUtil.h @@ -37,4 +37,4 @@ void BinaryStringBEToCode(const std::string &str, std::vector<u16> &code); bool LoadBinary(const char *filename, std::vector<u16> &code);
bool SaveBinary(const std::vector<u16> &code, const char *filename);
-#endif // _DSPCODEUTIL_H
\ No newline at end of file +#endif // _DSPCODEUTIL_H
diff --git a/Source/Core/DSPCore/Src/DSPCore.cpp b/Source/Core/DSPCore/Src/DSPCore.cpp index 270952f8ed..ac684f5e9a 100644 --- a/Source/Core/DSPCore/Src/DSPCore.cpp +++ b/Source/Core/DSPCore/Src/DSPCore.cpp @@ -202,4 +202,4 @@ void gdsp_check_exceptions() }
}
-//} // namespace
\ No newline at end of file +//} // namespace
diff --git a/Source/Core/DSPCore/Src/DSPHost.h b/Source/Core/DSPCore/Src/DSPHost.h index 294af23c1e..7a96fd1ff3 100644 --- a/Source/Core/DSPCore/Src/DSPHost.h +++ b/Source/Core/DSPCore/Src/DSPHost.h @@ -28,4 +28,4 @@ bool DSPHost_OnThread(); bool DSPHost_Running();
u32 DSPHost_CodeLoaded(const u8 *ptr, int size);
-#endif
\ No newline at end of file +#endif
diff --git a/Source/Core/DSPCore/Src/DSPTables.cpp b/Source/Core/DSPCore/Src/DSPTables.cpp index 0eab6484ed..f1afb2074c 100644 --- a/Source/Core/DSPCore/Src/DSPTables.cpp +++ b/Source/Core/DSPCore/Src/DSPTables.cpp @@ -473,7 +473,7 @@ const char *pdregnamelong(int val) const DSPOPCTemplate *GetOpTemplate(const UDSPInstruction &inst)
{
- for (u32 i = 0; i < opcodes_size; i++)
+ for (int i = 0; i < opcodes_size; i++)
{
u16 mask = opcodes[i].opcode_mask;
if (opcodes[i].size & P_EXT) {
@@ -501,7 +501,7 @@ void InitInstructionTable() for (int i = 0; i < OPTABLE_SIZE; i++)
{
- for (u32 j = 0; j < opcodes_size; j++)
+ for (int j = 0; j < opcodes_size; j++)
{
u16 mask = opcodes[j].opcode_mask;
if (opcodes[j].size & P_EXT) {
diff --git a/Source/Core/DSPCore/Src/DspIntMultiplier.cpp b/Source/Core/DSPCore/Src/DspIntMultiplier.cpp index 54d9c69088..6a9cb47f30 100644 --- a/Source/Core/DSPCore/Src/DspIntMultiplier.cpp +++ b/Source/Core/DSPCore/Src/DspIntMultiplier.cpp @@ -148,7 +148,7 @@ void addpaxz(const UDSPInstruction& opc) u8 dreg = (opc.hex >> 8) & 0x1;
u8 sreg = (opc.hex >> 9) & 0x1;
- s64 prod = dsp_get_long_prod() & ~0x0ffff;
+ s64 prod = dsp_get_long_prod() & ~0xffff; // hm, should we really mask here?
s64 ax = dsp_get_long_acx(sreg);
s64 acc = (prod + ax) & ~0xffff;
diff --git a/Source/Core/DSPCore/Src/assemble.cpp b/Source/Core/DSPCore/Src/assemble.cpp index 45c63c12d7..8032a6e46a 100644 --- a/Source/Core/DSPCore/Src/assemble.cpp +++ b/Source/Core/DSPCore/Src/assemble.cpp @@ -38,7 +38,6 @@ Initial import ====================================================================*/
#include <cstdio>
-#include <memory.h>
#include <cstdlib>
#include <map>
diff --git a/Source/Core/DSPCore/Src/disassemble.cpp b/Source/Core/DSPCore/Src/disassemble.cpp index d15e45d2bb..dc3841745c 100644 --- a/Source/Core/DSPCore/Src/disassemble.cpp +++ b/Source/Core/DSPCore/Src/disassemble.cpp @@ -23,7 +23,6 @@ ====================================================================*/ -#include <memory.h> #include <stdio.h> #include <stdlib.h> diff --git a/Source/Core/DSPCore/Src/gdsp_interface.cpp b/Source/Core/DSPCore/Src/gdsp_interface.cpp index 84125c939f..8b6f4a65a4 100644 --- a/Source/Core/DSPCore/Src/gdsp_interface.cpp +++ b/Source/Core/DSPCore/Src/gdsp_interface.cpp @@ -138,6 +138,9 @@ void gdsp_ifx_write(u16 addr, u16 val) gdsp_ifx_regs[DSP_DSCR] &= ~0x0004; break; + case 0xde: + //if (val) + // PanicAlert("Gain written: %04x", val); // BMX XXX does, and sounds HORRIBLE. case 0xcd: case 0xce: case 0xcf: diff --git a/Source/Core/DSPCore/Src/gdsp_interpreter.cpp b/Source/Core/DSPCore/Src/gdsp_interpreter.cpp index 883e6e8881..757ddf9aac 100644 --- a/Source/Core/DSPCore/Src/gdsp_interpreter.cpp +++ b/Source/Core/DSPCore/Src/gdsp_interpreter.cpp @@ -185,4 +185,4 @@ void Stop() gdsp_running = false; } -} // namespace
\ No newline at end of file +} // namespace diff --git a/Source/Core/DSPCore/Src/gdsp_registers.cpp b/Source/Core/DSPCore/Src/gdsp_registers.cpp index ed6cef1685..091e5e0ca9 100644 --- a/Source/Core/DSPCore/Src/gdsp_registers.cpp +++ b/Source/Core/DSPCore/Src/gdsp_registers.cpp @@ -57,4 +57,4 @@ u16 dsp_reg_load_stack(u8 stack_reg) u16 val = g_dsp.r[DSP_REG_ST0 + stack_reg]; dsp_reg_stack_pop(stack_reg); return val; -}
\ No newline at end of file +} |
