[mupen64plus-core] 250/310: Allow to disable interrupt delay after DMA SI read/write

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:58:10 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-core.

commit 55d95c94547268d1d787c8debac6991f1a989ae4
Author: Sven Eckelmann <sven at narfation.org>
Date:   Fri Dec 13 15:54:28 2013 +0100

    Allow to disable interrupt delay after DMA SI read/write
    
    Titles like Banjo Tooie are known to hang because the interrupt after the SI
    read/write is delayed. But there are also titles which are known to have
    problems when delay is enabled. Examples are
    
     * Body Harvest
     * City Tour Grandprix - Zennihon GT Senshuken
     * Cruis'n USA
     * GT 64 - Championship Edition
     * Nightmare Creatures
     * Ucchan Nanchan no Hono no Challenger - Denryuu Ira Ira Bou
---
 debian/changelog              |   2 +
 debian/patches/delay_si.patch | 104 ++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series         |   1 +
 3 files changed, 107 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 853fb53..a5926be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ mupen64plus-core (2.0-4) UNRELEASED; urgency=low
     - Add counter_per_op.patch, Allow to overwrite the cycles per instruction
     - Add two_events_interrupt.patch, Don't insert a second interrupt event
       from same type
+    - Add delay_si.patch, Allow to disable interrupt delay after DMA SI
+      read/write
 
  -- Sven Eckelmann <sven at narfation.org>  Sat, 05 Oct 2013 22:52:30 +0200
 
