core, libretro vfs support

This commit is contained in:
kub 2022-01-27 22:31:09 +00:00
parent ed7c6238b7
commit 73bda1add9
14 changed files with 14 additions and 42 deletions

View file

@ -34,7 +34,8 @@ CFLAGS += -I platform/libretro/libretro-common/include/streams
CFLAGS += -I platform/libretro/libretro-common/include/string CFLAGS += -I platform/libretro/libretro-common/include/string
CFLAGS += -I platform/libretro/libretro-common/include/vfs CFLAGS += -I platform/libretro/libretro-common/include/vfs
STATIC_LINKING:= 0 USE_LIBRETRO_VFS := 1
STATIC_LINKING := 0
TARGET_NAME := picodrive TARGET_NAME := picodrive
LIBM := -lm LIBM := -lm
GIT_VERSION ?= $(shell git rev-parse --short HEAD || echo unknown) GIT_VERSION ?= $(shell git rev-parse --short HEAD || echo unknown)
@ -457,7 +458,6 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
ARCH = x86_64 ARCH = x86_64
SHARED := SHARED :=
LIBM := LIBM :=
USE_LIBRETRO_VFS = 1
NO_ALIGN_FUNCTIONS = 1 NO_ALIGN_FUNCTIONS = 1
CFLAGS += -DHAVE_VSNPRINTF CFLAGS += -DHAVE_VSNPRINTF

View file

@ -10,10 +10,6 @@
#include "pico_int.h" #include "pico_int.h"
#include <cpu/debug.h> #include <cpu/debug.h>
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#if defined(USE_LIBCHDR) #if defined(USE_LIBCHDR)
#include "libchdr/chd.h" #include "libchdr/chd.h"
#include "libchdr/cdrom.h" #include "libchdr/cdrom.h"

View file

@ -11,10 +11,6 @@
#include "cdd.h" #include "cdd.h"
#include "cd_parse.h" #include "cd_parse.h"
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#if defined(__GNUC__) && __GNUC__ >= 7 #if defined(__GNUC__) && __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wformat-truncation" #pragma GCC diagnostic ignored "-Wformat-truncation"
#endif #endif

View file

@ -13,10 +13,6 @@
#include "cd_parse.h" #include "cd_parse.h"
// #define elprintf(w,f,...) printf(f "\n",##__VA_ARGS__); // #define elprintf(w,f,...) printf(f "\n",##__VA_ARGS__);
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#if defined(USE_LIBCHDR) #if defined(USE_LIBCHDR)
#include "libchdr/chd.h" #include "libchdr/chd.h"
#include "libchdr/cdrom.h" #include "libchdr/cdrom.h"

View file

@ -25,10 +25,6 @@
#include "memory.h" #include "memory.h"
#include "patch.h" #include "patch.h"
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
struct patch struct patch
{ {
unsigned int addr; unsigned int addr;

View file

@ -8,6 +8,10 @@
#endif #endif
#include "pico_types.h" #include "pico_types.h"
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#if defined(__GNUC__) && defined(__i386__) #if defined(__GNUC__) && defined(__i386__)
#define REGPARM(x) __attribute__((regparm(x))) #define REGPARM(x) __attribute__((regparm(x)))
#else #else

View file

@ -10,10 +10,6 @@
#include "pico_int.h" #include "pico_int.h"
#include "memory.h" #include "memory.h"
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
/* context */ /* context */
// Cyclone 68000 // Cyclone 68000
#ifdef EMU_C68K #ifdef EMU_C68K

View file

@ -14,10 +14,6 @@
#include "sound/emu2413/emu2413.h" #include "sound/emu2413/emu2413.h"
#include "state.h" #include "state.h"
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
// sn76496 & ym2413 // sn76496 & ym2413
extern int *sn76496_regs; extern int *sn76496_regs;
extern OPLL old_opll; extern OPLL old_opll;

View file

@ -18,10 +18,6 @@
#include "../libpicofe/lprintf.h" #include "../libpicofe/lprintf.h"
#include "config_file.h" #include "config_file.h"
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
static char *mystrip(char *str); static char *mystrip(char *str);
#ifndef _MSC_VER #ifndef _MSC_VER

View file

@ -28,10 +28,6 @@
#include <pico/pico_int.h> #include <pico/pico_int.h>
#include <pico/patch.h> #include <pico/patch.h>
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#if defined(__GNUC__) && __GNUC__ >= 7 #if defined(__GNUC__) && __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wformat-truncation" #pragma GCC diagnostic ignored "-Wformat-truncation"
#endif #endif

View file

@ -21,10 +21,6 @@
#include "version.h" #include "version.h"
#include <cpu/debug.h> #include <cpu/debug.h>
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
static int load_state_slot = -1; static int load_state_slot = -1;
char **g_argv; char **g_argv;

View file

@ -32,10 +32,6 @@
#include <libkern/OSCacheControl.h> #include <libkern/OSCacheControl.h>
#endif #endif
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#if defined(RENDER_GSKIT_PS2) #if defined(RENDER_GSKIT_PS2)
#include <malloc.h> #include <malloc.h>
#include "libretro-common/include/libretro_gskit_ps2.h" #include "libretro-common/include/libretro_gskit_ps2.h"

View file

@ -3,6 +3,10 @@
#include <stdio.h> #include <stdio.h>
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View file

@ -9,6 +9,10 @@
#include <stdio.h> #include <stdio.h>
#ifdef USE_LIBRETRO_VFS
#include "file_stream_transforms.h"
#endif
#include "zutil.h" #include "zutil.h"
#ifdef NO_DEFLATE /* for compatibility with old definition */ #ifdef NO_DEFLATE /* for compatibility with old definition */