diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14bd093..ed098bc 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,7 @@ add_executable(VitaGrafix
target_link_libraries(VitaGrafix
taihen_stub
SceAppMgr_stub
+ SceDisplay_stub
kuio_stub
k
gcc
diff --git a/README.md b/README.md
index db3969d..c91d835 100755
--- a/README.md
+++ b/README.md
@@ -118,6 +118,7 @@ NOTE: If some options are left out, the plugin will use their default values (fo
| MXGP: The Official Motocross Videogame | PCSB00470
PCSE00530 | Internal res. | 704x448 | 960x544 | |
| Persona 4 Golden | PCSB00245
PCSE00120
PCSG00004
PCSG00563
PCSH00021 | Internal res. | 840x476 | 960x544 | |
| Ridge Racer | PCSB00048
PCSE00001
PCSG00001 | Internal res. | 720x408 | 960x544 | |
+| The Amazing Spider-Man | PCSB00428 | Internal res.
FPS cap | 704x400
60 | OFF
OFF | Only few resolutions work properly (704x400, 480x272 known working). 960x544 causes GPU crash |
| Utawarerumono: Mask of Deception / Itsuwari no Kamen | PCSB01093
PCSE00959
PCSG00617 | Internal res. | 672x384 | 960x544 | |
| Utawarerumono: Mask of Truth / Futari no Hakuoro | PCSB01145
PCSE01102
PCSG00838 | Internal res. | 672x384 | 960x544 | |
| World of Final Fantasy | PCSB00951
PCSE00880
PCSH00223
PCSG00709 | Internal res. | 640x384 | 800x480 | Only few resolutions work properly (with visible effects and no glitches) |
diff --git a/games.c b/games.c
index b204607..f3a8c81 100755
--- a/games.c
+++ b/games.c
@@ -1,5 +1,6 @@
#include
#include
+#include
#include
#include "tools.h"
@@ -7,6 +8,16 @@
#include "main.h"
#include "games.h"
+int sceDisplayWaitVblankStartMulti(unsigned int vcount);
+
+int sceDisplaySetFrameBuf_withWait(const SceDisplayFrameBuf *pParam, int sync) {
+ int ret = TAI_CONTINUE(int, hooks_ref[0], pParam, sync);
+
+ sceDisplayWaitVblankStartMulti(0x2);
+
+ return ret;
+}
+
uint8_t patch_game(const char *titleid, tai_module_info_t *eboot_info, VG_Config *config) {
if (!strncmp(titleid, "PCSF00243", 9) || // Killzone Mercenary [EUR] [1.12]
!strncmp(titleid, "PCSF00403", 9) || // Killzone Mercenary [EUR] [1.12]
@@ -721,6 +732,24 @@ uint8_t patch_game(const char *titleid, tai_module_info_t *eboot_info, VG_Config
return 1;
}
+ else if (!strncmp(titleid, "PCSB00428", 9)) { // The Amazing Spider-Man [EUR]
+ config_set_unsupported(FT_UNSUPPORTED, FT_ENABLED, FT_ENABLED, config);
+ config_set_default(FT_DISABLED, FT_DISABLED, FT_DISABLED, config);
+
+ if (config_is_ib_enabled(config)) {
+ uint8_t movs_r1_width_r0_height[4];
+ make_thumb2_t2_mov(1, 1, config->ib_width, movs_r1_width_r0_height);
+ make_thumb2_t2_mov(0, 1, config->ib_height, &movs_r1_width_r0_height[4]);
+
+ injectData(eboot_info->modid, 0, 0x16CD7E, &movs_r1_width_r0_height, sizeof(movs_r1_width_r0_height));
+ }
+ if (config_is_fps_enabled(config)) {
+ if (config->fps == FPS_30) // Force 2 vblank wait
+ hookFunctionImport(0x7A410B64, sceDisplaySetFrameBuf_withWait);
+ }
+
+ return 1;
+ }
return 0;
}