diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /games-emulation/zsnes/files | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'games-emulation/zsnes/files')
3 files changed, 76 insertions, 550 deletions
diff --git a/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch b/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch deleted file mode 100644 index b3e466036f22..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch +++ /dev/null @@ -1,502 +0,0 @@ ---- a/tools/archopt.c.old -+++ b/tools/archopt.c -@@ -1,8 +1,30 @@ -+/* -+Copyright (C) 2005-2007 Nach, grinvader ( http://www.zsnes.com ) -+ -+This program is free software; you can redistribute it and/or -+modify it under the terms of the GNU General Public License -+version 2 as published by the Free Software Foundation. -+ -+This program is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; if not, write to the Free Software -+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+*/ -+ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> - #include <ctype.h> - -+#ifdef _M_X64 -+#define __x86_64__ -+#endif -+ -+#ifdef __GNUC__ - #ifdef __x86_64__ - #define cpuid(in, a, b, c, d) asm volatile("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in)); - #else -@@ -13,6 +35,22 @@ - movl %%ebx,%%edi;\ - popl %%ebx": "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (in)); - #endif -+#else -+char cpubuf[256]; -+int z_in, z_a, z_b, z_c, z_d; -+void cpuid_run() -+{ -+ _asm { -+ mov eax,z_in -+ cpuid -+ mov z_a,eax -+ mov z_b,ebx -+ mov z_c,ecx -+ mov z_d,edx -+ }; -+} -+#define cpuid(in, a, b, c, d) z_in = in; cpuid_run(); a = z_a; b = z_b; c = z_c; d = z_d; -+#endif - - char *x86_flags[] = - { "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", -@@ -62,6 +100,7 @@ - { - int have = 0x200000; - #ifndef __x86_64__ -+ #ifdef __GNUC__ - asm volatile - ( - " pushfl;" -@@ -76,6 +115,23 @@ - : "=a" (have) - : "c" (have) - ); -+ #else -+ z_c = have; -+ _asm { -+ mov ecx,z_c -+ pushfd -+ pop eax -+ mov edx,eax -+ xor eax,ecx -+ push eax -+ popfd -+ pushfd -+ pop eax -+ xor eax,edx -+ mov z_a,eax -+ }; -+ have = z_a; -+ #endif - #endif - return(have); - } -@@ -196,238 +252,268 @@ - cpu = "native"; - #endif - #endif -- -- if (!cpu && *cpu_family && *vendor_id) -+ if (!cpu) - { -- if (!strcmp(vendor_id, "AuthenticAMD") || strstr(model_name, "AMD")) -+ if (!cpu && *cpu_family && *vendor_id) - { -- if (strstr(flags, " mmx ")) -+ #ifdef __GNUC__ -+ if (!strcmp(vendor_id, "AuthenticAMD") || strstr(model_name, "AMD")) - { -- #if __GNUC__ > 2 -- if (strstr(flags, " 3dnow ")) -+ if (strstr(flags, " mmx ")) - { -- if (strstr(flags, " 3dnowext ") && (atoi(cpu_family) > 5)) -+ #if __GNUC__ > 2 -+ if (strstr(flags, " 3dnow ")) - { -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 0 -- if (strstr(flags, " sse ")) -+ if (strstr(flags, " 3dnowext ") && (atoi(cpu_family) > 5)) - { -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -- if (strstr(flags, " sse2 ") && strstr(flags, " lm ")) //Need two checks to protect Semprons -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 0 -+ if (strstr(flags, " sse ")) - { -- if (strstr(model_name, "Opteron")) -- { -- cpu = "opteron"; -- } -- else if (strstr(model_name, "Athlon(tm) 64")) //Also athlon-fx -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -+ if (strstr(flags, " sse2 ") && strstr(flags, " lm ")) //Need two checks to protect Semprons - { -- cpu = "athlon64"; -+ if (strstr(model_name, "Opteron")) -+ { -+ cpu = "opteron"; -+ } -+ else if (strstr(model_name, "Athlon(tm) 64")) //Also athlon-fx -+ { -+ cpu = "athlon64"; -+ } -+ else -+ { -+ cpu = "k8"; -+ } - } -- else -+ #endif -+ if (!cpu) - { -- cpu = "k8"; -+ if (strstr(model_name, "Athlon(tm) 4")) -+ { -+ cpu = "athlon-4"; -+ } -+ else if (strstr(model_name, "Athlon(tm) MP")) -+ { -+ cpu = "athlon-mp"; -+ } -+ else -+ { -+ cpu = "athlon-xp"; -+ } - } - } -+ -+ if (!cpu && (atoi(model) > 3)) -+ { -+ cpu = "athlon-tbird"; -+ } - #endif -+ - if (!cpu) - { -- if (strstr(model_name, "Athlon(tm) 4")) -- { -- cpu = "athlon-4"; -- } -- else if (strstr(model_name, "Athlon(tm) MP")) -- { -- cpu = "athlon-mp"; -- } -- else -- { -- cpu = "athlon-xp"; -- } -+ cpu = "athlon"; - } - } - -- if (!cpu && (atoi(model) > 3)) -- { -- cpu = "athlon-tbird"; -- } -- #endif -- -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 0 - if (!cpu) - { -- cpu = "athlon"; -+ int model_num = atoi(model); -+ if ((model_num == 9) || (model_num >= 13)) -+ { -+ cpu = "k6-3"; -+ } -+ else -+ { -+ cpu = "k6-2"; -+ } - } -+ #endif - } -+ #endif - -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 0 - if (!cpu) - { -- int model_num = atoi(model); -- if ((model_num == 9) || (model_num >= 13)) -- { -- cpu = "k6-3"; -- } -- else -- { -- cpu = "k6-2"; -- } -+ cpu = "k6"; - } -- #endif -- } -- #endif -- -- if (!cpu) -- { -- cpu = "k6"; - } - } -- } -- else if (!strcmp(vendor_id, "GenuineIntel") || strstr(model_name, "Intel")) -- { -- #if __GNUC__ > 2 -- if (strstr(flags, " mmx ")) -+ else if (!strcmp(vendor_id, "GenuineIntel") || strstr(model_name, "Intel")) - { -- if (strstr(flags, " sse ")) -+ #if __GNUC__ > 2 -+ if (strstr(flags, " mmx ")) - { -- if (strstr(flags, " sse2 ")) -+ if (strstr(flags, " sse ")) - { -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 2 -- if (strstr(flags, " pni ") && strcmp(cpu_family, "6")) -+ if (strstr(flags, " sse2 ")) - { -- if (strstr(flags, " lm ")) -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 2 -+ if (strstr(flags, " pni ") && strcmp(cpu_family, "6")) - { -- cpu = "nocona"; -+ if (strstr(flags, " lm ")) -+ { -+ cpu = "nocona"; -+ } -+ else -+ { -+ cpu = "prescott"; -+ } - } -- else -+ #endif -+ -+ if (!cpu) - { -- cpu = "prescott"; -+ if (!strcmp(cpu_family, "6")) -+ { -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -+ cpu = "pentium-m"; -+ #else -+ cpu = "pentium3"; -+ #endif -+ } -+ else -+ { -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -+ if (strstr(model_name, "Mobile")) -+ { -+ cpu = "pentium4m"; -+ } -+ #endif -+ -+ if (!cpu) -+ { -+ cpu = "pentium4"; -+ } -+ } - } - } -- #endif -- -- if (!cpu) -+ else - { -- if (!strcmp(cpu_family, "6")) -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -+ if (strstr(model_name, "Mobile")) - { -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -- cpu = "pentium-m"; -- #else -- cpu = "pentium3"; -- #endif -+ cpu = "pentium3m"; - } -- else -- { -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -- if (strstr(model_name, "Mobile")) -- { -- cpu = "pentium4m"; -- } -- #endif -+ #endif - -- if (!cpu) -- { -- cpu = "pentium4"; -- } -+ if (!cpu) -+ { -+ cpu = "pentium3"; - } - } - } - else - { -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -- if (strstr(model_name, "Mobile")) -+ if (!strcmp(cpu_family, "6")) - { -- cpu = "pentium3m"; -+ cpu = "pentium2"; - } -- #endif -- -- if (!cpu) -+ else - { -- cpu = "pentium3"; -+ cpu = "pentium-mmx"; - } - } - } -- else -+ #endif -+ -+ if (!cpu) -+ { -+ int family = atoi(cpu_family); -+ if (family > 5) -+ { -+ cpu = "pentiumpro"; -+ } -+ else if (family == 5) -+ { -+ cpu = "pentium"; -+ } -+ } -+ } -+ #if __GNUC__ > 2 -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 2 -+ else if (!strcmp(vendor_id, "CentaurHauls") && strstr(flags, " mmx ")) -+ { -+ if (strstr(flags, " 3dnow ")) - { -- if (!strcmp(cpu_family, "6")) -+ if (atoi(cpu_family) > 5) - { -- cpu = "pentium2"; -+ cpu = "c3"; - } - else - { -- cpu = "pentium-mmx"; -+ cpu = "winchip2"; - } - } -+ #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -+ else if (strstr(flags, " sse ")) -+ { -+ cpu = "c3-2"; -+ } -+ #endif -+ -+ if (!cpu) -+ { -+ cpu = "winchip-c6"; -+ } - } - #endif -+ #endif - - if (!cpu) - { - int family = atoi(cpu_family); - if (family > 5) - { -- cpu = "pentiumpro"; -+ cpu = "i686"; - } - else if (family == 5) - { -- cpu = "pentium"; -+ cpu = "i586"; - } -- } -- } -- #if __GNUC__ > 2 -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 2 -- else if (!strcmp(vendor_id, "CentaurHauls") && strstr(flags, " mmx ")) -- { -- if (strstr(flags, " 3dnow ")) -- { -- if (atoi(cpu_family) > 5) -+ else if (family == 4) - { -- cpu = "c3"; -+ cpu = "i486"; - } - else - { -- cpu = "winchip2"; -+ cpu = "i386"; - } - } -- #if __GNUC__ > 3 || __GNUC_MINOR__ > 3 -+ #else //MSVC -+ cpu = cpubuf; -+ *cpu = 0; -+ -+ if (strstr(flags, " sse2 ")) -+ { -+ strcat(cpu, " /arch:SSE2"); -+ } - else if (strstr(flags, " sse ")) - { -- cpu = "c3-2"; -+ strcat(cpu, " /arch:SSE"); - } -- #endif - -- if (!cpu) -+ #ifdef __x86_64__ -+ if (strstr(flags, " lm ")) //64 bit - { -- cpu = "winchip-c6"; -+ if (!strcmp(vendor_id, "AuthenticAMD") || strstr(model_name, "AMD")) -+ { -+ strcat(cpu, " /favor:AMD64"); -+ } -+ else if (!strcmp(vendor_id, "GenuineIntel") || strstr(model_name, "Intel")) -+ { -+ strcat(cpu, " /favor:EM64T"); -+ } - } -+ #endif -+ #endif - } -- #endif -- #endif -- -- if (!cpu) -+ else - { -- int family = atoi(cpu_family); -- if (family > 5) -- { -- cpu = "i686"; -- } -- else if (family == 5) -- { -- cpu = "i586"; -- } -- else if (family == 4) -- { -- cpu = "i486"; -- } -- else -- { -- cpu = "i386"; -- } -+ puts("Could not open /proc/cpuinfo, and CPUID instruction not available."); -+ return(1); - } -- puts(cpu); -- } -- else -- { -- puts("Could not open /proc/cpuinfo, and CPUID instruction not available."); -- return(1); - } -+ puts(cpu); - - return(0); - } diff --git a/games-emulation/zsnes/files/zsnes-1.51-c++17.patch b/games-emulation/zsnes/files/zsnes-1.51-c++17.patch new file mode 100644 index 000000000000..537f32540c58 --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-1.51-c++17.patch @@ -0,0 +1,76 @@ +--- a/jma/jma.cpp ++++ b/jma/jma.cpp +@@ -48,7 +48,7 @@ namespace JMA + + + //Retreive the file block, what else? +- void jma_open::retrieve_file_block() throw(jma_errors) ++ void jma_open::retrieve_file_block() + { + unsigned char uint_buffer[UINT_SIZE]; + unsigned char ushort_buffer[USHORT_SIZE]; +@@ -168,7 +168,7 @@ namespace JMA + } + + //Constructor for opening JMA files for reading +- jma_open::jma_open(const char *compressed_file_name) throw (jma_errors) ++ jma_open::jma_open(const char *compressed_file_name) + { + decompressed_buffer = 0; + compressed_buffer = 0; +@@ -229,7 +229,7 @@ namespace JMA + } + + //Skip forward a given number of chunks +- void jma_open::chunk_seek(unsigned int chunk_num) throw(jma_errors) ++ void jma_open::chunk_seek(unsigned int chunk_num) + { + //Check the stream is open + if (!stream.is_open()) +@@ -257,7 +257,7 @@ namespace JMA + + //Return a vector of pointers to each file in the JMA, the buffer to hold all the files + //must be initilized outside. +- vector<unsigned char *> jma_open::get_all_files(unsigned char *buffer) throw(jma_errors) ++ vector<unsigned char *> jma_open::get_all_files(unsigned char *buffer) + { + //If there's no stream we can't read from it, so exit + if (!stream.is_open()) +@@ -396,7 +396,7 @@ namespace JMA + } + + //Extracts the file with a given name found in the archive to the given buffer +- void jma_open::extract_file(string& name, unsigned char *buffer) throw(jma_errors) ++ void jma_open::extract_file(string& name, unsigned char *buffer) + { + if (!stream.is_open()) + { +--- a/jma/jma.h ++++ b/jma/jma.h +@@ -64,12 +64,12 @@ namespace JMA + class jma_open + { + public: +- jma_open(const char *) throw(jma_errors); ++ jma_open(const char *); + ~jma_open(); + + std::vector<jma_public_file_info> get_files_info(); +- std::vector<unsigned char *> get_all_files(unsigned char *) throw(jma_errors); +- void extract_file(std::string& name, unsigned char *) throw(jma_errors); ++ std::vector<unsigned char *> get_all_files(unsigned char *); ++ void extract_file(std::string& name, unsigned char *); + bool is_solid(); + + private: +@@ -79,8 +79,8 @@ namespace JMA + unsigned char *decompressed_buffer; + unsigned char *compressed_buffer; + +- void chunk_seek(unsigned int) throw(jma_errors); +- void retrieve_file_block() throw(jma_errors); ++ void chunk_seek(unsigned int); ++ void retrieve_file_block(); + }; + + const char *jma_error_text(jma_errors); diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc43.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc43.patch deleted file mode 100644 index 4650bc12a7d1..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-gcc43.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- src/parsegen.cpp -+++ src/parsegen.cpp -@@ -31,6 +31,7 @@ - #include <sstream> - #include <set> - #include <stack> -+#include <cstring> - using namespace std; - - #include <errno.h> -@@ -1828,7 +1829,7 @@ - } - } - --int main(size_t argc, const char **argv) -+int main(int argc, const char **argv) - { - const char *cheader_file = 0; - bool compile = false; ---- src/tools/depbuild.cpp -+++ src/tools/depbuild.cpp -@@ -24,6 +24,7 @@ - #include <iostream> - #include <string> - #include <cstdio> -+#include <cstdlib> - using namespace std; - - #include "fileutil.h" -@@ -183,7 +184,7 @@ - } - } - --int main(size_t argc, const char *const *const argv) -+int main(int argc, const char *const *const argv) - { - if (argc < 5) - { ---- src/tools/strutil.h -+++ src/tools/strutil.h -@@ -25,6 +25,7 @@ - #include <string> - #include <vector> - #include <cctype> -+#include <cstring> - - struct ci_char_traits : public std::char_traits<char> - { |