summaryrefslogtreecommitdiff
path: root/games/sms_sdl/patches
diff options
context:
space:
mode:
Diffstat (limited to 'games/sms_sdl/patches')
-rw-r--r--games/sms_sdl/patches/cflags_and_libz.diff25
-rw-r--r--games/sms_sdl/patches/cflags_and_libz.diff.gzbin0 -> 426 bytes
-rw-r--r--games/sms_sdl/patches/fix_option_parsing.diff83
-rw-r--r--games/sms_sdl/patches/fix_option_parsing.diff.gzbin0 -> 974 bytes
-rw-r--r--games/sms_sdl/patches/japan_and_fm.diff29
-rw-r--r--games/sms_sdl/patches/japan_and_fm.diff.gzbin0 -> 455 bytes
-rw-r--r--games/sms_sdl/patches/x86_64.diff29
-rw-r--r--games/sms_sdl/patches/x86_64.diff.gzbin0 -> 416 bytes
8 files changed, 0 insertions, 166 deletions
diff --git a/games/sms_sdl/patches/cflags_and_libz.diff b/games/sms_sdl/patches/cflags_and_libz.diff
deleted file mode 100644
index cf74397198..0000000000
--- a/games/sms_sdl/patches/cflags_and_libz.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Naur sms_sdl-0.9.4a-r7.1/sdl/Makefile sms_sdl-0.9.4a-r7.1.patched/sdl/Makefile
---- sms_sdl-0.9.4a-r7.1/sdl/Makefile 2003-07-16 23:37:38.000000000 -0400
-+++ sms_sdl-0.9.4a-r7.1.patched/sdl/Makefile 2009-02-05 17:39:28.000000000 -0500
-@@ -12,7 +12,7 @@
- NAME = sms_sdl
-
- CC = gcc
--CFLAGS = `sdl-config --cflags` -O2
-+CFLAGS = `sdl-config --cflags` $(OPTFLAGS)
- DEFINES = -DLSB_FIRST -DX86_ASM
- INCLUDES = -I. -I.. -I../cpu -I../sound
- LIBS = `sdl-config --libs`
-@@ -22,9 +22,9 @@
- ../cpu/z80.o ../sound/emu2413.o ../sound/sn76496.o
-
- # (un)comment to enable ZIP support
--#DEFINES += -DUSE_ZLIB
--#LIBS += -Lz
--#OBJECTS += unzip.o
-+DEFINES += -DUSE_ZLIB
-+LIBS += -lz
-+OBJECTS += unzip.o
-
-
- all: $(NAME)
diff --git a/games/sms_sdl/patches/cflags_and_libz.diff.gz b/games/sms_sdl/patches/cflags_and_libz.diff.gz
new file mode 100644
index 0000000000..57f15592ce
--- /dev/null
+++ b/games/sms_sdl/patches/cflags_and_libz.diff.gz
Binary files differ
diff --git a/games/sms_sdl/patches/fix_option_parsing.diff b/games/sms_sdl/patches/fix_option_parsing.diff
deleted file mode 100644
index ee91ec487d..0000000000
--- a/games/sms_sdl/patches/fix_option_parsing.diff
+++ /dev/null
@@ -1,83 +0,0 @@
-diff -x tags -Naur sms_sdl-0.9.4a-r7.1/sdl/main.c sms_sdl-0.9.4a-r7.1.patched/sdl/main.c
---- sms_sdl-0.9.4a-r7.1/sdl/main.c 2009-10-11 21:49:18.000000000 -0400
-+++ sms_sdl-0.9.4a-r7.1.patched/sdl/main.c 2009-10-12 01:41:24.000000000 -0400
-@@ -42,17 +42,20 @@
-
- static int parse_args(int argc, char **argv)
- {
-- int i;
-+ int i, name_set = 0;
-
- /* default virtual console emulation settings */
- cfg.fm = 0;
- cfg.japan = 0;
-
- cfg.filter = -1;
-- strcpy(cfg.game_name, argv[1]);
-
-- for(i = 2; i < argc; ++i) {
-- if(strcasecmp(argv[i], "--fm") == 0)
-+ for(i = 1; i < argc; ++i) {
-+ if(!name_set && argv[i][0] != '-') {
-+ strcpy(cfg.game_name, argv[i]);
-+ name_set++;
-+ }
-+ else if(strcasecmp(argv[i], "--fm") == 0)
- cfg.fm = 1;
- else if(strcasecmp(argv[i], "--japan") == 0)
- cfg.japan = 1;
-@@ -86,6 +89,11 @@
- else
- printf("WARNING: unknown option '%s'.\n", argv[i]);
- }
-+ if(!name_set) {
-+ printf("ERROR: no ROM filename given\n");
-+ return 0;
-+ }
-+
- return 1;
- }
-
-@@ -112,13 +120,13 @@
- printf(" --filter <mode>\t render using a filter: ");
- for(i = 0; i < sizeof(filters) / sizeof(filters[0]) - 1; ++i)
- printf("%s,", filters[i].name);
-- printf("%s.", filters[i].name);
-+ printf("%s.\n", filters[i].name);
- return 1;
- }
-
- memset(&cfg, 0, sizeof(cfg));
- if(!parse_args(argc, argv))
-- return 0;
-+ return 1;
-
- if(sdlsms_init(&cfg)) {
- sdlsms_emulate();
-diff -x tags -Naur sms_sdl-0.9.4a-r7.1/sdl/saves.c sms_sdl-0.9.4a-r7.1.patched/sdl/saves.c
---- sms_sdl-0.9.4a-r7.1/sdl/saves.c 2003-07-16 23:20:24.000000000 -0400
-+++ sms_sdl-0.9.4a-r7.1.patched/sdl/saves.c 2009-10-11 22:04:10.000000000 -0400
-@@ -88,6 +88,11 @@
- unzCloseCurrentFile(zf);
- unzClose(zf);
-
-+ /* 20091011 bkw: avoid segfaulting if filename contains no dot */
-+ if(!strrchr(romfile, '.')) {
-+ printf("Invalid filename '%s' (no extension), giving up\n", romfile);
-+ return 0;
-+ }
- if(strcasecmp(strrchr(romfile, '.'), ".gg") == 0)
- cart.type = TYPE_GG;
- else
-@@ -126,6 +131,11 @@
-
- fclose(fd);
-
-+ /* 20091011 bkw: avoid segfaulting if filename contains no dot */
-+ if(!strrchr(filename, '.')) {
-+ printf("Invalid filename '%s' (no extension), giving up\n", filename);
-+ return 0;
-+ }
- /* Figure out game image type */
- if(strcasecmp(strrchr(filename, '.'), ".gg") == 0)
- cart.type = TYPE_GG;
diff --git a/games/sms_sdl/patches/fix_option_parsing.diff.gz b/games/sms_sdl/patches/fix_option_parsing.diff.gz
new file mode 100644
index 0000000000..85bfa2791b
--- /dev/null
+++ b/games/sms_sdl/patches/fix_option_parsing.diff.gz
Binary files differ
diff --git a/games/sms_sdl/patches/japan_and_fm.diff b/games/sms_sdl/patches/japan_and_fm.diff
deleted file mode 100644
index d33f405e68..0000000000
--- a/games/sms_sdl/patches/japan_and_fm.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- sms_sdl-0.9.4a-r7.1/sdl/main.c 2003-07-21 12:40:56.000000000 -0300
-+++ sms_sdl-0.9.4a-r7.1.patched/sdl/main.c 2009-05-12 17:42:29.362768285 -0300
-@@ -45,21 +45,19 @@
- int i;
-
- /* default virtual console emulation settings */
-- sms.use_fm = 0;
-- sms.country = TYPE_OVERSEAS;
-+ cfg.fm = 0;
-+ cfg.japan = 0;
-
- cfg.filter = -1;
- strcpy(cfg.game_name, argv[1]);
-
- for(i = 2; i < argc; ++i) {
- if(strcasecmp(argv[i], "--fm") == 0)
-- sms.use_fm = 1;
-+ cfg.fm = 1;
- else if(strcasecmp(argv[i], "--japan") == 0)
-- sms.country = TYPE_DOMESTIC;
-- else if(strcasecmp(argv[i], "--usesram") == 0) {
-+ cfg.japan = 1;
-+ else if(strcasecmp(argv[i], "--usesram") == 0)
- cfg.usesram = 1;
-- sms.save = 1;
-- }
- else if(strcasecmp(argv[i], "--fskip") == 0) {
- if(++i<argc) {
- cfg.frameskip = atoi(argv[i]);
diff --git a/games/sms_sdl/patches/japan_and_fm.diff.gz b/games/sms_sdl/patches/japan_and_fm.diff.gz
new file mode 100644
index 0000000000..9218679f66
--- /dev/null
+++ b/games/sms_sdl/patches/japan_and_fm.diff.gz
Binary files differ
diff --git a/games/sms_sdl/patches/x86_64.diff b/games/sms_sdl/patches/x86_64.diff
deleted file mode 100644
index d18a49910f..0000000000
--- a/games/sms_sdl/patches/x86_64.diff
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -Naur sms_sdl-0.9.4a-r7.1/sdl/Makefile sms_sdl-0.9.4a-r7.1.patched/sdl/Makefile
---- sms_sdl-0.9.4a-r7.1/sdl/Makefile 2009-09-30 18:39:29.000000000 -0400
-+++ sms_sdl-0.9.4a-r7.1.patched/sdl/Makefile 2009-09-30 18:40:10.000000000 -0400
-@@ -13,7 +13,7 @@
-
- CC = gcc
- CFLAGS = `sdl-config --cflags` $(OPTFLAGS)
--DEFINES = -DLSB_FIRST -DX86_ASM
-+DEFINES = -DLSB_FIRST
- INCLUDES = -I. -I.. -I../cpu -I../sound
- LIBS = `sdl-config --libs`
-
-diff -Naur sms_sdl-0.9.4a-r7.1/types.h sms_sdl-0.9.4a-r7.1.patched/types.h
---- sms_sdl-0.9.4a-r7.1/types.h 2003-01-07 12:37:58.000000000 -0500
-+++ sms_sdl-0.9.4a-r7.1.patched/types.h 2009-09-30 18:40:19.000000000 -0400
-@@ -4,11 +4,11 @@
-
- typedef unsigned char uint8;
- typedef unsigned short int uint16;
--typedef unsigned long int uint32;
-+typedef unsigned int uint32;
-
- typedef signed char int8;
- typedef signed short int int16;
--typedef signed long int int32;
-+typedef signed int int32;
-
- #endif /* _TYPES_H_ */
-
diff --git a/games/sms_sdl/patches/x86_64.diff.gz b/games/sms_sdl/patches/x86_64.diff.gz
new file mode 100644
index 0000000000..2a92e32e33
--- /dev/null
+++ b/games/sms_sdl/patches/x86_64.diff.gz
Binary files differ