Commit d810e1ae authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Update

parent 4c470bb3
Pipeline #6220 passed with stages
in 4 minutes and 30 seconds
......@@ -131,28 +131,6 @@ else ifeq ($(platform), qnx)
PLATFORM_DEFINES := -fexceptions -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
CFLAGS += -std=c99 -D_POSIX_C_SOURCE
# PS3
else ifeq ($(platform), ps3)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
CC_AS = $(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
PLATFORM_DEFINES := -D__CELLOS_LV2__ -Iutils/zlib
STATIC_LINKING = 1
HAVE_COMPAT = 1
# sncps3
else ifeq ($(platform), sncps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
CC_AS = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
PLATFORM_DEFINES := -D__CELLOS_LV2__
STATIC_LINKING = 1
HAVE_COMPAT = 1
# Lightweight PS3 Homebrew SDK
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
......@@ -160,7 +138,7 @@ else ifeq ($(platform), psl1ght)
CC_AS = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
PLATFORM_DEFINES := -D__CELLOS_LV2__ -D__PSL1GHT__
PLATFORM_DEFINES := -D__PSL1GHT__
STATIC_LINKING = 1
HAVE_COMPAT = 1
......
......@@ -164,10 +164,6 @@
#include <zlib.h>
#if defined (__CELLOS_LV2__) && !defined(__PSL1GHT__)
#define tmpnam(a)
#endif
#define AUTODELAY 50
/* forward declarations - some libretro port callbacks */
......
......@@ -39,11 +39,7 @@
#include <windows.h>
#endif
#if defined(__CELLOS_LV2__)
#ifndef _PPU_INTRINSICS_H
#include <ppu_intrinsics.h>
#endif
#elif defined(_XBOX360)
#if defined(_XBOX360)
#include <PPCIntrinsics.h>
#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(ANDROID) || defined(__QNX__) || defined(DJGPP)
/* POSIX_MONOTONIC_CLOCK is not being defined in Android headers despite support being present. */
......@@ -73,8 +69,6 @@
#if defined(__PSL1GHT__)
#include <sys/time.h>
#elif defined(__CELLOS_LV2__)
#include <sys/sys_time.h>
#endif
#ifdef GEKKO
......@@ -181,7 +175,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void)
time_ticks = (retro_perf_tick_t)a | ((retro_perf_tick_t)d << 32);
#elif defined(__ARM_ARCH_6__)
__asm__ volatile( "mrc p15, 0, %0, c9, c13, 0" : "=r"(time_ticks) );
#elif defined(__CELLOS_LV2__) || defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__)
#elif defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__)
time_ticks = __mftb();
#elif defined(GEKKO)
time_ticks = gettime();
......@@ -226,8 +220,6 @@ retro_time_t cpu_features_get_time_usec(void)
if (!QueryPerformanceCounter(&count))
return 0;
return count.QuadPart * 1000000 / freq.QuadPart;
#elif defined(__CELLOS_LV2__)
return sys_time_get_system_time();
#elif defined(GEKKO)
return ticks_to_microsecs(gettime());
#elif defined(WIIU)
......
......@@ -26,7 +26,7 @@
#include <ctype.h>
#include <errno.h>
#if !defined(_WIN32) && !defined(__CELLOS_LV2__) && !defined(_XBOX)
#if !defined(_WIN32) && !defined(_XBOX)
#include <sys/param.h> /* PATH_MAX */
#elif defined(_WIN32) && !defined(_XBOX)
#define WIN32_LEAN_AND_MEAN
......@@ -300,7 +300,6 @@ static void add_sub_conf(config_file_t *conf, char *path, config_file_cb_t *cb)
fill_pathname_resolve_relative(real_path, conf->path,
path, sizeof(real_path));
#else
#ifndef __CELLOS_LV2__
if (*path == '~')
{
const char *home = getenv("HOME");
......@@ -308,7 +307,6 @@ static void add_sub_conf(config_file_t *conf, char *path, config_file_cb_t *cb)
strlcat(real_path, path + 1, sizeof(real_path));
}
else
#endif
if (!string_is_empty(conf->path))
fill_pathname_resolve_relative(real_path, conf->path,
path, sizeof(real_path));
......
......@@ -87,15 +87,11 @@
#include <fileXio.h>
#endif
#if defined(__CELLOS_LV2__)
#include <cell/cell_fs.h>
#endif
#if defined(VITA)
#define FIO_S_ISDIR SCE_S_ISDIR
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) || defined(PS2)
#if defined(__QNX__) || defined(PSP) || defined(PS2)
#include <unistd.h> /* stat() is defined here */
#endif
......
......@@ -69,7 +69,7 @@ extern "C" {
# endif
# endif
# else
# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__CELLOS_LV2__)
# if defined(__GNUC__) && __GNUC__ >= 4
# define RETRO_API RETRO_CALLCONV __attribute__((__visibility__("default")))
# else
# define RETRO_API RETRO_CALLCONV
......
......@@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdint.h>
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH)
#if defined(PSP) || defined(PS2) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH)
/* No mman available */
#elif defined(_WIN32) && !defined(_XBOX)
#include <windows.h>
......
......@@ -116,19 +116,7 @@ struct SceNetInAddr inet_aton(const char *ip_addr);
#include <netdb.h>
#include <fcntl.h>
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <cell/sysmodule.h>
#include <netex/net.h>
#include <netex/libnetctl.h>
#include <sys/timer.h>
#ifndef EWOULDBLOCK
#define EWOULDBLOCK SYS_NET_EWOULDBLOCK
#endif
#else
#include <signal.h>
#endif
#endif
......@@ -155,8 +143,6 @@ static INLINE bool isagain(int bytes)
if (WSAGetLastError() != WSAEWOULDBLOCK)
return false;
return true;
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
return (sys_net_errno == SYS_NET_EWOULDBLOCK) || (sys_net_errno == SYS_NET_EAGAIN);//35
#elif defined(VITA)
return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
#elif defined(WIIU)
......
......@@ -39,10 +39,6 @@
#include <Xtl.h>
#endif
#if defined(__CELLOS_LV2__)
#include <sys/fs_external.h>
#endif
#include <limits.h>
#ifdef _MSC_VER
......@@ -75,9 +71,7 @@ static INLINE bool bits_any_set(uint32_t* ptr, uint32_t count)
}
#ifndef PATH_MAX_LENGTH
#if defined(__CELLOS_LV2__)
#define PATH_MAX_LENGTH CELL_FS_MAX_FS_PATH_LENGTH
#elif defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) || defined(ORBIS)
#if defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) || defined(ORBIS)
#define PATH_MAX_LENGTH 512
#else
#define PATH_MAX_LENGTH 4096
......
......@@ -25,9 +25,7 @@
#include <stdint.h>
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include <sys/timer.h>
#elif defined(XENON)
#if defined(XENON)
#include <time/time.h>
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(__QNX__)
#include <unistd.h>
......@@ -87,9 +85,7 @@ static int nanosleepDOS(const struct timespec *rqtp, struct timespec *rmtp)
**/
static INLINE void retro_sleep(unsigned msec)
{
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
sys_timer_usleep(1000 * msec);
#elif defined(PSP) || defined(VITA)
#if defined(PSP) || defined(VITA)
sceKernelDelayThread(1000 * msec);
#elif defined(PS2)
SDL_Delay(msec);
......
......@@ -223,7 +223,7 @@ int getaddrinfo_retro(const char *node, const char *service,
in_addr->sin_family = host->h_addrtype;
#if defined(AF_INET6) && !defined(__CELLOS_LV2__) || defined(VITA)
#if defined(AF_INET6) || defined(VITA)
/* TODO/FIXME - In case we ever want to support IPv6 */
in_addr->sin_addr.s_addr = inet_addr(host->h_addr_list[0]);
#else
......@@ -281,29 +281,6 @@ bool network_init(void)
network_deinit();
return false;
}
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
int timeout_count = 10;
cellSysmoduleLoadModule(CELL_SYSMODULE_NET);
sys_net_initialize_network();
if (cellNetCtlInit() < 0)
return false;
for (;;)
{
int state;
if (cellNetCtlGetState(&state) < 0)
return false;
if (state == CELL_NET_CTL_STATE_IPObtained)
break;
retro_sleep(500);
timeout_count--;
if (timeout_count < 0)
return 0;
}
#elif defined(VITA)
SceNetInitParam initparam;
......@@ -351,10 +328,6 @@ void network_deinit(void)
{
#if defined(_WIN32)
WSACleanup();
#elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
cellNetCtlTerm();
sys_net_finalize_network();
cellSysmoduleUnloadModule(CELL_SYSMODULE_NET);
#elif defined(VITA)
sceNetCtlTerm();
sceNetTerm();
......
......@@ -119,7 +119,7 @@ int socket_receive_all_blocking(int fd, void *data_, size_t size)
bool socket_nonblock(int fd)
{
#if defined(__CELLOS_LV2__) || defined(VITA) || defined(WIIU)
#if defined(VITA) || defined(WIIU)
int i = 1;
setsockopt(fd, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
return true;
......@@ -136,7 +136,7 @@ int socket_close(int fd)
#if defined(_WIN32) && !defined(_XBOX360)
/* WinSock has headers from the stone age. */
return closesocket(fd);
#elif defined(__CELLOS_LV2__) || defined(WIIU)
#elif defined(WIIU)
return socketclose(fd);
#elif defined(VITA)
return sceNetSocketClose(fd);
......@@ -148,9 +148,7 @@ int socket_close(int fd)
int socket_select(int nfds, fd_set *readfs, fd_set *writefds,
fd_set *errorfds, struct timeval *timeout)
{
#if defined(__CELLOS_LV2__)
return socketselect(nfds, readfs, writefds, errorfds, timeout);
#elif defined(VITA)
#if defined(VITA)
extern int retro_epoll_fd;
SceNetEpollEvent ev = {0};
......
......@@ -50,9 +50,6 @@
#include "gx_pthread.h"
#elif defined(_3DS)
#include "ctr_pthread.h"
#elif defined(__CELLOS_LV2__)
#include <pthread.h>
#include <sys/sys_time.h>
#else
#include <pthread.h>
#include <time.h>
......@@ -861,13 +858,6 @@ bool scond_wait_timeout(scond_t *cond, slock_t *lock, int64_t timeout_us)
mach_port_deallocate(mach_task_self(), cclock);
now.tv_sec = mts.tv_sec;
now.tv_nsec = mts.tv_nsec;
#elif defined(__CELLOS_LV2__)
sys_time_sec_t s;
sys_time_nsec_t n;
sys_time_get_current_time(&s, &n);
now.tv_sec = s;
now.tv_nsec = n;
#elif defined(PS2)
int tickms = clock();
now.tv_sec = tickms/1000;
......
......@@ -38,7 +38,7 @@
#include <retro_environment.h>
#include <streams/stdin_stream.h>
#if (defined(_WIN32) && defined(_XBOX)) || defined(__CELLOS_LV2__) || defined(__WINRT__)
#if (defined(_WIN32) && defined(_XBOX)) || defined(__WINRT__)
size_t read_stdin(char *buf, size_t size)
{
/* Not implemented. */
......
......@@ -68,16 +68,7 @@
# endif
#endif
#ifdef __CELLOS_LV2__
#include <cell/cell_fs.h>
#define O_RDONLY CELL_FS_O_RDONLY
#define O_WRONLY CELL_FS_O_WRONLY
#define O_CREAT CELL_FS_O_CREAT
#define O_TRUNC CELL_FS_O_TRUNC
#define O_RDWR CELL_FS_O_RDWR
#else
#include <fcntl.h>
#endif
/* TODO: Some things are duplicated but I'm really afraid of breaking other platforms by touching this */
#if defined(VITA)
......@@ -102,7 +93,7 @@
# include <unistd.h>
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) || defined(PS2)
#if defined(__QNX__) || defined(PSP) || defined(PS2)
#include <unistd.h> /* stat() is defined here */
#endif
......@@ -151,15 +142,11 @@
#include <fileXio.h>
#endif
#if defined(__CELLOS_LV2__)
#include <cell/cell_fs.h>
#endif
#if defined(VITA)
#define FIO_S_ISDIR SCE_S_ISDIR
#endif
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
#if defined(__QNX__) || defined(PSP)
#include <unistd.h> /* stat() is defined here */
#endif
......@@ -205,7 +192,7 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i
/* VC2005 and up have a special 64-bit fseek */
#ifdef ATLEAST_VC2005
return _fseeki64(stream->fp, offset, whence);
#elif defined(__CELLOS_LV2__) || defined(_MSC_VER) && _MSC_VER <= 1310
#elif defined(_MSC_VER) && _MSC_VER <= 1310
return fseek(stream->fp, (long)offset, whence);
#elif defined(PS2)
{
......@@ -945,24 +932,6 @@ int retro_vfs_stat_impl(const char *path, int32_t *size)
return RETRO_VFS_STAT_IS_VALID | (is_dir ? RETRO_VFS_STAT_IS_DIRECTORY : 0) | (is_character_special ? RETRO_VFS_STAT_IS_CHARACTER_SPECIAL : 0);
#elif defined(__CELLOS_LV2__)
/* CellOS Lv2 */
bool is_dir;
bool is_character_special = false;
CellFsStat buf;
if (!path || !*path)
return 0;
if (cellFsStat(path, &buf) < 0)
return 0;
if (size)
*size = (int32_t)buf.st_size;
is_dir = ((buf.st_mode & S_IFMT) == S_IFDIR);
return RETRO_VFS_STAT_IS_VALID | (is_dir ? RETRO_VFS_STAT_IS_DIRECTORY : 0) | (is_character_special ? RETRO_VFS_STAT_IS_CHARACTER_SPECIAL : 0);
#elif defined(_WIN32)
/* Windows */
bool is_dir;
......@@ -1091,10 +1060,6 @@ struct libretro_vfs_implementation_dir
#elif defined(PS2)
int directory;
iox_dirent_t entry;
#elif defined(__CELLOS_LV2__)
CellFsErrno error;
int directory;
CellFsDirent entry;
#elif defined(ORBIS)
int directory;
struct dirent entry;
......@@ -1110,8 +1075,6 @@ static bool dirent_check_error(libretro_vfs_implementation_dir *rdir)
return (rdir->directory == INVALID_HANDLE_VALUE);
#elif defined(VITA) || defined(PSP) || defined(PS2) || defined(ORBIS)
return (rdir->directory < 0);
#elif defined(__CELLOS_LV2__)
return (rdir->error != CELL_FS_SUCCEEDED);
#else
return !(rdir->directory);
#endif
......@@ -1172,8 +1135,6 @@ libretro_vfs_implementation_dir *retro_vfs_opendir_impl(const char *name, bool i
#elif defined(_3DS)
rdir->directory = !string_is_empty(name) ? opendir(name) : NULL;
rdir->entry = NULL;
#elif defined(__CELLOS_LV2__)
rdir->error = cellFsOpendir(name, &rdir->directory);
#elif defined(ORBIS)
rdir->directory = orbisDopen(name);
#else
......@@ -1214,10 +1175,6 @@ bool retro_vfs_readdir_impl(libretro_vfs_implementation_dir *rdir)
int ret = ps2fileXioDread(rdir->directory, &record);
rdir->entry = record;
return ( ret > 0);
#elif defined(__CELLOS_LV2__)
uint64_t nread;
rdir->error = cellFsReaddir(rdir->directory, &rdir->entry, &nread);
return (nread != 0);
#elif defined(ORBIS)
return (orbisDread(rdir->directory, &rdir->entry) > 0);
#else
......@@ -1244,7 +1201,7 @@ const char *retro_vfs_dirent_get_name_impl(libretro_vfs_implementation_dir *rdir
free(name);
#endif
return (char*)rdir->entry.cFileName;
#elif defined(VITA) || defined(PSP) || defined(__CELLOS_LV2__) || defined(ORBIS)
#elif defined(VITA) || defined(PSP) || defined(ORBIS)
return rdir->entry.d_name;
#elif defined(PS2)
return rdir->entry.name;
......@@ -1269,9 +1226,6 @@ bool retro_vfs_dirent_is_dir_impl(libretro_vfs_implementation_dir *rdir)
#elif defined(PS2)
const iox_dirent_t *entry = (const iox_dirent_t*)&rdir->entry;
return FIO_S_ISDIR(entry->stat.mode);
#elif defined(__CELLOS_LV2__)
CellFsDirent *entry = (CellFsDirent*)&rdir->entry;
return (entry->d_type == CELL_FS_TYPE_DIRECTORY);
#elif defined(ORBIS)
const struct dirent *entry = &rdir->entry;
if (entry->d_type == DT_DIR)
......@@ -1310,8 +1264,6 @@ int retro_vfs_closedir_impl(libretro_vfs_implementation_dir *rdir)
sceIoDclose(rdir->directory);
#elif defined(PS2)
ps2fileXioDclose(rdir->directory);
#elif defined(__CELLOS_LV2__)
rdir->error = cellFsClosedir(rdir->directory);
#elif defined(ORBIS)
orbisDclose(rdir->directory);
#else
......
......@@ -53,11 +53,6 @@
/* Define to 1 if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
#ifndef __CELLOS_LV2__
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
#endif
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
......
......@@ -21,15 +21,9 @@ char DISKB_NAME[512]="\0";
char cart_name[512]="\0";
//TIME
#if defined (__CELLOS_LV2__) && !defined(__PSL1GHT__)
#include "sys/sys_time.h"
#include "sys/timer.h"
#define usleep sys_timer_usleep
#else
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#endif
// DISK CONTROL
#include "retro_disk_control.h"
......
......@@ -30,7 +30,7 @@ static struct file_browser browser;
#include <unistd.h>
#endif
#if !defined(_WIN32) && !defined(__CELLOS_LV2__)
#if !defined(_WIN32)
# include <pwd.h>
#endif
......@@ -160,9 +160,7 @@ file_browser_init(struct file_browser *browser)
{
//FIXME
#ifdef __CELLOS_LV2__
const char *home = "/dev_hdd0/game/SSNE10000/USRDIR/cores/system/";
#elif defined(VITA)
#if defined(VITA)
const char *home = getenv("HOME");
if (!home) home = "ux0:/";
#elif defined(GEKKO)
......
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