Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MK8] clean up and New Mods #661

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/MarioKart8/Cheats/CourseUnlock/patch_CourseUnlock.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[MarioKart8_CourseUnlock]
moduleMatches = 0x9F0A90B7, 0xD09700CE ; v4.2(EU/NA/JP), v4.1(EU/NA/JP)
.origin = codecave
UnlockCourses:
lis r30, 0x0303
ori r30, r30, 0x0303
stw r30, 0(r11)
stw r30, 4(r11)
lbzx r30, r11, r0
blr

[MarioKart8_CourseUnlock_v42]
moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP)
;this mod makes every byte at 0x2e6b6668 = 3
0x024D74CC = bla UnlockCourses

[MarioKart8_CourseUnlock_v41]
moduleMatches = 0xD09700CE ; v4.1(EU/NA/JP)
0x024D7148 = bla UnlockCourses
7 changes: 7 additions & 0 deletions src/MarioKart8/Cheats/CourseUnlock/rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Definition]
titleIds = 000500001010EC00,000500001010ED00,000500001010EB00
name = Course Unlock
path = "Mario Kart 8/Cheats/Course Unlock"
description = Unlock Every Course + Mirror Mode!
#Credits: Intra
version = 7
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[MarioKart8_OnlineBattleRating_v42]
moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP)
.origin = codecave
ChangeOnlineBattleRating:
li r10, $battlevr
stw r10, 0x1a24(r29)
blr

;this mod makes 0x2e6b6664 = $battlevr
0x024DCE58 = bla ChangeOnlineBattleRating
35 changes: 35 additions & 0 deletions src/MarioKart8/Cheats/OnlineBattleRating/rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[Definition]
titleIds = 000500001010EC00,000500001010ED00,000500001010EB00
name = Change Online Battle Rating
path = "Mario Kart 8/Cheats/Online Battle Rating"
description = Change Your Online Battle Rating!
#Credits: Intra
version = 7

[Default]
$battlevr = 1000

[Preset]
category = Battle Rating:
name = 1
$battlevr = 1

[Preset]
category = Battle Rating:
name = 1000
Default = 1

[Preset]
category = Battle Rating:
name = 2000
$battlevr = 2000

[Preset]
category = Battle Rating:
name = 3000
$battlevr = 3000

[Preset]
category = Battle Rating:
name = 4000
$battlevr = 4000
10 changes: 10 additions & 0 deletions src/MarioKart8/Cheats/OnlineRaceRating/patch_OnlineRaceRating.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[MarioKart8_OnlineRaceRating_v42]
moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP)
.origin = codecave
ChangeOnlineRaceRating:
li r8, $racevr
stw r8, 0x1a20(r29)
blr

;this mod makes 0x2e6b6660 = $racevr
0x024DCE2C = bla ChangeOnlineRaceRating
50 changes: 50 additions & 0 deletions src/MarioKart8/Cheats/OnlineRaceRating/rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[Definition]
titleIds = 000500001010EC00,000500001010ED00,000500001010EB00
name = Change Online Race Rating
path = "Mario Kart 8/Cheats/Online Race Rating"
description = Change Your Online Race Rating!|150cc lobbies start happening at 5000vr.
#Credits: Intra
version = 7

[Default]
$racevr = 1000

[Preset]
category = Race Rating:
name = 1
$racevr = 1

[Preset]
category = Race Rating:
name = 1000
Default = 1

[Preset]
category = Race Rating:
name = 2000
$racevr = 2000

[Preset]
category = Race Rating:
name = 3000
$racevr = 3000

[Preset]
category = Race Rating:
name = 4000
$racevr = 4000

[Preset]
category = Race Rating:
name = 5000
$racevr = 5000

[Preset]
category = Race Rating:
name = 6000
$racevr = 6000

[Preset]
category = Race Rating:
name = 7000
$racevr = 7000
94 changes: 94 additions & 0 deletions src/MarioKart8/Cheats/TrophyCheat/patch_TrophyCheat.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
[MarioKart8_GoldTrophy]
moduleMatches = 0x9F0A90B7, 0xD09700CE ; v4.2(EU/NA/JP), v4.1(EU/NA/JP)
.origin = codecave

WriteTrophies:
addi r11, r11, -1
mtctr r12
_forloopWriteTrophies:
stbu r8, 1(r11)
bdnz _forloopWriteTrophies
blr

CheckandChangeTrophies:
mflr r0
;check cheat
li r8, $cheattype
cmpwi r8, 3
beq Cheat3StarEVERYTHING
cmpwi r8, 2
beq CheatEntireEngineClass
cmpwi r8, 1
beq CheatSpecificCup
b CheckandChangeTrophies_Exit

CheatSpecificCup:
li r8, $trophy
addi r11, r7, 0x5c4+$addroffset
stb r8, $cup(r11)
li r8, $stars
addi r11, r7, 0x5c4+$addroffset-0x100
stb r8, $cup(r11)
b CheckandChangeTrophies_Exit

CheatEntireEngineClass:
li r12, 12
li r8, $trophy
addi r11, r7, 0x5c4+$addroffset
bl WriteTrophies
li r8, $stars
addi r11, r7, 0x5c4+$addroffset-0x100
bl WriteTrophies
b CheckandChangeTrophies_Exit

Cheat3StarEVERYTHING:
li r12, 12
;50cc
li r8, $trophy
addi r11, r7, 0x5c4
bl WriteTrophies
li r8, $stars
addi r11, r7, 0x5c4-0x100
bl WriteTrophies
;100cc
li r8, $trophy
addi r11, r7, 0x5c4+0x20
bl WriteTrophies
li r8, $stars
addi r11, r7, 0x5c4+0x20-0x100
bl WriteTrophies
;150cc
li r8, $trophy
addi r11, r7, 0x5c4+0x40
bl WriteTrophies
li r8, $stars
addi r11, r7, 0x5c4+0x40-0x100
bl WriteTrophies
;Mirror
li r8, $trophy
addi r11, r7, 0x5c4+0x80
bl WriteTrophies
li r8, $stars
addi r11, r7, 0x5c4+0x80-0x100
bl WriteTrophies
;200cc
li r8, $trophy
addi r11, r7, 0x5c4+0x60
bl WriteTrophies
li r8, $stars
addi r11, r7, 0x5c4+0x60-0x100
bl WriteTrophies

CheckandChangeTrophies_Exit:
mtlr r0
lwz r8, 0(r29)
blr

[MarioKart8_GoldTrophy_v42]
moduleMatches = 0x9F0A90B7 ; v4.2(EU/NA/JP)
;modifies near 0x2E6B520C
0x024D97F8 = bla CheckandChangeTrophies

[MarioKart8_GoldTrophy_v41]
moduleMatches = 0xD09700CE ; v4.1(EU/NA/JP)
0x024d9474 = bla CheckandChangeTrophies
Loading