Commit 0b2ddf57 authored by Zarh's avatar Zarh
Browse files

Fix PS3 build

parent ed49bd38
...@@ -163,6 +163,8 @@ local.properties ...@@ -163,6 +163,8 @@ local.properties
*.vspscc *.vspscc
.builds .builds
*.dotCover *.dotCover
*.o
*.a
## TODO: If you have NuGet Package Restore enabled, uncomment this ## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/ #packages/
......
...@@ -123,7 +123,7 @@ else ifeq ($(platform), qnx) ...@@ -123,7 +123,7 @@ else ifeq ($(platform), qnx)
else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght)) else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght))
TARGET := $(TARGET_NAME)_libretro_ps3.a TARGET := $(TARGET_NAME)_libretro_ps3.a
STATIC_LINKING = 1 STATIC_LINKING = 1
ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN ENDIANNESS_DEFINES := -DMSB_FIRST -DBYTE_ORDER=BIG_ENDIAN -D__CELLOS_LV2__
# sncps3 # sncps3
ifneq (,$(findstring sncps3,$(platform))) ifneq (,$(findstring sncps3,$(platform)))
...@@ -142,6 +142,7 @@ else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght)) ...@@ -142,6 +142,7 @@ else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght))
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
FLAGS += -DARCH_POWERPC_ALTIVEC FLAGS += -DARCH_POWERPC_ALTIVEC
OLD_GCC := 1 OLD_GCC := 1
INCFLAGS_PLATFORM := -I./deps/ps3
# Lightweight PS3 Homebrew SDK # Lightweight PS3 Homebrew SDK
else ifneq (,$(findstring psl1ght,$(platform))) else ifneq (,$(findstring psl1ght,$(platform)))
......
...@@ -65,7 +65,7 @@ namespace boost { ...@@ -65,7 +65,7 @@ namespace boost {
template< typename T1, typename T2 > template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const bool operator()( const T1& Arg1, const T2& Arg2 ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) || defined(__CELLOS_LV2__)
return std::toupper(Arg1)==std::toupper(Arg2); return std::toupper(Arg1)==std::toupper(Arg2);
#else #else
return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc); return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc);
...@@ -118,7 +118,7 @@ namespace boost { ...@@ -118,7 +118,7 @@ namespace boost {
template< typename T1, typename T2 > template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const bool operator()( const T1& Arg1, const T2& Arg2 ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) || defined(__CELLOS_LV2__)
return std::toupper(Arg1)<std::toupper(Arg2); return std::toupper(Arg1)<std::toupper(Arg2);
#else #else
return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc); return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc);
...@@ -171,7 +171,7 @@ namespace boost { ...@@ -171,7 +171,7 @@ namespace boost {
template< typename T1, typename T2 > template< typename T1, typename T2 >
bool operator()( const T1& Arg1, const T2& Arg2 ) const bool operator()( const T1& Arg1, const T2& Arg2 ) const
{ {
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) || defined(__CELLOS_LV2__)
return std::toupper(Arg1)<=std::toupper(Arg2); return std::toupper(Arg1)<=std::toupper(Arg2);
#else #else
return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc); return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc);
......
#include <clocale>
...@@ -19,6 +19,10 @@ X More cars seem to be high pitched than on MAME. (Fixed - engine channel setup) ...@@ -19,6 +19,10 @@ X More cars seem to be high pitched than on MAME. (Fixed - engine channel setup)
#include <cstring> // For memset on GCC #include <cstring> // For memset on GCC
#include "engine/audio/osound.hpp" #include "engine/audio/osound.hpp"
#ifdef __CELLOS_LV2__
#define memcpy std::memcpy
#endif
// Use YM2151 Timing // Use YM2151 Timing
#define TIMER_CODE 1 #define TIMER_CODE 1
......
...@@ -45,6 +45,10 @@ ...@@ -45,6 +45,10 @@
#include "engine/ostats.hpp" #include "engine/ostats.hpp"
#include "engine/otraffic.hpp" #include "engine/otraffic.hpp"
#ifdef __CELLOS_LV2__
#define srand std::srand
#endif
OAttractAI oattractai; OAttractAI oattractai;
OAttractAI::OAttractAI(void) OAttractAI::OAttractAI(void)
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
#include "engine/outils.hpp" #include "engine/outils.hpp"
#include "engine/ostats.hpp" #include "engine/ostats.hpp"
#ifdef __CELLOS_LV2__
#define rand std::rand
#endif
outils::outils(void) outils::outils(void)
{ {
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
#include "engine/ohiscore.hpp" #include "engine/ohiscore.hpp"
#include "engine/audio/osoundint.hpp" #include "engine/audio/osoundint.hpp"
#ifdef __CELLOS_LV2__
#define remove std::remove
#endif
// api change in boost 1.56 // api change in boost 1.56
#include <boost/version.hpp> #include <boost/version.hpp>
#if (BOOST_VERSION >= 105600) #if (BOOST_VERSION >= 105600)
......
...@@ -16,6 +16,15 @@ ...@@ -16,6 +16,15 @@
#include "hwaudio/ym2151.hpp" #include "hwaudio/ym2151.hpp"
#ifdef __CELLOS_LV2__
#define memset std::memset
#define pow std::pow
#define floor std::floor
#define sin std::sin
#define log std::log
#endif
signed int chanout[8]; signed int chanout[8];
signed int m2,c1,c2; /* Phase Modulation input for operators 2,3,4 */ signed int m2,c1,c2; /* Phase Modulation input for operators 2,3,4 */
signed int mem; /* one sample delay memory */ signed int mem; /* one sample delay memory */
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
#include "engine/audio/osoundint.hpp" #include "engine/audio/osoundint.hpp"
#include <libretro.h> #include <libretro.h>
#ifdef __CELLOS_LV2__
#define free std::free
#endif
extern retro_audio_sample_batch_t audio_batch_cb; extern retro_audio_sample_batch_t audio_batch_cb;
#ifdef COMPILE_SOUND_CODE #ifdef COMPILE_SOUND_CODE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment