mirror of
https://github.com/libretro/vice-libretro.git
synced 2024-11-23 16:29:40 +00:00
vice_x64 - PS3 build fix
This commit is contained in:
parent
254f5b4d17
commit
9cec6d69d1
9
Makefile
9
Makefile
@ -260,6 +260,15 @@ else ifeq ($(platform), psp1)
|
|||||||
CXXFLAGS += -std=c99
|
CXXFLAGS += -std=c99
|
||||||
STATIC_LINKING = 1
|
STATIC_LINKING = 1
|
||||||
|
|
||||||
|
# PS3
|
||||||
|
else ifeq ($(platform), ps3)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||||
|
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||||
|
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
|
||||||
|
COMMONFLAGS += -D__CELLOS_LV2__ -D__POWERPC__ -D__ppc__ -DWORDS_BIGENDIAN=1 -D__unix__ -DHAVE_STRTOUL -D_NO_CPP_INLINES
|
||||||
|
STATIC_LINKING=1
|
||||||
|
|
||||||
# Vita
|
# Vita
|
||||||
else ifeq ($(platform), vita)
|
else ifeq ($(platform), vita)
|
||||||
TARGET := $(TARGET_NAME)_libretro_vita.a
|
TARGET := $(TARGET_NAME)_libretro_vita.a
|
||||||
|
2
deps/nibtools/lz.c
vendored
2
deps/nibtools/lz.c
vendored
@ -97,7 +97,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#ifndef __CELLOS_LV2__
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
58
include/PS3_include.h
Normal file
58
include/PS3_include.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include <sys/sys_time.h>
|
||||||
|
#include <sys/timer.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
#ifndef PS3_HEADER
|
||||||
|
#define PS3_HEADER
|
||||||
|
|
||||||
|
#define F_OK 0
|
||||||
|
#define W_OK 0
|
||||||
|
#define R_OK 0
|
||||||
|
#define X_OK 0
|
||||||
|
|
||||||
|
#ifndef S_IREAD
|
||||||
|
#define S_IREAD S_IRUSR
|
||||||
|
#endif
|
||||||
|
#ifndef S_IWRITE
|
||||||
|
#define S_IWRITE S_IWUSR
|
||||||
|
#endif
|
||||||
|
#ifndef S_ISDIR
|
||||||
|
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef S_IFBLK
|
||||||
|
#define S_IFBLK (-1)
|
||||||
|
#endif
|
||||||
|
#ifndef S_ISBLK
|
||||||
|
#define S_ISBLK(m) (((m)&S_IFBLK)==S_IFBLK)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef S_IFCHR
|
||||||
|
#define S_IFCHR (-1)
|
||||||
|
#endif
|
||||||
|
#ifndef S_ISCHR
|
||||||
|
#define S_ISCHR(m) (((m)&S_IFCHR)==S_IFCHR)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define chdir(...) 0
|
||||||
|
#define isatty(...) 0
|
||||||
|
#define currentpath "/dev_hdd0/game/SSNE10000/USRDIR"
|
||||||
|
#define tmppath "/dev_hdd0/game/SSNE10000/USRDIR/cores/savefiles"
|
||||||
|
#define getwd(buffer) (strcpy(buffer, currentpath)) ? (buffer) : (NULL)
|
||||||
|
#define tmpnam(...) (tmppath)
|
||||||
|
#define getenv(...) (NULL)
|
||||||
|
#define exp(xval) std::exp(xval)
|
||||||
|
#define fabs(xval) std::fabs(xval)
|
||||||
|
#define sqrt(xval) std::sqrt(xval)
|
||||||
|
#undef log10
|
||||||
|
#define log10(xval) std::log10(xval)
|
||||||
|
#undef log
|
||||||
|
#define log(xval) std::log(xval)
|
||||||
|
#define ceil(xval) std::ceil(xval)
|
||||||
|
#undef sin
|
||||||
|
#define sin(xval) std::sin(xval)
|
||||||
|
#define pow(xval, yval) std::pow(xval, yval)
|
||||||
|
#endif
|
@ -79,7 +79,9 @@
|
|||||||
#define HAVE_MEMMOVE 1
|
#define HAVE_MEMMOVE 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `mkstemp' function. */
|
/* Define to 1 if you have the `mkstemp' function. */
|
||||||
|
#ifndef __CELLOS_LV2__
|
||||||
#define HAVE_MKSTEMP 1
|
#define HAVE_MKSTEMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Enable 1351 mouse support */
|
/* Enable 1351 mouse support */
|
||||||
#define HAVE_MOUSE 1
|
#define HAVE_MOUSE 1
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Verify if file exists */
|
/* Verify if file exists */
|
||||||
bool file_exists(const char *filename)
|
bool file_exists(const char *filename)
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PSP) || defined(VITA) || defined(__PSL1GHT__)
|
#if defined(PSP) || defined(VITA) || defined(__PSL1GHT__) || defined(__CELLOS_LV2__)
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -112,12 +112,26 @@ int kbd_arch_get_host_mapping(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include <pthread_types.h>
|
||||||
|
int gettimeofday(struct timeval* x, int unused)
|
||||||
|
{
|
||||||
|
sys_time_sec_t s;
|
||||||
|
sys_time_nsec_t ns;
|
||||||
|
int ret = sys_time_get_current_time(&s, &ns);
|
||||||
|
|
||||||
|
x->tv_sec = s;
|
||||||
|
x->tv_usec = ns / 1000;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int archdep_rtc_get_centisecond(void)
|
int archdep_rtc_get_centisecond(void)
|
||||||
{
|
{
|
||||||
struct timespec dtm;
|
struct timespec dtm;
|
||||||
int status;
|
int status;
|
||||||
#if defined(PSP) || defined(VITA) || defined(_3DS) || defined(__PSL1GHT__)
|
#if defined(PSP) || defined(VITA) || defined(_3DS) || defined(__PSL1GHT__) || defined(__CELLOS_LV2__)
|
||||||
struct timeval tm;
|
struct timeval tm;
|
||||||
status = gettimeofday(&tm, NULL);
|
status = gettimeofday(&tm, NULL);
|
||||||
if(status==0)
|
if(status==0)
|
||||||
|
@ -400,7 +400,9 @@
|
|||||||
#define HAVE_MIDI /**/
|
#define HAVE_MIDI /**/
|
||||||
|
|
||||||
/* Define to 1 if you have the `mkstemp' function. */
|
/* Define to 1 if you have the `mkstemp' function. */
|
||||||
|
#ifndef __CELLOS_LV2__
|
||||||
#define HAVE_MKSTEMP 1
|
#define HAVE_MKSTEMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the `mmap_device_io' function. */
|
/* Define to 1 if you have the `mmap_device_io' function. */
|
||||||
/* #undef HAVE_MMAP_DEVICE_IO */
|
/* #undef HAVE_MMAP_DEVICE_IO */
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
int ioutil_access(const char *pathname, int mode)
|
int ioutil_access(const char *pathname, int mode)
|
||||||
{
|
{
|
||||||
#ifdef __PSL1GHT__
|
#if defined( __PSL1GHT__) || defined (__CELLOS_LV2__)
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
/* This can be improved but since ps3 os doesn't really have ACLs, who
|
/* This can be improved but since ps3 os doesn't really have ACLs, who
|
||||||
cares? */
|
cares? */
|
||||||
|
@ -46,6 +46,10 @@
|
|||||||
#define IOUTIL_ERRNO_ENOENT 3
|
#define IOUTIL_ERRNO_ENOENT 3
|
||||||
#define IOUTIL_ERRNO_ERANGE 4
|
#define IOUTIL_ERRNO_ERANGE 4
|
||||||
|
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include "PS3_include.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int ioutil_access(const char *pathname, int mode);
|
extern int ioutil_access(const char *pathname, int mode);
|
||||||
extern int ioutil_chdir(const char *path);
|
extern int ioutil_chdir(const char *path);
|
||||||
extern int ioutil_errno(unsigned int check);
|
extern int ioutil_errno(unsigned int check);
|
||||||
|
@ -38,6 +38,10 @@
|
|||||||
#include "montypes.h"
|
#include "montypes.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#undef CLI
|
||||||
|
#endif
|
||||||
|
|
||||||
static const int addr_mode_size[] = {
|
static const int addr_mode_size[] = {
|
||||||
1, /* ASM_ADDR_MODE_IMPLIED */
|
1, /* ASM_ADDR_MODE_IMPLIED */
|
||||||
1, /* ASM_ADDR_MODE_ACCUMULATOR */
|
1, /* ASM_ADDR_MODE_ACCUMULATOR */
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#undef bool
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* set this to enable experimental 24-bit address space support */
|
/* set this to enable experimental 24-bit address space support */
|
||||||
#define HAVE_MEMSPACE24
|
#define HAVE_MEMSPACE24
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
|
|
||||||
#include "sid.h"
|
#include "sid.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include "PS3_include.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef round
|
#ifndef round
|
||||||
#define round(x) (x>=0.0?floor(x+0.5):ceil(x-0.5))
|
#define round(x) (x>=0.0?floor(x+0.5):ceil(x-0.5))
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#include "FilterModelConfig.h"
|
#include "FilterModelConfig.h"
|
||||||
|
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include "PS3_include.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#include "OpAmp.h"
|
#include "OpAmp.h"
|
||||||
|
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include "PS3_include.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#include "WaveformCalculator.h"
|
#include "WaveformCalculator.h"
|
||||||
|
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include "PS3_include.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#include "SincResampler.h"
|
#include "SincResampler.h"
|
||||||
|
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include "PS3_include.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
#ifdef __LIBRETRO__
|
#ifdef __LIBRETRO__
|
||||||
#include "../../../sysincludes.h"
|
#include "../../../sysincludes.h"
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
#include "PS3_include.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user