From 2f6953efb62b487639bbc82be95466e07cb42cdb Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 15 Dec 2021 16:39:15 -0800 Subject: [PATCH 1/3] TextureConverterShaderGen: Set alpha to 1 on intensity formats if EFB lacks alpha We were already doing this for non-intensity formats, but it seems like the same applies to intensity formats. --- Source/Core/VideoCommon/TextureConverterShaderGen.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp index 42e077ba96..ea458717c8 100644 --- a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp +++ b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp @@ -216,6 +216,9 @@ ShaderCode GeneratePixelShader(APIType api_type, const UidData* uid_data) } else if (uid_data->is_intensity) { + if (!uid_data->efb_has_alpha) + out.Write(" texcol.a = 1.0;\n"); + bool has_four_bits = (uid_data->dst_format == EFBCopyFormat::R4 || uid_data->dst_format == EFBCopyFormat::RA4); bool has_alpha = From fd2324e40aa5a398edda25244797f887a3364c4d Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 17 Dec 2021 20:21:24 -0800 Subject: [PATCH 2/3] Fifo analyzer: Rename mipmap filter to half scale for EFB copies The field itself is named half_scale, and it can be used for things unrelated to mipmaps, so reflecting that name in the fifo analyzer helps. --- Source/Core/VideoCommon/BPMemory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h index 098e72d5c0..3b89cded7e 100644 --- a/Source/Core/VideoCommon/BPMemory.h +++ b/Source/Core/VideoCommon/BPMemory.h @@ -2059,7 +2059,7 @@ struct fmt::formatter "Converting from RGB to YUV: {}\n" "Target pixel format: {}\n" "Gamma correction: {}\n" - "Mipmap filter: {}\n" + "Half scale: {}\n" "Vertical scaling: {}\n" "Clear: {}\n" "Frame to field: {}\n" From 254f39cf785e7dc4790acca38aa0dc10f506aa70 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sat, 18 Dec 2021 18:01:40 -0800 Subject: [PATCH 3/3] =?UTF-8?q?GameSettings:=20Add=20patch=20for=20black?= =?UTF-8?q?=20screen=20effects=20in=20Pok=C3=A9mon=20Battle=20Revolution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Sys/GameSettings/RPBE01.ini | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Data/Sys/GameSettings/RPBE01.ini diff --git a/Data/Sys/GameSettings/RPBE01.ini b/Data/Sys/GameSettings/RPBE01.ini new file mode 100644 index 0000000000..8b7fc7d50d --- /dev/null +++ b/Data/Sys/GameSettings/RPBE01.ini @@ -0,0 +1,10 @@ +# RPBE01 - Pokemon Battle Revolution + +[OnFrame] +# Fixes black pixels on the bottom/right of the screen, and black in +# some move effects that apply distortion to the screen +# This fixes a bug in the base game, not an emulation issue +# See https://gist.github.com/Pokechu22/e9fa9037fe21312ff32475638b78ba27 +$Fix black screen effects +0x80244A94:dword:0x39080000 +0x80244A9C:dword:0x38030000