mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-25 18:51:49 +01:00
commit
a4255fafc2
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ sdl/gen_sdl2
|
||||
sdl/build_sdl
|
||||
sdl/build_sdl2
|
||||
|
||||
/libretro/msvc/msvc-2017/msvc-2017.vcxproj.user
|
||||
|
@ -6,6 +6,15 @@ HAVE_SYS_PARAM = 1
|
||||
|
||||
CORE_DIR := .
|
||||
|
||||
SPACE :=
|
||||
SPACE := $(SPACE) $(SPACE)
|
||||
BACKSLASH :=
|
||||
BACKSLASH := \$(BACKSLASH)
|
||||
filter_out1 = $(filter-out $(firstword $1),$1)
|
||||
filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||
unixpath = $(subst \,/,$1)
|
||||
unixcygpath = /$(subst :,,$(call unixpath,$1))
|
||||
|
||||
# system platform
|
||||
ifeq ($(platform),)
|
||||
platform = unix
|
||||
@ -223,6 +232,14 @@ else ifneq (,$(filter $(platform), ngc wii wiiu))
|
||||
PLATFORM_DEFINES += -DHW_DOL -mrvl
|
||||
endif
|
||||
|
||||
# Nintendo Switch (libtransistor)
|
||||
else ifeq ($(platform), switch)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
|
||||
CFLAGS += -fomit-frame-pointer -ffast-math
|
||||
STATIC_LINKING=1
|
||||
STATIC_LINKING_LINK=1
|
||||
|
||||
# emscripten
|
||||
else ifeq ($(platform), emscripten)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
|
||||
@ -243,13 +260,14 @@ else ifeq ($(platform), gcw0)
|
||||
# Windows MSVC 2003 Xbox 1
|
||||
else ifeq ($(platform), xbox1_msvc2003)
|
||||
TARGET := $(TARGET_NAME)_libretro_xdk1.lib
|
||||
MSVCBINDIRPREFIX = $(XDK)/xbox/bin/vc71
|
||||
CC = "$(MSVCBINDIRPREFIX)/CL.exe"
|
||||
CXX = "$(MSVCBINDIRPREFIX)/CL.exe"
|
||||
LD = "$(MSVCBINDIRPREFIX)/lib.exe"
|
||||
CC = CL.exe
|
||||
CXX = CL.exe
|
||||
LD = lib.exe
|
||||
|
||||
export INCLUDE := $(XDK)/xbox/include
|
||||
export LIB := $(XDK)/xbox/lib
|
||||
PATH := $(call unixcygpath,$(XDK)/xbox/bin/vc71):$(PATH)
|
||||
|
||||
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||
PSS_STYLE :=2
|
||||
CFLAGS += -D_XBOX -D_XBOX1
|
||||
@ -282,23 +300,115 @@ HAVE_SYS_PARAM = 0
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/bin/amd64"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/lib/amd64")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/lib/amd64")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/include")
|
||||
|
||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64
|
||||
|
||||
WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
|
||||
WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
|
||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
|
||||
|
||||
WindowsSdkDirInc := $(WindowsSdkDir)Include
|
||||
WindowsSdkDirInc ?= $(WindowsSdkDir)Include
|
||||
|
||||
INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)"
|
||||
export INCLUDE := $(INCLUDE)
|
||||
export LIB := $(LIB);$(WindowsSdkDir)
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\Lib\x64
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
PSS_STYLE :=2
|
||||
LDFLAGS += -DLL
|
||||
LIBS =
|
||||
|
||||
# Windows MSVC 2017 all architectures
|
||||
else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2017_,,$(platform))
|
||||
ifneq (,$(findstring desktop,$(PlatformSuffix)))
|
||||
WinPartition = desktop
|
||||
MSVC2017CompileFlags = -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -FS
|
||||
LDFLAGS += -MANIFEST -LTCG:incremental -NXCOMPAT -DYNAMICBASE -DEBUG -OPT:REF -INCREMENTAL:NO -SUBSYSTEM:WINDOWS -MANIFESTUAC:"level='asInvoker' uiAccess='false'" -OPT:ICF -ERRORREPORT:PROMPT -NOLOGO -TLBID:1
|
||||
LIBS := kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
|
||||
else ifneq (,$(findstring uwp,$(PlatformSuffix)))
|
||||
WinPartition = uwp
|
||||
MSVC2017CompileFlags = -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WINDLL -D_UNICODE -DUNICODE -D__WRL_NO_DEFAULT_LIB__ -EHsc -FS
|
||||
LDFLAGS += -APPCONTAINER -NXCOMPAT -DYNAMICBASE -MANIFEST:NO -LTCG -OPT:REF -SUBSYSTEM:CONSOLE -MANIFESTUAC:NO -OPT:ICF -ERRORREPORT:PROMPT -NOLOGO -TLBID:1 -DEBUG:FULL -WINMD:NO
|
||||
LIBS := WindowsApp.lib
|
||||
endif
|
||||
|
||||
CFLAGS += $(MSVC2017CompileFlags)
|
||||
CXXFLAGS += $(MSVC2017CompileFlags)
|
||||
|
||||
TargetArchMoniker = $(subst $(WinPartition)_,,$(PlatformSuffix))
|
||||
|
||||
CC = cl.exe
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
HAVE_SYS_PARAM = 0
|
||||
|
||||
reg_query = $(call filter_out2,$(subst $2,,$(shell reg query "$2" -v "$1" 2>nul)))
|
||||
fix_path = $(subst $(SPACE),\ ,$(subst \,/,$1))
|
||||
|
||||
ProgramFiles86w := $(shell cmd /c "echo %PROGRAMFILES(x86)%")
|
||||
ProgramFiles86 := $(shell cygpath "$(ProgramFiles86w)")
|
||||
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0)
|
||||
WindowsSdkDir := $(WindowsSdkDir)
|
||||
|
||||
WindowsSDKVersion ?= $(firstword $(foreach folder,$(subst $(subst \,/,$(WindowsSdkDir)Include/),,$(wildcard $(call fix_path,$(WindowsSdkDir)Include\*))),$(if $(wildcard $(call fix_path,$(WindowsSdkDir)Include/$(folder)/um/Windows.h)),$(folder),)))$(BACKSLASH)
|
||||
WindowsSDKVersion := $(WindowsSDKVersion)
|
||||
|
||||
VsInstallBuildTools = $(ProgramFiles86)/Microsoft Visual Studio/2017/BuildTools
|
||||
VsInstallEnterprise = $(ProgramFiles86)/Microsoft Visual Studio/2017/Enterprise
|
||||
VsInstallProfessional = $(ProgramFiles86)/Microsoft Visual Studio/2017/Professional
|
||||
VsInstallCommunity = $(ProgramFiles86)/Microsoft Visual Studio/2017/Community
|
||||
|
||||
VsInstallRoot ?= $(shell if [ -d "$(VsInstallBuildTools)" ]; then echo "$(VsInstallBuildTools)"; fi)
|
||||
ifeq ($(VsInstallRoot), )
|
||||
VsInstallRoot = $(shell if [ -d "$(VsInstallEnterprise)" ]; then echo "$(VsInstallEnterprise)"; fi)
|
||||
endif
|
||||
ifeq ($(VsInstallRoot), )
|
||||
VsInstallRoot = $(shell if [ -d "$(VsInstallProfessional)" ]; then echo "$(VsInstallProfessional)"; fi)
|
||||
endif
|
||||
ifeq ($(VsInstallRoot), )
|
||||
VsInstallRoot = $(shell if [ -d "$(VsInstallCommunity)" ]; then echo "$(VsInstallCommunity)"; fi)
|
||||
endif
|
||||
VsInstallRoot := $(VsInstallRoot)
|
||||
|
||||
VcCompilerToolsVer := $(shell cat "$(VsInstallRoot)/VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt" | grep -o '[0-9\.]*')
|
||||
VcCompilerToolsDir := $(VsInstallRoot)/VC/Tools/MSVC/$(VcCompilerToolsVer)
|
||||
|
||||
WindowsSDKSharedIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\$(WindowsSDKVersion)\shared")
|
||||
WindowsSDKUCRTIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\$(WindowsSDKVersion)\ucrt")
|
||||
WindowsSDKUMIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\$(WindowsSDKVersion)\um")
|
||||
WindowsSDKUCRTLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\$(WindowsSDKVersion)\ucrt\$(TargetArchMoniker)")
|
||||
WindowsSDKUMLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\$(WindowsSDKVersion)\um\$(TargetArchMoniker)")
|
||||
|
||||
# For some reason the HostX86 compiler doesn't like compiling for x64
|
||||
# ("no such file" opening a shared library), and vice-versa.
|
||||
# Work around it for now by using the strictly x86 compiler for x86, and x64 for x64.
|
||||
# NOTE: What about ARM?
|
||||
ifneq (,$(findstring x64,$(TargetArchMoniker)))
|
||||
VCCompilerToolsBinDir := $(VcCompilerToolsDir)\bin\HostX64
|
||||
else
|
||||
VCCompilerToolsBinDir := $(VcCompilerToolsDir)\bin\HostX86
|
||||
endif
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VCCompilerToolsBinDir)/$(TargetArchMoniker)"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VsInstallRoot)/Common7/IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VcCompilerToolsDir)/include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VcCompilerToolsDir)/lib/$(TargetArchMoniker)")
|
||||
ifneq (,$(findstring uwp,$(PlatformSuffix)))
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(LIB)/store")
|
||||
endif
|
||||
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSDKSharedIncludeDir);$(WindowsSDKUCRTIncludeDir);$(WindowsSDKUMIncludeDir)
|
||||
export LIB := $(LIB);$(WindowsSDKUCRTLibDir);$(WindowsSDKUMLibDir)
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
PSS_STYLE :=2
|
||||
LDFLAGS += -DLL
|
||||
|
||||
# Windows MSVC 2010 x86
|
||||
else ifeq ($(platform), windows_msvc2010_x86)
|
||||
CC = cl.exe
|
||||
@ -309,18 +419,17 @@ else ifeq ($(platform), windows_msvc2010_x86)
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/lib")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include")
|
||||
|
||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib
|
||||
|
||||
WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
|
||||
WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/include")
|
||||
|
||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
|
||||
|
||||
WindowsSdkDirInc := $(WindowsSdkDir)Include
|
||||
WindowsSdkDirInc ?= $(WindowsSdkDir)Include
|
||||
|
||||
INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)"
|
||||
export INCLUDE := $(INCLUDE)
|
||||
export LIB := $(LIB);$(WindowsSdkDir)
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\Lib
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
PSS_STYLE :=2
|
||||
LDFLAGS += -DLL
|
||||
@ -347,6 +456,29 @@ PSS_STYLE :=2
|
||||
LDFLAGS += -DLL
|
||||
CFLAGS += -D_CRT_SECURE_NO_DEPRECATE
|
||||
LIBS =
|
||||
|
||||
# Windows MSVC 2003 x86
|
||||
else ifeq ($(platform), windows_msvc2003_x86)
|
||||
CC = cl.exe
|
||||
CXX = cl.exe
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS71COMNTOOLS)../../Vc7/lib")
|
||||
BIN := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin")
|
||||
|
||||
WindowsSdkDir := $(INETSDK)
|
||||
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)/Include;src/drivers/libretro/msvc/msvc-2005
|
||||
export LIB := $(LIB);$(WindowsSdkDir);$(INETSDK)/Lib
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
PSS_STYLE :=2
|
||||
LDFLAGS += -DLL
|
||||
HAVE_SYS_PARAM = 0
|
||||
CFLAGS += -D_CRT_SECURE_NO_DEPRECATE
|
||||
LIBS =
|
||||
|
||||
# Windows
|
||||
else
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
@ -494,3 +626,6 @@ clean:
|
||||
|
||||
.PHONY: clean clean-objs
|
||||
endif
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
|
33
appveyor.yml
Normal file
33
appveyor.yml
Normal file
@ -0,0 +1,33 @@
|
||||
version: 0.1.{build}
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
image: Visual Studio 2017
|
||||
|
||||
environment:
|
||||
makefile_location: "."
|
||||
makefile_name: makefile.libretro
|
||||
target_name: genesis_plus_gx
|
||||
|
||||
configuration:
|
||||
- release
|
||||
|
||||
platform:
|
||||
- windows_msvc2017_uwp_x64
|
||||
- windows_msvc2017_uwp_x86
|
||||
- windows_msvc2017_uwp_arm
|
||||
- windows_msvc2017_desktop_x64
|
||||
- windows_msvc2017_desktop_x86
|
||||
|
||||
init:
|
||||
- set Path=C:\msys64\usr\bin;%Path%
|
||||
|
||||
build_script:
|
||||
- cd %makefile_location%
|
||||
- make -f %makefile_name% platform=%platform%
|
||||
|
||||
artifacts:
|
||||
- path: '**\%target_name%*.dll'
|
||||
- path: '**\%target_name%*.lib'
|
||||
- path: '**\%target_name%*.pdb'
|
||||
- path: '**\libretro.h'
|
@ -56,7 +56,11 @@ SOURCES_C += $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c))
|
||||
ifneq ($(STATIC_LINKING), 1)
|
||||
SOURCES_C += \
|
||||
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
|
||||
$(LIBRETRO_COMM_DIR)/streams/file_stream_transforms.c
|
||||
$(LIBRETRO_COMM_DIR)/streams/file_stream_transforms.c \
|
||||
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
|
||||
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
|
||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
|
||||
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c
|
||||
|
||||
SOURCES_C += $(CHDLIBDIR)/deps/zlib/adler32.c \
|
||||
$(CHDLIBDIR)/deps/zlib/inffast.c \
|
||||
|
@ -1,40 +1,29 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
GIT_VERSION ?= " $(shell git rev-parse --short HEAD || echo unknown)"
|
||||
ifneq ($(GIT_VERSION)," unknown")
|
||||
LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
||||
endif
|
||||
CORE_DIR := $(LOCAL_PATH)/../..
|
||||
TREMOR_SRC_DIR := $(CORE_DIR)/core/tremor
|
||||
|
||||
SOURCES_C :=
|
||||
WANT_CRC32 := 1
|
||||
HAVE_CHD := 1
|
||||
HAVE_CHD := 1
|
||||
|
||||
CORE_DIR := ../..
|
||||
include $(CORE_DIR)/libretro/Makefile.common
|
||||
|
||||
TREMOR_SRC_DIR := $(CORE_DIR)/core/tremor
|
||||
LIBRETRO_DIR := ..
|
||||
|
||||
LOCAL_MODULE := retro
|
||||
COREFLAGS := -ffast-math -funroll-loops -DINLINE="static inline" -DUSE_LIBTREMOR -DUSE_16BPP_RENDERING -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DALIGN_LONG -DALIGN_WORD -DM68K_OVERCLOCK_SHIFT=20 -DZ80_OVERCLOCK_SHIFT=20 -DUSE_LIBCHDR -DPACKAGE_VERSION=\"1.3.2\" -DFLAC_API_EXPORTS -DFLAC__HAS_OGG=0 -DHAVE_LROUND -DHAVE_STDINT_H -D_7ZIP_ST -DHAVE_SYS_PARAM_H $(INCFLAGS)
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
LOCAL_CFLAGS += -DANDROID_ARM -D_ARM_ASSEM_
|
||||
LOCAL_ARM_MODE := arm
|
||||
COREFLAGS += -D_ARM_ASSEM_
|
||||
endif
|
||||
|
||||
include $(LIBRETRO_DIR)/Makefile.common
|
||||
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
|
||||
ifneq ($(GIT_VERSION)," unknown")
|
||||
COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := retro
|
||||
LOCAL_SRC_FILES := $(SOURCES_C)
|
||||
|
||||
LOCAL_C_INCLUDES = $(foreach dir,$(GENPLUS_SRC_DIR),$(LOCAL_PATH)/$(dir)) \
|
||||
$(CORE_DIR)/libretro/libretro-common/include \
|
||||
$(LOCAL_PATH)/$(TREMOR_SRC_DIR) \
|
||||
$(LOCAL_PATH)/$(LIBRETRO_DIR) \
|
||||
$(CHDLIBDIR)/src \
|
||||
$(CHDLIBDIR)/deps/libFLAC/include \
|
||||
$(CHDLIBDIR)/deps/lzma \
|
||||
$(CHDLIBDIR)/deps/zlib
|
||||
|
||||
LOCAL_CFLAGS += -ffast-math -O2 -funroll-loops -DINLINE="static inline" -DUSE_LIBTREMOR -DUSE_16BPP_RENDERING -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DALIGN_LONG -DALIGN_WORD -DM68K_OVERCLOCK_SHIFT=20 -DZ80_OVERCLOCK_SHIFT=20 -DUSE_LIBCHDR -DPACKAGE_VERSION=\"1.3.2\" -DFLAC_API_EXPORTS -DFLAC__HAS_OGG=0 -DHAVE_LROUND -DHAVE_STDINT_H -D_7ZIP_ST -DHAVE_SYS_PARAM_H
|
||||
|
||||
LOCAL_CFLAGS := $(COREFLAGS)
|
||||
LOCAL_LDFLAGS := -Wl,-version-script=$(LIBRETRO_DIR)/link.T
|
||||
LOCAL_ARM_MODE := arm
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
69
libretro/libretro-common/compat/compat_strl.c
Normal file
69
libretro/libretro-common/compat/compat_strl.c
Normal file
@ -0,0 +1,69 @@
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (compat_strl.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <compat/strl.h>
|
||||
|
||||
/* Implementation of strlcpy()/strlcat() based on OpenBSD. */
|
||||
|
||||
#ifndef __MACH__
|
||||
|
||||
size_t strlcpy(char *dest, const char *source, size_t size)
|
||||
{
|
||||
size_t src_size = 0;
|
||||
size_t n = size;
|
||||
|
||||
if (n)
|
||||
while (--n && (*dest++ = *source++)) src_size++;
|
||||
|
||||
if (!n)
|
||||
{
|
||||
if (size) *dest = '\0';
|
||||
while (*source++) src_size++;
|
||||
}
|
||||
|
||||
return src_size;
|
||||
}
|
||||
|
||||
size_t strlcat(char *dest, const char *source, size_t size)
|
||||
{
|
||||
size_t len = strlen(dest);
|
||||
|
||||
dest += len;
|
||||
|
||||
if (len > size)
|
||||
size = 0;
|
||||
else
|
||||
size -= len;
|
||||
|
||||
return len + strlcpy(dest, source, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
char *strldup(const char *s, size_t n)
|
||||
{
|
||||
char *dst = (char*)malloc(sizeof(char) * (n + 1));
|
||||
strlcpy(dst, s, n);
|
||||
return dst;
|
||||
}
|
60
libretro/libretro-common/compat/fopen_utf8.c
Normal file
60
libretro/libretro-common/compat/fopen_utf8.c
Normal file
@ -0,0 +1,60 @@
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (fopen_utf8.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <compat/fopen_utf8.h>
|
||||
#include <encodings/utf.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX)
|
||||
#ifndef LEGACY_WIN32
|
||||
#define LEGACY_WIN32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#undef fopen
|
||||
|
||||
void *fopen_utf8(const char * filename, const char * mode)
|
||||
{
|
||||
#if defined(_XBOX)
|
||||
return fopen(filename, mode);
|
||||
#elif defined(LEGACY_WIN32)
|
||||
FILE *ret = NULL;
|
||||
char * filename_local = utf8_to_local_string_alloc(filename);
|
||||
|
||||
if (!filename_local)
|
||||
return NULL;
|
||||
ret = fopen(filename_local, mode);
|
||||
if (filename_local)
|
||||
free(filename_local);
|
||||
return ret;
|
||||
#else
|
||||
wchar_t * filename_w = utf8_to_utf16_string_alloc(filename);
|
||||
wchar_t * mode_w = utf8_to_utf16_string_alloc(mode);
|
||||
FILE* ret = _wfopen(filename_w, mode_w);
|
||||
free(filename_w);
|
||||
free(mode_w);
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
#endif
|
516
libretro/libretro-common/encodings/encoding_utf.c
Normal file
516
libretro/libretro-common/encodings/encoding_utf.c
Normal file
@ -0,0 +1,516 @@
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (encoding_utf.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <compat/strl.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#include <windows.h>
|
||||
#elif defined(_XBOX)
|
||||
#include <xtl.h>
|
||||
#endif
|
||||
|
||||
static unsigned leading_ones(uint8_t c)
|
||||
{
|
||||
unsigned ones = 0;
|
||||
while (c & 0x80)
|
||||
{
|
||||
ones++;
|
||||
c <<= 1;
|
||||
}
|
||||
|
||||
return ones;
|
||||
}
|
||||
|
||||
/* Simple implementation. Assumes the sequence is
|
||||
* properly synchronized and terminated. */
|
||||
|
||||
size_t utf8_conv_utf32(uint32_t *out, size_t out_chars,
|
||||
const char *in, size_t in_size)
|
||||
{
|
||||
unsigned i;
|
||||
size_t ret = 0;
|
||||
while (in_size && out_chars)
|
||||
{
|
||||
unsigned extra, shift;
|
||||
uint32_t c;
|
||||
uint8_t first = *in++;
|
||||
unsigned ones = leading_ones(first);
|
||||
|
||||
if (ones > 6 || ones == 1) /* Invalid or desync. */
|
||||
break;
|
||||
|
||||
extra = ones ? ones - 1 : ones;
|
||||
if (1 + extra > in_size) /* Overflow. */
|
||||
break;
|
||||
|
||||
shift = (extra - 1) * 6;
|
||||
c = (first & ((1 << (7 - ones)) - 1)) << (6 * extra);
|
||||
|
||||
for (i = 0; i < extra; i++, in++, shift -= 6)
|
||||
c |= (*in & 0x3f) << shift;
|
||||
|
||||
*out++ = c;
|
||||
in_size -= 1 + extra;
|
||||
out_chars--;
|
||||
ret++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool utf16_conv_utf8(uint8_t *out, size_t *out_chars,
|
||||
const uint16_t *in, size_t in_size)
|
||||
{
|
||||
static uint8_t kUtf8Limits[5] = { 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
|
||||
size_t out_pos = 0;
|
||||
size_t in_pos = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
unsigned numAdds;
|
||||
uint32_t value;
|
||||
|
||||
if (in_pos == in_size)
|
||||
{
|
||||
*out_chars = out_pos;
|
||||
return true;
|
||||
}
|
||||
value = in[in_pos++];
|
||||
if (value < 0x80)
|
||||
{
|
||||
if (out)
|
||||
out[out_pos] = (char)value;
|
||||
out_pos++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (value >= 0xD800 && value < 0xE000)
|
||||
{
|
||||
uint32_t c2;
|
||||
|
||||
if (value >= 0xDC00 || in_pos == in_size)
|
||||
break;
|
||||
c2 = in[in_pos++];
|
||||
if (c2 < 0xDC00 || c2 >= 0xE000)
|
||||
break;
|
||||
value = (((value - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000;
|
||||
}
|
||||
|
||||
for (numAdds = 1; numAdds < 5; numAdds++)
|
||||
if (value < (((uint32_t)1) << (numAdds * 5 + 6)))
|
||||
break;
|
||||
if (out)
|
||||
out[out_pos] = (char)(kUtf8Limits[numAdds - 1]
|
||||
+ (value >> (6 * numAdds)));
|
||||
out_pos++;
|
||||
do
|
||||
{
|
||||
numAdds--;
|
||||
if (out)
|
||||
out[out_pos] = (char)(0x80
|
||||
+ ((value >> (6 * numAdds)) & 0x3F));
|
||||
out_pos++;
|
||||
}while (numAdds != 0);
|
||||
}
|
||||
|
||||
*out_chars = out_pos;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Acts mostly like strlcpy.
|
||||
*
|
||||
* Copies the given number of UTF-8 characters,
|
||||
* but at most d_len bytes.
|
||||
*
|
||||
* Always NULL terminates.
|
||||
* Does not copy half a character.
|
||||
*
|
||||
* Returns number of bytes. 's' is assumed valid UTF-8.
|
||||
* Use only if 'chars' is considerably less than 'd_len'. */
|
||||
size_t utf8cpy(char *d, size_t d_len, const char *s, size_t chars)
|
||||
{
|
||||
const uint8_t *sb = (const uint8_t*)s;
|
||||
const uint8_t *sb_org = sb;
|
||||
|
||||
if (!s)
|
||||
return 0;
|
||||
|
||||
while (*sb && chars-- > 0)
|
||||
{
|
||||
sb++;
|
||||
while ((*sb & 0xC0) == 0x80) sb++;
|
||||
}
|
||||
|
||||
if ((size_t)(sb - sb_org) > d_len-1 /* NUL */)
|
||||
{
|
||||
sb = sb_org + d_len-1;
|
||||
while ((*sb & 0xC0) == 0x80) sb--;
|
||||
}
|
||||
|
||||
memcpy(d, sb_org, sb-sb_org);
|
||||
d[sb-sb_org] = '\0';
|
||||
|
||||
return sb-sb_org;
|
||||
}
|
||||
|
||||
const char *utf8skip(const char *str, size_t chars)
|
||||
{
|
||||
const uint8_t *strb = (const uint8_t*)str;
|
||||
if (!chars)
|
||||
return str;
|
||||
do
|
||||
{
|
||||
strb++;
|
||||
while ((*strb & 0xC0)==0x80) strb++;
|
||||
chars--;
|
||||
} while(chars);
|
||||
return (const char*)strb;
|
||||
}
|
||||
|
||||
size_t utf8len(const char *string)
|
||||
{
|
||||
size_t ret = 0;
|
||||
|
||||
if (!string)
|
||||
return 0;
|
||||
|
||||
while (*string)
|
||||
{
|
||||
if ((*string & 0xC0) != 0x80)
|
||||
ret++;
|
||||
string++;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uint8_t utf8_walkbyte(const char **string)
|
||||
{
|
||||
return *((*string)++);
|
||||
}
|
||||
|
||||
/* Does not validate the input, returns garbage if it's not UTF-8. */
|
||||
uint32_t utf8_walk(const char **string)
|
||||
{
|
||||
uint8_t first = utf8_walkbyte(string);
|
||||
uint32_t ret = 0;
|
||||
|
||||
if (first < 128)
|
||||
return first;
|
||||
|
||||
ret = (ret << 6) | (utf8_walkbyte(string) & 0x3F);
|
||||
if (first >= 0xE0)
|
||||
ret = (ret << 6) | (utf8_walkbyte(string) & 0x3F);
|
||||
if (first >= 0xF0)
|
||||
ret = (ret << 6) | (utf8_walkbyte(string) & 0x3F);
|
||||
|
||||
if (first >= 0xF0)
|
||||
return ret | (first & 7) << 18;
|
||||
if (first >= 0xE0)
|
||||
return ret | (first & 15) << 12;
|
||||
return ret | (first & 31) << 6;
|
||||
}
|
||||
|
||||
static bool utf16_to_char(uint8_t **utf_data,
|
||||
size_t *dest_len, const uint16_t *in)
|
||||
{
|
||||
unsigned len = 0;
|
||||
|
||||
while (in[len] != '\0')
|
||||
len++;
|
||||
|
||||
utf16_conv_utf8(NULL, dest_len, in, len);
|
||||
*dest_len += 1;
|
||||
*utf_data = (uint8_t*)malloc(*dest_len);
|
||||
if (*utf_data == 0)
|
||||
return false;
|
||||
|
||||
return utf16_conv_utf8(*utf_data, dest_len, in, len);
|
||||
}
|
||||
|
||||
bool utf16_to_char_string(const uint16_t *in, char *s, size_t len)
|
||||
{
|
||||
size_t dest_len = 0;
|
||||
uint8_t *utf16_data = NULL;
|
||||
bool ret = utf16_to_char(&utf16_data, &dest_len, in);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
utf16_data[dest_len] = 0;
|
||||
strlcpy(s, (const char*)utf16_data, len);
|
||||
}
|
||||
|
||||
free(utf16_data);
|
||||
utf16_data = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Returned pointer MUST be freed by the caller if non-NULL. */
|
||||
static char* mb_to_mb_string_alloc(const char *str,
|
||||
enum CodePage cp_in, enum CodePage cp_out)
|
||||
{
|
||||
char *path_buf = NULL;
|
||||
wchar_t *path_buf_wide = NULL;
|
||||
int path_buf_len = 0;
|
||||
int path_buf_wide_len = 0;
|
||||
|
||||
if (!str || !*str)
|
||||
return NULL;
|
||||
|
||||
(void)path_buf;
|
||||
(void)path_buf_wide;
|
||||
(void)path_buf_len;
|
||||
(void)path_buf_wide_len;
|
||||
|
||||
#if !defined(_WIN32) || defined(_XBOX)
|
||||
/* assume string needs no modification if not on Windows */
|
||||
return strdup(str);
|
||||
#else
|
||||
#ifdef UNICODE
|
||||
/* TODO/FIXME: Not implemented. */
|
||||
return strdup(str);
|
||||
#else
|
||||
|
||||
/* Windows 95 will return 0 from these functions with a UTF8 codepage set without MSLU. From an unknown MSDN version (others omit this info):
|
||||
* - CP_UTF8 Windows 98/Me, Windows NT 4.0 and later: Translate using UTF-8. When this is set, dwFlags must be zero.
|
||||
* - Windows 95: Under the Microsoft Layer for Unicode, MultiByteToWideChar also supports CP_UTF7 and CP_UTF8.
|
||||
*/
|
||||
path_buf_wide_len = MultiByteToWideChar(cp_in, 0, str, -1, NULL, 0);
|
||||
|
||||
if (path_buf_wide_len)
|
||||
{
|
||||
path_buf_wide = (wchar_t*)
|
||||
calloc(path_buf_wide_len + sizeof(wchar_t), sizeof(wchar_t));
|
||||
|
||||
if (path_buf_wide)
|
||||
{
|
||||
MultiByteToWideChar(cp_in, 0,
|
||||
str, -1, path_buf_wide, path_buf_wide_len);
|
||||
|
||||
if (*path_buf_wide)
|
||||
{
|
||||
path_buf_len = WideCharToMultiByte(cp_out, 0,
|
||||
path_buf_wide, -1, NULL, 0, NULL, NULL);
|
||||
|
||||
if (path_buf_len)
|
||||
{
|
||||
path_buf = (char*)
|
||||
calloc(path_buf_len + sizeof(char), sizeof(char));
|
||||
|
||||
if (path_buf)
|
||||
{
|
||||
WideCharToMultiByte(cp_out, 0,
|
||||
path_buf_wide, -1, path_buf,
|
||||
path_buf_len, NULL, NULL);
|
||||
|
||||
free(path_buf_wide);
|
||||
|
||||
if (*path_buf)
|
||||
return path_buf;
|
||||
|
||||
free(path_buf);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
free(path_buf_wide);
|
||||
return strdup(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return strdup(str);
|
||||
|
||||
if (path_buf_wide)
|
||||
free(path_buf_wide);
|
||||
|
||||
return NULL;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Returned pointer MUST be freed by the caller if non-NULL. */
|
||||
char* utf8_to_local_string_alloc(const char *str)
|
||||
{
|
||||
return mb_to_mb_string_alloc(str, CODEPAGE_UTF8, CODEPAGE_LOCAL);
|
||||
}
|
||||
|
||||
/* Returned pointer MUST be freed by the caller if non-NULL. */
|
||||
char* local_to_utf8_string_alloc(const char *str)
|
||||
{
|
||||
return mb_to_mb_string_alloc(str, CODEPAGE_LOCAL, CODEPAGE_UTF8);
|
||||
}
|
||||
|
||||
/* Returned pointer MUST be freed by the caller if non-NULL. */
|
||||
wchar_t* utf8_to_utf16_string_alloc(const char *str)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
int len = 0;
|
||||
int out_len = 0;
|
||||
#else
|
||||
size_t len = 0;
|
||||
size_t out_len = 0;
|
||||
#endif
|
||||
wchar_t *buf = NULL;
|
||||
|
||||
if (!str || !*str)
|
||||
return NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
|
||||
|
||||
if (len)
|
||||
{
|
||||
buf = (wchar_t*)calloc(len, sizeof(wchar_t));
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
out_len = MultiByteToWideChar(CP_UTF8, 0, str, -1, buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* fallback to ANSI codepage instead */
|
||||
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
|
||||
if (len)
|
||||
{
|
||||
buf = (wchar_t*)calloc(len, sizeof(wchar_t));
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
out_len = MultiByteToWideChar(CP_ACP, 0, str, -1, buf, len);
|
||||
}
|
||||
}
|
||||
|
||||
if (out_len < 0)
|
||||
{
|
||||
free(buf);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
/* NOTE: For now, assume non-Windows platforms' locale is already UTF-8. */
|
||||
len = mbstowcs(NULL, str, 0) + 1;
|
||||
|
||||
if (len)
|
||||
{
|
||||
buf = (wchar_t*)calloc(len, sizeof(wchar_t));
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
out_len = mbstowcs(buf, str, len);
|
||||
}
|
||||
|
||||
if (out_len == (size_t)-1)
|
||||
{
|
||||
free(buf);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* Returned pointer MUST be freed by the caller if non-NULL. */
|
||||
char* utf16_to_utf8_string_alloc(const wchar_t *str)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
int len = 0;
|
||||
int out_len = 0;
|
||||
#else
|
||||
size_t len = 0;
|
||||
size_t out_len = 0;
|
||||
#endif
|
||||
char *buf = NULL;
|
||||
|
||||
if (!str || !*str)
|
||||
return NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
len = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
|
||||
if (len)
|
||||
{
|
||||
buf = (char*)calloc(len, sizeof(char));
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
out_len = WideCharToMultiByte(CP_UTF8, 0, str, -1, buf, len, NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* fallback to ANSI codepage instead */
|
||||
len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
|
||||
if (len)
|
||||
{
|
||||
buf = (char*)calloc(len, sizeof(char));
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
out_len = WideCharToMultiByte(CP_ACP, 0, str, -1, buf, len, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (out_len < 0)
|
||||
{
|
||||
free(buf);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
/* NOTE: For now, assume non-Windows platforms' locale is already UTF-8. */
|
||||
len = wcstombs(NULL, str, 0) + 1;
|
||||
|
||||
if (len)
|
||||
{
|
||||
buf = (char*)calloc(len, sizeof(char));
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
out_len = wcstombs(buf, str, len);
|
||||
}
|
||||
|
||||
if (out_len == (size_t)-1)
|
||||
{
|
||||
free(buf);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return buf;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (boolean.h).
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#if defined(_MSC_VER) && !defined(SN_TARGET_PS3)
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined(SN_TARGET_PS3)
|
||||
/* Hack applied for MSVC when compiling in C89 mode as it isn't C99 compliant. */
|
||||
#define bool unsigned char
|
||||
#define true 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (apple_compat.h).
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (fnmatch.h).
|
||||
|
34
libretro/libretro-common/include/compat/fopen_utf8.h
Normal file
34
libretro/libretro-common/include/compat/fopen_utf8.h
Normal file
@ -0,0 +1,34 @@
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (fopen_utf8.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H
|
||||
#define __LIBRETRO_SDK_COMPAT_FOPEN_UTF8_H
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Defined to error rather than fopen_utf8, to make it clear to everyone reading the code that not worrying about utf16 is fine */
|
||||
/* TODO: enable */
|
||||
/* #define fopen (use fopen_utf8 instead) */
|
||||
void *fopen_utf8(const char * filename, const char * mode);
|
||||
#else
|
||||
#define fopen_utf8 fopen
|
||||
#endif
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (getopt.h).
|
||||
@ -28,13 +28,13 @@
|
||||
#endif
|
||||
|
||||
/* Custom implementation of the GNU getopt_long for portability.
|
||||
* Not designed to be fully compatible, but compatible with
|
||||
* Not designed to be fully compatible, but compatible with
|
||||
* the features RetroArch uses. */
|
||||
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
/* Avoid possible naming collisions during link since we
|
||||
/* Avoid possible naming collisions during link since we
|
||||
* prefer to use the actual name. */
|
||||
#define getopt_long(argc, argv, optstring, longopts, longindex) __getopt_long_retro(argc, argv, optstring, longopts, longindex)
|
||||
|
||||
@ -51,7 +51,7 @@ struct option
|
||||
};
|
||||
|
||||
/* argv[] is declared with char * const argv[] in GNU,
|
||||
* but this makes no sense, as non-POSIX getopt_long
|
||||
* but this makes no sense, as non-POSIX getopt_long
|
||||
* mutates argv (non-opts are moved to the end). */
|
||||
int getopt_long(int argc, char *argv[],
|
||||
const char *optstring, const struct option *longopts, int *longindex);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (intrinsics.h).
|
||||
@ -61,12 +61,12 @@ static INLINE int compat_ctz(unsigned x)
|
||||
{
|
||||
#if defined(__GNUC__) && !defined(RARCH_CONSOLE)
|
||||
return __builtin_ctz(x);
|
||||
#elif _MSC_VER >= 1400
|
||||
#elif _MSC_VER >= 1400 && !defined(_XBOX)
|
||||
unsigned long r = 0;
|
||||
_BitScanReverse((unsigned long*)&r, x);
|
||||
return (int)r;
|
||||
#else
|
||||
/* Only checks at nibble granularity,
|
||||
/* Only checks at nibble granularity,
|
||||
* because that's what we need. */
|
||||
if (x & 0x000f)
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (msvc.h).
|
||||
@ -35,12 +35,12 @@ extern "C" {
|
||||
#ifndef snprintf
|
||||
#define snprintf c99_snprintf_retro__
|
||||
#endif
|
||||
|
||||
|
||||
int c99_snprintf_retro__(char *outBuf, size_t size, const char *format, ...);
|
||||
#endif
|
||||
|
||||
/* Pre-MSVC 2010 compilers don't implement vsnprintf in a cross-platform manner? Not sure about this one. */
|
||||
#if _MSC_VER < 1600
|
||||
#if _MSC_VER < 1600
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#ifndef vsnprintf
|
||||
@ -86,9 +86,33 @@ typedef int ssize_t;
|
||||
#pragma warning(disable : 4723)
|
||||
#pragma warning(disable : 4996)
|
||||
|
||||
/* roundf is available since MSVC 2013 */
|
||||
/* roundf and va_copy is available since MSVC 2013 */
|
||||
#if _MSC_VER < 1800
|
||||
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
|
||||
#define va_copy(x, y) ((x) = (y))
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1310
|
||||
#ifndef __cplusplus
|
||||
/* VC6 math.h doesn't define some functions when in C mode.
|
||||
* Trying to define a prototype gives "undefined reference".
|
||||
* But providing an implementation then gives "function already has body".
|
||||
* So the equivalent of the implementations from math.h are used as
|
||||
* defines here instead, and it seems to work.
|
||||
*/
|
||||
#define cosf(x) ((float)cos((double)x))
|
||||
#define powf(x, y) ((float)pow((double)x, (double)y))
|
||||
#define sinf(x) ((float)sin((double)x))
|
||||
#define ceilf(x) ((float)ceil((double)x))
|
||||
#define floorf(x) ((float)floor((double)x))
|
||||
#define sqrtf(x) ((float)sqrt((double)x))
|
||||
#define fabsf(x) ((float)fabs((double)(x)))
|
||||
#endif
|
||||
|
||||
#ifndef _strtoui64
|
||||
#define _strtoui64(x, y, z) (_atoi64(x))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (posix_string.h).
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (strcasestr.h).
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/* Avoid possible naming collisions during link
|
||||
/* Avoid possible naming collisions during link
|
||||
* since we prefer to use the actual name. */
|
||||
#define strcasestr(haystack, needle) strcasestr_retro__(haystack, needle)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (strl.h).
|
||||
@ -26,7 +26,7 @@
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if defined(RARCH_INTERNAL) && defined(HAVE_CONFIG_H)
|
||||
#include "../../../config.h"
|
||||
#endif
|
||||
|
||||
@ -41,7 +41,7 @@ RETRO_BEGIN_DECLS
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRL
|
||||
/* Avoid possible naming collisions during link since
|
||||
/* Avoid possible naming collisions during link since
|
||||
* we prefer to use the actual name. */
|
||||
#define strlcpy(dst, src, size) strlcpy_retro__(dst, src, size)
|
||||
|
||||
@ -52,6 +52,8 @@ size_t strlcat(char *dest, const char *source, size_t size);
|
||||
|
||||
#endif
|
||||
|
||||
char *strldup(const char *s, size_t n);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
67
libretro/libretro-common/include/encodings/utf.h
Normal file
67
libretro/libretro-common/include/encodings/utf.h
Normal file
@ -0,0 +1,67 @@
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (utf.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRETRO_ENCODINGS_UTF_H
|
||||
#define _LIBRETRO_ENCODINGS_UTF_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum CodePage
|
||||
{
|
||||
CODEPAGE_LOCAL = 0, /* CP_ACP */
|
||||
CODEPAGE_UTF8 = 65001 /* CP_UTF8 */
|
||||
};
|
||||
|
||||
size_t utf8_conv_utf32(uint32_t *out, size_t out_chars,
|
||||
const char *in, size_t in_size);
|
||||
|
||||
bool utf16_conv_utf8(uint8_t *out, size_t *out_chars,
|
||||
const uint16_t *in, size_t in_size);
|
||||
|
||||
size_t utf8len(const char *string);
|
||||
|
||||
size_t utf8cpy(char *d, size_t d_len, const char *s, size_t chars);
|
||||
|
||||
const char *utf8skip(const char *str, size_t chars);
|
||||
|
||||
uint32_t utf8_walk(const char **string);
|
||||
|
||||
bool utf16_to_char_string(const uint16_t *in, char *s, size_t len);
|
||||
|
||||
char* utf8_to_local_string_alloc(const char *str);
|
||||
|
||||
char* local_to_utf8_string_alloc(const char *str);
|
||||
|
||||
wchar_t* utf8_to_utf16_string_alloc(const char *str);
|
||||
|
||||
char* utf16_to_utf8_string_alloc(const wchar_t *str);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (memmap.h).
|
||||
@ -23,7 +23,10 @@
|
||||
#ifndef _LIBRETRO_MEMMAP_H
|
||||
#define _LIBRETRO_MEMMAP_H
|
||||
|
||||
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU)
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__CELLOS_LV2__) || defined(PSP) || defined(GEKKO) || defined(VITA) || defined(_XBOX) || defined(_3DS) || defined(WIIU) || defined(SWITCH)
|
||||
/* No mman available */
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
#include <windows.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (retro_common.h).
|
||||
@ -26,7 +26,7 @@
|
||||
/*
|
||||
This file is designed to normalize the libretro-common compiling environment.
|
||||
It is not to be used in public API headers, as they should be designed as leanly as possible.
|
||||
Nonetheless.. in the meantime, if you do something like use ssize_t, which is not fully portable,
|
||||
Nonetheless.. in the meantime, if you do something like use ssize_t, which is not fully portable,
|
||||
in a public API, you may need this.
|
||||
*/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (retro_common_api.h).
|
||||
@ -25,14 +25,14 @@
|
||||
|
||||
/*
|
||||
This file is designed to normalize the libretro-common compiling environment
|
||||
for public API headers. This should be leaner than a normal compiling environment,
|
||||
for public API headers. This should be leaner than a normal compiling environment,
|
||||
since it gets #included into other project's sources.
|
||||
*/
|
||||
|
||||
/* ------------------------------------ */
|
||||
|
||||
/*
|
||||
Ordinarily we want to put #ifdef __cplusplus extern "C" in C library
|
||||
Ordinarily we want to put #ifdef __cplusplus extern "C" in C library
|
||||
headers to enable them to get used by c++ sources.
|
||||
However, we want to support building this library as C++ as well, so a
|
||||
special technique is called for.
|
||||
@ -75,19 +75,29 @@ typedef int ssize_t;
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define STRING_REP_INT64 "%I64u"
|
||||
#define STRING_REP_UINT64 "%I64u"
|
||||
#define STRING_REP_ULONG "%Iu"
|
||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA) && !defined(WIIU)
|
||||
#define STRING_REP_INT64 "%llu"
|
||||
#define STRING_REP_UINT64 "%llu"
|
||||
#define STRING_REP_ULONG "%zu"
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER >= 1800
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#define STRING_REP_INT64 "%llu"
|
||||
#define STRING_REP_UINT64 "%llu"
|
||||
#define STRING_REP_ULONG "%lu"
|
||||
#ifndef PRId64
|
||||
#define PRId64 "I64d"
|
||||
#define PRIu64 "I64u"
|
||||
#define PRIuPTR "Iu"
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
/* C++11 says this one isn't needed, but apparently (some versions of) mingw require it anyways */
|
||||
/* https://stackoverflow.com/questions/8132399/how-to-printf-uint64-t-fails-with-spurious-trailing-in-format */
|
||||
/* https://github.com/libretro/RetroArch/issues/6009 */
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#ifndef PRId64
|
||||
#error "inttypes.h is being screwy"
|
||||
#endif
|
||||
#define STRING_REP_INT64 "%" PRId64
|
||||
#define STRING_REP_UINT64 "%" PRIu64
|
||||
#define STRING_REP_USIZE "%" PRIuPTR
|
||||
|
||||
/*
|
||||
I would like to see retro_inline.h moved in here; possibly boolean too.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (retro_inline.h).
|
||||
|
@ -1,116 +0,0 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (retro_miscellaneous.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __RARCH_MISCELLANEOUS_H
|
||||
#define __RARCH_MISCELLANEOUS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)
|
||||
#include <sys/timer.h>
|
||||
#elif defined(XENON)
|
||||
#include <time/time.h>
|
||||
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(__QNX__)
|
||||
#include <unistd.h>
|
||||
#elif defined(WIIU)
|
||||
#include <wiiu/os/thread.h>
|
||||
#elif defined(PSP)
|
||||
#include <pspthreadman.h>
|
||||
#elif defined(VITA)
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
#elif defined(_3DS)
|
||||
#include <3ds.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#elif defined(_WIN32) && defined(_XBOX)
|
||||
#include <Xtl.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <compat/msvc.h>
|
||||
#endif
|
||||
#include <retro_inline.h>
|
||||
|
||||
#ifndef PATH_MAX_LENGTH
|
||||
#if defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(GEKKO)|| defined(WIIU)
|
||||
#define PATH_MAX_LENGTH 512
|
||||
#else
|
||||
#define PATH_MAX_LENGTH 4096
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
#if !defined(_MSC_VER) && !defined(USE_MATH_DEFINES)
|
||||
#define M_PI 3.14159265358979323846264338327
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
/* Helper macros and struct to keep track of many booleans.
|
||||
* To check for multiple bits, use &&, not &.
|
||||
* For OR, | can be used. */
|
||||
typedef struct
|
||||
{
|
||||
uint32_t data[8];
|
||||
} retro_bits_t;
|
||||
|
||||
#define BIT_SET(a, bit) ((a)[(bit) >> 3] |= (1 << ((bit) & 7)))
|
||||
#define BIT_CLEAR(a, bit) ((a)[(bit) >> 3] &= ~(1 << ((bit) & 7)))
|
||||
#define BIT_GET(a, bit) ((a)[(bit) >> 3] & (1 << ((bit) & 7)))
|
||||
|
||||
#define BIT16_SET(a, bit) ((a) |= (1 << ((bit) & 15)))
|
||||
#define BIT16_CLEAR(a, bit) ((a) &= ~(1 << ((bit) & 15)))
|
||||
#define BIT16_GET(a, bit) (!!((a) & (1 << ((bit) & 15))))
|
||||
#define BIT16_CLEAR_ALL(a) ((a) = 0)
|
||||
|
||||
#define BIT32_SET(a, bit) ((a) |= (1 << ((bit) & 31)))
|
||||
#define BIT32_CLEAR(a, bit) ((a) &= ~(1 << ((bit) & 31)))
|
||||
#define BIT32_GET(a, bit) (!!((a) & (1 << ((bit) & 31))))
|
||||
#define BIT32_CLEAR_ALL(a) ((a) = 0)
|
||||
|
||||
#define BIT64_SET(a, bit) ((a) |= (UINT64_C(1) << ((bit) & 63)))
|
||||
#define BIT64_CLEAR(a, bit) ((a) &= ~(UINT64_C(1) << ((bit) & 63)))
|
||||
#define BIT64_GET(a, bit) (!!((a) & (UINT64_C(1) << ((bit) & 63))))
|
||||
#define BIT64_CLEAR_ALL(a) ((a) = 0)
|
||||
|
||||
#define BIT128_SET(a, bit) ((a).data[(bit) >> 5] |= (1 << ((bit) & 31)))
|
||||
#define BIT128_CLEAR(a, bit) ((a).data[(bit) >> 5] &= ~(1 << ((bit) & 31)))
|
||||
#define BIT128_GET(a, bit) ((a).data[(bit) >> 5] & (1 << ((bit) & 31)))
|
||||
#define BIT128_CLEAR_ALL(a) memset(&(a), 0, sizeof(a));
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (file_stream.h).
|
||||
@ -23,68 +23,85 @@
|
||||
#ifndef __LIBRETRO_SDK_FILE_STREAM_H
|
||||
#define __LIBRETRO_SDK_FILE_STREAM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define FILESTREAM_REQUIRED_VFS_VERSION 1
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct RFILE RFILE;
|
||||
|
||||
enum
|
||||
{
|
||||
RFILE_MODE_READ = 0,
|
||||
RFILE_MODE_READ_TEXT,
|
||||
RFILE_MODE_WRITE,
|
||||
RFILE_MODE_READ_WRITE,
|
||||
#define FILESTREAM_REQUIRED_VFS_VERSION 1
|
||||
|
||||
/* There is no garantee these requests will be attended. */
|
||||
RFILE_HINT_UNBUFFERED = 1<<8,
|
||||
RFILE_HINT_MMAP = 1<<9 /* requires RFILE_MODE_READ */
|
||||
};
|
||||
void filestream_vfs_init(const struct retro_vfs_interface_info* vfs_info);
|
||||
|
||||
long long int filestream_get_size(RFILE *stream);
|
||||
int64_t filestream_get_size(RFILE *stream);
|
||||
|
||||
void filestream_set_size(RFILE *stream);
|
||||
/**
|
||||
* filestream_open:
|
||||
* @path : path to file
|
||||
* @mode : file mode to use when opening (read/write)
|
||||
* @bufsize : optional buffer size (-1 or 0 to use default)
|
||||
*
|
||||
* Opens a file for reading or writing, depending on the requested mode.
|
||||
* Returns a pointer to an RFILE if opened successfully, otherwise NULL.
|
||||
**/
|
||||
RFILE *filestream_open(const char *path, unsigned mode, unsigned hints);
|
||||
|
||||
const char *filestream_get_ext(RFILE *stream);
|
||||
int64_t filestream_seek(RFILE *stream, int64_t offset, int seek_position);
|
||||
|
||||
RFILE *filestream_open(const char *path, unsigned mode, ssize_t len);
|
||||
int64_t filestream_read(RFILE *stream, void *data, int64_t len);
|
||||
|
||||
ssize_t filestream_seek(RFILE *stream, ssize_t offset, int whence);
|
||||
int64_t filestream_write(RFILE *stream, const void *data, int64_t len);
|
||||
|
||||
ssize_t filestream_read(RFILE *stream, void *data, size_t len);
|
||||
|
||||
ssize_t filestream_write(RFILE *stream, const void *data, size_t len);
|
||||
|
||||
ssize_t filestream_tell(RFILE *stream);
|
||||
int64_t filestream_tell(RFILE *stream);
|
||||
|
||||
void filestream_rewind(RFILE *stream);
|
||||
|
||||
int filestream_close(RFILE *stream);
|
||||
|
||||
int filestream_read_file(const char *path, void **buf, ssize_t *len);
|
||||
int64_t filestream_read_file(const char *path, void **buf, int64_t *len);
|
||||
|
||||
char *filestream_gets(RFILE *stream, char *s, size_t len);
|
||||
|
||||
char *filestream_getline(RFILE *stream);
|
||||
|
||||
int filestream_getc(RFILE *stream);
|
||||
|
||||
int filestream_eof(RFILE *stream);
|
||||
|
||||
bool filestream_write_file(const char *path, const void *data, ssize_t size);
|
||||
bool filestream_write_file(const char *path, const void *data, int64_t size);
|
||||
|
||||
int filestream_putc(RFILE *stream, int c);
|
||||
|
||||
int filestream_get_fd(RFILE *stream);
|
||||
int filestream_vprintf(RFILE *stream, const char* format, va_list args);
|
||||
|
||||
int filestream_printf(RFILE *stream, const char* format, ...);
|
||||
|
||||
int filestream_error(RFILE *stream);
|
||||
|
||||
int filestream_flush(RFILE *stream);
|
||||
|
||||
int filestream_delete(const char *path);
|
||||
|
||||
int filestream_rename(const char *old_path, const char *new_path);
|
||||
|
||||
const char *filestream_get_path(RFILE *stream);
|
||||
|
||||
bool filestream_exists(const char *path);
|
||||
|
||||
char *filestream_getline(RFILE *stream);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (file_stream_transforms.h).
|
||||
@ -23,38 +23,66 @@
|
||||
#ifndef __LIBRETRO_SDK_FILE_STREAM_TRANSFORMS_H
|
||||
#define __LIBRETRO_SDK_FILE_STREAM_TRANSFORMS_H
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include <streams/file_stream.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define FILE RFILE
|
||||
|
||||
#undef fopen
|
||||
#undef fclose
|
||||
#undef ftell
|
||||
#undef fseek
|
||||
#undef fread
|
||||
#undef fgets
|
||||
#undef fgetc
|
||||
#undef fwrite
|
||||
#undef fputc
|
||||
#undef fprintf
|
||||
#undef ferror
|
||||
#undef feof
|
||||
|
||||
#define fopen rfopen
|
||||
#define fclose rfclose
|
||||
#define ftell rftell
|
||||
#define fseek rfseek
|
||||
#define fread rfread
|
||||
#define fgets rfgets
|
||||
#define fgetc rfgetc
|
||||
#define fwrite rfwrite
|
||||
#define fputc rfputc
|
||||
#define fprintf rfprintf
|
||||
#define ferror rferror
|
||||
#define feof rfeof
|
||||
|
||||
RFILE* rfopen(const char *path, char *mode);
|
||||
RFILE* rfopen(const char *path, const char *mode);
|
||||
|
||||
int rfclose(RFILE* stream);
|
||||
|
||||
long rftell(RFILE* stream);
|
||||
int64_t rftell(RFILE* stream);
|
||||
|
||||
int rfseek(RFILE* stream, long offset, int origin);
|
||||
int64_t rfseek(RFILE* stream, int64_t offset, int origin);
|
||||
|
||||
size_t rfread(void* buffer,
|
||||
size_t elementSize, size_t elementCount, RFILE* stream);
|
||||
int64_t rfread(void* buffer,
|
||||
size_t elem_size, size_t elem_count, RFILE* stream);
|
||||
|
||||
char *rfgets(char *buffer, int maxCount, RFILE* stream);
|
||||
|
||||
size_t rfwrite(void const* buffer,
|
||||
size_t elementSize, size_t elementCount, RFILE* stream);
|
||||
int rfgetc(RFILE* stream);
|
||||
|
||||
int64_t rfwrite(void const* buffer,
|
||||
size_t elem_size, size_t elem_count, RFILE* stream);
|
||||
|
||||
int rfputc(int character, RFILE * stream);
|
||||
|
||||
int rfprintf(RFILE * stream, const char * format, ...);
|
||||
|
||||
int rferror(RFILE* stream);
|
||||
|
||||
int rfeof(RFILE* stream);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
65
libretro/libretro-common/include/vfs/vfs_implementation.h
Normal file
65
libretro/libretro-common/include/vfs/vfs_implementation.h
Normal file
@ -0,0 +1,65 @@
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (vfs_implementation.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LIBRETRO_SDK_VFS_IMPLEMENTATION_H
|
||||
#define __LIBRETRO_SDK_VFS_IMPLEMENTATION_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libretro.h>
|
||||
|
||||
/* Replace the following symbol with something appropriate
|
||||
* to signify the file is being compiled for a front end instead of a core.
|
||||
* This allows the same code to act as reference implementation
|
||||
* for VFS and as fallbacks for when the front end does not provide VFS functionality.
|
||||
*/
|
||||
|
||||
#ifdef VFS_FRONTEND
|
||||
typedef struct retro_vfs_file_handle libretro_vfs_implementation_file;
|
||||
#else
|
||||
typedef struct libretro_vfs_implementation_file libretro_vfs_implementation_file;
|
||||
#endif
|
||||
|
||||
libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, unsigned mode, unsigned hints);
|
||||
|
||||
int retro_vfs_file_close_impl(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int retro_vfs_file_error_impl(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int64_t retro_vfs_file_size_impl(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int64_t retro_vfs_file_tell_impl(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int64_t retro_vfs_file_seek_impl(libretro_vfs_implementation_file *stream, int64_t offset, int seek_position);
|
||||
|
||||
int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream, void *s, uint64_t len);
|
||||
|
||||
int64_t retro_vfs_file_write_impl(libretro_vfs_implementation_file *stream, const void *s, uint64_t len);
|
||||
|
||||
int retro_vfs_file_flush_impl(libretro_vfs_implementation_file *stream);
|
||||
|
||||
int retro_vfs_file_remove_impl(const char *path);
|
||||
|
||||
int retro_vfs_file_rename_impl(const char *old_path, const char *new_path);
|
||||
|
||||
const char *retro_vfs_file_get_path_impl(libretro_vfs_implementation_file *stream);
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (memmap.c).
|
||||
@ -48,7 +48,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
void* mmap(void *addr, size_t len, int prot, int flags, int fildes, size_t offset)
|
||||
void* mmap(void *addr, size_t len, int prot, int flags,
|
||||
int fildes, size_t offset)
|
||||
{
|
||||
void *map = (void*)NULL;
|
||||
HANDLE handle = INVALID_HANDLE_VALUE;
|
||||
@ -57,36 +58,34 @@ void* mmap(void *addr, size_t len, int prot, int flags, int fildes, size_t offse
|
||||
{
|
||||
case PROT_READ:
|
||||
default:
|
||||
{
|
||||
handle = CreateFileMapping((HANDLE) _get_osfhandle(fildes), 0, PAGE_READONLY, 0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_READ, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
handle = CreateFileMapping((HANDLE)
|
||||
_get_osfhandle(fildes), 0, PAGE_READONLY, 0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
}
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_READ, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
break;
|
||||
case PROT_WRITE:
|
||||
{
|
||||
handle = CreateFileMapping((HANDLE) _get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
handle = CreateFileMapping((HANDLE)
|
||||
_get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
}
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
break;
|
||||
case PROT_READWRITE:
|
||||
{
|
||||
handle = CreateFileMapping((HANDLE) _get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_ALL_ACCESS, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
handle = CreateFileMapping((HANDLE)
|
||||
_get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
}
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_ALL_ACCESS, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
break;
|
||||
}
|
||||
|
||||
if (map == (void*)NULL)
|
||||
return((void*)MAP_FAILED);
|
||||
return((void*) ((int8_t*)map + offset));
|
||||
@ -110,7 +109,8 @@ int mprotect(void *addr, size_t len, int prot)
|
||||
}
|
||||
|
||||
#elif !defined(HAVE_MMAN)
|
||||
void* mmap(void *addr, size_t len, int prot, int flags, int fildes, size_t offset)
|
||||
void* mmap(void *addr, size_t len, int prot, int flags,
|
||||
int fildes, size_t offset)
|
||||
{
|
||||
return malloc(len);
|
||||
}
|
||||
@ -123,7 +123,8 @@ int munmap(void *addr, size_t len)
|
||||
|
||||
int mprotect(void *addr, size_t len, int prot)
|
||||
{
|
||||
/* stub - not really needed at this point since this codepath has no dynarecs */
|
||||
/* stub - not really needed at this point
|
||||
* since this codepath has no dynarecs. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (file_stream.c).
|
||||
@ -23,546 +23,344 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
# ifdef _MSC_VER
|
||||
# define setmode _setmode
|
||||
# endif
|
||||
# ifdef _XBOX
|
||||
# include <xtl.h>
|
||||
# define INVALID_FILE_ATTRIBUTES -1
|
||||
# else
|
||||
# include <io.h>
|
||||
# include <fcntl.h>
|
||||
# include <direct.h>
|
||||
# include <windows.h>
|
||||
# endif
|
||||
#else
|
||||
# if defined(PSP)
|
||||
# include <pspiofilemgr.h>
|
||||
# endif
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# if !defined(VITA)
|
||||
# include <dirent.h>
|
||||
# endif
|
||||
# include <unistd.h>
|
||||
#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>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <streams/file_stream.h>
|
||||
#include <memmap.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#define VFS_FRONTEND
|
||||
#include <vfs/vfs_implementation.h>
|
||||
|
||||
static const int64_t vfs_error_return_value = -1;
|
||||
|
||||
static retro_vfs_get_path_t filestream_get_path_cb = NULL;
|
||||
static retro_vfs_open_t filestream_open_cb = NULL;
|
||||
static retro_vfs_close_t filestream_close_cb = NULL;
|
||||
static retro_vfs_size_t filestream_size_cb = NULL;
|
||||
static retro_vfs_tell_t filestream_tell_cb = NULL;
|
||||
static retro_vfs_seek_t filestream_seek_cb = NULL;
|
||||
static retro_vfs_read_t filestream_read_cb = NULL;
|
||||
static retro_vfs_write_t filestream_write_cb = NULL;
|
||||
static retro_vfs_flush_t filestream_flush_cb = NULL;
|
||||
static retro_vfs_remove_t filestream_remove_cb = NULL;
|
||||
static retro_vfs_rename_t filestream_rename_cb = NULL;
|
||||
|
||||
struct RFILE
|
||||
{
|
||||
unsigned hints;
|
||||
char *ext;
|
||||
long long int size;
|
||||
#if defined(PSP)
|
||||
SceUID fd;
|
||||
#else
|
||||
|
||||
#define HAVE_BUFFERED_IO 1
|
||||
|
||||
#define MODE_STR_READ "r"
|
||||
#define MODE_STR_READ_UNBUF "rb"
|
||||
#define MODE_STR_WRITE_UNBUF "wb"
|
||||
#define MODE_STR_WRITE_PLUS "w+"
|
||||
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
FILE *fp;
|
||||
#endif
|
||||
#if defined(HAVE_MMAP)
|
||||
uint8_t *mapped;
|
||||
uint64_t mappos;
|
||||
uint64_t mapsize;
|
||||
#endif
|
||||
int fd;
|
||||
#endif
|
||||
struct retro_vfs_file_handle *hfile;
|
||||
bool error_flag;
|
||||
bool eof_flag;
|
||||
};
|
||||
|
||||
int filestream_get_fd(RFILE *stream)
|
||||
{
|
||||
if (!stream)
|
||||
return -1;
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return fileno(stream->fp);
|
||||
#endif
|
||||
return stream->fd;
|
||||
}
|
||||
/* VFS Initialization */
|
||||
|
||||
const char *filestream_get_ext(RFILE *stream)
|
||||
void filestream_vfs_init(const struct retro_vfs_interface_info* vfs_info)
|
||||
{
|
||||
if (!stream)
|
||||
return NULL;
|
||||
return stream->ext;
|
||||
}
|
||||
const struct retro_vfs_interface* vfs_iface;
|
||||
|
||||
long long int filestream_get_size(RFILE *stream)
|
||||
{
|
||||
if (!stream)
|
||||
return 0;
|
||||
return stream->size;
|
||||
}
|
||||
filestream_get_path_cb = NULL;
|
||||
filestream_open_cb = NULL;
|
||||
filestream_close_cb = NULL;
|
||||
filestream_tell_cb = NULL;
|
||||
filestream_size_cb = NULL;
|
||||
filestream_seek_cb = NULL;
|
||||
filestream_read_cb = NULL;
|
||||
filestream_write_cb = NULL;
|
||||
filestream_flush_cb = NULL;
|
||||
filestream_remove_cb = NULL;
|
||||
filestream_rename_cb = NULL;
|
||||
|
||||
void filestream_set_size(RFILE *stream)
|
||||
{
|
||||
if (!stream)
|
||||
vfs_iface = vfs_info->iface;
|
||||
|
||||
if (vfs_info->required_interface_version < FILESTREAM_REQUIRED_VFS_VERSION
|
||||
|| !vfs_iface)
|
||||
return;
|
||||
|
||||
filestream_seek(stream, 0, SEEK_SET);
|
||||
filestream_seek(stream, 0, SEEK_END);
|
||||
|
||||
stream->size = filestream_tell(stream);
|
||||
|
||||
filestream_seek(stream, 0, SEEK_SET);
|
||||
filestream_get_path_cb = vfs_iface->get_path;
|
||||
filestream_open_cb = vfs_iface->open;
|
||||
filestream_close_cb = vfs_iface->close;
|
||||
filestream_size_cb = vfs_iface->size;
|
||||
filestream_tell_cb = vfs_iface->tell;
|
||||
filestream_seek_cb = vfs_iface->seek;
|
||||
filestream_read_cb = vfs_iface->read;
|
||||
filestream_write_cb = vfs_iface->write;
|
||||
filestream_flush_cb = vfs_iface->flush;
|
||||
filestream_remove_cb = vfs_iface->remove;
|
||||
filestream_rename_cb = vfs_iface->rename;
|
||||
}
|
||||
|
||||
RFILE *filestream_open(const char *path, unsigned mode, ssize_t len)
|
||||
/* Callback wrappers */
|
||||
bool filestream_exists(const char *path)
|
||||
{
|
||||
int flags = 0;
|
||||
int mode_int = 0;
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
const char *mode_str = NULL;
|
||||
#endif
|
||||
RFILE *stream = (RFILE*)calloc(1, sizeof(*stream));
|
||||
RFILE *dummy = NULL;
|
||||
|
||||
if (!stream)
|
||||
return NULL;
|
||||
if (!path || !*path)
|
||||
return false;
|
||||
|
||||
(void)mode_int;
|
||||
(void)flags;
|
||||
dummy = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ,
|
||||
RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
|
||||
stream->hints = mode;
|
||||
if (!dummy)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RFILE_HINT_MMAP && (stream->hints & 0xff) == RFILE_MODE_READ)
|
||||
stream->hints |= RFILE_HINT_UNBUFFERED;
|
||||
else
|
||||
#endif
|
||||
stream->hints &= ~RFILE_HINT_MMAP;
|
||||
|
||||
switch (mode & 0xff)
|
||||
{
|
||||
case RFILE_MODE_READ_TEXT:
|
||||
#if defined(PSP)
|
||||
mode_int = 0666;
|
||||
flags = PSP_O_RDONLY;
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
mode_str = MODE_STR_READ;
|
||||
#endif
|
||||
/* No "else" here */
|
||||
flags = O_RDONLY;
|
||||
#endif
|
||||
break;
|
||||
case RFILE_MODE_READ:
|
||||
#if defined(PSP)
|
||||
mode_int = 0666;
|
||||
flags = PSP_O_RDONLY;
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
mode_str = MODE_STR_READ_UNBUF;
|
||||
#endif
|
||||
/* No "else" here */
|
||||
flags = O_RDONLY;
|
||||
#endif
|
||||
break;
|
||||
case RFILE_MODE_WRITE:
|
||||
#if defined(PSP)
|
||||
mode_int = 0666;
|
||||
flags = PSP_O_CREAT | PSP_O_WRONLY | PSP_O_TRUNC;
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
mode_str = MODE_STR_WRITE_UNBUF;
|
||||
#endif
|
||||
else
|
||||
{
|
||||
flags = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
#ifndef _WIN32
|
||||
flags |= S_IRUSR | S_IWUSR;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RFILE_MODE_READ_WRITE:
|
||||
#if defined(PSP)
|
||||
mode_int = 0666;
|
||||
flags = PSP_O_RDWR;
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
mode_str = MODE_STR_WRITE_PLUS;
|
||||
#endif
|
||||
else
|
||||
{
|
||||
flags = O_RDWR;
|
||||
#ifdef _WIN32
|
||||
flags |= O_BINARY;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(PSP)
|
||||
stream->fd = sceIoOpen(path, flags, mode_int);
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0 && mode_str)
|
||||
{
|
||||
stream->fp = fopen(path, mode_str);
|
||||
if (!stream->fp)
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* FIXME: HAVE_BUFFERED_IO is always 1, but if it is ever changed, open() needs to be changed to _wopen() for WIndows. */
|
||||
stream->fd = open(path, flags, mode_int);
|
||||
if (stream->fd == -1)
|
||||
goto error;
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RFILE_HINT_MMAP)
|
||||
{
|
||||
stream->mappos = 0;
|
||||
stream->mapped = NULL;
|
||||
stream->mapsize = filestream_seek(stream, 0, SEEK_END);
|
||||
|
||||
if (stream->mapsize == (uint64_t)-1)
|
||||
goto error;
|
||||
|
||||
filestream_rewind(stream);
|
||||
|
||||
stream->mapped = (uint8_t*)mmap((void*)0,
|
||||
stream->mapsize, PROT_READ, MAP_SHARED, stream->fd, 0);
|
||||
|
||||
if (stream->mapped == MAP_FAILED)
|
||||
stream->hints &= ~RFILE_HINT_MMAP;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PSP)
|
||||
if (stream->fd == -1)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
{
|
||||
const char *ld = (const char*)strrchr(path, '.');
|
||||
stream->ext = strdup(ld ? ld + 1 : "");
|
||||
}
|
||||
|
||||
filestream_set_size(stream);
|
||||
|
||||
return stream;
|
||||
|
||||
error:
|
||||
filestream_close(stream);
|
||||
return NULL;
|
||||
filestream_close(dummy);
|
||||
return true;
|
||||
}
|
||||
|
||||
char *filestream_getline(RFILE *stream)
|
||||
int64_t filestream_get_size(RFILE *stream)
|
||||
{
|
||||
char* newline = (char*)malloc(9);
|
||||
char* newline_tmp = NULL;
|
||||
size_t cur_size = 8;
|
||||
size_t idx = 0;
|
||||
int in = filestream_getc(stream);
|
||||
int64_t output;
|
||||
|
||||
if (!newline)
|
||||
if (filestream_size_cb != NULL)
|
||||
output = filestream_size_cb(stream->hfile);
|
||||
else
|
||||
output = retro_vfs_file_size_impl((libretro_vfs_implementation_file*)stream->hfile);
|
||||
|
||||
if (output == vfs_error_return_value)
|
||||
stream->error_flag = true;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* filestream_open:
|
||||
* @path : path to file
|
||||
* @mode : file mode to use when opening (read/write)
|
||||
* @hints :
|
||||
*
|
||||
* Opens a file for reading or writing, depending on the requested mode.
|
||||
* Returns a pointer to an RFILE if opened successfully, otherwise NULL.
|
||||
**/
|
||||
RFILE *filestream_open(const char *path, unsigned mode, unsigned hints)
|
||||
{
|
||||
struct retro_vfs_file_handle *fp = NULL;
|
||||
RFILE* output = NULL;
|
||||
|
||||
if (filestream_open_cb != NULL)
|
||||
fp = (struct retro_vfs_file_handle*)
|
||||
filestream_open_cb(path, mode, hints);
|
||||
else
|
||||
fp = (struct retro_vfs_file_handle*)
|
||||
retro_vfs_file_open_impl(path, mode, hints);
|
||||
|
||||
if (!fp)
|
||||
return NULL;
|
||||
|
||||
while (in != EOF && in != '\n')
|
||||
{
|
||||
if (idx == cur_size)
|
||||
{
|
||||
cur_size *= 2;
|
||||
newline_tmp = (char*)realloc(newline, cur_size + 1);
|
||||
|
||||
if (!newline_tmp)
|
||||
{
|
||||
free(newline);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
newline = newline_tmp;
|
||||
}
|
||||
|
||||
newline[idx++] = in;
|
||||
in = filestream_getc(stream);
|
||||
}
|
||||
|
||||
newline[idx] = '\0';
|
||||
return newline;
|
||||
output = (RFILE*)malloc(sizeof(RFILE));
|
||||
output->error_flag = false;
|
||||
output->eof_flag = false;
|
||||
output->hfile = fp;
|
||||
return output;
|
||||
}
|
||||
|
||||
char *filestream_gets(RFILE *stream, char *s, size_t len)
|
||||
{
|
||||
int c = 0;
|
||||
char *p = s;
|
||||
if (!stream)
|
||||
return NULL;
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
return fgets(s, (int)len, stream->fp);
|
||||
#elif defined(PSP)
|
||||
if(filestream_read(stream,s,len)==len)
|
||||
return s;
|
||||
return NULL;
|
||||
#else
|
||||
return gets(s);
|
||||
#endif
|
||||
|
||||
/* get max bytes or up to a newline */
|
||||
|
||||
for (len--; len > 0; len--)
|
||||
{
|
||||
if ((c = filestream_getc(stream)) == EOF)
|
||||
break;
|
||||
*p++ = c;
|
||||
if (c == '\n')
|
||||
break;
|
||||
}
|
||||
*p = 0;
|
||||
|
||||
if (p == s && c == EOF)
|
||||
return NULL;
|
||||
return (s);
|
||||
}
|
||||
|
||||
int filestream_getc(RFILE *stream)
|
||||
{
|
||||
char c = 0;
|
||||
(void)c;
|
||||
if (!stream)
|
||||
return 0;
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
return fgetc(stream->fp);
|
||||
#elif defined(PSP)
|
||||
if(filestream_read(stream, &c, 1) == 1)
|
||||
return (int)c;
|
||||
return EOF;
|
||||
#else
|
||||
return getc(stream->fd);
|
||||
#endif
|
||||
if(filestream_read(stream, &c, 1) == 1)
|
||||
return (int)c;
|
||||
return EOF;
|
||||
}
|
||||
|
||||
ssize_t filestream_seek(RFILE *stream, ssize_t offset, int whence)
|
||||
int64_t filestream_seek(RFILE *stream, int64_t offset, int seek_position)
|
||||
{
|
||||
if (!stream)
|
||||
goto error;
|
||||
int64_t output;
|
||||
|
||||
#if defined(PSP)
|
||||
if (sceIoLseek(stream->fd, (SceOff)offset, whence) == -1)
|
||||
goto error;
|
||||
#else
|
||||
if (filestream_seek_cb != NULL)
|
||||
output = filestream_seek_cb(stream->hfile, offset, seek_position);
|
||||
else
|
||||
output = retro_vfs_file_seek_impl((libretro_vfs_implementation_file*)stream->hfile, offset, seek_position);
|
||||
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return fseek(stream->fp, (long)offset, whence);
|
||||
#endif
|
||||
if (output == vfs_error_return_value)
|
||||
stream->error_flag = true;
|
||||
stream->eof_flag = false;
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
/* Need to check stream->mapped because this function is
|
||||
* called in filestream_open() */
|
||||
if (stream->mapped && stream->hints & RFILE_HINT_MMAP)
|
||||
{
|
||||
/* fseek() returns error on under/overflow but allows cursor > EOF for
|
||||
read-only file descriptors. */
|
||||
switch (whence)
|
||||
{
|
||||
case SEEK_SET:
|
||||
if (offset < 0)
|
||||
goto error;
|
||||
|
||||
stream->mappos = offset;
|
||||
break;
|
||||
|
||||
case SEEK_CUR:
|
||||
if ((offset < 0 && stream->mappos + offset > stream->mappos) ||
|
||||
(offset > 0 && stream->mappos + offset < stream->mappos))
|
||||
goto error;
|
||||
|
||||
stream->mappos += offset;
|
||||
break;
|
||||
|
||||
case SEEK_END:
|
||||
if (stream->mapsize + offset < stream->mapsize)
|
||||
goto error;
|
||||
|
||||
stream->mappos = stream->mapsize + offset;
|
||||
break;
|
||||
}
|
||||
return stream->mappos;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (lseek(stream->fd, offset, whence) < 0)
|
||||
goto error;
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return -1;
|
||||
return output;
|
||||
}
|
||||
|
||||
int filestream_eof(RFILE *stream)
|
||||
{
|
||||
size_t current_position = filestream_tell(stream);
|
||||
size_t end_position = filestream_seek(stream, 0, SEEK_END);
|
||||
|
||||
filestream_seek(stream, current_position, SEEK_SET);
|
||||
|
||||
if (current_position >= end_position)
|
||||
return 1;
|
||||
return 0;
|
||||
return stream->eof_flag;
|
||||
}
|
||||
|
||||
ssize_t filestream_tell(RFILE *stream)
|
||||
|
||||
int64_t filestream_tell(RFILE *stream)
|
||||
{
|
||||
if (!stream)
|
||||
goto error;
|
||||
#if defined(PSP)
|
||||
if (sceIoLseek(stream->fd, 0, SEEK_CUR) < 0)
|
||||
goto error;
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return ftell(stream->fp);
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
/* Need to check stream->mapped because this function
|
||||
* is called in filestream_open() */
|
||||
if (stream->mapped && stream->hints & RFILE_HINT_MMAP)
|
||||
return stream->mappos;
|
||||
#endif
|
||||
if (lseek(stream->fd, 0, SEEK_CUR) < 0)
|
||||
goto error;
|
||||
#endif
|
||||
int64_t output;
|
||||
|
||||
return 0;
|
||||
if (filestream_size_cb != NULL)
|
||||
output = filestream_tell_cb(stream->hfile);
|
||||
else
|
||||
output = retro_vfs_file_tell_impl((libretro_vfs_implementation_file*)stream->hfile);
|
||||
|
||||
error:
|
||||
return -1;
|
||||
if (output == vfs_error_return_value)
|
||||
stream->error_flag = true;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
void filestream_rewind(RFILE *stream)
|
||||
{
|
||||
filestream_seek(stream, 0L, SEEK_SET);
|
||||
if (!stream)
|
||||
return;
|
||||
filestream_seek(stream, 0L, RETRO_VFS_SEEK_POSITION_START);
|
||||
stream->error_flag = false;
|
||||
stream->eof_flag = false;
|
||||
}
|
||||
|
||||
ssize_t filestream_read(RFILE *stream, void *s, size_t len)
|
||||
int64_t filestream_read(RFILE *stream, void *s, int64_t len)
|
||||
{
|
||||
if (!stream || !s)
|
||||
goto error;
|
||||
#if defined(PSP)
|
||||
return sceIoRead(stream->fd, s, len);
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return fread(s, 1, len, stream->fp);
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RFILE_HINT_MMAP)
|
||||
{
|
||||
if (stream->mappos > stream->mapsize)
|
||||
goto error;
|
||||
int64_t output;
|
||||
|
||||
if (stream->mappos + len > stream->mapsize)
|
||||
len = stream->mapsize - stream->mappos;
|
||||
if (filestream_read_cb != NULL)
|
||||
output = filestream_read_cb(stream->hfile, s, len);
|
||||
else
|
||||
output = retro_vfs_file_read_impl(
|
||||
(libretro_vfs_implementation_file*)stream->hfile, s, len);
|
||||
|
||||
memcpy(s, &stream->mapped[stream->mappos], len);
|
||||
stream->mappos += len;
|
||||
if (output == vfs_error_return_value)
|
||||
stream->error_flag = true;
|
||||
if (output < len)
|
||||
stream->eof_flag = true;
|
||||
|
||||
return len;
|
||||
}
|
||||
#endif
|
||||
return read(stream->fd, s, len);
|
||||
#endif
|
||||
|
||||
error:
|
||||
return -1;
|
||||
return output;
|
||||
}
|
||||
|
||||
int filestream_flush(RFILE *stream)
|
||||
{
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
return fflush(stream->fp);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
int output;
|
||||
|
||||
if (filestream_flush_cb != NULL)
|
||||
output = filestream_flush_cb(stream->hfile);
|
||||
else
|
||||
output = retro_vfs_file_flush_impl((libretro_vfs_implementation_file*)stream->hfile);
|
||||
|
||||
if (output == vfs_error_return_value)
|
||||
stream->error_flag = true;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
ssize_t filestream_write(RFILE *stream, const void *s, size_t len)
|
||||
int filestream_delete(const char *path)
|
||||
{
|
||||
if (!stream)
|
||||
goto error;
|
||||
#if defined(PSP)
|
||||
return sceIoWrite(stream->fd, s, len);
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return fwrite(s, 1, len, stream->fp);
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RFILE_HINT_MMAP)
|
||||
goto error;
|
||||
#endif
|
||||
return write(stream->fd, s, len);
|
||||
#endif
|
||||
if (filestream_remove_cb != NULL)
|
||||
return filestream_remove_cb(path);
|
||||
|
||||
error:
|
||||
return -1;
|
||||
return retro_vfs_file_remove_impl(path);
|
||||
}
|
||||
|
||||
int filestream_rename(const char *old_path, const char *new_path)
|
||||
{
|
||||
if (filestream_rename_cb != NULL)
|
||||
return filestream_rename_cb(old_path, new_path);
|
||||
|
||||
return retro_vfs_file_rename_impl(old_path, new_path);
|
||||
}
|
||||
|
||||
const char *filestream_get_path(RFILE *stream)
|
||||
{
|
||||
if (filestream_get_path_cb != NULL)
|
||||
return filestream_get_path_cb(stream->hfile);
|
||||
|
||||
return retro_vfs_file_get_path_impl((libretro_vfs_implementation_file*)stream->hfile);
|
||||
}
|
||||
|
||||
int64_t filestream_write(RFILE *stream, const void *s, int64_t len)
|
||||
{
|
||||
int64_t output;
|
||||
|
||||
if (filestream_write_cb != NULL)
|
||||
output = filestream_write_cb(stream->hfile, s, len);
|
||||
else
|
||||
output = retro_vfs_file_write_impl((libretro_vfs_implementation_file*)stream->hfile, s, len);
|
||||
|
||||
if (output == vfs_error_return_value)
|
||||
stream->error_flag = true;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
int filestream_putc(RFILE *stream, int c)
|
||||
{
|
||||
char c_char = (char)c;
|
||||
if (!stream)
|
||||
return EOF;
|
||||
return filestream_write(stream, &c_char, 1)==1 ? c : EOF;
|
||||
}
|
||||
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
return fputc(c, stream->fp);
|
||||
#else
|
||||
/* unimplemented */
|
||||
return EOF;
|
||||
#endif
|
||||
int filestream_vprintf(RFILE *stream, const char* format, va_list args)
|
||||
{
|
||||
static char buffer[8 * 1024];
|
||||
int64_t num_chars = vsprintf(buffer, format, args);
|
||||
|
||||
if (num_chars < 0)
|
||||
return -1;
|
||||
else if (num_chars == 0)
|
||||
return 0;
|
||||
|
||||
return (int)filestream_write(stream, buffer, num_chars);
|
||||
}
|
||||
|
||||
int filestream_printf(RFILE *stream, const char* format, ...)
|
||||
{
|
||||
va_list vl;
|
||||
int result;
|
||||
va_start(vl, format);
|
||||
result = filestream_vprintf(stream, format, vl);
|
||||
va_end(vl);
|
||||
return result;
|
||||
}
|
||||
|
||||
int filestream_error(RFILE *stream)
|
||||
{
|
||||
if (stream && stream->error_flag)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int filestream_close(RFILE *stream)
|
||||
{
|
||||
if (!stream)
|
||||
goto error;
|
||||
int output;
|
||||
struct retro_vfs_file_handle* fp = stream->hfile;
|
||||
|
||||
if (stream->ext)
|
||||
free(stream->ext);
|
||||
|
||||
#if defined(PSP)
|
||||
if (stream->fd > 0)
|
||||
sceIoClose(stream->fd);
|
||||
#else
|
||||
#if defined(HAVE_BUFFERED_IO)
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
{
|
||||
if (stream->fp)
|
||||
fclose(stream->fp);
|
||||
}
|
||||
if (filestream_close_cb != NULL)
|
||||
output = filestream_close_cb(fp);
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RFILE_HINT_MMAP)
|
||||
munmap(stream->mapped, stream->mapsize);
|
||||
#endif
|
||||
output = retro_vfs_file_close_impl((libretro_vfs_implementation_file*)fp);
|
||||
|
||||
if (stream->fd > 0)
|
||||
close(stream->fd);
|
||||
#endif
|
||||
free(stream);
|
||||
if (output == 0)
|
||||
free(stream);
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return -1;
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -575,12 +373,14 @@ error:
|
||||
*
|
||||
* Returns: number of items read, -1 on error.
|
||||
*/
|
||||
int filestream_read_file(const char *path, void **buf, ssize_t *len)
|
||||
int64_t filestream_read_file(const char *path, void **buf, int64_t *len)
|
||||
{
|
||||
ssize_t ret = 0;
|
||||
ssize_t content_buf_size = 0;
|
||||
int64_t ret = 0;
|
||||
int64_t content_buf_size = 0;
|
||||
void *content_buf = NULL;
|
||||
RFILE *file = filestream_open(path, RFILE_MODE_READ, -1);
|
||||
RFILE *file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_READ,
|
||||
RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@ -588,21 +388,19 @@ int filestream_read_file(const char *path, void **buf, ssize_t *len)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (filestream_seek(file, 0, SEEK_END) != 0)
|
||||
goto error;
|
||||
content_buf_size = filestream_get_size(file);
|
||||
|
||||
content_buf_size = filestream_tell(file);
|
||||
if (content_buf_size < 0)
|
||||
goto error;
|
||||
|
||||
filestream_rewind(file);
|
||||
|
||||
content_buf = malloc(content_buf_size + 1);
|
||||
content_buf = malloc((size_t)(content_buf_size + 1));
|
||||
|
||||
if (!content_buf)
|
||||
goto error;
|
||||
if ((int64_t)(uint64_t)(content_buf_size + 1) != (content_buf_size + 1))
|
||||
goto error;
|
||||
|
||||
ret = filestream_read(file, content_buf, content_buf_size);
|
||||
ret = filestream_read(file, content_buf, (int64_t)content_buf_size);
|
||||
if (ret < 0)
|
||||
{
|
||||
fprintf(stderr, "Failed to read %s: %s\n", path, strerror(errno));
|
||||
@ -643,10 +441,12 @@ error:
|
||||
*
|
||||
* Returns: true (1) on success, false (0) otherwise.
|
||||
*/
|
||||
bool filestream_write_file(const char *path, const void *data, ssize_t size)
|
||||
bool filestream_write_file(const char *path, const void *data, int64_t size)
|
||||
{
|
||||
ssize_t ret = 0;
|
||||
RFILE *file = filestream_open(path, RFILE_MODE_WRITE, -1);
|
||||
int64_t ret = 0;
|
||||
RFILE *file = filestream_open(path,
|
||||
RETRO_VFS_FILE_ACCESS_WRITE,
|
||||
RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if (!file)
|
||||
return false;
|
||||
|
||||
@ -658,3 +458,44 @@ bool filestream_write_file(const char *path, const void *data, ssize_t size)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
char *filestream_getline(RFILE *stream)
|
||||
{
|
||||
char* newline_tmp = NULL;
|
||||
size_t cur_size = 8;
|
||||
size_t idx = 0;
|
||||
int in = 0;
|
||||
char* newline = (char*)malloc(9);
|
||||
|
||||
if (!stream || !newline)
|
||||
{
|
||||
if (newline)
|
||||
free(newline);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
in = filestream_getc(stream);
|
||||
|
||||
while (in != EOF && in != '\n')
|
||||
{
|
||||
if (idx == cur_size)
|
||||
{
|
||||
cur_size *= 2;
|
||||
newline_tmp = (char*)realloc(newline, cur_size + 1);
|
||||
|
||||
if (!newline_tmp)
|
||||
{
|
||||
free(newline);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
newline = newline_tmp;
|
||||
}
|
||||
|
||||
newline[idx++] = in;
|
||||
in = filestream_getc(stream);
|
||||
}
|
||||
|
||||
newline[idx] = '\0';
|
||||
return newline;
|
||||
}
|
||||
|
@ -1,71 +1,144 @@
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (file_stream_transforms.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <streams/file_stream.h>
|
||||
#include <string.h>
|
||||
|
||||
RFILE* rfopen(const char *path, char *mode)
|
||||
{
|
||||
unsigned int retro_mode = RFILE_MODE_READ_TEXT;
|
||||
if (strstr(mode, "r"))
|
||||
if (strstr(mode, "b"))
|
||||
retro_mode = RFILE_MODE_READ;
|
||||
|
||||
if (strstr(mode, "w"))
|
||||
retro_mode = RFILE_MODE_WRITE;
|
||||
if (strstr(mode, "+"))
|
||||
retro_mode = RFILE_MODE_READ_WRITE;
|
||||
|
||||
return filestream_open(path, retro_mode, -1);
|
||||
}
|
||||
|
||||
int rfclose(RFILE* stream)
|
||||
{
|
||||
return filestream_close(stream);
|
||||
}
|
||||
|
||||
long rftell(RFILE* stream)
|
||||
{
|
||||
return filestream_tell(stream);
|
||||
}
|
||||
|
||||
int rfseek(RFILE* stream, long offset, int origin)
|
||||
{
|
||||
return filestream_seek(stream, offset, origin);
|
||||
}
|
||||
|
||||
size_t rfread(void* buffer,
|
||||
size_t elementSize, size_t elementCount, RFILE* stream)
|
||||
{
|
||||
return filestream_read(stream, buffer, elementSize*elementCount);
|
||||
}
|
||||
|
||||
char *rfgets(char *buffer, int maxCount, RFILE* stream)
|
||||
{
|
||||
return filestream_gets(stream, buffer, maxCount);
|
||||
}
|
||||
|
||||
size_t rfwrite(void const* buffer,
|
||||
size_t elementSize, size_t elementCount, RFILE* stream)
|
||||
{
|
||||
return filestream_write(stream, buffer, elementSize*elementCount);
|
||||
}
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (file_stream_transforms.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
RFILE* rfopen(const char *path, const char *mode)
|
||||
{
|
||||
RFILE *output = NULL;
|
||||
unsigned int retro_mode = RETRO_VFS_FILE_ACCESS_READ;
|
||||
bool position_to_end = false;
|
||||
|
||||
if (strstr(mode, "r"))
|
||||
{
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_READ;
|
||||
if (strstr(mode, "+"))
|
||||
{
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_READ_WRITE |
|
||||
RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING;
|
||||
}
|
||||
}
|
||||
else if (strstr(mode, "w"))
|
||||
{
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_WRITE;
|
||||
if (strstr(mode, "+"))
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_READ_WRITE;
|
||||
}
|
||||
else if (strstr(mode, "a"))
|
||||
{
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_WRITE |
|
||||
RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING;
|
||||
position_to_end = true;
|
||||
if (strstr(mode, "+"))
|
||||
{
|
||||
retro_mode = RETRO_VFS_FILE_ACCESS_READ_WRITE |
|
||||
RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING;
|
||||
}
|
||||
}
|
||||
|
||||
output = filestream_open(path, retro_mode,
|
||||
RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if (output && position_to_end)
|
||||
filestream_seek(output, 0, RETRO_VFS_SEEK_POSITION_END);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
int rfclose(RFILE* stream)
|
||||
{
|
||||
return filestream_close(stream);
|
||||
}
|
||||
|
||||
int64_t rftell(RFILE* stream)
|
||||
{
|
||||
return filestream_tell(stream);
|
||||
}
|
||||
|
||||
int64_t rfseek(RFILE* stream, int64_t offset, int origin)
|
||||
{
|
||||
int seek_position = -1;
|
||||
switch (origin)
|
||||
{
|
||||
case SEEK_SET:
|
||||
seek_position = RETRO_VFS_SEEK_POSITION_START;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
seek_position = RETRO_VFS_SEEK_POSITION_CURRENT;
|
||||
break;
|
||||
case SEEK_END:
|
||||
seek_position = RETRO_VFS_SEEK_POSITION_END;
|
||||
break;
|
||||
}
|
||||
|
||||
return filestream_seek(stream, offset, seek_position);
|
||||
}
|
||||
|
||||
int64_t rfread(void* buffer,
|
||||
size_t elem_size, size_t elem_count, RFILE* stream)
|
||||
{
|
||||
return filestream_read(stream, buffer, elem_size * elem_count);
|
||||
}
|
||||
|
||||
char *rfgets(char *buffer, int maxCount, RFILE* stream)
|
||||
{
|
||||
return filestream_gets(stream, buffer, maxCount);
|
||||
}
|
||||
|
||||
int rfgetc(RFILE* stream)
|
||||
{
|
||||
return filestream_getc(stream);
|
||||
}
|
||||
|
||||
int64_t rfwrite(void const* buffer,
|
||||
size_t elem_size, size_t elem_count, RFILE* stream)
|
||||
{
|
||||
return filestream_write(stream, buffer, elem_size * elem_count);
|
||||
}
|
||||
|
||||
int rfputc(int character, RFILE * stream)
|
||||
{
|
||||
return filestream_putc(stream, character);
|
||||
}
|
||||
|
||||
int rfprintf(RFILE * stream, const char * format, ...)
|
||||
{
|
||||
int result;
|
||||
va_list vl;
|
||||
va_start(vl, format);
|
||||
result = filestream_vprintf(stream, format, vl);
|
||||
va_end(vl);
|
||||
return result;
|
||||
}
|
||||
|
||||
int rferror(RFILE* stream)
|
||||
{
|
||||
return filestream_error(stream);
|
||||
}
|
||||
|
||||
int rfeof(RFILE* stream)
|
||||
{
|
||||
return filestream_eof(stream);
|
||||
}
|
||||
|
591
libretro/libretro-common/vfs/vfs_implementation.c
Normal file
591
libretro/libretro-common/vfs/vfs_implementation.c
Normal file
@ -0,0 +1,591 @@
|
||||
/* Copyright (C) 2010-2018 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (vfs_implementation.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# ifdef _MSC_VER
|
||||
# define setmode _setmode
|
||||
# endif
|
||||
# ifdef _XBOX
|
||||
# include <xtl.h>
|
||||
# define INVALID_FILE_ATTRIBUTES -1
|
||||
# else
|
||||
# include <io.h>
|
||||
# include <fcntl.h>
|
||||
# include <direct.h>
|
||||
# include <windows.h>
|
||||
# endif
|
||||
#else
|
||||
# if defined(PSP)
|
||||
# include <pspiofilemgr.h>
|
||||
# endif
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# if !defined(VITA)
|
||||
# include <dirent.h>
|
||||
# endif
|
||||
# include <unistd.h>
|
||||
#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
|
||||
|
||||
/* Assume W-functions do not work below Win2K and Xbox platforms */
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX)
|
||||
|
||||
#ifndef LEGACY_WIN32
|
||||
#define LEGACY_WIN32
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if !defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER >= 1400)
|
||||
#define ATLEAST_VC2005
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#ifndef VFS_FRONTEND
|
||||
#define VFS_FRONTEND
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <vfs/vfs_implementation.h>
|
||||
#include <libretro.h>
|
||||
#include <memmap.h>
|
||||
#include <encodings/utf.h>
|
||||
#include <compat/fopen_utf8.h>
|
||||
|
||||
#define RFILE_HINT_UNBUFFERED (1 << 8)
|
||||
|
||||
#ifdef VFS_FRONTEND
|
||||
struct retro_vfs_file_handle
|
||||
#else
|
||||
struct libretro_vfs_implementation_file
|
||||
#endif
|
||||
{
|
||||
int fd;
|
||||
unsigned hints;
|
||||
int64_t size;
|
||||
char *buf;
|
||||
FILE *fp;
|
||||
char* orig_path;
|
||||
#if defined(HAVE_MMAP)
|
||||
uint64_t mappos;
|
||||
uint64_t mapsize;
|
||||
uint8_t *mapped;
|
||||
#endif
|
||||
};
|
||||
|
||||
int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, int64_t offset, int whence)
|
||||
{
|
||||
if (!stream)
|
||||
goto error;
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
/* 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
|
||||
return fseek(stream->fp, (long)offset, whence);
|
||||
#else
|
||||
return fseeko(stream->fp, (off_t)offset, whence);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
/* Need to check stream->mapped because this function is
|
||||
* called in filestream_open() */
|
||||
if (stream->mapped && stream->hints &
|
||||
RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
|
||||
{
|
||||
/* fseek() returns error on under/overflow but
|
||||
* allows cursor > EOF for
|
||||
read-only file descriptors. */
|
||||
switch (whence)
|
||||
{
|
||||
case SEEK_SET:
|
||||
if (offset < 0)
|
||||
goto error;
|
||||
|
||||
stream->mappos = offset;
|
||||
break;
|
||||
|
||||
case SEEK_CUR:
|
||||
if ((offset < 0 && stream->mappos + offset > stream->mappos) ||
|
||||
(offset > 0 && stream->mappos + offset < stream->mappos))
|
||||
goto error;
|
||||
|
||||
stream->mappos += offset;
|
||||
break;
|
||||
|
||||
case SEEK_END:
|
||||
if (stream->mapsize + offset < stream->mapsize)
|
||||
goto error;
|
||||
|
||||
stream->mappos = stream->mapsize + offset;
|
||||
break;
|
||||
}
|
||||
return stream->mappos;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (lseek(stream->fd, offset, whence) < 0)
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* retro_vfs_file_open_impl:
|
||||
* @path : path to file
|
||||
* @mode : file mode to use when opening (read/write)
|
||||
* @hints :
|
||||
*
|
||||
* Opens a file for reading or writing, depending on the requested mode.
|
||||
* Returns a pointer to an RFILE if opened successfully, otherwise NULL.
|
||||
**/
|
||||
|
||||
libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, unsigned mode, unsigned hints)
|
||||
{
|
||||
int flags = 0;
|
||||
const char *mode_str = NULL;
|
||||
libretro_vfs_implementation_file *stream = (libretro_vfs_implementation_file*)calloc(1, sizeof(*stream));
|
||||
|
||||
#ifdef VFS_FRONTEND
|
||||
const char *dumb_prefix = "vfsonly://";
|
||||
|
||||
if (!memcmp(path, dumb_prefix, strlen(dumb_prefix)))
|
||||
path += strlen(dumb_prefix);
|
||||
#endif
|
||||
|
||||
if (!stream)
|
||||
return NULL;
|
||||
|
||||
(void)flags;
|
||||
|
||||
stream->hints = hints;
|
||||
stream->orig_path = strdup(path);
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS && mode == RETRO_VFS_FILE_ACCESS_READ)
|
||||
stream->hints |= RFILE_HINT_UNBUFFERED;
|
||||
else
|
||||
#endif
|
||||
stream->hints &= ~RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case RETRO_VFS_FILE_ACCESS_READ:
|
||||
mode_str = "rb";
|
||||
|
||||
flags = O_RDONLY;
|
||||
#ifdef _WIN32
|
||||
flags |= O_BINARY;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RETRO_VFS_FILE_ACCESS_WRITE:
|
||||
mode_str = "wb";
|
||||
|
||||
flags = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
#ifndef _WIN32
|
||||
flags |= S_IRUSR | S_IWUSR;
|
||||
#else
|
||||
flags |= O_BINARY;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RETRO_VFS_FILE_ACCESS_READ_WRITE:
|
||||
mode_str = "w+b";
|
||||
|
||||
flags = O_RDWR | O_CREAT | O_TRUNC;
|
||||
#ifndef _WIN32
|
||||
flags |= S_IRUSR | S_IWUSR;
|
||||
#else
|
||||
flags |= O_BINARY;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case RETRO_VFS_FILE_ACCESS_WRITE | RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING:
|
||||
case RETRO_VFS_FILE_ACCESS_READ_WRITE | RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING:
|
||||
mode_str = "r+b";
|
||||
|
||||
flags = O_RDWR;
|
||||
#ifndef _WIN32
|
||||
flags |= S_IRUSR | S_IWUSR;
|
||||
#else
|
||||
flags |= O_BINARY;
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
{
|
||||
FILE *fp = (FILE*)fopen_utf8(path, mode_str);
|
||||
|
||||
if (!fp)
|
||||
goto error;
|
||||
|
||||
/* Regarding setvbuf:
|
||||
*
|
||||
* https://www.freebsd.org/cgi/man.cgi?query=setvbuf&apropos=0&sektion=0&manpath=FreeBSD+11.1-RELEASE&arch=default&format=html
|
||||
*
|
||||
* If the size argument is not zero but buf is NULL, a buffer of the given size will be allocated immediately, and
|
||||
* released on close. This is an extension to ANSI C.
|
||||
*
|
||||
* Since C89 does not support specifying a null buffer with a non-zero size, we create and track our own buffer for it.
|
||||
*/
|
||||
/* TODO: this is only useful for a few platforms, find which and add ifdef */
|
||||
stream->fp = fp;
|
||||
stream->buf = (char*)calloc(1, 0x4000);
|
||||
setvbuf(stream->fp, stream->buf, _IOFBF, 0x4000);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(LEGACY_WIN32)
|
||||
char *path_local = utf8_to_local_string_alloc(path);
|
||||
stream->fd = open(path_local, flags, 0);
|
||||
if (path_local)
|
||||
free(path_local);
|
||||
#else
|
||||
wchar_t * path_wide = utf8_to_utf16_string_alloc(path);
|
||||
stream->fd = _wopen(path_wide, flags, 0);
|
||||
if (path_wide)
|
||||
free(path_wide);
|
||||
#endif
|
||||
#else
|
||||
stream->fd = open(path, flags, 0);
|
||||
#endif
|
||||
|
||||
if (stream->fd == -1)
|
||||
goto error;
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
|
||||
{
|
||||
stream->mappos = 0;
|
||||
stream->mapped = NULL;
|
||||
stream->mapsize = retro_vfs_file_seek_internal(stream, 0, SEEK_END);
|
||||
|
||||
if (stream->mapsize == (uint64_t)-1)
|
||||
goto error;
|
||||
|
||||
retro_vfs_file_seek_internal(stream, 0, SEEK_SET);
|
||||
|
||||
stream->mapped = (uint8_t*)mmap((void*)0,
|
||||
stream->mapsize, PROT_READ, MAP_SHARED, stream->fd, 0);
|
||||
|
||||
if (stream->mapped == MAP_FAILED)
|
||||
stream->hints &= ~RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
retro_vfs_file_seek_internal(stream, 0, SEEK_SET);
|
||||
retro_vfs_file_seek_internal(stream, 0, SEEK_END);
|
||||
|
||||
stream->size = retro_vfs_file_tell_impl(stream);
|
||||
|
||||
retro_vfs_file_seek_internal(stream, 0, SEEK_SET);
|
||||
|
||||
return stream;
|
||||
|
||||
error:
|
||||
retro_vfs_file_close_impl(stream);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int retro_vfs_file_close_impl(libretro_vfs_implementation_file *stream)
|
||||
{
|
||||
if (!stream)
|
||||
return -1;
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
{
|
||||
if (stream->fp)
|
||||
fclose(stream->fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
|
||||
munmap(stream->mapped, stream->mapsize);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (stream->fd > 0)
|
||||
close(stream->fd);
|
||||
if (stream->buf)
|
||||
free(stream->buf);
|
||||
if (stream->orig_path)
|
||||
free(stream->orig_path);
|
||||
free(stream);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int retro_vfs_file_error_impl(libretro_vfs_implementation_file *stream)
|
||||
{
|
||||
return ferror(stream->fp);
|
||||
}
|
||||
|
||||
int64_t retro_vfs_file_size_impl(libretro_vfs_implementation_file *stream)
|
||||
{
|
||||
if (!stream)
|
||||
return 0;
|
||||
return stream->size;
|
||||
}
|
||||
|
||||
int64_t retro_vfs_file_tell_impl(libretro_vfs_implementation_file *stream)
|
||||
{
|
||||
if (!stream)
|
||||
return -1;
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
/* VC2005 and up have a special 64-bit ftell */
|
||||
#ifdef ATLEAST_VC2005
|
||||
return _ftelli64(stream->fp);
|
||||
#else
|
||||
return ftell(stream->fp);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
/* Need to check stream->mapped because this function
|
||||
* is called in filestream_open() */
|
||||
if (stream->mapped && stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
|
||||
return stream->mappos;
|
||||
#endif
|
||||
if (lseek(stream->fd, 0, SEEK_CUR) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t retro_vfs_file_seek_impl(libretro_vfs_implementation_file *stream, int64_t offset, int seek_position)
|
||||
{
|
||||
int whence = -1;
|
||||
switch (seek_position)
|
||||
{
|
||||
case RETRO_VFS_SEEK_POSITION_START:
|
||||
whence = SEEK_SET;
|
||||
break;
|
||||
case RETRO_VFS_SEEK_POSITION_CURRENT:
|
||||
whence = SEEK_CUR;
|
||||
break;
|
||||
case RETRO_VFS_SEEK_POSITION_END:
|
||||
whence = SEEK_END;
|
||||
break;
|
||||
}
|
||||
|
||||
return retro_vfs_file_seek_internal(stream, offset, whence);
|
||||
}
|
||||
|
||||
int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream, void *s, uint64_t len)
|
||||
{
|
||||
if (!stream || !s)
|
||||
goto error;
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return fread(s, 1, (size_t)len, stream->fp);
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
|
||||
{
|
||||
if (stream->mappos > stream->mapsize)
|
||||
goto error;
|
||||
|
||||
if (stream->mappos + len > stream->mapsize)
|
||||
len = stream->mapsize - stream->mappos;
|
||||
|
||||
memcpy(s, &stream->mapped[stream->mappos], len);
|
||||
stream->mappos += len;
|
||||
|
||||
return len;
|
||||
}
|
||||
#endif
|
||||
|
||||
return read(stream->fd, s, (size_t)len);
|
||||
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64_t retro_vfs_file_write_impl(libretro_vfs_implementation_file *stream, const void *s, uint64_t len)
|
||||
{
|
||||
if (!stream)
|
||||
goto error;
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return fwrite(s, 1, (size_t)len, stream->fp);
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS)
|
||||
goto error;
|
||||
#endif
|
||||
return write(stream->fd, s, (size_t)len);
|
||||
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int retro_vfs_file_flush_impl(libretro_vfs_implementation_file *stream)
|
||||
{
|
||||
if (!stream)
|
||||
return -1;
|
||||
return fflush(stream->fp)==0 ? 0 : -1;
|
||||
}
|
||||
|
||||
int retro_vfs_file_remove_impl(const char *path)
|
||||
{
|
||||
char *path_local = NULL;
|
||||
wchar_t *path_wide = NULL;
|
||||
|
||||
if (!path || !*path)
|
||||
return -1;
|
||||
|
||||
(void)path_local;
|
||||
(void)path_wide;
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500
|
||||
path_local = utf8_to_local_string_alloc(path);
|
||||
|
||||
if (path_local)
|
||||
{
|
||||
int ret = remove(path_local);
|
||||
free(path_local);
|
||||
|
||||
if (ret == 0)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
path_wide = utf8_to_utf16_string_alloc(path);
|
||||
|
||||
if (path_wide)
|
||||
{
|
||||
int ret = _wremove(path_wide);
|
||||
free(path_wide);
|
||||
|
||||
if (ret == 0)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
if (remove(path) == 0)
|
||||
return 0;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
int retro_vfs_file_rename_impl(const char *old_path, const char *new_path)
|
||||
{
|
||||
char *old_path_local = NULL;
|
||||
char *new_path_local = NULL;
|
||||
wchar_t *old_path_wide = NULL;
|
||||
wchar_t *new_path_wide = NULL;
|
||||
|
||||
if (!old_path || !*old_path || !new_path || !*new_path)
|
||||
return -1;
|
||||
|
||||
(void)old_path_local;
|
||||
(void)new_path_local;
|
||||
(void)old_path_wide;
|
||||
(void)new_path_wide;
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500
|
||||
old_path_local = utf8_to_local_string_alloc(old_path);
|
||||
new_path_local = utf8_to_local_string_alloc(new_path);
|
||||
|
||||
if (old_path_local)
|
||||
{
|
||||
if (new_path_local)
|
||||
{
|
||||
int ret = rename(old_path_local, new_path_local);
|
||||
free(old_path_local);
|
||||
free(new_path_local);
|
||||
return ret==0 ? 0 : -1;
|
||||
}
|
||||
|
||||
free(old_path_local);
|
||||
}
|
||||
|
||||
if (new_path_local)
|
||||
free(new_path_local);
|
||||
#else
|
||||
old_path_wide = utf8_to_utf16_string_alloc(old_path);
|
||||
new_path_wide = utf8_to_utf16_string_alloc(new_path);
|
||||
|
||||
if (old_path_wide)
|
||||
{
|
||||
if (new_path_wide)
|
||||
{
|
||||
int ret = _wrename(old_path_wide, new_path_wide);
|
||||
free(old_path_wide);
|
||||
free(new_path_wide);
|
||||
return ret==0 ? 0 : -1;
|
||||
}
|
||||
|
||||
free(old_path_wide);
|
||||
}
|
||||
|
||||
if (new_path_wide)
|
||||
free(new_path_wide);
|
||||
#endif
|
||||
return -1;
|
||||
#else
|
||||
return rename(old_path, new_path)==0 ? 0 : -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *retro_vfs_file_get_path_impl(libretro_vfs_implementation_file *stream)
|
||||
{
|
||||
/* should never happen, do something noisy so caller can be fixed */
|
||||
if (!stream)
|
||||
abort();
|
||||
return stream->orig_path;
|
||||
}
|
@ -70,11 +70,12 @@
|
||||
#define RETRO_DEVICE_JUSTIFIERS RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_LIGHTGUN, 2)
|
||||
#define RETRO_DEVICE_GRAPHIC_BOARD RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_POINTER, 0)
|
||||
|
||||
#include <libretro.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#include "shared.h"
|
||||
#include "libretro.h"
|
||||
#include "md_ntsc.h"
|
||||
#include "sms_ntsc.h"
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#define STATIC_ASSERT(name, test) typedef struct { int assert_[(test)?1:-1]; } assert_ ## name ## _
|
||||
#define M68K_MAX_CYCLES 1107
|
||||
@ -201,10 +202,11 @@ void error(char * fmt, ...)
|
||||
|
||||
int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension)
|
||||
{
|
||||
int size, left;
|
||||
int64_t left = 0;
|
||||
int64_t size = 0;
|
||||
|
||||
/* Open file */
|
||||
RFILE *fd = filestream_open(filename, RFILE_MODE_READ, -1);
|
||||
RFILE *fd = filestream_open(filename, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
|
||||
if (!fd)
|
||||
{
|
||||
@ -240,9 +242,7 @@ int load_archive(char *filename, unsigned char *buffer, int maxsize, char *exten
|
||||
return 0;
|
||||
}
|
||||
else if (size > maxsize)
|
||||
{
|
||||
size = maxsize;
|
||||
}
|
||||
|
||||
if (log_cb)
|
||||
log_cb(RETRO_LOG_INFO, "INFORMATION - Loading %d bytes ...\n", size);
|
||||
@ -509,9 +509,28 @@ void osd_input_update(void)
|
||||
|
||||
static void draw_cursor(int16_t x, int16_t y, uint16_t color)
|
||||
{
|
||||
uint16_t *ptr = (uint16_t *)bitmap.data + ((bitmap.viewport.y + y) * bitmap.width) + x + bitmap.viewport.x;
|
||||
ptr[-3*bitmap.width] = ptr[-bitmap.width] = ptr[bitmap.width] = ptr[3*bitmap.width] = ptr[-3] = ptr[-1] = ptr[1] = ptr[3] = color;
|
||||
ptr[-2*bitmap.width] = ptr[2*bitmap.width] = ptr[-2] = ptr[2] = ptr[0] = 0xffff;
|
||||
int i;
|
||||
|
||||
/* crosshair center position */
|
||||
uint16_t *ptr = (uint16_t *)bitmap.data + ((bitmap.viewport.y + y) * bitmap.width) + x + bitmap.viewport.x;
|
||||
|
||||
/* default crosshair dimension */
|
||||
int x_start = x - 3;
|
||||
int x_end = x + 3;
|
||||
int y_start = y - 3;
|
||||
int y_end = y + 3;
|
||||
|
||||
/* framebuffer limits */
|
||||
if (x_start < -bitmap.viewport.x) x_start = -bitmap.viewport.x;
|
||||
if (x_end >= (bitmap.viewport.w + bitmap.viewport.x)) x_end = bitmap.viewport.w + bitmap.viewport.x - 1;
|
||||
if (y_start < -bitmap.viewport.y) y_start = -bitmap.viewport.y;
|
||||
if (y_end >= (bitmap.viewport.h + bitmap.viewport.y)) y_end = bitmap.viewport.h + bitmap.viewport.y - 1;
|
||||
|
||||
/* draw crosshair */
|
||||
for (i = (x_start - x); i <= (x_end - x); i++)
|
||||
ptr[i] = (i & 1) ? color : 0xffff;
|
||||
for (i = (y_start - y); i <= (y_end - y); i++)
|
||||
ptr[i * bitmap.width] = (i & 1) ? color : 0xffff;
|
||||
}
|
||||
|
||||
static void init_bitmap(void)
|
||||
@ -586,13 +605,13 @@ static void bram_load(void)
|
||||
switch (region_code)
|
||||
{
|
||||
case REGION_JAPAN_NTSC:
|
||||
fp = filestream_open(CD_BRAM_JP, RFILE_MODE_READ, -1);
|
||||
fp = filestream_open(CD_BRAM_JP, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
break;
|
||||
case REGION_EUROPE:
|
||||
fp = filestream_open(CD_BRAM_EU, RFILE_MODE_READ, -1);
|
||||
fp = filestream_open(CD_BRAM_EU, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
break;
|
||||
case REGION_USA:
|
||||
fp = filestream_open(CD_BRAM_US, RFILE_MODE_READ, -1);
|
||||
fp = filestream_open(CD_BRAM_US, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -632,7 +651,7 @@ static void bram_load(void)
|
||||
/* automatically load cartridge backup RAM (if enabled) */
|
||||
if (scd.cartridge.id)
|
||||
{
|
||||
fp = filestream_open(CART_BRAM, RFILE_MODE_READ, -1);
|
||||
fp = filestream_open(CART_BRAM, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if (fp != NULL)
|
||||
{
|
||||
int filesize = scd.cartridge.mask + 1;
|
||||
@ -688,13 +707,13 @@ static void bram_save(void)
|
||||
switch (region_code)
|
||||
{
|
||||
case REGION_JAPAN_NTSC:
|
||||
fp = filestream_open(CD_BRAM_JP, RFILE_MODE_WRITE, -1);
|
||||
fp = filestream_open(CD_BRAM_JP, RETRO_VFS_FILE_ACCESS_WRITE, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
break;
|
||||
case REGION_EUROPE:
|
||||
fp = filestream_open(CD_BRAM_EU, RFILE_MODE_WRITE, -1);
|
||||
fp = filestream_open(CD_BRAM_EU, RETRO_VFS_FILE_ACCESS_WRITE, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
break;
|
||||
case REGION_USA:
|
||||
fp = filestream_open(CD_BRAM_US, RFILE_MODE_WRITE, -1);
|
||||
fp = filestream_open(CD_BRAM_US, RETRO_VFS_FILE_ACCESS_WRITE, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@ -717,7 +736,7 @@ static void bram_save(void)
|
||||
/* check if it is correctly formatted before saving */
|
||||
if (!memcmp(scd.cartridge.area + scd.cartridge.mask + 1 - 0x20, brm_format + 0x20, 0x20))
|
||||
{
|
||||
fp = filestream_open(CART_BRAM, RFILE_MODE_WRITE, -1);
|
||||
fp = filestream_open(CART_BRAM, RETRO_VFS_FILE_ACCESS_WRITE, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if (fp != NULL)
|
||||
{
|
||||
int filesize = scd.cartridge.mask + 1;
|
||||
@ -1751,6 +1770,7 @@ unsigned retro_api_version(void) { return RETRO_API_VERSION; }
|
||||
|
||||
void retro_set_environment(retro_environment_t cb)
|
||||
{
|
||||
struct retro_vfs_interface_info vfs_iface_info;
|
||||
static const struct retro_variable vars[] = {
|
||||
{ "genesis_plus_gx_system_hw", "System hardware; auto|sg-1000|sg-1000 II|mark-III|master system|master system II|game gear|mega drive / genesis" },
|
||||
{ "genesis_plus_gx_region_detect", "System region; auto|ntsc-u|pal|ntsc-j" },
|
||||
@ -1949,6 +1969,12 @@ void retro_set_environment(retro_environment_t cb)
|
||||
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
|
||||
cb(RETRO_ENVIRONMENT_SET_CONTROLLER_INFO, (void*)ports);
|
||||
cb(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS, (void*)desc);
|
||||
|
||||
vfs_iface_info.required_interface_version = 1;
|
||||
vfs_iface_info.iface = NULL;
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VFS_INTERFACE, &vfs_iface_info))
|
||||
filestream_vfs_init(&vfs_iface_info);
|
||||
|
||||
}
|
||||
|
||||
void retro_set_video_refresh(retro_video_refresh_t cb) { video_cb = cb; }
|
||||
@ -2198,7 +2224,7 @@ void retro_cheat_set(unsigned index, bool enabled, const char *code)
|
||||
bool retro_load_game(const struct retro_game_info *info)
|
||||
{
|
||||
int i;
|
||||
const char *dir = NULL;
|
||||
char *dir = NULL;
|
||||
#if defined(_WIN32)
|
||||
char slash = '\\';
|
||||
#else
|
||||
@ -2384,7 +2410,10 @@ size_t retro_get_memory_size(unsigned id)
|
||||
}
|
||||
}
|
||||
case RETRO_MEMORY_SYSTEM_RAM:
|
||||
return 0x10000;
|
||||
if (system_hw == SYSTEM_SMS || system_hw == SYSTEM_SMS2 || system_hw == SYSTEM_GG || system_hw == SYSTEM_GGMS)
|
||||
return 0x02000;
|
||||
else
|
||||
return 0x10000;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,31 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2035
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gx_vstudio", "gx_vstudio.vcxproj", "{02639D27-5E68-4F28-8A80-8BA00D9D9547}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Debug|x64.Build.0 = Debug|x64
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Debug|x86.Build.0 = Debug|Win32
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Release|x64.ActiveCfg = Release|x64
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Release|x64.Build.0 = Release|x64
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Release|x86.ActiveCfg = Release|Win32
|
||||
{02639D27-5E68-4F28-8A80-8BA00D9D9547}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {3F183379-6CD9-42BB-BEF2-D0C3030ABB87}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,430 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{02639D27-5E68-4F28-8A80-8BA00D9D9547}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>gxvstudio</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>genesis_plus_gx_libretro</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_USRDLL;_CRT_SECURE_NO_WARNINGS;INLINE=static inline;_7ZIP_ST;FLAC__NO_DLL;FLAC__HAS_OGG=0;PACKAGE_VERSION="1.3.2";LSB_FIRST;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;USE_LIBTREMOR;USE_LIBCHDR;MAXROMSIZE=33554432;HAVE_YM3438_CORE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>..\;..\..\core\;..\..\core\m68k\;..\..\core\z80\;..\..\core\input_hw\;..\..\core\sound\;..\..\core\cart_hw\;..\..\core\cart_hw\svp\;..\..\core\cd_hw\;..\..\core\cd_hw\libchdr\deps\libFLAC\include\;..\..\core\cd_hw\libchdr\deps\lzma\;..\..\core\cd_hw\libchdr\deps\zlib\;..\..\core\ntsc\;..\libretro-common\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>NotSet</SubSystem>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<StackReserveSize>4194304</StackReserveSize>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_USRDLL;_CRT_SECURE_NO_WARNINGS;INLINE=static inline;_7ZIP_ST;FLAC__NO_DLL;FLAC__HAS_OGG=0;PACKAGE_VERSION="1.3.2";LSB_FIRST;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;USE_LIBTREMOR;USE_LIBCHDR;MAXROMSIZE=33554432;HAVE_YM3438_CORE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>..\;..\..\core\;..\..\core\m68k\;..\..\core\z80\;..\..\core\input_hw\;..\..\core\sound\;..\..\core\cart_hw\;..\..\core\cart_hw\svp\;..\..\core\cd_hw\;..\..\core\cd_hw\libchdr\deps\libFLAC\include\;..\..\core\cd_hw\libchdr\deps\lzma\;..\..\core\cd_hw\libchdr\deps\zlib\;..\..\core\ntsc\;..\libretro-common\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>NotSet</SubSystem>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_USRDLL;_CRT_SECURE_NO_WARNINGS;INLINE=static inline;_7ZIP_ST;FLAC__NO_DLL;FLAC__HAS_OGG=0;PACKAGE_VERSION="1.3.2";LSB_FIRST;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;USE_LIBTREMOR;USE_LIBCHDR;MAXROMSIZE=33554432;HAVE_YM3438_CORE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>..\;..\..\core\;..\..\core\m68k\;..\..\core\z80\;..\..\core\input_hw\;..\..\core\sound\;..\..\core\cart_hw\;..\..\core\cart_hw\svp\;..\..\core\cd_hw\;..\..\core\cd_hw\libchdr\deps\libFLAC\include\;..\..\core\cd_hw\libchdr\deps\lzma\;..\..\core\cd_hw\libchdr\deps\zlib\;..\..\core\ntsc\;..\libretro-common\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>NotSet</SubSystem>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_USRDLL;_CRT_SECURE_NO_WARNINGS;INLINE=static inline;_7ZIP_ST;FLAC__NO_DLL;FLAC__HAS_OGG=0;PACKAGE_VERSION="1.3.2";LSB_FIRST;USE_16BPP_RENDERING;FRONTEND_SUPPORTS_RGB565;USE_LIBTREMOR;USE_LIBCHDR;MAXROMSIZE=33554432;HAVE_YM3438_CORE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>..\;..\..\core\;..\..\core\m68k\;..\..\core\z80\;..\..\core\input_hw\;..\..\core\sound\;..\..\core\cart_hw\;..\..\core\cart_hw\svp\;..\..\core\cd_hw\;..\..\core\cd_hw\libchdr\deps\libFLAC\include\;..\..\core\cd_hw\libchdr\deps\lzma\;..\..\core\cd_hw\libchdr\deps\zlib\;..\..\core\ntsc\;..\libretro-common\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>NotSet</SubSystem>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\core\cart_hw\areplay.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\eeprom_93c.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\eeprom_i2c.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\eeprom_spi.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\ggenie.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\md_cart.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\sms_cart.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\sram.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\svp\ssp16.h" />
|
||||
<ClInclude Include="..\..\core\cart_hw\svp\svp.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\cdc.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\cdd.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\cd_cart.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\gfx.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\assert.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\callback.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\export.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\format.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\metadata.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\ordinals.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\stream_decoder.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\bitmath.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\bitreader.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\cpu.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\crc.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\fixed.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\float.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\format.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\lpc.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\macros.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\md5.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\memory.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\protected\stream_decoder.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\share\alloc.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\share\compat.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\share\endswap.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\7zTypes.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\Compiler.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzFind.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzHash.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaDec.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaEnc.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\Precomp.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\gzguts.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inffast.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inffixed.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inflate.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inftrees.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\zconf.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\zlib.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\zutil.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\bitstream.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\cdrom.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\chd.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\coretypes.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\flac.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\huffman.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\pcm.h" />
|
||||
<ClInclude Include="..\..\core\cd_hw\scd.h" />
|
||||
<ClInclude Include="..\..\core\genesis.h" />
|
||||
<ClInclude Include="..\..\core\hvc.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\activator.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\gamepad.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\graphic_board.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\input.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\lightgun.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\mouse.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\paddle.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\sportspad.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\teamplayer.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\terebi_oekaki.h" />
|
||||
<ClInclude Include="..\..\core\input_hw\xe_1ap.h" />
|
||||
<ClInclude Include="..\..\core\io_ctrl.h" />
|
||||
<ClInclude Include="..\..\core\loadrom.h" />
|
||||
<ClInclude Include="..\..\core\m68k\m68k.h" />
|
||||
<ClInclude Include="..\..\core\m68k\m68kconf.h" />
|
||||
<ClInclude Include="..\..\core\m68k\m68kcpu.h" />
|
||||
<ClInclude Include="..\..\core\m68k\m68ki_cycles.h" />
|
||||
<ClInclude Include="..\..\core\m68k\m68ki_instruction_jump_table.h" />
|
||||
<ClInclude Include="..\..\core\m68k\m68kops.h" />
|
||||
<ClInclude Include="..\..\core\m68k\s68kconf.h" />
|
||||
<ClInclude Include="..\..\core\m68k\s68ki_cycles.h" />
|
||||
<ClInclude Include="..\..\core\macros.h" />
|
||||
<ClInclude Include="..\..\core\mem68k.h" />
|
||||
<ClInclude Include="..\..\core\membnk.h" />
|
||||
<ClInclude Include="..\..\core\memz80.h" />
|
||||
<ClInclude Include="..\..\core\ntsc\md_ntsc.h" />
|
||||
<ClInclude Include="..\..\core\ntsc\md_ntsc_config.h" />
|
||||
<ClInclude Include="..\..\core\ntsc\md_ntsc_impl.h" />
|
||||
<ClInclude Include="..\..\core\ntsc\sms_ntsc.h" />
|
||||
<ClInclude Include="..\..\core\ntsc\sms_ntsc_config.h" />
|
||||
<ClInclude Include="..\..\core\ntsc\sms_ntsc_impl.h" />
|
||||
<ClInclude Include="..\..\core\shared.h" />
|
||||
<ClInclude Include="..\..\core\sound\blip_buf.h" />
|
||||
<ClInclude Include="..\..\core\sound\eq.h" />
|
||||
<ClInclude Include="..\..\core\sound\psg.h" />
|
||||
<ClInclude Include="..\..\core\sound\sound.h" />
|
||||
<ClInclude Include="..\..\core\sound\ym2413.h" />
|
||||
<ClInclude Include="..\..\core\sound\ym2612.h" />
|
||||
<ClInclude Include="..\..\core\sound\ym3438.h" />
|
||||
<ClInclude Include="..\..\core\state.h" />
|
||||
<ClInclude Include="..\..\core\system.h" />
|
||||
<ClInclude Include="..\..\core\tremor\asm_arm.h" />
|
||||
<ClInclude Include="..\..\core\tremor\backends.h" />
|
||||
<ClInclude Include="..\..\core\tremor\block.h" />
|
||||
<ClInclude Include="..\..\core\tremor\codebook.h" />
|
||||
<ClInclude Include="..\..\core\tremor\codec_internal.h" />
|
||||
<ClInclude Include="..\..\core\tremor\config_types.h" />
|
||||
<ClInclude Include="..\..\core\tremor\ivorbiscodec.h" />
|
||||
<ClInclude Include="..\..\core\tremor\ivorbisfile.h" />
|
||||
<ClInclude Include="..\..\core\tremor\lsp_lookup.h" />
|
||||
<ClInclude Include="..\..\core\tremor\mdct.h" />
|
||||
<ClInclude Include="..\..\core\tremor\mdct_lookup.h" />
|
||||
<ClInclude Include="..\..\core\tremor\misc.h" />
|
||||
<ClInclude Include="..\..\core\tremor\ogg.h" />
|
||||
<ClInclude Include="..\..\core\tremor\os.h" />
|
||||
<ClInclude Include="..\..\core\tremor\os_types.h" />
|
||||
<ClInclude Include="..\..\core\tremor\registry.h" />
|
||||
<ClInclude Include="..\..\core\tremor\window.h" />
|
||||
<ClInclude Include="..\..\core\tremor\window_lookup.h" />
|
||||
<ClInclude Include="..\..\core\types.h" />
|
||||
<ClInclude Include="..\..\core\vdp_ctrl.h" />
|
||||
<ClInclude Include="..\..\core\vdp_render.h" />
|
||||
<ClInclude Include="..\..\core\z80\osd_cpu.h" />
|
||||
<ClInclude Include="..\..\core\z80\z80.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\boolean.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\apple_compat.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\fnmatch.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\getopt.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\ifaddrs.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\intrinsics.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\msvc.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\msvc\stdint.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\posix_string.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\strcasestr.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\strl.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\zconf.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\zlib.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\zutil.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\memmap.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_common.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_common_api.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_inline.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_miscellaneous.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\streams\file_stream.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\streams\file_stream_transforms.h" />
|
||||
<ClInclude Include="..\..\libretro\libretro.h" />
|
||||
<ClInclude Include="..\..\libretro\osd.h" />
|
||||
<ClInclude Include="..\..\libretro\scrc32.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\core\cart_hw\svp\imageformat.txt" />
|
||||
<Text Include="..\..\core\cart_hw\svp\svpdoc.txt" />
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma-history.txt" />
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma-sdk.txt" />
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma-specification.txt" />
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma.txt" />
|
||||
<Text Include="..\..\core\cd_hw\libchdr\LICENSE.txt" />
|
||||
<Text Include="..\..\core\m68k\readme.txt" />
|
||||
<Text Include="..\..\core\ntsc\changes.txt" />
|
||||
<Text Include="..\..\core\ntsc\license.txt" />
|
||||
<Text Include="..\..\core\ntsc\readme.txt" />
|
||||
<Text Include="..\..\core\ntsc\sms_ntsc.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\core\cart_hw\areplay.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\eeprom_93c.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\eeprom_i2c.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\eeprom_spi.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\ggenie.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\md_cart.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\sms_cart.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\sram.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\svp\ssp16.c" />
|
||||
<ClCompile Include="..\..\core\cart_hw\svp\svp.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\cdc.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\cdd.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\cd_cart.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\gfx.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\bitmath.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\bitreader.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\cpu.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\crc.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\fixed.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\float.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\format.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_avx2.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_sse.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_sse2.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_sse41.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\md5.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\memory.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\stream_decoder.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\lzma\LzFind.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaDec.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaEnc.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\adler32.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\inffast.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\inflate.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\inftrees.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\zutil.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\bitstream.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\cdrom.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\chd.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\flac.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\huffman.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\pcm.c" />
|
||||
<ClCompile Include="..\..\core\cd_hw\scd.c" />
|
||||
<ClCompile Include="..\..\core\genesis.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\activator.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\gamepad.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\graphic_board.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\input.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\lightgun.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\mouse.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\paddle.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\sportspad.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\teamplayer.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\terebi_oekaki.c" />
|
||||
<ClCompile Include="..\..\core\input_hw\xe_1ap.c" />
|
||||
<ClCompile Include="..\..\core\io_ctrl.c" />
|
||||
<ClCompile Include="..\..\core\loadrom.c" />
|
||||
<ClCompile Include="..\..\core\m68k\m68kcpu.c" />
|
||||
<ClCompile Include="..\..\core\m68k\s68kcpu.c" />
|
||||
<ClCompile Include="..\..\core\mem68k.c" />
|
||||
<ClCompile Include="..\..\core\membnk.c" />
|
||||
<ClCompile Include="..\..\core\memz80.c" />
|
||||
<ClCompile Include="..\..\core\ntsc\md_ntsc.c" />
|
||||
<ClCompile Include="..\..\core\ntsc\sms_ntsc.c" />
|
||||
<ClCompile Include="..\..\core\sound\blip_buf.c" />
|
||||
<ClCompile Include="..\..\core\sound\eq.c" />
|
||||
<ClCompile Include="..\..\core\sound\psg.c" />
|
||||
<ClCompile Include="..\..\core\sound\sound.c" />
|
||||
<ClCompile Include="..\..\core\sound\ym2413.c" />
|
||||
<ClCompile Include="..\..\core\sound\ym2612.c" />
|
||||
<ClCompile Include="..\..\core\sound\ym3438.c" />
|
||||
<ClCompile Include="..\..\core\state.c" />
|
||||
<ClCompile Include="..\..\core\system.c" />
|
||||
<ClCompile Include="..\..\core\tremor\bitwise.c" />
|
||||
<ClCompile Include="..\..\core\tremor\block.c" />
|
||||
<ClCompile Include="..\..\core\tremor\codebook.c" />
|
||||
<ClCompile Include="..\..\core\tremor\floor0.c" />
|
||||
<ClCompile Include="..\..\core\tremor\floor1.c" />
|
||||
<ClCompile Include="..\..\core\tremor\framing.c" />
|
||||
<ClCompile Include="..\..\core\tremor\info.c" />
|
||||
<ClCompile Include="..\..\core\tremor\mapping0.c" />
|
||||
<ClCompile Include="..\..\core\tremor\mdct.c" />
|
||||
<ClCompile Include="..\..\core\tremor\registry.c" />
|
||||
<ClCompile Include="..\..\core\tremor\res012.c" />
|
||||
<ClCompile Include="..\..\core\tremor\sharedbook.c" />
|
||||
<ClCompile Include="..\..\core\tremor\synthesis.c" />
|
||||
<ClCompile Include="..\..\core\tremor\vorbisfile.c" />
|
||||
<ClCompile Include="..\..\core\tremor\window.c" />
|
||||
<ClCompile Include="..\..\core\vdp_ctrl.c" />
|
||||
<ClCompile Include="..\..\core\vdp_render.c" />
|
||||
<ClCompile Include="..\..\core\z80\z80.c" />
|
||||
<ClCompile Include="..\..\libretro\libretro-common\memmap\memmap.c" />
|
||||
<ClCompile Include="..\..\libretro\libretro-common\streams\file_stream.c" />
|
||||
<ClCompile Include="..\..\libretro\libretro-common\streams\file_stream_transforms.c" />
|
||||
<ClCompile Include="..\..\libretro\libretro.c" />
|
||||
<ClCompile Include="..\..\libretro\scrc32.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\libFLAC\AUTHORS" />
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\libFLAC\COPYING.Xiph" />
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\libFLAC\README" />
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\zlib\ChangeLog" />
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\zlib\README" />
|
||||
<None Include="..\..\core\cd_hw\libchdr\README.md" />
|
||||
<None Include="..\..\core\tremor\CHANGELOG" />
|
||||
<None Include="..\..\core\tremor\COPYING" />
|
||||
<None Include="..\..\core\tremor\README" />
|
||||
<None Include="libretro.def" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -1,970 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{5706ae08-ac21-49ce-ade8-175dc9e7ae71}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core">
|
||||
<UniqueIdentifier>{6156e4ef-f1c0-4751-a570-6aa58a42f18b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes">
|
||||
<UniqueIdentifier>{e3c87277-1a94-4196-a336-ddf7af8ac7a5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cart_hw">
|
||||
<UniqueIdentifier>{d8d8dfd7-8662-4605-a40e-033e60c85127}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cart_hw\svp">
|
||||
<UniqueIdentifier>{1cd56205-edc5-4412-abc0-1c66f1cb4d67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core">
|
||||
<UniqueIdentifier>{256c4366-ee69-4a9b-9089-15123b657f70}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cart_hw">
|
||||
<UniqueIdentifier>{e378bc88-805f-46e4-bdb7-f2e4e34cb031}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cart_hw\svp">
|
||||
<UniqueIdentifier>{77300262-55b2-42b4-8677-8a0f6590395c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cd_hw">
|
||||
<UniqueIdentifier>{dd7e5767-713e-42d5-abfb-ab59ccd25413}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw">
|
||||
<UniqueIdentifier>{627b2577-e918-4933-b6ca-ee88e71d16b3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr">
|
||||
<UniqueIdentifier>{8c04dfe4-a59d-4a17-8c77-10733624e78a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cd_hw\libchdr">
|
||||
<UniqueIdentifier>{c2d1f7bf-2c88-4d7b-a68f-12575b0618a3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps">
|
||||
<UniqueIdentifier>{e16ee5c6-ce65-405b-9a5c-a44521d25976}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cd_hw\libchdr\deps">
|
||||
<UniqueIdentifier>{9293a242-e4b2-4cfa-922f-a6c35a16b3ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\libFLAC">
|
||||
<UniqueIdentifier>{72865b37-60c2-485e-85d0-f7b3dd46b334}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\lzma">
|
||||
<UniqueIdentifier>{ab60dae6-ecae-41cf-9005-0172ee1e6f2f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\zlib">
|
||||
<UniqueIdentifier>{3ef433a9-e016-49b9-9e00-0b70f490a5a8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cd_hw\libchdr\deps\libFLAC">
|
||||
<UniqueIdentifier>{62d6de43-8512-4833-a80c-7e322a5569fa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cd_hw\libchdr\deps\lzma">
|
||||
<UniqueIdentifier>{bd64d77e-eee1-4cc7-a9bf-66a3d6b18c76}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cd_hw\libchdr\deps\zlib">
|
||||
<UniqueIdentifier>{e114059e-bad4-47c8-b22e-ffc8b0f72181}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\libFLAC\include">
|
||||
<UniqueIdentifier>{74e3783a-ec29-44d6-abad-540649e4fa6e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC">
|
||||
<UniqueIdentifier>{e6eaaca5-09be-45cc-9244-2eb057b87fc7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\libFLAC\include\private">
|
||||
<UniqueIdentifier>{58ed16f2-130a-4c50-88af-428c35f7144b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\libFLAC\include\protected">
|
||||
<UniqueIdentifier>{a5cd3c86-24f8-4b08-bd9d-c4847fcf1214}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\libFLAC\include\share">
|
||||
<UniqueIdentifier>{d9c30de1-e8c4-4cc3-ba9c-c587da3a2674}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\deps\lzma\DOC">
|
||||
<UniqueIdentifier>{f4e88cd9-c91b-4147-844a-347e615a178d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\cd_hw\libchdr\src">
|
||||
<UniqueIdentifier>{a22d6d84-d426-48cc-aff3-94bb3db76ae0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\cd_hw\libchdr\src">
|
||||
<UniqueIdentifier>{5b1d8d92-510a-4ed6-9d44-50d52115b95f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\input_hw">
|
||||
<UniqueIdentifier>{1d7682a0-22f3-427b-82c6-29102edcf0af}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\input_hw">
|
||||
<UniqueIdentifier>{0d9f9e83-8234-4a91-8e9d-0c9ee6a3d8aa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\m68k">
|
||||
<UniqueIdentifier>{9df6c375-24ca-4fcf-9d53-10beb82b14a9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\m68k">
|
||||
<UniqueIdentifier>{cf2d2c2b-497f-4d42-ac3d-f1521a4a0f8e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\ntsc">
|
||||
<UniqueIdentifier>{f4736f36-cb65-4717-ad2d-872c3f3a3196}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\ntsc">
|
||||
<UniqueIdentifier>{f5886a02-e1fc-47a6-b163-a1ebfe29db7c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\sound">
|
||||
<UniqueIdentifier>{57d6feb9-5818-4e06-8531-ce72a582e376}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\sound">
|
||||
<UniqueIdentifier>{59716199-da27-4702-9207-f6fcf5c26308}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\tremor">
|
||||
<UniqueIdentifier>{838fdc46-93b9-4730-9c57-ea60de21960c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\tremor">
|
||||
<UniqueIdentifier>{bbb5caae-bd60-4364-8b8b-fa8a83061f44}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\core\z80">
|
||||
<UniqueIdentifier>{1bc2b910-8dab-4c12-a343-d739600b45d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\core\z80">
|
||||
<UniqueIdentifier>{db3d1204-0726-4182-a282-78bc51a38b8b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="resources">
|
||||
<UniqueIdentifier>{4e4752cb-3871-4697-befd-2b05b3c8fa11}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\libretro">
|
||||
<UniqueIdentifier>{c8915827-575e-41dc-8615-5c6cdf1eacee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\libretro">
|
||||
<UniqueIdentifier>{f17ac24d-c50b-40a5-a1df-0f75c62554b2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\libretro\libretro-common">
|
||||
<UniqueIdentifier>{bc4e3eee-e957-4cbc-9f29-2fad74ba13f7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\libretro\libretro-common">
|
||||
<UniqueIdentifier>{f6de1d16-d3de-4e83-9c7a-c37d215953e8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\libretro\libretro-common\include">
|
||||
<UniqueIdentifier>{94c0ca93-74a4-42f5-8fbe-91cd6efb1b22}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\libretro\libretro-common\include\compat">
|
||||
<UniqueIdentifier>{bf368293-d035-4348-8ecf-7a3494c69fec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\libretro\libretro-common\include\compat\msvc">
|
||||
<UniqueIdentifier>{1b228852-48fd-4923-bada-c7a44ffd0c46}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="includes\libretro\libretro-common\include\streams">
|
||||
<UniqueIdentifier>{862bfbd5-837e-4c00-80f3-2bdf6c761afc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\libretro\libretro-common\memmap">
|
||||
<UniqueIdentifier>{17c385d7-1fec-4a2e-a9b6-e090654ec0ea}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src\libretro\libretro-common\streams">
|
||||
<UniqueIdentifier>{00db02d2-2769-489f-8054-1bea737089c4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\core\cart_hw\svp\ssp16.h">
|
||||
<Filter>includes\core\cart_hw\svp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\svp\svp.h">
|
||||
<Filter>includes\core\cart_hw\svp</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\areplay.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\eeprom_93c.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\eeprom_i2c.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\eeprom_spi.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\ggenie.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\md_cart.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\sms_cart.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cart_hw\sram.h">
|
||||
<Filter>includes\core\cart_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\assert.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\callback.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\export.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\format.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\metadata.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\ordinals.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\FLAC\stream_decoder.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\FLAC</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\bitmath.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\bitreader.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\cpu.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\crc.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\fixed.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\float.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\format.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\lpc.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\macros.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\md5.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\private\memory.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\private</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\protected\stream_decoder.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\protected</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\share\alloc.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\share</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\share\compat.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\share</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\libFLAC\include\share\endswap.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC\include\share</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\7zTypes.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\Compiler.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzFind.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzHash.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaDec.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaEnc.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\lzma\Precomp.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\gzguts.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inffast.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inffixed.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inflate.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\inftrees.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\zconf.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\zlib.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\deps\zlib\zutil.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\bitstream.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\cdrom.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\chd.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\coretypes.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\flac.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\libchdr\src\huffman.h">
|
||||
<Filter>includes\core\cd_hw\libchdr\src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\cd_cart.h">
|
||||
<Filter>includes\core\cd_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\cdc.h">
|
||||
<Filter>includes\core\cd_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\cdd.h">
|
||||
<Filter>includes\core\cd_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\gfx.h">
|
||||
<Filter>includes\core\cd_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\pcm.h">
|
||||
<Filter>includes\core\cd_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\cd_hw\scd.h">
|
||||
<Filter>includes\core\cd_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\activator.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\gamepad.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\graphic_board.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\input.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\lightgun.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\mouse.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\paddle.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\sportspad.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\teamplayer.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\terebi_oekaki.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\input_hw\xe_1ap.h">
|
||||
<Filter>includes\core\input_hw</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\m68k.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\m68kconf.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\m68kcpu.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\m68ki_cycles.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\m68ki_instruction_jump_table.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\m68kops.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\s68kconf.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\m68k\s68ki_cycles.h">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\ntsc\md_ntsc.h">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\ntsc\md_ntsc_config.h">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\ntsc\md_ntsc_impl.h">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\ntsc\sms_ntsc.h">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\ntsc\sms_ntsc_config.h">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\ntsc\sms_ntsc_impl.h">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\sound\blip_buf.h">
|
||||
<Filter>includes\core\sound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\sound\eq.h">
|
||||
<Filter>includes\core\sound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\sound\psg.h">
|
||||
<Filter>includes\core\sound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\sound\sound.h">
|
||||
<Filter>includes\core\sound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\sound\ym2413.h">
|
||||
<Filter>includes\core\sound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\sound\ym2612.h">
|
||||
<Filter>includes\core\sound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\sound\ym3438.h">
|
||||
<Filter>includes\core\sound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\asm_arm.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\backends.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\block.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\codebook.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\codec_internal.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\config_types.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\ivorbiscodec.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\ivorbisfile.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\lsp_lookup.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\mdct.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\mdct_lookup.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\misc.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\ogg.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\os.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\os_types.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\registry.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\window.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\tremor\window_lookup.h">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\z80\osd_cpu.h">
|
||||
<Filter>includes\core\z80</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\z80\z80.h">
|
||||
<Filter>includes\core\z80</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\genesis.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\hvc.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\io_ctrl.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\loadrom.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\macros.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\mem68k.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\membnk.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\memz80.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\shared.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\state.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\system.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\types.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\vdp_ctrl.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\core\vdp_render.h">
|
||||
<Filter>includes\core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro.h">
|
||||
<Filter>includes\libretro</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\osd.h">
|
||||
<Filter>includes\libretro</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\scrc32.h">
|
||||
<Filter>includes\libretro</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\msvc\stdint.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat\msvc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\apple_compat.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\fnmatch.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\getopt.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\ifaddrs.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\intrinsics.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\msvc.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\posix_string.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\strcasestr.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\strl.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\zconf.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\zlib.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\compat\zutil.h">
|
||||
<Filter>includes\libretro\libretro-common\include\compat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\streams\file_stream.h">
|
||||
<Filter>includes\libretro\libretro-common\include\streams</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\streams\file_stream_transforms.h">
|
||||
<Filter>includes\libretro\libretro-common\include\streams</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\boolean.h">
|
||||
<Filter>includes\libretro\libretro-common\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\memmap.h">
|
||||
<Filter>includes\libretro\libretro-common\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_common.h">
|
||||
<Filter>includes\libretro\libretro-common\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_common_api.h">
|
||||
<Filter>includes\libretro\libretro-common\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_inline.h">
|
||||
<Filter>includes\libretro\libretro-common\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\libretro\libretro-common\include\retro_miscellaneous.h">
|
||||
<Filter>includes\libretro\libretro-common\include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\core\cart_hw\svp\imageformat.txt">
|
||||
<Filter>includes\core\cart_hw\svp</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\cart_hw\svp\svpdoc.txt">
|
||||
<Filter>includes\core\cart_hw\svp</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma.txt">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma\DOC</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma-history.txt">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma\DOC</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma-sdk.txt">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma\DOC</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\cd_hw\libchdr\deps\lzma\DOC\lzma-specification.txt">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\lzma\DOC</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\cd_hw\libchdr\LICENSE.txt">
|
||||
<Filter>includes\core\cd_hw\libchdr</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\m68k\readme.txt">
|
||||
<Filter>includes\core\m68k</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\ntsc\changes.txt">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\ntsc\license.txt">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\ntsc\readme.txt">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</Text>
|
||||
<Text Include="..\..\core\ntsc\sms_ntsc.txt">
|
||||
<Filter>includes\core\ntsc</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\core\cart_hw\svp\ssp16.c">
|
||||
<Filter>src\core\cart_hw\svp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\svp\svp.c">
|
||||
<Filter>src\core\cart_hw\svp</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\areplay.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\eeprom_93c.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\eeprom_i2c.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\eeprom_spi.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\ggenie.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\md_cart.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\sms_cart.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cart_hw\sram.c">
|
||||
<Filter>src\core\cart_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\bitmath.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\bitreader.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\cpu.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\crc.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\fixed.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\float.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\format.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_avx2.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_sse.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_sse2.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\lpc_intrin_sse41.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\md5.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\memory.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\libFLAC\stream_decoder.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\lzma\LzFind.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaDec.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\lzma\LzmaEnc.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\lzma</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\adler32.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\inffast.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\inflate.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\inftrees.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\deps\zlib\zutil.c">
|
||||
<Filter>src\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\bitstream.c">
|
||||
<Filter>src\core\cd_hw\libchdr\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\cdrom.c">
|
||||
<Filter>src\core\cd_hw\libchdr\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\chd.c">
|
||||
<Filter>src\core\cd_hw\libchdr\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\flac.c">
|
||||
<Filter>src\core\cd_hw\libchdr\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\libchdr\src\huffman.c">
|
||||
<Filter>src\core\cd_hw\libchdr\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\cd_cart.c">
|
||||
<Filter>src\core\cd_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\cdc.c">
|
||||
<Filter>src\core\cd_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\cdd.c">
|
||||
<Filter>src\core\cd_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\gfx.c">
|
||||
<Filter>src\core\cd_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\pcm.c">
|
||||
<Filter>src\core\cd_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\cd_hw\scd.c">
|
||||
<Filter>src\core\cd_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\activator.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\gamepad.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\graphic_board.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\input.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\lightgun.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\mouse.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\paddle.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\sportspad.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\teamplayer.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\terebi_oekaki.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\input_hw\xe_1ap.c">
|
||||
<Filter>src\core\input_hw</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\m68k\m68kcpu.c">
|
||||
<Filter>src\core\m68k</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\m68k\s68kcpu.c">
|
||||
<Filter>src\core\m68k</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\ntsc\md_ntsc.c">
|
||||
<Filter>src\core\ntsc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\ntsc\sms_ntsc.c">
|
||||
<Filter>src\core\ntsc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\sound\blip_buf.c">
|
||||
<Filter>src\core\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\sound\eq.c">
|
||||
<Filter>src\core\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\sound\psg.c">
|
||||
<Filter>src\core\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\sound\sound.c">
|
||||
<Filter>src\core\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\sound\ym2413.c">
|
||||
<Filter>src\core\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\sound\ym2612.c">
|
||||
<Filter>src\core\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\sound\ym3438.c">
|
||||
<Filter>src\core\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\bitwise.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\block.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\codebook.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\floor0.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\floor1.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\framing.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\info.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\mapping0.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\mdct.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\registry.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\res012.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\sharedbook.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\synthesis.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\vorbisfile.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\tremor\window.c">
|
||||
<Filter>src\core\tremor</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\z80\z80.c">
|
||||
<Filter>src\core\z80</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\genesis.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\io_ctrl.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\loadrom.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\mem68k.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\membnk.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\memz80.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\state.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\system.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\vdp_ctrl.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\vdp_render.c">
|
||||
<Filter>src\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\libretro\libretro.c">
|
||||
<Filter>src\libretro</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\libretro\scrc32.c">
|
||||
<Filter>src\libretro</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\libretro\libretro-common\memmap\memmap.c">
|
||||
<Filter>src\libretro\libretro-common\memmap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\libretro\libretro-common\streams\file_stream.c">
|
||||
<Filter>src\libretro\libretro-common\streams</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\libretro\libretro-common\streams\file_stream_transforms.c">
|
||||
<Filter>src\libretro\libretro-common\streams</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\libFLAC\AUTHORS">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\libFLAC\COPYING.Xiph">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\libFLAC\README">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\libFLAC</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\zlib\ChangeLog">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\cd_hw\libchdr\deps\zlib\README">
|
||||
<Filter>includes\core\cd_hw\libchdr\deps\zlib</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\cd_hw\libchdr\README.md">
|
||||
<Filter>includes\core\cd_hw\libchdr</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\tremor\CHANGELOG">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\tremor\COPYING">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</None>
|
||||
<None Include="..\..\core\tremor\README">
|
||||
<Filter>includes\core\tremor</Filter>
|
||||
</None>
|
||||
<None Include="libretro.def">
|
||||
<Filter>resources</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>"Thunder Force III (JU) [!].bin"</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>"Thunder Force III (JU) [!].bin"</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,27 +0,0 @@
|
||||
LIBRARY "genesis_plus_gx_libretro"
|
||||
EXPORTS
|
||||
retro_set_environment
|
||||
retro_set_video_refresh
|
||||
retro_set_audio_sample
|
||||
retro_set_audio_sample_batch
|
||||
retro_set_input_poll
|
||||
retro_set_input_state
|
||||
retro_init
|
||||
retro_deinit
|
||||
retro_api_version
|
||||
retro_get_system_info
|
||||
retro_get_system_av_info
|
||||
retro_set_controller_port_device
|
||||
retro_reset
|
||||
retro_run
|
||||
retro_serialize_size
|
||||
retro_serialize
|
||||
retro_unserialize
|
||||
retro_cheat_reset
|
||||
retro_cheat_set
|
||||
retro_load_game
|
||||
retro_load_game_special
|
||||
retro_unload_game
|
||||
retro_get_region
|
||||
retro_get_memory_data
|
||||
retro_get_memory_size
|
@ -44,7 +44,6 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stdio.h>
|
||||
typedef unsigned char bool;
|
||||
#define strncasecmp _strnicmp
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user