1
0
mirror of synced 2024-11-23 22:51:02 +01:00
This commit is contained in:
BroGamer 2022-06-24 15:40:39 +12:00
parent fbb8e7b6ed
commit 481c4c5ef4
3 changed files with 18 additions and 17 deletions

View File

@ -42,6 +42,7 @@ ${OUT}: dirs ${DEPS} ${OBJ}
.PHONY: fmt
fmt:
@cd src && clang-format -i *.h *.c -style=file
@cd patches/8.18 && clang-format -i *.c -style=file
.PHONY: clean
clean:

View File

@ -2,24 +2,22 @@
#include "helpers.h"
i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) {
if (cause != DLL_PROCESS_ATTACH)
return 1;
if (cause != DLL_PROCESS_ATTACH) return 1;
void *handle = GetModuleHandle (0);
WRITE_MEMORY (ASLR (0x1400239C0, handle), u8, 0xC3); // Stop error
WRITE_MEMORY (ASLR (0x140314E8D, handle), u8, 0xB0, 0x01); // Unlock songs
WRITE_MEMORY (ASLR (0x140692E17, handle), u8, 0xEB); // Shared audio
WRITE_MEMORY (ASLR (0x140313726, handle), u8, 0x00, 0x7F); // Remove song limit
WRITE_MEMORY (ASLR (0x140517339, handle), u8, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x90); // Disable VSync
// Save settings cross session without F:/ and G:/ drive
WRITE_MEMORY (ASLR (0x140B5C528, handle), u8, "./Setting1.bin");
WRITE_MEMORY (ASLR (0x140B5C538, handle), u8, "./Setting2.bin");
// Move F:/ files to current directory
WRITE_MEMORY (ASLR (0x140B1B4B0, handle), u8, "./");
WRITE_MEMORY (ASLR (0x14001C941, handle), u8, 0x02);
WRITE_MEMORY (ASLR(0x1400239C0, handle), u8, 0xC3); // Stop error
WRITE_MEMORY (ASLR(0x140314E8D, handle), u8, 0xB0, 0x01); // Unlock songs
WRITE_MEMORY (ASLR(0x140692E17, handle), u8, 0xEB); // Shared audio
WRITE_MEMORY (ASLR(0x140313726, handle), u8, 0x00, 0x7F); // Remove song limit
WRITE_MEMORY (ASLR(0x140517339, handle), u8, 0xBA, 0x00, 0x00, 0x00, 0x00,
0x90); // Disable VSync
// Save settings cross session
WRITE_MEMORY (ASLR(0x140B5C528, handle), u8, "./Setting1.bin");
WRITE_MEMORY (ASLR(0x140B5C538, handle), u8, "./Setting2.bin");
// CabinetOfflineData
WRITE_MEMORY (ASLR(0x140b1b4b0, handle), u8, "./");
WRITE_MEMORY (ASLR(0x14001c941, handle), u8, 0x02);
// Move various files to current directory
void *amHandle = GetModuleHandle ("AMFrameWork.dll");
WRITE_MEMORY (amHandle + 0x33EF7, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x3404A, u8, 0xEB);

View File

@ -43,9 +43,11 @@ u16 __fastcall bnusio_GetAnalogIn (u8 which) {
u16 __fastcall bnusio_GetCoin (i32 a1) {
static int coin_count = 0;
if (a1 == 1) {
static bool inited = false;
static HWND windowHandle = 0;
if (!inited) {
windowHandle = FindWindowA ("nuFoundation.Window", 0);