From eaab5dc718742ae7c3698c27ba80e2af6cf13e51 Mon Sep 17 00:00:00 2001 From: CrazyRedMachine Date: Sun, 17 Nov 2024 00:01:45 +0100 Subject: [PATCH] fix unlocks --- popnhax/dllmain.cc | 8 ++++++-- popnhax/loader.cc | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/popnhax/dllmain.cc b/popnhax/dllmain.cc index 4f65695..486545b 100644 --- a/popnhax/dllmain.cc +++ b/popnhax/dllmain.cc @@ -2549,6 +2549,10 @@ bool force_unlock_songs() { break; } + if ((entry->mask & 0x00020000) != 0) { + LOG("[%04d][JF] Unlocking %s\n", i, entry->title_ptr); + } + if ((entry->mask & 0x08000000) != 0) { LOG("[%04d] Unlocking %s\n", i, entry->title_ptr); music_unlocks++; @@ -2559,8 +2563,8 @@ bool force_unlock_songs() { chart_unlocks++; } - if ((entry->mask & 0x08000080) != 0) { - uint32_t new_mask = entry->mask & ~0x08000080; + if ((entry->mask & 0x08020080) != 0) { + uint32_t new_mask = entry->mask & ~0x08020080; patch_memory((uint64_t)&entry->mask, (char *)&new_mask, 4); } diff --git a/popnhax/loader.cc b/popnhax/loader.cc index 3b951bd..debaade 100644 --- a/popnhax/loader.cc +++ b/popnhax/loader.cc @@ -1362,7 +1362,7 @@ void musichax_core_init(struct popnhax_config *config, if (force_unlocks) { music_entry *m = (music_entry *)*new_music_table; for (uint64_t i = 0; i < *new_music_size; i++) { - uint32_t new_mask = m[i].mask & ~0x8000080; + uint32_t new_mask = m[i].mask & ~0x8020080; if (m[i].title_ptr != NULL && new_mask != m[i].mask) { printf("Unlocking [%04lld] %s... %08x -> %08x\n", i, m[i].title_ptr, m[i].mask,