[mupen64plus-video-glide64mk2] 35/60: Handle empty display list to avoid infinite loop

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:16:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-video-glide64mk2.

commit cecd8c7cfa649a8fbc371d5f508714cf8fa4936c
Author: Sven Eckelmann <sven at narfation.org>
Date:   Wed Jan 8 10:39:21 2014 +0100

    Handle empty display list to avoid infinite loop
    
    The case when display list pointer is null wasn't handled previously
    and could cause infinite loops. This patch addresses this case.
    Now Resident Evil II boots even with the HLE rsp plugin.
---
 debian/changelog                 |  1 +
 debian/patches/empty_dlist.patch | 33 +++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 3 files changed, 35 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b76fe01..087eeeb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ mupen64plus-video-glide64mk2 (2.0-3) UNRELEASED; urgency=low
   * Upgraded to policy 3.9.5, no changes required
   * debian/patches:
     - Add shader_reset.patch, Set shader again after displaying OSD
+    - Add empty_dlist.patch, Handle empty display list to avoid infinite loop
   * debian/watch:
     - Change upstream check from bitbucket to github
   * debian/copyright:
diff --git a/debian/patches/empty_dlist.patch b/debian/patches/empty_dlist.patch
new file mode 100644
index 0000000..0f4d1dd
--- /dev/null
+++ b/debian/patches/empty_dlist.patch
@@ -0,0 +1,33 @@
+Description: Handle empty display list to avoid infinite loop
+ The case when display list pointer is null wasn't handled previously
+ and could cause infinite loops. This patch addresses this case.
+ Now Resident Evil II boots even with the HLE rsp plugin.
+Author: Bobby Smiles <bobby.smiles32 at gmail.com>
+
+---
+diff --git a/src/Glide64/rdp.cpp b/src/Glide64/rdp.cpp
+index 9d3eb151f9be5b320118404dab9502fa120e26e3..4f7937e1c7b40c4e95b003526311ef46fcc0b04f 100644
+--- a/src/Glide64/rdp.cpp
++++ b/src/Glide64/rdp.cpp
+@@ -761,6 +761,10 @@ EXPORT void CALL ProcessDList(void)
+   FRDP("--- NEW DLIST --- crc: %08lx, ucode: %d, fbuf: %08lx, fbuf_width: %d, dlist start: %08lx, dlist_length: %d, x_scale: %f, y_scale: %f\n", uc_crc, settings.ucode, *gfx.VI_ORIGIN_REG, *gfx.VI_WIDTH_REG, dlist_start, dlist_length, (*gfx.VI_X_SCALE_REG & 0xFFF)/1024.0f, (*gfx.VI_Y_SCALE_REG & 0xFFF)/1024.0f);
+   FRDP_E("--- NEW DLIST --- crc: %08lx, ucode: %d, fbuf: %08lx\n", uc_crc, settings.ucode, *gfx.VI_ORIGIN_REG);
+ 
++  // Do nothing if dlist is empty
++  if (dlist_start == 0)
++      return;
++
+   if (cpu_fb_write == TRUE)
+     DrawPartFrameBufferToScreen();
+   if ((settings.hacks&hack_Tonic) && dlist_length < 16)
+@@ -3397,6 +3401,10 @@ void DetectFrameBufferUsage ()
+   wxUint32 dlist_start = *(wxUint32*)(gfx.DMEM+0xFF0);
+   wxUint32 a;
+ 
++  // Do nothing if dlist is empty
++  if (dlist_start == 0)
++      return;
++
+   int tidal = FALSE;
+   if ((settings.hacks&hack_PMario) && (rdp.copy_ci_index || rdp.frame_buffers[rdp.copy_ci_index].status == ci_copy_self))
+     tidal = TRUE;
diff --git a/debian/patches/series b/debian/patches/series
index c98bbbe..9d1f3b2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ load_hires_cache.patch
 kfreebsd_hurd_support.patch
 path_max_war.patch
 shader_reset.patch
+empty_dlist.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-glide64mk2.git



More information about the Pkg-games-commits mailing list