aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-09-12 07:40:10 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-09-12 07:40:10 +0000
commitd455bf87bd90a4bf44a036d43af79e8bdf1a8d9a (patch)
treee5529909db05f316784dfb7469edec749535b38c /emulators
parent47e199b0501d0da91b5638cbcf6120aa26e92e5a (diff)
downloadports-d455bf87bd90a4bf44a036d43af79e8bdf1a8d9a.tar.gz
ports-d455bf87bd90a4bf44a036d43af79e8bdf1a8d9a.zip
Notes
Diffstat (limited to 'emulators')
-rw-r--r--emulators/gngb/Makefile2
-rw-r--r--emulators/gngb/distinfo6
-rw-r--r--emulators/gngb/files/patch-memory.c44
3 files changed, 48 insertions, 4 deletions
diff --git a/emulators/gngb/Makefile b/emulators/gngb/Makefile
index f25a08282efb..4555fcc54c8b 100644
--- a/emulators/gngb/Makefile
+++ b/emulators/gngb/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= gngb
-PORTVERSION= 20060204
+PORTVERSION= 20060309
CATEGORIES= emulators
MASTER_SITES= http://m.peponas.free.fr/gngb/download/
diff --git a/emulators/gngb/distinfo b/emulators/gngb/distinfo
index 8c9f6ac23c4e..144424c768cf 100644
--- a/emulators/gngb/distinfo
+++ b/emulators/gngb/distinfo
@@ -1,3 +1,3 @@
-MD5 (gngb-20060204.tar.gz) = 43e1395abf82a787f415d15789782a11
-SHA256 (gngb-20060204.tar.gz) = 1b4de58b5d75b0f87b204c2b46569873e6a66f1535a48089c49e595f595220e1
-SIZE (gngb-20060204.tar.gz) = 178241
+MD5 (gngb-20060309.tar.gz) = 1bd23295ba10bfc21046d6334a1c8e76
+SHA256 (gngb-20060309.tar.gz) = 49c565002a6e9025c33b13aa0ffcdc456b6bd6360fb966460815a3b4007b4bc8
+SIZE (gngb-20060309.tar.gz) = 168911
diff --git a/emulators/gngb/files/patch-memory.c b/emulators/gngb/files/patch-memory.c
new file mode 100644
index 000000000000..b4531627a400
--- /dev/null
+++ b/emulators/gngb/files/patch-memory.c
@@ -0,0 +1,44 @@
+--- src/memory.c.orig Sat Apr 29 02:13:47 2006
++++ src/memory.c Sat Sep 9 18:12:36 2006
+@@ -67,7 +67,7 @@
+ MEM_READ_ENTRY mem_read_tab[0x10];
+ MEM_WRITE_ENTRY mem_write_tab[0x10];
+
+-Sint16 joy_x_min=0;joy_x_max=0;joy_y_min=0;joy_y_max=0;
++Sint16 joy_x_min=0,joy_x_max=0,joy_y_min=0,joy_y_max=0;
+
+ void (*select_rom_page)(Uint16 adr,Uint8 v);
+ void (*select_ram_page)(Uint16 adr,Uint8 v);
+@@ -742,6 +742,13 @@
+ if (!conf.play_movie) {
+
+ if (conf.use_joy) {
++ Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]];
++ Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]];
++ Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2;
++ Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2;
++ Sint16 joy_x_qua=joy_x_mid / 2;
++ Sint16 joy_y_qua=joy_y_mid / 2;
++
+ if ((joy_but[jmap[PAD_START]]) || (key[kmap[PAD_START]])) gb_pad|=0x08; /* Start */
+ if ((joy_but[jmap[PAD_SELECT]]) || (key[kmap[PAD_SELECT]])) gb_pad|=0x04; /* Select */
+ if ((joy_but[jmap[PAD_A]]) || (key[kmap[PAD_A]])) gb_pad|=0x01; /* A */
+@@ -752,18 +759,10 @@
+ if ((joy_axis[jmap[PAD_UP]]<-10000) || (key[kmap[PAD_UP]])) gb_pad|=0x40;
+ if ((joy_axis[jmap[PAD_DOWN]]>10000) || (key[kmap[PAD_DOWN]])) gb_pad|=0x80;*/
+
+- Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]];
+- Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]];
+-
+ if (joy_x_pos>joy_x_max) joy_x_max=joy_x_pos;
+ if (joy_x_pos<joy_x_min) joy_x_min=joy_x_pos;
+ if (joy_y_pos>joy_y_max) joy_y_max=joy_y_pos;
+ if (joy_y_pos<joy_y_min) joy_y_min=joy_y_pos;
+-
+- Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2;
+- Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2;
+- Sint16 joy_x_qua=joy_x_mid / 2;
+- Sint16 joy_y_qua=joy_y_mid / 2;
+
+ if ((joy_x_pos<(joy_x_mid-joy_x_qua)) || (key[kmap[PAD_LEFT]])) gb_pad|=0x20;
+ if ((joy_x_pos>(joy_x_mid+joy_x_qua)) || (key[kmap[PAD_RIGHT]])) gb_pad|=0x10;