forked from dolphin-emu/dolphin
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#include "Core/PrimeHack/PrimeMod.h" | ||
#include "Core/PrimeHack/PrimeUtils.h" | ||
|
||
namespace prime { | ||
class UnlockHypermode : public PrimeMod { | ||
public: | ||
void run_mod(Game game, Region region) override { | ||
if (game != Game::MENU) { | ||
return; | ||
} | ||
|
||
u32 base = read32(GPR(13) - r13_offset); | ||
write8(1, base + 0x68); | ||
write8(1, base + 0xa0); | ||
write8(1, base + 0xd8); | ||
} | ||
|
||
bool init_mod(Game game, Region region) override { | ||
if (region == Region::NTSC_U) { | ||
r13_offset = 0x2f94; | ||
} else if (region == Region::PAL) { | ||
r13_offset = 0x2f34; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
void on_state_change(ModState old_state) override {} | ||
|
||
private: | ||
u32 r13_offset; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters