June 22, 2026

Emulating Super Mario Kart SNES Developers Notes

Dev Notes on emulating Super Mario Kart for the Super Nintendo: 


Clean graphics, but we have a remaining issue visually: other racers are too small compared to how it actually looks on a real SNES.

Issue: Karts do not collide with each other, they drive over each other. This bug could make other cars (racers/karts) larger or smaller than the player.

Fixed. What was the bug?

DSP‑1 Project M output (projected scale / inverse‑depth) code had the exponent bias as −7 where hardware uses −6.

When the number was set ti -7, M was exactly half the real value. In Super Mario Kart, that M value does two jobs: It controls the scaling of the kart sprites, and that made the other races render at half their normal size. It makes a lot more sense when you look at it in hindsight.

The second thing that it did was it messed with the collision depth sort key / window check. Overlapping karts that would normally interact would instead drive over each other like there was nothing there. Essentially you drive through them.

Notes:  The player kart's hardcoded focal depth / scale reference is 264.

I couldn't help myself, so I set it to - 5 to see the effect!







---



Issue: When the player presses start, the start menu defaults to "2P GAME".


Fixed. What was the bug?

Super Mario Kart defaulted to 2P GAME because the emulator zero-fills WRAM at power-on, but a real SNES powers up with non-zero garbage in RAM.

WRAM now fills WRAM with the 0x55 pattern that emulators conventionally use to approximate the power-on state


---


Issue:

Super Mario Kart graphics are garbled during a race.

Fixed. What was the bug?

If there is a incorrect CPU instruction, it will cause the visual rendering to mess up. Make sure you have enough CPU accuracy before you expect the graphics to be cleared up.

Symptom of incorrect CPU opcodes running is the game running at normal speed then jumping to a fast speed with messed up graphics displaying for everything: the racers, the UI text, and the track.


---


You'll be able to extract the clean track graphics once everything is correct enough:



No comments:

Post a Comment

Articles are augmented by AI.