mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
GIF: Reimplement GIF FIFO to kick in only when it is needed.
Need to adjust GameDB entries for to remove ones no longer required, added EE Timing fix for SOCOM as that seems to fix it up like its sequel. Some misc changes too which are inconsequential (mostly formatting)
This commit is contained in:
@@ -31,8 +31,6 @@ GUST-00009:
|
||||
region: "NTSC-J"
|
||||
roundModes:
|
||||
eeRoundMode: 0 # Fixes jump issue.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering sprites.
|
||||
PAPX-90203:
|
||||
name: "Gran Turismo 2000 [Trial]"
|
||||
region: "NTSC-J"
|
||||
@@ -2210,8 +2208,6 @@ SCES-50928:
|
||||
region: "PAL-M6"
|
||||
clampModes:
|
||||
vuClampMode: 2 # Fixes bad shadows.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Resolves random sprite/HUD corruption.
|
||||
SCES-50934:
|
||||
name: "WRC II Extreme"
|
||||
region: "PAL-M7"
|
||||
@@ -2419,8 +2415,6 @@ SCES-51618:
|
||||
region: "PAL-M5"
|
||||
clampModes:
|
||||
vuClampMode: 2 # Fixes bad shadows.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Resolves random sprite/HUD corruption.
|
||||
SCES-51635:
|
||||
name: "Brave - The Search for Spirit Dancer"
|
||||
region: "PAL-M5"
|
||||
@@ -3678,8 +3672,6 @@ SCKA-24008:
|
||||
region: "NTSC-K"
|
||||
clampModes:
|
||||
vuClampMode: 2 # Fixes bad shadows.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Resolves random sprite/HUD corruption.
|
||||
SCKA-30001:
|
||||
name: "Gran Turismo 4"
|
||||
region: "NTSC-K"
|
||||
@@ -3997,8 +3989,6 @@ SCPS-15044:
|
||||
region: "NTSC-J"
|
||||
clampModes:
|
||||
vuClampMode: 2 # Fixes bad shadows.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Resolves random sprite/HUD corruption.
|
||||
SCPS-15045:
|
||||
name: "Ka (Mosquito) - Let's Go Hawaiian"
|
||||
region: "NTSC-J"
|
||||
@@ -5077,8 +5067,6 @@ SCUS-97134:
|
||||
compat: 5
|
||||
clampModes:
|
||||
vuClampMode: 2 # Fixes bad shadows.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Resolves random sprite/HUD corruption.
|
||||
SCUS-97136:
|
||||
name: "NCAA Final Four 2002"
|
||||
region: "NTSC-U"
|
||||
@@ -5314,8 +5302,6 @@ SCUS-97205:
|
||||
region: "NTSC-U"
|
||||
clampModes:
|
||||
vuClampMode: 2 # Fixes bad shadows.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Resolves random sprite/HUD corruption.
|
||||
SCUS-97206:
|
||||
name: "PlayStation Underground Jampack Summer 2002"
|
||||
region: "NTSC-U"
|
||||
@@ -5399,8 +5385,6 @@ SCUS-97230:
|
||||
region: "NTSC-U"
|
||||
clampModes:
|
||||
vuClampMode: 2 # Fixes bad shadows.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Resolves random sprite/HUD corruption.
|
||||
SCUS-97231:
|
||||
name: "Arc the Lad - Twilight of the Spirits"
|
||||
region: "NTSC-U"
|
||||
@@ -8786,13 +8770,9 @@ SLES-51011:
|
||||
SLES-51013:
|
||||
name: "Blade II"
|
||||
region: "PAL-E"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering HUD. (originally was EE Timing Hack but required since r4821)
|
||||
SLES-51014:
|
||||
name: "Blade II"
|
||||
region: "PAL-F"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering HUD. (originally was EE Timing Hack but required since r4821)
|
||||
SLES-51017:
|
||||
name: "Scooby-Doo! and The Night of 100 Frights"
|
||||
region: "PAL-E"
|
||||
@@ -9537,8 +9517,6 @@ SLES-51372:
|
||||
compat: 5
|
||||
clampModes:
|
||||
vuClampMode: 3 # Fixes minor SPS on characters.
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLES-51374:
|
||||
name: "RoboCop"
|
||||
region: "PAL-M5"
|
||||
@@ -10409,8 +10387,6 @@ SLES-51877:
|
||||
SLES-51879:
|
||||
name: "Hot Wheels World Race"
|
||||
region: "PAL-E"
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLES-51881:
|
||||
name: "Mercedes Bens World Racing"
|
||||
region: "PAL-F-G"
|
||||
@@ -10649,8 +10625,6 @@ SLES-51989:
|
||||
compat: 5
|
||||
clampModes:
|
||||
vuClampMode: 3 # Fixes minor SPS on characters.
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLES-51991:
|
||||
name: "Dance UK"
|
||||
region: "PAL-E"
|
||||
@@ -10726,8 +10700,6 @@ SLES-52026:
|
||||
compat: 5
|
||||
clampModes:
|
||||
vuClampMode: 3 # Fixes minor SPS on characters.
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLES-52028:
|
||||
name: "Junior Sports Basketball"
|
||||
region: "PAL-M5"
|
||||
@@ -14518,7 +14490,6 @@ SLES-53904:
|
||||
name: "DT Racer"
|
||||
region: "PAL-M5"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes corrupted graphics in the menus.
|
||||
- VUKickstartHack # Fixes TLB misses and collision bugs.
|
||||
SLES-53906:
|
||||
name: "50cent - Bulletproof"
|
||||
@@ -14668,8 +14639,6 @@ SLES-53979:
|
||||
SLES-53982:
|
||||
name: "Fight Night Round 3"
|
||||
region: "PAL-E-F"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes corrupt textures.
|
||||
SLES-53984:
|
||||
name: "Ice Age 2 - The Meltdown"
|
||||
region: "PAL-M6"
|
||||
@@ -15533,8 +15502,6 @@ SLES-54396:
|
||||
SLES-54400:
|
||||
name: "SpongeBob SquarePants - Creature from the Krusty Krab"
|
||||
region: "PAL-M7"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes bad graphics.
|
||||
SLES-54402:
|
||||
name: "Need for Speed - Carbon [Collector's Edition]"
|
||||
region: "PAL-F"
|
||||
@@ -16803,8 +16770,6 @@ SLES-54995:
|
||||
name: "Puzzle Quest - Challenge of the Warlords"
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering black and white sprites.
|
||||
SLES-54996:
|
||||
name: "Golden Compass, The"
|
||||
region: "PAL-M5"
|
||||
@@ -17669,8 +17634,6 @@ SLES-55443:
|
||||
compat: 5
|
||||
roundModes:
|
||||
eeRoundMode: 0 # Fixes jump issue.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering sprites.
|
||||
SLES-55444:
|
||||
name: "Ar tonelico II: Melody of Metafalica"
|
||||
region: "PAL-E"
|
||||
@@ -17876,8 +17839,6 @@ SLES-55576:
|
||||
SLES-55577:
|
||||
name: "DJ Hero"
|
||||
region: "PAL-M5"
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLES-55578:
|
||||
name: "Band Hero"
|
||||
region: "PAL-M5"
|
||||
@@ -18908,8 +18869,6 @@ SLPM-20436:
|
||||
SLPM-55005:
|
||||
name: "Mana Khemia 2: Ochita Gakuen to Renkinjutsushi Tachi"
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering sprites.
|
||||
SLPM-55008:
|
||||
name: "Sengoku Basara X"
|
||||
region: "NTSC-J"
|
||||
@@ -18954,8 +18913,6 @@ SLPM-55110:
|
||||
SLPM-55114:
|
||||
name: "Mana Khemia 2: Ochita Gakuen to Renkinjutsushi Tachi"
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering sprites.
|
||||
SLPM-55118:
|
||||
name: "Galaxy Angel II - Eigou Kaiki no Koku [Disc1of2]"
|
||||
region: "NTSC-J"
|
||||
@@ -26303,8 +26260,6 @@ SLPM-66693:
|
||||
SLPM-66694:
|
||||
name: "Spongebob"
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes bad graphics.
|
||||
SLPM-66695:
|
||||
name: "Kono Aozora ni Yakusoku o - Melody of the Sun and Sea"
|
||||
region: "NTSC-J"
|
||||
@@ -33407,8 +33362,6 @@ SLUS-20360:
|
||||
name: "Blade II"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering HUD. (originally was EE Timing Hack but required since r4821)
|
||||
SLUS-20361:
|
||||
name: "Rally Fusion - Race of Champions"
|
||||
region: "NTSC-U"
|
||||
@@ -34666,8 +34619,6 @@ SLUS-20647:
|
||||
compat: 5
|
||||
clampModes:
|
||||
vuClampMode: 3 # Fixes minor SPS on characters.
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLUS-20648:
|
||||
name: "NBA Jam 2004"
|
||||
region: "NTSC-U"
|
||||
@@ -35018,8 +34969,6 @@ SLUS-20737:
|
||||
name: "Hot Wheels - World Race"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLUS-20738:
|
||||
name: "Van Helsing"
|
||||
region: "NTSC-U"
|
||||
@@ -36564,7 +36513,6 @@ SLUS-21095:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes corrupted graphics in the menus.
|
||||
- VUKickstartHack # Fixes TLB misses and collision bugs.
|
||||
SLUS-21096:
|
||||
name: "Ape Escape - Pumped & Primed"
|
||||
@@ -37880,8 +37828,6 @@ SLUS-21383:
|
||||
name: "Fight Night - Round 3"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes corrupt textures.
|
||||
SLUS-21384:
|
||||
name: "Cabela's Alaskan Adventures"
|
||||
region: "NTSC-U"
|
||||
@@ -37917,8 +37863,6 @@ SLUS-21391:
|
||||
name: "SpongeBob SquarePants - Creature from the Krusty Krab"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes bad graphics.
|
||||
SLUS-21392:
|
||||
name: "Shrek Smash and Crash"
|
||||
region: "NTSC-U"
|
||||
@@ -39083,8 +39027,6 @@ SLUS-21692:
|
||||
name: "Puzzle Quest - Challenge of the Warlords"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering black and white sprites.
|
||||
SLUS-21693:
|
||||
name: "7 Wonders of the Ancient World"
|
||||
region: "NTSC-U"
|
||||
@@ -39271,8 +39213,6 @@ SLUS-21735:
|
||||
compat: 5
|
||||
roundModes:
|
||||
eeRoundMode: 0 # Fixes jump issue.
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering sprites.
|
||||
SLUS-21736:
|
||||
name: "Wall-E"
|
||||
region: "NTSC-U"
|
||||
@@ -39878,8 +39818,6 @@ SLUS-21890:
|
||||
name: "Mana Khemia 2: Fall Of Alchemy"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- GIFFIFOHack # Fixes flickering sprites.
|
||||
SLUS-21891:
|
||||
name: "G-Force"
|
||||
region: "NTSC-U"
|
||||
@@ -39952,8 +39890,6 @@ SLUS-21908:
|
||||
SLUS-21909:
|
||||
name: "DJ Hero"
|
||||
region: "NTSC-U"
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
SLUS-21910:
|
||||
name: "Marvel Super Hero Squad"
|
||||
region: "NTSC-U"
|
||||
|
||||
+4
-4
@@ -125,10 +125,10 @@ void __fastcall WriteFIFO_VIF1(const mem128_t *value)
|
||||
void __fastcall WriteFIFO_GIF(const mem128_t *value)
|
||||
{
|
||||
GUNIT_LOG("WriteFIFO_GIF()");
|
||||
if (CHECK_GIFFIFOHACK) {
|
||||
gif_fifo.write((u32*)value, 1);
|
||||
|
||||
gif_fifo.read(true);
|
||||
if ((!gifUnit.CanDoPath3() || gif_fifo.fifoSize > 0)) {
|
||||
//DevCon.Warning("GIF FIFO HW Write");
|
||||
gif_fifo.write_fifo((u32*)value, 1);
|
||||
gif_fifo.read_fifo();
|
||||
}
|
||||
else {
|
||||
gifUnit.TransferGSPacketData(GIF_TRANS_FIFO, (u8*)value, 16);
|
||||
|
||||
+233
-274
File diff suppressed because it is too large
Load Diff
+3
-4
@@ -80,11 +80,10 @@ extern __aligned16 gifStruct gif;
|
||||
struct GIF_Fifo
|
||||
{
|
||||
unsigned int data[64]; //16 QW FIFO
|
||||
unsigned int readdata[64]; //16 QW Inline for reading
|
||||
int readpos, writepos;
|
||||
unsigned int fifoSize;
|
||||
|
||||
int write(u32* pMem, int size);
|
||||
int read(bool calledFromDMA = false);
|
||||
int write_fifo(u32* pMem, int size);
|
||||
int read_fifo();
|
||||
|
||||
void init();
|
||||
};
|
||||
|
||||
@@ -538,6 +538,7 @@ struct Gif_Unit
|
||||
gifRegs.stat.reset();
|
||||
gifRegs.ctrl.reset();
|
||||
gifRegs.mode.reset();
|
||||
gif_fifo.init();
|
||||
}
|
||||
|
||||
// Adds a finished GS Packet to the MTGS ring buffer
|
||||
|
||||
@@ -216,12 +216,6 @@ __ri void hwMFIFOResume(u32 transferred) {
|
||||
CPU_INT(DMAC_MFIFO_GIF, transferred * BIAS);
|
||||
gif.gifstate = GIF_STATE_READY;
|
||||
}
|
||||
if (!CHECK_GIFFIFOHACK)
|
||||
{
|
||||
gifRegs.stat.FQC = 16;
|
||||
//GIF FIFO
|
||||
clearFIFOstuff(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
+1
-2
@@ -111,9 +111,8 @@ void __fastcall _hwWrite32( u32 mem, u32 value )
|
||||
icase(GIF_MODE)
|
||||
{
|
||||
gifRegs.mode.write(value);
|
||||
|
||||
//Need to kickstart the GIF if the M3R mask comes off
|
||||
if (gifRegs.stat.M3R == 1 && gifRegs.mode.M3R == 0 && gifch.chcr.STR)
|
||||
if (gifRegs.stat.M3R == 1 && gifRegs.mode.M3R == 0 && (gifch.chcr.STR || gif_fifo.fifoSize))
|
||||
{
|
||||
DevCon.Warning("GIF Mode cancelling P3 Disable");
|
||||
CPU_INT(DMAC_GIF, 8);
|
||||
|
||||
+2
-1
@@ -313,12 +313,13 @@ void SPRFROMinterrupt()
|
||||
spr0ch.madr = dmacRegs.rbor.ADDR + (spr0ch.madr & dmacRegs.rbsr.RMSK);
|
||||
//Console.WriteLn("mfifoGIFtransfer %x madr %x, tadr %x", gif->chcr._u32, gif->madr, gif->tadr);
|
||||
hwMFIFOResume(mfifotransferred);
|
||||
mfifotransferred = 0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
mfifotransferred = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ enum class FreezeAction
|
||||
// the lower 16 bit value. IF the change is breaking of all compatibility with old
|
||||
// states, increment the upper 16 bit value, and clear the lower 16 bits to 0.
|
||||
|
||||
static const u32 g_SaveVersion = (0x9A21 << 16) | 0x0000;
|
||||
static const u32 g_SaveVersion = (0x9A22 << 16) | 0x0000;
|
||||
|
||||
// the freezing data between submodules and core
|
||||
// an interesting thing to note is that this dates back from before plugin
|
||||
|
||||
+4
-2
@@ -222,14 +222,14 @@ __fi void vif1FBRST(u32 value) {
|
||||
case MFD_VIF1:
|
||||
//Console.WriteLn("MFIFO Stall");
|
||||
//MFIFO active and not empty
|
||||
if(vif1ch.chcr.STR) CPU_INT(DMAC_MFIFO_VIF, 0);
|
||||
if(vif1ch.chcr.STR && !vif1Regs.stat.test(VIF1_STAT_FDR)) CPU_INT(DMAC_MFIFO_VIF, 0);
|
||||
break;
|
||||
|
||||
case NO_MFD:
|
||||
case MFD_RESERVED:
|
||||
case MFD_GIF: // Wonder if this should be with VIF?
|
||||
// Gets the timing right - Flatout
|
||||
if(vif1ch.chcr.STR) CPU_INT(DMAC_VIF1, 0);
|
||||
if(vif1ch.chcr.STR && !vif1Regs.stat.test(VIF1_STAT_FDR)) CPU_INT(DMAC_VIF1, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -256,6 +256,8 @@ __fi void vif1STAT(u32 value) {
|
||||
//position, as we clear it and set it to the end well before the interrupt, the game assumes it's finished,
|
||||
//then proceeds to reverse the dma before we have even done it ourselves. So lets just make sure VIF is ready :)
|
||||
if (vif1ch.qwc > 0 || isStalled == false){
|
||||
vif1ch.qwc = 0;
|
||||
hwDmacIrq(DMAC_VIF1);
|
||||
vif1ch.chcr.STR = false;
|
||||
cpuRegs.interrupt &= ~((1 << DMAC_VIF1) | (1 << DMAC_MFIFO_VIF));
|
||||
}
|
||||
|
||||
+2
-2
@@ -288,7 +288,7 @@ __fi void vif1Interrupt()
|
||||
|
||||
g_vif1Cycles = 0;
|
||||
|
||||
if( gifRegs.stat.APATH == 2 && gifUnit.gifPath[GIF_PATH_2].isDone())
|
||||
if( gifRegs.stat.APATH == 2 && gifUnit.gifPath[GIF_PATH_2].isDone())
|
||||
{
|
||||
gifRegs.stat.APATH = 0;
|
||||
gifRegs.stat.OPH = 0;
|
||||
@@ -427,7 +427,7 @@ __fi void vif1Interrupt()
|
||||
vif1.irqoffset.enabled = false;
|
||||
if(vif1.queued_program) vifExecQueue(1);
|
||||
g_vif1Cycles = 0;
|
||||
DMA_LOG("VIF1 DMA End");
|
||||
VIF_LOG("VIF1 DMA End");
|
||||
hwDmacIrq(DMAC_VIF1);
|
||||
|
||||
}
|
||||
|
||||
+3
-4
@@ -422,14 +422,13 @@ vifOp(vifCode_MSCNT) {
|
||||
// ToDo: FixMe
|
||||
vifOp(vifCode_MskPath3) {
|
||||
vif1Only();
|
||||
pass1 {
|
||||
pass1 {
|
||||
vif1Regs.mskpath3 = (vif1Regs.code >> 15) & 0x1;
|
||||
gifRegs.stat.M3P = (vif1Regs.code >> 15) & 0x1;
|
||||
GUNIT_LOG("Vif1 - MskPath3 [p3 = %s]", vif1Regs.mskpath3 ? "masked" : "enabled");
|
||||
if(!vif1Regs.mskpath3) {
|
||||
GUNIT_WARN("Path3 triggering!");
|
||||
if(CHECK_GIFFIFOHACK)gif_fifo.read(false);
|
||||
else gifInterrupt();
|
||||
GUNIT_WARN("VIF MSKPATH3 off Path3 triggering!");
|
||||
gifInterrupt();
|
||||
}
|
||||
vif1.cmd = 0;
|
||||
vif1.pass = 0;
|
||||
|
||||
@@ -81,7 +81,7 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
|
||||
wxEmptyString
|
||||
},
|
||||
{
|
||||
_("Enable the GIF FIFO (slower but needed for Hotwheels, Wallace and Gromit, DJ Hero)"),
|
||||
_("Force GIF PATH3 transfers through FIFO (Fifa Street 2)"),
|
||||
wxEmptyString
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user