pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libretro-fbalpha: Cherry pick some patches from upstream post-0.2.97.43.



Module Name:	pkgsrc-wip
Committed By:	Nia Alarie <nia.alarie%gmail.com@localhost>
Pushed By:	nee
Date:		Tue May 8 22:53:40 2018 +0100
Changeset:	9afe3e17c1592498503a1dd10be9e41b50c9ecf7

Modified Files:
	libretro-fbalpha/distinfo
Added Files:
	libretro-fbalpha/patches/patch-src_burn_drv_galaxian_d__galaxian.cpp
	libretro-fbalpha/patches/patch-src_burn_drv_pst90s_d__raiden2.cpp
	libretro-fbalpha/patches/patch-src_burn_snd_msm6295.cpp
	libretro-fbalpha/patches/patch-src_burner_libretro_libretro.cpp
	libretro-fbalpha/patches/patch-src_cpu_nec__intf.cpp

Log Message:
libretro-fbalpha: Cherry pick some patches from upstream post-0.2.97.43.

Importantly, this fixes DIP switches in quite a few games.

Unfortunately I cannot pull down fixes easily from between 0.2.97.42
and 0.2.97.43, which is a shame because there are some interesting
ones, but I can only do so much without access to the commit log.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9afe3e17c1592498503a1dd10be9e41b50c9ecf7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libretro-fbalpha/distinfo                          |  5 ++++
 .../patch-src_burn_drv_galaxian_d__galaxian.cpp    | 27 ++++++++++++++++++
 .../patch-src_burn_drv_pst90s_d__raiden2.cpp       | 26 +++++++++++++++++
 .../patches/patch-src_burn_snd_msm6295.cpp         | 17 +++++++++++
 .../patches/patch-src_burner_libretro_libretro.cpp | 33 ++++++++++++++++++++++
 .../patches/patch-src_cpu_nec__intf.cpp            | 19 +++++++++++++
 6 files changed, 127 insertions(+)

