Move resollutions and AAremoval into src

This commit is contained in:
intra0 2024-12-12 14:57:48 -06:00 committed by GitHub
parent 19fbd37179
commit 3542212718
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 532 additions and 9 deletions

View File

@ -1,5 +1,5 @@
[DKCTF_MultBanana]
moduleMatches = 0xA37C99E1, 0x4FF15DD2 ; (EU/NA/JP)v16, (EU/NA/JP)v2
moduleMatches = 0xA37C99E1, 0x4FF15DD2 ; v16(EU/NA/JP), v2(EU/NA/JP)
.origin = codecave
_addBananaMultCheat:
@ -17,9 +17,9 @@ or r4, r29, r29
blr
[DKCTF_MultBanana_v16]
moduleMatches = 0xA37C99E1 ; (EU/NA/JP)v16
moduleMatches = 0xA37C99E1 ; v16(EU/NA/JP)
0x020A5974 = bla _addBananaMultCheat
[DKCTF_MultBanana_v2]
moduleMatches = 0x4FF15DD2 ; (EU/NA/JP)v2
moduleMatches = 0x4FF15DD2 ; v2(EU/NA/JP)
0x020A5908 = bla _addBananaMultCheat

View File

@ -1,5 +1,5 @@
[DKCTF_MultCoins]
moduleMatches = 0xA37C99E1, 0x4FF15DD2 ; (EU/NA/JP)v16, (EU/NA/JP)v2
moduleMatches = 0xA37C99E1, 0x4FF15DD2 ; v16(EU/NA/JP), v2(EU/NA/JP)
.origin = codecave
_addCoinsMultCheat:
@ -14,9 +14,9 @@ _addCoinsMultCheatExit:
blr
[DKCTF_MultCoins_v16]
moduleMatches = 0xA37C99E1 ; (EU/NA/JP)v16
moduleMatches = 0xA37C99E1 ; v16(EU/NA/JP)
0x020A5970 = bla _addCoinsMultCheat
[DKCTF_MultCoins_v2]
moduleMatches = 0x4FF15DD2 ; (EU/NA/JP)v2
moduleMatches = 0x4FF15DD2 ; v2(EU/NA/JP)
0x020A5904 = bla _addCoinsMultCheat

View File

@ -1,5 +1,5 @@
[DKCTF_MultLives]
moduleMatches = 0xA37C99E1, 0x4FF15DD2 ; (EU/NA/JP)v16, (EU/NA/JP)v2
moduleMatches = 0xA37C99E1, 0x4FF15DD2 ; v16(EU/NA/JP), v2(EU/NA/JP)
.origin = codecave
_addLivesMultCheat:
@ -15,9 +15,9 @@ or r3, r27, r27
blr
[DKCTF_MultLives_NAv16]
moduleMatches = 0xA37C99E1 ; (EU/NA/JP)v16
moduleMatches = 0xA37C99E1 ; v16(EU/NA/JP)
0x020A5978 = bla _addLivesMultCheat
[DKCTF_MultLives_NAv2]
moduleMatches = 0x4FF15DD2 ; (EU/NA/JP)v2
moduleMatches = 0x4FF15DD2 ; v2(EU/NA/JP)
0x020A590C = bla _addLivesMultCheat

View File

