Projects
Games
libretro-picodrive
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
libretro-picodrive.changes
Changed
@@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Sep 02 09:34:14 UTC 2020 - i@guoyunhe.me + +- Update to version 0~git20200816: + * Fix non-MSVC builds + * Fixed MSVC compilation, VFS + +------------------------------------------------------------------- Sun Aug 09 10:56:09 UTC 2020 - i@guoyunhe.me - Update to version 0~git20200716:
View file
libretro-picodrive.spec
Changed
@@ -17,7 +17,7 @@ Name: libretro-picodrive -Version: 0~git20200716 +Version: 0~git20200816 Release: 0 Summary: PicoDrive libretro core for MegaDrive/Genesis emulation License: NonFree
View file
_servicedata
Changed
@@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/libretro/picodrive.git</param> - <param name="changesrevision">e6b80af200f19d8d518d427dc20314606e9d8510</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">68329d146bff07b3e8a827ed718d86422cebb67b</param></service></servicedata> \ No newline at end of file
View file
libretro-picodrive-0~git20200716.tar.xz/Makefile -> libretro-picodrive-0~git20200816.tar.xz/Makefile
Changed
@@ -153,6 +153,7 @@ ifeq "$(PLATFORM)" "libretro" OBJS += platform/libretro/libretro.o ifeq "$(USE_LIBRETRO_VFS)" "1" +OBJS += platform/libretro/libretro-common/compat/compat_posix_string.o OBJS += platform/libretro/libretro-common/compat/compat_strl.o OBJS += platform/libretro/libretro-common/compat/fopen_utf8.o OBJS += platform/libretro/libretro-common/encodings/encoding_utf.o
View file
libretro-picodrive-0~git20200716.tar.xz/cpu/sh2/compiler.c -> libretro-picodrive-0~git20200816.tar.xz/cpu/sh2/compiler.c
Changed
@@ -462,9 +462,9 @@ // SR must and R0 should by all means be statically mapped. // XXX the static definition of SR MUST match that in compiler.h -#ifdef __arm__ +#if defined(__arm__) || defined(_M_ARM) #include "../drc/emit_arm.c" -#elif defined(__aarch64__) +#elif defined(__aarch64__) || defined(_M_ARM64) #include "../drc/emit_arm64.c" #elif defined(__mips__) #include "../drc/emit_mips.c" @@ -472,9 +472,9 @@ #include "../drc/emit_riscv.c" #elif defined(__powerpc__) #include "../drc/emit_ppc.c" -#elif defined(__i386__) +#elif defined(__i386__) || defined(_M_X86) #include "../drc/emit_x86.c" -#elif defined(__x86_64__) +#elif defined(__x86_64__) || defined(_M_X64) #include "../drc/emit_x86.c" #else #error unsupported arch @@ -816,7 +816,7 @@ emith_jump_patch(jump, bl->blx, &jump); emith_jump_at(bl->blx, be->tcache_ptr); if ((((uintptr_t)bl->blx & 0x1f) + emith_jump_at_size()-1) > 0x1f) - host_instructions_updated(bl->blx, bl->blx + emith_jump_at_size()-1); + host_instructions_updated(bl->blx, (char*)bl->blx + emith_jump_at_size()-1); } } else { printf("unknown BL type %d\n", bl->type); @@ -855,7 +855,7 @@ // via blx: @jump near jumpcc to blx; @blx load target_pc, far jump emith_jump_patch(bl->jump, bl->blx, &jump); memcpy(bl->blx, bl->jdisp, emith_jump_at_size()); - host_instructions_updated(bl->blx, bl->blx + emith_jump_at_size()-1); + host_instructions_updated(bl->blx, (char*)bl->blx + emith_jump_at_size()-1); } else { printf("unknown BL type %d\n", bl->type); exit(1); @@ -4657,7 +4657,15 @@ case 0x03: // MOV Rm,Rn 0110nnnnmmmm0011 emit_move_r_r(GET_Rn(), GET_Rm()); goto end_op; - case 0x07 ... 0x0f: + case 0x07: + case 0x08: + case 0x09: + case 0x0a: + case 0x0b: + case 0x0c: + case 0x0d: + case 0x0e: + case 0x0f: tmp = rcache_get_reg(GET_Rm(), RC_GR_READ, NULL); tmp2 = rcache_get_reg(GET_Rn(), RC_GR_WRITE, NULL); switch (op & 0x0f) @@ -5140,7 +5148,7 @@ // fill blx backup; do this last to backup final patched code for (i = 0; i < block->entry_count; i++) for (bl = block->entryp[i].o_links; bl; bl = bl->o_next) - memcpy(bl->jdisp, bl->blx ?: bl->jump, emith_jump_at_size()); + memcpy(bl->jdisp, bl->blx ? bl->blx : bl->jump, emith_jump_at_size()); ring_alloc(&tcache_ring[tcache_id], tcache_ptr - block_entry_ptr); host_instructions_updated(block_entry_ptr, tcache_ptr); @@ -6987,9 +6995,9 @@ *end_pc_out = end_pc; if (base_literals_out != NULL) - *base_literals_out = (lowest_literal ?: end_pc); + *base_literals_out = (lowest_literal ? lowest_literal : end_pc); if (end_literals_out != NULL) - *end_literals_out = (end_literals ?: end_pc); + *end_literals_out = (end_literals ? lowest_literal : end_pc); // crc overflow handling, twice to collect all overflows crc = (crc & 0xffff) + (crc >> 16);
View file
libretro-picodrive-0~git20200716.tar.xz/pico/32x/memory.c -> libretro-picodrive-0~git20200816.tar.xz/pico/32x/memory.c
Changed
@@ -1817,7 +1817,7 @@ static void REGPARM(3) sh2_write32_sdram(u32 a, u32 d, SH2 *sh2) { u32 a1 = a & 0x3fffc; - *(u32 *)(sh2->p_sdram + a1) = (d << 16) | (d >> 16); + *(u32 *)((char*)sh2->p_sdram + a1) = (d << 16) | (d >> 16); #ifdef DRC_SH2 u8 *p = sh2->p_drcblk_ram; u32 t = p[a1 >> SH2_DRCBLK_RAM_SHIFT]; @@ -1940,7 +1940,7 @@ } else if ((a & 0xc6000000) == 0x02000000) { // banked ROM. Return bank address u32 bank = carthw_ssf2_banks[(a >> 19) & 7] << 19; - ret = sh2->p_rom + bank; + ret = (char*)sh2->p_rom + bank; *mask = 0x07ffff; } @@ -1958,7 +1958,11 @@ return 0; if ((ps = p32x_sh2_get_mem_ptr(src, &mask, sh2)) == (void *)-1) return 0; +#if _MSC_VER + (char*)ps += src & mask; +#else ps += src & mask; +#endif len = count * size; // DRAM in byte access is always in overwrite mode @@ -1968,13 +1972,17 @@ // align dst to halfword if (dst & 1) { p32x_sh2_write8(dst, *(u8 *)((uptr)ps ^ 1), sh2); +#if _MSC_VER + ((char*)ps)++, dst++, len --; +#else ps++, dst++, len --; +#endif } // copy data if ((uptr)ps & 1) { // unaligned, use halfword copy mode to reduce memory bandwidth - u16 *sp = (u16 *)(ps - 1); + u16 *sp = (u16 *)((char*)ps - 1); u16 dl, dh = *sp++; for (i = 0; i < (len & ~1); i += 2, dst += 2, sp++) { dl = dh, dh = *sp;
View file
libretro-picodrive-0~git20200716.tar.xz/pico/draw.c -> libretro-picodrive-0~git20200816.tar.xz/pico/draw.c
Changed
@@ -1891,7 +1891,7 @@ if (dest != NULL) { DrawLineDestBase = dest; DrawLineDestIncrement = increment; - Pico.est.DrawLineDest = DrawLineDestBase + Pico.est.DrawScanline * increment; + Pico.est.DrawLineDest = (char*)DrawLineDestBase + Pico.est.DrawScanline * increment; } else { DrawLineDestBase = DefOutBuff;
View file
libretro-picodrive-0~git20200816.tar.xz/platform/libretro/libretro-common/compat/compat_posix_string.c
Added
@@ -0,0 +1,104 @@ +/* Copyright (C) 2010-2018 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (compat_posix_string.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 <ctype.h> + +#include <compat/posix_string.h> + +#ifdef _WIN32 + +#undef strcasecmp +#undef strdup +#undef isblank +#undef strtok_r +#include <ctype.h> +#include <stdlib.h> +#include <stddef.h> +#include <compat/strl.h> + +#include <string.h> + +int retro_strcasecmp__(const char *a, const char *b) +{ + while (*a && *b) + { + int a_ = tolower(*a); + int b_ = tolower(*b); + + if (a_ != b_) + return a_ - b_; + + a++; + b++; + } + + return tolower(*a) - tolower(*b); +} + +char *retro_strdup__(const char *orig) +{ + size_t len = strlen(orig) + 1; + char *ret = (char*)malloc(len); + if (!ret) + return NULL; + + strlcpy(ret, orig, len); + return ret; +} + +int retro_isblank__(int c) +{ + return (c == ' ') || (c == '\t'); +} + +char *retro_strtok_r__(char *str, const char *delim, char **saveptr) +{ + char *first = NULL; + if (!saveptr || !delim) + return NULL; + + if (str) + *saveptr = str; + + do + { + char *ptr = NULL; + first = *saveptr; + while (*first && strchr(delim, *first)) + *first++ = '\0'; + + if (*first == '\0') + return NULL; + + ptr = first + 1; + + while (*ptr && !strchr(delim, *ptr)) + ptr++; + + *saveptr = ptr + (*ptr ? 1 : 0); + *ptr = '\0'; + } while (strlen(first) == 0); + + return first; +} + +#endif
View file
libretro-picodrive-0~git20200816.tar.xz/platform/libretro/libretro-common/include/file
Added
+(directory)
View file
libretro-picodrive-0~git20200816.tar.xz/platform/libretro/libretro-common/include/file/file_path.h
Added
@@ -0,0 +1,531 @@ +/* Copyright (C) 2010-2019 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (file_path.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_FILE_PATH_H +#define __LIBRETRO_SDK_FILE_PATH_H + +#include <stdio.h> +#include <stdint.h> +#include <stddef.h> +#include <sys/types.h> + +#include <libretro.h> +#include <retro_common_api.h> + +#include <boolean.h> + +RETRO_BEGIN_DECLS + +#define PATH_REQUIRED_VFS_VERSION 3 + +void path_vfs_init(const struct retro_vfs_interface_info* vfs_info); + +/* Order in this enum is equivalent to negative sort order in filelist + * (i.e. DIRECTORY is on top of PLAIN_FILE) */ +enum +{ + RARCH_FILETYPE_UNSET, + RARCH_PLAIN_FILE, + RARCH_COMPRESSED_FILE_IN_ARCHIVE, + RARCH_COMPRESSED_ARCHIVE, + RARCH_DIRECTORY, + RARCH_FILE_UNSUPPORTED +}; + +/** + * path_is_compressed_file: + * @path : path + * + * Checks if path is a compressed file. + * + * Returns: true (1) if path is a compressed file, otherwise false (0). + **/ +bool path_is_compressed_file(const char *path); + +/** + * path_contains_compressed_file: + * @path : path + * + * Checks if path contains a compressed file. + * + * Currently we only check for hash symbol (#) inside the pathname. + * If path is ever expanded to a general URI, we should check for that here. + * + * Example: Somewhere in the path there might be a compressed file + * E.g.: /path/to/file.7z#mygame.img + * + * Returns: true (1) if path contains compressed file, otherwise false (0). + **/ +#define path_contains_compressed_file(path) (path_get_archive_delim((path)) != NULL) + +/** + * path_get_archive_delim: + * @path : path + * + * Gets delimiter of an archive file. Only the first '#' + * after a compression extension is considered. + * + * Returns: pointer to the delimiter in the path if it contains + * a compressed file, otherwise NULL. + */ +const char *path_get_archive_delim(const char *path); + +/** + * path_get_extension: + * @path : path + * + * Gets extension of file. Only '.'s + * after the last slash are considered. + * + * Returns: extension part from the path. + */ +const char *path_get_extension(const char *path); + +/** + * path_remove_extension: + * @path : path + * + * Mutates path by removing its extension. Removes all + * text after and including the last '.'. + * Only '.'s after the last slash are considered. + * + * Returns: + * 1) If path has an extension, returns path with the + * extension removed. + * 2) If there is no extension, returns NULL. + * 3) If path is empty or NULL, returns NULL + */ +char *path_remove_extension(char *path); + +/** + * path_basename: + * @path : path + * + * Get basename from @path. + * + * Returns: basename from path. + **/ +const char *path_basename(const char *path); + +/** + * path_basedir: + * @path : path + * + * Extracts base directory by mutating path. + * Keeps trailing '/'. + **/ +void path_basedir(char *path); + +/** + * path_parent_dir: + * @path : path + * + * Extracts parent directory by mutating path. + * Assumes that path is a directory. Keeps trailing '/'. + * If the path was already at the root directory, returns empty string + **/ +void path_parent_dir(char *path); + +/** + * path_resolve_realpath: + * @buf : input and output buffer for path + * @size : size of buffer + * @resolve_symlinks : whether to resolve symlinks or not + * + * Resolves use of ".", "..", multiple slashes etc in absolute paths. + * + * Relative paths are rebased on the current working dir. + * + * Returns: @buf if successful, NULL otherwise. + * Note: Not implemented on consoles + * Note: Symlinks are only resolved on Unix-likes + * Note: The current working dir might not be what you expect, + * e.g. on Android it is "/" + * Use of fill_pathname_resolve_relative() should be prefered + **/ +char *path_resolve_realpath(char *buf, size_t size, bool resolve_symlinks); + +/** + * path_relative_to: + * @out : buffer to write the relative path to + * @path : path to be expressed relatively + * @base : relative to this + * @size : size of output buffer + * + * Turns @path into a path relative to @base and writes it to @out. + * + * @base is assumed to be a base directory, i.e. a path ending with '/' or '\'. + * Both @path and @base are assumed to be absolute paths without "." or "..". + * + * E.g. path /a/b/e/f.cgp with base /a/b/c/d/ turns into ../../e/f.cgp + **/ +void path_relative_to(char *out, const char *path, const char *base, size_t size); + +/** + * path_is_absolute: + * @path : path + * + * Checks if @path is an absolute path or a relative path. + * + * Returns: true if path is absolute, false if path is relative. + **/ +bool path_is_absolute(const char *path); + +/** + * fill_pathname: + * @out_path : output path + * @in_path : input path + * @replace : what to replace + * @size : buffer size of output path + *
View file
libretro-picodrive-0~git20200816.tar.xz/platform/libretro/libretro-common/include/vfs/vfs.h
Added
@@ -0,0 +1,111 @@ +/* Copyright (C) 2010-2019 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_H +#define __LIBRETRO_SDK_VFS_H + +#include <retro_common_api.h> +#include <boolean.h> + +#ifdef RARCH_INTERNAL +#ifndef VFS_FRONTEND +#define VFS_FRONTEND +#endif +#endif + +RETRO_BEGIN_DECLS + +#ifdef _WIN32 +typedef void* HANDLE; +#endif + +#ifdef HAVE_CDROM +typedef struct +{ + char *cue_buf; + size_t cue_len; + int64_t byte_pos; + char drive; + unsigned char cur_min; + unsigned char cur_sec; + unsigned char cur_frame; + unsigned char cur_track; + unsigned cur_lba; + unsigned last_frame_lba; + unsigned char last_frame[2352]; + bool last_frame_valid; +} vfs_cdrom_t; +#endif + +enum vfs_scheme +{ + VFS_SCHEME_NONE = 0, + VFS_SCHEME_CDROM +}; + +#ifndef __WINRT__ +#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; +#ifdef _WIN32 + HANDLE fh; +#endif + char* orig_path; + uint64_t mappos; + uint64_t mapsize; + uint8_t *mapped; + enum vfs_scheme scheme; +#ifdef HAVE_CDROM + vfs_cdrom_t cdrom; +#endif +}; +#endif + +/* 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 + +#ifdef VFS_FRONTEND +typedef struct retro_vfs_dir_handle libretro_vfs_implementation_dir; +#else +typedef struct libretro_vfs_implementation_dir libretro_vfs_implementation_dir; +#endif + +RETRO_END_DECLS + +#endif
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.