yuzu-mirror.github.io/entry/yuzu-mini-dev-2/index.html

384 lines
22 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang=" en-us "class="has-navbar-fixed-top">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="theme-color" content="#404040">
<meta property="og:title" content="Mini-Series - Dev Interview #2 &middot; yuzu" />
<meta property="og:site_name" content="yuzu" />
<meta property="og:url" content="https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/" />
<meta property="og:description" content="Good day, yuz-ers (bad pun, I know)!
While our devs are hard at work trying to bring you more performance improvements and game compatibility, we are back again with something a little bit more interesting - Dev Interview #2.
Jump right in, to find out who we&rsquo;re interviewing this time." />
<meta name="description" content="Good day, yuz-ers (bad pun, I know)!
While our devs are hard at work trying to bring you more performance improvements and game compatibility, we are back again with something a little bit more interesting - Dev Interview #2.
Jump right in, to find out who we&rsquo;re interviewing this time." />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/banner.png" />
<link rel="icon" href="https://yuzu-mirror.github.io/favicon.ico" />
<link rel="shortcut icon" href="https://yuzu-mirror.github.io/favicon.ico" type="image/x-icon" />
<link rel="canonical" href="https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/">
<title>Mini-Series - Dev Interview #2 - yuzu</title>
<link href="https://fonts.googleapis.com/css?family=Ubuntu|Dosis" rel="stylesheet">
<link href="https://use.fontawesome.com/releases/v6.4.0/css/all.css" rel="stylesheet">
<link rel="stylesheet" href="https://yuzu-mirror.github.io/scss/style.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.11.1/baguetteBox.min.css" type="text/css" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112443698-1"></script>
<script type="text/javascript">
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-112443698-1');
</script>
</head>
<body>
<nav class="navbar is-dark is-size-6 is-fixed-top" role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="https://yuzu-mirror.github.io">
<svg xmlns="http://www.w3.org/2000/svg" class="navbar-logo" viewBox="0 0 515.83 163.11"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#ff3c28;}.cls-3{fill:#0ab9e6;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M515.83,23.23v73c0,14.5-2.24,25.24-6.84,32.82-5.92,10.15-16.2,15.32-30.53,15.32s-24.62-5.23-30.58-15.57c-4.56-7.64-6.79-18.42-6.79-32.92V23.23a4.51,4.51,0,0,1,4.51-4.51h2.28a4.51,4.51,0,0,1,4.51,4.51v72.5c0,33.53,14.88,37.4,26.07,37.4,12.14,0,26.08-4.17,26.08-36.71V23.23a4.51,4.51,0,0,1,4.51-4.51h2.27A4.51,4.51,0,0,1,515.83,23.23Z"/><path class="cls-1" d="M421.34,144.4H353.45c-2.35,0-4.72-1.88-4.72-6.08a8.32,8.32,0,0,1,1.33-4.49L410.39,29.36H360.8a4.51,4.51,0,0,1-4.51-4.5V23.28a4.51,4.51,0,0,1,4.48-4.51h.81c58.68-.11,59.11,0,59.66.07a5.19,5.19,0,0,1,4,5.8,8.74,8.74,0,0,1-1.32,3.75L363.33,133.17h58a4.51,4.51,0,0,1,4.51,4.51v2.21A4.51,4.51,0,0,1,421.34,144.4Z"/><path class="cls-1" d="M248.45,23.23v82.06c0,26-11.8,38.44-37.12,39.09h-.12a4.51,4.51,0,0,1-4.51-4.51V137.5a4.51,4.51,0,0,1,4.48-4.5c18.49-.15,26-8.23,26-27.9v-2.37a32.34,32.34,0,0,1-3.34,3.28c-6.39,5.5-14.5,8.29-24.07,8.29-22.86,0-35-12.41-35-35.89V23.23a4.52,4.52,0,0,1,4.51-4.51h2.22a4.52,4.52,0,0,1,4.5,4.51v55c0,7.6,1.82,14.22,5,18.18,3.57,4.56,9.17,6.49,18.75,6.49,10.13,0,17.32-3.76,22-11.5,3.61-5.92,5.43-13.66,5.43-23V23.23a4.52,4.52,0,0,1,4.51-4.51h2.22A4.52,4.52,0,0,1,248.45,23.23Z"/><path class="cls-1" d="M338.12,23.23v73c0,14.5-2.24,25.24-6.84,32.82-5.92,10.15-16.2,15.32-30.53,15.32s-24.62-5.23-30.58-15.57c-4.56-7.64-6.79-18.42-6.79-32.92V23.23a4.51,4.51,0,0,1,4.51-4.51h2.28a4.51,4.51,0,0,1,4.51,4.51v72.5c0,33.53,14.88,37.4,26.07,37.4,12.14,0,26.08-4.17,26.08-36.71V23.23a4.51,4.51,0,0,1,4.51-4.51h2.27A4.51,4.51,0,0,1,338.12,23.23Z"/><g id="g823"><g id="right"><g id="g827"><g id="g833"><path id="path835" class="cls-2" d="M81.56,32.62V163.11a65.25,65.25,0,0,0,0-130.49M94.3,46.91a52.54,52.54,0,0,1,0,101.91V46.91"/></g></g></g><g id="left"><g id="g839"><g id="g845"><path id="path847" class="cls-3" d="M65.24,0a65.25,65.25,0,0,0,0,130.49ZM52.5,14.29V116.2A52.52,52.52,0,0,1,28.12,28.12,52.16,52.16,0,0,1,52.5,14.29"/></g></g></g></g></g></g></svg>
</a>
<div class="burger navbar-burger is-dark" data-target="navMenu">
<span></span>
<span></span>
<span></span>
</div>
</div>
<div class="navbar-menu" id="navMenu">
<div class="navbar-start">
<a class="navbar-item px-lg" href="/entry">
Blog
</a>
<a class="navbar-item px-lg" href="/downloads">
Download
</a>
<a class="navbar-item px-lg" href="/wiki/faq">
FAQs
</a>
<a class="navbar-item px-lg" href="/game">
Compatibility
</a>
<a class="navbar-item px-lg" href="/screenshots">
Screenshots
</a>
<a class="navbar-item px-lg" href="https://www.patreon.com/yuzuteam">
Patreon
</a>
<a class="navbar-item px-lg" href="https://profile.yuzu-mirror.github.io">
Profile
</a>
<a class="navbar-item px-lg is-hidden-desktop" href="https://discord.gg/u77vRWY" target="_blank">
<i class="fab fa-discord mr-sm"></i> Discord
</a>
<a class="navbar-item px-lg is-hidden-desktop" href="https://twitter.com/yuzuemu" target="_blank">
<i class="fab fa-twitter mr-sm"></i> Twitter
</a>
<a class="navbar-item px-lg is-hidden-desktop" href="https://github.com/yuzu-mirror/yuzu" target="_blank">
<i class="fab fa-github mr-sm"></i> GitHub
</a>
</div>
<div class="navbar-end">
<a class="navbar-item px-lg is-hidden-touch" href="https://discord.gg/u77vRWY" target="_blank">
<span class="icon">
<i class="fab fa-2x fa-discord"></i>
</span>
</a>
<a class="navbar-item px-lg is-hidden-touch" href="https://twitter.com/yuzuemu" target="_blank">
<span class="icon">
<i class="fab fa-2x fa-twitter"></i>
</span>
</a>
<a class="navbar-item px-lg is-hidden-touch" href="https://github.com/yuzu-mirror/yuzu" target="_blank">
<span class="icon">
<i class="fab fa-2x fa-github"></i>
</span>
</a>
</div>
</div>
</div>
</nav>
<div class="mb-md blog-entry-header single" style="background-image: url('https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/banner_hub1ab0b7c83feee0c87ce163b4a260c09_1852363_1280x0_resize_q99_bgffffff_box_3.jpg');background-repeat:no-repeat;background-size:contain;background-position:center;"></div>
<div class="has-text-centered">
<div>
<span class="title px-md py-sm">Mini-Series - Dev Interview #2</span>
</div>
<div>
<span class="h3 px-md py-sm">
Written by <a href="https://community.citra-emu.org/u/CaptV0rt3x/summary">CaptV0rt3x</a>
on August 09 2019
</span>
</div>
</div>
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<section class="section content pt-sm">
<br>
<p>Good day, yuz-ers (<del>bad pun, I know</del>)!
While our devs are hard at work trying to bring you more performance improvements and game compatibility, we are back again with something a little bit more interesting - <strong>Dev Interview #2</strong>.
Jump right in, to find out who we&rsquo;re interviewing this time.</p>
<hr>
<p>Welcome to part 2 of our previously announced <code>Developer Interviews</code> segment.
We are extremely proud that we were once again successful in dragging one of our developers away from programming to answer a few questions.
This time, it is an interview with one of our resident GPU emulation experts: <em><strong>Rodrigo</strong></em>.</p>
<p>Rodrigo (a.k.a <a href="https://github.com/ReinUsesLisp">ReinUsesLisp</a>) is best known for his massive contributions to yuzu in the GPU emulation area.
His various contributions have improved the user&rsquo;s visual experience, and his shader disk caches improved the performance of many games on yuzu.
He is also the guy who is currently working on implementing the Vulkan API.
Below, you&rsquo;ll find an informative conversation we had that should also help you all understand more about what he&rsquo;s doing behind the scenes.</p>
<hr>
<p><strong>Q: Hi Rodrigo! Wanna tell our patrons a little about yourself?</strong></p>
<p><strong>R:</strong> Hi! I&rsquo;m some random guy from Argentina working on emulating the Nintendo Switch&rsquo;s GPU, (<em>and I&rsquo;m totally not ripping off Lioncash with this presentation</em>).</p>
<p>Right now, I am a school teacher and don&rsquo;t have a formal programming background, but I&rsquo;d like to get a computer science job in the future. I&rsquo;m also interested in languages (both spoken &amp; programming) and software development.</p>
<p><strong>Q: You are entirely self taught?! So, what made you get into emulation?</strong></p>
<p><strong>R:</strong> Yes. See, I always used to play games in my childhood through emulators, mostly 90s console emulators (SNES and Genesis). Later on, I remember playing <code>Twilight Princess</code> on Hyrule Fields with Dolphin at <strong>3 FPS</strong>, it was just awesome.</p>
<p>Around 7 years ago, I learnt to program small RPGs in plain C++ (and then C), but that never got beyond the prototyping stages, mainly because of boredom and the lack of artistic resources.</p>
<p>What got me into emulation mainly was yuzu&rsquo;s very <a href="https://www.youtube.com/watch?v=1VzyIHMTA2Q">first video</a> of three commercial games booting (Cave Story, Isaac Afterbirth and Puyo Puyo Tetris).
<strong>There it was!</strong> &ndash; an emulator of a console, that I thought was a successful piece of hardware: A tablet with a somewhat desktop GPU? That would have been madness some years ago.</p>
<div class="columns is-img-preview is-bottom-marginless">
<div class="column is-bottom-paddingless">
<a href="./first.png" title="">
<img src="https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/first_hu1a5066c6b19d4199d2184b5decfc9f62_190724_800x0_resize_q90_bgffffff_box_3.jpg" alt="Cave Story&#43; (First yuzu build) - We&#39;ve come a long way from that!"></a>
</div>
</div>
<p class="has-text-centered is-italic has-text-grey-light">Cave Story&#43; (First yuzu build) - We&#39;ve come a long way from that!</p>
<p><strong>Q: That&rsquo;s really interesting to hear. Before yuzu and Switch emulation, have you ever worked on other older emulators?</strong></p>
<p><strong>R:</strong> No, I&rsquo;ve never worked on a non-Switch emulator. The closest thing I did related to emulation was a clone of Pico-8 Celeste for the NES in 6502 assembly.
It was a fun experience because I learnt the curse, and blessing, that it is to work that close to the hardware; it showed me what a pain it was to program classics like Super Mario Bros. 3.</p>
<p><strong>Q: Let&rsquo;s get a bit technical. What areas of Switch emulation have you worked on the most, and why? Which other areas keep you interested?</strong></p>
<p><strong>R:</strong> I&rsquo;ve worked on the graphics, and compute departments of Switch emulation.
Emulating a modern GPU (Tegra) by using other modern GPUs (user end) is my area of interest.
Here&rsquo;s a cool fact for those that don&rsquo;t know: the Switch&rsquo;s GPU is an Nvidia Tegra X1, and it utilizes the same architecture of a GTX 960+.</p>
<p>As for why I like it, it&rsquo;s because GPUs nowadays are like mini sub-computers inside a machine.
The list of functionality present in the Tegra X1 grows bigger the more we look into it; since its a Nvidia device, it can execute CUDA kernels (programs that run some computations in the GPU, primarily used for scientific calculations or accelerated computations).
It has the 5 traditional shader stages, an extra vertex shader stage, and compute shaders; while at the same time, it supports the supposedly deprecated features from the D3D9 (Direct3D) era, like rendering with quads and alpha testing.</p>
<p>From time to time, I try to get into Core emulation, but it never ends up with good results. Funnily enough, while I was investigating the SSBU (Super Smash Bros. Ultimate) crash, I totally thought I made a breakthrough - only to find out I was disassembling the wrong module. (LOL)</p>
<p><strong>Q: What are some of the challenges you generally face when working on GPU emulation?</strong></p>
<p><strong>R:</strong> One of biggest challenges is the inherent variable state of Nvidia GPUs.
Sometimes, graphics APIs like OpenGL and Vulkan have requirements that are the &ldquo;common ground&rdquo;, something that&rsquo;s needed by the lowest denominator.
We have to write very annoying workarounds to get that functionality working in the emulator.</p>
<p style="color:cyan"><b><i>Here are some sneak peeks from my Vulkan test build. It's still missing a lot of things, but it's not too bad either.</b></i></p>
<div class="columns is-img-preview">
<div class="column has-text-centered">
<a href="./botw.png" title="The Legend of Zelda - Breath of the Wild">
<img src="https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/botw_hu2f3d8639263ce1cf75e97f6883b98d6b_1264331_1024x0_resize_q90_bgffffff_box_3.jpg" alt="The Legend of Zelda - Breath of the Wild"></a>
<p class="has-text-centered is-italic has-text-grey-light">The Legend of Zelda - Breath of the Wild</p>
</div>
<div class="column has-text-centered">
<a href="./onepiece.png" title="One Piece - Unlimited World">
<img src="https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/onepiece_hu05ee499615279f2c8815885d30394e65_1619135_1024x0_resize_q90_bgffffff_box_3.jpg" alt="One Piece - Unlimited World"></a>
<p class="has-text-centered is-italic has-text-grey-light">One Piece - Unlimited World</p>
</div>
<div class="column has-text-centered">
<a href="./smo.png" title="Super Mario Odyssey">
<img src="https://yuzu-mirror.github.io/entry/yuzu-mini-dev-2/smo_hud1d23ab3f053045469a44d30a1066667_667906_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Super Mario Odyssey"></a>
<p class="has-text-centered is-italic has-text-grey-light">Super Mario Odyssey</p>
</div>
</div>
<p><strong>Q: What motivates you every day to keep working on this stuff?</strong></p>
<p><strong>R:</strong> Emulating modern GPU features, on hardware with those same features, is something that has only been possible in the recent times, due to the increasing similarities in hardware between consoles and desktops.
Slowly understanding how some known functionality is implemented by the hardware, and then re-implementing it on the emulator afterwards, really motivates me.</p>
<p>There are two things that I enjoy the most:</p>
<ul>
<li>seeing games run faster, and better than how they ran before.</li>
<li>seeing games getting closer and closer to how they look on the console.</li>
</ul>
<p>And if I manage to get these improvements by writing better code, it&rsquo;s an added bonus.</p>
<p><strong>Q: Can you tell us a little about what you are currently working on? A sneak-peek perhaps?</strong></p>
<p><strong>R:</strong> That&rsquo;s classified information :P
I&rsquo;ve recently worked on an improved &amp; generic texture cache.
<a href="https://github.com/FernandoS27">Blinkhawk</a> helped by cleaning up my bugs to get the thing working, and he&rsquo;s done an awesome job.
A generic texture cache allows us to share the complex part of it across graphics APIs.
That means that we will have the same overall logic for OpenGL and Vulkan, making it easier to maintain and improve.</p>
<p>It&rsquo;s not as good as Dolphin&rsquo;s VideoCommon, one of the better examples for generic graphics code, but it&rsquo;s still better than having to copy-paste code everywhere.
This is one of the last prerequisites for the Vulkan API.</p>
<p>I&rsquo;ve also been working on implementing various compute shader related instructions: shared memory (ARB_compute_shader), atomic operations, memory shuffles (NV_shader_thread_shuffle), votes (NV_gpu_shader5, NV_shader_thread_group), surface operations (SUATOM, SULD).
These are all features from the D3D11/12 era, meaning that we are reaching interesting complexity on the shaders we find in recently released games.
I am also investigating how to implement some missing functionality in yuzu, but that&rsquo;s a story for another time.</p>
<p><strong>Q: Would you like to say something to our audience?</strong></p>
<p><strong>R:</strong> Well, there are three things I&rsquo;d like to say.</p>
<p><code>First and foremost...</code> most of our GPU work has been possible thanks to research done by the people working on nouveau (mesa&rsquo;s Nvidia free driver) and libnx&rsquo;s nouveau port to Switch. They have been of huge help.</p>
<p><code>Second...</code> many people believe that Vulkan will bring lots of performance improvements to the emulator&hellip; I was one of those too. Don&rsquo;t get me wrong, it might boost performance on some hardware vendors, but the main issue resides in Vulkan&rsquo;s design.
It is designed in a way that the programmer cooks and reuses its resources, but in emulation you can&rsquo;t easily know what&rsquo;s going to happen in the future. On the other hand, OpenGL, by design, works without backing its commands.</p>
<p>Some people might ask, why would we want two APIs? I think one API is going to perform better on two vendors, while the other API is prevalent on the other vendor.</p>
<p><code>And last, but not least...</code> We have a console that&rsquo;s just two years old, and it&rsquo;s still lacking the mainstream entries for most Nintendo IPs: Metroid, Donkey Kong Country, the announced Gen 8 Pokémon, Star Fox, Mario Kart, F-Zero (who knows? maybe they will find a way to refresh the franchise) and the end-of-cycle Zelda.</p>
<p>I&rsquo;m really excited about what&rsquo;s to come, and how good Switch emulators will perform with these games. Emulation has been surprisingly faster in the last few years. Let&rsquo;s look forward to a wonderful future&hellip;</p>
<hr>
<p>This has been absolutely wonderful.
Huge thanks to <a href="https://github.com/ReinUsesLisp">Rodrigo</a> for taking time off his busy schedule to give us a brief insight into his life.
We wish you success in all your future endeavours. Keep making yuzu awesome!</p>
<p>We hope you all enjoyed it, and we will be back soon with another featured yuzu dev to bring you behind the curtain again.
Until then, thank you for your support and stay tuned!</p>
<p> 
<h4 style="text-align:center;">
<b>Please consider supporting us on <a href="https://www.patreon.com/yuzuteam">Patreon</a>!<br>
If you would like to contribute to this project, check out our <a href="https://github.com/yuzu-emu/yuzu">GitHub</a>!</b>
</h4>
</p>
</section>
<div class="has-text-centered">
<a class="pagination-next" href="https://community.citra-emu.org/t/135709">Continue the discussion on our forums.</a>
</div>
</div>
<div class="column">
<div class="px-md">
<ins class="adsbygoogle"
style="display:block; margin-left:25px;"
data-ad-client="ca-pub-4126545610079023"
data-ad-slot="6276099127"
data-ad-format="auto"></ins>
<br>
<p class="is-size-6 has-text-centered">Advertisement</p>
</div>
</div>
</div>
<div class="column">
<div class="px-md has-text-centered">
<p class="is-size-6 has-text-centered">Advertisement</p>
<br>
<ins class="adsbygoogle" style="display:inline-block;width:728px;height:100px" data-ad-client="ca-pub-4126545610079023" data-ad-slot="1038554045"></ins>
</div>
</div>
</div>
<div class="container">
<footer class="footer">
<div class="content has-text-centered">
copyright &copy; 2025 yuzu emulator team
</div>
</footer>
</div>
<script src="https://yuzu-mirror.github.io/js/script.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.11.1/baguetteBox.min.js" type="text/javascript"></script>
<script type="text/javascript">
window.addEventListener("DOMContentLoaded", function() {
baguetteBox.run('.is-img-preview');
});
</script>
<script type="text/javascript">
for (var i = 0; i < document.getElementsByClassName('adsbygoogle').length; i++) {
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
</body>
</html>