diffs:
diff --git a/libretro-fbalpha/distinfo b/libretro-fbalpha/distinfo
index 207baca417..4ffc3211a9 100644
--- a/libretro-fbalpha/distinfo
+++ b/libretro-fbalpha/distinfo
@@ -4,3 +4,8 @@ SHA1 (libretro-fbalpha-0.2.97.42.20180408-08cf5c6abbda2512d5ef73ef8483b849a34a76
 RMD160 (libretro-fbalpha-0.2.97.42.20180408-08cf5c6abbda2512d5ef73ef8483b849a34a7603.tar.gz) = e52b45173079a5449d036eefd539ec0f2ec7cba7
 SHA512 (libretro-fbalpha-0.2.97.42.20180408-08cf5c6abbda2512d5ef73ef8483b849a34a7603.tar.gz) = 6bdbbc1a082878d14c86d5c5ddb5cc86f6342f2f408bedadc7510c612cf781bb4d0e836bd0c99997900f552d74075d34c812775e1a71760612a038667aa06e1d
 Size (libretro-fbalpha-0.2.97.42.20180408-08cf5c6abbda2512d5ef73ef8483b849a34a7603.tar.gz) = 9243803 bytes
+SHA1 (patch-src_burn_drv_galaxian_d__galaxian.cpp) = f7a7b2449c9c5116b653c4ef51cfaaafe8821df0
+SHA1 (patch-src_burn_drv_pst90s_d__raiden2.cpp) = a74ab0ce1c3c2ff5ef579d4051aba4795d274898
+SHA1 (patch-src_burn_snd_msm6295.cpp) = 5972fa472e081cd6d0ff30babdbe9d012f362cdc
+SHA1 (patch-src_burner_libretro_libretro.cpp) = b6fd783526f99a6fc296ccbf27e661af9ee14246
+SHA1 (patch-src_cpu_nec__intf.cpp) = 631d76b945ee7e214e47718b45666f27ac2ea7b2
diff --git a/libretro-fbalpha/patches/patch-src_burn_drv_galaxian_d__galaxian.cpp b/libretro-fbalpha/patches/patch-src_burn_drv_galaxian_d__galaxian.cpp
new file mode 100644
index 0000000000..515f1f09c3
--- /dev/null
+++ b/libretro-fbalpha/patches/patch-src_burn_drv_galaxian_d__galaxian.cpp
@@ -0,0 +1,27 @@
+$NetBSD$
+
+Fixing The End sound volume (#199)
+
+Upstream commit b5550733fb162ae4c5de15d2f9c42db4a919c3df.
+
+--- src/burn/drv/galaxian/d_galaxian.cpp.orig	2018-04-08 06:33:58.000000000 +0000
++++ src/burn/drv/galaxian/d_galaxian.cpp
+@@ -16864,12 +16864,12 @@ static INT32 TheendInit()
+ 	
+ 	KonamiPPIInit();
+ 	
+-	filter_rc_set_src_gain(0, 0.02);
+-	filter_rc_set_src_gain(1, 0.02);
+-	filter_rc_set_src_gain(2, 0.02);
+-	filter_rc_set_src_gain(3, 0.02);
+-	filter_rc_set_src_gain(4, 0.02);
+-	filter_rc_set_src_gain(5, 0.02);
++	filter_rc_set_src_gain(0, 0.12);
++	filter_rc_set_src_gain(1, 0.12);
++	filter_rc_set_src_gain(2, 0.12);
++	filter_rc_set_src_gain(3, 0.12);
++	filter_rc_set_src_gain(4, 0.12);
++	filter_rc_set_src_gain(5, 0.12);
+ 	
+ 	return nRet;
+ }
diff --git a/libretro-fbalpha/patches/patch-src_burn_drv_pst90s_d__raiden2.cpp b/libretro-fbalpha/patches/patch-src_burn_drv_pst90s_d__raiden2.cpp
new file mode 100644
index 0000000000..1923ac7920
--- /dev/null
+++ b/libretro-fbalpha/patches/patch-src_burn_drv_pst90s_d__raiden2.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+Fixing Raiden 2 ARM issue (#198)
+
+Upstream commit: bfc1f2fa0a9ca41add7858ba3badfa49257ec069
+
+--- src/burn/drv/pst90s/d_raiden2.cpp.orig	2018-04-08 06:33:58.000000000 +0000
++++ src/burn/drv/pst90s/d_raiden2.cpp
+@@ -802,7 +802,7 @@ static void cop_cmd_write(INT32 offset,
+ 			cop_status |= 0x8000;
+ 			cop_angle = 0;
+ 		} else {
+-			cop_angle = (UINT16)(atan(double(dx)/double(dy)) * 128 / M_PI);
++			cop_angle = (INT32)(atan(double(dx)/double(dy)) * 128 / M_PI);
+ 			if(dy<0)
+ 				cop_angle += 0x80;
+ 		}
+@@ -822,7 +822,7 @@ static void cop_cmd_write(INT32 offset,
+ 			cop_status |= 0x8000;
+ 			cop_angle = 0;
+ 		} else {
+-			cop_angle = (UINT16)(atan(double(dx)/double(dy)) * 128 / M_PI);
++			cop_angle = (INT32)(atan(double(dx)/double(dy)) * 128 / M_PI);
+ 			if(dy<0)
+ 				cop_angle += 0x80;
+ 		}
diff --git a/libretro-fbalpha/patches/patch-src_burn_snd_msm6295.cpp b/libretro-fbalpha/patches/patch-src_burn_snd_msm6295.cpp
new file mode 100644
index 0000000000..63a64fa72d
--- /dev/null
+++ b/libretro-fbalpha/patches/patch-src_burn_snd_msm6295.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Fixing some sound interpolation issue in nec cpu
+
+Upstream commit: 458002c9ce850864952ff5cc62818315d788957f
+
+--- src/burn/snd/msm6295.cpp.orig	2018-04-08 06:33:58.000000000 +0000
++++ src/burn/snd/msm6295.cpp
+@@ -302,7 +302,7 @@ static void MSM6295Render_Cubic(INT32 nC
+ 					pChannelInfo->nBufPos = 4;
+ 				}
+ 
+-				nOutput += INTERPOLATE4PS_16BIT(nFractionalPosition,
++				nOutput += INTERPOLATE4PS_16BIT(nFractionalPosition & 0x0FFF,
+ 												MSM6295ChannelData[nChip][nChannel][pChannelInfo->nBufPos - 4],
+ 												MSM6295ChannelData[nChip][nChannel][pChannelInfo->nBufPos - 3],
+ 												MSM6295ChannelData[nChip][nChannel][pChannelInfo->nBufPos - 2],
diff --git a/libretro-fbalpha/patches/patch-src_burner_libretro_libretro.cpp b/libretro-fbalpha/patches/patch-src_burner_libretro_libretro.cpp
new file mode 100644
index 0000000000..610df86dfa
--- /dev/null
+++ b/libretro-fbalpha/patches/patch-src_burner_libretro_libretro.cpp
@@ -0,0 +1,33 @@
+$NetBSD$
+
+Fix for "Dip switches not working? #185"
+
+Upstream commit: bbae856806f589286f340e55c9653b0f6d45120f
+
+--- src/burner/libretro/libretro.cpp.orig	2018-04-08 06:33:58.000000000 +0000
++++ src/burner/libretro/libretro.cpp
+@@ -165,6 +165,7 @@ INT32 nFireButtons = 0;
+ bool bStreetFighterLayout = false;
+ bool bButtonMapped = false;
+ bool bVolumeIsFireButton = false;
++INT32 bDip = 1;
+ 
+ // libretro globals
+ void retro_set_video_refresh(retro_video_refresh_t cb) { video_cb = cb; }
+@@ -3391,9 +3392,14 @@ INT32 GameInpInit()
+ 	}
+ 	memset(GameInp, 0, nSize);
+ 
+-	GameInpBlank(1);
++	// Initializing dipswitches several times is causing issues (#185)
++	// So let's use a variable (bDip global) to avoid initializing them several times
++	GameInpBlank(bDip);
+ 
+-	InpDIPSWResetDIPs();
++	if(bDip)
++		InpDIPSWResetDIPs();
++
++	bDip = 0;
+ 
+ 	GameInpInitMacros();
+ 
diff --git a/libretro-fbalpha/patches/patch-src_cpu_nec__intf.cpp b/libretro-fbalpha/patches/patch-src_cpu_nec__intf.cpp
new file mode 100644
index 0000000000..3592df05ab
--- /dev/null
+++ b/libretro-fbalpha/patches/patch-src_cpu_nec__intf.cpp
@@ -0,0 +1,19 @@
+$NetBSD$
+
+"Fixing some UB in nec cpu"
+
+Upstream commit: 1c7d1ee57d7853ab8928e12a9eb80efe509ba96c
+
+--- src/cpu/nec_intf.cpp.orig	2018-04-08 06:33:58.000000000 +0000
++++ src/cpu/nec_intf.cpp
+@@ -211,8 +211,8 @@ UINT32 VezReadLong(UINT32 a)
+ 	if ( p )
+ 		return *(p + (a / 4));
+ 	else
+-		return VezCurrentCPU->ReadHandler(a) + (VezCurrentCPU->ReadHandler(a+1) * 0x100) + 
+-			(VezCurrentCPU->ReadHandler(a+2) * 0x10000) + (VezCurrentCPU->ReadHandler(a+3) * 0x1000000);
++		return VezCurrentCPU->ReadHandler(a) + (VezCurrentCPU->ReadHandler(a+1) << 8) +
++			(VezCurrentCPU->ReadHandler(a+2) << 16) + (VezCurrentCPU->ReadHandler(a+3) << 24);
+ }
+ 
+ static void VezCheatWrite(UINT32 a, UINT8 d)


Home | Main Index | Thread Index | Old Index