(Xbox 1) benchmark.c - add Xbox 1 support

This commit is contained in:
twinaphex 2012-10-01 23:04:15 +02:00
parent 939749604f
commit 8ffd954122
3 changed files with 17 additions and 4 deletions

View File

@ -26,8 +26,21 @@
unsigned long long rarch_get_performance_counter(void)
{
#if defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX360)
unsigned long long time = __mftb();
unsigned long long time = 0;
#ifdef _XBOX1
#define rdtsc __asm __emit 0fh __asm __emit 031h
LARGE_INTEGER time_tmp;
rdtsc;
__asm mov time_tmp.LowPart, eax;
__asm mov time_tmp.HighPart, edx;
time = time_tmp.QuadPart;
#elif defined(__i386__) || defined(__i486__) || defined(__x86_64__)
uint64_t lo, hi;
__asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi));
time = ((((uint64 t)hi) << 32) | ((uint64 t)lo) );
#elif defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX360)
time = __mftb();
#endif
(void)time;
return time;
}

View File

@ -42,7 +42,7 @@ CONSOLE EXTENSIONS
#include "../rarch_console_exec.c"
#endif
#if defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX360)
#if defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX)
#include "../../benchmark.c"
#endif

View File

@ -37,7 +37,7 @@ enum
enum
{
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_LEFT = RARCH_FIRST_ANALOG_BIND,
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_LEFT = RARCH_FIRST_CUSTOM_BIND,
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_RIGHT,
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_UP,
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_DOWN,