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

@ -36,7 +36,11 @@ size_t strnlen(const char *s, size_t n);
#endif // APPLE
#include <errno.h>
// go to debugger mode
#define Crash() {asm ("int $3");}
#ifdef GEKKO
#define Crash()
#else
#define Crash() {asm ("int $3");}
#endif
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
inline u32 _rotl(u32 x, int shift) {
shift &= 31;

View File

@ -103,8 +103,13 @@ enum LOG_LEVELS {
// FIXME can we get rid of this?
#include "LogManager.h"
#ifdef GEKKO
#define GENERIC_LOG(t, v, ...)
#else
// Let the compiler optimize this out
#define GENERIC_LOG(t, v, ...) {if (v <= MAX_LOGLEVEL) {LogManager::GetInstance()->Log(v, t, __VA_ARGS__);}}
#endif
#if MAX_LOGLEVEL >= ERROR_LEVEL
#undef ERROR_LOG
@ -155,6 +160,8 @@ enum LOG_LEVELS {
#endif // MAX_LOGLEVEL DEBUG
#define _assert_(_a_) _dbg_assert_(MASTER_LOG, _a_)
#ifndef GEKKO
#ifdef _WIN32
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
if (!(_a_)) {\
@ -166,5 +173,8 @@ enum LOG_LEVELS {
if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) {Crash();} \
}
#endif // WIN32
#else // GEKKO
#define _assert_msg_(_t_, _a_, _fmt_, ...)
#endif
#endif // _LOG_H_

View File

@ -31,6 +31,7 @@ void RegisterMsgAlertHandler(MsgAlertHandler handler);
extern bool MsgAlert(const char* caption, bool yes_no, int Style, const char* format, ...);
void SetEnableAlert(bool enable);
#ifndef GEKKO
#ifdef _WIN32
#define SuccessAlert(format, ...) MsgAlert("Information", false, INFORMATION, format, __VA_ARGS__)
#define PanicAlert(format, ...) MsgAlert("Warning", false, WARNING, format, __VA_ARGS__)
@ -42,5 +43,12 @@ void SetEnableAlert(bool enable);
#define PanicYesNo(format, ...) MsgAlert("Warning", true, WARNING, format, ##__VA_ARGS__)
#define AskYesNo(format, ...) MsgAlert("Question", true, QUESTION, format, ##__VA_ARGS__)
#endif
#else
// GEKKO
#define SuccessAlert(format, ...) ;
#define PanicAlert(format, ...) ;
#define PanicYesNo(format, ...) ;
#define AskYesNo(format, ...) ;
#endif
#endif // _MSGHANDLER_H_