Skip to content

Instantly share code, notes, and snippets.

View Pokechu22's full-sized avatar

Pokechu22 Pokechu22

View GitHub Profile
@Pokechu22
Pokechu22 / EASports.md
Last active February 14, 2022 20:04
Description of the pink rendering issue in EA Sports Active

Preliminaries

The fifolog in question is ea-pink, downloadable here, which shows gameplay from EA Sports Active. There are several oddities with how this is rendered; for instance, it is rendered in two halves (vertically) and some objects are only rendered in one of the halves (this is best seen by using freelook), similar to nhl-slap (but that game does it to a greater extent). The game also renders a vignette (causing the edges of the image to be darker) and the hud after the broken effect. But it is that broken effect, resulting in everything being pink, that this document is about.

The broken effect is object 819 in that fifolog (numbered 842 with better-fifo-analyzer-part-3).

See https://gist.github.com/Pokechu22/f06db7a9f226d9b0c72507886d7a72ce for additional images as well a

Preliminaries

The fifolog in question is ss-map, downloadable here. I will be discussing only the green part of the map, but all of the main parts of the map render the same way (with the main configuration happening in object 1). The objects in question are: 1: Brown (pathways); 2: dark brown (rocks?); 3: yellow (sand); 4: green (grass); 6: dark green (unknown, not much uses this); 6: grey (stone); 7: red (roof); 8: brown (roof). Object 9, water, has its own configuration which I haven't investigated, but the water seems to all be at the same elevation anyways.

The border shadows around the map are also dynamically generated; they use EFB copies. The relevant objects are currently numbered 16 and 17 as of Dolphin 5.0-14344, and their vertex data is at offsets 00047466 and 000476d5 respectively.

Texture coordinates

Relevant data
@Pokechu22
Pokechu22 / DebugCubeExperiments.md
Last active June 10, 2021 04:36
Investigations into the Super Mario Sunshine debug cubes issue

This started as a random patch to Dolphin's software renderer that fixed the "debug cubes" in Super Mario Sunshine (issue 8059) without causing the bridge in a custom Mario Kart Wii track to disappear (issue 12379) or breaking the reflections in one Super Monkey Ball stage (issue 12366). The patch itself seems to be wrong on later testing, but I'm still using this gist to document my research here.

Note that this is mostly just personal notes, and there's no guarantee that anything is correct (much of this is speculation that I later prove wrong). I've avoided editing older comments to correct them, and there may be silly mistakes there that I've since found (usually noted in the next update).

Please use this guide instead, this one was written in a hurry and I forgot I had the older one.

~~Basically, you'll want to start with the MCP 1.12 release (temporarily at http://www.modcoderpack.com/files/mcp940.zip ), and then modify it to work with 1.12.2. This is actually quite simple. First, you need to edit conf/version.cfg and set both versions to 1.12.2. That on its own is not enough, but it's a critical step. Then you need to grab new SRG mappings. Normally you'd get that through the !srg command, but MCPBot doesn't have it for some versions. Instead, you can get it through forge's maven. (normally it's also on the export site but not for 1.12.2). The link is http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip . To set that up, first delete the conf/patches folder (otherwise patches will be merged, breaking things), and then unzip the contents of that ZIP into conf, overwriting files as pr

#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
#include <gccore.h>
#include <fat.h>
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
#include <gccore.h>
#include <fat.h>
#include <time.h>
#include <sys/stat.h>
@Pokechu22
Pokechu22 / Luigi1.md
Last active April 17, 2021 05:24
(Partically incorrect) notes while investigating the Luigi's Mansion portrait issue (https://bugs.dolphin-emu.org/issues/11462)

The painting texture for Luigi's Mansion in JMC's FIFO on frame 0 is object 373 and 374. Object 373 shows Mario, while Object 374 shows Bowser; a lot of the early objects are rendering either Mario or Bowser (and both are rendered, even though Bowser only shows up in the ending cutscene). This is presumably done by fading BPMEM_TEV_COLOR_RA's alpha from 0xff to 0 for object 373 and from 0 to 0xff for object 374; it is at 0 for 374 in the given frame in any case.

I dumped textures while using playing back the FIFO using the software renderer, and got tar364_stage0_map0_mip0.png, tar365_stage0_map0_mip0.png, and tar364_ind0_map1_mip0.png (and an identical copy as tar365_ind0_map1_mip0.png). Although that last file may appear invisible, it has contents; its

@Pokechu22
Pokechu22 / IndTest.c
Last active April 17, 2021 04:32
Dolphin Luigi's Mansion portrait indirect texture issue
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
#include <gccore.h>
#include <fat.h>
#include <time.h>
#include <sys/stat.h>