diff --git a/debian/patches/delay_si.patch b/debian/patches/delay_si.patch
new file mode 100644
index 0000000..54b6c6c
--- /dev/null
+++ b/debian/patches/delay_si.patch
@@ -0,0 +1,104 @@
+Description: Allow to disable interrupt delay after DMA SI read/write
+ Titles like Banjo Tooie are known to hang because the interrupt after the SI
+ read/write is delayed. But there are also titles which are known to have
+ problems when delay is enabled. Examples are
+ * Body Harvest
+ * City Tour Grandprix - Zennihon GT Senshuken
+ * Cruis'n USA
+ * GT 64 - Championship Edition
+ * Nightmare Creatures
+ * Ucchan Nanchan no Hono no Challenger - Denryuu Ira Ira Bou
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/doc/emuwiki-api-doc/Mupen64Plus_Core_Parameters.txt b/doc/emuwiki-api-doc/Mupen64Plus_Core_Parameters.txt
+index a5f49f6f4827c469d94d607c75eaa492e0457d26..bf90febd563edb1bfd141a76e92d49116b6c8bd9 100644
+--- a/doc/emuwiki-api-doc/Mupen64Plus_Core_Parameters.txt
++++ b/doc/emuwiki-api-doc/Mupen64Plus_Core_Parameters.txt
+@@ -59,6 +59,10 @@ These are standard parameters which are used by the Mupen64Plus Core library.  T
+ |M64TYPE_INT
+ |Force number of cycles per emulated instruction when set greater than 0.
+ |-
++|DelaySI
++|M64TYPE_BOOL
++|Delay interrupt after DMA SI read/write.
++|-
+ |}
+ 
+ These configuration parameters are used in the Core's event loop to detect keyboard and joystick commands.  They are stored in a configuration section called "CoreEvents" and may be altered by the front-end in order to adjust the behaviour of the emulator.  These may be adjusted at any time and the effect of the change should occur immediately.  The Keysym value stored is actually <tt>(SDLMod << 16) || SDLKey</tt>, so that keypresses with modifiers like shift, control, or alt may be used.
+diff --git a/src/main/main.c b/src/main/main.c
+index a101782fd3eeeca3208d8cc580f338929d790cf3..2dd11eff54416bdcded7aab5884396d37088e9fd 100644
+--- a/src/main/main.c
++++ b/src/main/main.c
+@@ -194,6 +194,7 @@ int main_set_core_defaults(void)
+     ConfigSetDefaultString(g_CoreConfig, "SaveStatePath", "", "Path to directory where emulator save states (snapshots) are saved. If this is blank, the default value of ${UserConfigPath}/save will be used");
+     ConfigSetDefaultString(g_CoreConfig, "SaveSRAMPath", "", "Path to directory where SRAM/EEPROM data (in-game saves) are stored. If this is blank, the default value of ${UserConfigPath}/save will be used");
+     ConfigSetDefaultString(g_CoreConfig, "SharedDataPath", "", "Path to a directory to search when looking for shared data files");
++    ConfigSetDefaultBool(g_CoreConfig, "DelaySI", 1, "Delay interrupt after DMA SI read/write");
+     ConfigSetDefaultInt(g_CoreConfig, "CountPerOp", 0, "Force number of cycles per emulated instruction");
+ 
+     /* handle upgrades */
+@@ -735,6 +736,7 @@ m64p_error main_run(void)
+     savestates_set_autoinc_slot(ConfigGetParamBool(g_CoreConfig, "AutoStateSlotIncrement"));
+     savestates_select_slot(ConfigGetParamInt(g_CoreConfig, "CurrentStateSlot"));
+     no_compiled_jump = ConfigGetParamBool(g_CoreConfig, "NoCompiledJump");
++    delay_si = ConfigGetParamBool(g_CoreConfig, "DelaySI");
+     count_per_op = ConfigGetParamInt(g_CoreConfig, "CountPerOp");
+     if (count_per_op <= 0)
+         count_per_op = 2;
+diff --git a/src/main/main.h b/src/main/main.h
+index 1ffaccdd985f2a995e8faeee1b81c11a959a6c30..9c24a0e4ae8ea33b414199727a0aac0eaf2ebccd 100644
+--- a/src/main/main.h
++++ b/src/main/main.h
+@@ -33,6 +33,8 @@ extern int g_EmulatorRunning;
+ 
+ extern m64p_frame_callback g_FrameCallback;
+ 
++extern int delay_si;
++
+ const char* get_savestatepath(void);
+ const char* get_savesrampath(void);
+ 
+diff --git a/src/memory/dma.c b/src/memory/dma.c
+index 8d606d40e4d430f704ea99055ea42adabab1ee54..4e08878cc118f64993b43444b30334f9f7277c55 100644
+--- a/src/memory/dma.c
++++ b/src/memory/dma.c
+@@ -45,6 +45,7 @@
+ #include "main/util.h"
+ 
+ static unsigned char sram[0x8000];
++int delay_si = 0;
+ 
+ static char *get_sram_path(void)
+ {
+@@ -354,7 +355,14 @@ void dma_si_write(void)
+ 
+     update_pif_write();
+     update_count();
+-    add_interupt_event(SI_INT, /*0x100*/0x900);
++
++    if (delay_si) {
++        add_interupt_event(SI_INT, /*0x100*/0x900);
++    } else {
++        MI_register.mi_intr_reg |= 0x02; // SI
++        si_register.si_stat |= 0x1000; // INTERRUPT
++        check_interupt();
++    }
+ }
+ 
+ void dma_si_read(void)
+@@ -375,6 +383,13 @@ void dma_si_read(void)
+     }
+ 
+     update_count();
+-    add_interupt_event(SI_INT, /*0x100*/0x900);
++
++    if (delay_si) {
++        add_interupt_event(SI_INT, /*0x100*/0x900);
++    } else {
++        MI_register.mi_intr_reg |= 0x02; // SI
++        si_register.si_stat |= 0x1000; // INTERRUPT
++        check_interupt();
++    }
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e6faace..fee9210 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ sdl2_no_unicode.patch
 oot_subscreen_delay_fix.patch
 counter_per_op.patch
 two_events_interrupt.patch
+delay_si.patch

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



More information about the Pkg-games-commits mailing list