Skip to content

Commit

Permalink
games: Add Hatsune Miku: Project Diva X [EUR/USA/ASA] internal res. p…
Browse files Browse the repository at this point in the history
…atch

Signed-off-by: Michal Chvila <miso.chvila@gmail.com>
  • Loading branch information
Electry committed Sep 1, 2018
1 parent ddde261 commit 4a6888c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ NOTE: If some options are left out, the plugin will use their default values (fo
| God of War Collection | PCSF00438 <br/> PCSA00126 <br/> PCSC00059 | Framebuffer <br/> FPS cap | 720x408 <br/> 30 | 960x544 <br/> 60 | Both GoW 1 + 2 |
| Hatsune Miku: Project Diva f | PCSB00419 <br/> PCSE00326 <br/> PCSG00074 | Internal res. <br/> FPS cap | 640x352 <br/> 30 | OFF <br/> OFF | At 60 FPS menu is double speed |
| Hatsune Miku: Project Diva f 2nd | PCSB00554 <br/> PCSE00434 <br/> PCSG00205 <br/> PCSH00088 | Internal res. <br/> FPS cap | 720x408 <br/> 30 | OFF <br/> OFF | At 60 FPS menu is double speed |
| Hatsune Miku: Project Diva X | PCSB01007 <br/> PCSE00867 <br/> PCSH00176 | Internal res. | 720x408 | OFF | |
| Jak and Daxter Collection | PCSF00247 <br/> PCSF00248 <br/> PCSF00249 <br/> PCSF00250 <br/> PCSA00080 | Framebuffer | 720x408 | 960x544 | All 3 games |
| Killzone: Mercenary | PCSF00243 <br/> PCSF00403 <br/> PCSA00107 <br/> PCSC00045 <br/> PCSD00071 | Internal res. <br/> FPS cap | Dynamic <br/> 30 | OFF <br/> OFF | Particles are rendered separately. |
| LEGO Star Wars: The Force Awakens | PCSB00877 <br/> PCSE00791 | Internal res. | 640x368 | 720x408 | Game crashes when opening pause menu at high resolutions. |
Expand Down
30 changes: 30 additions & 0 deletions games.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,36 @@ uint8_t patch_game(const char *titleid, tai_module_info_t *eboot_info, VG_Config

return 1;
}
else if (!strncmp(titleid, "PCSB01007", 9) || // Hatsune Miku: Project Diva X [EUR]
!strncmp(titleid, "PCSE00867", 9) || // Hatsune Miku: Project Diva X [USA]
!strncmp(titleid, "PCSH00176", 9)) { // Hatsune Miku: Project Diva X [ASA]
config_set_unsupported(FT_UNSUPPORTED, FT_ENABLED, FT_UNSUPPORTED, config);
config_set_default(FT_DISABLED, FT_DISABLED, FT_DISABLED, config);

if (config_is_ib_enabled(config)) {
uint8_t movs_r2_width[4], movs_r3_height[4];
uint8_t movs_lr_width[4], movs_r12_height[4];
uint32_t offset_w_h_1 = 0, offset_w_h_2 = 0;
make_thumb2_t2_mov(2, 1, config->ib_width, movs_r2_width);
make_thumb2_t2_mov(3, 1, config->ib_height, movs_r3_height);
make_thumb2_t2_mov(REGISTER_LR, 1, config->ib_width, movs_lr_width);
make_thumb2_t2_mov(12, 1, config->ib_height, movs_r12_height);

if (!strncmp(titleid, "PCSB01007", 9) || // X [EUR/USA]
!strncmp(titleid, "PCSE00867", 9)) {
offset_w_h_1 = 0x2643BA; offset_w_h_2 = 0x2653D2;
} else if (!strncmp(titleid, "PCSH00176", 9)) { // X
offset_w_h_1 = 0x230D5A; offset_w_h_2 = 0x231A86;
}

injectData(eboot_info->modid, 0, offset_w_h_1, &movs_r2_width, sizeof(movs_r2_width));
injectData(eboot_info->modid, 0, offset_w_h_1 + 0x6, &movs_r3_height, sizeof(movs_r3_height));
injectData(eboot_info->modid, 0, offset_w_h_2, &movs_lr_width, sizeof(movs_lr_width));
injectData(eboot_info->modid, 0, offset_w_h_2 + 0x6, &movs_r12_height, sizeof(movs_r12_height));
}

return 1;
}
else if (!strncmp(titleid, "PCSB00316", 9) || // MotoGP 13 [EUR] [1.02]
!strncmp(titleid, "PCSE00409", 9)) { // MotoGP 13 [USA]
config_set_unsupported(FT_UNSUPPORTED, FT_ENABLED, FT_UNSUPPORTED, config);
Expand Down

0 comments on commit 4a6888c

Please sign in to comment.