740 lines
34 KiB
HTML
740 lines
34 KiB
HTML
<!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="Progress Report 2018 Part 1 · yuzu" />
|
||
<meta property="og:site_name" content="yuzu" />
|
||
<meta property="og:url" content="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/" />
|
||
<meta property="og:description" content="It’s been a bumpy ride. We have had lots of stuff happen to yuzu and we are excited to share that
|
||
with you. Let’s get started!" />
|
||
<meta name="description" content="It’s been a bumpy ride. We have had lots of stuff happen to yuzu and we are excited to share that
|
||
with you. Let’s get started!" />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="og:image" content="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/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-progress-report-2018-p1/">
|
||
|
||
<title>Progress Report 2018 Part 1 - 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-progress-report-2018-p1/banner_hucb228be27da9b52d4cca2d3657bdc1d8_1281014_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">Progress Report 2018 Part 1</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 July 14 2018
|
||
</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>It’s been a bumpy ride. We have had lots of stuff happen to yuzu and we are excited to share that
|
||
with you. Let’s get started!</p>
|
||
<p>After months of research and countless hours of coding, the developers who gave you <a href="https://citra-emu.org">Citra</a>,
|
||
an emulator for the Nintendo 3DS, now bring to you yuzu – an experimental emulator for the Nintendo
|
||
Switch. yuzu is based off of Citra’s code, with many changes tailored towards the Switch made. It
|
||
gives me great pleasure to welcome you all into the world of yuzu.</p>
|
||
<h2 id="backstory">Backstory</h2>
|
||
<p>The Switch is the 7<sup>th</sup> major video game console from Nintendo. As the Wii U had struggled
|
||
to gain external support, leaving it with a weak software library, Nintendo opted to use more standard
|
||
electronic components to make development for the console easier.</p>
|
||
<p><a href="https://github.com/bunnei">bunnei</a>, the lead developer of Citra, saw that the Switch hacking scene
|
||
was very active and that there were signs of the Switch’s operating system, called <em>Horizon</em>, being
|
||
based on the 3DS’s operating system. The Switch hacking communities (<a href="https://reswitched.tech/">ReSwitched</a>
|
||
and <a href="http://switchbrew.org">Switchbrew</a>) had many people working on hacking and documenting the system.
|
||
Being <em>a huge Nintendo fan</em>, bunnei was very excited at the prospect of an emulator for Switch. Using
|
||
the available documentation, he worked on yuzu privately for a few months before other Citra developers
|
||
joined him. They made some progress and finally went public on 14 January, 2018.</p>
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<video preload="auto" autoplay="autoplay" muted="muted" loop="loop" webkit-playsinline="">
|
||
<source src="./homebrew.mp4" type="video/mp4">
|
||
Your browser doesn't support mp4 video. :(
|
||
</video>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Before (Colors are wrong)</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./homebrew_work.jpg" title="After (fixed)"><img src="./homebrew_work.jpg" alt="After (fixed)"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">After (fixed)</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./homebrew_game.png" title="Very first homebrew on yuzu, Space Game !!">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/homebrew_game_hud73a92ce8939123ca6ff643805fbc161_32171_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Very first homebrew on yuzu, Space Game !!"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Very first homebrew on yuzu, Space Game !!</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<h2 id="baby-steps">Baby Steps</h2>
|
||
<p>yuzu shares the same common and core code, with much of the same OS (operating system) HLE, with Citra
|
||
(as both OSs are similar). For the uninitiated, with HLE (high level emulation), parts of the OS are
|
||
re-implemented in the emulator, which the emulated game can call directly. This contrasts with low-level
|
||
emulation (LLE), where the hardware is emulated, and the real OS bits are run within the emulator.
|
||
Initially, bunnei worked hard to get the Citra code base working for Switch emulation. He updated the
|
||
core emulation and Citra’s memory management to work with 64-bit addresses (as Citra emulates 32-bit
|
||
apps), did lots of OS HLE, added a loader for the Switch games/homebrew, and integrated <a href="http://www.unicorn-engine.org/">Unicorn</a>
|
||
into yuzu for CPU emulation. Unicorn was chosen at that time and not <a href="https://github.com/MerryMage/dynarmic">Dynarmic</a>
|
||
(which is used in Citra) because the Switch has an ARMv8 CPU (64-bit) and dynarmic only had support
|
||
for ARMv6 at that time. He got some basic SVC (Supervisor Call) implementation hooked up to begin
|
||
booting some homebrew applications and very simple games. At this time, there was no graphical output
|
||
yet.</p>
|
||
<p>Later, <a href="https://github.com/Subv">Subv</a>, another Citra veteran, joined him and together they both got
|
||
framebuffer rendering support for basic homebrew. It was at this point that yuzu was announced publicly
|
||
and went open-source. As the project became open-source, many developers and reverse engineers joined
|
||
the team and as of today, yuzu is able to run 12 games. This fast paced progress is a result of the
|
||
highly active Switch hacking scene. When bunnei first started Citra (in 2014), the 3DS was already
|
||
3 years old, homebrew was barely starting to happen, and game dumps were still encrypted. Contrary
|
||
to this, Switch has a much more active hacking scene, much earlier on in the console’s life-cycle
|
||
(few months). It is believed that, fueled by the successes with 3DS hacking, a lot of the same teams
|
||
and people have started working on the Switch hacking as well.</p>
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./puyo_boot.png" title="First game rendering triangles (actually SEGA logo) !!">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/puyo_boot_hu192b623cac99dc7ca25c1e872bb3802c_40313_1024x0_resize_q90_bgffffff_box_3.jpg" alt="First game rendering triangles (actually SEGA logo) !!"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">First game rendering triangles (actually SEGA logo) !!</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<h2 id="pit-crew--their-efforts-so-far">Pit Crew & Their Efforts So Far</h2>
|
||
<p><em><strong>Rivalry of scholars advances wisdom</strong></em>. This proverb is highly accurate in terms of emulators. The
|
||
clash of knowledge between peers helps mutual growth. During its early days, Citra had a peer too,
|
||
<a href="https://github.com/plutooo/3dmoo">3dmoo</a>. In the case of Switch emulation, we have <a href="https://github.com/gdkchan/Ryujinx">Ryujinx</a>.
|
||
Our developers have worked with <a href="https://github.com/gdkchan">gdkchan</a> (the main developer of Ryujinx) on
|
||
reverse engineering (RE), figuring out how games work, and how the Switch GPU works.</p>
|
||
<p>Subv worked on initial framebuffer rendering support, and then went on to do lots of OS reverse
|
||
engineering and bug fixes. Lately, bunnei and him have been working on GPU emulation. <a href="https://github.com/ogniK5377">ogniK</a>
|
||
(from the <a href="https://reswitched.tech/">ReSwitched</a> team) also joined us and is one of our RE experts.
|
||
He has done a lot of Switch OS RE, which helps us to get yuzu booting games further. He has contributed
|
||
a lot, mostly in audio, kernel, and services.</p>
|
||
<p><a href="https://github.com/shinyquagsire23">shinyquagsire</a>, another Citra developer, came forward and implemented
|
||
user input and various other things. <a href="https://github.com/lioncash">Lioncash</a> and <a href="https://github.com/merrymage">MerryMage</a>
|
||
worked tirelessly on adding ARMv8 support to dynarmic, and thanks to their efforts we are now using
|
||
<a href="https://github.com/MerryMage/dynarmic">dynarmic</a> for CPU emulation. Apart from these people, there
|
||
are more than a dozen contributors for yuzu who have worked on minor things. It’s because of their
|
||
invaluable efforts that yuzu now proudly boasts it’s ability to boot several commercial games like ARMS,
|
||
Splatoon 2, One Piece Unlimited Red Deluxe, Cave Story+, and many more. As of now, a few games are
|
||
actually playable on yuzu – Binding of Isaac, Sonic Mania, Stardew Valley, etc.</p>
|
||
<h2 id="reverse-engineering-re">Reverse Engineering (RE)</h2>
|
||
<p>The RE process of yuzu is very similar to that of Citra. We collaborate with the hacking communities,
|
||
for documenting the workings of Switch and do some RE ourselves as well. It’s a mix of learning and
|
||
implementing things ourselves, using community documentation to validate or guide our process. The
|
||
fact that the Switch is based on off-the-shelf Tegra SoC does not necessarily make the process easier,
|
||
because, similar to the PICA200 (3DS GPU), the Maxwell GPU architecture isn’t publicly documented.</p>
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./setup.jpg" title="ogniK's janky RE setup"><img src="./setup.jpg" alt="ogniK's janky RE setup"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">ogniK's janky RE setup</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<p>That said, there are more resources and non-Switch related projects (<a href="https://nouveau.freedesktop.org/wiki/">Nouveau</a>,
|
||
<a href="https://github.com/envytools/envytools">envytools</a>, etc.) that we can use. Switch’s GPU is many times
|
||
more advanced/powerful than 3DS’, and so are the challenges in its RE. RE on the OS HLE side of things
|
||
has otherwise been the same and is moving at the same pace. We currently have a graphics renderer,
|
||
based off of Citra’s graphics renderer, which uses OpenGL 4.1.</p>
|
||
<p>Mind you, yuzu is at a very young stage in its development. As such, any progress we make would be
|
||
only possible if we have a proper direction. Right now, most of our development is being done in a
|
||
trial-and-error manner. Simply put, we are working on making games boot and then we fix our implementations
|
||
based on further RE and any other new found info.</p>
|
||
<h2 id="os-emulation">OS emulation</h2>
|
||
<p>The Switch’s OS (operating system), called Horizon, is based on the 3DS’s OS. This was a silver lining,
|
||
as it meant that Citra’s OS HLE code could be largely reused. A point to remember, is that both Citra
|
||
and yuzu are high level emulators. In both of these, we are trying to implement the software rather
|
||
than the hardware of the consoles.</p>
|
||
<p>As an emulator, the first necessity in yuzu would be to load the Switch game dumps. So, bunnei started
|
||
working on a loader and file system service for yuzu. Citra’s loader and file system frameworks were
|
||
reused and modified heavily to support Switch game dump files (<a href="https://github.com/yuzu-emu/yuzu/pull/123">here</a>).
|
||
Further fixes and improvements to the loader were done by <a href="https://github.com/ogniK5377">ogniK</a>,
|
||
<a href="https://github.com/Rozelette">Rozelette</a>, <a href="https://github.com/gdkchan">gdkchan</a>, and
|
||
<a href="https://github.com/shinyquagsire23">shinyquagsire</a>.</p>
|
||
<p>Next, we would need a way for games to read or load save data. Subv believed that the save data in
|
||
the Switch has a similar behavior as the save data in the 3DS. He implemented the file system and save
|
||
data behaviors, which allowed games to read and write files to the save data directory
|
||
(<a href="https://github.com/yuzu-emu/yuzu/pull/216">here</a>). This implementation allowed us to boot further
|
||
in “Puyo Puyo Tetris” and “Cave Story”.</p>
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./cavestory_boot.png" title="First boot - Cave Story+">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/cavestory_boot_hu25b0e5e4e0e375cd089327abb2a0b6c1_57129_1024x0_resize_q90_bgffffff_box_3.jpg" alt="First boot - Cave Story+"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">First boot - Cave Story+</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./cavestory_work.png" title="Now - Cave Story+">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/cavestory_work_huc9bc30a6d1dacaed14ffb35c54d1b581_169539_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Now - Cave Story+"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Now - Cave Story+</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./tetris.png" title="First boot - Puyo Puyo Tetris">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/tetris_hua3aec80e7212fcea0f3cd4d7bb01dd8b_81707_1024x0_resize_q90_bgffffff_box_3.jpg" alt="First boot - Puyo Puyo Tetris"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">First boot - Puyo Puyo Tetris</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./tetris_work.png" title="Now - Puyo Puyo Tetris">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/tetris_work_hu9e28229626aa1ab8a5f20dba7977b4a4_737250_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Now - Puyo Puyo Tetris"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Now - Puyo Puyo Tetris</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<p>Often, the best way to debug or RE any functionality is to use homebrew. For the uninitiated, homebrew
|
||
is a popular term used for applications that are created and executed on a video game console by hackers,
|
||
programmers, developers, and consumers. The good folks at Switchbrew created <code>libnx</code>, a userland library
|
||
to write homebrew apps for the Nintendo Switch. To support homebrew apps, written using libnx, our
|
||
developers bunnei and shinyquagsire made various fixes and finally yuzu now supports loading libnx apps.</p>
|
||
<p>The Switch’s OS uses a lot of ‘services’ to provide the games with functionality which allows it to do
|
||
things like getting user input, audio output, graphics output, etc. However since the Switch hasn’t
|
||
been completely reverse engineered, we still don’t know how to implement some of these services.
|
||
Currently, some service calls, which we are fairly confident can be ignored, are being stubbed. Stubbing
|
||
means that these services return <code>ok</code> with no errors, so that the games think that the function
|
||
succeeded and it can continue on without getting back any valid data. As the games boot further and
|
||
further, we need to start intercepting these function calls and provide a more meaningful response.</p>
|
||
<p>Switch IPC (Inter-process communication) is how the OS communicates between the various services running.
|
||
This was much more robust and complicated than the 3DS’s, for a lot of reasons. First of all, it does
|
||
lot more validation on responses. This means that both our service HLEs or stubs need to have the
|
||
responses be exactly what it expects with exactly right number of output parameters at right offsets,
|
||
results have to be at right offsets, data needs to be at right offsets, and a couple of other magic
|
||
fields need to be present.</p>
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./stardew.png" title="First boot - Stardew Valley">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/stardew_hu92fde1a6347d80cb0d587b3f2eecf314_95022_1024x0_resize_q90_bgffffff_box_3.jpg" alt="First boot - Stardew Valley"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">First boot - Stardew Valley</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./stardew_2.png" title="in-game - bugs">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/stardew_2_hu2e893bd3ece27b75a616c39e1d1e9f8c_159751_1024x0_resize_q90_bgffffff_box_3.jpg" alt="in-game - bugs"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">in-game - bugs</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./stardew_work.png" title="Now - Stardew Valley">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/stardew_work_huac633a0637f15cac843d04af9e7bce25_150225_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Now - Stardew Valley"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Now - Stardew Valley</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<p>In addition to this, we have a couple of different command modes, a typical IPC request response, and
|
||
something called a <em>Domain</em>. Once a IPC session is opened to a service, the game can use this command
|
||
to turn that session into what’s called a Domain. This is a more efficient way to do lots of service
|
||
calls. Our implementations were mostly iterations of learning how the IPC worked and implementing it.
|
||
After facing many issues and fixing them, we finally got things working. We then wrote a wrapper code
|
||
around this, which allows us to implement service functions without needing intricate knowledge of
|
||
how the IPC system works.</p>
|
||
<p>A lot of our work is based on background research the ReSwitched team did with their Switch
|
||
debug emulators, <a href="https://github.com/reswitched/CageTheUnicorn">CageTheUnicorn</a> (python) and <a href="https://github.com/reswitched/mephisto">Mephisto</a>(C-lang).
|
||
These emulators were designed for debugging and they implemented the Switch IPC and did most of the
|
||
work to figure that out. We thank the ReSwitched team for CageTheUnicorn and Mephisto, and a special
|
||
thanks to <a href="https://github.com/daeken">daeken</a> and <a href="https://github.com/misson20000">misson20000</a>, for
|
||
without their help with reverse engineering and bug fixing along the way, we wouldn’t have gotten as
|
||
far as we have.</p>
|
||
<p>The Nvidia services configure the video driver to get the graphics output. Nintendo re-purposed the
|
||
Android graphics stack and used it in the Switch for rendering. We had to implement this even to get
|
||
homebrew applications to display graphics. The Switch is very different from older systems, where we
|
||
could find a physical or virtual address of the framebuffer in memory and start writing to it to get
|
||
quick output. Here, we actually have to configure the OS to create a render surface and we can start
|
||
writing to it. Even the simplest homebrew had to implement this graphics layering for rendering. Subv
|
||
did most of the work to get the initial framebuffer working.</p>
|
||
<p>Coming to Kernel OS threading, scheduling, and synchronization fixes, most of the OS HLE for yuzu was
|
||
ported from Citra’s OS implementation. As the Switch RE progressed and we learned things, we made
|
||
multiple fixes to yuzu’s OS implementation. The Switch’s scheduler is almost identical (if not
|
||
identical) to the 3DS’s. We had to make several changes to support Switch’s different synchronization
|
||
primitives but the rest if it (thus far) has been very similar and has used a similar SVC interface.
|
||
Hence we’ve reused Citra’s code here as well.</p>
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./1-2-switch.png" title="First boot - 1-2-Switch">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/1-2-switch_huee910661cd639ca6d195553f3ea5ee70_819094_1024x0_resize_q90_bgffffff_box_3.jpg" alt="First boot - 1-2-Switch"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">First boot - 1-2-Switch</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./1-2-switch_jap.png" title="Wrong Language">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/1-2-switch_jap_hu4fbdabbd5d5b0472d1d5514c685372fc_1110216_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Wrong Language"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Wrong Language</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./1-2-switch_work.png" title="Now - 1-2-Switch">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/1-2-switch_work_hu6905c62dcbaf9f420bac3b04b5a0010f_2336745_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Now - 1-2-Switch"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Now - 1-2-Switch</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="columns is-img-preview">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./boi_2.png" title="First boot - The Binding of Issac">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/boi_2_hu5b87409152cfda0d5d80f37f829b7e42_75496_1024x0_resize_q90_bgffffff_box_3.jpg" alt="First boot - The Binding of Issac"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">First boot - The Binding of Issac</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./boi.png" title="in-game - first renders">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/boi_hud5431ae3818e2525f162ba61079b1070_648682_1024x0_resize_q90_bgffffff_box_3.jpg" alt="in-game - first renders"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">in-game - first renders</p>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="column has-text-centered">
|
||
|
||
<a href="./boi_work.png" title="Now - The Binding of Issac">
|
||
|
||
|
||
<img src="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p1/boi_work_hu3898a91ef435a241a853d18f43e35134_272594_1024x0_resize_q90_bgffffff_box_3.jpg" alt="Now - The Binding of Issac"></a>
|
||
|
||
|
||
<p class="has-text-centered is-italic has-text-grey-light">Now - The Binding of Issac</p>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<p>As we now have some games booting, the next step along the line would be adding HID (user input support).
|
||
<a href="https://github.com/shinyquagsire23">shinyquagsire</a> worked on getting initial HID support and made further
|
||
fixes along the way. HID services maps some shared memory region to which the games can read to, get
|
||
user input state and gamepad input writes to this. yuzu now supports handheld inputs with analog sticks
|
||
and buttons. We still have a lot to implement in HID, like support for all 9 controllers, rumble, LEDs,
|
||
layouts etc., and its going to take a bit of additional work to get it all implemented. As much of
|
||
this has already been RE’d, this is a great place for new developers to make contributions!</p>
|
||
<p>Currently Audio HLE is in progress, but we do not support audio playback (<em>yet!</em>). <a href="https://github.com/ogniK5377">ogniK</a>
|
||
did a lot of reverse engineering on the <code>AudRen</code> service (Audio renderer) which most games use for
|
||
audio output. There is another service called <code>AudOut</code> service, which homebrew and a few games use
|
||
for audio output. It’s a much simpler service and the homebrew community figured this out. We haven’t
|
||
implemented this as not many games use this. ogniK did most of the work on <code>AudRen</code> service and he
|
||
pretty much figured out how it works. This is a major breakthrough as most complicated games we have
|
||
seen so far were getting stuck, either hanging or deadlocking because they were waiting for proper
|
||
<code>AudRen</code> state to be set. ogniK’s work on this helped us go further in a few other games.</p>
|
||
<p>Apart from the work mentioned above, we have also had minor fixes which helped us boot further in
|
||
games like Super Mario Odyssey, 1-2-Switch, and The Binding of Issac.</p>
|
||
<p><em><strong>Check out the next part of this report <a href="https://yuzu-mirror.github.io/entry/yuzu-progress-report-2018-p2">here</a></strong></em></p>
|
||
<h3 align="center">
|
||
<b><a href="https://github.com/yuzu-emu/yuzu/">Contributions are always welcome !</a></b>
|
||
</h3>
|
||
</section>
|
||
|
||
|
||
<div class="has-text-centered">
|
||
<a class="pagination-next" href="https://community.citra-emu.org/t/33660">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 © 2024 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>
|