Skip to content

Commit

Permalink
games: Add Dragon Ball Z: Battle of Z [EU/US/JP] IB res. patch
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Chvila <miso.chvila@gmail.com>
  • Loading branch information
Electry committed Oct 14, 2018
1 parent 2ea0fa7 commit 394061b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ NOTE: If some options are left out, the plugin will use their default values.
| ![](https://placehold.it/50x50/22bb22/000000?text=+) | Asphalt: Injection | PCSB00040 <br/> PCSE00007 | Internal res. | 720x408 | |
| ![](https://placehold.it/50x50/eeee22/000000?text=+) | Borderlands 2 | PCSF00570 <br/> PCSF00576 <br/> PCSE00383 | Framebuffer | 960x544 | Only works at 960x544 and 640x368 |
| ![](https://placehold.it/50x50/22bb22/000000?text=+) | Dead or Alive 5 Plus | PCSB00296 <br/> PCSE00235 <br/> PCSG00167 | Internal res. | 720x408 | |
| ![](https://placehold.it/50x50/22bb22/000000?text=+) | Dragon Ball Z: Battle of Z | PCSB00396 <br/> PCSE00305 <br/> PCSG00213 | Internal res. | 704x448 | |
| ![](https://placehold.it/50x50/22bb22/000000?text=+) | Dragon Quest Builders | PCSB00981 <br/> PCSE00912 <br/> PCSG00697 <br/> PCSH00221 | Internal res. <br/> FPS cap | 720x408 <br/> 60 | |
| ![](https://placehold.it/50x50/22bb22/000000?text=+) | F1 2011 | PCSB00027 | Internal res. | 640x384 | |
| ![](https://placehold.it/50x50/22bb22/000000?text=+) | God of War Collection | PCSF00438 <br/> PCSA00126 <br/> PCSC00059 | Framebuffer <br/> FPS cap | 720x408 <br/> 30 | |
Expand Down
36 changes: 36 additions & 0 deletions patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,4 +882,40 @@ void vgPatchGame() {
vgInjectData(0, 0x137808 + 8, &mov_r1_height, sizeof(mov_r1_height));
}
}
//
// Dragon Ball Z: Battle of Z
//
else if (vgPatchIsGame("PCSB00396", SELF_EBOOT, NID_ANY) || // EU [1.01]
vgPatchIsGame("PCSE00305", SELF_EBOOT, NID_ANY) || // US [1.01]
vgPatchIsGame("PCSG00213", SELF_EBOOT, NID_ANY)) { // JP [1.01]
vgConfigSetSupported(FT_UNSUPPORTED, FT_ENABLED, FT_UNSUPPORTED);

if (vgConfigIsIbEnabled()) {
uint8_t mov_r0_width[4], mov_r1_height[4];
uint8_t mov_r2_width[4], mov_r3_height[4];
uint8_t mov_r3_width[4], mov_r5_height[4], mov_r6_height[4];
vgMakeArm_A1_MOV(0, 0, g_main.config.ib[0].width, mov_r0_width);
vgMakeArm_A1_MOV(1, 0, g_main.config.ib[0].height, mov_r1_height);
vgMakeArm_A1_MOV(2, 0, g_main.config.ib[0].width, mov_r2_width);
vgMakeArm_A1_MOV(3, 0, g_main.config.ib[0].height, mov_r3_height);
vgMakeArm_A1_MOV(3, 0, g_main.config.ib[0].width, mov_r3_width);
vgMakeArm_A1_MOV(5, 0, g_main.config.ib[0].height, mov_r5_height);
vgMakeArm_A1_MOV(6, 0, g_main.config.ib[0].height, mov_r6_height);

vgPatchAddOffset("PCSB00396", SELF_EBOOT, NID_ANY, 5, 0x63E8D0, 0x63CE94, 0x63D200, 0x63DA1C, 0x63FF1C);
vgPatchAddOffset("PCSE00305", SELF_EBOOT, NID_ANY, 5, 0x63E8A0, 0x63CE64, 0x63D1D0, 0x63D9EC, 0x63FEEC);
vgPatchAddOffset("PCSG00213", SELF_EBOOT, NID_ANY, 5, 0x63DE3C, 0x63C400, 0x63C76C, 0x63CF88, 0x63F488);

vgInjectData(0, g_main.offset[0], &mov_r0_width, sizeof(mov_r0_width));
vgInjectData(0, g_main.offset[0] + 8, &mov_r1_height, sizeof(mov_r1_height));
vgInjectData(0, g_main.offset[1], &mov_r0_width, sizeof(mov_r0_width));
vgInjectData(0, g_main.offset[1] + 8, &mov_r1_height, sizeof(mov_r1_height));
vgInjectData(0, g_main.offset[2], &mov_r2_width, sizeof(mov_r2_width));
vgInjectData(0, g_main.offset[2] + 8, &mov_r3_height, sizeof(mov_r3_height));
vgInjectData(0, g_main.offset[3], &mov_r3_width, sizeof(mov_r3_width));
vgInjectData(0, g_main.offset[3] + 8, &mov_r5_height, sizeof(mov_r5_height));
vgInjectData(0, g_main.offset[4], &mov_r3_width, sizeof(mov_r3_width));
vgInjectData(0, g_main.offset[4] + 8, &mov_r6_height, sizeof(mov_r6_height));
}
}
}

0 comments on commit 394061b

Please sign in to comment.