DSP: Move the LLE core to a library. Added DSP assembler from gdtool, start cleaning it up. Create a new program called "DSPTool" which will become a more up to date replacement for gdtool from the devkitpro, automatically incorporating all our findings as we make them. This program depends on the new library. It can *ALMOST* roundtrip (asm->disasm->asm) hermes' DSP mixer at this point. Sorry about the unfinished Sconscript work - I'll fix it soon if nobody else does it first.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2955 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-04-12 10:21:40 +00:00
parent 2b2c2afa3c
commit e8b9e93465
48 changed files with 3442 additions and 1262 deletions

View File

@ -154,7 +154,7 @@ void* DynamicLibrary::Get(const char* funcname) const
if (!retval)
{
ERROR_LOG(COMMON, "DL: Symbol %s missing in %s (error: %s)\n",
WARN_LOG(COMMON, "DL: Symbol %s missing in %s (error: %s)\n",
funcname, library_file.c_str(),
DllGetLastError());
}

View File

@ -601,4 +601,35 @@ const char *GetUserDirectory()
return path;
}
bool WriteStringToFile(bool text_file, const char *str, const char *filename)
{
FILE *f = fopen(filename, text_file ? "w" : "wb");
if (!f)
return false;
size_t len = strlen(str);
if (len != fwrite(str, 1, strlen(str), f))
{
fclose(f);
return false;
}
fclose(f);
return true;
}
bool ReadStringFromFile(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);
fclose(f);
delete [] buf;
return true;
}
} // namespace

View File

@ -99,6 +99,9 @@ char *GetConfigDirectory();
std::string GetBundleDirectory();
#endif
bool WriteStringToFile(bool text_file, const char *str, const char *filename);
bool ReadStringFromFile(bool text_file, const char *filename, std::string *str);
} // namespace
#endif