shithub: psxe

Download patch

ref: a024a29ac274ef63712d94e62ce73dcbb8306794
parent: 2b36a055e337aace2c8b31a27d2a4bc2e77d7b49
author: allkern <lisandroaalarcon@gmail.com>
date: Fri Aug 2 08:05:10 EDT 2024

Fixed FFIX FMV hang

Introduced a short delay on MDEC DMA IRQs
FFIX FMVs are still broken, but now you can skip them

--- a/compat.txt
+++ b/compat.txt
@@ -10,9 +10,9 @@
 Disney's The Emperor's New Groove (USA).cue *22
   Fixed: Doom (All) *4 (e145a4e)
   Fixed: Elder Gate (Japan) *1 (2989bb6)
-Fear Effect (USA) (Disc 1) *3
+  Fixed: Fear Effect (USA) (Disc 1) *3
   Fixed: Final Doom (All) *4 (e145a4e)
-Final Fantasy IX (USA) (Disc 1) *22
+  Fixed: Final Fantasy IX (USA) (Disc 1) *22
   Fixed: Gran Turismo 2 - Music at the Speed of Sound - The Album (USA) (Bonus PlayStation Disc) *19 (regression)
 Hello Kitty - Cube Frenzy (USA) *22
 Initial D (Japan) *3 (regression)
@@ -25,7 +25,7 @@
   Fixed: Paro Wars (Japan) *12 (e145a4e)
   Fixed: Pet in TV - With My Dear Dog (Japan) *1 (2989bb6)
   Fixed: Philosoma (USA) *15
-PoPoRoGue (Japan) *14
+  Fixed: PoPoRoGue (Japan) *14 (2989bb6)
   Fixed: RayStorm (USA) + RayCrisis (Japan) + RayCrisis - Series Termination (USA) *12
   Fixed: Rockman (Japan) *1 (2989bb6)
 S.C.A.R.S (USA) *11
@@ -32,10 +32,10 @@
 SimCity 2000 (USA) *3
 Sister Princess 2 - Premium Fan Disc (Japan) (Disc A) *2 (regression)
 Star Wars - Rebel Assault II - The Hidden Empire (USA) (Disc 1) *9
-Strider Hiryuu 1 & 2 (Japan) (Disc 1) (Strider Hiryuu) *6
+  Fixed: Strider Hiryuu 1 & 2 (Japan) (Disc 1) (Strider Hiryuu) *6 (2989bb6)
 Tama - Adventurous Ball in Giddy Labyrinth (Japan) *5
-Time Gal & Ninja Hayate (Japan) (En,Ja) (Disc 1) (Time Gal) *9
-Time Gal & Ninja Hayate (Japan) (En,Ja) (Disc 2) (Ninja Hayate) *9
+  Fixed: Time Gal & Ninja Hayate (Japan) (En,Ja) (Disc 1) (Time Gal) *9
+  Fixed: Time Gal & Ninja Hayate (Japan) (En,Ja) (Disc 2) (Ninja Hayate) *9
   Fixed: Tokimeki Memorial 2 (Japan) *1 (2989bb6)
   Fixed: Tomb Raider (USA) *8 (e145a4e)
 Tony Hawk's Pro Skater (USA) *10
--- a/psx/dev/dma.c
+++ b/psx/dev/dma.c
@@ -506,7 +506,7 @@
     }
 
     if (dma->mdec_in_irq_delay) {
-        dma->mdec_in_irq_delay = 0;
+        --dma->mdec_in_irq_delay;
 
         if (!dma->mdec_in_irq_delay)
             if (dma->dicr & DICR_DMA0EN)
@@ -514,7 +514,7 @@
     }
 
     if (dma->mdec_out_irq_delay) {
-        dma->mdec_out_irq_delay = 0;
+        --dma->mdec_out_irq_delay;
 
         if (!dma->mdec_out_irq_delay)
             if (dma->dicr & DICR_DMA1EN)
--- a/psx/dev/mdec.c
+++ b/psx/dev/mdec.c
@@ -445,7 +445,6 @@
                 mdec->output_depth    = 0;
                 mdec->input_request   = 0;
                 mdec->output_request  = 0;
-                mdec->busy            = 0;
                 mdec->input_full      = 0;
                 mdec->output_empty    = 1;
                 mdec->current_block   = 4;
--- a/psx/dev/timer.c
+++ b/psx/dev/timer.c
@@ -279,9 +279,6 @@
     timer->timer[i].irq = 1;
 
     if (trigger) {
-        if ((i == 1))
-            printf("timer 1 irq fire\n");
-
         psx_ic_irq(timer->ic, 16 << i);
     }
 }
--