Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
BroGamer4256 committed Jun 24, 2022
1 parent fbb8e7b commit 481c4c5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
30 changes: 14 additions & 16 deletions patches/8.18/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
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);
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);

// Move various files to current directory
void *amHandle = GetModuleHandle ("AMFrameWork.dll");
WRITE_MEMORY (amHandle + 0x33EF7, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x3404A, u8, 0xEB);
Expand Down
2 changes: 2 additions & 0 deletions src/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 481c4c5

Please sign in to comment.