How I made Mario 64s Render Graph 124% FASTER

  • เผยแพร่เมื่อ 29 ก.ย. 2021
  • 0:00 Introduction
    0:53 Chapter1: Compiler Optimization
    1:50 Chapter2: Math Functions
    2:58 Chapter3: Shadows
    3:53 Chapter4: The Instruction Cache
    4:50 Chapter5: Animated Bones
    5:31 Chapter6: The RDRAM
    6:19 Conclusion
    7:01 Bonus: Insane Man Rambling On About C Code

    Yes, this would help with 60FPS Console SM64.
    Subscribe for more Retro Mods!
    🐦 KazeEmanuar

ความคิดเห็น • 722

  • Kaze Emanuar

    Programmers complaining that loops are not faster than unrolled ones: Watch the bonus section of the video. This is an N64 hardware specific thing. (also yes, I do have the compilerflag to not unroll loops on)

  • Modern Vintage Gamer

    great stuff!

  • JcFerggy
    JcFerggy  +604

    I've said something similar on a past video, but I would be interested in a patch for the vanilla SM64 that applies all these fixes you've done over the years. I'm sure most of the rom hacking community wouldn't have much use for it, but I think it would be a great technical showcase.

  • Jimmy Hirr
    Jimmy Hirr  +168

    Optimizing math functions using linear algebra and an intimate knowledge of how the R4300i CPU works: 3ms

  • TruelyJohn64

    The original team of like 20 did a pretty great job creating the game, console, controller, and even 2 more games at the same time

  • N64 Glenn Plant

    I’m glad you put the “ramble” as you call it at the end - I’m sure I’m not the only one who loves this stuff 🧐

  • King Pixel
    King Pixel  +336

    There is a certain charm about watching a gameplay recorded from real hardware and one recorded from emulator, I’m not sure how to explain it tho

  • June
    June  +144

    After two hours of scouring the code, I managed to find the precise floating point calculation that was causing this slowdown, after re-writing this code to use less space and be less hardware intensive, I managed to boost overall performance by 20%

  • SNES drunk

    This is really interesting. I wonder why they felt like the game needed three? vertical raycasts. I suppose that might just go with the territory of making stuff up as you go along

  • B Targ
    B Targ  +106

    Making this open-source could help optimise the code even further, but this is really pushing the hardware to its limits! Can't wait for more

  • zheil9152
    zheil9152  +20

    I’d pay good money to take a “Kaze teaches SM64 C programming” class for an intro to modding the game. I’m someone that works on IoT embedded systems, but graphics and games are a whole different animal

  • Ben Goodwin

    "the compiler wasn't good enough so I rewrote this function in assembly" what a madlad

  • old mage
    old mage  +58


  • thekingofmoo

    Could you make a rom hack of standard Mario 64 using all of these optimizations?

  • Mario
    Mario  +34

    I think you should add a minecart from the outside of Bowser's Blazing Burrows. That would make sense how Mario got hop in the cart.

  • Rubixninja314

    "my compiler will optimize it all, I don't need to understand the cpu"

  • John Smith

    As a server programmer making microservices to be managed across dozens of servers, I think I'll stick to my high level abstractions and libraries. However, I always give props to people that take the time to do proper optimization where it's important, especially in projects like this when they can optimize down to the hardware level some of the calls that will happen millions of times. Nice job Kaze. Respect from a fellow dev.

  • roblox_harry 2006

    I'm not very tech-savy with these explinations, but I would love to see Mario 64 eventually running in 480p at 60fps on real N64 hardware!!!

  • Shadoninja

    You should have done a TAS side by side before/after to show the visual difference

  • Samuel Voltz

    Me almost to the end of the rambling section: Okay, this is impressive. It can't possibly get any more insane...