@ -0,0 +1,83 @@
#version 450
#extension GL_ARB_texture_gather : enable
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)
#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
#define gl_VertexID gl_VertexIndex
#define gl_InstanceID gl_InstanceIndex
#else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define SET_POSITION(_v) gl_Position = _v
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
// shader 10ccf0cc1234d069 // AA removal cemu 1.8
#ifdef VULKAN
layout(set = 1, binding = 2) uniform ufBlock
{
uniform ivec4 uf_remappedPS[2];
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[2];
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0;
// uf_fragCoordScale was moved to the ufBlock
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R4i = ivec4(0);
ivec4 R5i = ivec4(0);
ivec4 R123i = ivec4(0);
ivec4 R124i = ivec4(0);
ivec4 R125i = ivec4(0);
ivec4 R126i = ivec4(0);
ivec4 R127i = ivec4(0);
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
int PS0i = 0, PS1i = 0;
ivec4 tempi = ivec4(0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
bool activeMaskStack[3];
bool activeMaskStackC[4];
activeMaskStack[0] = false;
activeMaskStack[1] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStackC[2] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
}

View File

@ -0,0 +1,83 @@
#version 450
#extension GL_ARB_texture_gather : enable
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)
#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
#define gl_VertexID gl_VertexIndex
#define gl_InstanceID gl_InstanceIndex
#else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define SET_POSITION(_v) gl_Position = _v
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
// shader bafe6c9c37bfca4d // AA removal cemu 1.8 version
#ifdef VULKAN
layout(set = 1, binding = 2) uniform ufBlock
{
uniform ivec4 uf_remappedPS[2];
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[2];
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0;
// uf_fragCoordScale was moved to the ufBlock
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R4i = ivec4(0);
ivec4 R5i = ivec4(0);
ivec4 R123i = ivec4(0);
ivec4 R124i = ivec4(0);
ivec4 R125i = ivec4(0);
ivec4 R126i = ivec4(0);
ivec4 R127i = ivec4(0);
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
int PS0i = 0, PS1i = 0;
ivec4 tempi = ivec4(0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
bool activeMaskStack[3];
bool activeMaskStackC[4];
activeMaskStack[0] = false;
activeMaskStack[1] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStackC[2] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
}

View File

@ -0,0 +1,7 @@
[Definition]
titleIds = 0005000010137F00,0005000010138300,0005000010144800
name = Remove Anti-Aliasing
path = "Donkey Kong Country: Tropical Freeze/Enhancements/Remove AA"
description = Dissable the game's native AA.
#Credits: Skalfate
version = 6

View File

@ -0,0 +1,9 @@
[DKCTF_Resolution_v16]
moduleMatches = 0xA37C99E1 ; v16(EU/NA/JP)
0x100184A8 = .float $width/$height
0x100946F8 = .float $width/$height
[DKCTF_Resolution_v2]
moduleMatches = 0x4FF15DD2 ; v2(EU/NA/JP)
0x10018498 = .float $width/$height
0x10094758 = .float $width/$height

View File

@ -0,0 +1,341 @@
[Definition]
titleIds = 0005000010137F00,0005000010138300,0005000010144800
name = Graphics Settings
path = "Donkey Kong Country: Tropical Freeze/Graphics"
description = Changes the resolution of the game.|Made by getdls and Skalfate.
#Credits: getdls, Skalfate
version = 6
[Default]
$width = 1280
$height = 720
$padWidth = 854
$padHeight = 480
$gameWidth = 1280
$gameHeight = 720
$gamePadWidth = 854
$gamePadHeight = 480
# TV Resolution
[Preset]
category = TV Resolution
name = 320x180
$width = 320
$height = 180
[Preset]
category = TV Resolution
name = 640x360
$width = 640
$height = 360
[Preset]
category = TV Resolution
name = 960x540
$width = 960
$height = 540
[Preset]
category = TV Resolution
name = 1280x720 (Default)
default = 1
[Preset]
category = TV Resolution
name = 1600x900
$width = 1600
$height = 900
[Preset]
category = TV Resolution
name = 1920x1080
$width = 1920
$height = 1080
[Preset]
category = TV Resolution
name = 2560x1440
$width = 2560
$height = 1440
[Preset]
category = TV Resolution
name = 3200x1800
$width = 3200
$height = 1800
[Preset]
category = TV Resolution
name = 3840x2160
$width = 3840
$height = 2160
[Preset]
category = TV Resolution
name = 5120x2880
$width = 5120
$height = 2880
[Preset]
category = TV Resolution
name = 7680x4320
$width = 7680
$height = 4320
[Preset]
category = TV Resolution
name = 1680x1050 (16:10)
$width = 1680
$height = 1050
[Preset]
category = TV Resolution
name = 1920x1200 (16:10)
$width = 1920
$height = 1200
[Preset]
category = TV Resolution
name = 2560x1080 (21:9)
$width = 2560
$height = 1080
[Preset]
category = TV Resolution
name = 3440x1440 (21:9)
$width = 3440
$height = 1440
[Preset]
category = TV Resolution
name = 5120x2160 (21:9)
$width = 5120
$height = 2160
[Preset]
category = TV Resolution
name = 3840x1080 (32:9)
$width = 3840
$height = 1080
[Preset]
category = TV Resolution
name = 5120×1440 (32:9)
$width = 5120
$height = 1440
# Gamepad Resolution
[Preset]
category = Gamepad Resolution
name = 640x360
$padWidth = 640
$padHeight = 360
[Preset]
category = Gamepad Resolution
name = 854x480 (Default)
default = 1
[Preset]
category = Gamepad Resolution
name = 960x540
$padWidth = 960
$padHeight = 540
[Preset]
category = Gamepad Resolution
name = 1600x900
$padWidth = 1600
$padHeight = 900
[Preset]
category = Gamepad Resolution
name = 1920x1080
$padWidth = 1920
$padHeight = 1080
[Preset]
category = Gamepad Resolution
name = 2560x1440
$padWidth = 2560
$padHeight = 1440
[Preset]
category = Gamepad Resolution
name = 3200x1800
$padWidth = 3200
$padHeight = 1800
[Preset]
category = Gamepad Resolution
name = 3840x2160
$padWidth = 3840
$padHeight = 2160
[Preset]
category = Gamepad Resolution
name = 5120x2880
$padWidth = 5120
$padHeight = 2880
[Preset]
category = Gamepad Resolution
name = 7680x4320
$padWidth = 7680
$padHeight = 4320
[Preset]
category = Gamepad Resolution
name = 1680x1050 (16:10)
$padWidth = 1680
$padHeight = 1050
[Preset]
category = Gamepad Resolution
name = 1920x1200 (16:10)
$padWidth = 1920
$padHeight = 1200
[Preset]
category = Gamepad Resolution
name = 2560x1080 (21:9)
$padWidth = 2560
$padHeight = 1080
[Preset]
category = Gamepad Resolution
name = 3440x1440 (21:9)
$padWidth = 3440
$padHeight = 1440
[Preset]
category = Gamepad Resolution
name = 5120x2160 (21:9)
$padWidth = 5120
$padHeight = 2160
[Preset]
category = Gamepad Resolution
name = 3840x1080 (32:9)
$padWidth = 3840
$padHeight = 1080
[Preset]
category = Gamepad Resolution
name = 5120×1440 (32:9)
$padWidth = 5120
$padHeight = 1440
# Texture Redefines
# Texture Formats Legend:
# - 0x001=Color-Red8
# - 0x011=Depth24_Stencil8
# - 0x01a=Color-RGBA8
# - 0x80e=Depth32
# Main Game Renderer
[TextureRedefine]
width = 1280
height = 720
formats = 0x001,0x011,0x01a,0x80e
tileModesExcluded = 0x001 # For Video Playback
overwriteWidth = ($width/$gameWidth) * 1280
overwriteHeight = ($height/$gameHeight) * 720
# Loading Screen DK Running
[TextureRedefine]
width = 1280
height = 256
formats = 0x01a,0x80e
overwriteWidth = ($width/$gameWidth) * 1280
overwriteHeight = ($height/$gameHeight) * 256
# GamePad
[TextureRedefine]
width = 864
height = 480
formats = 0x01a
overwriteWidth = ($padWidth/$gamePadWidth) * 864
overwriteHeight = ($padHeight/$gamePadHeight) * 480
# GamePad
[TextureRedefine]
width = 854
height = 480
formats = 0x01a
overwriteWidth = ($padWidth/$gamePadWidth) * 854
overwriteHeight = ($padHeight/$gamePadHeight) * 480
# Half-Res
[TextureRedefine]
width = 640
height = 368
formats = 0x01a,0x80e
formatsExcluded = 0x007
overwriteWidth = ($width/$gameWidth) * 640
overwriteHeight = ($height/$gameHeight) * 368
# Half-Res
[TextureRedefine]
width = 640
height = 360
formats = 0x01a,0x80e
tileModesExcluded = 0x001 # 0x007 half res hold color data and is used for video playback
overwriteWidth = ($width/$gameWidth) * 640
overwriteHeight = ($height/$gameHeight) * 360
# 1/4 Res
[TextureRedefine]
width = 320
height = 192
formats = 0x01a
overwriteWidth = ($width/$gameWidth) * 320
overwriteHeight = ($height/$gameHeight) * 192
# 1/4 Res
[TextureRedefine]
width = 320
height = 180
formats = 0x01a
overwriteWidth = ($width/$gameWidth) * 320
overwriteHeight = ($height/$gameHeight) * 180
# In-game UI Top-left screen
[TextureRedefine]
width = 320
height = 128
formats = 0x01a,0x011
overwriteWidth = ($width/$gameWidth) * 320
overwriteHeight = ($height/$gameHeight) * 128
# 1/4 Res
[TextureRedefine]
width = 160
height = 96
formats = 0x01a
overwriteWidth = ($width/$gameWidth) * 160
overwriteHeight = ($height/$gameHeight) * 96
# 1/4 Res
[TextureRedefine]
width = 160
height = 90
formats = 0x01a
overwriteWidth = ($width/$gameWidth) * 160
overwriteHeight = ($height/$gameHeight) * 90
# Additonal GUI Textures
# Donkey Kong's Face
[TextureRedefine]
width = 96
height = 108
formats = 0x01a
overwriteWidth = ($width/$gameWidth) * 96
overwriteHeight = ($height/$gameHeight) * 108