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
This commit is contained in:
hrydgard
2009-05-03 11:15:17 +00:00
parent 90ae2a8e55
commit 0772db6af6
21 changed files with 161 additions and 22 deletions

View File

@ -48,4 +48,4 @@ extern u8 code_flags[ISPACE];
// some pretty expensive analysis if necessary.
void Analyze();
} // namespace
} // namespace

View File

@ -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]);
}

View File

@ -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
#endif // _DSPCODEUTIL_H

View File

@ -202,4 +202,4 @@ void gdsp_check_exceptions()
}
}
//} // namespace
//} // namespace

View File

@ -28,4 +28,4 @@ bool DSPHost_OnThread();
bool DSPHost_Running();
u32 DSPHost_CodeLoaded(const u8 *ptr, int size);
#endif
#endif

View File

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

View File

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

View File

@ -38,7 +38,6 @@ Initial import
====================================================================*/
#include <cstdio>
#include <memory.h>
#include <cstdlib>
#include <map>

View File

@ -23,7 +23,6 @@
====================================================================*/
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>

View File

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

View File

@ -185,4 +185,4 @@ void Stop()
gdsp_running = false;
}
} // namespace
} // namespace

View File

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