aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author浅倉麗子2020-06-10 13:36:18 -0400
committer浅倉麗子2020-06-10 13:36:18 -0400
commita5d7d9cd958d992f0e8da95c923fa3db2318ef8d (patch)
tree15990182a058f3eabb23770456808176183438fb
parentUpdate readme and code comments (diff)
downloadp4goldenhd-a5d7d9cd958d992f0e8da95c923fa3db2318ef8d.tar.gz
Fix black video when using undub patchv1.0.1
-rw-r--r--CHANGELOG.md5
-rw-r--r--main.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..941439b
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+### Changelog
+
+#### v1.0.1
+
+- Fix black video when using the undub patch in 1920x1080 mode
diff --git a/main.c b/main.c
index 960affc..2040874 100644
--- a/main.c
+++ b/main.c
@@ -173,9 +173,11 @@ static int sceGxmSetUniformDataF_hook(
#ifdef FB_FHD
static SceUID sceKernelAllocMemBlock_hook(char *name, int type, int size, void *opt) {
- // non-JP versions allocate memory differently when decoding pre-rendered videos
- // 13 MB is too big to fit into the remainder of CDRAM in 1920x1080 mode
- if (size == 0xD00000 && 0 == sceClibStrcmp(name, "movie")) {
+ // Non-JP versions allocate memory differently when decoding pre-rendered videos.
+ // The amount of memory required may exceed the remaining free CDRAM in 1920x1080
+ // mode. Normally a block of 13 MiB will be allocated, but with the undub patch,
+ // a block of 14 MiB will be allocated. Move blocks of size at least 8 MiB.
+ if (size >= 0x800000 && 0 == sceClibStrcmp(name, "movie")) {
type = SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW;
opt = NULL;
LOG("moved %d KB from CDRAM to PHYCONT\n", size / 1024);