mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2025-01-09 03:07:41 -03:00
[MK8] Add support for v81/v4.2 update
Also ported the patches from the legacy Cemuhook format to the Cemu patches format.
This commit is contained in:
parent
943347080b
commit
d803646c74
6 changed files with 92 additions and 117 deletions
68
src/MarioKart8/Graphics/patch_AspectRatio.asm
Normal file
68
src/MarioKart8/Graphics/patch_AspectRatio.asm
Normal file
|
@ -0,0 +1,68 @@
|
|||
[MK8_AspectRatio_Shared]
|
||||
moduleMatches = 0x9F0A90B7,0xD09700CE,0x1D398493,0xBA6B1E20,0x62A5F023,0x2A2DC82C
|
||||
|
||||
.origin = codecave
|
||||
|
||||
aspectRatio:
|
||||
.float ((($gameHeight/$height)*$width)/$gameWidth)
|
||||
|
||||
scaleAspectRatioCalc:
|
||||
fdivs f9, f13, f12
|
||||
lis r7, aspectRatio@ha
|
||||
lfs f12, aspectRatio@l(r7)
|
||||
fmuls f7, f9, f12
|
||||
blr
|
||||
|
||||
|
||||
[MK8_AspectRatio_V42]
|
||||
moduleMatches = 0x9F0A90B7
|
||||
|
||||
0x024AEF70 = bla scaleAspectRatioCalc
|
||||
|
||||
0x100C359C = .float ($width/$height)
|
||||
0x10121E30 = .float ($width/$height)
|
||||
|
||||
|
||||
[MK8_AspectRatio_V41]
|
||||
moduleMatches = 0xD09700CE
|
||||
|
||||
0x024AEBEC = bla scaleAspectRatioCalc
|
||||
|
||||
0x100C359C = .float ($width/$height)
|
||||
0x10121E30 = .float ($width/$height)
|
||||
|
||||
|
||||
[MK8_AspectRatio_V4]
|
||||
moduleMatches = 0x1D398493
|
||||
|
||||
0x024AEBEC = bla scaleAspectRatioCalc
|
||||
|
||||
0x100C359C = .float ($width/$height)
|
||||
0x10121D30 = .float ($width/$height)
|
||||
|
||||
|
||||
[MK8_AspectRatio_V3]
|
||||
moduleMatches = 0xBA6B1E20
|
||||
|
||||
0x024642E8 = bla scaleAspectRatioCalc
|
||||
|
||||
0x100AC25C = .float ($width/$height)
|
||||
0x1010A730 = .float ($width/$height)
|
||||
|
||||
|
||||
[MK8_AspectRatio_V2]
|
||||
moduleMatches = 0x62A5F023
|
||||
|
||||
0x024376D4 = bla scaleAspectRatioCalc
|
||||
|
||||
0x1009E9DC = .float ($width/$height)
|
||||
0x100FC030 = .float ($width/$height)
|
||||
|
||||
|
||||
[MK8_AspectRatio_V1]
|
||||
moduleMatches = 0x2A2DC82C
|
||||
|
||||
0x02416760 = bla scaleAspectRatioCalc
|
||||
|
||||
0x10097D94 = .float ($width/$height)
|
||||
0x100F3430 = .float ($width/$height)
|
10
src/MarioKart8/Graphics/patch_DisableFXAA.asm
Normal file
10
src/MarioKart8/Graphics/patch_DisableFXAA.asm
Normal file
|
@ -0,0 +1,10 @@
|
|||
[MK8_DisableFXAA_V42]
|
||||
moduleMatches = 0x9F0A90B7
|
||||
|
||||
0x027DF528 = blr
|
||||
|
||||
|
||||
[MK8_DisableFXAA_V41]
|
||||
moduleMatches = 0xD09700CE
|
||||
|
||||
0x027DF2F4 = blr
|
4
src/MarioKart8/Graphics/patch_LevelOfDetail.asm
Normal file
4
src/MarioKart8/Graphics/patch_LevelOfDetail.asm
Normal file
|
@ -0,0 +1,4 @@
|
|||
[MK8_LevelOfDetail_V42_V41]
|
||||
moduleMatches = 0x9F0A90B7,0xD09700CE
|
||||
|
||||
0x10121DF0 = .float $levelOfDetail
|
|
@ -1,114 +0,0 @@
|
|||
[MK8AspectVer1]
|
||||
moduleMatches = 0x2A2DC82C
|
||||
0x10097D94 = .float $width/$height
|
||||
0x100F3430 = .float $width/$height
|
||||
|
||||
#aspect scaling
|
||||
codeCaveSize = 0x18
|
||||
|
||||
_scaleAspect = 0x00000004
|
||||
0x00000000 = .float (($gameHeight/$height)*$width)/$gameWidth
|
||||
_scaleAddr = 0x00000000
|
||||
0x00000004 = fdivs f9, f13, f12
|
||||
0x00000008 = lis r7, _scaleAddr@ha
|
||||
0x0000000C = lfs f12, _scaleAddr@l(r7)
|
||||
0x00000010 = fmuls f7, f9, f12
|
||||
0x00000014 = blr
|
||||
|
||||
#replace math with branch
|
||||
0x02416760 = bla _scaleAspect
|
||||
|
||||
[MK8AspectVer2]
|
||||
moduleMatches = 0x62A5F023
|
||||
0x1009E9DC = .float $width/$height
|
||||
0x100FC030 = .float $width/$height
|
||||
|
||||
#aspect scaling
|
||||
codeCaveSize = 0x18
|
||||
|
||||
_scaleAspect = 0x00000004
|
||||
0x00000000 = .float (($gameHeight/$height)*$width)/$gameWidth
|
||||
_scaleAddr = 0x00000000
|
||||
0x00000004 = fdivs f9, f13, f12
|
||||
0x00000008 = lis r7, _scaleAddr@ha
|
||||
0x0000000C = lfs f12, _scaleAddr@l(r7)
|
||||
0x00000010 = fmuls f7, f9, f12
|
||||
0x00000014 = blr
|
||||
|
||||
#replace math with branch
|
||||
0x024376D4 = bla _scaleAspect
|
||||
|
||||
[MK8AspectVer3]
|
||||
moduleMatches = 0xBA6B1E20
|
||||
0x100AC25C = .float $width/$height
|
||||
0x1010A730 = .float $width/$height
|
||||
|
||||
#aspect scaling
|
||||
codeCaveSize = 0x18
|
||||
|
||||
_scaleAspect = 0x00000004
|
||||
0x00000000 = .float (($gameHeight/$height)*$width)/$gameWidth
|
||||
_scaleAddr = 0x00000000
|
||||
0x00000004 = fdivs f9, f13, f12
|
||||
0x00000008 = lis r7, _scaleAddr@ha
|
||||
0x0000000C = lfs f12, _scaleAddr@l(r7)
|
||||
0x00000010 = fmuls f7, f9, f12
|
||||
0x00000014 = blr
|
||||
|
||||
#replace math with branch
|
||||
0x024642E8 = bla _scaleAspect
|
||||
|
||||
[MK8AspectVer4]
|
||||
moduleMatches = 0x1D398493
|
||||
0x100C359C = .float $width/$height
|
||||
0x10121D30 = .float $width/$height
|
||||
|
||||
#aspect scaling
|
||||
codeCaveSize = 0x18
|
||||
|
||||
_scaleAspect = 0x00000004
|
||||
0x00000000 = .float (($gameHeight/$height)*$width)/$gameWidth
|
||||
_scaleAddr = 0x00000000
|
||||
0x00000004 = fdivs f9, f13, f12
|
||||
0x00000008 = lis r7, _scaleAddr@ha
|
||||
0x0000000C = lfs f12, _scaleAddr@l(r7)
|
||||
0x00000010 = fmuls f7, f9, f12
|
||||
0x00000014 = blr
|
||||
|
||||
#replace math with branch
|
||||
0x024AEBEC = bla _scaleAspect
|
||||
|
||||
[MK8AspectVer4_1]
|
||||
moduleMatches = 0xD09700CE
|
||||
0x100C359C = .float $width/$height
|
||||
0x10121E30 = .float $width/$height
|
||||
|
||||
#aspect scaling
|
||||
codeCaveSize = 0x18
|
||||
|
||||
_scaleAspect = 0x00000004
|
||||
0x00000000 = .float (($gameHeight/$height)*$width)/$gameWidth
|
||||
_scaleAddr = 0x00000000
|
||||
0x00000004 = fdivs f9, f13, f12
|
||||
0x00000008 = lis r7, _scaleAddr@ha
|
||||
0x0000000C = lfs f12, _scaleAddr@l(r7)
|
||||
0x00000010 = fmuls f7, f9, f12
|
||||
0x00000014 = blr
|
||||
|
||||
#replace math with branch
|
||||
0x024AEBEC = bla _scaleAspect
|
||||
|
||||
# FXAA In-Game
|
||||
|
||||
[MK8FXAAVer4_1]
|
||||
moduleMatches = 0xD09700CE
|
||||
|
||||
0x027DF2F4 = blr
|
||||
|
||||
# Level of Detail
|
||||
|
||||
[MK8LODVer4_1]
|
||||
moduleMatches = 0xD09700CE
|
||||
|
||||
0x10121DF0 = .float $levelOfDetail
|
||||
|
10
src/MarioKart8/Mods/60FPSMultiplayer/patch_60FPSFullDraw.asm
Normal file
10
src/MarioKart8/Mods/60FPSMultiplayer/patch_60FPSFullDraw.asm
Normal file
|
@ -0,0 +1,10 @@
|
|||
[MK8_60FPSFullDraw_V42]
|
||||
moduleMatches = 0x9F0A90B7
|
||||
|
||||
0x024AF384 = b .+0x54
|
||||
|
||||
|
||||
[MK8_60FPSFullDraw_V41]
|
||||
moduleMatches = 0xD09700CE
|
||||
|
||||
0x024AF000 = b .+0x54
|
|
@ -1,3 +0,0 @@
|
|||
[MK8FullDrawVer4_1]
|
||||
moduleMatches = 0xD09700CE
|
||||
0x24AF000 = b .+0x54
|
Loading…
Reference in a new issue