commit 9d5e797ecc6a61723bcc6a51ebc88f44960221fe Author: ascpixi <44982772+ascpixi@users.noreply.github.com> Date: Tue Mar 5 04:11:47 2024 +0100 Clone from "yuzu-emu/yuzu-emu.github.io" diff --git a/.ci/build.sh b/.ci/build.sh new file mode 100644 index 000000000..9bf9c8cf1 --- /dev/null +++ b/.ci/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash -ex + +echo -e '\e[1m\e[36m========== Installing gulp & dependencies ==========\e[0m' +yarn install +# Install dependencies one-by-one to avoid race-conditions +yarn --cwd ./scripts/shared-hugo-scripts/ +yarn hugo version +echo -e '\e[1m\e[36m========== Starting gulp deploy task ===============\e[0m' +if [[ -n "${EPHEMERAL_BASE_URL}" ]]; then + echo -e "\e[1m\e[36m========== Ephemeral Mode URL: ${EPHEMERAL_BASE_URL} ===============\e[0m" + yarn run gulp all --ephemeral "${EPHEMERAL_BASE_URL}" +else + yarn run build +fi + +echo -e '\e[1m\e[32m Success! Site deployed to `build` folder.\e[0m' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..ad4d2db8e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Deploy Site + +on: + push: + branches: [ hugo ] + pull_request: + branches: [ hugo ] + schedule: + - cron: '25 0 * * *' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Cache Rendered Data + uses: actions/cache@v3 + with: + path: ./site/resources + key: ${{ runner.os }}-rendered-${{ github.sha }} + restore-keys: ${{ runner.os }}-rendered- + - name: Install dependencies + run: sudo apt-get update + - name: Build + env: + GITHUB_WIKI_URL: 'https://github.com/yuzu-mirror/yuzu.wiki.git' + TENANT: 'yuzu' + run: ./.ci/build.sh + - name: Deploy + if: ${{ ! github.base_ref }} + uses: JamesIves/github-pages-deploy-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: master + folder: build + clean: true + single-commit: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3be247138 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +node_modules/ +yarn-error.log + +# Binaries +site/hugo +site/hugo.exe + +# Hugo generated static website files. +build/ +public/ +site/public/ +.publish/ + +# Dynamic content imported on deploy. +site/content/wiki/ +site/content/game/ +site/content/entry/tweet_* +site/static/images/game/icons +site/static/images/game/boxart +!site/static/images/game/boxart/default.png +site/static/images/screenshots0/ +site/static/savefiles/ +site/resources/_gen/ + +# Filesystem stuff. +.directory +.DS_Store + +/.parcel-cache \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..9c88f058d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "site/themes/shared-bulma-theme"] + path = site/themes/shared-bulma-theme + url = https://github.com/yuzu-emu/shared-bulma-theme.git +[submodule "scripts/shared-hugo-scripts"] + path = scripts/shared-hugo-scripts + url = https://github.com/yuzu-emu/shared-hugo-scripts.git diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..dbbe35581 --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md new file mode 100644 index 000000000..9f193568b --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +This repo contains the sources for the yuzu-emu website at https://yuzu-emu.org/ + +# Local Development + +Prerequisites: + +* `git` +* `yarn` +* `graphicsmagick` (`apt install graphicsmagick` on Debian/Ubuntu) + +Steps to run: + +1. Run `git submodule init && git submodule update` +2. Install dependencies by running `yarn` +3. Set the `GITHUB_WIKI_URL` and `TENANT` enivironment variables: + ```bash + export GITHUB_WIKI_URL=https://github.com/yuzu-emu/yuzu.wiki.git + export TENANT=yuzu + ``` +3. Run `yarn serve` to watch files and serve on http://localhost:1313 or `yarn build` to compile a static version. diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 000000000..9b52d146b --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,86 @@ +const fs = require('fs'); +const { spawnSync } = require("child_process"); + +const gulp = require('gulp'); +const log = require('fancy-log'); +const parseArgs = require('minimist'); + +const hugoDefaultArgs = ["-s", "./site/", "-d", "../build", "-v", "--gc"]; + +// Gulp Run Tasks +gulp.task('scripts:compatdb', function (callback) { + callback( + spawnSync("yarn", ["run", "compatdb"], { cwd: "./scripts/shared-hugo-scripts/" }).error + ); +}); + +gulp.task('scripts:wiki', function (callback) { + callback( + spawnSync("yarn", ["run", "wiki"], { cwd: "./scripts/shared-hugo-scripts/" }).error + ); +}); + +gulp.task('hugo', (callback) => { + import('hugo-bin').then((hugo) => { + const result = spawnSync(hugo.default, hugoDefaultArgs, { + stdio: "inherit", + }); + if (result.status !== 0) { + log.error(result.error); + callback(new Error("Hugo build failed")); + return; + } + callback(); + }); +}); + +gulp.task('final:serve', (done) => { + import('hugo-bin').then((hugo) => { + let args = hugoDefaultArgs; + args.push("server"); + const result = spawnSync(hugo.default, args, { + stdio: "inherit", + }); + if (result.status !== 0) { + log.error(result.error); + callback(new Error("Failed to start Hugo preview server")); + return; + } + callback(); + }); + + done(); +}); + +gulp.task('final:publish', (done) => { + fs.writeFileSync('build/CNAME', `${cname}`); + fs.writeFileSync('build/robots.txt', `Sitemap: https://${cname}/sitemap.xml\n\nUser-agent: *`); + done(); +}); + +const cname = 'yuzu-emu.org'; +let finalCommand = null; +let ephemeralURL = null; + +if (parseArgs(process.argv).production) { + process.env.NODE_ENV = 'production'; + process.env.HUGO_ENV = 'PRD'; + process.env.HUGO_BASEURL = `https://${cname}`; + finalCommand = 'final:publish'; +} else if ((ephemeralURL = parseArgs(process.argv).ephemeral)) { + process.env.NODE_ENV = 'production'; + process.env.HUGO_ENV = 'PRD'; + process.env.HUGO_BASEURL = ephemeralURL; + finalCommand = 'final:publish'; +} else { + process.env.HUGO_ENV = 'DEV'; + process.env.HUGO_BASEURL = 'http://localhost:3000'; + finalCommand = 'final:serve'; +} + +log.info(`process.env.HUGO_ENV = '${process.env.HUGO_ENV}'`); +log.info(`process.env.HUGO_BASEURL = '${process.env.HUGO_BASEURL}'`); + +gulp.task('default', gulp.series('hugo', finalCommand)); +gulp.task('all', gulp.series(gulp.parallel('scripts:compatdb', 'scripts:wiki'), 'hugo', finalCommand)); +gulp.task('content', gulp.series('hugo', finalCommand)); diff --git a/maintenance.html b/maintenance.html new file mode 100644 index 000000000..7df5af1cb --- /dev/null +++ b/maintenance.html @@ -0,0 +1,26 @@ + + + + Site is down for maintenance + + + + + +
+

Site is temporarily unavailable.

+

Scheduled maintenance is currently in progress. Please check back soon.

+

We apologize for any inconvenience.

+

Team behind Citra and yuzu

+
+ + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..01bbe3581 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "yuzu-emu", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "gulp all --production", + "serve": "gulp all" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/yuzu-emu/yuzu-emu.github.io.git" + }, + "author": "", + "license": "AGPL-3.0", + "bugs": { + "url": "https://github.com/yuzu-emu/yuzu-emu.github.io/issues" + }, + "homepage": "https://github.com/yuzu-emu/yuzu-emu.github.io#readme", + "dependencies": { + "bulma": "0.9.4", + "fancy-log": "^2.0.0", + "gulp": "^4.0.2", + "hugo-bin": "0.102.0", + "minimist": "^1.2.8" + }, + "devDependencies": {}, + "hugo-bin": { + "buildTags": "extended" + } +} diff --git a/site/assets/js/downloads.js b/site/assets/js/downloads.js new file mode 100644 index 000000000..ee32d74e1 --- /dev/null +++ b/site/assets/js/downloads.js @@ -0,0 +1,132 @@ +function releaseCallback(v, count, e) { + if (e.status !== 200 || e.responseText.length < 10) { + document.getElementById(`last-updated-${v}`).innerText = 'never'; + document.getElementById(`unavailable-${v}`).classList.remove('is-hidden'); + document.getElementById(`downloads-${v}`).classList.add('is-hidden'); + throw new Error(e.responseText); + } + + var releases = JSON.parse(e.responseText); + var shownReleases = 0; + + document.getElementById(`last-updated-${v}`).innerText = moment(releases[0].published_at).fromNow(); + + for (var i = 0; i < releases.length; ++i) { + var release = releases[i]; + + var windowsFound = false; + var androidFound = false; + release.assets.forEach(function (asset) { + /* We only want to provide the msvc builds on the downloads page for Windows. */ + if (asset.name.includes('-mingw-')) return; + + if (asset.name.includes('windows')) { + windowsFound = true; + } + + if (asset.name.includes('.apk')) { + androidFound = true; + } + }); + + if (!windowsFound && !androidFound) { + continue; + } + + var release_date = moment(release.published_at).fromNow(); + + var release_commit = release.target_commitish; + var release_commit_url = `https://github.com/yuzu-emu/yuzu-${v}/commit/${release_commit}`; + + var release_title = ''; + if (v == 'mainline') { + release_title = 'Mainline Build'; + } else if (v == 'android') { + release_title = 'Android Build'; + } + + if (release_commit) { + release_title += ' - ' + release_commit.substring(0, 9); + } + + var download_span = ''; + + release.assets.forEach(function (asset) { + if (asset.name.includes('nupkg')) return; + if (asset.name.includes('.7z')) return; + if (asset.name.includes('RELEASES')) return; + if (asset.name.includes('.tar.xz')) return; + if (asset.name.includes('-debugsymbols.zip')) return; + if (asset.name.includes('.zsync')) return; + if (asset.name.includes('.aab')) return; + + /* We only want to provide the msvc builds on the downloads page for Windows. */ + if (asset.name.includes('-mingw-')) return; + + /* We no longer support OSX builds */ + if (asset.name.includes('osx')) return; + + var env_icon = 'unknown'; + if (asset.name.includes('windows')) env_icon = 'windows'; + else if (asset.name.includes('exe')) env_icon = 'windows'; + else if (asset.name.includes('osx')) env_icon = 'apple'; + else if (asset.name.includes('AppImage')) env_icon = 'linux'; + else if (asset.name.includes('.apk')) env_icon = 'android'; + + var download_url = `https://github.com/yuzu-emu/yuzu-${v}/releases/download/${release.tag_name}/${asset.name}`; + + download_span += ` + + + + + + + `; + }); + + /* Generate the link to the Github release. */ + download_span += ` + + + + + + + + `; + + // TODO: Add information on latest commit + document.getElementById(`downloads-${v}`).innerHTML += + `
+ +
`; + + shownReleases++; + + if (shownReleases >= count) { break; } + } +} + +function getRelease(v, count = 3) { + var netReq = new XMLHttpRequest(); + netReq.open('GET', `https://api.github.com/repos/yuzu-emu/yuzu-${v}/releases`); + netReq.onload = function () { + releaseCallback(v, count, this); + }; + netReq.send(); +} diff --git a/site/assets/js/github.js b/site/assets/js/github.js new file mode 100644 index 000000000..d3a7b975f --- /dev/null +++ b/site/assets/js/github.js @@ -0,0 +1,59 @@ +function fetchPR(tenant, pr) { + return fetch(`https://api.github.com/repos/${tenant}-emu/${tenant}/pulls/${pr}`, { + headers: { + Accept: 'application/vnd.github.v3+json', + 'X-Requested-With': 'XMLHttpRequest', + }, + method: 'GET', + }).then(function (response) { + return response.json(); + }); +} + +function buildHovercard(data) { + const elem = document.getElementById('gh-template'); + const title = elem.getElementsByClassName('gh-hover-title')[0]; + title.firstChild.innerText = data.title; + title.href = data.html_url; + const mergedAt = data.merged_at; + let state = 'open'; + let mergedDate = ''; + if (mergedAt) { + // eslint-disable-next-line no-undef + let parsedDate = moment.utc(mergedAt); + mergedDate = parsedDate.fromNow(); + state = 'merged'; + elem.getElementsByClassName('gh-hover-date')[0].innerText = `Merged ${mergedDate}.`; + } else if (data.state === 'closed') { + state = 'closed'; + } + elem.getElementsByClassName('gh-hover-icon')[0].classList.add(state); + elem.getElementsByClassName('gh-hover-number')[0].innerText = `#${data.number}`; + return elem.innerHTML; +} + +function createHovercard(tenant, pr) { + return fetchPR(tenant, pr).then(function (response) { + return buildHovercard(response); + }); +} + +function showHovercard(instance, tenant) { + if (instance._loading) return; + if (instance._cached) { + instance.setContent(instance._cached); + return; + } + instance._loading = true; + const pr_number = instance.reference.getAttribute('data-gh-pr'); + createHovercard(tenant, pr_number).then(function(content) { + instance._cached = content; + instance.setContent(content); + instance._loading = false; + }).catch(function(error) { + instance.setContent('Error fetching data from GitHub: ' + error); + instance._loading = false; + }); +} + +window.showHovercard = showHovercard; diff --git a/site/assets/js/hero.js b/site/assets/js/hero.js new file mode 100644 index 000000000..25f75ce78 --- /dev/null +++ b/site/assets/js/hero.js @@ -0,0 +1,47 @@ +// Hero navbar fades to the normal navbar color once scrolled. +const navbar = document.getElementById('hero-navbar'); +const navbarBaseColor = 'is-dark'; + +if (navbar) { + window.addEventListener('scroll', () => { + if (window.scrollY > 0) { + navbar.classList.add('is-freestanding'); + navbar.classList.add(navbarBaseColor); + } else { + navbar.classList.remove('is-freestanding'); + navbar.classList.remove(navbarBaseColor); + } + }); +} + +// Handle random switch colors +let colors = ['orangered', 'deepskyblue', 'yellow', 'deeppink', 'lime', 'gray']; +document.body.classList.add('switch-left-' + colors.splice(Math.floor(Math.random() * colors.length), 1)[0]); +document.body.classList.add('switch-right-' + colors[Math.floor(Math.random() * colors.length)]); + +// Handle lazy-loading of images +document.addEventListener('DOMContentLoaded', function () { + const elements = document.getElementsByClassName('lazy-load'); + for (let i = 0; i < elements.length; i++) { + const element = elements[i]; + element.src = element.getAttribute('data-src'); + } +}); + +// Show image carousel, if needed +const carousels = document.getElementsByClassName('glide'); +if (carousels.length > 0) { + document.addEventListener('DOMContentLoaded', function () { + const glide = new Glide('.glide', { + type: 'carousel', + perView: 1, + focusAt: 'center', + autoplay: 4000, + gap: 0, + animationTimingFunc: 'ease-in-out', + animationDuration: 1000 + }); + + glide.mount(); + }); +} diff --git a/site/assets/js/layout.js b/site/assets/js/layout.js new file mode 100644 index 000000000..d7315b92a --- /dev/null +++ b/site/assets/js/layout.js @@ -0,0 +1,28 @@ +document.addEventListener('DOMContentLoaded', function () { + // .data-href + document.querySelectorAll('div[data-href]').forEach((x) => { + x.addEventListener('click', function () { + window.location = x.getAttribute('data-href'); + }); + }); + + // .moment-timeago + document.querySelectorAll('.moment-timeago').forEach((x) => { + x.innerHTML = moment(x.innerHTML).fromNow(); + }); + + // .is-dropdown + document.querySelectorAll('.is-dropdown').forEach((x) => { + x.addEventListener('click', function (event) { + event.stopPropagation(); + x.parentElement + .querySelectorAll('.is-dropdown-target') + .forEach((child) => { + child.classList.toggle('is-active'); + }); + }); + }); + + // baguetteBox + baguetteBox.run('.baguetteBox'); +}); diff --git a/site/assets/js/navbar.js b/site/assets/js/navbar.js new file mode 100644 index 000000000..7e7238d2e --- /dev/null +++ b/site/assets/js/navbar.js @@ -0,0 +1,25 @@ +document.addEventListener('DOMContentLoaded', function () { + + // Get all "navbar-burger" elements + var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0); + + // Check if there are any navbar burgers + if ($navbarBurgers.length > 0) { + + // Add a click event on each of them + $navbarBurgers.forEach(function ($el) { + $el.addEventListener('click', function () { + + // Get the target from the "data-target" attribute + var target = $el.dataset.target; + var $target = document.getElementById(target); + + // Toggle the class on both the "navbar-burger" and the "navbar-menu" + $el.classList.toggle('is-active'); + $target.classList.toggle('is-active'); + + }); + }); + } + +}); \ No newline at end of file diff --git a/site/assets/js/vendor/baguetteBox.min.js b/site/assets/js/vendor/baguetteBox.min.js new file mode 100644 index 000000000..b0ffa6e79 --- /dev/null +++ b/site/assets/js/vendor/baguetteBox.min.js @@ -0,0 +1,7 @@ +/*! + * baguetteBox.js + * @author feimosi + * @version 1.11.0 + * @url https://github.com/feimosi/baguetteBox.js + */ +!function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.baguetteBox=t()}(this,function(){"use strict";var s,l,u,c,d,f='',g='',p='',b={},m={captions:!0,buttons:"auto",fullScreen:!1,noScrollbars:!1,bodyClass:"baguetteBox-open",titleTag:!1,async:!1,preload:2,animation:"slideIn",afterShow:null,afterHide:null,onChange:null,overlayBackgroundColor:"rgba(0,0,0,.8)"},v={},h=[],o=0,n=!1,i={},a=!1,y=/.+\.(gif|jpe?g|png|webp)/i,w={},k=[],r=null,x=function(e){-1!==e.target.id.indexOf("baguette-img")&&j()},C=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,D()},E=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,X()},B=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,j()},T=function(e){i.count++,1
',b.captions&&r){var u=J("figcaption");u.id="baguetteBox-figcaption-"+t,u.innerHTML=r,l.appendChild(u)}e.appendChild(l);var c=J("img");c.onload=function(){var e=document.querySelector("#baguette-img-"+t+" .baguetteBox-spinner");l.removeChild(e),!b.async&&n&&n()},c.setAttribute("src",s),c.alt=a&&a.alt||"",b.titleTag&&r&&(c.title=r),l.appendChild(c),b.async&&n&&n()}}function X(){return M(o+1)}function D(){return M(o-1)}function M(e,t){return!n&&0<=e&&e=k.length?(b.animation&&O("right"),!1):(q(o=e,function(){z(o),V(o)}),R(),b.onChange&&b.onChange(o,k.length),!0)}function O(e){l.className="bounce-from-"+e,setTimeout(function(){l.className=""},400)}function R(){var e=100*-o+"%";"fadeIn"===b.animation?(l.style.opacity=0,setTimeout(function(){v.transforms?l.style.transform=l.style.webkitTransform="translate3d("+e+",0,0)":l.style.left=e,l.style.opacity=1},400)):v.transforms?l.style.transform=l.style.webkitTransform="translate3d("+e+",0,0)":l.style.left=e}function z(e){e-o>=b.preload||q(e+1,function(){z(e+1)})}function V(e){o-e>=b.preload||q(e-1,function(){V(e-1)})}function U(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o):e.attachEvent("on"+t,function(e){(e=e||window.event).target=e.target||e.srcElement,n(e)})}function W(e,t,n,o){e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent("on"+t,n)}function G(e){return document.getElementById(e)}function J(e){return document.createElement(e)}return[].forEach||(Array.prototype.forEach=function(e,t){for(var n=0;n (http://jedrzejchalubek.com/) + * Released under the MIT License. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Glide=e()}(this,function(){"use strict";var s={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perTouch:!1,touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",throttle:10,direction:"ltr",peek:0,breakpoints:{},classes:{direction:{ltr:"glide--ltr",rtl:"glide--rtl"},slider:"glide--slider",carousel:"glide--carousel",swipeable:"glide--swipeable",dragging:"glide--dragging",cloneSlide:"glide__slide--clone",activeNav:"glide__bullet--active",activeSlide:"glide__slide--active",disabledArrow:"glide__arrow--disabled"}};var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function i(t,e){for(var n=0;n":"<","<":">","=":"="},T=[function(e,n){return{modify:function(t){return t+n.Gaps.value*e.index}}},function(t,e){return{modify:function(t){return t+e.Clones.grow/2}}},function(n,i){return{modify:function(t){if(0<=n.settings.focusAt){var e=i.Peek.value;return c(e)?t-e.before:t-e}return t}}},function(o,s){return{modify:function(t){var e=s.Gaps.value,n=s.Sizes.width,i=o.settings.focusAt,r=s.Sizes.slideWidth;return"center"===i?t-(n/2-r/2):t-r*i-e*i}}},function(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}],x=["touchstart","mousedown"],A=["touchmove","mousemove"],O=["touchend","touchcancel","mouseup","mouseleave"],M=["mousedown","mousemove","mouseup","mouseleave"];function C(t){return c(t)?(n=t,Object.keys(n).sort().reduce(function(t,e){return t[e]=n[e],t[e],t},{})):{};var n}var z={Html:function(e,t){var n={mount:function(){this.root=e.selector,this.track=this.root.querySelector(_),this.slides=Array.prototype.slice.call(this.wrapper.children).filter(function(t){return!t.classList.contains(e.settings.classes.cloneSlide)})}};return d(n,"root",{get:function(){return n._r},set:function(t){r(t)&&(t=document.querySelector(t)),w(t)&&(n._r=t)}}),d(n,"track",{get:function(){return n._t},set:function(t){w(t)&&(n._t=t)}}),d(n,"wrapper",{get:function(){return n.track.children[0]}}),n},Translate:function(r,o,s){var u={set:function(t){var n,i,e=(n=r,i=o,{mutate:function(t){for(var e=0;e")?(o.Transition.after(function(){s.emit("translate.jump"),u.set(0)}),u.set(i*n+e*n)):u.set(t.movement)}),s.on("destroy",function(){u.remove()}),u},Transition:function(n,e,t){var i=!1,r={compose:function(t){var e=n.settings;return i?t+" 0ms "+e.animationTimingFunc:t+" "+this.duration+"ms "+e.animationTimingFunc},set:function(){var t=0"))&&(e._o=!1,s.emit("run.offset",e.move)),s.emit("run.after",e.move),o.enable()}))},calculate:function(){var t=this.move,e=this.length,n=t.steps,i=t.direction,r="number"==typeof v(n)&&0!==v(n);switch(i){case">":">"===n?o.index=e:this.isEnd()?(o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=0),s.emit("run.end",t)):r?o.index+=Math.min(e-o.index,-v(n)):o.index++;break;case"<":"<"===n?o.index=0:this.isStart()?(o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=e),s.emit("run.start",t)):r?o.index-=Math.min(o.index,v(n)):o.index--;break;case"=":o.index=n}},isStart:function(){return 0===o.index},isEnd:function(){return o.index===this.length},isOffset:function(t){return this._o&&this.move.direction===t}};return d(t,"move",{get:function(){return this._m},set:function(t){this._m={direction:t.substr(0,1),steps:t.substr(1)?t.substr(1):0}}}),d(t,"length",{get:function(){var t=o.settings,e=n.Html.slides.length;return o.isType("slider")&&t.bound?e-1-(v(t.perView)-1)+v(t.focusAt):e-1}}),d(t,"offset",{get:function(){return this._o}}),t},Swipe:function(c,l,f){var e=new k,d=0,h=0,p=0,n=!1,t={mount:function(){this.bindSwipeStart()},start:function(t){if(!n&&!c.disabled){this.disable();var e=this.touches(t);d=null,h=v(e.pageX),p=v(e.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),f.emit("swipe.start")}},move:function(t){if(!c.disabled){var e=c.settings,n=this.touches(t),i=v(n.pageX)-h,r=v(n.pageY)-p,o=Math.abs(i<<2),s=Math.abs(r<<2),u=Math.sqrt(o+s),a=Math.sqrt(s);if(180*(d=Math.asin(a/u))/Math.PI"+s))):l.Move.make(),l.Html.root.classList.remove(e.classes.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),f.emit("swipe.end")}},bindSwipeStart:function(){var t=c.settings;t.swipeThreshold&&e.on(x[0],l.Html.wrapper,this.start.bind(this)),t.dragThreshold&&e.on(x[1],l.Html.wrapper,this.start.bind(this))},unbindSwipeStart:function(){e.off(x[0],l.Html.wrapper),e.off(x[1],l.Html.wrapper)},bindSwipeMove:function(){e.on(A,l.Html.wrapper,g(this.move.bind(this),c.settings.throttle))},unbindSwipeMove:function(){e.off(A,l.Html.wrapper)},bindSwipeEnd:function(){e.on(O,l.Html.wrapper,this.end.bind(this))},unbindSwipeEnd:function(){e.off(O,l.Html.wrapper)},touches:function(t){return-1")),37===t.keyCode&&e.Run.make(e.Direction.resolve("<"))}};return n.on(["destroy","update"],function(){r.unbind()}),n.on("update",function(){r.mount()}),n.on("destroy",function(){i.destroy()}),r},Autoplay:function(e,n,t){var i=new k,r={mount:function(){this.start(),e.settings.hoverpause&&this.bind()},start:function(){var t=this;e.settings.autoplay&&o(this._i)&&(this._i=setInterval(function(){t.stop(),n.Run.make(">"),t.start()},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;i.on("mouseover",n.Html.root,function(){t.stop()}),i.on("mouseout",n.Html.root,function(){t.start()})},unbind:function(){i.off(["mouseover","mouseout"],n.Html.root)}};return d(r,"time",{get:function(){var t=n.Html.slides[e.index].getAttribute("data-glide-autoplay");return v(t||e.settings.autoplay)}}),t.on(["destroy","update"],function(){r.unbind()}),t.on(["run.before","pause","destroy","swipe.start","update"],function(){r.stop()}),t.on(["run.after","play","swipe.end"],function(){r.start()}),t.on("update",function(){r.mount()}),t.on("destroy",function(){i.destroy()}),r},Breakpoints:function(t,e,n){var i=new k,r=t.settings,o=r.breakpoints;o=C(o);var s=a({},r),u={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: "+e+"px)").matches)return t[e];return s}};return a(r,u.match(o)),i.on("resize",window,g(function(){a(r,u.match(o))},t.settings.throttle)),n.on("update",function(){o=C(o),s=a({},r)}),n.on("destroy",function(){i.off("resize",window)}),u}};return function(t){function e(){return u(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,p),i(e,[{key:"mount",value:function(){var t=0parseInt(F.split("Firefox/")[1], +10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highcharts",version:"6.1.0",deg2rad:2*Math.PI/360,doc:C,hasBidiBug:t,hasTouch:C&&void 0!==C.documentElement.ontouchstart,isMS:r,isWebKit:-1!==F.indexOf("AppleWebKit"),isFirefox:g,isChrome:e,isSafari:!e&&-1!==F.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(F),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:D,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}, +charts:[]}}();(function(a){a.timers=[];var C=a.charts,F=a.doc,D=a.win;a.error=function(r,g){r=a.isNumber(r)?"Highcharts error #"+r+": www.highcharts.com/errors/"+r:r;if(g)throw Error(r);D.console&&console.log(r)};a.Fx=function(a,g,e){this.options=g;this.elem=a;this.prop=e};a.Fx.prototype={dSetter:function(){var a=this.paths[0],g=this.paths[1],e=[],t=this.now,w=a.length,l;if(1===t)e=this.toD;else if(w===g.length&&1>t)for(;w--;)l=parseFloat(a[w]),e[w]=isNaN(l)?g[w]:t*parseFloat(g[w]-l)+l;else e=g;this.elem.attr("d", +e,null,!0)},update:function(){var a=this.elem,g=this.prop,e=this.now,t=this.options.step;if(this[g+"Setter"])this[g+"Setter"]();else a.attr?a.element&&a.attr(g,e,null,!0):a.style[g]=e+this.unit;t&&t.call(a,e,this)},run:function(r,g,e){var t=this,w=t.options,l=function(a){return l.stopped?!1:t.step(a)},u=D.requestAnimationFrame||function(a){setTimeout(a,13)},c=function(){for(var d=0;d=u+this.startTime?(this.now=this.end,this.pos=1,this.update(),e=c[this.prop]=!0,a.objectEach(c,function(a){!0!== +a&&(e=!1)}),e&&l&&l.call(w),r=!1):(this.pos=t.easing((g-this.startTime)/u),this.now=this.start+(this.end-this.start)*this.pos,this.update(),r=!0);return r},initPath:function(r,g,e){function t(a){var f,c;for(b=a.length;b--;)f="M"===a[b]||"L"===a[b],c=/[a-zA-Z]/.test(a[b+3]),f&&c&&a.splice(b+1,0,a[b+1],a[b+2],a[b+1],a[b+2])}function w(a,f){for(;a.lengtha&&-Infinity=e&&(g=[1/e])));for(t=0;t=r|| +!w&&l<=(g[t]+(g[t+1]||g[t]))/2);t++);return u=a.correctFloat(u*e,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,g){var e=a.length,t,w;for(w=0;we&&(e=a[g]);return e};a.destroyObjectProperties=function(r,g){a.objectEach(r,function(a, +t){a&&a!==g&&a.destroy&&a.destroy();delete r[t]})};a.discardElement=function(r){var g=a.garbageBin;g||(g=a.createElement("div"));r&&g.appendChild(r);g.innerHTML=""};a.correctFloat=function(a,g){return parseFloat(a.toPrecision(g||14))};a.setAnimation=function(r,g){g.renderer.globalAnimation=a.pick(r,g.options.chart.animation,!0)};a.animObject=function(r){return a.isObject(r)?a.merge(r):{duration:r?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5, +year:314496E5};a.numberFormat=function(r,g,e,t){r=+r||0;g=+g;var w=a.defaultOptions.lang,l=(r.toString().split(".")[1]||"").split("e")[0].length,u,c,d=r.toString().split("e");-1===g?g=Math.min(l,20):a.isNumber(g)?g&&d[1]&&0>d[1]&&(u=g+ +d[1],0<=u?(d[0]=(+d[0]).toExponential(u).split("e")[0],g=u):(d[0]=d[0].split(".")[0]||0,r=20>g?(d[0]*Math.pow(10,d[1])).toFixed(g):0,d[1]=0)):g=2;c=(Math.abs(d[1]?d[0]:r)+Math.pow(10,-Math.max(g,l)-1)).toFixed(g);l=String(a.pInt(c));u=3r?"-":"")+(u?l.substr(0,u)+t:"");r+=l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+t);g&&(r+=e+c.slice(-g));d[1]&&0!==+r&&(r+="e"+d[1]);return r};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(r,g,e){if("width"===g)return Math.min(r.offsetWidth,r.scrollWidth)-a.getStyle(r,"padding-left")-a.getStyle(r,"padding-right");if("height"===g)return Math.min(r.offsetHeight,r.scrollHeight)-a.getStyle(r,"padding-top")-a.getStyle(r, +"padding-bottom");D.getComputedStyle||a.error(27,!0);if(r=D.getComputedStyle(r,void 0))r=r.getPropertyValue(g),a.pick(e,"opacity"!==g)&&(r=a.pInt(r));return r};a.inArray=function(r,g,e){return(a.indexOfPolyfill||Array.prototype.indexOf).call(g,r,e)};a.grep=function(r,g){return(a.filterPolyfill||Array.prototype.filter).call(r,g)};a.find=Array.prototype.find?function(a,g){return a.find(g)}:function(a,g){var e,t=a.length;for(e=0;e>16,(e&65280)>>8,e&255,1]:4===g&&(w=[(e&3840)>>4|(e&3840)>>8,(e&240)>>4|e&240,(e&15)<<4|e&15,1])),!w)for(l=this.parsers.length;l--&& +!w;)u=this.parsers[l],(g=u.regex.exec(e))&&(w=u.parse(g));this.rgba=w||[]},get:function(a){var e=this.input,g=this.rgba,l;this.stops?(l=r(e),l.stops=[].concat(l.stops),C(this.stops,function(e,c){l.stops[c]=[l.stops[c][0],e.get(a)]})):l=g&&F(g[0])?"rgb"===a||!a&&1===g[3]?"rgb("+g[0]+","+g[1]+","+g[2]+")":"a"===a?g[3]:"rgba("+g.join(",")+")":e;return l},brighten:function(a){var e,w=this.rgba;if(this.stops)C(this.stops,function(e){e.brighten(a)});else if(F(a)&&0!==a)for(e=0;3>e;e++)w[e]+=g(255*a),0> +w[e]&&(w[e]=0),255y.width)y={width:0,height:0}}else y=this.htmlGetBBox();b.isSVG&&(a=y.width,b=y.height,d&&"11px"===d.fontSize&&17===Math.round(b)&&(y.height=b= +14),h&&(y.width=Math.abs(b*Math.sin(v))+Math.abs(a*Math.cos(v)),y.height=Math.abs(b*Math.cos(v))+Math.abs(a*Math.sin(v))));if(q&&0]*>/g, +"").replace(/</g,"\x3c").replace(/>/g,"\x3e")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,h,b){"string"===typeof a?b.setAttribute(h,a):a&&this.complexColor(a,h,b)},visibilitySetter:function(a,h,b){"inherit"===a?b.removeAttribute(h):this[h]!==a&&b.setAttribute(h,a);this[h]=a},zIndexSetter:function(a,b){var c=this.renderer,v=this.parentGroup,y=(v||c).element||c.box,f,d=this.element,m,I,c=y===c.box; +f=this.added;var p;u(a)&&(d.zIndex=a,a=+a,this[b]===a&&(f=!1),this[b]=a);if(f){(a=this.zIndex)&&v&&(v.handleZ=!0);b=y.childNodes;for(p=b.length-1;0<=p&&!m;p--)if(v=b[p],f=v.zIndex,I=!u(f),v!==d)if(0>a&&I&&!c&&!p)y.insertBefore(d,b[p]),m=!0;else if(h(f)<=a||I&&(!u(a)||0<=a))y.insertBefore(d,b[p+1]||null),m=!0;m||(y.insertBefore(d,b[c?3:0]||null),m=!0)}return m},_defaultSetter:function(a,h,b){b.setAttribute(h,a)}});C.prototype.yGetter=C.prototype.xGetter;C.prototype.translateXSetter=C.prototype.translateYSetter= +C.prototype.rotationSetter=C.prototype.verticalAlignSetter=C.prototype.rotationOriginXSetter=C.prototype.rotationOriginYSetter=C.prototype.scaleXSetter=C.prototype.scaleYSetter=C.prototype.matrixSetter=function(a,h){this[h]=a;this.doTransform=!0};C.prototype["stroke-widthSetter"]=C.prototype.strokeSetter=function(a,h,b){this[h]=a;this.stroke&&this["stroke-width"]?(C.prototype.fillSetter.call(this,this.stroke,"stroke",b),b.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"=== +h&&0===a&&this.hasStroke&&(b.removeAttribute("stroke"),this.hasStroke=!1)};F=a.SVGRenderer=function(){this.init.apply(this,arguments)};p(F.prototype,{Element:C,SVG_NS:I,init:function(a,h,b,c,v,f){var y;c=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(c));y=c.element;a.appendChild(y);g(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&g(y,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=y;this.boxWrapper=c;this.alignedObjects=[];this.url=(q||m)&&k.getElementsByTagName("base").length? +N.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(k.createTextNode("Created with Highcharts 6.1.0"));this.defs=this.createElement("defs").add();this.allowHTML=f;this.forExport=v;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(h,b,!1);var d;q&&a.getBoundingClientRect&&(h=function(){w(a,{left:0,top:0});d=a.getBoundingClientRect();w(a,{left:Math.ceil(d.left)- +d.left+"px",top:Math.ceil(d.top)-d.top+"px"})},h(),this.unSubPixelFix=D(N,"resize",h))},getStyle:function(a){return this.style=p({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();d(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy()); +this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var h=new this.Element;h.init(this,a);return h},draw:A,getRadialAttr:function(a,h){return{cx:a[0]-a[2]/2+h.cx*a[2],cy:a[1]-a[2]/2+h.cy*a[2],r:h.r*a[2]}},getSpanWidth:function(a){return a.getBBox(!0).width},applyEllipsis:function(a,h,b,c){var v=a.rotation,f=b,d,y=0,m=b.length,I=function(a){h.removeChild(h.firstChild);a&&h.appendChild(k.createTextNode(a))},p;a.rotation=0;f=this.getSpanWidth(a,h);if(p= +f>c){for(;y<=m;)d=Math.ceil((y+m)/2),f=b.substring(0,d)+"\u2026",I(f),f=this.getSpanWidth(a,h),y===m?y=m+1:f>c?m=d-1:y=d;0===m&&I("")}a.rotation=v;return p},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot;"},buildText:function(a){var c=a.element,v=this,f=v.forExport,d=G(a.textStr,"").toString(),y=-1!==d.indexOf("\x3c"),m=c.childNodes,p,A=g(c,"x"),n=a.styles,q=a.textWidth,E=n&&n.lineHeight,e=n&&n.textOutline,B=n&&"ellipsis"===n.textOverflow,Q=n&&"nowrap"=== +n.whiteSpace,u=n&&n.fontSize,l,O,H=m.length,n=q&&!a.added&&this.box,J=function(a){var b;b=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:u||v.style.fontSize||12;return E?h(E):v.fontMetrics(b,a.getAttribute("style")?a:c).h},N=function(a,h){M(v.escapes,function(b,c){h&&-1!==z(b,h)||(a=a.toString().replace(new RegExp(b,"g"),c))});return a},t=function(a,h){var b;b=a.indexOf("\x3c");a=a.substring(b,a.indexOf("\x3e")-b);b=a.indexOf(h+"\x3d");if(-1!==b&&(b=b+h.length+1,h=a.charAt(b),'"'===h||"'"=== +h))return a=a.substring(b+1),a.substring(0,a.indexOf(h))};l=[d,B,Q,E,e,u,q].join();if(l!==a.textCache){for(a.textCache=l;H--;)c.removeChild(m[H]);y||e||B||q||-1!==d.indexOf(" ")?(n&&n.appendChild(c),d=y?d.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,'\x3cspan style\x3d"font-style:italic"\x3e').replace(//g,"\x3c/span\x3e").split(//g):[d],d=b(d,function(a){return""!==a}),x(d,function(h,b){var d,y=0;h=h.replace(/^\s+|\s+$/g, +"").replace(//g,"\x3c/span\x3e|||");d=h.split("|||");x(d,function(h){if(""!==h||1===d.length){var m={},n=k.createElementNS(v.SVG_NS,"tspan"),E,z;(E=t(h,"class"))&&g(n,"class",E);if(E=t(h,"style"))E=E.replace(/(;| |^)color([ :])/,"$1fill$2"),g(n,"style",E);(z=t(h,"href"))&&!f&&(g(n,"onclick",'location.href\x3d"'+z+'"'),g(n,"class","highcharts-anchor"),w(n,{cursor:"pointer"}));h=N(h.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==h){n.appendChild(k.createTextNode(h)); +y?m.dx=0:b&&null!==A&&(m.x=A);g(n,m);c.appendChild(n);!y&&O&&(!P&&f&&w(n,{display:"block"}),g(n,"dy",J(n)));if(q){m=h.replace(/([^\^])-/g,"$1- ").split(" ");z=1q,void 0===p&&(p=h),h&&1!==m.length?(n.removeChild(n.firstChild),e.unshift(m.pop())):(m=e,e=[],m.length&&!Q&&(n=k.createElementNS(I,"tspan"),g(n,{dy:G,x:A}),E&&g(n,"style",E),c.appendChild(n)), +x>q&&(q=x)),m.length&&n.appendChild(k.createTextNode(m.join(" ").replace(/- /g,"-")));a.rotation=u}y++}}});O=O||c.childNodes.length}),p&&a.attr("title",N(a.textStr,["\x26lt;","\x26gt;"])),n&&n.removeChild(c),e&&a.applyTextOutline&&a.applyTextOutline(e)):c.appendChild(k.createTextNode(N(d)))}},getContrast:function(a){a=t(a).rgba;return 510Math.abs(v.end-v.start-2*Math.PI));var n=Math.cos(f),p=Math.sin(f),y=Math.cos(I),I=Math.sin(I);v=.001>v.end-f-Math.PI?0:1;d=["M",a+d*n,h+m*p,"A",d,m,0,v,1,a+d*y,h+m*I];u(b)&&d.push(c?"M":"L",a+b*y,h+b*I,"A",b,b,0,v,0,a+b*n,h+b*p);d.push(c?"":"Z");return d},callout:function(a,h,b,c,v){var f=Math.min(v&&v.r||0,b,c),d=f+6,m=v&&v.anchorX;v=v&&v.anchorY;var I;I=["M",a+f,h,"L",a+b-f,h,"C",a+b,h,a+b,h,a+b,h+f,"L",a+b,h+c- +f,"C",a+b,h+c,a+b,h+c,a+b-f,h+c,"L",a+f,h+c,"C",a,h+c,a,h+c,a,h+c-f,"L",a,h+f,"C",a,h,a,h,a+f,h];m&&m>b?v>h+d&&vm?v>h+d&&vc&&m>a+d&&mv&&m>a+d&&ma?a+3:Math.round(1.2*a);return{h:b,b:Math.round(.8*b),f:a}},rotCorr:function(a,h,b){var v=a;h&&b&&(v=Math.max(v*Math.cos(h*c),4));return{x:-a/3*Math.sin(h*c),y:v}},label:function(h,b,c,f,d,m,I,n,A){var k=this,q=k.g("button"!==A&&"label"),z=q.text=k.text("",0,0,I).attr({zIndex:1}), +y,e,P=0,B=3,Q=0,g,G,l,O,H,J={},M,N,w=/^url\((.*?)\)$/.test(f),t=w,L,r,R,U;A&&q.addClass("highcharts-"+A);t=w;L=function(){return(M||0)%2/2};r=function(){var a=z.element.style,h={};e=(void 0===g||void 0===G||H)&&u(z.textStr)&&z.getBBox();q.width=(g||e.width||0)+2*B+Q;q.height=(G||e.height||0)+2*B;N=B+k.fontMetrics(a&&a.fontSize,z).b;t&&(y||(q.box=y=k.symbols[f]||w?k.symbol(f):k.rect(),y.addClass(("button"===A?"":"highcharts-label-box")+(A?" highcharts-"+A+"-box":"")),y.add(q),a=L(),h.x=a,h.y=(n?-N: +0)+a),h.width=Math.round(q.width),h.height=Math.round(q.height),y.attr(p(h,J)),J={})};R=function(){var a=Q+B,h;h=n?0:N;u(g)&&e&&("center"===H||"right"===H)&&(a+={center:.5,right:1}[H]*(g-e.width));if(a!==z.x||h!==z.y)z.attr("x",a),void 0!==h&&z.attr("y",h);z.x=a;z.y=h};U=function(a,h){y?y.attr(a,h):J[a]=h};q.onAdd=function(){z.add(q);q.attr({text:h||0===h?h:"",x:b,y:c});y&&u(d)&&q.attr({anchorX:d,anchorY:m})};q.widthSetter=function(h){g=a.isNumber(h)?h:null};q.heightSetter=function(a){G=a};q["text-alignSetter"]= +function(a){H=a};q.paddingSetter=function(a){u(a)&&a!==B&&(B=q.padding=a,R())};q.paddingLeftSetter=function(a){u(a)&&a!==Q&&(Q=a,R())};q.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==P&&(P=a,e&&q.attr({x:l}))};q.textSetter=function(a){void 0!==a&&z.textSetter(a);r();R()};q["stroke-widthSetter"]=function(a,h){a&&(t=!0);M=this["stroke-width"]=a;U(h,a)};q.strokeSetter=q.fillSetter=q.rSetter=function(a,h){"r"!==h&&("fill"===h&&a&&(t=!0),q[h]=a);U(h,a)};q.anchorXSetter=function(a,h){d=q.anchorX= +a;U(h,Math.round(a)-L()-l)};q.anchorYSetter=function(a,h){m=q.anchorY=a;U(h,a-O)};q.xSetter=function(a){q.x=a;P&&(a-=P*((g||e.width)+2*B),q["forceAnimate:x"]=!0);l=Math.round(a);q.attr("translateX",l)};q.ySetter=function(a){O=q.y=Math.round(a);q.attr("translateY",O)};var S=q.css;return p(q,{css:function(a){if(a){var h={};a=E(a);x(q.textProps,function(b){void 0!==a[b]&&(h[b]=a[b],delete a[b])});z.css(h);"width"in h&&r()}return S.call(q,a)},getBBox:function(){return{width:e.width+2*B,height:e.height+ +2*B,x:e.x-B,y:e.y-B}},shadow:function(a){a&&(r(),y&&y.shadow(a));return q},destroy:function(){v(q.element,"mouseenter");v(q.element,"mouseleave");z&&(z=z.destroy());y&&(y=y.destroy());C.prototype.destroy.call(q);q=k=r=R=U=null}})}});a.Renderer=F})(K);(function(a){var C=a.attr,F=a.createElement,D=a.css,r=a.defined,g=a.each,e=a.extend,t=a.isFirefox,w=a.isMS,l=a.isWebKit,u=a.pick,c=a.pInt,d=a.SVGRenderer,k=a.win,x=a.wrap;e(a.SVGElement.prototype,{htmlCss:function(a){var c=this.element;if(c=a&&"SPAN"=== +c.tagName&&a.width)delete a.width,this.textWidth=c,this.htmlUpdateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=e(this.styles,a);D(this.element,a);return this},htmlGetBBox:function(){var a=this.element;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,f=this.element,b=this.translateX||0,d=this.translateY||0,k=this.x||0,e=this.y||0,q=this.textAlign|| +"left",x={left:0,center:.5,right:1}[q],B=this.styles,l=B&&B.whiteSpace;D(f,{marginLeft:b,marginTop:d});this.shadows&&g(this.shadows,function(a){D(a,{marginLeft:b+1,marginTop:d+1})});this.inverted&&g(f.childNodes,function(b){a.invertChild(b,f)});if("SPAN"===f.tagName){var B=this.rotation,m=this.textWidth&&c(this.textWidth),E=[B,q,f.innerHTML,this.textWidth,this.textAlign].join(),A;(A=m!==this.oldTextWidth)&&!(A=m>this.oldTextWidth)&&((A=this.textPxLength)||(D(f,{width:"",whiteSpace:l||"nowrap"}),A= +f.offsetWidth),A=A>m);A&&/[ \-]/.test(f.textContent||f.innerText)&&(D(f,{width:m+"px",display:"block",whiteSpace:l||"normal"}),this.oldTextWidth=m);E!==this.cTT&&(l=a.fontMetrics(f.style.fontSize).b,r(B)&&B!==(this.oldRotation||0)&&this.setSpanRotation(B,x,l),this.getSpanCorrection(!r(B)&&this.textPxLength||f.offsetWidth,l,x,B,q));D(f,{left:k+(this.xCorr||0)+"px",top:e+(this.yCorr||0)+"px"});this.cTT=E;this.oldRotation=B}}else this.alignOnAdd=!0},setSpanRotation:function(a,c,b){var f={},d=this.renderer.getTransformKey(); +f[d]=f.transform="rotate("+a+"deg)";f[d+(t?"Origin":"-origin")]=f.transformOrigin=100*c+"% "+b+"px";D(this.element,f)},getSpanCorrection:function(a,c,b){this.xCorr=-a*b;this.yCorr=-c}});e(d.prototype,{getTransformKey:function(){return w&&!/Edge/.test(k.navigator.userAgent)?"-ms-transform":l?"-webkit-transform":t?"MozTransform":k.opera?"-o-transform":""},html:function(a,c,b){var f=this.createElement("span"),d=f.element,p=f.renderer,q=p.isSVG,k=function(a,b){g(["opacity","visibility"],function(c){x(a, +c+"Setter",function(a,c,f,d){a.call(this,c,f,d);b[f]=c})});a.addedSetters=!0};f.textSetter=function(a){a!==d.innerHTML&&delete this.bBox;this.textStr=a;d.innerHTML=u(a,"");f.doTransform=!0};q&&k(f,f.element.style);f.xSetter=f.ySetter=f.alignSetter=f.rotationSetter=function(a,b){"align"===b&&(b="textAlign");f[b]=a;f.doTransform=!0};f.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};f.attr({text:a,x:Math.round(c),y:Math.round(b)}).css({fontFamily:this.style.fontFamily, +fontSize:this.style.fontSize,position:"absolute"});d.style.whiteSpace="nowrap";f.css=f.htmlCss;q&&(f.add=function(a){var b,c=p.box.parentNode,q=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)q.push(a),a=a.parentGroup;g(q.reverse(),function(a){function d(h,b){a[b]=h;"translateX"===b?m.left=h+"px":m.top=h+"px";a.doTransform=!0}var m,h=C(a.element,"class");h&&(h={className:h});b=a.div=a.div||F("div",h,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity, +pointerEvents:a.styles&&a.styles.pointerEvents},b||c);m=b.style;e(a,{classSetter:function(a){return function(h){this.element.setAttribute("class",h);a.className=h}}(b),on:function(){q[0].div&&f.on.apply({element:q[0].div},arguments);return a},translateXSetter:d,translateYSetter:d});a.addedSetters||k(a,m)})}}else b=c;b.appendChild(d);f.added=!0;f.alignOnAdd&&f.htmlUpdateTransform();return f});return f}})})(K);(function(a){var C=a.defined,F=a.each,D=a.extend,r=a.merge,g=a.pick,e=a.timeUnits,t=a.win; +a.Time=function(a){this.update(a,!1)};a.Time.prototype={defaultOptions:{},update:function(e){var l=g(e&&e.useUTC,!0),u=this;this.options=e=r(!0,this.options||{},e);this.Date=e.Date||t.Date;this.timezoneOffset=(this.useUTC=l)&&e.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(l&&!e.getTimezoneOffset&&!e.timezone))||this.timezoneOffset?(this.get=function(a,d){var c=d.getTime(),e=c-u.getTimezoneOffset(d);d.setTime(e);a=d["getUTC"+a]();d.setTime(c);return a}, +this.set=function(c,d,k){var e;if(-1!==a.inArray(c,["Milliseconds","Seconds","Minutes"]))d["set"+c](k);else e=u.getTimezoneOffset(d),e=d.getTime()-e,d.setTime(e),d["setUTC"+c](k),c=u.getTimezoneOffset(d),e=d.getTime()+c,d.setTime(e)}):l?(this.get=function(a,d){return d["getUTC"+a]()},this.set=function(a,d,k){return d["setUTC"+a](k)}):(this.get=function(a,d){return d["get"+a]()},this.set=function(a,d,k){return d["set"+a](k)})},makeTime:function(e,l,u,c,d,k){var x,p,f;this.useUTC?(x=this.Date.UTC.apply(0, +arguments),p=this.getTimezoneOffset(x),x+=p,f=this.getTimezoneOffset(x),p!==f?x+=f-p:p-36E5!==this.getTimezoneOffset(x-36E5)||a.isSafari||(x-=36E5)):x=(new this.Date(e,l,g(u,1),g(c,0),g(d,0),g(k,0))).getTime();return x},timezoneOffsetFunction:function(){var e=this,g=this.options,u=t.moment;if(!this.useUTC)return function(a){return 6E4*(new Date(a)).getTimezoneOffset()};if(g.timezone){if(u)return function(a){return 6E4*-u.tz(a,g.timezone).utcOffset()};a.error(25)}return this.useUTC&&g.getTimezoneOffset? +function(a){return 6E4*g.getTimezoneOffset(a)}:function(){return 6E4*(e.timezoneOffset||0)}},dateFormat:function(e,g,u){if(!a.defined(g)||isNaN(g))return a.defaultOptions.lang.invalidDate||"";e=a.pick(e,"%Y-%m-%d %H:%M:%S");var c=this,d=new this.Date(g),k=this.get("Hours",d),x=this.get("Day",d),p=this.get("Date",d),f=this.get("Month",d),b=this.get("FullYear",d),n=a.defaultOptions.lang,z=n.weekdays,l=n.shortWeekdays,q=a.pad,d=a.extend({a:l?l[x]:z[x].substr(0,3),A:z[x],d:q(p),e:q(p,2," "),w:x,b:n.shortMonths[f], +B:n.months[f],m:q(f+1),y:b.toString().substr(2,2),Y:b,H:q(k),k:k,I:q(k%12||12),l:k%12||12,M:q(c.get("Minutes",d)),p:12>k?"AM":"PM",P:12>k?"am":"pm",S:q(d.getSeconds()),L:q(Math.round(g%1E3),3)},a.dateFormats);a.objectEach(d,function(a,b){for(;-1!==e.indexOf("%"+b);)e=e.replace("%"+b,"function"===typeof a?a.call(c,g):a)});return u?e.substr(0,1).toUpperCase()+e.substr(1):e},getTimeTicks:function(a,l,u,c){var d=this,k=[],x={},p,f=new d.Date(l),b=a.unitRange,n=a.count||1,z;if(C(l)){d.set("Milliseconds", +f,b>=e.second?0:n*Math.floor(d.get("Milliseconds",f)/n));b>=e.second&&d.set("Seconds",f,b>=e.minute?0:n*Math.floor(d.get("Seconds",f)/n));b>=e.minute&&d.set("Minutes",f,b>=e.hour?0:n*Math.floor(d.get("Minutes",f)/n));b>=e.hour&&d.set("Hours",f,b>=e.day?0:n*Math.floor(d.get("Hours",f)/n));b>=e.day&&d.set("Date",f,b>=e.month?1:n*Math.floor(d.get("Date",f)/n));b>=e.month&&(d.set("Month",f,b>=e.year?0:n*Math.floor(d.get("Month",f)/n)),p=d.get("FullYear",f));b>=e.year&&d.set("FullYear",f,p-p%n);b===e.week&& +d.set("Date",f,d.get("Date",f)-d.get("Day",f)+g(c,1));p=d.get("FullYear",f);c=d.get("Month",f);var J=d.get("Date",f),q=d.get("Hours",f);l=f.getTime();d.variableTimezone&&(z=u-l>4*e.month||d.getTimezoneOffset(l)!==d.getTimezoneOffset(u));f=f.getTime();for(l=1;fk.length&&F(k,function(a){0=== +a%18E5&&"000000000"===d.dateFormat("%H%M%S%L",a)&&(x[a]="day")})}k.info=D(a,{higherRanks:x,totalRange:b*n});return k}}})(K);(function(a){var C=a.color,F=a.merge;a.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), +weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:a.Time.prototype.defaultOptions,chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}, +title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"}, +itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S", +minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,backgroundColor:C("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e',shadow:!0,style:{color:"#333333",cursor:"default", +fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};a.setOptions=function(C){a.defaultOptions=F(!0,a.defaultOptions,C);a.time.update(F(a.defaultOptions.global,a.defaultOptions.time),!1);return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions; +a.time=new a.Time(F(a.defaultOptions.global,a.defaultOptions.time));a.dateFormat=function(C,r,g){return a.time.dateFormat(C,r,g)}})(K);(function(a){var C=a.correctFloat,F=a.defined,D=a.destroyObjectProperties,r=a.fireEvent,g=a.isNumber,e=a.merge,t=a.pick,w=a.deg2rad;a.Tick=function(a,e,c,d){this.axis=a;this.pos=e;this.type=c||"";this.isNewLabel=this.isNew=!0;c||d||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,g=a.options,c=a.chart,d=a.categories,k=a.names,x=this.pos,p=g.labels, +f=a.tickPositions,b=x===f[0],n=x===f[f.length-1],k=d?t(d[x],k[x],x):x,d=this.label,f=f.info,z;a.isDatetimeAxis&&f&&(z=g.dateTimeLabelFormats[f.higherRanks[x]||f.unitName]);this.isFirst=b;this.isLast=n;g=a.labelFormatter.call({axis:a,chart:c,isFirst:b,isLast:n,dateTimeLabelFormat:z,value:a.isLog?C(a.lin2log(k)):k,pos:x});if(F(d))d&&d.attr({text:g});else{if(this.label=d=F(g)&&p.enabled?c.renderer.text(g,0,0,p.useHTML).css(e(p.style)).add(a.labelGroup):null)d.textPxLength=d.getBBox().width;this.rotation= +0}},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var e=this.axis,c=e.options.labels,d=a.x,k=e.chart.chartWidth,g=e.chart.spacing,p=t(e.labelLeft,Math.min(e.pos,g[3])),g=t(e.labelRight,Math.max(e.isRadial?0:e.pos+e.len,k-g[1])),f=this.label,b=this.rotation,n={left:0,center:.5,right:1}[e.labelAlign||f.attr("align")],z=f.getBBox().width,l=e.getSlotWidth(),q=l,L=1,B,H={};if(b||!1===c.overflow)0>b&&d-n*zg&&(B=Math.round((k-d)/Math.cos(b*w)));else if(k=d+(1-n)*z,d-n*zg&&(q=g-a.x+q*n,L=-1),q=Math.min(l,q),qq||e.autoRotation&&(f.styles||{}).width)B=q;B&&(H.width=B,(c.style||{}).textOverflow||(H.textOverflow="ellipsis"),f.css(H))},getPosition:function(e,g,c,d){var k=this.axis,x=k.chart,p=d&&x.oldChartHeight||x.chartHeight;e={x:e?a.correctFloat(k.translate(g+c,null,null,d)+k.transB):k.left+ +k.offset+(k.opposite?(d&&x.oldChartWidth||x.chartWidth)-k.right-k.left:0),y:e?p-k.bottom+k.offset-(k.opposite?k.height:0):a.correctFloat(p-k.translate(g+c,null,null,d)-k.transB)};r(this,"afterGetPosition",{pos:e});return e},getLabelPosition:function(a,e,c,d,k,g,p,f){var b=this.axis,n=b.transA,z=b.reversed,x=b.staggerLines,q=b.tickRotCorr||{x:0,y:0},l=k.y,B=d||b.reserveSpaceDefault?0:-b.labelOffset*("center"===b.labelAlign?.5:1),u={};F(l)||(l=0===b.side?c.rotation?-8:-c.getBBox().height:2===b.side? +q.y+8:Math.cos(c.rotation*w)*(q.y-c.getBBox(!1,0).height/2));a=a+k.x+B+q.x-(g&&d?g*n*(z?-1:1):0);e=e+l-(g&&!d?g*n*(z?1:-1):0);x&&(c=p/(f||1)%x,b.opposite&&(c=x-c-1),e+=b.labelOffset/x*c);u.x=a;u.y=Math.round(e);r(this,"afterGetLabelPosition",{pos:u});return u},getMarkPath:function(a,e,c,d,k,g){return g.crispLine(["M",a,e,"L",a+(k?0:-c),e+(k?c:0)],d)},renderGridLine:function(a,e,c){var d=this.axis,k=d.options,g=this.gridLine,p={},f=this.pos,b=this.type,n=d.tickmarkOffset,z=d.chart.renderer,l=b?b+"Grid": +"grid",q=k[l+"LineWidth"],u=k[l+"LineColor"],k=k[l+"LineDashStyle"];g||(p.stroke=u,p["stroke-width"]=q,k&&(p.dashstyle=k),b||(p.zIndex=1),a&&(p.opacity=0),this.gridLine=g=z.path().attr(p).addClass("highcharts-"+(b?b+"-":"")+"grid-line").add(d.gridGroup));if(!a&&g&&(a=d.getPlotLinePath(f+n,g.strokeWidth()*c,a,!0)))g[this.isNew?"attr":"animate"]({d:a,opacity:e})},renderMark:function(a,e,c){var d=this.axis,k=d.options,g=d.chart.renderer,p=this.type,f=p?p+"Tick":"tick",b=d.tickSize(f),n=this.mark,z=!n, +l=a.x;a=a.y;var q=t(k[f+"Width"],!p&&d.isXAxis?1:0),k=k[f+"Color"];b&&(d.opposite&&(b[0]=-b[0]),z&&(this.mark=n=g.path().addClass("highcharts-"+(p?p+"-":"")+"tick").add(d.axisGroup),n.attr({stroke:k,"stroke-width":q})),n[z?"attr":"animate"]({d:this.getMarkPath(l,a,b[0],n.strokeWidth()*c,d.horiz,g),opacity:e}))},renderLabel:function(a,e,c,d){var k=this.axis,x=k.horiz,p=k.options,f=this.label,b=p.labels,n=b.step,k=k.tickmarkOffset,z=!0,u=a.x;a=a.y;f&&g(u)&&(f.xy=a=this.getLabelPosition(u,a,f,x,b,k, +d,n),this.isFirst&&!this.isLast&&!t(p.showFirstLabel,1)||this.isLast&&!this.isFirst&&!t(p.showLastLabel,1)?z=!1:!x||b.step||b.rotation||e||0===c||this.handleOverflow(a),n&&d%n&&(z=!1),z&&g(a.y)?(a.opacity=c,f[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(f.attr("y",-9999),this.isNewLabel=!0))},render:function(e,g,c){var d=this.axis,k=d.horiz,x=this.getPosition(k,this.pos,d.tickmarkOffset,g),p=x.x,f=x.y,d=k&&p===d.pos+d.len||!k&&f===d.pos?-1:1;c=t(c,1);this.isActive=!0;this.renderGridLine(g, +c,d);this.renderMark(x,c,d);this.renderLabel(x,g,c,e);this.isNew=!1;a.fireEvent(this,"afterRender")},destroy:function(){D(this,this.axis)}}})(K);var V=function(a){var C=a.addEvent,F=a.animObject,D=a.arrayMax,r=a.arrayMin,g=a.color,e=a.correctFloat,t=a.defaultOptions,w=a.defined,l=a.deg2rad,u=a.destroyObjectProperties,c=a.each,d=a.extend,k=a.fireEvent,x=a.format,p=a.getMagnitude,f=a.grep,b=a.inArray,n=a.isArray,z=a.isNumber,J=a.isString,q=a.merge,L=a.normalizeTickInterval,B=a.objectEach,H=a.pick,m= +a.removeEvent,E=a.splat,A=a.syncTimeout,M=a.Tick,G=function(){this.init.apply(this,arguments)};a.extend(G.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between", +tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return a.numberFormat(this.total, +-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,c){var h=c.isX,v=this;v.chart=a;v.horiz=a.inverted&&!v.isZAxis?!h:h;v.isXAxis=h;v.coll=v.coll|| +(h?"xAxis":"yAxis");k(this,"init",{userOptions:c});v.opposite=c.opposite;v.side=c.side||(v.horiz?v.opposite?0:2:v.opposite?1:3);v.setOptions(c);var f=this.options,d=f.type;v.labelFormatter=f.labels.formatter||v.defaultLabelFormatter;v.userOptions=c;v.minPixelPadding=0;v.reversed=f.reversed;v.visible=!1!==f.visible;v.zoomEnabled=!1!==f.zoomEnabled;v.hasNames="category"===d||!0===f.categories;v.categories=f.categories||v.hasNames;v.names||(v.names=[],v.names.keys={});v.plotLinesAndBandsGroups={};v.isLog= +"logarithmic"===d;v.isDatetimeAxis="datetime"===d;v.positiveValuesOnly=v.isLog&&!v.allowNegativeLog;v.isLinked=w(f.linkedTo);v.ticks={};v.labelEdge=[];v.minorTicks={};v.plotLinesAndBands=[];v.alternateBands={};v.len=0;v.minRange=v.userMinRange=f.minRange||f.maxZoom;v.range=f.range;v.offset=f.offset||0;v.stacks={};v.oldStacks={};v.stacksTouched=0;v.max=null;v.min=null;v.crosshair=H(f.crosshair,E(a.options.tooltip.crosshairs)[h?0:1],!1);c=v.options.events;-1===b(v,a.axes)&&(h?a.axes.splice(a.xAxis.length, +0,v):a.axes.push(v),a[v.coll].push(v));v.series=v.series||[];a.inverted&&!v.isZAxis&&h&&void 0===v.reversed&&(v.reversed=!0);B(c,function(a,h){C(v,h,a)});v.lin2log=f.linearToLogConverter||v.lin2log;v.isLog&&(v.val2lin=v.log2lin,v.lin2val=v.lin2log);k(this,"afterInit")},setOptions:function(a){this.options=q(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side], +q(t[this.coll],a));k(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var h=this.axis,b=this.value,c=h.chart.time,f=h.categories,d=this.dateTimeLabelFormat,m=t.lang,q=m.numericSymbols,m=m.numericSymbolMagnitude||1E3,p=q&&q.length,n,e=h.options.labels.format,h=h.isLog?Math.abs(b):h.tickInterval;if(e)n=x(e,this,c);else if(f)n=b;else if(d)n=c.dateFormat(d,b);else if(p&&1E3<=h)for(;p--&&void 0===n;)c=Math.pow(m,p+1),h>=c&&0===10*b%c&&null!==q[p]&&0!==b&&(n=a.numberFormat(b/c, +-1)+q[p]);void 0===n&&(n=1E4<=Math.abs(b)?a.numberFormat(b,-1):a.numberFormat(b,-1,void 0,""));return n},getSeriesExtremes:function(){var a=this,b=a.chart;k(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();c(a.series,function(h){if(h.visible||!b.options.chart.ignoreHiddenSeries){var v=h.options,c=v.threshold,d;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=c&&(c=null);if(a.isXAxis)v=h.xData, +v.length&&(h=r(v),d=D(v),z(h)||h instanceof Date||(v=f(v,z),h=r(v),d=D(v)),v.length&&(a.dataMin=Math.min(H(a.dataMin,v[0],h),h),a.dataMax=Math.max(H(a.dataMax,v[0],d),d)));else if(h.getExtremes(),d=h.dataMax,h=h.dataMin,w(h)&&w(d)&&(a.dataMin=Math.min(H(a.dataMin,h),h),a.dataMax=Math.max(H(a.dataMax,d),d)),w(c)&&(a.threshold=c),!v.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});k(this,"afterGetSeriesExtremes")},translate:function(a,b,c,f,d,m){var h=this.linkedParent||this,v=1,I=0,q=f? +h.oldTransA:h.transA;f=f?h.oldMin:h.min;var p=h.minPixelPadding;d=(h.isOrdinal||h.isBroken||h.isLog&&d)&&h.lin2val;q||(q=h.transA);c&&(v*=-1,I=h.len);h.reversed&&(v*=-1,I-=v*(h.sector||h.len));b?(a=(a*v+I-p)/q+f,d&&(a=h.lin2val(a))):(d&&(a=h.val2lin(a)),a=z(f)?v*(a-f)*q+I+v*p+(z(m)?q*m:0):void 0);return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a, +b,c,f,d){var h=this.chart,v=this.left,m=this.top,I,q,p=c&&h.oldChartHeight||h.chartHeight,n=c&&h.oldChartWidth||h.chartWidth,e;I=this.transB;var A=function(a,h,b){if(ab)f?a=Math.min(Math.max(h,a),b):e=!0;return a};d=H(d,this.translate(a,null,null,c));d=Math.min(Math.max(-1E5,d),1E5);a=c=Math.round(d+I);I=q=Math.round(p-d-I);z(d)?this.horiz?(I=m,q=p-this.bottom,a=c=A(a,v,v+this.width)):(a=v,c=n-this.right,I=q=A(I,m,m+this.height)):(e=!0,f=!1);return e&&!f?null:h.renderer.crispLine(["M",a,I,"L", +c,q],b||1)},getLinearTickPositions:function(a,b,c){var h,v=e(Math.floor(b/a)*a);c=e(Math.ceil(c/a)*a);var f=[],d;e(v+a)===v&&(d=20);if(this.single)return[b];for(b=v;b<=c;){f.push(b);b=e(b+a,d);if(b===h)break;h=b}return f},getMinorTickInterval:function(){var a=this.options;return!0===a.minorTicks?H(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,b=a.options,f=a.tickPositions,d=a.minorTickInterval,m=[],q=a.pointRangePadding||0,p=a.min- +q,q=a.max+q,n=q-p;if(n&&n/d=this.minRange,k=this.minRange,d=(k-f+b)/2,d=[b-d,H(a.min,b-d)],m&&(d[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),b=D(d),f=[b+k,H(a.max,b+k)],m&&(f[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),f=r(f),f-b=u?(t=u,g=0):b.dataMax<=u&&(J=u,E=0)),b.min=H(M,t,b.dataMin),b.max=H(r,J,b.dataMax));m&&(b.positiveValuesOnly&&!h&&0>=Math.min(b.min,H(b.dataMin,b.min))&&a.error(10,1),b.min=e(b.log2lin(b.min),15),b.max=e(b.log2lin(b.max),15));b.range&&w(b.max)&&(b.userMin=b.min= +M=Math.max(b.dataMin,b.minFromRange()),b.userMax=r=b.max,b.range=null);k(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();!(G||b.axisPointRange||b.usePercentage||A)&&w(b.min)&&w(b.max)&&(f=b.max-b.min)&&(!w(M)&&g&&(b.min-=f*g),!w(r)&&E&&(b.max+=f*E));z(d.softMin)&&!z(b.userMin)&&(b.min=Math.min(b.min,d.softMin));z(d.softMax)&&!z(b.userMax)&&(b.max=Math.max(b.max,d.softMax));z(d.floor)&&(b.min=Math.max(b.min,d.floor));z(d.ceiling)&&(b.max=Math.min(b.max,d.ceiling));l&&w(b.dataMin)&& +(u=u||0,!w(M)&&b.min=u?b.min=u:!w(r)&&b.max>u&&b.dataMax<=u&&(b.max=u));b.tickInterval=b.min===b.max||void 0===b.min||void 0===b.max?1:A&&!B&&x===b.linkedParent.options.tickPixelInterval?B=b.linkedParent.tickInterval:H(B,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,G?1:(b.max-b.min)*x/Math.max(b.len,x));n&&!h&&c(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&b.beforeSetTickPositions(); +b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!B&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));h=H(d.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!B&&b.tickIntervalb.tickInterval&&1E3b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=b.unsquish());this.setTickPositions()},setTickPositions:function(){var a= +this.options,b,c=a.tickPositions;b=this.getMinorTickInterval();var f=a.tickPositioner,d=a.startOnTick,m=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===b&&this.tickInterval?this.tickInterval/5:b;this.single=this.min===this.max&&w(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=b=c&&c.slice();!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval, +a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()],b[0]===b[1]&&(b.length=1)),this.tickPositions=b,f&&(f=f.apply(this,[this.min,this.max])))&&(this.tickPositions=b=f);this.paddedTicks=b.slice(0);this.trimTicks(b,d,m);this.isLinked||(this.single&&2>b.length&&(this.min-=.5,this.max+=.5),c|| +f||this.adjustTickAmount());k(this,"afterSetTickPositions")},trimTicks:function(a,b,c){var h=a[0],f=a[a.length-1],d=this.minPointOffset||0;if(!this.isLinked){if(b&&-Infinity!==h)this.min=h;else for(;this.min-d>a[0];)a.shift();if(c)this.max=f;else for(;this.max+db&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b= +this.tickPositions,c=this.tickAmount,f=this.finalTickAmt,d=b&&b.length,m=H(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(dc&&(this.tickInterval*=2,this.setTickPositions());if(w(f)){for(a=c=b.length;a--;)(3===f&&1===a%2||2>=f&&0f&&(a=f)),w(c)&&(bf&&(b=f))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var b=this.chart,c=this.options,f=c.offsets||[0,0,0,0],d=this.horiz,m=this.width=Math.round(a.relativeLength(H(c.width,b.plotWidth-f[3]+f[1]),b.plotWidth)),q=this.height=Math.round(a.relativeLength(H(c.height,b.plotHeight-f[0]+f[2]),b.plotHeight)),p=this.top=Math.round(a.relativeLength(H(c.top,b.plotTop+f[0]),b.plotHeight,b.plotTop)), +c=this.left=Math.round(a.relativeLength(H(c.left,b.plotLeft+f[3]),b.plotWidth,b.plotLeft));this.bottom=b.chartHeight-q-p;this.right=b.chartWidth-m-c;this.len=Math.max(d?m:q,0);this.pos=d?c:p},getExtremes:function(){var a=this.isLog;return{min:a?e(this.lin2log(this.min)):this.min,max:a?e(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,h=b?this.lin2log(this.min):this.min,b=b?this.lin2log(this.max): +this.max;null===a||-Infinity===a?a=h:Infinity===a?a=b:h>a?a=h:ba?"right":195a?"left":"center"},tickSize:function(a){var b=this.options,h=b[a+"Length"],c=H(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(c&&h)return"inside"===b[a+"Position"]&&(h=-h),[h,c]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&& +this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,f=this.tickInterval,d=f,m=this.len/(((this.categories?1:0)+this.max-this.min)/f),q,p=a.rotation,n=this.labelMetrics(),A,k=Number.MAX_VALUE,E,z=function(a){a/=m||1;a=1=a)A=z(Math.abs(n.h/Math.sin(l*a))),b= +A+Math.abs(a/360),b(c.step||0)&&!c.rotation&&(this.staggerLines||1)*this.len/f||!b&&(c.style&&parseInt(c.style.width,10)||d&&d-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,f=this.tickPositions,d=this.ticks, +m=this.options.labels,q=this.horiz,p=this.getSlotWidth(),n=Math.max(1,Math.round(p-2*(m.padding||5))),e={},A=this.labelMetrics(),k=m.style&&m.style.textOverflow,E,z,g=0,B;J(m.rotation)||(e.rotation=m.rotation||0);c(f,function(a){(a=d[a])&&a.label&&a.label.textPxLength>g&&(g=a.label.textPxLength)});this.maxLabelLength=g;if(this.autoRotation)g>n&&g>A.h?e.rotation=this.labelRotation:this.labelRotation=0;else if(p&&(E=n,!k))for(z="clip",n=f.length;!q&&n--;)if(B=f[n],B=d[B].label)B.styles&&"ellipsis"=== +B.styles.textOverflow?B.css({textOverflow:"clip"}):B.textPxLength>p&&B.css({width:p+"px"}),B.getBBox().height>this.len/f.length-(A.h-A.f)&&(B.specificTextOverflow="ellipsis");e.rotation&&(E=g>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight,k||(z="ellipsis"));if(this.labelAlign=m.align||this.autoLabelAlign(this.labelRotation))e.align=this.labelAlign;c(f,function(a){var b=(a=d[a])&&a.label,h={};b&&(b.attr(e),!E||m.style&&m.style.width||!(E=this.min&&a<=this.max)c[a]||(c[a]=new M(this,a)),d&&c[a].isNew&&c[a].render(b,!0,.1),c[a].render(b)},render:function(){var b= +this,f=b.chart,d=b.options,m=b.isLog,q=b.isLinked,p=b.tickPositions,n=b.axisTitle,e=b.ticks,E=b.minorTicks,g=b.alternateBands,x=d.stackLabels,G=d.alternateGridColor,u=b.tickmarkOffset,l=b.axisLine,H=b.showAxis,t=F(f.renderer.globalAnimation),J,r;b.labelEdge.length=0;b.overlap=!1;c([e,E,g],function(a){B(a,function(a){a.isActive=!1})});if(b.hasData()||q)b.minorTickInterval&&!b.categories&&c(b.getMinorTickPositions(),function(a){b.renderMinorTick(a)}),p.length&&(c(p,function(a,f){b.renderTick(a,f)}), +u&&(0===b.min||b.single)&&(e[-1]||(e[-1]=new M(b,-1,null,!0)),e[-1].render(-1))),G&&c(p,function(c,d){r=void 0!==p[d+1]?p[d+1]+u:b.max-u;0===d%2&&ct&&(!l||f<=w)&&void 0!==f&&d.push(f),f>w&&(b=!0),f=p;else t=this.lin2log(t),w=this.lin2log(w),a=l?this.getMinorTickInterval(): +e.tickInterval,a=g("auto"===a?null:a,this._minorAutoInterval,e.tickPixelInterval/(l?5:1)*(w-t)/((l?c/this.tickPositions.length:c)||1)),a=r(a,null,F(a)),d=D(this.getLinearTickPositions(a,t,w),this.log2lin),l||(this._minorAutoInterval=a/5);l||(this.tickInterval=a);return d};C.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};C.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a,C){var F=a.arrayMax,D=a.arrayMin,r=a.defined,g=a.destroyObjectProperties,e=a.each,t=a.erase,w= +a.merge,l=a.pick;a.PlotLineOrBand=function(a,c){this.axis=a;c&&(this.options=c,this.id=c.id)};a.PlotLineOrBand.prototype={render:function(){var e=this,c=e.axis,d=c.horiz,k=e.options,g=k.label,p=e.label,f=k.to,b=k.from,n=k.value,z=r(b)&&r(f),J=r(n),q=e.svgElem,t=!q,B=[],H=k.color,m=l(k.zIndex,0),E=k.events,B={"class":"highcharts-plot-"+(z?"band ":"line ")+(k.className||"")},A={},M=c.chart.renderer,G=z?"bands":"lines";c.isLog&&(b=c.log2lin(b),f=c.log2lin(f),n=c.log2lin(n));J?(B={stroke:H,"stroke-width":k.width}, +k.dashStyle&&(B.dashstyle=k.dashStyle)):z&&(H&&(B.fill=H),k.borderWidth&&(B.stroke=k.borderColor,B["stroke-width"]=k.borderWidth));A.zIndex=m;G+="-"+m;(H=c.plotLinesAndBandsGroups[G])||(c.plotLinesAndBandsGroups[G]=H=M.g("plot-"+G).attr(A).add());t&&(e.svgElem=q=M.path().attr(B).add(H));if(J)B=c.getPlotLinePath(n,q.strokeWidth());else if(z)B=c.getPlotBandPath(b,f,k);else return;t&&B&&B.length?(q.attr({d:B}),E&&a.objectEach(E,function(a,b){q.on(b,function(a){E[b].apply(e,[a])})})):q&&(B?(q.show(), +q.animate({d:B})):(q.hide(),p&&(e.label=p=p.destroy())));g&&r(g.text)&&B&&B.length&&0this.max&&c>this.max;if(e&& +d)for(a&&(b=e.toString()===d.toString(),f=0),a=0;ag-b?g:g-b);else if(A)f[a]=Math.max(h,m+b+d>c?m:m+b);else return!1},B=function(a,b,c,d){var h;db-p?h=!1:f[a]=db-c/2?b-c-2:d-c/2;return h},H=function(a){var b=g;g=k;k=b;n=a},m=function(){!1!==l.apply(0,g)?!1!==B.apply(0,k)||n||(H(!0),m()):n?f.x=f.y=0:(H(!0),m())};(c.inverted||1m&&(b=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=p.plotTop;g.push({target:c.isHeader?p.plotHeight+ +z:a,rank:c.isHeader?1:0,size:q.tt.getBBox().height+1,point:c,x:m,tt:k})}});this.cleanSplit();a.distribute(g,p.plotHeight+z);C(g,function(a){var c=a.point,f=c.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:b||c.isHeader?a.x:c.plotX+p.plotLeft+t(n.distance,16),y:a.pos+p.plotTop,anchorX:c.isHeader?c.plotX+p.plotLeft:c.plotX+f.xAxis.pos,anchorY:c.isHeader?a.pos+p.plotTop-15:c.plotY+f.yAxis.pos})})},updatePosition:function(a){var c=this.chart,e=this.getLabel(),e=(this.options.positioner|| +this.getPosition).call(this,e.width,e.height,a);this.move(Math.round(e.x),Math.round(e.y||0),a.plotX+c.plotLeft,a.plotY+c.plotTop)},getDateFormat:function(a,d,e,g){var c=this.chart.time,f=c.dateFormat("%m-%d %H:%M:%S.%L",d),b,n,k={millisecond:15,second:12,minute:9,hour:6,day:3},l="millisecond";for(n in u){if(a===u.week&&+c.dateFormat("%w",d)===e&&"00:00:00.000"===f.substr(6)){n="week";break}if(u[n]>a){n=l;break}if(k[n]&&f.substr(k[n])!=="01-01 00:00:00.000".substr(k[n]))break;"week"!==n&&(l=n)}n&& +(b=g[n]);return b},getXDateFormat:function(a,d,e){d=d.dateTimeLabelFormats;var c=e&&e.closestPointRange;return(c?this.getDateFormat(c,a.x,e.options.startOfWeek,d):d.day)||d.year},tooltipFooterHeaderFormatter:function(a,d){d=d?"footer":"header";var c=a.series,e=c.tooltipOptions,p=e.xDateFormat,f=c.xAxis,b=f&&"datetime"===f.options.type&&r(a.key),n=e[d+"Format"];b&&!p&&(p=this.getXDateFormat(a,e,f));b&&p&&C(a.point&&a.point.tooltipDateKeys||["key"],function(a){n=n.replace("{point."+a+"}","{point."+ +a+":"+p+"}")});return D(n,{point:a,series:c},this.chart.time)},bodyFormatter:function(a){return g(a,function(a){var c=a.series.tooltipOptions;return(c[(a.point.formatPrefix||"point")+"Formatter"]||a.point.tooltipFormatter).call(a.point,c[(a.point.formatPrefix||"point")+"Format"])})}}})(K);(function(a){var C=a.addEvent,F=a.attr,D=a.charts,r=a.color,g=a.css,e=a.defined,t=a.each,w=a.extend,l=a.find,u=a.fireEvent,c=a.isNumber,d=a.isObject,k=a.offset,x=a.pick,p=a.splat,f=a.Tooltip;a.Pointer=function(a, +c){this.init(a,c)};a.Pointer.prototype={init:function(a,c){this.options=c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;this.pinchDown=[];this.lastValidTouch={};f&&(a.tooltip=new f(a,c.tooltip),this.followTouchMove=x(c.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,c=b.options.chart,f=c.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(f=x(c.pinchType,f));this.zoomX=a=/x/.test(f);this.zoomY=f=/y/.test(f);this.zoomHor=a&&!b||f&&b;this.zoomVert= +f&&!b||a&&b;this.hasZoom=a||f},normalize:function(a,c){var b;b=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;c||(this.chartPosition=c=k(this.chart.container));return w(a,{chartX:Math.round(b.pageX-c.left),chartY:Math.round(b.pageY-c.top)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};t(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,c,f){var b;t(a,function(a){var e= +!(a.noSharedTooltip&&c)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(f,e);if((e=d(a,!0))&&!(e=!d(b,!0)))var e=b.distX-a.distX,p=b.dist-a.dist,q=(a.series.group&&a.series.group.zIndex)-(b.series.group&&b.series.group.zIndex),e=0<(0!==e&&c?e:0!==p?p:0!==q?q:b.series.index>a.series.index?-1:1);e&&(b=a)});return b},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,c){var b=a.series,f=b.xAxis,b=b.yAxis,d= +x(a.clientX,a.plotX),e=a.shapeArgs;if(f&&b)return c?{chartX:f.len+f.pos-d,chartY:b.len+b.pos-a.plotY}:{chartX:d+f.pos,chartY:a.plotY+b.pos};if(e&&e.x&&e.y)return{chartX:e.x,chartY:e.y}},getHoverData:function(b,c,f,e,p,g,k){var q,m=[],n=k&&k.isBoosting;e=!(!e||!b);k=c&&!c.stickyTracking?[c]:a.grep(f,function(a){return a.visible&&!(!p&&a.directTouch)&&x(a.options.enableMouseTracking,!0)&&a.stickyTracking});c=(q=e?b:this.findNearestKDPoint(k,p,g))&&q.series;q&&(p&&!c.noSharedTooltip?(k=a.grep(f,function(a){return a.visible&& +!(!p&&a.directTouch)&&x(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),t(k,function(a){var b=l(a.points,function(a){return a.x===q.x&&!a.isNull});d(b)&&(n&&(b=a.getPoint(b)),m.push(b))})):m.push(q));return{hoverPoint:q,hoverSeries:c,hoverPoints:m}},runPointActions:function(b,c){var f=this.chart,d=f.tooltip&&f.tooltip.options.enabled?f.tooltip:void 0,e=d?d.shared:!1,p=c||f.hoverPoint,n=p&&p.series||f.hoverSeries,n=this.getHoverData(p,n,f.series,!!c||n&&n.directTouch&&this.isDirectTouch,e, +b,{isBoosting:f.isBoosting}),g,p=n.hoverPoint;g=n.hoverPoints;c=(n=n.hoverSeries)&&n.tooltipOptions.followPointer;e=e&&n&&!n.noSharedTooltip;if(p&&(p!==f.hoverPoint||d&&d.isHidden)){t(f.hoverPoints||[],function(b){-1===a.inArray(b,g)&&b.setState()});t(g||[],function(a){a.setState("hover")});if(f.hoverSeries!==n)n.onMouseOver();f.hoverPoint&&f.hoverPoint.firePointEvent("mouseOut");if(!p.series)return;p.firePointEvent("mouseOver");f.hoverPoints=g;f.hoverPoint=p;d&&d.refresh(e?g:p,b)}else c&&d&&!d.isHidden&& +(p=d.getAnchor([{}],b),d.updatePosition({plotX:p[0],plotY:p[1]}));this.unDocMouseMove||(this.unDocMouseMove=C(f.container.ownerDocument,"mousemove",function(b){var c=D[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}));t(f.axes,function(c){var f=x(c.crosshair.snap,!0),d=f?a.find(g,function(a){return a.series[c.coll]===c}):void 0;d||!f?c.drawCrosshair(b,d):c.hideCrosshair()})},reset:function(a,c){var b=this.chart,f=b.hoverSeries,d=b.hoverPoint,e=b.hoverPoints,n=b.tooltip,g=n&&n.shared?e:d; +a&&g&&t(p(g),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)n&&g&&(n.refresh(g),d&&(d.setState(d.state,!0),t(b.axes,function(a){a.crosshair&&a.drawCrosshair(null,d)})));else{if(d)d.onMouseOut();e&&t(e,function(a){a.setState()});if(f)f.onMouseOut();n&&n.hide(c);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());t(b.axes,function(a){a.hideCrosshair()});this.hoverX=b.hoverPoints=b.hoverPoint=null}},scaleGroups:function(a,c){var b=this.chart,f;t(b.series,function(d){f= +a||d.getPlotBox();d.xAxis&&d.xAxis.zoomEnabled&&d.group&&(d.group.attr(f),d.markerGroup&&(d.markerGroup.attr(f),d.markerGroup.clip(c?b.clipRect:null)),d.dataLabelsGroup&&d.dataLabelsGroup.attr(f))});b.clipRect.attr(c||b.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,f=a.chartX,d=a.chartY,e=this.zoomHor,p=this.zoomVert,g=b.plotLeft, +m=b.plotTop,k=b.plotWidth,A=b.plotHeight,l,G=this.selectionMarker,h=this.mouseDownX,v=this.mouseDownY,t=c.panKey&&a[c.panKey+"Key"];G&&G.touch||(fg+k&&(f=g+k),dm+A&&(d=m+A),this.hasDragged=Math.sqrt(Math.pow(h-f,2)+Math.pow(v-d,2)),10m.max&&(e=m.max-q,v=!0);v?(M-=.8*(M-k[f][0]),E||(h-=.8*(h-k[f][1])),g()):k[f]=[M,h];H||(d[f]=u-t,d[l]=q);d=H?1/B:B;c[l]=q;c[f]=e;r[H?a?"scaleY":"scaleX":"scale"+b]=B;r["translate"+b]=d*t+(M-d*A)},pinch:function(a){var t= +this,l=t.chart,u=t.pinchDown,c=a.touches,d=c.length,k=t.lastValidTouch,x=t.hasZoom,p=t.selectionMarker,f={},b=1===d&&(t.inClass(a.target,"highcharts-tracker")&&l.runTrackerClick||t.runChartClick),n={};1c-6&&gl?this.maxItemWidth:a.itemWidth;d&&this.itemX-b+c>l&&(this.itemX=b,this.itemY+=q+this.lastLineHeight+g,this.lastLineHeight=0);this.lastItemY=q+this.itemY+g;this.lastLineHeight=Math.max(e,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];d?this.itemX+=c:(this.itemY+=q+e+g,this.lastLineHeight=e);this.offsetWidth=p||Math.max((d?this.itemX-b-(a.checkbox?0:k):c)+b,this.offsetWidth)},getAllItems:function(){var a=[];g(this.chart.series,function(c){var b= +c&&c.options;c&&u(b.showInLegend,r(b.linkedTo)?!1:void 0,!0)&&(a=a.concat(c.legendItems||("point"===b.legendType?c.data:c)))});e(this,"afterGetAllItems",{allItems:a});return a},getAlignment:function(){var a=this.options;return a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)},adjustMargins:function(a,c){var b=this.chart,d=this.options,f=this.getAlignment();f&&g([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(e,g){e.test(f)&&!r(a[g])&&(b[w[g]]=Math.max(b[w[g]], +b.legend[(g+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][g]*d[g%2?"x":"y"]+u(d.margin,12)+c[g]+(0===g&&void 0!==b.options.title.margin?b.titleOffset+b.options.title.margin:0)))})},render:function(){var a=this.chart,c=a.renderer,b=this.group,e,k,x,q,t=this.box,B=this.options,r=this.padding;this.itemX=r;this.itemY=this.initialItemY;this.lastItemY=this.offsetWidth=0;b||(this.group=b=c.g("legend").attr({zIndex:7}).add(),this.contentGroup=c.g().attr({zIndex:1}).add(b),this.scrollGroup=c.g().add(this.contentGroup)); +this.renderTitle();e=this.getAllItems();d(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});B.reversed&&e.reverse();this.allItems=e;this.display=k=!!e.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;g(e,this.renderItem,this);g(e,this.layoutItem,this);x=(B.width||this.offsetWidth)+r;q=this.lastItemY+this.lastLineHeight+this.titleHeight;q=this.handleOverflow(q);q+=r;t||(this.box=t=c.rect().addClass("highcharts-legend-box").attr({r:B.borderRadius}).add(b), +t.isNew=!0);t.attr({stroke:B.borderColor,"stroke-width":B.borderWidth||0,fill:B.backgroundColor||"none"}).shadow(B.shadow);0b&&!1!==t.enabled?(this.clipHeight=p=Math.max(b-20-this.titleHeight-q,0),this.currentPage=u(this.currentPage,1),this.fullHeight=a,g(h,function(a,b){var c=a._legendItemPos[1],d=Math.round(a.legendItem.getBBox().height),f=x.length;if(!f||c-x[f-1]>p&&(G||c)!==x[f-1])x.push(G||c),f++;a.pageIx=f-1;G&&(h[b-1].pageIx=f-1);b===h.length-1&&c+d-x[f-1]>p&&(x.push(c),a.pageIx=f);c!==G&&(G=c)}),l||(l=c.clipRect=d.clipRect(0,q,9999, +0),c.contentGroup.clip(l)),v(p),A||(this.nav=A=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,E,E).on("click",function(){c.scroll(-1,m)}).add(A),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation").css(t.style).add(A),this.down=d.symbol("triangle-down",0,0,E,E).on("click",function(){c.scroll(1,m)}).add(A)),c.scroll(0),a=b):A&&(v(),this.nav=A.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,d){var b=this.pages,f= +b.length;a=this.currentPage+a;var e=this.clipHeight,g=this.options.navigation,k=this.pager,p=this.padding;a>f&&(a=f);0f&&(e=typeof c[0],"string"===e?d.name=c[0]:"number"===e&&(d.x=c[0]),b++);n=g.value;)g=d[++e];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=g&&g.color&&!this.options.color?g.color:this.nonZonedColor;return g},destroy:function(){var a=this.series.chart,d=a.hoverPoints,e;a.pointCount--;d&&(this.setState(),r(d,this),d.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)u(this),this.destroyElements();this.legendItem&& +a.legend.destroyItem(this);for(e in this)this[e]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],d,e=6;e--;)d=a[e],this[d]&&(this[d]=this[d].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var c=this.series,g=c.tooltipOptions, +t=l(g.valueDecimals,""),p=g.valuePrefix||"",f=g.valueSuffix||"";F(c.pointArrayMap||["y"],function(b){b="{point."+b;if(p||f)a=a.replace(RegExp(b+"}","g"),p+b+"}"+f);a=a.replace(RegExp(b+"}","g"),b+":,."+t+"f}")});return e(a,{point:this,series:this.series},c.chart.time)},firePointEvent:function(a,d,e){var c=this,k=this.series.options;(k.point.events[a]||c.options&&c.options.events&&c.options.events[a])&&this.importEvents();"click"===a&&k.allowPointSelect&&(e=function(a){c.select&&c.select(null,a.ctrlKey|| +a.metaKey||a.shiftKey)});g(this,a,d,e)},visible:!0}})(K);(function(a){var C=a.addEvent,F=a.animObject,D=a.arrayMax,r=a.arrayMin,g=a.correctFloat,e=a.defaultOptions,t=a.defaultPlotOptions,w=a.defined,l=a.each,u=a.erase,c=a.extend,d=a.fireEvent,k=a.grep,x=a.isArray,p=a.isNumber,f=a.isString,b=a.merge,n=a.objectEach,z=a.pick,J=a.removeEvent,q=a.splat,L=a.SVGElement,B=a.syncTimeout,H=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{}, +marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0, +softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var f=this,e,m=a.series,h;f.chart=a;f.options=b=f.setOptions(b);f.linkedSeries=[];f.bindAxes();c(f,{name:b.name, +state:"",visible:!1!==b.visible,selected:!0===b.selected});e=b.events;n(e,function(a,b){C(f,b,a)});if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;f.getColor();f.getSymbol();l(f.parallelArrays,function(a){f[a+"Data"]=[]});f.setData(b.data,!1);f.isCartesian&&(a.hasCartesianSeries=!0);m.length&&(h=m[m.length-1]);f._i=z(h&&h._i,-1)+1;a.orderSeries(this.insert(m));d(this,"afterInit")},insert:function(a){var b=this.options.index,c;if(p(b)){for(c=a.length;c--;)if(b>= +z(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return z(c,a.length-1)},bindAxes:function(){var b=this,c=b.options,d=b.chart,f;l(b.axisTypes||[],function(e){l(d[e],function(a){f=a.options;if(c[e]===f.index||void 0!==c[e]&&c[e]===f.id||void 0===c[e]&&0===f.index)b.insert(a.series),b[e]=a,a.isDirty=!0});b[e]||b.optionalAxis===e||a.error(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments,f=p(b)?function(d){var f="y"===d&&c.toYData? +c.toYData(a):a[d];c[d+"Data"][b]=f}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))};l(c.parallelArrays,f)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,d=a.pointIntervalUnit,f=this.chart.time,b=z(b,a.pointStart,0);this.pointInterval=c=z(this.pointInterval,a.pointInterval,1);d&&(a=new f.Date(b),"day"===d?f.set("Date",a,f.get("Date",a)+c):"month"===d?f.set("Month",a,f.get("Month",a)+c):"year"===d&&f.set("FullYear",a,f.get("FullYear",a)+c),c=a.getTime()- +b);this.xIncrement=b+c;return b},setOptions:function(a){var c=this.chart,f=c.options,m=f.plotOptions,g=(c.userOptions||{}).plotOptions||{},h=m[this.type];this.userOptions=a;c=b(h,m.series,a);this.tooltipOptions=b(e.tooltip,e.plotOptions.series&&e.plotOptions.series.tooltip,e.plotOptions[this.type].tooltip,f.tooltip.userOptions,m.series&&m.series.tooltip,m[this.type].tooltip,a.tooltip);this.stickyTracking=z(a.stickyTracking,g[this.type]&&g[this.type].stickyTracking,g.series&&g.series.stickyTracking, +this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);null===h.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,className:"highcharts-negative",color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&w(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});d(this,"afterSetOptions",{options:c});return c},getName:function(){return this.name|| +"Series "+(this.index+1)},getCyclic:function(a,b,c){var d,f=this.chart,h=this.userOptions,e=a+"Index",m=a+"Counter",g=c?c.length:z(f.options.chart[a+"Count"],f[a+"Count"]);b||(d=z(h[e],h["_"+e]),w(d)||(f.series.length||(f[m]=0),h["_"+e]=d=f[m]%g,f[m]+=1),c&&(b=c[d]));void 0!==d&&(this[e]=d);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||t[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol", +this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,updateData:function(b){var c=this.options,d=this.points,f=[],e,h,m,g=this.requireSorting;l(b,function(b){var h;h=a.defined(b)&&this.pointClass.prototype.optionsToObject.call({series:this},b).x;p(h)&&(h=a.inArray(h,this.xData,m),-1===h?f.push(b):b!==c.data[h]?(d[h].update(b,!1,null,!1),d[h].touched=!0,g&&(m=h)):d[h]&&(d[h].touched=!0),e=!0)},this);if(e)for(b=d.length;b--;)h=d[b],h.touched||h.remove(!1), +h.touched=!1;else if(b.length===d.length)l(b,function(a,b){d[b].update&&a!==c.data[b]&&d[b].update(a,!1,null,!1)});else return!1;l(f,function(a){this.addPoint(a,!1)},this);return!0},setData:function(b,c,d,e){var m=this,h=m.points,g=h&&h.length||0,q,k=m.options,A=m.chart,n=null,E=m.xAxis,B=k.turboThreshold,t=this.xData,r=this.yData,u=(q=m.pointArrayMap)&&q.length,H;b=b||[];q=b.length;c=z(c,!0);!1!==e&&q&&g&&!m.cropped&&!m.hasGroupedData&&m.visible&&(H=this.updateData(b));if(!H){m.xIncrement=null;m.colorCounter= +0;l(this.parallelArrays,function(a){m[a+"Data"].length=0});if(B&&q>B){for(d=0;null===n&&dq||this.forceCrop))if(c[f-1]r)c=[],d=[];else if(c[0]r)e=this.cropData(this.xData,this.yData,t,r),c=e.xData,d=e.yData,e=e.start,h=!0;for(q=c.length||1;--q;)f=l?k(c[q])-k(c[q-1]):c[q]-c[q-1],0f&&B&&(a.error(15),B=!1);this.cropped=h;this.cropStart=e;this.processedXData=c;this.processedYData=d;this.closestPointRange=m},cropData:function(a,b,c,d,f){var h=a.length,e=0,m=h,g;f= +z(f,this.cropShoulder,1);for(g=0;g=c){e=Math.max(0,g-f);break}for(c=g;cd){m=c+f;break}return{xData:a.slice(e,m),yData:b.slice(e,m),start:e,end:m}},generatePoints:function(){var a=this.options,b=a.data,c=this.data,d,f=this.processedXData,h=this.processedYData,e=this.pointClass,g=f.length,k=this.cropStart||0,p,n=this.hasGroupedData,a=a.keys,l,B=[],t;c||n||(c=[],c.length=b.length,c=this.data=c);a&&n&&(this.options.keys=!1);for(t=0;t=e&&(c[l-k]||q)<=m,g&&q)if(g=n.length)for(;g--;)"number"===typeof n[g]&&(f[h++]=n[g]);else f[h++]=n;this.dataMin=r(f);this.dataMax=D(f)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,f=c.categories,e=this.yAxis,h=this.points,q=h.length,k=!!this.modifyValue,n=a.pointPlacement, +l="between"===n||p(n),t=a.threshold,B=a.startFromThreshold?t:0,r,x,u,H,J=Number.MAX_VALUE;"between"===n&&(n=.5);p(n)&&(n*=z(a.pointRange||c.pointRange));for(a=0;a=D&&(L.isNull=!0);L.plotX=r=g(Math.min(Math.max(-1E5,c.translate(C,0,0,0,1,n,"flags"===this.type)),1E5));b&&this.visible&&!L.isNull&&F&&F[C]&&(H=this.getStackIndicator(H,C,this.index),K=F[C],D=K.points[H.key], +x=D[0],D=D[1],x===B&&H.key===F[C].base&&(x=z(p(t)&&t,e.min)),e.positiveValuesOnly&&0>=x&&(x=null),L.total=L.stackTotal=K.total,L.percentage=K.total&&L.y/K.total*100,L.stackY=D,K.setOffset(this.pointXOffset||0,this.barW||0));L.yBottom=w(x)?Math.min(Math.max(-1E5,e.translate(x,0,1,0,1)),1E5):null;k&&(D=this.modifyValue(D,L));L.plotY=x="number"===typeof D&&Infinity!==D?Math.min(Math.max(-1E5,e.translate(D,0,1,0,1)),1E5):void 0;L.isInside=void 0!==x&&0<=x&&x<=e.len&&0<=r&&r<=c.len;L.clientX=l?g(c.translate(C, +0,0,0,1,n)):r;L.negative=L.y<(t||0);L.category=f&&void 0!==f[L.x]?f[L.x]:L.x;L.isNull||(void 0!==u&&(J=Math.min(J,Math.abs(r-u))),u=r);L.zone=this.zones.length&&L.getZone()}this.closestPointRangePx=J;d(this,"afterTranslate")},getValidPoints:function(a,b){var c=this.chart;return k(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,f=b.inverted,h=this.clipBox,e=h||b.clipBox,m=this.sharedClipKey|| +["_sharedClip",a&&a.duration,a&&a.easing,e.height,c.xAxis,c.yAxis].join(),g=b[m],q=b[m+"m"];g||(a&&(e.width=0,f&&(e.x=b.plotSizeX),b[m+"m"]=q=d.clipRect(f?b.plotSizeX+99:-99,f?-b.plotLeft:-b.plotTop,99,f?b.chartWidth:b.chartHeight)),b[m]=g=d.clipRect(e),g.count={length:0});a&&!g.count[this.index]&&(g.count[this.index]=!0,g.count.length+=1);!1!==c.clip&&(this.group.clip(a||h?g:b.clipRect),this.markerGroup.clip(q),this.sharedClipKey=m);a||(g.count[this.index]&&(delete g.count[this.index],--g.count.length), +0===g.count.length&&m&&b[m]&&(h||(b[m]=b[m].destroy()),b[m+"m"]&&(b[m+"m"]=b[m+"m"].destroy())))},animate:function(a){var b=this.chart,c=F(this.options.animation),d;a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX,x:0},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99,x:0},c),this.animate=null)},afterAnimate:function(){this.setClip();d(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,c,d,f,h,e=this.options.marker, +g,q,k,p=this[this.specialGroup]||this.markerGroup,n,l=z(e.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=e.enabledThreshold*e.radius);if(!1!==e.enabled||this._hasPointMarkers)for(c=0;cf&&b.shadow));h&&(h.startX=c.xMap,h.isArea=c.isArea)})},getZonesGraphs:function(a){l(this.zones,function(b,c){a.push(["zone-graph-"+c,"highcharts-graph highcharts-zone-graph-"+c+" "+(b.className||""),b.color||this.color,b.dashStyle||this.options.dashStyle])},this);return a},applyZones:function(){var a=this, +b=this.chart,c=b.renderer,d=this.zones,f,e,g=this.clips||[],q,k=this.graph,n=this.area,p=Math.max(b.chartWidth,b.chartHeight),t=this[(this.zoneAxis||"y")+"Axis"],B,r,x=b.inverted,u,H,w,L,J=!1;d.length&&(k||n)&&t&&void 0!==t.min&&(r=t.reversed,u=t.horiz,k&&!this.showLine&&k.hide(),n&&n.hide(),B=t.getExtremes(),l(d,function(d,h){f=r?u?b.plotWidth:0:u?0:t.toPixels(B.min);f=Math.min(Math.max(z(e,f),0),p);e=Math.min(Math.max(Math.round(t.toPixels(z(d.value,B.max),!0)),0),p);J&&(f=e=t.toPixels(B.max)); +H=Math.abs(f-e);w=Math.min(f,e);L=Math.max(f,e);t.isXAxis?(q={x:x?L:w,y:0,width:H,height:p},u||(q.x=b.plotHeight-q.x)):(q={x:0,y:x?L:w,width:p,height:H},u&&(q.y=b.plotWidth-q.y));x&&c.isVML&&(q=t.isXAxis?{x:0,y:r?w:L,height:q.width,width:b.chartWidth}:{x:q.y-b.plotLeft-b.spacingBox.x,y:0,width:q.height,height:b.chartHeight});g[h]?g[h].animate(q):(g[h]=c.clipRect(q),k&&a["zone-graph-"+h].clip(g[h]),n&&a["zone-area-"+h].clip(g[h]));J=d.value>B.max;a.resetZones&&0===e&&(e=void 0)}),this.clips=g)},invertGroups:function(a){function b(){l(["group", +"markerGroup"],function(b){c[b]&&(d.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,d=c.chart,f;c.xAxis&&(f=C(d,"resize",b),C(c,"destroy",f),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,d,f){var e=this[a],g=!e;g&&(this[a]=e=this.chart.renderer.g().attr({zIndex:d||.1}).add(f));e.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(w(this.colorIndex)?"highcharts-color-"+ +this.colorIndex+" ":"")+(this.options.className||"")+(e.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);e.attr({visibility:c})[g?"attr":"animate"](this.getPlotBox());return e},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,f=a.options,e=!!a.animate&&b.renderer.isSVG&&F(f.animation).duration,h=a.visible?"inherit": +"hidden",g=f.zIndex,q=a.hasRendered,k=b.seriesGroup,n=b.inverted;c=a.plotGroup("group","series",h,g,k);a.markerGroup=a.plotGroup("markerGroup","markers",h,g,k);e&&a.animate(!0);c.inverted=a.isCartesian?n:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(n);!1===f.clip||a.sharedClipKey||q||c.clip(b.clipRect);e&&a.animate();q||(a.animationTimeout=B(function(){a.afterAnimate()}, +e));a.isDirty=!1;a.hasRendered=!0;d(a,"afterRender")},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,d=this.xAxis,f=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:z(d&&d.left,a.plotLeft),translateY:z(f&&f.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,f=this.chart.inverted;return this.searchKDTree({clientX:f? +c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:f?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(c,d,f){var e,h;if(h=c&&c.length)return e=b.kdAxisArray[d%f],c.sort(function(a,b){return a[e]-b[e]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0,h),d+1,f),right:a(c.slice(h+1),d+1,f)}}this.buildingKdTree=!0;var b=this,c=-1k?"left":"right";p=0>k?"right":"left";b[n]&&(n=c(a,b[n],h+1,m),l=n[g]t;)l--;this.updateParallelArrays(k, +"splice",l,0,0);this.updateParallelArrays(k,l);h&&k.name&&(h[t]=k.name);m.splice(l,0,a);n&&(this.data.splice(l,0,null),this.processData());"point"===e.legendType&&this.generatePoints();d&&(g[0]&&g[0].remove?g[0].remove(!1):(g.shift(),this.updateParallelArrays(k,"shift"),m.shift()));this.isDirtyData=this.isDirty=!0;c&&q.redraw(f)},removePoint:function(a,c,d){var f=this,e=f.data,g=e[a],m=f.points,h=f.chart,k=function(){m&&m.length===e.length&&m.splice(a,1);e.splice(a,1);f.options.data.splice(a,1);f.updateParallelArrays(g|| +{series:f},"splice",a,1);g&&g.destroy();f.isDirty=!0;f.isDirtyData=!0;c&&h.redraw()};q(d,h);c=b(c,!0);g?g.firePointEvent("remove",null,k):k()},remove:function(a,c,d){function f(){e.destroy();g.isDirtyLegend=g.isDirtyBox=!0;g.linkSeries();b(a,!0)&&g.redraw(c)}var e=this,g=e.chart;!1!==d?u(e,"remove",null,f):f()},update:function(d,f){var e=this,g=e.chart,q=e.userOptions,k=e.oldType||e.type,n=d.type||q.type||g.options.chart.type,h=J[k].prototype,r,B=["group","markerGroup","dataLabelsGroup"],x=["navigatorSeries", +"baseSeries"],z=e.finishedAnimating&&{animation:!1},w=["data","name","turboThreshold"],H=a.keys(d),y=0a&&l>e?(l=Math.max(a,e),c=2*e-l):lr&&c>e?(c=Math.max(r,e),l=2*e-c):c=Math.abs(d)&&.5a.closestPointRange*a.xAxis.transA,g=a.borderWidth=t(e.borderWidth,g?0:1),p=a.yAxis,f=e.threshold,b=a.translatedThreshold=p.getThreshold(f),n=t(e.minPointLength,5),l=a.getColumnMetrics(),r=l.width,q=a.barW=Math.max(r,1+2*g),u=a.pointXOffset=l.offset;d.inverted&&(b-=.5);e.pointPadding&& +(q=Math.ceil(q));w.prototype.translate.apply(a);D(a.points,function(c){var e=t(c.yBottom,b),g=999+Math.abs(e),g=Math.min(Math.max(-g,c.plotY),p.len+g),k=c.plotX+u,l=q,x=Math.min(g,e),B,h=Math.max(g,e)-x;n&&Math.abs(h)n?e-n:b-(B?n:0));c.barX=k;c.pointWidth=r;c.tooltipPos=d.inverted?[p.len+p.pos-d.plotLeft-g,a.xAxis.len-k-l/2,h]:[k+l/2,g+p.pos-d.plotTop,h];c.shapeType="rect";c.shapeArgs= +a.crispCol.apply(a,c.isNull?[k,b,l,0]:[k,x,l,h])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,d){var c=this.options,g,p=this.pointAttrToOptions||{};g=p.stroke||"borderColor";var f=p["stroke-width"]||"borderWidth",b=a&&a.color||this.color,n=a&&a[g]||c[g]||this.color||b,l=a&&a[f]||c[f]||this[f]||0,p=c.dashStyle;a&&this.zones.length&&(b=a.getZone(),b=a.options.color|| +b&&b.color||this.color);d&&(a=e(c.states[d],a.options.states&&a.options.states[d]||{}),d=a.brightness,b=a.color||void 0!==d&&F(b).brighten(a.brightness).get()||b,n=a[g]||n,l=a[f]||l,p=a.dashStyle||p);g={fill:b,stroke:n,"stroke-width":l};p&&(g.dashstyle=p);return g},drawPoints:function(){var a=this,d=this.chart,k=a.options,l=d.renderer,p=k.animationLimit||250,f;D(a.points,function(b){var c=b.graphic,t=c&&d.pointCountc;++c)d=l[c],a=2>c||2===c&&/%$/.test(d),l[c]=r(d,[w,e,u,l[2]][c])+(a?t:0);l[3]>l[2]&&(l[3]=l[2]);return l},getStartAndEndRadians:function(a,e){a=F(a)?a:0;e=F(e)&&e>a&&360>e-a?e:a+360;return{start:C*(a+-90),end:C*(e+-90)}}}})(K);(function(a){var C=a.addEvent,F=a.CenteredSeriesMixin,D=a.defined,r=a.each,g=a.extend,e=F.getStartAndEndRadians,t=a.inArray,w=a.noop,l=a.pick,u=a.Point, +c=a.Series,d=a.seriesType,k=a.setAnimation;d("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group", +"dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=this,d=c.points,b=c.startAngleRad;a||(r(d,function(a){var d=a.graphic,f=a.shapeArgs;d&&(d.attr({r:a.startR||c.center[3]/2,start:b,end:b}),d.animate({r:f.r,start:f.start,end:f.end},c.options.animation))}),c.animate=null)},updateTotals:function(){var a,c=0,d=this.points,b=d.length,e,g=this.options.ignoreHiddenPoint;for(a=0;a1.5*Math.PI?q-=2*Math.PI:q<-Math.PI/2&&(q+=2*Math.PI); +G.slicedTranslation={translateX:Math.round(Math.cos(q)*b),translateY:Math.round(Math.sin(q)*b)};t=Math.cos(q)*a[2]/2;m=Math.sin(q)*a[2]/2;G.tooltipPos=[a[0]+.7*t,a[1]+.7*m];G.half=q<-Math.PI/2||q>Math.PI/2?1:0;G.angle=q;k=Math.min(g,G.labelDistance/5);G.labelPos=[a[0]+t+Math.cos(q)*G.labelDistance,a[1]+m+Math.sin(q)*G.labelDistance,a[0]+t+Math.cos(q)*k,a[1]+m+Math.sin(q)*k,a[0]+t,a[1]+m,0>G.labelDistance?"center":G.half?"right":"left",q]}},drawGraph:null,drawPoints:function(){var a=this,c=a.chart.renderer, +d,b,e,k,l=a.options.shadow;l&&!a.shadowGroup&&(a.shadowGroup=c.g("shadow").add(a.group));r(a.points,function(f){b=f.graphic;if(f.isNull)b&&(f.graphic=b.destroy());else{k=f.shapeArgs;d=f.getTranslate();var q=f.shadowGroup;l&&!q&&(q=f.shadowGroup=c.g("shadow").add(a.shadowGroup));q&&q.attr(d);e=a.pointAttribs(f,f.selected&&"select");b?b.setRadialReference(a.center).attr(e).animate(g(k,d)):(f.graphic=b=c[f.shapeType](k).setRadialReference(a.center).attr(d).add(a.group),f.visible||b.attr({visibility:"hidden"}), +b.attr(e).attr({"stroke-linejoin":"round"}).shadow(l,q));b.addClass(f.getClassName())}})},searchPoint:w,sortByAngle:function(a,c){a.sort(function(a,b){return void 0!==a.angle&&(b.angle-a.angle)*c})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:F.getCenter,getSymbol:w},{init:function(){u.prototype.init.apply(this,arguments);var a=this,c;a.name=l(a.name,"Slice");c=function(c){a.slice("select"===c.type)};C(a,"select",c);C(a,"unselect",c);return a},isValid:function(){return a.isNumber(this.y, +!0)&&0<=this.y},setVisible:function(a,c){var d=this,b=d.series,e=b.chart,g=b.options.ignoreHiddenPoint;c=l(c,g);a!==d.visible&&(d.visible=d.options.visible=a=void 0===a?!d.visible:a,b.options.data[t(d,b.data)]=d.options,r(["graphic","dataLabel","connector","shadowGroup"],function(b){if(d[b])d[b][a?"show":"hide"](!0)}),d.legendItem&&e.legend.colorizeItem(d,a),a||"hover"!==d.state||d.setState(""),g&&(b.isDirty=!0),c&&e.redraw())},slice:function(a,c,d){var b=this.series;k(d,b.chart);l(c,!0);this.sliced= +this.options.sliced=D(a)?a:!this.sliced;b.options.data[t(this,b.data)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+a,c.r+a,{innerR:this.shapeArgs.r-1,start:c.start,end:c.end})}})})(K);(function(a){var C= +a.addEvent,F=a.arrayMax,D=a.defined,r=a.each,g=a.extend,e=a.format,t=a.map,w=a.merge,l=a.noop,u=a.pick,c=a.relativeLength,d=a.Series,k=a.seriesTypes,x=a.some,p=a.stableSort;a.distribute=function(c,b,d){function e(a,b){return a.target-b.target}var f,g=!0,k=c,l=[],n;n=0;var m=k.reducedLen||b;for(f=c.length;f--;)n+=c[f].size;if(n>m){p(c,function(a,b){return(b.rank||0)-(a.rank||0)});for(n=f=0;n<=m;)n+=c[f].size,f++;l=c.splice(f-1,c.length)}p(c,e);for(c=t(c,function(a){return{size:a.size,targets:[a.target], +align:u(a.align,.5)}});g;){for(f=c.length;f--;)g=c[f],n=(Math.min.apply(0,g.targets)+Math.max.apply(0,g.targets))/2,g.pos=Math.min(Math.max(0,n-g.size*g.align),b-g.size);f=c.length;for(g=!1;f--;)0c[f].pos&&(c[f-1].size+=c[f].size,c[f-1].targets=c[f-1].targets.concat(c[f].targets),c[f-1].align=.5,c[f-1].pos+c[f-1].size>b&&(c[f-1].pos=b-c[f-1].size),c.splice(f,1),g=!0)}k.push.apply(k,l);f=0;x(c,function(c){var e=0;if(x(c.targets,function(){k[f].pos=c.pos+e;if(Math.abs(k[f].pos- +k[f].target)>d)return r(k.slice(0,f+1),function(a){delete a.pos}),k.reducedLen=(k.reducedLen||b)-.1*b,k.reducedLen>.1*b&&a.distribute(k,b,d),!0;e+=k[f].size;f++}))return!0});p(k,e)};d.prototype.drawDataLabels=function(){function c(a,b){var c=b.filter;return c?(b=c.operator,a=a[c.property],c=c.value,"\x3e"===b&&a>c||"\x3c"===b&&a=c||"\x3c\x3d"===b&&a<=c||"\x3d\x3d"===b&&a==c||"\x3d\x3d\x3d"===b&&a===c?!0:!1):!0}var b=this,d=b.chart,g=b.options,k=g.dataLabels,q=b.points,l,p,t= +b.hasRendered||0,m,x,A=u(k.defer,!!g.animation),F=d.renderer;if(k.enabled||b._hasPointLabels)b.dlProcessOptions&&b.dlProcessOptions(k),x=b.plotGroup("dataLabelsGroup","data-labels",A&&!t?"hidden":"visible",k.zIndex||6),A&&(x.attr({opacity:+t}),t||C(b,"afterAnimate",function(){b.visible&&x.show(!0);x[g.animation?"animate":"attr"]({opacity:1},{duration:200})})),p=k,r(q,function(f){var h,q=f.dataLabel,n,t,r=f.connector,B=!q,z;l=f.dlOptions||f.options&&f.options.dataLabels;(h=u(l&&l.enabled,p.enabled)&& +!f.isNull)&&(h=!0===c(f,l||k));h&&(k=w(p,l),n=f.getLabelConfig(),z=k[f.formatPrefix+"Format"]||k.format,m=D(z)?e(z,n,d.time):(k[f.formatPrefix+"Formatter"]||k.formatter).call(n,k),z=k.style,n=k.rotation,z.color=u(k.color,z.color,b.color,"#000000"),"contrast"===z.color&&(f.contrastColor=F.getContrast(f.color||b.color),z.color=k.inside||0>u(f.labelDistance,k.distance)||g.stacking?f.contrastColor:"#000000"),g.cursor&&(z.cursor=g.cursor),t={fill:k.backgroundColor,stroke:k.borderColor,"stroke-width":k.borderWidth, +r:k.borderRadius||0,rotation:n,padding:k.padding,zIndex:1},a.objectEach(t,function(a,b){void 0===a&&delete t[b]}));!q||h&&D(m)?h&&D(m)&&(q?t.text=m:(q=f.dataLabel=n?F.text(m,0,-9999).addClass("highcharts-data-label"):F.label(m,0,-9999,k.shape,null,null,k.useHTML,null,"data-label"),q.addClass(" highcharts-data-label-color-"+f.colorIndex+" "+(k.className||"")+(k.useHTML?"highcharts-tracker":""))),q.attr(t),q.css(z).shadow(k.shadow),q.added||q.add(x),b.alignDataLabel(f,q,k,null,B)):(f.dataLabel=q=q.destroy(), +r&&(f.connector=r.destroy()))});a.fireEvent(this,"afterDrawDataLabels")};d.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,k=f.inverted,l=u(a.dlBox&&a.dlBox.centerX,a.plotX,-9999),n=u(a.plotY,-9999),m=b.getBBox(),p,t=c.rotation,r=c.align,w=this.visible&&(a.series.forceDL||f.isInsidePlot(l,Math.round(n),k)||d&&f.isInsidePlot(l,k?d.x+1:d.y+d.height-1,k)),h="justify"===u(c.overflow,"justify");if(w&&(p=c.style.fontSize,p=f.renderer.fontMetrics(p,b).b,d=g({x:k?this.yAxis.len-n:l,y:Math.round(k? +this.xAxis.len-l:n),width:0,height:0},d),g(c,{width:m.width,height:m.height}),t?(h=!1,l=f.renderer.rotCorr(p,t),l={x:d.x+c.x+d.width/2+l.x,y:d.y+c.y+{top:0,middle:.5,bottom:1}[c.verticalAlign]*d.height},b[e?"attr":"animate"](l).attr({align:r}),n=(t+720)%360,n=180n,"left"===r?l.y-=n?m.height:0:"center"===r?(l.x-=m.width/2,l.y-=m.height/2):"right"===r&&(l.x-=m.width,l.y-=n?0:m.height),b.placed=!0,b.alignAttr=l):(b.align(c,null,d),l=b.alignAttr),h?a.isLabelJustified=this.justifyDataLabel(b,c, +l,m,d,e):u(c.crop,!0)&&(w=f.isInsidePlot(l.x,l.y)&&f.isInsidePlot(l.x+m.width,l.y+m.height)),c.shape&&!t))b[e?"attr":"animate"]({anchorX:k?f.plotWidth-a.plotY:a.plotX,anchorY:k?f.plotHeight-a.plotX:a.plotY});w||(b.attr({y:-9999}),b.placed=!1)};d.prototype.justifyDataLabel=function(a,b,c,d,e,g){var f=this.chart,q=b.align,k=b.verticalAlign,m,l,n=a.box?0:a.padding||0;m=c.x+n;0>m&&("right"===q?b.align="left":b.x=-m,l=!0);m=c.x+d.width-n;m>f.plotWidth&&("left"===q?b.align="right":b.x=f.plotWidth-m,l=!0); +m=c.y+n;0>m&&("bottom"===k?b.verticalAlign="top":b.y=-m,l=!0);m=c.y+d.height-n;m>f.plotHeight&&("top"===k?b.verticalAlign="bottom":b.y=f.plotHeight-m,l=!0);l&&(a.placed=!g,a.align(b,null,e));return l};k.pie&&(k.pie.prototype.drawDataLabels=function(){var c=this,b=c.data,e,g=c.chart,k=c.options.dataLabels,q=u(k.connectorPadding,10),l=u(k.connectorWidth,1),p=g.plotWidth,t=g.plotHeight,m=Math.round(g.chartWidth/3),w,x=c.center,C=x[2]/2,G=x[1],h,v,K,P,I=[[],[]],O,N,y,R,S=[0,0,0,0];c.visible&&(k.enabled|| +c._hasPointLabels)&&(r(b,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),d.prototype.drawDataLabels.apply(c),r(b,function(a){a.dataLabel&&a.visible&&(I[a.half].push(a),a.dataLabel._pos=null,!D(k.style.width)&&!D(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>m&&(a.dataLabel.css({width:.7*m}),a.dataLabel.shortened=!0))}), +r(I,function(b,d){var f,m,l=b.length,n=[],w;if(l)for(c.sortByAngle(b,d-.5),0e.bottom-2?f:N,d,e),h._attr={visibility:y,align:K[6]},h._pos={x:O+k.x+({left:q,right:-q}[K[6]]||0),y:N+k.y-10},K.x=O,K.y=N,u(k.crop,!0)&&(v=h.getBBox().width,f=null,O-vp-q&&0===d&&(f=Math.round(O+v-p+q),S[1]= +Math.max(f,S[1])),0>N-P/2?S[0]=Math.max(Math.round(-N+P/2),S[0]):N+P/2>t&&(S[2]=Math.max(Math.round(N+P/2-t),S[2])),h.sideOverflow=f)}),0===F(S)||this.verifyDataLabelOverflow(S))&&(this.placeDataLabels(),l&&r(this.points,function(a){var b;w=a.connector;if((h=a.dataLabel)&&h._pos&&a.visible&&0u(this.translatedThreshold, +k.yAxis.len)),m=u(c.inside,!!this.options.stacking);l&&(e=w(l),0>e.y&&(e.height+=e.y,e.y=0),l=e.y+e.height-k.yAxis.len,0a+d||f+kc+e||g+lthis.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e;d&&t(d,function(a){a.setState()});t("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,f=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",g=c[d],h=(b.pointRange||0)/2,k=b.reversed&&!c.inverted||!b.reversed&&c.inverted?-1:1,l=b.getExtremes(), +m=b.toValue(g-f,!0)+h*k,k=b.toValue(g+b.len-f,!0)-h*k,q=k=e(l.minWidth,0)&&this.chartHeight>=e(l.minHeight,0)}).call(this)&&g.push(a._id)};C.prototype.currentOptions=function(e){function l(c,d,e,u){var k;a.objectEach(c,function(a,b){if(!u&&-10)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}function P(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(ut[e]=i),t&&(ut[t[0]]=function(){return b(i.apply(this,arguments),t[1],t[2])}),n&&(ut[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function W(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e,t){return e.isValid()?(t=R(t,e.localeData()),ot[t]=ot[t]||function(e){var t,n,s=e.match(rt);for(t=0,n=s.length;t=0&&at.test(e);)e=e.replace(at,n),at.lastIndex=0,s-=1;return e}function C(e,t,n){Yt[e]=S(t)?t:function(e,s){return e&&n?n:t}}function F(e,t){return o(Yt,e)?Yt[e](t._strict,t._locale):new RegExp(function(e){return U(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i}))}(e))}function U(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function L(e,t){var n,s=t;for("string"==typeof e&&(e=[e]),i(t)&&(s=function(e,n){n[t]=g(e)}),n=0;n=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function B(e,t,n){var s=7+t-n;return-((7+J(e,0,s).getUTCDay()-t)%7)+s-1}function Q(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+B(e,s,i);return o<=0?a=V(r=e-1)+o:o>V(e)?(r=e+1,a=o-V(e)):(r=e,a=o),{year:r,dayOfYear:a}}function X(e,t,n){var s,i,r=B(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+K(i=e.year()-1,t,n):a>K(e.year(),t,n)?(s=a-K(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function K(e,t,n){var s=B(e,t,n),i=B(e+1,t,n);return(V(e)-s+i)/7}function ee(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],d=[];for(t=0;t<7;t++)n=l([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),d.push(s),d.push(i),d.push(r);for(a.sort(e),o.sort(e),u.sort(e),d.sort(e),t=0;t<7;t++)o[t]=U(o[t]),u[t]=U(u[t]),d[t]=U(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function te(){return this.hours()%12||12}function ne(e,t){P(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function se(e,t){return t._meridiemParse}function ie(e){return e?e.toLowerCase().replace("_","-"):e}function re(e){var t=null;if(!Xt[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Jt._abbr;require("./locale/"+e),ae(t)}catch(e){}return Xt[e]}function ae(e,t){var n;return e&&(n=s(t)?ue(e):oe(e,t))&&(Jt=n),Jt._abbr}function oe(e,t){if(null!==t){var n=Qt;if(t.abbr=e,null!=Xt[e])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Xt[e]._config;else if(null!=t.parentLocale){if(null==Xt[t.parentLocale])return Kt[t.parentLocale]||(Kt[t.parentLocale]=[]),Kt[t.parentLocale].push({name:e,config:t}),null;n=Xt[t.parentLocale]._config}return Xt[e]=new k(D(n,t)),Kt[e]&&Kt[e].forEach(function(e){oe(e.name,e.config)}),ae(e),Xt[e]}return delete Xt[e],null}function ue(e){var n;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Jt;if(!t(e)){if(n=re(e))return n;e=[e]}return function(e){for(var t,n,s,i,r=0;r0;){if(s=re(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&p(i,n,!0)>=t-1)break;t--}r++}return null}(e)}function le(e){var t,n=e._a;return n&&-2===d(e).overflow&&(t=n[xt]<0||n[xt]>11?xt:n[bt]<1||n[bt]>Z(n[Tt],n[xt])?bt:n[Pt]<0||n[Pt]>24||24===n[Pt]&&(0!==n[Wt]||0!==n[Ht]||0!==n[Rt])?Pt:n[Wt]<0||n[Wt]>59?Wt:n[Ht]<0||n[Ht]>59?Ht:n[Rt]<0||n[Rt]>999?Rt:-1,d(e)._overflowDayOfYear&&(tbt)&&(t=bt),d(e)._overflowWeeks&&-1===t&&(t=Ct),d(e)._overflowWeekday&&-1===t&&(t=Ft),d(e).overflow=t),e}function de(e,t,n){return null!=e?e:null!=t?t:n}function he(t){var n,s,i,r,a,o=[];if(!t._d){for(i=function(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}(t),t._w&&null==t._a[bt]&&null==t._a[xt]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=de(t.GG,e._a[Tt],X(pe(),1,4).year),s=de(t.W,1),((i=de(t.E,1))<1||i>7)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=X(pe(),r,a);n=de(t.gg,e._a[Tt],l.year),s=de(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(u=!0)):i=r}s<1||s>K(n,r,a)?d(e)._overflowWeeks=!0:null!=u?d(e)._overflowWeekday=!0:(o=Q(n,s,i,r,a),e._a[Tt]=o.year,e._dayOfYear=o.dayOfYear)}(t),null!=t._dayOfYear&&(a=de(t._a[Tt],i[Tt]),(t._dayOfYear>V(a)||0===t._dayOfYear)&&(d(t)._overflowDayOfYear=!0),s=J(a,0,t._dayOfYear),t._a[xt]=s.getUTCMonth(),t._a[bt]=s.getUTCDate()),n=0;n<3&&null==t._a[n];++n)t._a[n]=o[n]=i[n];for(;n<7;n++)t._a[n]=o[n]=null==t._a[n]?2===n?1:0:t._a[n];24===t._a[Pt]&&0===t._a[Wt]&&0===t._a[Ht]&&0===t._a[Rt]&&(t._nextDay=!0,t._a[Pt]=0),t._d=(t._useUTC?J:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&e>=0&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,o),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Pt]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(d(t).weekdayMismatch=!0)}}function ce(e){var t,n,s,i,r,a,o=e._i,u=en.exec(o)||tn.exec(o);if(u){for(d(e).iso=!0,t=0,n=sn.length;t0&&d(t).unusedInput.push(a),o=o.slice(o.indexOf(s)+s.length),l+=s.length),ut[r]?(s?d(t).empty=!1:d(t).unusedTokens.push(r),G(r,s,t)):t._strict&&!s&&d(t).unusedTokens.push(r);d(t).charsLeftOver=u-l,o.length>0&&d(t).unusedInput.push(o),t._a[Pt]<=12&&!0===d(t).bigHour&&t._a[Pt]>0&&(d(t).bigHour=void 0),d(t).parsedDateParts=t._a.slice(0),d(t).meridiem=t._meridiem,t._a[Pt]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(t._locale,t._a[Pt],t._meridiem),he(t),le(t)}else me(t);else ce(t)}function ye(o){var l=o._i,y=o._f;return o._locale=o._locale||ue(o._l),null===l||void 0===y&&""===l?c({nullInput:!0}):("string"==typeof l&&(o._i=l=o._locale.preparse(l)),_(l)?new m(le(l)):(r(l)?o._d=l:t(y)?function(e){var t,n,s,i,r;if(0===e._f.length)return d(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ir&&(t=r),function(e,t,n,s,i){var r=Q(e,t,n,s,i),a=J(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}function Ne(e,t){t[Rt]=g(1e3*("0."+e))}function Ge(e){return e}function Ve(e,t,n,s){var i=ue(),r=l().set(s,t);return i[n](r,e)}function Ee(e,t,n){if(i(e)&&(t=e,e=void 0),e=e||"",null!=t)return Ve(e,t,n,"month");var s,r=[];for(s=0;s<12;s++)r[s]=Ve(e,s,n,"month");return r}function Ie(e,t,n,s){"boolean"==typeof e?(i(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,i(t)&&(n=t,t=void 0),t=t||"");var r=ue(),a=e?r._week.dow:0;if(null!=n)return Ve(t,(n+a)%7,s,"day");var o,u=[];for(o=0;o<7;o++)u[o]=Ve(t,(o+a)%7,s,"day");return u}function Ae(e,t,n,s){var i=xe(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function je(e){return e<0?Math.floor(e):Math.ceil(e)}function Ze(e){return 4800*e/146097}function ze(e){return 146097*e/4800}function $e(e){return function(){return this.as(e)}}function qe(e){return function(){return this.isValid()?this._data[e]:NaN}}function Je(e){return(e>0)-(e<0)||+e}function Be(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=An(this._milliseconds)/1e3,s=An(this._days),i=An(this._months);t=y((e=y(n/60))/60),n%=60,e%=60;var r=y(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Je(this._months)!==Je(h)?"-":"",m=Je(this._days)!==Je(h)?"-":"",_=Je(this._milliseconds)!==Je(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||l||d?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(d?_+d+"S":"")}var Qe,Xe;Xe=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s68?1900:2e3)};var Ut,Lt=I("FullYear",!0);Ut=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;tthis?this:e:c()}),hn=["year","quarter","month","week","day","hour","minute","second","millisecond"];De("Z",":"),De("ZZ",""),C("Z",Dt),C("ZZ",Dt),L(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=ke(Dt,e)});var cn=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var fn=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,mn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;xe.fn=ve.prototype,xe.invalid=function(){return xe(NaN)};var _n=We(1,"add"),yn=We(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var gn=v("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});P(0,["gg",2],0,function(){return this.weekYear()%100}),P(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ue("gggg","weekYear"),Ue("ggggg","weekYear"),Ue("GGGG","isoWeekYear"),Ue("GGGGG","isoWeekYear"),Y("weekYear","gg"),Y("isoWeekYear","GG"),x("weekYear",1),x("isoWeekYear",1),C("G",Mt),C("g",Mt),C("GG",mt,dt),C("gg",mt,dt),C("GGGG",pt,ct),C("gggg",pt,ct),C("GGGGG",wt,ft),C("ggggg",wt,ft),N(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=g(e)}),N(["gg","GG"],function(t,n,s,i){n[i]=e.parseTwoDigitYear(t)}),P("Q",0,"Qo","quarter"),Y("quarter","Q"),x("quarter",7),C("Q",lt),L("Q",function(e,t){t[xt]=3*(g(e)-1)}),P("D",["DD",2],"Do","date"),Y("date","D"),x("date",9),C("D",mt),C("DD",mt,dt),C("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),L(["D","DD"],bt),L("Do",function(e,t){t[bt]=g(e.match(mt)[0])});var pn=I("Date",!0);P("DDD",["DDDD",3],"DDDo","dayOfYear"),Y("dayOfYear","DDD"),x("dayOfYear",4),C("DDD",gt),C("DDDD",ht),L(["DDD","DDDD"],function(e,t,n){n._dayOfYear=g(e)}),P("m",["mm",2],0,"minute"),Y("minute","m"),x("minute",14),C("m",mt),C("mm",mt,dt),L(["m","mm"],Wt);var wn=I("Minutes",!1);P("s",["ss",2],0,"second"),Y("second","s"),x("second",15),C("s",mt),C("ss",mt,dt),L(["s","ss"],Ht);var vn=I("Seconds",!1);P("S",0,0,function(){return~~(this.millisecond()/100)}),P(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),P(0,["SSS",3],0,"millisecond"),P(0,["SSSS",4],0,function(){return 10*this.millisecond()}),P(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),P(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),P(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),P(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),P(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Y("millisecond","ms"),x("millisecond",16),C("S",gt,lt),C("SS",gt,dt),C("SSS",gt,ht);var Mn;for(Mn="SSSS";Mn.length<=9;Mn+="S")C(Mn,vt);for(Mn="S";Mn.length<=9;Mn+="S")L(Mn,Ne);var Sn=I("Milliseconds",!1);P("z",0,0,"zoneAbbr"),P("zz",0,0,"zoneName");var Dn=m.prototype;Dn.add=_n,Dn.calendar=function(t,n){var s=t||pe(),i=Ye(s,this).startOf("day"),r=e.calendarFormat(this,i)||"sameElse",a=n&&(S(n[r])?n[r].call(this,s):n[r]);return this.format(a||this.localeData().calendar(r,this,pe(s)))},Dn.clone=function(){return new m(this)},Dn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Ye(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=O(t)){case"year":r=Re(this,s)/12;break;case"month":r=Re(this,s);break;case"quarter":r=Re(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:y(r)},Dn.endOf=function(e){return void 0===(e=O(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},Dn.format=function(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=H(this,t);return this.localeData().postformat(n)},Dn.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||pe(e).isValid())?xe({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.fromNow=function(e){return this.from(pe(),e)},Dn.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||pe(e).isValid())?xe({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Dn.toNow=function(e){return this.to(pe(),e)},Dn.get=function(e){return e=O(e),S(this[e])?this[e]():this},Dn.invalidAt=function(){return d(this).overflow},Dn.isAfter=function(e,t){var n=_(e)?e:pe(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=O(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?H(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",H(n,"Z")):H(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},Dn.toJSON=function(){return this.isValid()?this.toISOString():null},Dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Dn.unix=function(){return Math.floor(this.valueOf()/1e3)},Dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Dn.year=Lt,Dn.isLeapYear=function(){return E(this.year())},Dn.weekYear=function(e){return Le.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Dn.isoWeekYear=function(e){return Le.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Dn.quarter=Dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Dn.month=$,Dn.daysInMonth=function(){return Z(this.year(),this.month())},Dn.week=Dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Dn.isoWeek=Dn.isoWeeks=function(e){var t=X(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Dn.weeksInYear=function(){var e=this.localeData()._week;return K(this.year(),e.dow,e.doy)},Dn.isoWeeksInYear=function(){return K(this.year(),1,4)},Dn.date=pn,Dn.day=Dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Dn.hour=Dn.hours=Bt,Dn.minute=Dn.minutes=wn,Dn.second=Dn.seconds=vn,Dn.millisecond=Dn.milliseconds=Sn,Dn.utcOffset=function(t,n,s){var i,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=ke(Dt,t)))return this}else Math.abs(t)<16&&!s&&(t*=60);return!this._isUTC&&n&&(i=Oe(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==t&&(!n||this._changeInProgress?He(this,xe(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Oe(this)},Dn.utc=function(e){return this.utcOffset(0,e)},Dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Oe(this),"m")),this},Dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=ke(St,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?pe(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Dn.isUtc=Te,Dn.isUTC=Te,Dn.zoneAbbr=function(){return this._isUTC?"UTC":""},Dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Dn.dates=v("dates accessor is deprecated. Use date instead.",pn),Dn.months=v("months accessor is deprecated. Use month instead",$),Dn.years=v("years accessor is deprecated. Use year instead",Lt),Dn.zone=v("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Dn.isDSTShifted=v("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(f(e,this),(e=ye(e))._a){var t=e._isUTC?l(e._a):pe(e._a);this._isDSTShifted=this.isValid()&&p(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var kn=k.prototype;kn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return S(s)?s.call(t,n):s},kn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},kn.invalidDate=function(){return this._invalidDate},kn.ordinal=function(e){return this._ordinal.replace("%d",e)},kn.preparse=Ge,kn.postformat=Ge,kn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return S(i)?i(e,t,n,s):i.replace(/%d/i,e)},kn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return S(n)?n(t):n.replace(/%s/i,t)},kn.set=function(e){var t,n;for(n in e)S(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},kn.months=function(e,n){return e?t(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Nt).test(n)?"format":"standalone"][e.month()]:t(this._months)?this._months:this._months.standalone},kn.monthsShort=function(e,n){return e?t(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Nt.test(n)?"format":"standalone"][e.month()]:t(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},kn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ut.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ut.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ut.call(this._shortMonthsParse,a))?i:-1!==(i=Ut.call(this._longMonthsParse,a))?i:null:-1!==(i=Ut.call(this._longMonthsParse,a))?i:-1!==(i=Ut.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},kn.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||q.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=It),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},kn.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||q.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Et),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},kn.week=function(e){return X(e,this._week.dow,this._week.doy).week},kn.firstDayOfYear=function(){return this._week.doy},kn.firstDayOfWeek=function(){return this._week.dow},kn.weekdays=function(e,n){return e?t(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(n)?"format":"standalone"][e.day()]:t(this._weekdays)?this._weekdays:this._weekdays.standalone},kn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},kn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},kn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ut.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ut.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ut.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ut.call(this._weekdaysParse,a))?i:-1!==(i=Ut.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ut.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ut.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ut.call(this._weekdaysParse,a))?i:-1!==(i=Ut.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ut.call(this._minWeekdaysParse,a))?i:-1!==(i=Ut.call(this._weekdaysParse,a))?i:-1!==(i=Ut.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},kn.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||ee.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},kn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||ee.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=$t),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},kn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||ee.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},kn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},kn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ae("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===g(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),e.lang=v("moment.lang is deprecated. Use moment.locale instead.",ae),e.langData=v("moment.langData is deprecated. Use moment.localeData instead.",ue);var Yn=Math.abs,On=$e("ms"),Tn=$e("s"),xn=$e("m"),bn=$e("h"),Pn=$e("d"),Wn=$e("w"),Hn=$e("M"),Rn=$e("y"),Cn=qe("milliseconds"),Fn=qe("seconds"),Un=qe("minutes"),Ln=qe("hours"),Nn=qe("days"),Gn=qe("months"),Vn=qe("years"),En=Math.round,In={ss:44,s:45,m:45,h:22,d:26,M:11},An=Math.abs,jn=ve.prototype;return jn.isValid=function(){return this._isValid},jn.abs=function(){var e=this._data;return this._milliseconds=Yn(this._milliseconds),this._days=Yn(this._days),this._months=Yn(this._months),e.milliseconds=Yn(e.milliseconds),e.seconds=Yn(e.seconds),e.minutes=Yn(e.minutes),e.hours=Yn(e.hours),e.months=Yn(e.months),e.years=Yn(e.years),this},jn.add=function(e,t){return Ae(this,e,t,1)},jn.subtract=function(e,t){return Ae(this,e,t,-1)},jn.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=O(e))||"year"===e)return t=this._days+s/864e5,n=this._months+Ze(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ze(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},jn.asMilliseconds=On,jn.asSeconds=Tn,jn.asMinutes=xn,jn.asHours=bn,jn.asDays=Pn,jn.asWeeks=Wn,jn.asMonths=Hn,jn.asYears=Rn,jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12):NaN},jn._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*je(ze(o)+a),a=0,o=0),u.milliseconds=r%1e3,e=y(r/1e3),u.seconds=e%60,t=y(e/60),u.minutes=t%60,n=y(t/60),u.hours=n%24,a+=y(n/24),i=y(Ze(a)),o+=i,a-=je(ze(i)),s=y(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},jn.clone=function(){return xe(this)},jn.get=function(e){return e=O(e),this.isValid()?this[e+"s"]():NaN},jn.milliseconds=Cn,jn.seconds=Fn,jn.minutes=Un,jn.hours=Ln,jn.days=Nn,jn.weeks=function(){return y(this.days()/7)},jn.months=Gn,jn.years=Vn,jn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var s=xe(e).abs(),i=En(s.as("s")),r=En(s.as("m")),a=En(s.as("h")),o=En(s.as("d")),u=En(s.as("M")),l=En(s.as("y")),d=i<=In.ss&&["s",i]||i0,d[4]=n,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,d)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},jn.toISOString=Be,jn.toString=Be,jn.toJSON=Be,jn.locale=Ce,jn.localeData=Fe,jn.toIsoString=v("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Be),jn.lang=gn,P("X",0,0,"unix"),P("x",0,0,"valueOf"),C("x",Mt),C("X",/[+-]?\d+(\.\d{1,3})?/),L("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),L("x",function(e,t,n){n._d=new Date(g(e))}),e.version="2.20.1",function(e){Qe=e}(pe),e.fn=Dn,e.min=function(){return we("isBefore",[].slice.call(arguments,0))},e.max=function(){return we("isAfter",[].slice.call(arguments,0))},e.now=function(){return Date.now?Date.now():+new Date},e.utc=l,e.unix=function(e){return pe(1e3*e)},e.months=function(e,t){return Ee(e,t,"months")},e.isDate=r,e.locale=ae,e.invalid=c,e.duration=xe,e.isMoment=_,e.weekdays=function(e,t,n){return Ie(e,t,n,"weekdays")},e.parseZone=function(){return pe.apply(null,arguments).parseZone()},e.localeData=ue,e.isDuration=Me,e.monthsShort=function(e,t){return Ee(e,t,"monthsShort")},e.weekdaysMin=function(e,t,n){return Ie(e,t,n,"weekdaysMin")},e.defineLocale=oe,e.updateLocale=function(e,t){if(null!=t){var n,s,i=Qt;null!=(s=re(e))&&(i=s._config),(n=new k(t=D(i,t))).parentLocale=Xt[e],Xt[e]=n,ae(e)}else null!=Xt[e]&&(null!=Xt[e].parentLocale?Xt[e]=Xt[e].parentLocale:null!=Xt[e]&&delete Xt[e]);return Xt[e]},e.locales=function(){return nt(Xt)},e.weekdaysShort=function(e,t,n){return Ie(e,t,n,"weekdaysShort")},e.normalizeUnits=O,e.relativeTimeRounding=function(e){return void 0===e?En:"function"==typeof e&&(En=e,!0)},e.relativeTimeThreshold=function(e,t){return void 0!==In[e]&&(void 0===t?In[e]:(In[e]=t,"s"===e&&(In.ss=t-1),!0))},e.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},e.prototype=Dn,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},e}); \ No newline at end of file diff --git a/site/assets/scss/citra/citra.scss b/site/assets/scss/citra/citra.scss new file mode 100644 index 000000000..e69de29bb diff --git a/site/assets/scss/citra/citra_after_derived.scss b/site/assets/scss/citra/citra_after_derived.scss new file mode 100644 index 000000000..a7b741011 --- /dev/null +++ b/site/assets/scss/citra/citra_after_derived.scss @@ -0,0 +1 @@ +$navbar-background-color: $light; \ No newline at end of file diff --git a/site/assets/scss/citra/citra_before_derived.scss b/site/assets/scss/citra/citra_before_derived.scss new file mode 100644 index 000000000..e7bb5f1a9 --- /dev/null +++ b/site/assets/scss/citra/citra_before_derived.scss @@ -0,0 +1 @@ +$primary: #ff8e03; diff --git a/site/assets/scss/helpers/spacing.scss b/site/assets/scss/helpers/spacing.scss new file mode 100644 index 000000000..96e10abce --- /dev/null +++ b/site/assets/scss/helpers/spacing.scss @@ -0,0 +1,53 @@ +// https://github.com/jgthms/bulma/issues/451#issuecomment-331758839 + +$sizeUnit: rem; +$marginKey: 'm'; +$paddingKey: 'p'; +$separator: '-'; +$sizes: ( + ('none', 0), + ('xxs', 0.125), + ('xs', 0.25), + ('sm', 0.5), + ('md', 1), + ('lg', 2), + ('xl', 4), + ('xxl', 8), +); +$positions: ( + ('t', ('top')), + ('r', ('right')), + ('b', ('bottom')), + ('l', ('left')), + ('x', ('right', 'left')), + ('y', ('top', 'bottom')) +); + +@function sizeValue($key, $value) { + @return if($key == 'none', 0, $value + $sizeUnit); +} + +@each $size in $sizes { + $sizeKey: nth($size, 1); + $sizeValue: nth($size, 2); + .#{$marginKey}#{$separator}#{$sizeKey} { + margin: sizeValue($sizeKey, $sizeValue); + } + .#{$paddingKey}#{$separator}#{$sizeKey} { + padding: sizeValue($sizeKey, $sizeValue); + } + @each $position in $positions { + $posKey: nth($position, 1); + $posValue: nth($position, 2); + .#{$marginKey}#{$posKey}#{$separator}#{$sizeKey} { + @each $entry in $posValue { + margin-#{$entry}: sizeValue($sizeKey, $sizeValue); + } + } + .#{$paddingKey}#{$posKey}#{$separator}#{$sizeKey} { + @each $entry in $posValue { + padding-#{$entry}: sizeValue($sizeKey, $sizeValue); + } + } + } +} \ No newline at end of file diff --git a/site/assets/scss/shared.scss b/site/assets/scss/shared.scss new file mode 100644 index 000000000..a62055d72 --- /dev/null +++ b/site/assets/scss/shared.scss @@ -0,0 +1,161 @@ +// Center a column's content vertically. +.columns .column.is-centered-vertically { + display: flex; + flex-direction: column; + justify-content: center; +} + +// Used to smoothly change background colors when transitioning on the homepage. +.navbar { + transition: background-color 0.2s ease; + box-shadow: unset; // TODO: Find Bulma variable for this. +} +.navbar-logo { height: 32px; } +.hero .navbar.is-freestanding { + background: $navbar-background-color; +} + +// For call to action heros, we want to style them on hover. +.hero .column:hover .is-actionable { + color: #969696; +} + +/* Typography */ +.has-text-shadow { + text-shadow: 2px 2px #fff; +} + +/* Blog Entry */ +.blog-entry-header { + position: relative; + background-image: url('/images/banner.png'); + background-color: $dark; + background-size: cover; +} + +// Summary +$blog-entry-summary-height: 16em; +.blog-entry-header.summary.entry { + height: $blog-entry-summary-height; +} +.blog-entry-header.summary.twitter { + height: $blog-entry-summary-height / 1.5; +} +.blog-entry-header.summary > div:first-child { + padding-top: $blog-entry-summary-height - 15em; +} +.blog-entry-header.summary:hover { + cursor: hand; + cursor: pointer; + opacity: .9; +} + +// Single +$blog-entry-single-height: 26em; +.blog-entry-header.single { + height: $blog-entry-single-height; +} +.blog-entry-header.single > div:first-child { + padding-top: $blog-entry-single-height - 8em; +} + +// CompatDB +.is-square { + display: inline-block; + width: 16px; + height: 16px; +} + +// Used for the carousel +.carousel-caption { + text-align: left; + padding: 0 5px; + font-size: 0.70rem; + + bottom: 0; + right: 0; + + position: absolute; + z-index: 2; + display: inline-block; + + border-radius: 5px 0 0 0; + -moz-border-radius: 5px 0 0 0; + -webkit-border-radius: 5px 0 0 0; + + // Overrride on regular has-background-dark with transparency + background: rgba(54, 54, 54, 0.85) !important; +} + +// Add overrides for padding/margin on specific sides of an element +.is-bottom-paddingless { + padding-bottom: 0 !important; +} + +.is-bottom-marginless { + margin-bottom: 0 !important; +} + +.clear-search { + cursor: pointer; + display: inline-block; +} + +.pagination { + border-radius:4px; + margin:20px 0; + padding-left:0 +} + +.pagination-search-container { + display: flex; + align-items: center; + justify-content: space-between; +} + +.pagination-container { + margin-left: 50px; + display: inline-block; + +} +.search-container { + display: inline-block; + margin-left: auto; + margin-right: 40px; +} + +.pagination li { + display: inline-block; + background-color:#363636; + border-radius: 20px; + color:#ffffff; + line-height:1.428571429; + margin-left:-1px; + margin-right: 10px; + padding:6px 12px; + position:relative; + text-decoration:none +} + +.pagination li.active a, +.pagination li.active a:link, +.pagination li.active a:focus, +.pagination li.active a:hover { + color: #ffffff; + cursor: not-allowed; +} + +.search { + color: #363636; +} + +.search::placeholder { + color: #363636; +} + +// Hide the summary text on small screen +@media only screen and (max-width: 810px) { + .summary-text { + display: none !important; + } +} diff --git a/site/assets/scss/shared_customization.scss b/site/assets/scss/shared_customization.scss new file mode 100644 index 000000000..0d8e6c86e --- /dev/null +++ b/site/assets/scss/shared_customization.scss @@ -0,0 +1,11 @@ +$body-background-color: $background; +$footer-background-color: $background; + +// Changes the navbar height to match discourse. +$navbar-height: 4rem; + +// Allows for larger icons with less padding +$navbar-item-img-max-height: 2.75rem; + +// Table background colors should be transparent. +$table-background-color: transparent; \ No newline at end of file diff --git a/site/assets/scss/style.scss b/site/assets/scss/style.scss new file mode 100644 index 000000000..594f5cb59 --- /dev/null +++ b/site/assets/scss/style.scss @@ -0,0 +1,21 @@ +/* 1. Import the initial variables */ +@import "./node_modules/bulma/sass/utilities/functions.sass"; +@import "./node_modules/bulma/sass/utilities/initial-variables.sass"; + +/* 2. Set the derived variables */ +@import "./yuzu/yuzu_before_derived.scss"; +@import "./node_modules/bulma/sass/utilities/derived-variables.sass"; +@import "./yuzu/yuzu_after_derived.scss"; + +/* 3. Misc customization of Bulma */ +@import "./shared_customization.scss"; + +/* 4. Import the rest of Bulma */ +@import "./node_modules/bulma/bulma.sass"; +@import "./helpers/spacing.scss"; +@import "./shared.scss"; +@import "./yuzu/yuzu.scss"; + +/* 5. Bring in other external vendor SCSS to bake in */ +@import "./vendor/glide.scss"; +@import "./vendor/baguetteBox.min"; diff --git a/site/assets/scss/vendor/baguetteBox.min.css b/site/assets/scss/vendor/baguetteBox.min.css new file mode 100644 index 000000000..ce7254a15 --- /dev/null +++ b/site/assets/scss/vendor/baguetteBox.min.css @@ -0,0 +1,6 @@ +/*! + * baguetteBox.js + * @author feimosi + * @version 1.11.0 + * @url https://github.com/feimosi/baguetteBox.js + */#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,.8);-webkit-transition:opacity .5s ease;transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;-webkit-box-shadow:0 0 8px rgba(0,0,0,.6);-moz-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;white-space:normal;color:#ccc;background-color:#000;background-color:rgba(0,0,0,.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;-webkit-transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,transform .4s ease;transition:left .4s ease,transform .4s ease,-webkit-transform .4s ease,-moz-transform .4s ease}#baguetteBox-slider.bounce-from-right{-webkit-animation:bounceFromRight .4s ease-out;animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{-webkit-animation:bounceFromLeft .4s ease-out;animation:bounceFromLeft .4s ease-out}@-webkit-keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@-webkit-keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}@keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:0;padding:0;margin:0;border:0;-moz-border-radius:15%;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,.5);color:#ddd;font:1.6em sans-serif;-webkit-transition:background-color .4s ease;transition:background-color .4s ease}.baguetteBox-button:focus,.baguetteBox-button:hover{background-color:rgba(50,50,50,.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.baguetteBox-spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.baguetteBox-double-bounce1,.baguetteBox-double-bounce2{width:100%;height:100%;-moz-border-radius:50%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.baguetteBox-double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounce{0%,100%{-webkit-transform:scale(0);-moz-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}} \ No newline at end of file diff --git a/site/assets/scss/vendor/glide.scss b/site/assets/scss/vendor/glide.scss new file mode 100644 index 000000000..0b0c2813c --- /dev/null +++ b/site/assets/scss/vendor/glide.scss @@ -0,0 +1,72 @@ +$glide-class: 'glide' !default; +$glide-element-separator: '__' !default; +$glide-modifier-separator: '--' !default; + +.#{$glide-class} { + $this: &; + + $se: $glide-element-separator; + $sm: $glide-modifier-separator; + + position: relative; + width: 100%; + box-sizing: border-box; + + * { + box-sizing: inherit; + } + + &#{$se}track { + overflow: hidden; + } + + &#{$se}slides { + position: relative; + width: 100%; + list-style: none; + backface-visibility: hidden; + transform-style: preserve-3d; + touch-action: pan-Y; + overflow: hidden; + padding: 0; + white-space: nowrap; + display: flex; + flex-wrap: nowrap; + will-change: transform; + + &#{$glide-modifier-separator}dragging { + user-select: none; + } + } + + &#{$se}slide { + width: 100%; + height: 100%; + flex-shrink: 0; + white-space: initial; + user-select: none; + -webkit-touch-callout: none; + -webkit-tap-highlight-color: transparent; + + a { + user-select: none; + -webkit-user-drag: none; + -moz-user-select: none; + -ms-user-select: none; + } + } + + &#{$se}arrows { + -webkit-touch-callout: none; + user-select: none; + } + + &#{$se}bullets { + -webkit-touch-callout: none; + user-select: none; + } + + &#{$sm}rtl { + direction: rtl; + } +} diff --git a/site/assets/scss/yuzu/yuzu.scss b/site/assets/scss/yuzu/yuzu.scss new file mode 100644 index 000000000..436cc6e30 --- /dev/null +++ b/site/assets/scss/yuzu/yuzu.scss @@ -0,0 +1,195 @@ +$switch-orangered: #ff3c28; +$switch-deepskyblue: #0ab9e6; +$switch-yellow: #e6ff00; +$switch-deeppink: #ff3278; +$switch-lime: #1edc00; +$switch-gray: #828282; +$code-bg: #101010; // code tag background color + +@each $name, $color in ("orangered", $switch-orangered), ("deepskyblue", $switch-deepskyblue), + ("yellow", $switch-yellow), ("deeppink", $switch-deeppink), ("lime", $switch-lime), ("gray", $switch-gray) { + .switch-left-#{$name} { + #jumbotron-leftjoy path { + // The normal coloring for the .svg is inline, so we cannot override it normally. + stroke: $color !important; + } + + #logo-leftjoy path, #logo-u1 path { + fill: $color !important; + } + } + + .switch-right-#{$name} { + #jumbotron-rightjoy path { + // The normal coloring for the .svg is inline, so we cannot override it normally. + stroke: $color !important; + } + + #logo-rightjoy path, #logo-u2 path { + fill: $color !important; + } + } +} + +#about-section { + position: relative; + top: -100px; +} + +// TODO: Hack for links appearing as the wrong color +a:hover { + color: lighten($blue, 5); +} + +// Correctly positions the switch screen images in the overlay. +.offset-switch-overlay { + top: 13.5%; + left: 22.5%; + // 100% - (22.5% * 2) + width: 55%; +} + +// Fix switch svg scaling and image overlay alignment. +// (for bulma 0.9.0) +.container { + flex-grow: 0; +} + +.container.is-fluid { + padding-left: 0; + padding-right: 0; +} + +// Ensure that arrows consume the entire overlay's height. +.glide__arrow { + height: 100%; + display: flex; + align-items: center; +} + +// Fixes the backgrounds + colors of messages with headers +.message { + background: $dark !important; +} + +.message-header { + color: $dark; +} + +// Fixes multiple

elements in messages in content blocks +.message-header p:not(:last-child) { + margin-bottom: 0; +} + +// Adds dropdown support for messsages +.message-header.is-dropdown { + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.message-body.is-dropdown-target { + display: none; +} + +.message-body.is-dropdown-target.is-active { + display: block !important; +} + +.show-with-js { + display: none; +} + +// Make text nicer to read in articles +.section.content.pt-sm > p { + text-align: justify; + line-height: 1.8; + font-size: 1.09em; +} + +// Fix background color for single line monospaced text +.content :not(pre) > code { + background: $code-bg; +} + +// Multiline code block container +.content pre { + padding: 16px; + overflow: auto; + line-height: 1.45; + background-color: $code-bg; + border-radius: 6px; +} + +// Text color of multilne code block +pre > code { + color: #FFFFFF; +} + +// Style of single line code block +:not(pre) > code { + color: #FFFFFF; + font-size: 0.875em; + font-weight: 400; + padding: 0.15em 0.25em 0.15em 0.25em; + border: 1px solid #585d66; + border-radius: 4px; + box-shadow: 0 1px 1px rgba(0,0,0,0.125); +} + +#download-header { + display: flex; + flex-direction: column; + text-align: center; +} + +#download-buttons { + display: flex; + justify-content: center; +} + +#download-buttons > a { + margin-top: 2rem; + margin-bottom: 0; +} + +@media screen and (min-width: 780px) { + #download-header { + flex-direction: row; + text-align: left; + align-items: center; + } + + #download-buttons > a { + padding-left: 2rem; + padding-right: 2rem; + } +} + +#unsupported-platform-view { + display: none; +} + +// Workaround for browsers without JavaScript for the downloads page +#install-view, #manual-package-view { + display: none; +} + +// Fix manual download button text +#view-package-listing-button { + color: #363636; +} + +// Fix anchor jumps (https://stackoverflow.com/a/28824157) +:target::before { + content: ""; + display: block; + height: 64px; /* fixed header height*/ + margin: -64px 0 0; /* negative fixed header height */ +} + +body { + line-height:1.7; +} diff --git a/site/assets/scss/yuzu/yuzu_after_derived.scss b/site/assets/scss/yuzu/yuzu_after_derived.scss new file mode 100644 index 000000000..5ea533bf2 --- /dev/null +++ b/site/assets/scss/yuzu/yuzu_after_derived.scss @@ -0,0 +1,24 @@ +/* Yuzu uses a dark theme by default */ +$background: darken($dark, 8); + +$navbar-background-color: $dark; +$navbar-item-color: $white; +$navbar-item-hover-background-color: $black; +$navbar-item-hover-color: $white; + +$box-background-color: $info; +$card-background-color: $info; +$table-background-color: $info; + +$text: $white; +$text-light: $white; +$text-strong: $white; +$table-color: $white; + +$link: #03a9f4; + +$pagination-color: $white; +$pagination-hover-color: $grey; + +$title-color: $white; +$subtitle-color: $white; \ No newline at end of file diff --git a/site/assets/scss/yuzu/yuzu_before_derived.scss b/site/assets/scss/yuzu/yuzu_before_derived.scss new file mode 100644 index 000000000..53c9fe72f --- /dev/null +++ b/site/assets/scss/yuzu/yuzu_before_derived.scss @@ -0,0 +1,2 @@ +$primary: #37474f; +$info: #2d2d2d; \ No newline at end of file diff --git a/site/config.toml b/site/config.toml new file mode 100644 index 000000000..cf2ff664b --- /dev/null +++ b/site/config.toml @@ -0,0 +1,93 @@ +baseurl = "https://yuzu-emu.org/" +languageCode = "en-us" + +DefaultContentLanguage = "en" +theme = "shared-bulma-theme" + +# Define how many objects appear per pagination. +paginate = 20 +# Define build timeout for each page (incl. image processing). +timeout = 300000 + +[[menu.main]] + name = "Blog" + weight = 1 + identifier = "blog" + url = "/entry" + +[[menu.main]] + name = "Download" + weight = 2 + identifier = "download" + url = "/downloads" + +[[menu.main]] + name = "FAQs" + weight = 3 + identifier = "faq" + url = "/wiki/faq" + +[[menu.main]] + name = "Compatibility" + weight = 4 + identifier = "compatibility" + url = "/game" + +[[menu.main]] + name = "Screenshots" + weight = 5 + identifier = "screenshots" + url = "/screenshots" + +[[menu.main]] + name = "Patreon" + weight = 6 + identifier = "patreon" + url = "https://www.patreon.com/yuzuteam" + +[[menu.main]] + name = "Profile" + weight = 7 + identifier = "profile" + url = "https://profile.yuzu-emu.org" + +[Params] + Tenant = "yuzu" + BulmaPrimaryShade = "is-dark" + DiscordURL = "https://discord.gg/u77vRWY" + TwitterURL = "https://twitter.com/yuzuemu" + GithubURL = "https://github.com/yuzu-emu/yuzu" + GithubGamesWikiURL = "https://github.com/yuzu-emu/yuzu-games-wiki" + GoogleAnalyticsTrackingId = "UA-112443698-1" + +[Params.fmt] + ISO8601 = "2006-01-02T15:04:05-07:00" + Date = "January 02 2006" + +[Languages] + [Languages.en] + title = "yuzu" + tagline = "Nintendo Switch Emulator" + description = "yuzu is a highly experimental open-source emulator for the Nintendo Switch." + weight = 1 + +[module] + [[module.mounts]] + source = "static/images" + target = "assets/images" + [[module.mounts]] + source = 'assets' + target = 'assets' + +[outputs] +home = [ "HTML", "RSS" ] +section = [ "HTML" ] + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true + +[security] + [security.funcs] + getenv = ['^HUGO_', 'TENANT'] diff --git a/site/content/.gitkeep b/site/content/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/site/content/bounties.md b/site/content/bounties.md new file mode 100644 index 000000000..563e40920 --- /dev/null +++ b/site/content/bounties.md @@ -0,0 +1,14 @@ +--- +title: Bounties +layout: bounties +--- + +Below are the active bounties for yuzu. Want to request a bounty? +Message one of our moderators or developers. + +### How does the process work? +Payments are to be sent via Paypal from the requester to the developer who opened the pull request, at the time the pull request has been opened. + +The requester then confirms the feature is complete via the latest version of Canary that has this pull request merged. + +The requester may set additional stipulations on the bounty (noted in the description field(s) below. \ No newline at end of file diff --git a/site/content/donate.md b/site/content/donate.md new file mode 100644 index 000000000..65ec581ab --- /dev/null +++ b/site/content/donate.md @@ -0,0 +1,23 @@ +--- +title: Donations +--- + +Developing an emulator for a modern, complex system like the Nintendo Switch requires significant hard work and dedication from a large team of developers. We will never charge you for yuzu and will always make our source code freely available. We do not make any money from our work, however development has many expenses that are often paid out-of-pocket by our team members, among them + +* Switch consoles to explore and reverse-engineer the hardware +* Switch games for testing, reverse-engineering, and implementing new features +* Web hosting and infrastructure setup +* Software licenses (e.g. Visual Studio, IDA Pro, etc.) +* Additional hardware (e.g. GPUs as-needed to improve rendering support, other peripherals to add support for, etc.) + +Your generous donation will go directly toward providing these to our team. Previous donations have already been used to purchase several Switch consoles, games, and host our current web infrastructure! However, our costs will continue as our team grows, our website grows, and we strive to achieve high game compatibility with yuzu. + +## Donate Now + +We will more than gladly accept a donation! __In particular, donations of Nintendo Switch Hardware that are firmware 3.0.0 or lower are of particular use to the team.__ + +If you’d like to donate, please contact: [donations@yuzu-emu.org](mailto:donations@yuzu-emu.org) + +Alternatively, you can become a Patreon supporter at our [Patreon page](https://www.patreon.com/yuzuteam). + +Thank you for your support! diff --git a/site/content/downloads.md b/site/content/downloads.md new file mode 100644 index 000000000..813b5271c --- /dev/null +++ b/site/content/downloads.md @@ -0,0 +1,68 @@ +--- +title: "Downloads" +layout: "downloads" +FullWidth: true +--- + +

+

Windows Instructions

+
+ +

Windows Installer

+ +The installer will allow you to download your preferred release channel. + +If you are a Patreon subscriber, the "Early Access" channel will be available to you, and will provide early access to exciting experimental changes on top of what is available in the main channel. Please follow our [Early Access guide](https://yuzu-emu.org/help/early-access/) for assistance linking your Patreon account. + +Intel and AMD users are strongly recommended to switch to Vulkan by going to `Emulation > Configure > Graphics > API`. Latest GPU drivers are recommended. +
+ + + +
+

Linux Instructions

+
+
+

We have yuzu as an AppImage and Flatpak now! This relaxes dependency requirements for yuzu, as well as enabling it to run on a lot of older distributions.

+
+
+ +If you prefer to use the Flatpak version, you can download it from the  Flathub. + +To run yuzu as an AppImage, first download it, then add the executable bit from the terminal: + +``` +chmod a+x yuzu-*.AppImage +``` + +Or with the GUI, right click the AppImage, click Properties, then Permissions, then click "Allow this file to run as a program". After that, double-click the AppImage to run it. +
+ +
+

Android Instructions

+
+
+

yuzu requires Android 11 or above.

+
+
+ +
+ + +
diff --git a/site/content/entry/first-games-are-running/banner.png b/site/content/entry/first-games-are-running/banner.png new file mode 100644 index 000000000..716b63556 Binary files /dev/null and b/site/content/entry/first-games-are-running/banner.png differ diff --git a/site/content/entry/first-games-are-running/img1.png b/site/content/entry/first-games-are-running/img1.png new file mode 100644 index 000000000..9593a0179 Binary files /dev/null and b/site/content/entry/first-games-are-running/img1.png differ diff --git a/site/content/entry/first-games-are-running/img2.png b/site/content/entry/first-games-are-running/img2.png new file mode 100644 index 000000000..de5ead3af Binary files /dev/null and b/site/content/entry/first-games-are-running/img2.png differ diff --git a/site/content/entry/first-games-are-running/img3.png b/site/content/entry/first-games-are-running/img3.png new file mode 100644 index 000000000..68ba4a094 Binary files /dev/null and b/site/content/entry/first-games-are-running/img3.png differ diff --git a/site/content/entry/first-games-are-running/img4.png b/site/content/entry/first-games-are-running/img4.png new file mode 100644 index 000000000..e998ca22a Binary files /dev/null and b/site/content/entry/first-games-are-running/img4.png differ diff --git a/site/content/entry/first-games-are-running/index.md b/site/content/entry/first-games-are-running/index.md new file mode 100644 index 000000000..97b0cb0f5 --- /dev/null +++ b/site/content/entry/first-games-are-running/index.md @@ -0,0 +1,68 @@ ++++ +date = "2018-04-15T01:18:00-05:00" +title = "First games are running!" +author = "jmc47" +forum = 15956 ++++ + +A major milestone in yuzu has been reached, as it can now boot a handful of the Nintendo Switch's more primitive games. Don't believe us? Take a look! + + +
+ {{< youtube 1VzyIHMTA2Q >}} +
+ +These changes are now available in the latest [yuzu canary builds](https://yuzu-emu.org/downloads/)! + +Currently, only a few games are confirmed to boot, including: + +* The Binding of Isaac: Afterbirth+ +* Puyo Puyo Tetris +* Cave Story+ + +While these *may* not be the Switch titles that emulation hobbyists are looking forward to digging into, the fact that games are starting to work shows that yuzu is heading in the right direction. That doesn't mean it wasn't a bumpy road to get here, though! + +#### The Challenge Behind Booting Switch Games + +Getting to this point hasn't been easy, and has been a massive reverse-engineering challenge. Led by bunnei and Subv with contributions from ogniK and jroweboy the team slowly chipped away at stopping point after stopping point to finally get us to this milestone. Special thanks to gdkchan and Ryujinx, as without collaboration, this wouldn't have been possible. + +Also, huge thanks to Lioncash and MerryMage, who have been tirelessly working on the ARMv8 JIT that yuzu uses! Without it, we'd still be in the dark ages of interpreted CPU emulation. + +While yuzu is built on top of Citra's kernel infrastructure, a lot of modification had to be done in order to move things over to the Switch's services. But the main issues all had to do with the Switch's GPU. + +Because it's a NVIDIA product, some information was able to be gleamed by sifting through the [Nouveau source](https://en.wikipedia.org/wiki/Nouveau_(software)). Some of the more particularly difficult stopping points were Kernel Synchronization Primitives and Shader Decompilation, but there were many more smaller bumps along the way. On top of that, the rest of the emulator had to be brought up to snuff in order to get games to the point where they would boot. + +In the end, this is a small first step toward proper emulation of Nintendo's exciting console/handheld hybrid. None of the games booting are especially stable and emulation is in a very, very early state. + +#### What does yuzu Require? + +Right now, most games won't run, and the games that do run will run incredibly slow and only get so far before encountering issues. We recommend you have as fast of a processor as possible *and* a GPU that supports OpenGL 4.3 or newer. + +
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +#### What's next? +Currently, yuzu has two major development fronts that are ongoing: First, we are trying to get more games booting further, to the point that they are trying to render frames, and second, to try to emulate the Nvidia Maxwell GPU. Even for simple games such as these, Maxwell emulation has shown to be quite challenging - and we suspect that this will be our biggest focus in the coming months. As always, we welcome newcomers to join our team and help us toward these goals! If you're interested in contributing, please checkout our [Contributing Guide](https://github.com/yuzu-emu/yuzu/blob/master/CONTRIBUTING.md) or [join us on Discord](https://discord.gg/u77vRWY). diff --git a/site/content/entry/first-games-are-running/summary.png b/site/content/entry/first-games-are-running/summary.png new file mode 100644 index 000000000..bb78e20a7 Binary files /dev/null and b/site/content/entry/first-games-are-running/summary.png differ diff --git a/site/content/entry/ldn-is-here/Diablo3_LDN_1.png b/site/content/entry/ldn-is-here/Diablo3_LDN_1.png new file mode 100644 index 000000000..94995c298 Binary files /dev/null and b/site/content/entry/ldn-is-here/Diablo3_LDN_1.png differ diff --git a/site/content/entry/ldn-is-here/Diablo3_LDN_2.png b/site/content/entry/ldn-is-here/Diablo3_LDN_2.png new file mode 100644 index 000000000..cb764c83b Binary files /dev/null and b/site/content/entry/ldn-is-here/Diablo3_LDN_2.png differ diff --git a/site/content/entry/ldn-is-here/PLG_1.png b/site/content/entry/ldn-is-here/PLG_1.png new file mode 100644 index 000000000..431f4bffe Binary files /dev/null and b/site/content/entry/ldn-is-here/PLG_1.png differ diff --git a/site/content/entry/ldn-is-here/PLG_2.png b/site/content/entry/ldn-is-here/PLG_2.png new file mode 100644 index 000000000..106ac13cf Binary files /dev/null and b/site/content/entry/ldn-is-here/PLG_2.png differ diff --git a/site/content/entry/ldn-is-here/PLG_3.png b/site/content/entry/ldn-is-here/PLG_3.png new file mode 100644 index 000000000..738be38b4 Binary files /dev/null and b/site/content/entry/ldn-is-here/PLG_3.png differ diff --git a/site/content/entry/ldn-is-here/PLG_4.png b/site/content/entry/ldn-is-here/PLG_4.png new file mode 100644 index 000000000..efb4d358c Binary files /dev/null and b/site/content/entry/ldn-is-here/PLG_4.png differ diff --git a/site/content/entry/ldn-is-here/Switch_Conn.png b/site/content/entry/ldn-is-here/Switch_Conn.png new file mode 100644 index 000000000..d8b9854ff Binary files /dev/null and b/site/content/entry/ldn-is-here/Switch_Conn.png differ diff --git a/site/content/entry/ldn-is-here/acnh1.jpg b/site/content/entry/ldn-is-here/acnh1.jpg new file mode 100644 index 000000000..b78c3aab3 Binary files /dev/null and b/site/content/entry/ldn-is-here/acnh1.jpg differ diff --git a/site/content/entry/ldn-is-here/acnh2.png b/site/content/entry/ldn-is-here/acnh2.png new file mode 100644 index 000000000..8278a6ba0 Binary files /dev/null and b/site/content/entry/ldn-is-here/acnh2.png differ diff --git a/site/content/entry/ldn-is-here/arceustrade1.png b/site/content/entry/ldn-is-here/arceustrade1.png new file mode 100644 index 000000000..fc5366404 Binary files /dev/null and b/site/content/entry/ldn-is-here/arceustrade1.png differ diff --git a/site/content/entry/ldn-is-here/arceustrade2.png b/site/content/entry/ldn-is-here/arceustrade2.png new file mode 100644 index 000000000..190831b03 Binary files /dev/null and b/site/content/entry/ldn-is-here/arceustrade2.png differ diff --git a/site/content/entry/ldn-is-here/arceustrade3.png b/site/content/entry/ldn-is-here/arceustrade3.png new file mode 100644 index 000000000..4c17ba652 Binary files /dev/null and b/site/content/entry/ldn-is-here/arceustrade3.png differ diff --git a/site/content/entry/ldn-is-here/banner.png b/site/content/entry/ldn-is-here/banner.png new file mode 100644 index 000000000..aa0488892 Binary files /dev/null and b/site/content/entry/ldn-is-here/banner.png differ diff --git a/site/content/entry/ldn-is-here/bdsp_1.png b/site/content/entry/ldn-is-here/bdsp_1.png new file mode 100644 index 000000000..5848cefdb Binary files /dev/null and b/site/content/entry/ldn-is-here/bdsp_1.png differ diff --git a/site/content/entry/ldn-is-here/bdsp_2.png b/site/content/entry/ldn-is-here/bdsp_2.png new file mode 100644 index 000000000..c3adf3cd0 Binary files /dev/null and b/site/content/entry/ldn-is-here/bdsp_2.png differ diff --git a/site/content/entry/ldn-is-here/bdsp_3.png b/site/content/entry/ldn-is-here/bdsp_3.png new file mode 100644 index 000000000..de710d8bf Binary files /dev/null and b/site/content/entry/ldn-is-here/bdsp_3.png differ diff --git a/site/content/entry/ldn-is-here/bdsp_4.png b/site/content/entry/ldn-is-here/bdsp_4.png new file mode 100644 index 000000000..c8e543d52 Binary files /dev/null and b/site/content/entry/ldn-is-here/bdsp_4.png differ diff --git a/site/content/entry/ldn-is-here/compat.png b/site/content/entry/ldn-is-here/compat.png new file mode 100644 index 000000000..733217a9e Binary files /dev/null and b/site/content/entry/ldn-is-here/compat.png differ diff --git a/site/content/entry/ldn-is-here/cowabunga.png b/site/content/entry/ldn-is-here/cowabunga.png new file mode 100644 index 000000000..f2848db84 Binary files /dev/null and b/site/content/entry/ldn-is-here/cowabunga.png differ diff --git a/site/content/entry/ldn-is-here/index.md b/site/content/entry/ldn-is-here/index.md new file mode 100644 index 000000000..cf86b837c --- /dev/null +++ b/site/content/entry/ldn-is-here/index.md @@ -0,0 +1,213 @@ ++++ +date = "2022-09-11T01:40:00+05:30" +title = "New Feature Release - Local Wireless Multiplayer" +author = "CaptV0rt3x" +forum = 622491 ++++ + +Hey there, yuz-ers! +The MOST awaited feature of yuzu, Local Wireless Multiplayer (LDN), is finally here! +So what are you waiting for? +Time to grab your friends and jump right in! + + + +## What is this? + +The Nintendo Switch console supports various multiplayer options. +Among these, the following options are useful when you want to play multiplayer with other Switch consoles. +{{< imgs "./multi.png| Table indicating yuzu's supported Switch multiplayer modes" >}} + +{{< imgs + "./Switch_Conn.png| Graphic demonstrating the key differences between the three wireless modes" +>}} + +

+The Switch's HorizonOS uses the LDN service for all Local Wireless communication.
+This is why Local Wireless Multiplayer can also be referred to as LDN Multiplayer. +

+ +Thanks to the incredible efforts of our developers [FearlessTobi](https://github.com/FearlessTobi) and [german77](https://github.com/german77), Local Wireless Multiplayer in yuzu is no longer a dream! +Special thanks to [spacemeowx2](https://github.com/spacemeowx2/) and [all the contributors](https://github.com/spacemeowx2/ldn_mitm/graphs/contributors) of the [ldn_mitm](https://github.com/spacemeowx2/ldn_mitm) project. +Without their extensive reverse-engineering of the `LDN` service, and the gracious [license exemption](https://github.com/spacemeowx2/ldn_mitm#licensing) for yuzu, this would not have been possible. + +
+
+

⚠️ Attention

+
+

+Currently, Local Wireless Multiplayer (LDN) is only supported between instances of yuzu.
+Multiplayer between yuzu and a real Switch or between yuzu and other emulators is not supported!
+

+ +## Where can you get it? + +The Local Wireless Multiplayer feature is now available in the latest version of the Early Access release. +We will be working to polish this feature and make this available to the Mainline builds soon. + +

+If you're using the yuzu installer, you'll automatically be updated to the latest build.
+If you're not using the yuzu installer, please download it from our Download page.
+
+We highly recommend using our installer to always stay up to date on both Mainline and Early Access builds. +

+ +## Local Wireless (LDN) Multiplayer + +yuzu's Local Wireless multiplayer (LDN) differs a little bit when compared to the Nintendo Switch. +The Switch console uses the `LDN` service to scan for other Switch consoles using Wi-Fi and connects all players. +Here, one player would act as the `host` and all others would connect to it. + +yuzu, on the other hand, employs virtual rooms to allow players to create and join game lobbies within said rooms. +Since this emulates the Switch's ability to do local wireless multiplayer, it does NOT rely on Nintendo’s servers and does NOT require a Nintendo Account. +While on a real Switch, you’d be limited to the people in your immediate vicinity, yuzu boasts a complex server/client infrastructure that forwards a game’s wireless communication across the internet. + +In order to connect with other players, players simply need to join the same room within yuzu’s Public Room Browser. +But, before opening the Public Room Browser, you will have to first configure your network interface in yuzu. + +You can find this setting under `System -> Network` and you need to select your internet connection from the drop-down as shown below. + +{{< imgs "./network_interface.png| yuzu's Network Interface configuration" >}} + +Out of the box, we provide you with an assortment of public rooms hosted across the world by yuzu. +Creating and joining rooms is extremely easy in yuzu and can be done in just a few clicks. + +{{< imgs "./room_browser.png| yuzu's Public Room Browser" >}} + +If you’re a [Verified User](https://community.citra-emu.org/signup), you can create your very own public room for people to join. +These public rooms can be seen by anyone using the Public Room Browser, but you can also password protect them to restrict users' access. +Verified Users will have their forum nickname and profile picture populated in the chatroom. +
+ +
+

⚠️ Reminder

+

+When hosting a room, remember to port forward or your friends won’t be able to connect! +

+ +If you prefer not to sign up for our platform, you aren’t out of luck! +Unverified Users still have the ability to create unlisted rooms, directly connect to unlisted rooms, and can join any yuzu hosted room. + +Do note that Verified Users will have their privileges revoked for violating any yuzu policies while in the room chatroom. +Please respect the `Preferred Game` listed in publicly hosted rooms, as even unrelated games will add to the bandwidth load. + +{{< imgs "./room_chat.png| Public Room chat and moderation features" >}} + +

+You can use these rooms for LAN mode games as well — instead of ZeroTier or Hamachi. +

+ +Please visit [our multiplayer guide](https://yuzu-emu.org/help/feature/multiplayer/) for further help with Hosting, Port Forwarding, Authentication, and Moderation of your publicly hosted rooms. + +## Development + +FearlessTobi began development by leveraging the existing virtual rooms infrastructure from [Citra](https://citra-emu.org). +Due to code similarities between yuzu and Citra, this tried-and-tested infrastructure easily became the foundation of this feature. + +Now that the virtual rooms were taken care of, Tobi moved onto the `LDN` service and its protocols. +Using the research and code from the [ldn_mitm](https://github.com/spacemeowx2/ldn_mitm) project, he implemented the necessary changes for yuzu instances to communicate with each other over these virtual rooms. +During this process, Tobi put an extra emphasis on ensuring no personal data, such as IP addresses, was leaked to the other room members. + +As the feature slowly matured, Tobi began utilizing yuzu's internal team of testers to verify the feature across several titles for compatibility and performance validation. + +With the multiple testing iterations, various bugs and glitches were found. +german77 relied on his own reverse-engineering and hardware tests to debug these issues, which then made it easy for the team to fix these various problems. +He also made several UI fixes to improve its usability and brought the codebase up to yuzu standards. + +## Compatibility + +Please note that as this is the initial release of the feature, some games may have some limitations. +We hope to slowly fix these over the course of the next few months. + +yuzu's Local Wireless Multiplayer was tested by our team of Testers and Support staff across a small set of popular titles. Their compatibility findings are as follows: + +{{< imgs "./compat.png| List of yuzu-tested multiplayer titles" >}} + + +## Screenshots + +{{< single-title-imgs + "Animal Crossing: New Horizons" + "./acnh1.jpg" + "./acnh2.png" +>}} + +{{< single-title-imgs + "Splatoon 2" + "./splatoon2_1.png" + "./splatoon2_3.png" + "./splatoon2_2.png" +>}} + +{{< single-title-imgs + "Mario Kart 8 Deluxe" + "./mk8d_1.png" + "./mk8d_2.png" +>}} + +{{< single-title-imgs + "Pokémon Legends: Arceus" + "./arceustrade1.png" + "./arceustrade2.png" + "./arceustrade3.png" +>}} + +{{< single-title-imgs + "Luigi's Mansion 3" + "./lm3_1.png" + "./lm3_2.png" +>}} + +{{< single-title-imgs + "Super Mario Smash Bros. Ultimate" + "./ssbu_ldn_2.png" + "./ssbu_ldn_3.png" + "./ssbu_ldn_1.png" +>}} + +{{< imgs + "./PLG_1.png|" + "./PLG_2.png|" +>}} + +{{< single-title-imgs + "Pokémon Let's Go: Pikachu/Eevee" + "./PLG_3.png" + "./PLG_4.png" +>}} + +{{< imgs + "./bdsp_1.png|" + "./bdsp_2.png|" +>}} + +{{< single-title-imgs + "Pokémon Brilliant Diamond/Shining Pearl" + "./bdsp_3.png" + "./bdsp_4.png" +>}} + +{{< single-title-imgs + "Diablo III : Eternal Collection" + "./Diablo3_LDN_1.png" + "./Diablo3_LDN_2.png" +>}} + +{{< imgs + "./cowabunga.png| Teenage Mutant Ninja Turtles: The Cowabunga Collection" + "./monster_hunter_ultimate.png| Monster Hunter Generations Ultimate" + "./kirby_dream_buffet.png| Kirby's Dream Buffet" +>}} + + +## Fin + +As with any new update, we've tested the feature internally, but our efforts can't compare to the community as a whole. +We could have easily missed an edge case or some weird bug or issue among the vast collection of games with Local Wireless. + +Test any and all games! Poke, prod, and play! Please break this release if you can! With your help, we can make yuzu the best it can be. +Please reach out to us on our [Discord](https://discord.gg/u77vRWY) and report any bugs you find, so that we can quickly address them. + +That's all we have for now, until next time! Happy emulating!

+ +{{< article-end >}} diff --git a/site/content/entry/ldn-is-here/kirby_dream_buffet.png b/site/content/entry/ldn-is-here/kirby_dream_buffet.png new file mode 100644 index 000000000..d71a870f8 Binary files /dev/null and b/site/content/entry/ldn-is-here/kirby_dream_buffet.png differ diff --git a/site/content/entry/ldn-is-here/lm3_1.png b/site/content/entry/ldn-is-here/lm3_1.png new file mode 100644 index 000000000..4c663ba79 Binary files /dev/null and b/site/content/entry/ldn-is-here/lm3_1.png differ diff --git a/site/content/entry/ldn-is-here/lm3_2.png b/site/content/entry/ldn-is-here/lm3_2.png new file mode 100644 index 000000000..2f0762bbe Binary files /dev/null and b/site/content/entry/ldn-is-here/lm3_2.png differ diff --git a/site/content/entry/ldn-is-here/mk8d_1.png b/site/content/entry/ldn-is-here/mk8d_1.png new file mode 100644 index 000000000..6cbcaf21e Binary files /dev/null and b/site/content/entry/ldn-is-here/mk8d_1.png differ diff --git a/site/content/entry/ldn-is-here/mk8d_2.png b/site/content/entry/ldn-is-here/mk8d_2.png new file mode 100644 index 000000000..544fc5e84 Binary files /dev/null and b/site/content/entry/ldn-is-here/mk8d_2.png differ diff --git a/site/content/entry/ldn-is-here/monster_hunter_ultimate.png b/site/content/entry/ldn-is-here/monster_hunter_ultimate.png new file mode 100644 index 000000000..31ec66241 Binary files /dev/null and b/site/content/entry/ldn-is-here/monster_hunter_ultimate.png differ diff --git a/site/content/entry/ldn-is-here/multi.png b/site/content/entry/ldn-is-here/multi.png new file mode 100644 index 000000000..325f6e6ea Binary files /dev/null and b/site/content/entry/ldn-is-here/multi.png differ diff --git a/site/content/entry/ldn-is-here/network_interface.png b/site/content/entry/ldn-is-here/network_interface.png new file mode 100644 index 000000000..ff2d473ab Binary files /dev/null and b/site/content/entry/ldn-is-here/network_interface.png differ diff --git a/site/content/entry/ldn-is-here/room_browser.png b/site/content/entry/ldn-is-here/room_browser.png new file mode 100644 index 000000000..b954bd35c Binary files /dev/null and b/site/content/entry/ldn-is-here/room_browser.png differ diff --git a/site/content/entry/ldn-is-here/room_chat.png b/site/content/entry/ldn-is-here/room_chat.png new file mode 100644 index 000000000..0c8a1082e Binary files /dev/null and b/site/content/entry/ldn-is-here/room_chat.png differ diff --git a/site/content/entry/ldn-is-here/splatoon2_1.png b/site/content/entry/ldn-is-here/splatoon2_1.png new file mode 100644 index 000000000..b65d3b07c Binary files /dev/null and b/site/content/entry/ldn-is-here/splatoon2_1.png differ diff --git a/site/content/entry/ldn-is-here/splatoon2_2.png b/site/content/entry/ldn-is-here/splatoon2_2.png new file mode 100644 index 000000000..ac42a0710 Binary files /dev/null and b/site/content/entry/ldn-is-here/splatoon2_2.png differ diff --git a/site/content/entry/ldn-is-here/splatoon2_3.png b/site/content/entry/ldn-is-here/splatoon2_3.png new file mode 100644 index 000000000..c9ada6f4f Binary files /dev/null and b/site/content/entry/ldn-is-here/splatoon2_3.png differ diff --git a/site/content/entry/ldn-is-here/ssbu_ldn_1.png b/site/content/entry/ldn-is-here/ssbu_ldn_1.png new file mode 100644 index 000000000..8f7cf4515 Binary files /dev/null and b/site/content/entry/ldn-is-here/ssbu_ldn_1.png differ diff --git a/site/content/entry/ldn-is-here/ssbu_ldn_2.png b/site/content/entry/ldn-is-here/ssbu_ldn_2.png new file mode 100644 index 000000000..6d9e3bb59 Binary files /dev/null and b/site/content/entry/ldn-is-here/ssbu_ldn_2.png differ diff --git a/site/content/entry/ldn-is-here/ssbu_ldn_3.png b/site/content/entry/ldn-is-here/ssbu_ldn_3.png new file mode 100644 index 000000000..7ca5d0f0d Binary files /dev/null and b/site/content/entry/ldn-is-here/ssbu_ldn_3.png differ diff --git a/site/content/entry/ldn-is-here/summary.png b/site/content/entry/ldn-is-here/summary.png new file mode 100644 index 000000000..afbebd3f0 Binary files /dev/null and b/site/content/entry/ldn-is-here/summary.png differ diff --git a/site/content/entry/test-post/banner.png b/site/content/entry/test-post/banner.png new file mode 100644 index 000000000..726ad1178 Binary files /dev/null and b/site/content/entry/test-post/banner.png differ diff --git a/site/content/entry/test-post/index.md b/site/content/entry/test-post/index.md new file mode 100644 index 000000000..e6e57f91c --- /dev/null +++ b/site/content/entry/test-post/index.md @@ -0,0 +1,19 @@ ++++ +date = "2018-03-22T22:18:00-05:00" +title = "Placeholder" +author = "flamesage" +forum = 8 +draft = true ++++ + +This is just a placeholder blog post. + +New line. + +Test line. + +Test *italics*. + +Test **bold**. + +Test [link](//google.com). diff --git a/site/content/entry/yuzu-android/acnh.png b/site/content/entry/yuzu-android/acnh.png new file mode 100644 index 000000000..34b413125 Binary files /dev/null and b/site/content/entry/yuzu-android/acnh.png differ diff --git a/site/content/entry/yuzu-android/acnh2.png b/site/content/entry/yuzu-android/acnh2.png new file mode 100644 index 000000000..8d3f84baa Binary files /dev/null and b/site/content/entry/yuzu-android/acnh2.png differ diff --git a/site/content/entry/yuzu-android/arceus.png b/site/content/entry/yuzu-android/arceus.png new file mode 100644 index 000000000..178988431 Binary files /dev/null and b/site/content/entry/yuzu-android/arceus.png differ diff --git a/site/content/entry/yuzu-android/arceus2.png b/site/content/entry/yuzu-android/arceus2.png new file mode 100644 index 000000000..6aa442b2e Binary files /dev/null and b/site/content/entry/yuzu-android/arceus2.png differ diff --git a/site/content/entry/yuzu-android/atelier_ryza_1.png b/site/content/entry/yuzu-android/atelier_ryza_1.png new file mode 100644 index 000000000..b499ba9ac Binary files /dev/null and b/site/content/entry/yuzu-android/atelier_ryza_1.png differ diff --git a/site/content/entry/yuzu-android/atelier_ryza_2.png b/site/content/entry/yuzu-android/atelier_ryza_2.png new file mode 100644 index 000000000..1dc07f7db Binary files /dev/null and b/site/content/entry/yuzu-android/atelier_ryza_2.png differ diff --git a/site/content/entry/yuzu-android/banner.png b/site/content/entry/yuzu-android/banner.png new file mode 100644 index 000000000..68fd29b2e Binary files /dev/null and b/site/content/entry/yuzu-android/banner.png differ diff --git a/site/content/entry/yuzu-android/botw.png b/site/content/entry/yuzu-android/botw.png new file mode 100644 index 000000000..e12a9aa33 Binary files /dev/null and b/site/content/entry/yuzu-android/botw.png differ diff --git a/site/content/entry/yuzu-android/botw_adreno.png b/site/content/entry/yuzu-android/botw_adreno.png new file mode 100644 index 000000000..f0275f2ab Binary files /dev/null and b/site/content/entry/yuzu-android/botw_adreno.png differ diff --git a/site/content/entry/yuzu-android/d3_1.png b/site/content/entry/yuzu-android/d3_1.png new file mode 100644 index 000000000..4d221cf8c Binary files /dev/null and b/site/content/entry/yuzu-android/d3_1.png differ diff --git a/site/content/entry/yuzu-android/d3_2.png b/site/content/entry/yuzu-android/d3_2.png new file mode 100644 index 000000000..306bbf8f0 Binary files /dev/null and b/site/content/entry/yuzu-android/d3_2.png differ diff --git a/site/content/entry/yuzu-android/dkctf.png b/site/content/entry/yuzu-android/dkctf.png new file mode 100644 index 000000000..88d205b25 Binary files /dev/null and b/site/content/entry/yuzu-android/dkctf.png differ diff --git a/site/content/entry/yuzu-android/dkctf2.png b/site/content/entry/yuzu-android/dkctf2.png new file mode 100644 index 000000000..c14c4cbb9 Binary files /dev/null and b/site/content/entry/yuzu-android/dkctf2.png differ diff --git a/site/content/entry/yuzu-android/dread.png b/site/content/entry/yuzu-android/dread.png new file mode 100644 index 000000000..a01da5c15 Binary files /dev/null and b/site/content/entry/yuzu-android/dread.png differ diff --git a/site/content/entry/yuzu-android/dread2.png b/site/content/entry/yuzu-android/dread2.png new file mode 100644 index 000000000..210b2a390 Binary files /dev/null and b/site/content/entry/yuzu-android/dread2.png differ diff --git a/site/content/entry/yuzu-android/fe_engage.png b/site/content/entry/yuzu-android/fe_engage.png new file mode 100644 index 000000000..58dafc05d Binary files /dev/null and b/site/content/entry/yuzu-android/fe_engage.png differ diff --git a/site/content/entry/yuzu-android/fe_engage2.png b/site/content/entry/yuzu-android/fe_engage2.png new file mode 100644 index 000000000..e47df19c5 Binary files /dev/null and b/site/content/entry/yuzu-android/fe_engage2.png differ diff --git a/site/content/entry/yuzu-android/gpu_driver_install.png b/site/content/entry/yuzu-android/gpu_driver_install.png new file mode 100644 index 000000000..6a4ecbc04 Binary files /dev/null and b/site/content/entry/yuzu-android/gpu_driver_install.png differ diff --git a/site/content/entry/yuzu-android/graphics_settings.png b/site/content/entry/yuzu-android/graphics_settings.png new file mode 100644 index 000000000..1c050001a Binary files /dev/null and b/site/content/entry/yuzu-android/graphics_settings.png differ diff --git a/site/content/entry/yuzu-android/index.md b/site/content/entry/yuzu-android/index.md new file mode 100644 index 000000000..ea0bca68d --- /dev/null +++ b/site/content/entry/yuzu-android/index.md @@ -0,0 +1,392 @@ ++++ +date = "2023-05-30T00:00:00+05:30" +title = "New Platform Release - yuzu on Android" +author = "CaptV0rt3x" +coauthor = "GoldenX86" +forum = 817979 ++++ + +Hey there, yuz-ers! +We are happy to announce that yuzu is available, today, for Android! +There's so much to discuss and show you, let's get started! + + +  + + +# Where do I get it? + +If you're too excited, you can jump in immediately by downloading yuzu from the Google Play Store!
+ +
+
+

Download yuzu for free, or support us and receive some fantastic benefits with Early Access.

+
+
+
+ + +
+
+
+ +The GitHub releases aren't live yet, but we will edit this article with a link to download them once they are. +This initial release won't have parity with the feature-rich Desktop builds of yuzu, but we are looking forward to introducing all the features you love as we fine-tune them for Android. + +
+
+

⚠️ Update

+
+

+Standalone GitHub releases are now available here. + +

+ +Features such as multiplayer over LAN/LDN, Input Profiles, TAS, etc. are not yet available. +For now, we want to focus on compatibility and performance as performing cutting-edge emulation on typical Android hardware has several challenges. + +If you're still reading, make sure to stick around for a little development history, expectations, and compatibility reports! + +{{< single-title-imgs-compare + "Breath of the Wild (Samsung Galaxy S20 FE, Mesa Turnip GPU driver Vs. Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "./botw.png" + "./botw_adreno.png" +>}} + +# Why? + +In the past year, we have made significant strides in improving both the accuracy and performance of yuzu. +And with many more such improvements in progress, we understood that the longer we waited, the more challenging it would become for us to support an Android build. + +With this public release, all future yuzu development activities will account for, and address, both feature and platform compatibility for Android. +This is expected to help facilitate and streamline our development process to better achieve our goal of platform independence. + +We hope to welcome Android developers interested in lending their expertise to a cutting-edge project and produce new yuzu features, optimizations, and other improvements! + +{{< imgs + "skyrim.png| You're finally awake! yuzu on Android launched! (Samsung Galaxy S20 FE, Mesa Turnip GPU driver)" +>}} + + +# State of things: Where are we? What can users expect? + +Before we talk more about where we are and what users can expect, we would like to make a few things clear: + +* We're committed to improving the feature parity, compatibility, and performance of our Android builds; most improvements for desktop platforms, like Windows and Linux, will also help improve our Android users' experience. + +* yuzu Android is in rapid development and early builds should be considered akin to a beta. + +* Expect to see a variety of results regarding compatibility and performance on different devices, discussed in more detail later. + +With that out of the way, let's dive into the state of things for yuzu Android. + + +## Some background + +Like our sister project, Citra, yuzu has always been developed with multi-platform support in mind. +We've supported major desktop operating systems, such as Windows and Linux, since the earliest builds of yuzu. +yuzu's core code has, by design, been kept modular and frontend agnostic to ensure any future efforts to expand supported platforms does not run into unwanted dependency issues. + +Although we originally couldn't support macOS due to Apple deprecating OpenGL support on it, there has been a recent rekindling of efforts to support macOS using MoltenVK — and it so happens that the new Macs are powered by 64-bit ARM-based Apple Silicon (M1/M2, at the time of writing) SoCs (System-on-Chip). +But then we faced another hurdle — Dynarmic's lack of host recompilation support for ARM64. + +In case you weren't aware, yuzu uses [Dynarmic](https://github.com/merryhime/dynarmic) for its CPU emulation. +Dynarmic works by recompiling (translating) the Nintendo Switch's (guest) ARM CPU instructions to the user's (host) CPU. +And because Dynarmic didn't yet support recompiling guest code for ARM64, yuzu's CPU emulation couldn't work on any of these host CPUs. + +Thanks to the efforts of [byte[]](https://github.com/liamwhite) and [merryhime](https://github.com/merryhime), this hurdle didn't stand in our way for too long. +With ARM64 host support ready to go, byte[] set his sights on getting yuzu to work on macOS. +But that's a story for another day. + +By the way, did you know that there are other platforms that use ARM64 SoCs extensively? + + +## Bringing yuzu to Android + +Knowing that Dynarmic support for ARM64 host recompilation was underway and that Vulkan support on Android would probably be better than macOS, we were optimistic about getting yuzu working on Android. + +[flTobi](https://github.com/FearlessTobi) and [bunnei](https://github.com/bunnei) quickly started putting things together, with the first goal to simply get yuzu building for Android. +These early builds lacked a working renderer to display graphics, but progress was promising. +After some fixes, they got a few 32-bit games such as `Mario Kart 8 Deluxe` and `Captain Toad: Treasure Tracker` booting with just the audio. + +Once the Dynarmic ARM64 support was completed, byte[] joined them and the trio got working on getting the Vulkan renderer backend working on Android. +While OpenGL ES didn't pan out, bunnei was able to get yuzu to render basic homebrew on Android with Vulkan: + +{{< single-title-imgs + " " + "./proto1.png" + "./proto2.png" +>}} + +{{< single-title-imgs + "Snake, try to remember the basics of rendering" + "./proto3.png" + "./proto4.png" +>}} + +With our lead moderator [Flamboyant Ham](https://github.com/Schplee) working on a new input overlay design and app themes, [german77](https://github.com/german77) started working with them on integrating the input backend to the touch-screen overlay. +As a sudden surprise for us, developer [t895](https://github.com/t895), who's been improving [Dolphin's](https://github.com/dolphin-emu/dolphin) Android app, accepted our request and joined the team to work on overhauling our app UI. + +{{< single-title-imgs + "Peruse our settings and customize as you see fit!" + "./ui1.png" + "./ui2.png" + "./ui3.png" +>}} + +Together, with Flamboyant Ham creating the designs and t895 working his dev magic, an onboarding process and search menu were added, helping users select their keys, games folder, and search for titles with ease! + +{{< single-title-imgs + "Simple and straightforward - our favorite!" + "./intro1.png" + "./intro2.png" + "./search.png" +>}} + +Special thanks to the Citra GPU dev, [GPUCode](https://github.com/GPUCode), for taking their time away from Citra Android and Vulkan development to improve this release with their special sauce {{< gh-hovercard "9973" "Async Presentation" >}}. + +# What to expect? + +Android is a platform that boasts a huge userbase, but brings with it its fair share of problems. +As there is a lot of hardware variation for Android devices, compatibility and performance will vary. +So, to temper expectations, we would like to clarify our minimum requirements for the near future. + +## Hardware requirements + +At the moment, yuzu requires devices powered by Qualcomm Snapdragon SoCs which have Adreno GPUs. +Devices powered by SoCs like Exynos, Mediatek, etc. are expected to not work at all due to their "worse-than-Adreno" GPU drivers, at least for the near future. + +
+
+

⚠️ Update

+
+

+yuzu now supports Xclipse based and Mali G-series based SoC GPUs. +

+ +Also, yuzu on Android has high RAM requirements, therefore fairly high-end devices provide the best experience (e.g. SD 865 and 8GB of RAM or better). + +yuzu on Android ships with the ability to run custom GPU drivers, such as newer official Adreno drivers, or [Turnip](https://docs.mesa3d.org/drivers/freedreno.html) using [libadrenotools](https://github.com/bylaws/libadrenotools) to improve the performance on older generation Snapdragon SoCs. +Apart from this, there are still many more Android-specific optimizations to be done. +We have plenty of opportunity to improve performance, but this explains the current high minimum system requirements. + +This initial release has been intentionally kept fairly minimal so that we can focus on improving performance and stability. +As stated earlier, feature parity with our PC builds is something we're committed to, but expect it to happen slowly and not immediately. + +## Performance and Compatibility + +Regarding software requirements, yuzu requires Android 11 or newer and a myriad of mandatory Vulkan extensions that the Play Store will automatically check for. +That being said, the Android GPU driver ecosystem is very inconsistent; not all devices will be the same. +Being able to download and install yuzu doesn't mean the performance or compatibility will be great. +As expected, Qualcomm is (currently) king here. + +All Qualcomm device users will have the option to test different Mesa Turnip driver versions, thanks to [libadrenotools](https://github.com/bylaws/libadrenotools). +We will link them in our [Discord server](https://discord.gg/u77vRWY). You can download any compatible drivers, and select them by going to `Settings > Install GPU Driver > Install` in yuzu. + +{{< imgs + "./gpu_driver_install.png| Just tap on Install!" +>}} + +The latest is not always better, and specific games may prefer specific drivers. + +Currently, the best compatibility is achieved using Adreno 600 series GPUs running the Mesa Turnip drivers. +If you want games to start and render correctly, this is the way to go. + +The best performance comes from Adreno 700 series hardware (Snapdragon 8 Gen 1 and newer), which won't have Turnip support for a while. +While performance is typically higher, you will experience rendering issues or some games refusing to start. + +
+
+

⚠️ Update

+
+

+Current Turnip drivers provide good support for both Adreno 600 and 700 series hardware, but performance is still better with official Qualcomm drivers in the few games that render correctly with them. +

+ +With that said, take a look at some performance numbers from several games: + +{{< imgs + "./performance.png| Not too shabby for a first release!" +>}} + +We think that devices with Exynos 2200 and newer SoCs running AMD RDNA2 GPUs could also work well, but we haven’t been able to test them out due to how hard they are to find. + +
+
+

⚠️ Update

+
+

+Samsung's Xclipse 900 series GPUs are perfectly usable now. +

+ +Available information suggests they run some older form of the AMD proprietary driver, so support may be somewhat good knowing AMD's track record. + +Regardless of the device, disabling `Docked mode` and/or using lower resolution multipliers can help with performance in most games. +However, your mileage will vary here. +Some games may prefer docked mode, and some drivers don't play well with resolution multipliers under 1x. +You'll have to test and see what works for you! + +{{< single-title-imgs + "We're still figuring out what the best settings are for each game, so please experiment!" + "./graphics_settings.png" + "./system_settings.png" +>}} + +Cooling is an important factor of performance as well. +We tested several devices with the Snapdragon 8 Gen 2 SoC, and while a gaming-oriented Redmagic 8 Pro had no problems keeping its clock speeds high (even locked to maximum) and temperatures low, a regular Samsung Galaxy S23, on the other hand, is a boiling machine, climbing to 90°C in seconds. +This temperature won't damage the device, as TjMax is at 100°C, but higher temperatures do lead to lower clock speeds. + +{{< imgs + "./pokemon_sword_cpu_usage.png| Hand warmer included (Pokémon Sword)" +>}} + +Overheating leading to thermal throttling can result in a 30-50% performance loss over time, so this is one of the few times when gamer-gimmick marketing isn't lying. + +Regarding other specs, RAM is crucial. +The recommended value is 8GB or more, big emphasis on more, and the absolute minimum is 6GB, but this will lead to many resource intensive games crashing. +`The Legend of Zelda: Tears of the Kingdom` requires 12GB at the moment. + +Storage is not a critical aspect, but keep in mind that Switch games are typically large — there are visual novels over 20GB, and that's not counting updates and DLC. + +Controller input support is in its early stages. +The ability to configure multiple controllers and their button mappings is currently being worked on, but not yet ready. +Xbox, PlayStation, and Switch Pro controllers are automatically mapped when they are paired over Bluetooth. +Generic DirectInput controllers are supported, but until more development time is spent dedicated to them, you may see some mapping issues and potentially missing mappings for buttons. +Joy-Cons are not supported for now, Android doesn't allow access to them so they will have missing functionality. + +An on-screen input overlay will always be available, and it can be hidden while playing. +Swipe from the left side of the screen and toggle `Input Overlay > Show Overlay` if you want to disable it. +The Button and Stick placements can be adjusted here as well. + +{{< single-title-imgs + "Adjust to your liking" + "./input1.png" + "./input2.png" + "./input3.png" +>}} + + +# Setup guide + +If you need help setting up yuzu, our [Quickstart Guide](https://yuzu-emu.org/help/quickstart/) will provide all the steps required to get up and running. +All the same requirements apply, including having a PC and the mandatory hacked Nintendo Switch. +The yuzu on Android onboarding process will have you select the location of your `prod.keys` file. + +The only major difference is that the yuzu folder is located in `Android/data/org.yuzu.yuzu_emu/files`, which you will need access to in order to install Switch firmware files and any preferred mods. +A quick-and-easy management interface for DLC, updates, mods, and saves will be added at a later date, so for those who dare, the process must be done manually for now (or copied from your PC installation of yuzu). + +In recent Android versions, Google started blocking access to app folders in file managers, so it is recommended to instead use Android's integrated file manager to access the yuzu folder. Here is a link to an app that allows users to have [direct access to it](https://play.google.com/store/apps/details?id=com.marc.files). + +Alternatively, you can always connect the phone/tablet to your PC via USB cable. No restrictions apply there. + + +# Conclusion + +And there you have it! +We're excited for the opportunity that Android provides us, to hear all of your feedback, and we hope you enjoy playing! + +{{< imgs + "./totk.png| The Legend of Zelda: Tears of the Kingdom" +>}} + +We don't have anything else to talk about for now, but please enjoy the below selection of screenshots taken from yuzu on Android! + +# Media + +{{< single-title-imgs + "The Legend of Zelda: Tears of the Kingdom (Samsung Galaxy S20 FE, Qualcomm proprietary GPU driver)" + "totk_qcom.png" + "totk_qcom2.png" +>}} + +{{< single-title-imgs + "Super Smash Bros. Ultimate (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "ssmb.png" + "ssmb2.png" +>}} + +{{< single-title-imgs + "Mario Kart 8 Deluxe (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "mk1.png" + "mk2.png" +>}} + +{{< single-title-imgs + "Super Mario Odyssey (Samsung Galaxy S20 FE, Mesa Turnip GPU driver)" + "smo1.png" + "smo2.png" +>}} + +{{< single-title-imgs + "Animal Crossing: New Horizons (Samsung Galaxy S20 FE, Mesa Turnip GPU driver)" + "acnh.png" + "acnh2.png" +>}} + +{{< imgs + "tloz-awakening.png| The Legend of Zelda: Link's Awakening (Samsum Galaxy S23, Qualcomm proprietary GPU driver)" +>}} + +{{< imgs + "tloz-ss.png| The Legend of Zelda: Skyward Sword HD (Samsung Galaxy S20 FE, Mesa Turnip GPU driver)" +>}} + +{{< single-title-imgs + "Donkey Kong Country: Tropical Freeze (Samsung Galaxy S20 FE, Mesa Turnip GPU driver)" + "dkctf.png" + "dkctf2.png" +>}} + +{{< single-title-imgs + "Fire Emblem Engage (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "fe_engage.png" + "fe_engage2.png" +>}} + +{{< single-title-imgs + "Metroid Dread (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "dread.png" + "dread2.png" +>}} + +{{< imgs + "pokemon-shield.png| Pokémon Sword (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" +>}} + +{{< single-title-imgs + "Pokemon Legends: Arceus (Samsung Galaxy S20 FE, Turnip GPU driver)" + "arceus.png" + "arceus2.png" +>}} + +{{< single-title-imgs + "Super Mario 3D World + Bowser's Fury (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "sm3d_1.png" + "sm3d_2.png" +>}} + +{{< single-title-imgs + "Atelier Ryza: Ever Darkness & the Secret Hideout (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "atelier_ryza_1.png" + "atelier_ryza_2.png" +>}} + +{{< single-title-imgs + "Diablo III: Eternal Collection (Samsung Galaxy S23, Qualcomm proprietary GPU driver)" + "d3_1.png" + "d3_2.png" +>}} + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} diff --git a/site/content/entry/yuzu-android/input1.png b/site/content/entry/yuzu-android/input1.png new file mode 100644 index 000000000..b103088c4 Binary files /dev/null and b/site/content/entry/yuzu-android/input1.png differ diff --git a/site/content/entry/yuzu-android/input2.png b/site/content/entry/yuzu-android/input2.png new file mode 100644 index 000000000..601c79bb0 Binary files /dev/null and b/site/content/entry/yuzu-android/input2.png differ diff --git a/site/content/entry/yuzu-android/input3.png b/site/content/entry/yuzu-android/input3.png new file mode 100644 index 000000000..8e587781a Binary files /dev/null and b/site/content/entry/yuzu-android/input3.png differ diff --git a/site/content/entry/yuzu-android/intro1.png b/site/content/entry/yuzu-android/intro1.png new file mode 100644 index 000000000..938a37965 Binary files /dev/null and b/site/content/entry/yuzu-android/intro1.png differ diff --git a/site/content/entry/yuzu-android/intro2.png b/site/content/entry/yuzu-android/intro2.png new file mode 100644 index 000000000..337b65006 Binary files /dev/null and b/site/content/entry/yuzu-android/intro2.png differ diff --git a/site/content/entry/yuzu-android/mk1.png b/site/content/entry/yuzu-android/mk1.png new file mode 100644 index 000000000..2d0a2803d Binary files /dev/null and b/site/content/entry/yuzu-android/mk1.png differ diff --git a/site/content/entry/yuzu-android/mk2.png b/site/content/entry/yuzu-android/mk2.png new file mode 100644 index 000000000..622b38fe5 Binary files /dev/null and b/site/content/entry/yuzu-android/mk2.png differ diff --git a/site/content/entry/yuzu-android/performance.png b/site/content/entry/yuzu-android/performance.png new file mode 100644 index 000000000..00551c365 Binary files /dev/null and b/site/content/entry/yuzu-android/performance.png differ diff --git a/site/content/entry/yuzu-android/pokemon-shield.png b/site/content/entry/yuzu-android/pokemon-shield.png new file mode 100644 index 000000000..6e70e127a Binary files /dev/null and b/site/content/entry/yuzu-android/pokemon-shield.png differ diff --git a/site/content/entry/yuzu-android/pokemon_sword_cpu_usage.png b/site/content/entry/yuzu-android/pokemon_sword_cpu_usage.png new file mode 100644 index 000000000..1b8128876 Binary files /dev/null and b/site/content/entry/yuzu-android/pokemon_sword_cpu_usage.png differ diff --git a/site/content/entry/yuzu-android/proto1.png b/site/content/entry/yuzu-android/proto1.png new file mode 100644 index 000000000..e4dcedb6f Binary files /dev/null and b/site/content/entry/yuzu-android/proto1.png differ diff --git a/site/content/entry/yuzu-android/proto2.png b/site/content/entry/yuzu-android/proto2.png new file mode 100644 index 000000000..6804e4399 Binary files /dev/null and b/site/content/entry/yuzu-android/proto2.png differ diff --git a/site/content/entry/yuzu-android/proto3.png b/site/content/entry/yuzu-android/proto3.png new file mode 100644 index 000000000..769143f2b Binary files /dev/null and b/site/content/entry/yuzu-android/proto3.png differ diff --git a/site/content/entry/yuzu-android/proto4.png b/site/content/entry/yuzu-android/proto4.png new file mode 100644 index 000000000..26ad7f25a Binary files /dev/null and b/site/content/entry/yuzu-android/proto4.png differ diff --git a/site/content/entry/yuzu-android/search.png b/site/content/entry/yuzu-android/search.png new file mode 100644 index 000000000..68da593c4 Binary files /dev/null and b/site/content/entry/yuzu-android/search.png differ diff --git a/site/content/entry/yuzu-android/skyrim.png b/site/content/entry/yuzu-android/skyrim.png new file mode 100644 index 000000000..b44ad4bae Binary files /dev/null and b/site/content/entry/yuzu-android/skyrim.png differ diff --git a/site/content/entry/yuzu-android/sm3d_1.png b/site/content/entry/yuzu-android/sm3d_1.png new file mode 100644 index 000000000..6ce67ffd0 Binary files /dev/null and b/site/content/entry/yuzu-android/sm3d_1.png differ diff --git a/site/content/entry/yuzu-android/sm3d_2.png b/site/content/entry/yuzu-android/sm3d_2.png new file mode 100644 index 000000000..c58f53536 Binary files /dev/null and b/site/content/entry/yuzu-android/sm3d_2.png differ diff --git a/site/content/entry/yuzu-android/smo1.png b/site/content/entry/yuzu-android/smo1.png new file mode 100644 index 000000000..1c5f98d7c Binary files /dev/null and b/site/content/entry/yuzu-android/smo1.png differ diff --git a/site/content/entry/yuzu-android/smo2.png b/site/content/entry/yuzu-android/smo2.png new file mode 100644 index 000000000..99b4d1ce4 Binary files /dev/null and b/site/content/entry/yuzu-android/smo2.png differ diff --git a/site/content/entry/yuzu-android/ssmb.png b/site/content/entry/yuzu-android/ssmb.png new file mode 100644 index 000000000..16ddcf503 Binary files /dev/null and b/site/content/entry/yuzu-android/ssmb.png differ diff --git a/site/content/entry/yuzu-android/ssmb2.png b/site/content/entry/yuzu-android/ssmb2.png new file mode 100644 index 000000000..f5d76241d Binary files /dev/null and b/site/content/entry/yuzu-android/ssmb2.png differ diff --git a/site/content/entry/yuzu-android/summary.png b/site/content/entry/yuzu-android/summary.png new file mode 100644 index 000000000..52249f66a Binary files /dev/null and b/site/content/entry/yuzu-android/summary.png differ diff --git a/site/content/entry/yuzu-android/svg/early_access.svg b/site/content/entry/yuzu-android/svg/early_access.svg new file mode 100644 index 000000000..3bc268b25 --- /dev/null +++ b/site/content/entry/yuzu-android/svg/early_access.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/content/entry/yuzu-android/svg/mainline.svg b/site/content/entry/yuzu-android/svg/mainline.svg new file mode 100644 index 000000000..a4bef14ea --- /dev/null +++ b/site/content/entry/yuzu-android/svg/mainline.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/site/content/entry/yuzu-android/system_settings.png b/site/content/entry/yuzu-android/system_settings.png new file mode 100644 index 000000000..2bfa4b5b1 Binary files /dev/null and b/site/content/entry/yuzu-android/system_settings.png differ diff --git a/site/content/entry/yuzu-android/tloz-awakening.png b/site/content/entry/yuzu-android/tloz-awakening.png new file mode 100644 index 000000000..c889b0925 Binary files /dev/null and b/site/content/entry/yuzu-android/tloz-awakening.png differ diff --git a/site/content/entry/yuzu-android/tloz-ss.png b/site/content/entry/yuzu-android/tloz-ss.png new file mode 100644 index 000000000..0589af569 Binary files /dev/null and b/site/content/entry/yuzu-android/tloz-ss.png differ diff --git a/site/content/entry/yuzu-android/totk.png b/site/content/entry/yuzu-android/totk.png new file mode 100644 index 000000000..cca11a935 Binary files /dev/null and b/site/content/entry/yuzu-android/totk.png differ diff --git a/site/content/entry/yuzu-android/totk_qcom.png b/site/content/entry/yuzu-android/totk_qcom.png new file mode 100644 index 000000000..6566d84ca Binary files /dev/null and b/site/content/entry/yuzu-android/totk_qcom.png differ diff --git a/site/content/entry/yuzu-android/totk_qcom2.png b/site/content/entry/yuzu-android/totk_qcom2.png new file mode 100644 index 000000000..9b681c006 Binary files /dev/null and b/site/content/entry/yuzu-android/totk_qcom2.png differ diff --git a/site/content/entry/yuzu-android/ui1.png b/site/content/entry/yuzu-android/ui1.png new file mode 100644 index 000000000..8c8cf6a98 Binary files /dev/null and b/site/content/entry/yuzu-android/ui1.png differ diff --git a/site/content/entry/yuzu-android/ui2.png b/site/content/entry/yuzu-android/ui2.png new file mode 100644 index 000000000..7f9619853 Binary files /dev/null and b/site/content/entry/yuzu-android/ui2.png differ diff --git a/site/content/entry/yuzu-android/ui3.png b/site/content/entry/yuzu-android/ui3.png new file mode 100644 index 000000000..4e6a4e2f7 Binary files /dev/null and b/site/content/entry/yuzu-android/ui3.png differ diff --git a/site/content/entry/yuzu-applet-overlays/banner.png b/site/content/entry/yuzu-applet-overlays/banner.png new file mode 100644 index 000000000..c3dff7b16 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/banner.png differ diff --git a/site/content/entry/yuzu-applet-overlays/error_dark.png b/site/content/entry/yuzu-applet-overlays/error_dark.png new file mode 100644 index 000000000..565fddb9c Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/error_dark.png differ diff --git a/site/content/entry/yuzu-applet-overlays/error_midnight.png b/site/content/entry/yuzu-applet-overlays/error_midnight.png new file mode 100644 index 000000000..08ea582a5 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/error_midnight.png differ diff --git a/site/content/entry/yuzu-applet-overlays/error_new.png b/site/content/entry/yuzu-applet-overlays/error_new.png new file mode 100644 index 000000000..ded94bb98 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/error_new.png differ diff --git a/site/content/entry/yuzu-applet-overlays/error_old.png b/site/content/entry/yuzu-applet-overlays/error_old.png new file mode 100644 index 000000000..e1a20ab07 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/error_old.png differ diff --git a/site/content/entry/yuzu-applet-overlays/error_white.png b/site/content/entry/yuzu-applet-overlays/error_white.png new file mode 100644 index 000000000..93dd8849b Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/error_white.png differ diff --git a/site/content/entry/yuzu-applet-overlays/index.md b/site/content/entry/yuzu-applet-overlays/index.md new file mode 100644 index 000000000..23a866ce1 --- /dev/null +++ b/site/content/entry/yuzu-applet-overlays/index.md @@ -0,0 +1,106 @@ ++++ +date = "2021-04-03T01:00:00+05:30" +title = "New Feature Release - Applet Overlays" +author = "CaptV0rt3x" +forum = 387809 ++++ + +Hey there, yuz-ers! +Have you ever thought of enjoying yuzu on your TV, relaxing on your couch, but found our user interface cumbersome? +Thanks to the efforts of our developers [Morph](https://github.com/Morph1984) and [Rei](https://github.com/Its-Rei), yuzu has taken a massive step forward in making couch gaming comfy. +Let's dig in! + + +# What is this about? + +For a while now, users have complained that yuzu's couch setup (full-screen, TV, controller) experience isn't as comfortable as it could be. +One pain point was that pop-ups of any kind can't be addressed with a controller. +On top of that, these pop-up windows were separate background processes that wouldn't appear until you exited full-screen mode. +As you can guess, you always had to have a keyboard and mouse handy. + +{{< imgs + "./error_old.png| Old error applet" +>}} +{{< imgs + "./error_new.png| New controller friendly error applet" +>}} + +To fix this once and for all, Rei started work on eliminating all pop-up windows and to make it possible to control all system messages with a controller. +It was during this time that Morph began working on rewriting our software keyboard applet. +And since the software keyboard applet wasn't controller friendly either, they both collaborated and redesigned it from the ground up. + +{{< imgs + "./swkbd_old.png| Old software keyboard applet" +>}} +{{< imgs + "./swkbd_new.mp4| New controller friendly software keyboard applet" +>}} + +# The Software Keyboard + +As many of you might know, the Switch has a software keyboard that allows players to input text into games. +What you might not know is that there are multiple variants of keyboards implemented within the Switch's Horizon OS. +For example, there is the full-screen keyboard, which pauses games and allows input, and there is the inline keyboard, which allows input while the game is running. + +Our old software keyboard implementation was just the bare minimum required by the full-screen variant and, due to its design, was difficult to add support for the other variants. +It also quickly became outdated due to the newer revisions of the applet that shipped with later Switch firmware updates. +Equipped with the knowledge and expertise from previously rewriting two other applets - namely, the browser applet & the controller applet - Morph set out to rewrite the entire software keyboard applet from scratch. + +Rei had meticulously designed the new overlays for the keyboard applet and they turned out to be absolutely stunning. +Now, all that was left was to implement the keyboard applet backend and connect it to the frontend — but then came the challenges. + +{{< single-title-imgs + "The new software keyboard layouts for each yuzu theme" + "./osk_ssbu_line_white.png" + "./osk_ssbu_line_midnight.png" + "./osk_ssbu_line_dark.png" +>}} + +# Challenges + +As mentioned earlier, our old implementation was not designed with multi-variant support in mind. +With the rewrite, our foundational goal was to ensure all keyboard variants were supported. +A major challenge was figuring out how the inline keyboard variant worked. +In contrast to the full-screen variant, this one worked asynchronously. + +Applets run as separate processes on the Switch, but games have a habit of pausing their processes, invoking the keyboard applet, and making it seem synchronous. +There are several more applets that work asynchronously in addition to the inline keyboard variant. +As such, Morph spent a lot of time and effort on testing how the applet worked on original hardware — figuring out how all the pieces fall into place, making optimizations, and thus slowly perfected the backend implementation. + +{{< imgs + "./mhgu_line_swkbd.mp4| Monster Hunter Generations Ultimate - Inline Keyboard in action" +>}} +{{< imgs + "./swsh_num_swkbd.mp4| Pokémon Sword/Shield - Numeric Keyboard in action" +>}} + +With the backend in place, a new set of challenges arose due to yuzu's frontend library, [Qt](https://www.qt.io/). +Qt has a **lot** of annoying quirks, such as window positioning, transparency, and more. +These took several days of testing to track down and resolve. +For the frontend, Morph and Rei also had to plan and account for various other things like game specific keyboard scaling, high DPI displays, and higher resolutions. + +The final and most important challenge was figuring out how to make the applet controller friendly. +Thanks to the efforts spent in planning and testing at various stages of development, our devs were able to overcome these challenges. + +# Extra + +Although the overlay dialogs were initially designed with the keyboard applet in mind, the devs soon discovered its potential as a replacement for pop-up windows. +Thanks to this, the error applet has now joined the list of controller friendly applets, with more to come soon. +The error applet is used by games to crash and report back error codes to the user in various scenarios, which was previously done via a pop-up window. + +{{< single-title-imgs + "The new error applet overlays for each yuzu theme" + "./error_white.png" + "./error_midnight.png" + "./error_dark.png" +>}} + +# Fin + +Both the new keyboard applet and the controller friendly error applet are now available in the [latest Early Access build](https://yuzu-emu.org/help/early-access/). +Since these are currently still under development, we would like to hear more about your experiences and any bugs/issues you might encounter. +Please don't hesitate to reach out to us on our Discord server's Patreon support channels to report any findings. +That's all we have for today but, we're sure to be back with more exciting news soon! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-applet-overlays/mhgu_line_swkbd.mp4 b/site/content/entry/yuzu-applet-overlays/mhgu_line_swkbd.mp4 new file mode 100644 index 000000000..bfa53d2b0 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/mhgu_line_swkbd.mp4 differ diff --git a/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_dark.png b/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_dark.png new file mode 100644 index 000000000..fb15bdfe8 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_dark.png differ diff --git a/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_midnight.png b/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_midnight.png new file mode 100644 index 000000000..38df68768 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_midnight.png differ diff --git a/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_white.png b/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_white.png new file mode 100644 index 000000000..1804ec532 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/osk_ssbu_line_white.png differ diff --git a/site/content/entry/yuzu-applet-overlays/summary.png b/site/content/entry/yuzu-applet-overlays/summary.png new file mode 100644 index 000000000..3aa0f3559 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/summary.png differ diff --git a/site/content/entry/yuzu-applet-overlays/swkbd_new.mp4 b/site/content/entry/yuzu-applet-overlays/swkbd_new.mp4 new file mode 100644 index 000000000..a0d6155c2 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/swkbd_new.mp4 differ diff --git a/site/content/entry/yuzu-applet-overlays/swkbd_old.png b/site/content/entry/yuzu-applet-overlays/swkbd_old.png new file mode 100644 index 000000000..00f292d89 Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/swkbd_old.png differ diff --git a/site/content/entry/yuzu-applet-overlays/swsh_num_swkbd.mp4 b/site/content/entry/yuzu-applet-overlays/swsh_num_swkbd.mp4 new file mode 100644 index 000000000..3b8c1328d Binary files /dev/null and b/site/content/entry/yuzu-applet-overlays/swsh_num_swkbd.mp4 differ diff --git a/site/content/entry/yuzu-art/acnh 05x 36fps.png b/site/content/entry/yuzu-art/acnh 05x 36fps.png new file mode 100644 index 000000000..d4d204ddd Binary files /dev/null and b/site/content/entry/yuzu-art/acnh 05x 36fps.png differ diff --git a/site/content/entry/yuzu-art/acnh 1x 30fps.png b/site/content/entry/yuzu-art/acnh 1x 30fps.png new file mode 100644 index 000000000..ee455db3a Binary files /dev/null and b/site/content/entry/yuzu-art/acnh 1x 30fps.png differ diff --git a/site/content/entry/yuzu-art/aoc1x.png b/site/content/entry/yuzu-art/aoc1x.png new file mode 100644 index 000000000..14fee0b15 Binary files /dev/null and b/site/content/entry/yuzu-art/aoc1x.png differ diff --git a/site/content/entry/yuzu-art/aoc3x.png b/site/content/entry/yuzu-art/aoc3x.png new file mode 100644 index 000000000..06628bf15 Binary files /dev/null and b/site/content/entry/yuzu-art/aoc3x.png differ diff --git a/site/content/entry/yuzu-art/banner.png b/site/content/entry/yuzu-art/banner.png new file mode 100644 index 000000000..e827515e0 Binary files /dev/null and b/site/content/entry/yuzu-art/banner.png differ diff --git a/site/content/entry/yuzu-art/botwbilinearzoom.png b/site/content/entry/yuzu-art/botwbilinearzoom.png new file mode 100644 index 000000000..55c426e68 Binary files /dev/null and b/site/content/entry/yuzu-art/botwbilinearzoom.png differ diff --git a/site/content/entry/yuzu-art/botwfsrzoom.png b/site/content/entry/yuzu-art/botwfsrzoom.png new file mode 100644 index 000000000..0f089c387 Binary files /dev/null and b/site/content/entry/yuzu-art/botwfsrzoom.png differ diff --git a/site/content/entry/yuzu-art/dread_bilinear_zoom.png b/site/content/entry/yuzu-art/dread_bilinear_zoom.png new file mode 100644 index 000000000..5b52f40fe Binary files /dev/null and b/site/content/entry/yuzu-art/dread_bilinear_zoom.png differ diff --git a/site/content/entry/yuzu-art/dread_fsr_zoom.png b/site/content/entry/yuzu-art/dread_fsr_zoom.png new file mode 100644 index 000000000..751068941 Binary files /dev/null and b/site/content/entry/yuzu-art/dread_fsr_zoom.png differ diff --git a/site/content/entry/yuzu-art/filters.png b/site/content/entry/yuzu-art/filters.png new file mode 100644 index 000000000..e760deaec Binary files /dev/null and b/site/content/entry/yuzu-art/filters.png differ diff --git a/site/content/entry/yuzu-art/index.md b/site/content/entry/yuzu-art/index.md new file mode 100644 index 000000000..2348b95c5 --- /dev/null +++ b/site/content/entry/yuzu-art/index.md @@ -0,0 +1,192 @@ ++++ +date = "2021-10-24T07:12:00+05:30" +title = "New Feature Release - Resolution Scaler" +author = "CaptV0rt3x" +coauthor = "GoldenX86" +forum = 477883 ++++ + +Hey there, yuz-ers! +For those of you eager to go beyond the limits of Switch hardware and experience the full potential of Switch games, the wait has finally ended. +Our most requested and anticipated feature — the **Resolution Scaler** — is finally here! + + +  + +This new and massively improved **Resolution Scaler** is now available in the latest yuzu Early Access builds.
+We will be working diligently towards bringing this exciting new feature to our Mainline builds as soon as it's ready for a full release. + +
+
Latest Nvidia drivers are causing rendering issues with OpenGL. Please make sure to use the last known good driver: 472.12
+
+ +
+
All following images have large file sizes when expanded. Please consider if on a Metered Connection.
+
+ +## What is Resolution Scaler? + +Resolution Scaler is a new yuzu feature, which scales the dimensions of textures that Switch games render to, and then renders the games at the scaled resolution. +This allows games that were designed to render at lower resolutions (720p/900p/1080p), to go far beyond what was intended and be played at much higher resolutions (2K/4K/8K) in the same window! + +The massive undertaking to reimplement this complex feature was only possible thanks to the combined efforts of our talented developers [**Blinkhawk**](https://github.com/FernandoS27), [**BreadFish**](https://github.com/breadfish64), [**epicboy**](https://github.com/ameerj), and [**Rodrigo**](https://github.com/reinuseslisp). + +  +{{< imgs + "./metroid_dread.png|Metroid Dread (4x)" +>}} + +## Old Scaler + +Blinkhawk implemented the original Resolution Scaler back in July of 2019. +However, the approach he took to achieve that was a bit different. +It was inspired by [**Cemu's**](https://cemu.info/) graphic packs, but rather than having a manual graphics pack developed for each title, it would automatically generate scaling profiles as the user played. + +The generation algorithm used a database that recorded texture types and whether they were scalable or not. +The database was initially empty and, as the game ran, the algorithm would keep learning which textures to scale and which not to. +This approach was necessary, because of how yuzu was initially designed. + +Originally, yuzu's memory reads were `reactive` — meaning textures were downloaded only when games tried to read them and hence it wasn't possible to know which textures were going to be downloaded. + +Although these memory reads were fixed a few months later, the Scaler still needed changes to be made to the management of uniform buffers, so that it would be supported on drivers other than Nvidia. +However, the planned rewrites of the [**Texture Cache**](https://yuzu-emu.org/entry/yuzu-tcr/), [**Buffer Cache**](https://yuzu-emu.org/entry/yuzu-bcr/), and the massive GPU emulation overhaul with [**Project Hades**](https://yuzu-emu.org/entry/yuzu-hades/) further delayed developers from working on the Scaler, resulting in it never getting merged. + +  +{{< single-title-imgs + "Hyrule Warriors: Age of Calamity (1x Vs. 3x)" + "aoc1x.png" + "aoc3x.png" +>}} + +## Enter Project ART + +Once all of the heavy lifting subsided, Blinkhawk quickly went back to working on the Resolution Scaler and instead of continuing work on the original scaler, he decided to rewrite it from the ground up. + +Learning from the experiences of the original, Blinkhawk designed and created the new scaling system, which took a significant amount of time and effort. +He initially researched and experimented with a lot of different design approaches and learned their challenges, before finally landing on this new scaling system. + +
+{{< single-title-imgs-compare + "The Legend of Zelda: Breath of the Wild (Bilinear Vs. FSR @ 2x)" + "./botwbilinearzoom.png" + "./botwfsrzoom.png" +>}} + +Unlike the original scaler, which was inspired by Cemu's profile-based scaling, Project ART uses a rating system. +The meticulously designed rating system works by having a set of rules dictating which `render targets` can be scaled and having a rating for each texture. +We couldn't simply use a binary "YES/NO" system because, unbeknownst to us, some games may render textures only once. +Scaling these is pointless and has the potential to break them. + +For the uninitiated, [**render targets**](https://en.wikipedia.org/wiki/Render_Target) are just textures that the game renders to. +Textures can only earn `1` credit per frame. +And to earn that `1` credit, the texture itself as well as any other textures in that renderpass, all need to satisfy our set of rules. +After accruing `2` or more credits, the texture will be scaled and now all rendering will be done in the scaled resolution for that texture. + +The textures keep earning more credits as frames pass. +But if in any frame, even a single texture within a renderpass fails to satisfy the set of rules, all texture scores will be reset to `0`. +If a texture interacts with other textures, its new rating will either be based on the current rating of those textures or will be increased to the maximum possible rating, if one of those textures is already scaled. + +
+{{< single-title-imgs-compare + "Metroid Dread (Bilinear Vs. FSR @ 2x)" + "./dread_bilinear_zoom.png" + "./dread_fsr_zoom.png" +>}} + +## The Rest of the Puzzle Pieces + +After the scaling system was ready, Rodrigo helped implement the shader patching required for scaling. +This was needed to ensure shaders behaved properly when textures were scaled. + +While Blinkhawk was working on improving scaling in Vulkan and the texture cache, epicboy was working in parallel to add scaling support on the OpenGL side. +But little did they know, their bug squashing crusade was just about to begin. + +As scaling is intrusive, bugs can occur in a myriad of ways. +Scaling occurs when games load in textures, which is usually during loading screens, but the visual bugs tend to happen later during gameplay. +This makes it quite hard to figure out where the bug originally manifested. + +{{< single-title-imgs + "Super Mario Party (1x Vs. 3x)" + "./smp1x.png" + "./smp3x.png" +>}} + +Fast-forward a few weeks, and thanks to continuous iterative internal testing, our developers were finally able to fix most of the bugs they came across. + +With much of the scaler work nearly being done, Blinkhawk ported some texture filters from Citra and adapted those to be scaling filters for yuzu. +BreadFish later tuned them and also added a little something extra, AMD's [**FidelityFX™ Super Resolution**](https://www.amd.com/en/technologies/radeon-software-fidelityfx-super-resolution) (FSR)! + +{{< single-title-imgs + "Super Mario Odyssey (1x Vs. 3x)" + "./smo1x.png" + "./smo3x.png" +>}} + +## Benefits of Project ART + +The feature-set of Project ART includes the following: + +- Native Resolution Scaling: + * **Upscaling** (2x, 3x, 4x, 5x, 6x) and **Downscaling** (0.5x, 0.75x). +- FXAA Pre-filtering Pass +- Fixed various bugs introduced from the Texture Cache Rewrite (TCR). +- Window Adaptation Filters + +{{}} + +
+{{< single-title-imgs-compare + "Mario Kart 8 Deluxe (Bilinear Vs. FSR @ 2x)" + "./mk8bilinearzoom.png" + "./mk8fsrzoom.png" +>}} + +## What to expect from Project ART + +The Resolution Scaler requires much more VRAM as compared to games running at their native resolutions. +Here are some minimum and recommended values based on our testing: + +
+  + +Upscaling works with most games! +We currently know of two games that don't upscale - `Paper Mario: The Origami King` and `Crash Bandicoot 4: It's About Time`. +These games are incompatible because they use a compute shader to render an image, which is challenging to work around. +However, thanks to mods, `Paper Mario: The Origami King` can be upscaled with a workaround discussed below. + +Downscaling, surprisingly, turned out to be more stable than we thought. +With this, you can gain 20% or more performance at the cost of reduced quality. +It works for most of the games we tested, but our testing has been limited. +We currently know of one game that doesn't downscale (but upscales) — `Sonic Colors: Ultimate`. + +
+{{< single-title-imgs-compare + "Animal Crossing (1x 30FPS vs. 0.5x 36FPS)" + "./acnh 1x 30fps.png" + "./acnh 05x 36fps.png" +>}} + +Some games that have their own FXAA need a mod to disable their built-in FXAA. +This is because the games use hard coded texture dimensions in their FXAA filters, which leads to poor anti-aliasing quality or artifacts. +`Pokémon Sword/Shield` needs the [**No Outlines**](https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods#pokemon-swordshield-romfs) mod for optimal picture quality, as the outlines don't scale correctly. + +`Kirby Star Allies` is known to have an additional performance cost when upscaled. +This is caused by the need to downscale textures before upscaling in order to bypass some crashes and issues in the game. + +Special thanks to our community member and modder [theboy181](https://github.com/theboy181), who created new mods that help with upscaling some of the games listed earlier. +* [Paper Mario: The Origami King 4K](https://cdn.discordapp.com/attachments/799182828038258698/901595782501781534/Paper_Mario_Origami_King_-_4K.rar) +* [Xenoblade Chronicles 2 - Super Sampling x2](https://cdn.discordapp.com/attachments/799182828038258698/901595757117866045/XenoBlade_Chronicles_2_-_SuperSampling_x2.rar) + +## Conclusion + +As we couldn't fully test the Resolution Scaling with the entire Switch game library, we look forward to all the user feedback we will receive. +Your reports will be important in fixing bugs and polishing the Scaler to be the best experience possible. + +If you encounter any issues, bugs, or crashes, please reach out to us via our [**Discord**](https://discord.gg/u77vRWY) Patreon channels. +We hope you love this new feature and will be back with more exciting news in the future! Happy emulating! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} diff --git a/site/content/entry/yuzu-art/metroid_dread.png b/site/content/entry/yuzu-art/metroid_dread.png new file mode 100644 index 000000000..67297a15a Binary files /dev/null and b/site/content/entry/yuzu-art/metroid_dread.png differ diff --git a/site/content/entry/yuzu-art/mk8bilinearzoom.png b/site/content/entry/yuzu-art/mk8bilinearzoom.png new file mode 100644 index 000000000..9ad7fbaae Binary files /dev/null and b/site/content/entry/yuzu-art/mk8bilinearzoom.png differ diff --git a/site/content/entry/yuzu-art/mk8fsrzoom.png b/site/content/entry/yuzu-art/mk8fsrzoom.png new file mode 100644 index 000000000..534e752a9 Binary files /dev/null and b/site/content/entry/yuzu-art/mk8fsrzoom.png differ diff --git a/site/content/entry/yuzu-art/scaling.png b/site/content/entry/yuzu-art/scaling.png new file mode 100644 index 000000000..1e2e59c93 Binary files /dev/null and b/site/content/entry/yuzu-art/scaling.png differ diff --git a/site/content/entry/yuzu-art/smo1x.png b/site/content/entry/yuzu-art/smo1x.png new file mode 100644 index 000000000..2cc3822f7 Binary files /dev/null and b/site/content/entry/yuzu-art/smo1x.png differ diff --git a/site/content/entry/yuzu-art/smo3x.png b/site/content/entry/yuzu-art/smo3x.png new file mode 100644 index 000000000..99852cc72 Binary files /dev/null and b/site/content/entry/yuzu-art/smo3x.png differ diff --git a/site/content/entry/yuzu-art/smp1x.png b/site/content/entry/yuzu-art/smp1x.png new file mode 100644 index 000000000..0876499a0 Binary files /dev/null and b/site/content/entry/yuzu-art/smp1x.png differ diff --git a/site/content/entry/yuzu-art/smp3x.png b/site/content/entry/yuzu-art/smp3x.png new file mode 100644 index 000000000..055e13d6d Binary files /dev/null and b/site/content/entry/yuzu-art/smp3x.png differ diff --git a/site/content/entry/yuzu-art/summary.png b/site/content/entry/yuzu-art/summary.png new file mode 100644 index 000000000..b577c8541 Binary files /dev/null and b/site/content/entry/yuzu-art/summary.png differ diff --git a/site/content/entry/yuzu-bcr/acnhbug.png b/site/content/entry/yuzu-bcr/acnhbug.png new file mode 100644 index 000000000..812da3c6c Binary files /dev/null and b/site/content/entry/yuzu-bcr/acnhbug.png differ diff --git a/site/content/entry/yuzu-bcr/acnhfix.png b/site/content/entry/yuzu-bcr/acnhfix.png new file mode 100644 index 000000000..d90c22062 Binary files /dev/null and b/site/content/entry/yuzu-bcr/acnhfix.png differ diff --git a/site/content/entry/yuzu-bcr/amdbench.png b/site/content/entry/yuzu-bcr/amdbench.png new file mode 100644 index 000000000..4c93d8294 Binary files /dev/null and b/site/content/entry/yuzu-bcr/amdbench.png differ diff --git a/site/content/entry/yuzu-bcr/banner.png b/site/content/entry/yuzu-bcr/banner.png new file mode 100644 index 000000000..8a207773d Binary files /dev/null and b/site/content/entry/yuzu-bcr/banner.png differ diff --git a/site/content/entry/yuzu-bcr/index.md b/site/content/entry/yuzu-bcr/index.md new file mode 100644 index 000000000..674a4fc23 --- /dev/null +++ b/site/content/entry/yuzu-bcr/index.md @@ -0,0 +1,123 @@ ++++ +date = "2021-01-16T21:00:00-03:00" +title = "New Feature Release - Buffer Cache Rewrite" +author = "CaptV0rt3x" +coauthor = "GoldenX86" +forum = 348059 ++++ + +Hey there, yuz-ers! The follow-up to our [previous big code rewrite](https://yuzu-emu.org/entry/yuzu-tcr/) is finally here: the Buffer Cache Rewrite! +This massive undertaking not only improves performance significantly, but also simplifies the code for our developers. +Now let's get this article started! + + + +## So, what does a Buffer Cache do? + +As the name implies, a Buffer Cache — well — caches (stores) buffers. +That might not have made much sense, but that's what it does. + +In graphics programming, for the GPU to render anything it needs data like position, color, etc. +Usually, this data is supplied by the application. +But when we have large applications dealing with large volumes of data, it becomes increasingly difficult to constantly supply the GPU +with data and have it render. +Hence, buffer objects were introduced. + +Buffer objects are memory objects that store the render data in the GPU memory — thereby increasing reusability significantly. +There are various types of bindings, commonly referred to as buffer types, like index buffers, vertex buffers, and uniform buffers (among others). +This improves the rendering performance because the data is now readily available for the GPU to use. + +### yuzu's Buffer Cache + +Coming back to yuzu's case, yuzu initially inherited a stream buffer — originally implemented for [Citra](https://citra-emu.org) by [degasus](https://github.com/degasus). +A stream buffer works in a modify/use cycle, meaning you frequently update the buffer object and you bind that region. +[Rodrigo](https://github.com/ReinUsesLisp) and [Blinkhawk](https://github.com/FernandoS27) later implemented our existing buffer cache to work alongside the stream buffer. + +There was nothing inherently wrong with it; stream buffers are in fact one of the fastest ways to upload data to the GPU. +But when [Rodrigo](https://github.com/ReinUsesLisp) profiled yuzu, the cache management and upload copies were something that kept popping up as slow. + +{{< message "Profiling" >}} +In software engineering, profiling ("program profiling", "software profiling") is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, +the usage of particular instructions, or the frequency and duration of function calls. Most commonly, profiling information serves to aid program optimization. +{{< /message >}} + +The problem lay in the fact that games aren't exactly streaming data all the time. +So using immediate uploads (on OpenGL) and faster caching yielded much better performance than having a stream buffer and caching large resources, at least for Nvidia. +Upon further testing, we found that this turned out to be false for non-Nvidia drivers on OpenGL (AMD, Intel, and Mesa) and hence had to add a stream buffer for small uploads in these drivers. + +## What's changed now? + +The technical design goals for the Buffer Cache Rewrite were the same as our Texture Cache Rewrite. + +- Cleaner code: No more virtual function calls or shared pointers, meaning easier maintenance in the future. +- Improved efficiency and improved performance. + +Resolving which buffer existed in which memory region was a very expensive operation in our old buffer cache implementation. +This is why the stream buffer existed — to make it faster. + +The new Buffer Cache has vastly improved tracking for the various buffers it caches. +In the new implementation, when buffers are created in the memory, they are forcibly aligned to 4K [pages](https://en.wikipedia.org/wiki/Page_(computer_memory)) (4096 bytes - starting at zero). +And to efficiently know what buffer exists on what address, the cache uses a flat array 32 MiB wide to translate from the current CPU page where the buffer exists to what buffer resides in it. +`e.g., if the address is 4096 or 7000, that is page 1 & if it is 8192, that is page 2.` +Thus, the new Buffer Cache can track what pages of a buffer have been modified on a page basis instead of being a binary state. + +Imagine if a buffer has a size of 524288 bytes and a game modifies only 1 byte of the buffer. +Since buffers are now aligned to 4096 bytes as mentioned earlier, only those 4096 bytes are uploaded to the GPU. +The same thing happens when the GPU tries to update the cache with data modified by the CPU. + +This tracking is done by making use of bit arrays in the buffers. +Each value represents the state of the page - 1 being modified, 0 being clear. +Keeping things in a bit array allows us to use efficient bit operations like `std::countr_zero` and `std::countr_one` (C++20). +This results in fewer instructions yielding the same results (much faster). + +## All right, let's talk performance gains! + +The main focus of this work is to improve performance, but some graphical improvements also resulted from this rewrite. + +{{< single-title-imgs + "Vertex explosions are no longer a problem in OCTOPATH TRAVELER" + "./otbug.png" + "./otfix.png" + >}} + +{{< single-title-imgs + "Font rendering is now working for all GPU vendors in Animal Crossing: New Horizons" + "./acnhbug.png" + "./acnhfix.png" + >}} + +{{< single-title-imgs + "Item drops stop flickering in Xenoblade Chronicles Definitive Edition" + "./xbdebug.mp4" + "./xbdefix.mp4" + >}} + +With that out of the way, let's talk about performance. Of course, metrics will vary greatly depending on the hardware and API in use. +Here are some examples measured after a couple of runs in the most demanding or common areas of the games listed: + +Nvidia, in this example represented by an RTX3070, shows up to 84% improved performance in OpenGL. +{{< imgs + "./nvbench.png| " + >}} + +AMD on the other hand, represented by a small RX550, shows an up to 55% improvement in Vulkan. +{{< imgs + "./amdbench.png| " + >}} + +Regarding Intel, an unsurprising problem arises. All currently released products bottleneck due to immature drivers and simply lacking the raw power for Switch emulation. This results in little to no performance improvements with this rewrite. Hopefully this can be addressed with future improvements to both yuzu and Intel's future drivers and hardware releases. + +As a special mention, AMD Vega based integrated GPUs show an up to 223% increase in `Paper Mario the Origami King`, reaching the same level of performance as dedicated cards of a much higher calibre. + +## Fin + +With that, we conclude our coverage of the new Buffer Cache Rewrite. +As always, we would like to remind users that the features released in [Early Access](https://yuzu-emu.org/help/early-access/) are still being worked on. +If you come across any bugs, issues, performance loss, crashes, or regressions with this new feature, please +reach out to us on our [Discord server](https://discord.com/invite/u77vRWY) and share your findings. + +See you next time,
+ - yuzu development team! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-bcr/nvbench.png b/site/content/entry/yuzu-bcr/nvbench.png new file mode 100644 index 000000000..adc8dfb04 Binary files /dev/null and b/site/content/entry/yuzu-bcr/nvbench.png differ diff --git a/site/content/entry/yuzu-bcr/otbug.png b/site/content/entry/yuzu-bcr/otbug.png new file mode 100644 index 000000000..f0229da73 Binary files /dev/null and b/site/content/entry/yuzu-bcr/otbug.png differ diff --git a/site/content/entry/yuzu-bcr/otfix.png b/site/content/entry/yuzu-bcr/otfix.png new file mode 100644 index 000000000..fb2dd1948 Binary files /dev/null and b/site/content/entry/yuzu-bcr/otfix.png differ diff --git a/site/content/entry/yuzu-bcr/summary.png b/site/content/entry/yuzu-bcr/summary.png new file mode 100644 index 000000000..13e34c7c5 Binary files /dev/null and b/site/content/entry/yuzu-bcr/summary.png differ diff --git a/site/content/entry/yuzu-bcr/xbdebug.mp4 b/site/content/entry/yuzu-bcr/xbdebug.mp4 new file mode 100644 index 000000000..5fb0a37cf Binary files /dev/null and b/site/content/entry/yuzu-bcr/xbdebug.mp4 differ diff --git a/site/content/entry/yuzu-bcr/xbdefix.mp4 b/site/content/entry/yuzu-bcr/xbdefix.mp4 new file mode 100644 index 000000000..23636c733 Binary files /dev/null and b/site/content/entry/yuzu-bcr/xbdefix.mp4 differ diff --git a/site/content/entry/yuzu-boxcat/banner.png b/site/content/entry/yuzu-boxcat/banner.png new file mode 100644 index 000000000..e71b48026 Binary files /dev/null and b/site/content/entry/yuzu-boxcat/banner.png differ diff --git a/site/content/entry/yuzu-boxcat/boxcat.png b/site/content/entry/yuzu-boxcat/boxcat.png new file mode 100644 index 000000000..8caef4192 Binary files /dev/null and b/site/content/entry/yuzu-boxcat/boxcat.png differ diff --git a/site/content/entry/yuzu-boxcat/index.md b/site/content/entry/yuzu-boxcat/index.md new file mode 100644 index 000000000..2c99cf2d6 --- /dev/null +++ b/site/content/entry/yuzu-boxcat/index.md @@ -0,0 +1,68 @@ ++++ +date = "2019-05-23T23:00:00+05:30" +title = "New Feature - Boxcat" +author = "CaptV0rt3x" +forum = 108808 ++++ + +Good day, yuzu fans! +Today we bring you another exciting Switch feature which will create opportunities, for new in-game content across various games! +Without further ado, let's get started! + + +### What? + +Yes, you heard that correctly. +New in-game content across various games, with events held occasionally. + +### How? + +The Nintendo Switch has a network service called `BCAT`, using which games can add new content dynamically, i.e. new content without updating the game itself. +Nintendo can push new content to various games via this service, whenever it wants. +Some examples of this type of content would be - Super Mario Odyssey hints, Super Mario Odyssey costumes, and Splatoon 2 items. + +{{< message Note >}} +**Users should possess the following versions of the games at minimum.**
+SMO - `1.2.0` || BOTW - `1.1.0` || Splatoon 2 - `3.2.0` +{{< /message >}} +{{< message "Surprise!" >}} +*The Legend of Zelda - Breath of The Wild, now boots with updates and DLC enabled.* +{{< /message >}} + +### Then? + +Thanks to the efforts of our developer [DarkLordZach](https://github.com/DarkLordZach), we now have an open source replacement of the service in yuzu. +By emulating the `BCAT` service at a high-level, yuzu is able to intercept the game's calls to Nintendo's servers and reroute them to yuzu's servers. +This means that games running on yuzu, will now check for new content on yuzu's servers instead of Nintendo's. + +This allows us to add new in-game content for games that use this service. +For the inaugural run, our team members have added some cool content across different games which you can check out [here](https://yuzu-emu.org/help/feature/boxcat/). +We will have new events occasionally, so users will have even more fun while playing games on yuzu. + +{{< imgs + "./boxcat.png|Boxcat Settings Configuration" +>}} + +### When? + +We will be testing this feature in our Patreon preview builds first and it will be available to Canary users in the near future. + +We would like to take this opportunity to ask that our users show their support by subscribing to our [Patreon](https://www.patreon.com/yuzuteam). + +By subscribing to our Patreon, you will be creating more incentive for developers to spend even more time working on yuzu. +For example - Using Patreon funds, several internal bounties have been setup, which have lead to various new features or fixes you might have seen on our [GitHub](https://github.com/yuzu-emu/yuzu) or our [Discord](https://discord.gg/u77vRWY). + +{{< message "Want more information on Boxcat?" >}} +Refer to our help page for Boxcat. +https://yuzu-emu.org/help/feature/boxcat/ +{{< /message >}} + +### Fin! + +We thank all of our 300+ patrons for their continued love and support. +We thank the entire yuzu community for the love and support they have shown to the project. +We will be working even more diligently to bring many more new, and exciting features in the future.
+Keep playing on yuzu, and have fun! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-boxcat/summary.png b/site/content/entry/yuzu-boxcat/summary.png new file mode 100644 index 000000000..84d71c0a3 Binary files /dev/null and b/site/content/entry/yuzu-boxcat/summary.png differ diff --git a/site/content/entry/yuzu-early-access/9.png b/site/content/entry/yuzu-early-access/9.png new file mode 100644 index 000000000..333748fc1 Binary files /dev/null and b/site/content/entry/yuzu-early-access/9.png differ diff --git a/site/content/entry/yuzu-early-access/banner.png b/site/content/entry/yuzu-early-access/banner.png new file mode 100644 index 000000000..6c71f80ea Binary files /dev/null and b/site/content/entry/yuzu-early-access/banner.png differ diff --git a/site/content/entry/yuzu-early-access/index.md b/site/content/entry/yuzu-early-access/index.md new file mode 100644 index 000000000..b30b22db2 --- /dev/null +++ b/site/content/entry/yuzu-early-access/index.md @@ -0,0 +1,74 @@ ++++ +date = "2019-12-01T20:15:00+05:30" +title = "Introducing yuzu Early Access" +author = "bunnei" +forum = 159083 ++++ + +A very good day to you all out there! +Today, we are excited to announce a new yuzu official release channel for our Patreon subscribers — yuzu Early Access. +It comes with all the perks you're already accustomed to and more. + + +  + +
+ +
+ +  + +This new release channel includes all the same daily yuzu updates that you are accustomed to, plus the early releases of features that you have typically seen in special Patreon releases! + +> **Note:**
+> `Early Access` builds are currently only available for `Windows` users.
+> `Linux` users won't have access to `Early Access` builds due to limitations of the installer, and how we bundle the source with the binary. If enough users request a `Linux` port, we may look into it in the future. + +## What does it mean for you? + +If you are a Patreon subscriber at the `Early Access tier`, you will be able to install this new release channel. +You will not need to worry about manually checking in on the yuzu Patreon and downloading one-off releases — as these updates will be pushed directly to you through the installer. +You’ll also get all of the other daily updates with this release channel, so there will not be a need to switch back and forth between Patreon releases and daily releases. + +If you are not a Patreon subscriber and use the regular yuzu builds, not much will change! +You’ll still get the same daily yuzu updates, which will include new features and bug fixes once they are ready for mainstream use. + +> **Note:**
+> All build downloads are bundled with the source code within in the download. + +## How do I install yuzu Early Access? + +Follow this detailed step-by-step guide, to install yuzu `Early Access` via the Installer.
+[**Click here for the guide**](https://yuzu-emu.org/help/early-access/) + +## Why did we make this change? + +Since February 2019, we've released a total of `8` special Patreon preview builds alongside hundreds of daily regular releases. +Like many open source projects, we automate the entire build and release process for the application, so that our developers can spend more time working on the actual project and less time fiddling with building and releasing. +This way, the latest and greatest changes are delivered directly to you through the updater. + +When we made the first preview release, we figured that for a once-a-month preview build it isn't worth the trouble to automate the process. +But recently, the process for building and releasing has started to really take up more time than acceptable. + +{{< imgs + "./9.png| (Credits: xkcd)" +>}} + + +Each build was made by merging several different developers' code together, causing unforeseen errors due to different developers making changes to same sections of the code. +For a once-a-month build, we ended up needing to block out at least a week to prepare for the release; we needed time for internal testing, time for squashing every bug we found, and time for fixing any issues found after release. + +Over the past month, we rebuilt the build process for daily yuzu releases. +We built it in such a way that we can easily extend it to include `Early Access` builds. +Today we are pleased to announce that we now have automated the build and release process for `Early Access` from start to finish, meaning from today, you can now install the latest `Early Access` build directly through the yuzu installer. + +## So I’ve installed Early Access, now what? + +We’re rolling out the release of `Early Access` softly — so you may not notice too many new features or bug fixes just yet. +This is to give us time to make sure the new release channel is stable, and work out any kinks. + +But rest assured — we have a really exciting feature coming, that many of you have been asking for, and it’s right around the corner! +This feature is `days away…` not weeks… So, hang tight! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-early-access/summary.png b/site/content/entry/yuzu-early-access/summary.png new file mode 100644 index 000000000..39362214d Binary files /dev/null and b/site/content/entry/yuzu-early-access/summary.png differ diff --git a/site/content/entry/yuzu-early-access/yuzu-banner-early-access-white.svg b/site/content/entry/yuzu-early-access/yuzu-banner-early-access-white.svg new file mode 100644 index 000000000..1d2bb15f9 --- /dev/null +++ b/site/content/entry/yuzu-early-access/yuzu-banner-early-access-white.svg @@ -0,0 +1 @@ +newAsset 3 \ No newline at end of file diff --git a/site/content/entry/yuzu-fastmem/BENCH_01.png b/site/content/entry/yuzu-fastmem/BENCH_01.png new file mode 100644 index 000000000..bf16f7fd1 Binary files /dev/null and b/site/content/entry/yuzu-fastmem/BENCH_01.png differ diff --git a/site/content/entry/yuzu-fastmem/BENCH_02.png b/site/content/entry/yuzu-fastmem/BENCH_02.png new file mode 100644 index 000000000..8c1647379 Binary files /dev/null and b/site/content/entry/yuzu-fastmem/BENCH_02.png differ diff --git a/site/content/entry/yuzu-fastmem/MMU.png b/site/content/entry/yuzu-fastmem/MMU.png new file mode 100644 index 000000000..d4cabe48a Binary files /dev/null and b/site/content/entry/yuzu-fastmem/MMU.png differ diff --git a/site/content/entry/yuzu-fastmem/SSBU.png b/site/content/entry/yuzu-fastmem/SSBU.png new file mode 100644 index 000000000..b76384013 Binary files /dev/null and b/site/content/entry/yuzu-fastmem/SSBU.png differ diff --git a/site/content/entry/yuzu-fastmem/banner.png b/site/content/entry/yuzu-fastmem/banner.png new file mode 100644 index 000000000..772b7a477 Binary files /dev/null and b/site/content/entry/yuzu-fastmem/banner.png differ diff --git a/site/content/entry/yuzu-fastmem/index.md b/site/content/entry/yuzu-fastmem/index.md new file mode 100644 index 000000000..fef14afe8 --- /dev/null +++ b/site/content/entry/yuzu-fastmem/index.md @@ -0,0 +1,116 @@ ++++ +date = "2021-06-08T04:00:00+05:30" +title = "New Feature Release - Fastmem Support" +author = "CaptV0rt3x" +forum = 415882 ++++ + +Hey there, yuz-ers! +While all of you wait eagerly for the release of Project Hades, our shader decompiler rewrite, we thought we'd bring you a nice little surprise to keep you occupied. +We present to you, the newest addition to yuzu's ever-improving features list - Fastmem (Fast Memory Access)! + + +  + +This is now available in the latest yuzu Early Access build (1759 or newer) and we intend to make this available in Mainline builds very soon. +As always, we ask that you test various games with these builds and if you encounter any issues, bugs, or crashes, please reach out to us via the [Discord](https://discord.gg/u77vRWY) Patreon channels. + +**Note: This feature is enabled by default.** + +## What is Fastmem? + +Fastmem or Fast Memory Access, is a well-known feature among emulator developers and emulation enthusiasts. +Emulators like [Dolphin](https://dolphin-emu.org/) and [Citra Android](https://citra-emu.org/) have implemented this in the past. + +All modern Operating Systems have this concept of "virtual memory," where addressable memory (from the running process) is a space of memory addresses that are only "known" to that process, e.g. Discord on your PC, or Super Mario Odyssey on your Switch — and the addresses are translated by the Switch's MMU (Memory Management Unit) to the physical location in the Switch’s physical RAM as the game runs. + +  + +{{< imgs + "./MMU.png|Illustration of an MMU (By Mdjango, Andrew S. Tanenbaum)" +>}} + +In yuzu, we emulate the Switch's virtual address space for the running process. +But, that means for each time the game tries to read/write memory, which happens millions of times per frame, we need to basically "decode" where that Switch virtual address maps to our "emulated" Switch memory (RAM allocated for yuzu). +This adds a lot of overhead when you consider how much the game reads/writes to memory. + +The idea behind Fastmem here is to map the emulated Switch game's addressable memory on the host (Windows / Linux), at offset addresses. +The offset is a constant. + +## The Technical - HOW? + +On the Switch, we have 4GB of memory. +The hardware supports a virtual memory size of 48bits (just like x64); however, the Switch kernel limits this to only 39bit to save some memory for storing page tables. +This results in a 512GB virtual address space (2^39) for use. (A page table is the data structure used to store the mapping between virtual addresses and physical addresses.) + +To emulate this, we allocated a HUGE page table, which had an offset for each memory page addressable in the virtual memory region of the Switch. This table alone was 1GB in size! +And whenever a game wanted to access the memory, we looked up this table, which resulted in roughly ~10 x64 CPU instructions and twice the memory latency. +That latency being: first read the table's value, then read the correct memory. + +Fastmem, however, uses the host MMU to rebuild the same 39bit virtual memory arena. +Here, we're lucky that Nintendo limits the memory to 39bit. +We cannot allocate 48bit because that's the entire virtual address space on the host. + +This cuts the effort to access the memory down to 3+1 x64 CPU instructions with a single memory latency. +3 instructions to check if the pointer is smaller than 39 bit, and one memory load instruction. +We need this size check to ensure out-of-bounds memory access won't return any physical address. + + +## The Challenges + +Implementing Fastmem required two major things in [Dynarmic](https://github.com/MerryMage/dynarmic/), our JIT recompiler. + +**First:** A64 Fastmem support on Dynarmic. + +Dynarmic has had support for A32 Fastmem (see Citra Android) for a while now. +A64 Fastmem support was [originally worked on a year ago by MerryMage and vdwjeremy](https://github.com/MerryMage/dynarmic/pull/528) but it never got merged to the master branch. + +[degasus](https://github.com/degasus/) worked with [MerryMage](https://github.com/MerryMage/) to clean up and get [these changes merged](https://github.com/MerryMage/dynarmic/pull/613) to the master branch so that yuzu could benefit from this. + +**Second:** To generate the 512GB virtual address space with the same mappings as on the Switch. + +degasus proved last year that this was easy to implement on Linux as the POSIX mmap call provided very similar features to the Horizon OS. +But it was a huge challenge for Windows, as the Windows Virtual Memory API is larger with a few missing features. +Moreover, while Windows page tables were 4K aligned, Windows memory management was 64K aligned for [outdated reasons](https://devblogs.microsoft.com/oldnewthing/20031008-00/?p=42223). + + +## The Solutions + +Turns out, Microsoft had realized this too and frequently patched their Virtual Memory API. +With the release of Windows 10 v1803, their new API supported new "placeholder" memory which didn't suffer from the previous limitations. + +Thanks to [Breadfish64](https://github.com/BreadFish64/), who used this new API in their Gameboy emulator and showed us that it was now indeed possible to support Fastmem on Windows. +Unfortunately, this makes the feature usable only on Windows versions 1803 and higher. + +Since we already met the base requirements for our new Fastmem implementation long ago, our devs were able to quickly address the missing pieces. +[bunnei](https://github.com/bunnei/) implemented the much-needed kernel rework changes in yuzu, degasus cleaned up their original proof-of-concept code for Linux, and [Rodrigo](https://github.com/ReinUsesLisp/) implemented the Windows Fastmem support. +[Blinkhawk](https://github.com/FernandoS27) provided valuable advice and coordinated these efforts to get the feature release-ready. + +## The Results + +As an added bonus, game booting/loading times have been improved thanks to these changes. +Thanks to developer Rodrigo, Normal GPU accuracy no longer triggers a myriad of exceptions on the Smash character selection screen, improving its performance from 10-20 FPS to a full 60. + +  +{{< imgs + "./SSBU.png|Super Smash Bros. Ultimate" +>}} + +For all game benchmarks, we utilized a PC built to our own recommended hardware spec. +In this testing we observed performance improvements ranging from 15-60% in some of the most demanding areas of gameplay. +Please note the marked titles that were tested with the processor limited to 2.4Ghz, to synthetically make it slower than usual and highlight the improvements. + +  +{{< imgs + "./BENCH_01.png|The * indicates titles tested at 2.4Ghz" +>}} + +  +{{< imgs + "./BENCH_02.png|The * indicates titles tested at 2.4Ghz" +>}} + +##### That's all we have for now, see you soon with exciting news about Project Hades and more! Happy emulating! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-fastmem/summary.png b/site/content/entry/yuzu-fastmem/summary.png new file mode 100644 index 000000000..dd5d3d882 Binary files /dev/null and b/site/content/entry/yuzu-fastmem/summary.png differ diff --git a/site/content/entry/yuzu-hades/AOC_2.png b/site/content/entry/yuzu-hades/AOC_2.png new file mode 100644 index 000000000..4b51aad0f Binary files /dev/null and b/site/content/entry/yuzu-hades/AOC_2.png differ diff --git a/site/content/entry/yuzu-hades/AOC_3.png b/site/content/entry/yuzu-hades/AOC_3.png new file mode 100644 index 000000000..4ce167fc4 Binary files /dev/null and b/site/content/entry/yuzu-hades/AOC_3.png differ diff --git a/site/content/entry/yuzu-hades/AOC_4.png b/site/content/entry/yuzu-hades/AOC_4.png new file mode 100644 index 000000000..06367f220 Binary files /dev/null and b/site/content/entry/yuzu-hades/AOC_4.png differ diff --git a/site/content/entry/yuzu-hades/BOTW_Vulkan.png b/site/content/entry/yuzu-hades/BOTW_Vulkan.png new file mode 100644 index 000000000..3f4d59235 Binary files /dev/null and b/site/content/entry/yuzu-hades/BOTW_Vulkan.png differ diff --git a/site/content/entry/yuzu-hades/Bravely_Default_2.png b/site/content/entry/yuzu-hades/Bravely_Default_2.png new file mode 100644 index 000000000..3aa23376a Binary files /dev/null and b/site/content/entry/yuzu-hades/Bravely_Default_2.png differ diff --git a/site/content/entry/yuzu-hades/Bravely_Default_2_2.png b/site/content/entry/yuzu-hades/Bravely_Default_2_2.png new file mode 100644 index 000000000..2a1b4c96c Binary files /dev/null and b/site/content/entry/yuzu-hades/Bravely_Default_2_2.png differ diff --git a/site/content/entry/yuzu-hades/Catherine.png b/site/content/entry/yuzu-hades/Catherine.png new file mode 100644 index 000000000..c2cb60544 Binary files /dev/null and b/site/content/entry/yuzu-hades/Catherine.png differ diff --git a/site/content/entry/yuzu-hades/Catherine_2.png b/site/content/entry/yuzu-hades/Catherine_2.png new file mode 100644 index 000000000..4b08bbfcc Binary files /dev/null and b/site/content/entry/yuzu-hades/Catherine_2.png differ diff --git a/site/content/entry/yuzu-hades/Crash Bandicoot 4.png b/site/content/entry/yuzu-hades/Crash Bandicoot 4.png new file mode 100644 index 000000000..9945b4075 Binary files /dev/null and b/site/content/entry/yuzu-hades/Crash Bandicoot 4.png differ diff --git a/site/content/entry/yuzu-hades/Dark Souls.png b/site/content/entry/yuzu-hades/Dark Souls.png new file mode 100644 index 000000000..015babd15 Binary files /dev/null and b/site/content/entry/yuzu-hades/Dark Souls.png differ diff --git a/site/content/entry/yuzu-hades/Densha_de_Go.png b/site/content/entry/yuzu-hades/Densha_de_Go.png new file mode 100644 index 000000000..7aa7bece5 Binary files /dev/null and b/site/content/entry/yuzu-hades/Densha_de_Go.png differ diff --git a/site/content/entry/yuzu-hades/Densha_de_Go_2.png b/site/content/entry/yuzu-hades/Densha_de_Go_2.png new file mode 100644 index 000000000..48da92468 Binary files /dev/null and b/site/content/entry/yuzu-hades/Densha_de_Go_2.png differ diff --git a/site/content/entry/yuzu-hades/Dragon Quest XI.png b/site/content/entry/yuzu-hades/Dragon Quest XI.png new file mode 100644 index 000000000..643644fd5 Binary files /dev/null and b/site/content/entry/yuzu-hades/Dragon Quest XI.png differ diff --git a/site/content/entry/yuzu-hades/FF_XII.png b/site/content/entry/yuzu-hades/FF_XII.png new file mode 100644 index 000000000..bb613b714 Binary files /dev/null and b/site/content/entry/yuzu-hades/FF_XII.png differ diff --git a/site/content/entry/yuzu-hades/FF_XII_2.png b/site/content/entry/yuzu-hades/FF_XII_2.png new file mode 100644 index 000000000..ab179f24e Binary files /dev/null and b/site/content/entry/yuzu-hades/FF_XII_2.png differ diff --git a/site/content/entry/yuzu-hades/Fire emblem Three houses.png b/site/content/entry/yuzu-hades/Fire emblem Three houses.png new file mode 100644 index 000000000..1fbcaf40e Binary files /dev/null and b/site/content/entry/yuzu-hades/Fire emblem Three houses.png differ diff --git a/site/content/entry/yuzu-hades/Hat in Time.png b/site/content/entry/yuzu-hades/Hat in Time.png new file mode 100644 index 000000000..2c33f7761 Binary files /dev/null and b/site/content/entry/yuzu-hades/Hat in Time.png differ diff --git a/site/content/entry/yuzu-hades/Hyrule_Warriors_DE.png b/site/content/entry/yuzu-hades/Hyrule_Warriors_DE.png new file mode 100644 index 000000000..8ffcb8f4e Binary files /dev/null and b/site/content/entry/yuzu-hades/Hyrule_Warriors_DE.png differ diff --git a/site/content/entry/yuzu-hades/Luigis Mansion 3.png b/site/content/entry/yuzu-hades/Luigis Mansion 3.png new file mode 100644 index 000000000..58cc695f3 Binary files /dev/null and b/site/content/entry/yuzu-hades/Luigis Mansion 3.png differ diff --git a/site/content/entry/yuzu-hades/MK8_EA.png b/site/content/entry/yuzu-hades/MK8_EA.png new file mode 100644 index 000000000..fbd35b914 Binary files /dev/null and b/site/content/entry/yuzu-hades/MK8_EA.png differ diff --git a/site/content/entry/yuzu-hades/MK8_Hades.png b/site/content/entry/yuzu-hades/MK8_Hades.png new file mode 100644 index 000000000..54f6f7bfb Binary files /dev/null and b/site/content/entry/yuzu-hades/MK8_Hades.png differ diff --git a/site/content/entry/yuzu-hades/Mario and rabbids.png b/site/content/entry/yuzu-hades/Mario and rabbids.png new file mode 100644 index 000000000..a6081fc93 Binary files /dev/null and b/site/content/entry/yuzu-hades/Mario and rabbids.png differ diff --git a/site/content/entry/yuzu-hades/Marvel Ultimate Alliance 3.png b/site/content/entry/yuzu-hades/Marvel Ultimate Alliance 3.png new file mode 100644 index 000000000..ac2b280cb Binary files /dev/null and b/site/content/entry/yuzu-hades/Marvel Ultimate Alliance 3.png differ diff --git a/site/content/entry/yuzu-hades/Minecraft_Dungeons_2.png b/site/content/entry/yuzu-hades/Minecraft_Dungeons_2.png new file mode 100644 index 000000000..dfb808df0 Binary files /dev/null and b/site/content/entry/yuzu-hades/Minecraft_Dungeons_2.png differ diff --git a/site/content/entry/yuzu-hades/P5S.png b/site/content/entry/yuzu-hades/P5S.png new file mode 100644 index 000000000..b6720cfbe Binary files /dev/null and b/site/content/entry/yuzu-hades/P5S.png differ diff --git a/site/content/entry/yuzu-hades/P5S_2.png b/site/content/entry/yuzu-hades/P5S_2.png new file mode 100644 index 000000000..8294653a3 Binary files /dev/null and b/site/content/entry/yuzu-hades/P5S_2.png differ diff --git a/site/content/entry/yuzu-hades/P5S_3.png b/site/content/entry/yuzu-hades/P5S_3.png new file mode 100644 index 000000000..0d240418f Binary files /dev/null and b/site/content/entry/yuzu-hades/P5S_3.png differ diff --git a/site/content/entry/yuzu-hades/Rune_Factory_5.png b/site/content/entry/yuzu-hades/Rune_Factory_5.png new file mode 100644 index 000000000..44d763c44 Binary files /dev/null and b/site/content/entry/yuzu-hades/Rune_Factory_5.png differ diff --git a/site/content/entry/yuzu-hades/Rune_Factory_5_2.png b/site/content/entry/yuzu-hades/Rune_Factory_5_2.png new file mode 100644 index 000000000..3036e8794 Binary files /dev/null and b/site/content/entry/yuzu-hades/Rune_Factory_5_2.png differ diff --git a/site/content/entry/yuzu-hades/Splatoon2-ea.png b/site/content/entry/yuzu-hades/Splatoon2-ea.png new file mode 100644 index 000000000..d5962b2d3 Binary files /dev/null and b/site/content/entry/yuzu-hades/Splatoon2-ea.png differ diff --git a/site/content/entry/yuzu-hades/Spyro_Reignited.png b/site/content/entry/yuzu-hades/Spyro_Reignited.png new file mode 100644 index 000000000..fb9a8a4fb Binary files /dev/null and b/site/content/entry/yuzu-hades/Spyro_Reignited.png differ diff --git a/site/content/entry/yuzu-hades/Spyro_Reignited_2.png b/site/content/entry/yuzu-hades/Spyro_Reignited_2.png new file mode 100644 index 000000000..298d9364b Binary files /dev/null and b/site/content/entry/yuzu-hades/Spyro_Reignited_2.png differ diff --git a/site/content/entry/yuzu-hades/Trials of mana.png b/site/content/entry/yuzu-hades/Trials of mana.png new file mode 100644 index 000000000..ccf4c90dc Binary files /dev/null and b/site/content/entry/yuzu-hades/Trials of mana.png differ diff --git a/site/content/entry/yuzu-hades/Yoshi's Crafted World.png b/site/content/entry/yuzu-hades/Yoshi's Crafted World.png new file mode 100644 index 000000000..44c5387d2 Binary files /dev/null and b/site/content/entry/yuzu-hades/Yoshi's Crafted World.png differ diff --git a/site/content/entry/yuzu-hades/banner.png b/site/content/entry/yuzu-hades/banner.png new file mode 100644 index 000000000..530ecc2b8 Binary files /dev/null and b/site/content/entry/yuzu-hades/banner.png differ diff --git a/site/content/entry/yuzu-hades/bd2.png b/site/content/entry/yuzu-hades/bd2.png new file mode 100644 index 000000000..da9779561 Binary files /dev/null and b/site/content/entry/yuzu-hades/bd2.png differ diff --git a/site/content/entry/yuzu-hades/botw-ea.png b/site/content/entry/yuzu-hades/botw-ea.png new file mode 100644 index 000000000..db3e8d405 Binary files /dev/null and b/site/content/entry/yuzu-hades/botw-ea.png differ diff --git a/site/content/entry/yuzu-hades/botw-hades.png b/site/content/entry/yuzu-hades/botw-hades.png new file mode 100644 index 000000000..e9506d93a Binary files /dev/null and b/site/content/entry/yuzu-hades/botw-hades.png differ diff --git a/site/content/entry/yuzu-hades/clubhouse.png b/site/content/entry/yuzu-hades/clubhouse.png new file mode 100644 index 000000000..7d224c6d3 Binary files /dev/null and b/site/content/entry/yuzu-hades/clubhouse.png differ diff --git a/site/content/entry/yuzu-hades/farm_sim_20.png b/site/content/entry/yuzu-hades/farm_sim_20.png new file mode 100644 index 000000000..13eb12a02 Binary files /dev/null and b/site/content/entry/yuzu-hades/farm_sim_20.png differ diff --git a/site/content/entry/yuzu-hades/feth.png b/site/content/entry/yuzu-hades/feth.png new file mode 100644 index 000000000..5ad2f9bbb Binary files /dev/null and b/site/content/entry/yuzu-hades/feth.png differ diff --git a/site/content/entry/yuzu-hades/feth1.png b/site/content/entry/yuzu-hades/feth1.png new file mode 100644 index 000000000..b84bc73ad Binary files /dev/null and b/site/content/entry/yuzu-hades/feth1.png differ diff --git a/site/content/entry/yuzu-hades/feth2.png b/site/content/entry/yuzu-hades/feth2.png new file mode 100644 index 000000000..8080be274 Binary files /dev/null and b/site/content/entry/yuzu-hades/feth2.png differ diff --git a/site/content/entry/yuzu-hades/hellblade.png b/site/content/entry/yuzu-hades/hellblade.png new file mode 100644 index 000000000..c8ab7a50c Binary files /dev/null and b/site/content/entry/yuzu-hades/hellblade.png differ diff --git a/site/content/entry/yuzu-hades/hellblade_2.png b/site/content/entry/yuzu-hades/hellblade_2.png new file mode 100644 index 000000000..432ac8002 Binary files /dev/null and b/site/content/entry/yuzu-hades/hellblade_2.png differ diff --git a/site/content/entry/yuzu-hades/hollow_knight_ea.png b/site/content/entry/yuzu-hades/hollow_knight_ea.png new file mode 100644 index 000000000..eb88f61d3 Binary files /dev/null and b/site/content/entry/yuzu-hades/hollow_knight_ea.png differ diff --git a/site/content/entry/yuzu-hades/hollow_knight_hades.png b/site/content/entry/yuzu-hades/hollow_knight_hades.png new file mode 100644 index 000000000..388c968e2 Binary files /dev/null and b/site/content/entry/yuzu-hades/hollow_knight_hades.png differ diff --git a/site/content/entry/yuzu-hades/index.md b/site/content/entry/yuzu-hades/index.md new file mode 100644 index 000000000..f870ae416 --- /dev/null +++ b/site/content/entry/yuzu-hades/index.md @@ -0,0 +1,347 @@ ++++ +date = "2021-07-10T03:40:00+05:30" +title = "New Feature Release - Shader Decompiler Rewrite" +author = "CaptV0rt3x" +forum = 423256 ++++ + +Greetings, yuz-ers! +The long awaited day is finally here. +We are very excited to present to you, **Project Hades**, our shader decompiler rewrite! +This massive update includes huge performance improvements, countless bug fixes, and more. +Let's get started! + + +  + +Project Hades is now available in the latest [yuzu Early Access build](https://yuzu-emu.org/help/early-access/). +As always, we ask that you test various games with these builds and if you encounter any issues, bugs, or crashes, please reach out to us via the [Discord](https://discord.gg/u77vRWY) Patreon channels. +

Notice

The entire shader generation process has been redesigned from the ground up, thus existing shader caches have been invalidated. Users will need to build their shader caches again, from scratch, with Project Hades.

+ +# What is Project Hades ? + +> **Project Hades** is the codename for our shader decompiler code rewrite, although at this point it's become much more than that. + +For those who don't know what a shader decompiler is, you'll need to understand the process of how games render (show/display) anything. +[Shaders](https://en.wikipedia.org/wiki/Shader) are special programs that are coded to perform various tasks on GPUs, typically relating to rendering graphics on display. +Shaders are usually written in high-level shader languages compatible with the graphics API in use - e.g. [OpenGL Shading Language (GLSL)](https://en.wikipedia.org/wiki/OpenGL_Shading_Language), [Standard Portable Intermediate Representation - V (SPIR-V)](https://en.wikipedia.org/wiki/Standard_Portable_Intermediate_Representation), and [OpenGL ARB Assembly language (GLASM)](https://en.wikipedia.org/wiki/ARB_assembly_language). +Games often use hundreds or thousands of these shaders to tell the GPU what to render and how to do it. + +{{< imgs + "./yuzu_gpu.png| yuzu Shader Generation" +>}} + +In the case of Switch games, they also use shaders to render graphics on the Switch itself. +However, since these shaders are precompiled for the Switch's GPU, yuzu cannot use them directly to render graphics using the host GPU (User's GPU). +Therefore, yuzu first decompiles these shaders into something called [IR, or Intermediate Representation](https://en.wikipedia.org/wiki/Intermediate_representation), which is then used to generate the high-level **GLSL/SPIR-V/GLASM** shaders used by the graphics APIs and drivers to render games on the host GPU. + +Shader decompilation is the process of translating the guest (in this case, the Nintendo Switch) GPU machine code to a representation that can be compiled on the host (User's PC) GPU. +Shader compilation is the process of taking that representation and sending it to the host GPU driver to get compiled and then executed on the user's GPU. + +## Goals + +The main goal of Project Hades was to redesign the decompiler and shader generation code with a focus on simplicity and accuracy. +It aimed to make both decompilation and compilation faster overall, thus improving the performance. +Rewriting the decompiler would allow us to audit it through [unit testing](https://en.wikipedia.org/wiki/Unit_testing), following a design similar to [dynarmic](https://github.com/MerryMage/dynarmic), allowing proper program analysis and optimizations over fast-to-emit intermediate representation. + +  + +{{< imgs + "./Dark Souls.png| Dark Souls" + "./Dragon Quest XI.png| Dragon Quest XI" +>}} + +Taking a leaf from dynarmic's book, the developers opted to use an [SSA representation](https://en.wikipedia.org/wiki/Static_single_assignment_form), as it would work very nicely with the `SPIR-V` IR used for shaders, thanks to its native support for SSA. +As for the unit testing, [Rodrigo](https://github.com/ReinUsesLisp) wrote [homebrew tests for the hardware](https://github.com/ReinUsesLisp/nxgpucatch) which helped the developers accurately emulate hardware behaviour. + +But this was just the beginning. +Over the course of a few months, the developers would go on to face and overcome many hurdles with the code rewrite and the Project's goals would expand to accommodate much more. + +# Overview of changes + +Project Hades was a collaborative effort from developers [Rodrigo](https://github.com/ReinUsesLisp), [Blinkhawk](https://github.com/FernandoS27), and [epicboy](https://github.com/ameerj). +They distributed the required work among themselves and spent countless hours in coding, unit testing, game testing, and performance validation. + +[Blinkhawk](https://github.com/FernandoS27) mainly worked on implementing miscellaneous instructions, including texture sampling instructions required for decompilation. +He added support for Nvidia's `VertexA shader stage`, a non-standard shader stage available on Nvidia hardware that is executed before the regular `VertexB shader stage`. + +This allowed games such as `Catherine: Full Body`, `Bravely Default 2`, and `A Hat in Time` to render graphics for the first time. +[Blinkhawk](https://github.com/FernandoS27) also fixed an issue in yuzu's texture cache relating to the texture streaming used in Unreal Engine 4 (UE4) games, resolving many of their rendering issues. + +**Note:** Due to a race condition in our GPU Emulation, to render Catherine Full Body correctly, you may need to disable Asynchronous GPU Emulation. + +  + +{{< single-title-imgs + "Catherine: Full Body" + "./Catherine.png" + "./Catherine_2.png" +>}} + +{{< imgs + "./Hat in Time.png| A Hat in Time" +>}} + +{{< single-title-imgs + "Bravely Default II" + "./Bravely_Default_2.png" + "./Bravely_Default_2_2.png" +>}} + +[epicboy](https://github.com/ameerj) implemented almost all of the arithmetic, logical, and floating-point instructions, as well as developing the entire GLSL backend. +**GLSL** is the default backend, when the OpenGL API is selected in the yuzu configuration settings. + +The **GLSL** backend rewrite was not part of the initial plan for Project Hades, as the developers only intended to work on **GLASM** and **SPIR-V**, but it was later included due to how buggy and slow some OpenGL **SPIR-V** compilers are. +That said, some OpenGL drivers benefit greatly from the use of **SPIR-V** shaders, so the choice of using **SPIR-V** on OpenGL is left as an experimental setting. + +  + +{{< imgs + "./Mario and rabbids.png| Mario and Rabbids" + "./monchrome_hades.png| Monochrome" +>}} + +[Rodrigo](https://github.com/ReinUsesLisp) designed the overall structure to support these changes, and developed multiple optimization passes to improve performance wherever possible. +In addition to that, he rewrote the entire **GLASM** (GL Assembly) backend, and integrated the existing frontend rasterizers with the new backends. + +The **GLASM** backend is a special path where the decompiled shaders ([assembly language](https://en.wikipedia.org/wiki/Assembly_language)) skip the shader compilation steps on the host GPU, thus improving the performance. +Unfortunately, **GLASM** is only supported by Nvidia GPUs, limiting the scope of this performance boost. + +  + +{{< imgs + "Crash Bandicoot 4.png| Crash Bandicoot 4" + "world-of-ff-hades.jpg| World of Final Fantasy" +>}} + +While these were the major changes, there were also many other minor improvements. +Changing how the shaders are generated also meant changing the way shader information is presented to the renderers. +This was overhauled for simplicity, which led to some new features, and ease of caching. + +## Vulkan Pipeline Caching + +All the information required to generate pipelines from scratch now gets cached to disk, thereby removing shader stutter almost completely on Vulkan. +In contrast, OpenGL can still encounter shader stutters due to unpredictable or undocumented state changes. +Vulkan still can have minor stutters when new shaders are detected, but it hasn't been noticeable during our testing. + +## Asynchronous Pipeline Creation + +yuzu already supported `Asynchronous Shaders`, where draw calls are skipped (rendering is paused) until the shader, or in Vulkan's case, the pipeline, is compiled. +This is nice in some cases because it allows for more consistent play sessions, minimizing stutter from shader compilations. +But this also has a big drawback: it introduces graphical glitches, which are sometimes persistent throughout the play session. +While this is not an issue after restarting emulation and having the shaders cached, it's not optimal. + +A better way to implement this for Vulkan was to build pipelines in parallel without skipping draw calls. +In other words, continue processing GPU commands while the pipelines are being built. +This allows building one pipeline per CPU thread (minus one) in parallel while the game is executing. +This results in reduced stutter that is, in a way, similar to skipping draw calls. + +
How does this work?
+To understand why this is possible, it's necessary to explain how yuzu's Vulkan command recording works. Commands are recorded and deferred to a separate thread for processing (sometimes called the "Command Submission (CS) thread").
+
+This thread runs in parallel to the main GPU thread. This means the CS thread can build the pipelines sequentially while the main GPU thread continues its execution, periodically pushing new commands to the CS thread.
+
+Sadly, this is not possible at the moment on OpenGL, because drivers wait more often for their CS thread than yuzu on its own CS thread. +It may be possible if we optimize the whole OpenGL backend to avoid "glGen*" and "glGetSynciv" calls within a draw call. +
+ +## Even more!! + +On top of these big improvements, we also have many minor optimizations. Some notable ones are listed below: + +- Project Hades keeps track of the number of bytes used in constant buffers and passes this information to the buffer cache. This reduces the number of uploaded bytes on some titles, thus improving performance. +- Vulkan command submission to the GPU now happens on the separate CS thread, increasing performance by 1 to 2 FPS in `Super Mario Odyssey`, although presentation to screen is still being synchronized. +- Synchronization for [texture buffers](https://www.khronos.org/opengl/wiki/Buffer_Texture) between the texture cache and the buffer cache, fixing some crashes on Koei Tecmo games. +- Generate specialized Vulkan descriptor pools, sharing pools within similar pipelines. This reduces memory consumption and boot time on most drivers, saving ~700 MiB of VRAM on AMD compared to the previous approach. +- Usage of [VK_KHR_push_descriptor](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_push_descriptor.html) when available. Reduces the overhead of updating descriptor sets on Nvidia by 57% and by 10% on Intel (measured on `Super Smash Bros. Ultimate` 1v1 on Final Destination). It also reduces memory consumption but this hasn't been measured. +- Usage of [VK_EXT_conservative_rasterization](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_conservative_rasterization.html) and [VK_EXT_provoking_vertex](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_provoking_vertex.html) when available. +- Use specialized "pre-draw" functions per pipeline to reduce unnecessary work. +- `Texture Reaper`, which cleans the least used resources in your VRAM to reduce VRAM usage. We will cover this and others, in detail, in our next progress report. + +# Graphical fixes + +Thanks to the redesign and reimplementation of our entire shader generation code, the developers were able to investigate and identify the causes for graphical glitches in many games. +In fact, some games like `Yoshi's Crafted World`, `Trials of Mana`, `Minecraft Dungeons`, and many others, now render almost perfectly. +`The Legend of Zelda: Breath of the Wild` is now fully playable on Vulkan. + +{{< imgs + "./BOTW_Vulkan.png| Breath of the Wild (fixed runes in Vulkan)" +>}} + +{{< single-title-imgs + "The Legend of Zelda: Breath of the Wild (EA Vs. HADES)" + "./botw-ea.png" + "./botw-hades.png" +>}} + +{{< imgs + "./Yoshi's Crafted World.png| Yoshi's Crafted World" + "./bd2.png| Bravely Default II" +>}} + +{{< single-title-imgs + "Minecraft Dungeons" + "./minecraft_dungeons.png" + "./Minecraft_Dungeons_2.png" +>}} + +The broken bloom, causing sand and fog in `Super Mario Odyssey` to render incorrectly, is now fixed! + +{{< single-title-imgs + "Super Mario Odyssey (EA Vs. HADES)" + "./smo_sand_ea.png" + "./smo_sand_hades.png" + "./smo_fog_ea.png" + "./smo_fog_hades.png" +>}} + +Thanks to the implementation of tessellation shaders, the sand in `Luigi's Mansion 3` is no longer broken! +{{< imgs + "./Luigis Mansion 3.png" +>}} + +Various graphical glitches, crashes and general stability issues in `Fire Emblem: Three houses`, `Hyrule Warriors: Age of Calamity`, `Marvel Ultimate Alliance 3`, `Persona 5 Strikers`, and `Xenoblade Chronicles` were also fixed. + +{{< single-title-imgs + "Fire Emblem: Three Houses" + "./Fire emblem Three houses.png" + "./feth1.png" + "./feth2.png" +>}} + +{{< single-title-imgs + "Hyrule Warriors: Age of Calamity" + "./AOC_2.png" + "./AOC_3.png" + "./AOC_4.png" +>}} + +{{< imgs + "./Marvel Ultimate Alliance 3.png| Marvel Ultimate Alliance 3" + "./Hyrule_Warriors_DE.png| Hyrule Warriors Definitive Edition" +>}} + +{{< single-title-imgs + "Persona 5 Strikers" + "./P5S.png" + "./P5S_2.png" + "./P5S_3.png" +>}} + +{{< single-title-imgs + "Xenoblade Chronicles (EA Vs. HADES)" + "./xc-ea.jpg" + "./xc-hades.jpg" +>}} + +`Hollow Knight's` issue with transparent textures has been fixed. +{{< single-title-imgs + "Hollow Knight (EA Vs. HADES)" + "./hollow_knight_ea.png" + "./hollow_knight_hades.png" +>}} + +`Kirby Star Allies`, `Mario Kart 8 deluxe`, `Tony Hawk Pro Skater`, `Story of Seasons`, and `Clubhouse` games, were among many other titles that saw graphical glitches fixed. +`Rune Factory 4` renders perfectly now and `Rune Factory 5` has improved rendering. + +{{< single-title-imgs + "Kirby Star Allies (EA Vs. HADES)" + "./kirby-ea.jpg" + "./kirby-hades.jpg" +>}} + +{{< single-title-imgs + "Mario Kart 8 Deluxe (EA Vs. HADES)" + "./MK8_EA.png" + "./MK8_Hades.png" +>}} + +{{< single-title-imgs + "Tony Hawk Pro Skater (EA Vs. HADES)" + "./tonyhawk-ea.png" + "./tonyhawk-hades.png" +>}} + +{{< single-title-imgs + "Story of Seasons (EA Vs. HADES)" + "./story-of-seasons_ea.png" + "./story-of-seasons_hades.png" +>}} + +{{< single-title-imgs + "Rune Factory 4 (EA Vs. HADES)" + "./runefactory-ea.jpg" + "./runefactory-hades.jpg" +>}} + +{{< single-title-imgs + "Rune Factory 5" + "./Rune_Factory_5.png" + "./Rune_Factory_5_2.png" +>}} + +{{< imgs + "./Trials of mana.png| Trials of Mana" + "./clubhouse.png| Clubhouse" + "./farm_sim_20.png| Farming Simulator 20" +>}} + +### And many more!! + +{{< single-title-imgs + "Densha de Go" + "./Densha_de_Go.png" + "./Densha_de_Go_2.png" +>}} + +{{< single-title-imgs + "Final Fantasy XII" + "./FF_XII.png" + "./FF_XII_2.png" +>}} + +{{< single-title-imgs + "Hellblade: Senua's Sacrifice" + "./hellblade.png" + "./hellblade_2.png" +>}} + +{{< single-title-imgs + "Spyro Reignited Trilogy" + "./Spyro_Reignited.png" + "./Spyro_Reignited_2.png" +>}} + +# Alright! Let's talk numbers now! + +Project Hades rewrote a vast majority of the GPU code and made tons of improvements and optimizations to boost the performance. +Since the changes touched on many areas of the GPU emulation, we observed performance improvements in many titles. + +Below are some performance comparison charts between yuzu Early Access (1860) and Project Hades on our recommended specifications using Vulkan API. +Please note that at the time of comparison, EA 1860 was almost equivalent to yuzu Mainline, with no changes that would significantly affect performance. + +{{< imgs + "./perf-1.png| Recommended Specs (* is OpenGL)" +>}} + +That's not all. +The improvements made to the Vulkan backend in Project Hades have greatly improved performance for AMD GPU users on Linux (RADV). + +{{< imgs + "./perf-2.png| Linux AMD (RADV)" +>}} + +These are just a small testament to the performance improvements that Hades brings. +We will be sharing more performance charts with our next progress report. + +# Fin + +Our development efforts were massively accelerated by our testers, who tested dozens of titles for bugs, fixes, and performance regressions. +Since our testing couldn't realistically cover all titles, we request that you test and play your favourite games in yuzu and experience the improvements yourselves. +While testing, if you come across any regressions, glitches, bugs, or crashes, please reach out to us via our Discord Patreon Channels. +This will assist us in identifying and fixing any potential issues Project Hades might present. + +### That's all we have for now, until next time! Happy emulating! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-hades/kirby-ea.jpg b/site/content/entry/yuzu-hades/kirby-ea.jpg new file mode 100644 index 000000000..e46ccde6c Binary files /dev/null and b/site/content/entry/yuzu-hades/kirby-ea.jpg differ diff --git a/site/content/entry/yuzu-hades/kirby-hades.jpg b/site/content/entry/yuzu-hades/kirby-hades.jpg new file mode 100644 index 000000000..30de4d7e6 Binary files /dev/null and b/site/content/entry/yuzu-hades/kirby-hades.jpg differ diff --git a/site/content/entry/yuzu-hades/minecraft_dungeons.png b/site/content/entry/yuzu-hades/minecraft_dungeons.png new file mode 100644 index 000000000..d32909e55 Binary files /dev/null and b/site/content/entry/yuzu-hades/minecraft_dungeons.png differ diff --git a/site/content/entry/yuzu-hades/monchrome_hades.png b/site/content/entry/yuzu-hades/monchrome_hades.png new file mode 100644 index 000000000..b36518989 Binary files /dev/null and b/site/content/entry/yuzu-hades/monchrome_hades.png differ diff --git a/site/content/entry/yuzu-hades/perf-1.png b/site/content/entry/yuzu-hades/perf-1.png new file mode 100644 index 000000000..e50f4e786 Binary files /dev/null and b/site/content/entry/yuzu-hades/perf-1.png differ diff --git a/site/content/entry/yuzu-hades/perf-2.png b/site/content/entry/yuzu-hades/perf-2.png new file mode 100644 index 000000000..461af8862 Binary files /dev/null and b/site/content/entry/yuzu-hades/perf-2.png differ diff --git a/site/content/entry/yuzu-hades/runefactory-ea.jpg b/site/content/entry/yuzu-hades/runefactory-ea.jpg new file mode 100644 index 000000000..0ba41a68d Binary files /dev/null and b/site/content/entry/yuzu-hades/runefactory-ea.jpg differ diff --git a/site/content/entry/yuzu-hades/runefactory-hades.jpg b/site/content/entry/yuzu-hades/runefactory-hades.jpg new file mode 100644 index 000000000..bf4f45c57 Binary files /dev/null and b/site/content/entry/yuzu-hades/runefactory-hades.jpg differ diff --git a/site/content/entry/yuzu-hades/smo_fog_ea.png b/site/content/entry/yuzu-hades/smo_fog_ea.png new file mode 100644 index 000000000..33fa097f8 Binary files /dev/null and b/site/content/entry/yuzu-hades/smo_fog_ea.png differ diff --git a/site/content/entry/yuzu-hades/smo_fog_hades.png b/site/content/entry/yuzu-hades/smo_fog_hades.png new file mode 100644 index 000000000..eee042c93 Binary files /dev/null and b/site/content/entry/yuzu-hades/smo_fog_hades.png differ diff --git a/site/content/entry/yuzu-hades/smo_sand_ea.png b/site/content/entry/yuzu-hades/smo_sand_ea.png new file mode 100644 index 000000000..4dc9bd99e Binary files /dev/null and b/site/content/entry/yuzu-hades/smo_sand_ea.png differ diff --git a/site/content/entry/yuzu-hades/smo_sand_hades.png b/site/content/entry/yuzu-hades/smo_sand_hades.png new file mode 100644 index 000000000..459973253 Binary files /dev/null and b/site/content/entry/yuzu-hades/smo_sand_hades.png differ diff --git a/site/content/entry/yuzu-hades/splatoon2-hades.png b/site/content/entry/yuzu-hades/splatoon2-hades.png new file mode 100644 index 000000000..28de3d255 Binary files /dev/null and b/site/content/entry/yuzu-hades/splatoon2-hades.png differ diff --git a/site/content/entry/yuzu-hades/story-of-seasons_ea.png b/site/content/entry/yuzu-hades/story-of-seasons_ea.png new file mode 100644 index 000000000..ee5d7622b Binary files /dev/null and b/site/content/entry/yuzu-hades/story-of-seasons_ea.png differ diff --git a/site/content/entry/yuzu-hades/story-of-seasons_hades.png b/site/content/entry/yuzu-hades/story-of-seasons_hades.png new file mode 100644 index 000000000..b077d2a50 Binary files /dev/null and b/site/content/entry/yuzu-hades/story-of-seasons_hades.png differ diff --git a/site/content/entry/yuzu-hades/summary.png b/site/content/entry/yuzu-hades/summary.png new file mode 100644 index 000000000..9c8b08402 Binary files /dev/null and b/site/content/entry/yuzu-hades/summary.png differ diff --git a/site/content/entry/yuzu-hades/tonyhawk-ea.png b/site/content/entry/yuzu-hades/tonyhawk-ea.png new file mode 100644 index 000000000..4fb9894bb Binary files /dev/null and b/site/content/entry/yuzu-hades/tonyhawk-ea.png differ diff --git a/site/content/entry/yuzu-hades/tonyhawk-hades.png b/site/content/entry/yuzu-hades/tonyhawk-hades.png new file mode 100644 index 000000000..fb326795c Binary files /dev/null and b/site/content/entry/yuzu-hades/tonyhawk-hades.png differ diff --git a/site/content/entry/yuzu-hades/world-of-ff-hades.jpg b/site/content/entry/yuzu-hades/world-of-ff-hades.jpg new file mode 100644 index 000000000..d34125ee3 Binary files /dev/null and b/site/content/entry/yuzu-hades/world-of-ff-hades.jpg differ diff --git a/site/content/entry/yuzu-hades/xc-ea.jpg b/site/content/entry/yuzu-hades/xc-ea.jpg new file mode 100644 index 000000000..89880a684 Binary files /dev/null and b/site/content/entry/yuzu-hades/xc-ea.jpg differ diff --git a/site/content/entry/yuzu-hades/xc-hades.jpg b/site/content/entry/yuzu-hades/xc-hades.jpg new file mode 100644 index 000000000..f3749d88c Binary files /dev/null and b/site/content/entry/yuzu-hades/xc-hades.jpg differ diff --git a/site/content/entry/yuzu-hades/yuzu_gpu.png b/site/content/entry/yuzu-hades/yuzu_gpu.png new file mode 100644 index 000000000..8c03a1492 Binary files /dev/null and b/site/content/entry/yuzu-hades/yuzu_gpu.png differ diff --git a/site/content/entry/yuzu-linux-installer/banner.png b/site/content/entry/yuzu-linux-installer/banner.png new file mode 100644 index 000000000..c080f0807 Binary files /dev/null and b/site/content/entry/yuzu-linux-installer/banner.png differ diff --git a/site/content/entry/yuzu-linux-installer/download.png b/site/content/entry/yuzu-linux-installer/download.png new file mode 100644 index 000000000..58a082baa Binary files /dev/null and b/site/content/entry/yuzu-linux-installer/download.png differ diff --git a/site/content/entry/yuzu-linux-installer/index.md b/site/content/entry/yuzu-linux-installer/index.md new file mode 100644 index 000000000..d0029adc9 --- /dev/null +++ b/site/content/entry/yuzu-linux-installer/index.md @@ -0,0 +1,52 @@ ++++ +date = "2022-08-11T23:00:00+05:30" +title = "New Feature Release - Installer for Linux" +author = "CaptV0rt3x" +forum = 612296 ++++ + +Hey there, yuz-ers! +Guess what? We've got some news to share. +We're excited to announce that the yuzu installer now supports Linux! +Let's jump right in! + + + +## What's happening? + +As we mentioned, the yuzu installer is available for Linux. +The installer will distribute `AppImages` of Mainline and Early Access builds for our Linux users. + +You can now download the new installer from our [Downloads page](https://yuzu-emu.org/downloads/). + +(Note: Early Access builds require a subscription to our [Patreon](https://www.patreon.com/yuzuteam). We appreciate any and all support!) + +## Why? + +When we originally released our installer, our user base was predominantly composed of Windows users. +Although a weak excuse, that's why the installer's Linux compatibility wasn't a priority for us then. + + +But, over the years we've seen consistent growth in the number of our Linux users +and realized that we had to ensure that they reaped the benefits of the installer too. We're so happy our Linux community continues to expand and support us. + +{{< imgs + "./install.png| It's never a bad idea to pick both builds" + >}} + +Thanks to the efforts of [toastUnlimited](https://github.com/lat9nq), who implemented Linux compatibility for the installer, +we're now able to address this long overdue feature request. + +{{< imgs + "./download.png| Remember, we update daily!" + >}} + +## Fin + +As with any new update, we've tested the installer internally, but our efforts can't compare to the community as a whole. +We could have easily missed an edge case or some weird bug or issue. +So, please reach out to us on our [Discord](https://discord.gg/u77vRWY) and report any bugs you find, so that we can quickly address them. + +That's all we have for now, until next time! Happy emulating! + +{{< article-end >}} diff --git a/site/content/entry/yuzu-linux-installer/install.png b/site/content/entry/yuzu-linux-installer/install.png new file mode 100644 index 000000000..b54f39c30 Binary files /dev/null and b/site/content/entry/yuzu-linux-installer/install.png differ diff --git a/site/content/entry/yuzu-linux-installer/maintenance.png b/site/content/entry/yuzu-linux-installer/maintenance.png new file mode 100644 index 000000000..5f518f71c Binary files /dev/null and b/site/content/entry/yuzu-linux-installer/maintenance.png differ diff --git a/site/content/entry/yuzu-linux-installer/summary.png b/site/content/entry/yuzu-linux-installer/summary.png new file mode 100644 index 000000000..9f17a903d Binary files /dev/null and b/site/content/entry/yuzu-linux-installer/summary.png differ diff --git a/site/content/entry/yuzu-migration/banner.png b/site/content/entry/yuzu-migration/banner.png new file mode 100644 index 000000000..088451210 Binary files /dev/null and b/site/content/entry/yuzu-migration/banner.png differ diff --git a/site/content/entry/yuzu-migration/index.md b/site/content/entry/yuzu-migration/index.md new file mode 100644 index 000000000..127ae0f3b --- /dev/null +++ b/site/content/entry/yuzu-migration/index.md @@ -0,0 +1,77 @@ ++++ +date = "2019-10-07T06:20:00+05:30" +title = "yuzu - The Migration" +author = "CaptV0rt3x" +forum = 150132 ++++ + +A very good day to all the ***yuz-ers*** out there! +We are currently in the process of merging both the Canary and Nightly versions of yuzu into a single release channel. +Jump right in to find out more about this! + +*** + +## Announcement + +
+
+

We are merging yuzu Nightly and yuzu Canary releases into a single "yuzu" release!

+
+
+ +Don't fret, we are just doing some reorganization to make things easier for both the users and the developers. +Today marks the retirement of both yuzu Nightly and yuzu Canary release channels. +From tomorrow, yuzu will have only a single release channel, simply dubbed "yuzu". + +Most of you might be thinking, "why are they doing this?" or "what does this mean for the users?". +Let's go back in time for a bit to understand the "why?" part. + +## A big "Why?" + +When yuzu was first forked from Citra and was setting up shop as a separate project, it borrowed a few things from Citra (apart from the code). +In those, were the general ideas about build releases, build generating infrastructure, and release channel naming convention. +For a good while, these ideas served the purpose - that is to generate builds and distribute them, but it was high time for some improvements. + +In the initial days of yuzu development, due to the large list of missing/unknown functionality, we had to add `asserts` (or `assertions`) wherever necessary in the codebase. +Assertions are statements used to test assumptions made by the programmers. +This allowed us to understand what functionality we were missing and which games used those, if we needed to test them. + +The philosophy behind the nightly channel was to have a release channel with asserts enabled, so that the developers keep getting data on what games were missing what functionality. +But having yuzu assert and crash while playing a game rendered it unusable for normal users. +To overcome this, we decided to release the canary builds with specific `IGNORE ASSERTS` code included. + +This made yuzu ignore all those assertions and allowed normal users to test or play games on it. +But as yuzu progressed further, the canary builds gained increased popularity among the users as the nightly builds were absolutely unusable. +As a result, the developers had to concentrate more on the canary builds, so that they could get users to test their code and thus improve yuzu. + +As we were making good progress in reducing the assertions, the nightly release branch no longer had anything to offer to the developers or the users. +It was also redundant to have two `stable` release channels for the same codebase. +Hence the reorganization. + +## What does it mean for the users? + +
+
+

From the user's perspective, this doesn't change anything.

+
+
+ +We are just reorganizing things internally and it will not have `any` impact for you, as end-users. +With this slight reorganization, instead of multiple branches, we will now have a single stable branch. +This will make it easier for new users to use yuzu, and with this new release channel, you will still get the same regular `new updates` and `bug fixes` that you've come to expect with the Canary builds. + +With the new release channel, we've migrated our CI from `Travis CI` & `Appveyor CI` to `Azure Dev Ops`. +`Azure Dev Ops` is a free and reliable service provided by Microsoft. +That means things like uptime and support are much better than `Travis` or `Appveyor`. +It is a single service which can generate builds for all of our platforms, which we didn't have before. +We also get more dedicated resources and therefore builds are generated much faster with Azure. + +Starting today, users will be able to get the new and improved yuzu builds via the installer from our [website](https://yuzu-emu.org/downloads/) or our [GitHub](https://github.com/yuzu-emu/yuzu-mainline/releases/). +And if you are already using our installer, you will be automatically migrated to the latest yuzu build. + +{{< imgs + "./installer.png|yuzu Installer (Updated)" +>}} + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-migration/installer.png b/site/content/entry/yuzu-migration/installer.png new file mode 100644 index 000000000..269a1ff96 Binary files /dev/null and b/site/content/entry/yuzu-migration/installer.png differ diff --git a/site/content/entry/yuzu-migration/summary.png b/site/content/entry/yuzu-migration/summary.png new file mode 100644 index 000000000..b75c555be Binary files /dev/null and b/site/content/entry/yuzu-migration/summary.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/banner.png b/site/content/entry/yuzu-mini-dev-1/banner.png new file mode 100644 index 000000000..146ea2307 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/banner.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/index.md b/site/content/entry/yuzu-mini-dev-1/index.md new file mode 100644 index 000000000..9d27295a7 --- /dev/null +++ b/site/content/entry/yuzu-mini-dev-1/index.md @@ -0,0 +1,141 @@ ++++ +date = "2019-06-16T23:00:00+05:30" +title = "Mini-Series - Dev Interview #1" +author = "CaptV0rt3x" +forum = 117857 ++++ + +Hey there, people! +This is a new mini-series of dev interviews, with which we sneak a peek into the lives of our developers. + + +{{< message "Disclaimer" >}} +This mini-series has already been underway for our Patreon supporters and we realized that you all deserve this too. So, here it is. Enjoy. +{{< /message >}} + +We already know and I guess most of you would agree, when we say our devs are awesome! +They are modern day wizards and the work they do is nothing short of magic. +But as they don't interact much with normal users, you guys might not know much about them. +This needs to change and we are here to fix that! + +So to start off this new mini-series, let's interview - ***The Silent Guardian, The Watchful Protector, and The Amazing - Lioncache!!*** + +![Lioncache](./lion.png) + +[Lioncache](https://github.com/lioncash/) has been in the emulation scene for ages. +You may also know him from the Nintendo GameCube/Wii emulator [Dolphin](https://dolphin-emu.org/), as he is one of the core maintainers there as well! +[Lioncache](https://github.com/lioncash/) has also worked on other emulators like [Citra](https://citra-emu.org/), and even dabbling with Commodore 64 emulation! +We managed to pull him away from programming for a few minutes so that he could sit down and talk with us. +*** + +**Q: Hi Lioncache! Could you tell our audience a little bit about yourself?** + +**L:** Heya! I'm Lioncache. I'm some rando Canadian that likes working on system emulators because I find them fun. + +**Q: So what got you into emulation in the first place?** + +**L:** Honestly, it just looked fun. +CPU's are really cool (when they're not being silly) and reverse engineering looked cool (turns out, it really is). +You genuinely learn quite a bit about software and hardware by working on emulation-related things. +It also helps out with one of the many facets of game preservation, which is always nice. + +**Q: Speaking of game preservation, why is that so important to you?** + +**L:** It's important mainly because without external preservation, there's no guarantee that certain games will always be available. +Companies aim to turn a profit from backwards compatibility when they re-release older games from previous consoles on newer hardware. + +Businesses generally aim to strive for a profit (welcome to Econ-101, y'all). +So what this usually means is that only the most popular games with a sizable demand will generally have official re-releases considered for them. +I may not totally agree with that, but it's generally the way things are. +This is generally, why you'll see re-releases of Mario games, Legend of Zelda, etc, but certain other games will, "fall through the cracks of time". + +For example, consider `Marvelous: Mōhitotsu no Takarajima` for the SNES. +This is a fantastic RPG released in 1996, which was directed by `Eiji Aonuma` (who went on to become the series producer for `The Legend of Zelda`). +The game itself reused the engine that was made for `The Legend of Zelda: A Link to the Past`. + +{{< single-title-imgs + "Marvelous: Mōhitotsu no Takarajima (SNES)" + "./marv_1.png" + "./marv_2.png" + "./marv_3.png" +>}} + +So, much of the movement and characteristics are similar but it also had its own unique party system and other things that made it it's own distinct game, and it was really fun to play. +To my knowledge, it hasn't had a re-release in any capacity, nor was it ever localized. +However in 2016 an English fan translation of the game was released, making the game accessible to the English-speaking community. + +Another popular game, which is kind of infamous for not actually being localized and released in North America or Europe during the era of the GameBoy Advance was `Mother 3`. +Plans were initially made to localize it, but it never occurred--plans fell through. +This too, also had an English fan translation made for it. +Which would have been difficult, had the game not been preserved in some form. + +{{< single-title-imgs + "Mother 3 (GBA)" + "./m3_1.png" + "./m3_2.png" + "./m3_3.png" +>}} + +When you have preserved games (in any capacity), along with emulators, it allows potentially doing more with that game. +Consider the scenario where all known cartridges of the game have bit rotten to the degree that they're no longer playable: the game would be considered lost (as far as the public is concerned). + +No one would be able to experience that game, no one would have been able to start a fan translation and made such a great game accessible to those that know English, but not Japanese. +Preservation makes sure that the effort people put into making a game is not lost, while allowing being transformative with the game itself. +It prevents an experience from completely vanishing. + +Game preservation also acts as a secondary backup in the event the actual owning body of the game screws up. +Companies, development teams, anything with a human (or other animal :P) is prone to making mistakes. +Without other people preserving those games, you essentially have a single-point of failure. +No preserved dumps of the game, no emulators, and someone accidentally deletes the source code for said game? Gone. +Forever (unless it's completely remade). +This is why I find game preservation and archiving important. + +**Q: This is some really great insight and we appreciate you sharing with us! Well let's get into the meat and potatoes. Can you tell us what you've been working on for yuzu?** + +**L:** I mostly bounce all over the place because I prefer staging all my changes as their own PR, so I usually end up waiting on stuff to be merged, so I have a few areas I work on stuff: + +#### Display +You've probably seen me breaking out stuff into classes and reorganizing things there. +That's all the busywork before I can actually start implementing things. + +These are the main display services and what they do: + + * `vi:u`: the application level display services—this is what general applications (as the name suggests) will access for basic display stuff. + * `vi:m`: the manager level services—this is what something running in the background, like a compositor, would use. It can fiddle around with display layers and stuff. This service has the most access to everything out of all vi: services. It has no restrictions. + * `vi:s`: the system level services—this is used by, well, the system. This service is like vi:u, except it can also retrieve info about various things related to the display. + +Handling this stuff properly would be nice, since we can properly see how games are trying to interact with displays in a nicer manner. + +#### Audio +Inputs go in, bangin' tunes come out. +We need more of the "bangin' tunes" portion. +So basically I just try to implement things that make audio-related functionality work much nicer. + +#### CPU +Our recompiler, dynarmic, isn't complete. +The 64-bit side of things almost is, but it's not totally complete. +We're missing some instructions, but they're instructions where it doesn't really make sense to use them from a performance standpoint if you're a game dev. +So most of the time users of yuzu don't need to care about it. +However, until we implement all of them, we can't kick our interpreter library (unicorn) into the sun. +So over time I'll be working on that. +We also still need to support 32-bit games, that'll come after the 64-bit side of things is all done. + +#### Kernel +We don't implement everything the kernel is able to do, so this is quite a large area all on its own. +It's also one of the most fundamental parts of Switch emulation, given it drives almost everything else in the emulator in terms of backing functionality (emulated processes, threads, memory mappings, etc). +There's no real specific part of the kernel that I focus on. + +It's more of a cascading effect when working on it: +`Oh, so I make [x] work right, then, with that in place, I can follow up with making [y] work properly.`, etc. + +**Q: Phew, is that all you do? Just kidding! Do you ever find time to eat during all of this?** + +**L:** Hit me with that phat spicy Japanese food any day or any spicy food in general. +*** + +Big thanks to [Lioncache](https://github.com/lioncash/), for sitting with us for this interview and also to special thanks to Jon S. for being the interviewer. +We hope you guys enjoyed it, and we will be back soon with another featured Yuzu dev to bring you guys behind the curtain again. +Until then, thank you for your support and stay tuned! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-mini-dev-1/lion.png b/site/content/entry/yuzu-mini-dev-1/lion.png new file mode 100644 index 000000000..8b6cce41b Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/lion.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/m3_1.png b/site/content/entry/yuzu-mini-dev-1/m3_1.png new file mode 100644 index 000000000..412132848 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/m3_1.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/m3_2.png b/site/content/entry/yuzu-mini-dev-1/m3_2.png new file mode 100644 index 000000000..55642255e Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/m3_2.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/m3_3.png b/site/content/entry/yuzu-mini-dev-1/m3_3.png new file mode 100644 index 000000000..ccfc5d3cf Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/m3_3.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/marv_1.png b/site/content/entry/yuzu-mini-dev-1/marv_1.png new file mode 100644 index 000000000..360eb72da Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/marv_1.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/marv_2.png b/site/content/entry/yuzu-mini-dev-1/marv_2.png new file mode 100644 index 000000000..433b73964 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/marv_2.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/marv_3.png b/site/content/entry/yuzu-mini-dev-1/marv_3.png new file mode 100644 index 000000000..5e8a8cddf Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/marv_3.png differ diff --git a/site/content/entry/yuzu-mini-dev-1/summary.png b/site/content/entry/yuzu-mini-dev-1/summary.png new file mode 100644 index 000000000..bb78e20a7 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-1/summary.png differ diff --git a/site/content/entry/yuzu-mini-dev-2/banner.png b/site/content/entry/yuzu-mini-dev-2/banner.png new file mode 100644 index 000000000..2c6d9c244 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-2/banner.png differ diff --git a/site/content/entry/yuzu-mini-dev-2/botw.png b/site/content/entry/yuzu-mini-dev-2/botw.png new file mode 100644 index 000000000..14146613f Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-2/botw.png differ diff --git a/site/content/entry/yuzu-mini-dev-2/first.png b/site/content/entry/yuzu-mini-dev-2/first.png new file mode 100644 index 000000000..e998ca22a Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-2/first.png differ diff --git a/site/content/entry/yuzu-mini-dev-2/index.md b/site/content/entry/yuzu-mini-dev-2/index.md new file mode 100644 index 000000000..51c106f36 --- /dev/null +++ b/site/content/entry/yuzu-mini-dev-2/index.md @@ -0,0 +1,130 @@ ++++ +date = "2019-08-09T11:48:00+05:30" +title = "Mini-Series - Dev Interview #2" +author = "CaptV0rt3x" +forum = 135709 ++++ + +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're interviewing this time. + +*** +Welcome to part 2 of our previously announced `Developer Interviews` 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: ***Rodrigo***. + +Rodrigo (a.k.a [ReinUsesLisp](https://github.com/ReinUsesLisp)) is best known for his massive contributions to yuzu in the GPU emulation area. +His various contributions have improved the user'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'll find an informative conversation we had that should also help you all understand more about what he's doing behind the scenes. +*** + + +**Q: Hi Rodrigo! Wanna tell our patrons a little about yourself?** + +**R:** Hi! I'm some random guy from Argentina working on emulating the Nintendo Switch's GPU, (*and I'm totally not ripping off Lioncash with this presentation*). + +Right now, I am a school teacher and don't have a formal programming background, but I'd like to get a computer science job in the future. I'm also interested in languages (both spoken & programming) and software development. + + +**Q: You are entirely self taught?! So, what made you get into emulation?** + +**R:** 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 `Twilight Princess` on Hyrule Fields with Dolphin at **3 FPS**, it was just awesome. + +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. + +What got me into emulation mainly was yuzu's very [first video](https://www.youtube.com/watch?v=1VzyIHMTA2Q) of three commercial games booting (Cave Story, Isaac Afterbirth and Puyo Puyo Tetris). +**There it was!** -- 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. + +{{< single-title-imgs + "Cave Story+ (First yuzu build) - We've come a long way from that!" + "./first.png" +>}} + +**Q: That's really interesting to hear. Before yuzu and Switch emulation, have you ever worked on other older emulators?** + +**R:** No, I'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. + + +**Q: Let's get a bit technical. What areas of Switch emulation have you worked on the most, and why? Which other areas keep you interested?** + +**R:** I'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's a cool fact for those that don't know: the Switch's GPU is an Nvidia Tegra X1, and it utilizes the same architecture of a GTX 960+. + + +As for why I like it, it'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 it’s 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. + +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) + + +**Q: What are some of the challenges you generally face when working on GPU emulation?** + +**R:** One of biggest challenges is the inherent variable state of Nvidia GPUs. +Sometimes, graphics APIs like OpenGL and Vulkan have requirements that are the "common ground", something that's needed by the lowest denominator. +We have to write very annoying workarounds to get that functionality working in the emulator. + +

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.

+ +{{< imgs + "./botw.png|The Legend of Zelda - Breath of the Wild" + "./onepiece.png|One Piece - Unlimited World" + "./smo.png|Super Mario Odyssey" +>}} + +**Q: What motivates you every day to keep working on this stuff?** + +**R:** 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. + +There are two things that I enjoy the most: + + - seeing games run faster, and better than how they ran before. + - seeing games getting closer and closer to how they look on the console. + +And if I manage to get these improvements by writing better code, it's an added bonus. + +**Q: Can you tell us a little about what you are currently working on? A sneak-peek perhaps?** + +**R:** That's classified information :P +I've recently worked on an improved & generic texture cache. +[Blinkhawk](https://github.com/FernandoS27) helped by cleaning up my bugs to get the thing working, and he'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. + +It's not as good as Dolphin's VideoCommon, one of the better examples for generic graphics code, but it's still better than having to copy-paste code everywhere. +This is one of the last prerequisites for the Vulkan API. + +I'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's a story for another time. + +**Q: Would you like to say something to our audience?** + +**R:** Well, there are three things I'd like to say. + +`First and foremost...` most of our GPU work has been possible thanks to research done by the people working on nouveau (mesa's Nvidia free driver) and libnx's nouveau port to Switch. They have been of huge help. + +`Second...` many people believe that Vulkan will bring lots of performance improvements to the emulator... I was one of those too. Don't get me wrong, it might boost performance on some hardware vendors, but the main issue resides in Vulkan's design. +It is designed in a way that the programmer cooks and reuses its resources, but in emulation you can't easily know what's going to happen in the future. On the other hand, OpenGL, by design, works without backing its commands. + +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. + +`And last, but not least...` We have a console that's just two years old, and it'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. + +I'm really excited about what's to come, and how good Switch emulators will perform with these games. Emulation has been surprisingly faster in the last few years. Let's look forward to a wonderful future... +*** + +This has been absolutely wonderful. +Huge thanks to [Rodrigo](https://github.com/ReinUsesLisp) 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! + +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! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-mini-dev-2/onepiece.png b/site/content/entry/yuzu-mini-dev-2/onepiece.png new file mode 100644 index 000000000..eafba80ae Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-2/onepiece.png differ diff --git a/site/content/entry/yuzu-mini-dev-2/smo.png b/site/content/entry/yuzu-mini-dev-2/smo.png new file mode 100644 index 000000000..dfe01fdc3 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-2/smo.png differ diff --git a/site/content/entry/yuzu-mini-dev-2/summary.png b/site/content/entry/yuzu-mini-dev-2/summary.png new file mode 100644 index 000000000..958eb090c Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-2/summary.png differ diff --git a/site/content/entry/yuzu-mini-dev-3/banner.png b/site/content/entry/yuzu-mini-dev-3/banner.png new file mode 100644 index 000000000..2d88e0c72 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/banner.png differ diff --git a/site/content/entry/yuzu-mini-dev-3/botw_0.png b/site/content/entry/yuzu-mini-dev-3/botw_0.png new file mode 100644 index 000000000..329d920b4 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/botw_0.png differ diff --git a/site/content/entry/yuzu-mini-dev-3/index.md b/site/content/entry/yuzu-mini-dev-3/index.md new file mode 100644 index 000000000..bc44979c3 --- /dev/null +++ b/site/content/entry/yuzu-mini-dev-3/index.md @@ -0,0 +1,100 @@ ++++ +date = "2020-12-03T1:45:00+01:00" +title = "Mini-Series - Dev Interview #3" +author = "MysticExile" +forum = 332192 ++++ + +Hey there yuz-ers, welcome to the third Developer Interview! It's been a while since the last installment of this mini-series, so let's jump right into the good stuff. + +*** +This time we're interviewing the myth, the legend, [epicboy](https://github.com/ameerj)! He is the main reason why we have [NVDEC](https://github.com/yuzu-emu/yuzu/pull/4729) now! +If you didn't know already, NVDEC is Nvidia's video decoder used by the Nintendo Switch. Without him, we wouldn't be able to watch videos like `Fire Emblem: Three House's` intro or `The Legend of Zelda: Breath of the Wild's` memories. +But that's not the only thing he has done! +He was also responsible for [asynchronous shader compilation on the Vulkan renderer](https://github.com/yuzu-emu/yuzu/pull/4443), [GameCube Controller support](https://github.com/yuzu-emu/yuzu/pull/4137), and [Alpha Test Culling on the Vulkan renderer](https://github.com/yuzu-emu/yuzu/pull/4946). +And now, on to the interview!! +*** + +**Q: Hey epicboy, why don't you start by telling us a bit about yourself?** + +**E:** I'm just a typical college student majoring in Computer Science. I'm in my fourth year of studies out of five, pursuing both a BS and MS degree. +To be honest, I've been suffering from [imposter syndrome](https://en.wikipedia.org/wiki/Impostor_syndrome) in my classes, so I wanted to put my programming skills to the test. +That's what drove me to contribute to yuzu; a real-world test of the knowledge and experience I gained from my classes to prove to myself that my time at college hasn't been a waste. + +**Q: Why did you choose yuzu, a Nintendo Switch emulator, specifically?** + +**E:** When I first heard of yuzu, back in 2018, I was impressed by the progress made on Switch emulation so soon after the console's release. +I continued to follow the project's progress and was inspired by the never ending drive and effort of the developers. +Soon after `Super Smash Bros. Ultimate` was announced as playable on the emulator, which sounded too good to be true, I gave the emulator a shot and was blown away at the compatibility. +Of course, it wasn't perfect, especially given that my beloved controller of choice, the Nintendo GameCube controller, was not compatible with the emulator. + +**Q: So you decided that it was time to take matters into your own hands and add support yourself?** + +**E:** Knowing that other emulators (notably [Dolphin](https://dolphin-emu.org/)) had proper support for the official GameCube adapter, +and considering I was looking to sharpen my programming skillset, +I decided to take the opportunity and see if I can bring that support over to yuzu, opening the option to use the GameCube controller for anyone on the emulator. + +**Q: I'm sure our GC controller users are very happy with your contribution! Why did you choose to tackle such a large task as NVDEC?** + +**E:** I found the code review for the GC adapter implementation to be really useful. +I wanted to learn more from the very sharp yuzu developers and continued to make more contributions and became more familiar with the yuzu dev team. +One feature that I saw many yuzu fans request was for video decoding. +I learned that [ogniK](https://github.com/ogniK5377) had attempted to implement NVDEC before and reached out to get an understanding of this feature's scope and challenges faced along the way. +Before I knew it, I had access to the repository with the old implementation's code and was encouraged to find a way to finish it off. + +It was intimidating at first, but the encouragement and mentorship from ogniK kept me motivated. +It was also the first glimpse I had at the guts of yuzu, and found the work that has gone into the emulation of the Nintendo Switch's GPU to be very interesting. + +{{< single-title-imgs + "The Legend of Zelda: Link's Awakening" + "./zla_0.png" + "./zla_1.png" +>}} + +{{< single-title-imgs + "Super Smash Bros. Ultimate" + "./ssbu_0.png" + "./ssbu_1.png" +>}} + +**Q: What obstacles did you have to overcome when implementing NVDEC?** + +**E:** The earliest challenge was to understand what the data I'm looking at means. At the GPU command level, everything is hexadecimal numbers with no obvious meaning tied to it. +Thankfully, there have been others who reverse engineered and documented the processes that the GPU goes through for the NVDEC functionality. +I was able to get quite far with decoding H.264 videos with the help of ogniK's older implementation. But the VP9 encoded videos found in many games were very difficult to decode. + +In order to decode VP9, I needed the frame data along with a "compressed" and "uncompressed" header to be sent to [FFmpeg](https://ffmpeg.org/), a library which is widely used for video decoding. +The Switch GPU provided me with the frame data, but the headers needed to be manually constructed based on meta data provided by the GPU. +I found myself spending countless hours reading the VP9 specification, and analyzing the video frame-by-frame in a tool that displays each frame's headers. Ultimately, it paid off, and many VP9 videos are decoded accurately. + + + +**Q: Quite the task I imagine. Why did you opt for the FFMpeg library instead of other alternatives?** + +**E:** FFmpeg was kind of a no-brainer. It's fast, it's open sourced, and it's well documented. It handles decoding with little effort on the programmer's part. +It also provides API's to re-scale and convert video formats, which proved to be useful. +The other alternative would have been writing my own software decoder from scratch, but there's no point in reinventing the wheel! + +{{< imgs + "./botw_0.png| Footage of one of The Legend of Zelda: Breath of the Wild's memories." + >}} + +**Q: No kidding! Is there anything you're currently working on?** + +**E:** Of course! I'm always looking for the next opportunity to contribute to the project while continuing to learn and grow as a programmer as well. +There's still some work left for me to finish up for the NVDEC implementation, so I haven't decided on what I'd like to tackle next. All I can say for now is that I genuinely enjoyed GPU related programming. + +**Q: We look forward to your future contributions! Is there anything else you would like to share to our users?** + +**E:** I'd like to say "thank you" to all the yuz-ers! They are always appreciative of the work the yuzu developers put into the emulator, and are always excited to know what's next for the project. +Their demands can sometimes be overwhelming, but it continues to motivate the developers, and it's always gratifying to see the positive reaction they have when a feature they've been looking forward to finally becomes a reality. +*** + +A huge thanks to epicboy for taking the time to sit down and give us some insight on NVDEC and himself. +We hope you all enjoyed it, and we will be back soon with another featured yuzu dev to bring you behind the curtains again. Until then, thank you for your support and stay tuned! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-mini-dev-3/ssbu_0.png b/site/content/entry/yuzu-mini-dev-3/ssbu_0.png new file mode 100644 index 000000000..2d15c7cf3 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/ssbu_0.png differ diff --git a/site/content/entry/yuzu-mini-dev-3/ssbu_1.png b/site/content/entry/yuzu-mini-dev-3/ssbu_1.png new file mode 100644 index 000000000..21c4fac7d Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/ssbu_1.png differ diff --git a/site/content/entry/yuzu-mini-dev-3/ssbu_2.mp4 b/site/content/entry/yuzu-mini-dev-3/ssbu_2.mp4 new file mode 100644 index 000000000..f5f6491a9 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/ssbu_2.mp4 differ diff --git a/site/content/entry/yuzu-mini-dev-3/summary.png b/site/content/entry/yuzu-mini-dev-3/summary.png new file mode 100644 index 000000000..2516fd2cf Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/summary.png differ diff --git a/site/content/entry/yuzu-mini-dev-3/zla_0.png b/site/content/entry/yuzu-mini-dev-3/zla_0.png new file mode 100644 index 000000000..958243523 Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/zla_0.png differ diff --git a/site/content/entry/yuzu-mini-dev-3/zla_1.png b/site/content/entry/yuzu-mini-dev-3/zla_1.png new file mode 100644 index 000000000..39f1f9baf Binary files /dev/null and b/site/content/entry/yuzu-mini-dev-3/zla_1.png differ diff --git a/site/content/entry/yuzu-nvdec-emulation/banner.png b/site/content/entry/yuzu-nvdec-emulation/banner.png new file mode 100644 index 000000000..39ab64bc3 Binary files /dev/null and b/site/content/entry/yuzu-nvdec-emulation/banner.png differ diff --git a/site/content/entry/yuzu-nvdec-emulation/index.md b/site/content/entry/yuzu-nvdec-emulation/index.md new file mode 100644 index 000000000..6f87f2f08 --- /dev/null +++ b/site/content/entry/yuzu-nvdec-emulation/index.md @@ -0,0 +1,209 @@ ++++ +date = "2020-09-29T23:20:00+05:30" +title = "New Feature Release - NVDEC emulation!" +author = "CaptV0rt3x" +forum = 309130 ++++ + +Hello, yuzu fans! +Tired of broken cutscenes and having to mash your controller buttons in hopes of skipping them? Well, look no further! +Thanks to the efforts of [epicboy](https://github.com/ameerj), yuzu can now play (most of) your favorite in-game cutscene videos. +Jump right in to find out more! + + +  +{{< youtube usvAZosD16o >}} + +# NVDEC - What is it? + +For a long time, one of the most noticeable missing features of yuzu was support for NVDEC.
+What is [NVDEC](https://en.wikipedia.org/wiki/Nvidia_NVDEC)? +NVDEC stands for **Nvidia Video Decoder** and is a feature in Nvidia GPUs that performs video decoding. +And since the Switch has an Nvidia Tegra X1 SoC, it too makes use of its NVDEC module to offload all CPU intensive video decoding tasks to the GPU. + +NVDEC supports video codecs like `MPEG-2`, `VC-1`, `H.264 (AVC)`, `H.265 (HEVC)`, `VP8`, and `VP9`, but Nintendo only exposes `H.264`, `H.265`, `VP8` and `VP9`. +Most games seem to use `H.264` because of its wide support and efficiency ratio. +But many first party games are known to use `VP9` too - eg. Super Smash Bros. Ultimate, Pokémon: Let's Go, Pikachu/Eevee! + +With NVDEC support, users no longer have to rely on old save files or crazy button mashing to bypass broken cutscenes. +Grab the latest yuzu Early Access build to try it out now! + +  +{{< youtube XsXpxZE2rcc >}} +  + +# Development + +The Switch uses NVDEC along with VIC (Video Image Composer) in the GPU for video decoding. +Games are exposed to higher level APIs by Nintendo which abstract the configuration of these modules. + +NVDEC and VIC work together to decode incoming videos and the process usually goes like this: + + - Allocate memory + - Place encoded video frame data in known memory location + - Decode and place frame data into GPU memory + - Clear intermediary allocated memory + +Although this seems fairly simple, implementing it was quite the task. +[epicboy](https://github.com/ameerj) began working on this by implementing the service/command calls to NVDEC and VIC. +It was decided to use the [FFmpeg](https://github.com/FFmpeg/FFmpeg) library to decode the frame data once we knew its codec (`H.264` or `VP9`). + +  +{{< youtube EGDodmeKGWY >}} +  + +### VP9 + +`VP9` was the biggest challenge as its decoding required knowledge on the different attributes of a specific frame. +Each frame carries two headers and raw frame data with it. +The headers contain the information as to which previous frame the current frame refers to or depends on. +Frames usually refer to previously decoded frames, along with transformations to be done on various parts of those, to compose new frames. +This is done in an effort to reduce the memory footprint of each frame. + +Here is where things got complicated. +On the Switch, these headers are parsed by the Nvidia library in the games; therefore, NVDEC never receives this data. +But for us to decode the frames using FFmpeg, we need to provide it with the full frame - Two headers and raw frame data from NVDEC. +And since NVDEC hardware doesn't expose all of the data of the two `VP9` headers, [epicboy](https://github.com/ameerj) had to manually compose these headers from the provided information. + +[epicboy](https://github.com/ameerj) took an interesting approach to this problem - he buffered two frames in advance. +As the frame data from NVDEC holds some data on previous frames, knowing two frames in advance was useful. +But this wasn't sufficient as a few games resulted in issues with this approach. +We are currently researching these edge cases to properly fix it for all games. + +  +{{< youtube xHYYntEB05o >}} +  + +### H.264 + +`H.264` was relatively easier compared to `VP9`. +Each `H.264` frame contains two headers and raw frame data with it. +Unlike `VP9`, `H.264` doesn't have different headers for each frame but has same headers for entire video. + +[ogniK](https://github.com/ogniK5377) had, long ago, already implemented `H.264` support in his experimental branch. +[epicboy](https://github.com/ameerj) based his work off of [ogniK](https://github.com/ogniK5377)'s and fixed a bug in it which caused distorted videos. +It turned out that [ogniK](https://github.com/ogniK5377) was using incorrect dimensions when writing the pixel location. + +Currently NVDEC operations are synchronous, but are asynchronous compatible. +This means that in the future, NVDEC operations can be made asynchronous thus yielding even better performance. +Also, thanks to the FFmpeg library, we have access to hardware acceleration for faster decoding. +And in the future, this will allow yuzu to offload video decoding to the host GPU (user's GPU). + +  +{{< youtube ImXim7BXl0E >}} +  + +### VP8 & H.265 + +The Switch officially supports `VP8` and `H.265` too, along with `VP9` and `H.264`. +However, we are yet to see games make use of these codecs for in-game videos and hence support for these codecs remains unimplemented for now. + +# Testing + +As development work progressed, there were a lot of challenges and issues with games. +**Link's Awakening**, for example, wasn't providing the proper memory locations to write frame data to and +the NVDEC/VIC service/command calls were inaccurate as well. +This led to data corruption when we wrote frame data to wrong memory locations. + +  +{{< youtube 4Lz1NqZsYlA >}} +  + +[epicboy](https://github.com/ameerj) and our testers spent tens of hours testing various games in yuzu to make sure any minor issues were ironed out. +This rigorous testing also brought to our attention more games that exhibit weird edge cases. +Over the next couple of weeks, we plan to fix these bugs and make our decoding even more accurate. + +Huge shoutout to our testers for testing and compiling these lists. + +{{< message "Games that work" >}} +The following games were tested by our team and work well with minor occasional glitches: + +* 1-2-Switch +* AI: The Somnium Files +* Animal Crossing: New Horizons +* Attack on Titan 2 +* Atelier Ryza: Ever Darkness & the Secret Hideout +* Bloodstained: Ritual of the Night +* Bulletstorm +* Children of Morta +* Dark Souls Remastered +* Deadly Premonition Origins +* Devil May Cry +* Devil May Cry 2 +* Devil May Cry 3 +* Disgaea 5 Complete +* Donkey Kong Country: Tropical Freeze +* Dragon's Dogma +* Dragon Quest Builders +* Dragon Quest XI:S +* Dragons: Dawn Of New Riders +* Fairy Tail +* Final Fantasy IX +* Fire Emblem: Three Houses +* Fire Emblem Warriors +* Go Vacation +* Hollow Knight +* Huntdown +* Hyrule Warriors: Definitive Edition +* Indivisible +* Just Dance 2020 +* Kirby Star Allies +* LEGO City Undercover +* Mario Kart 8 Deluxe +* Marvel Ultimate Alliance +* Monster Boy and the Cursed Kingdom +* ŌKAMI HD +* Paper Mario: The Origami King +* Pokkén Tournament DX +* Psyvariar Delta +* Resident Evil +* Resident Evil 0 +* Resident Evil 4 +* Resident Evil 5 +* Resident Evil 6 +* Resident Evil Revelations +* Resident Evil Revelations 2 +* Ring Fit Adventure +* Rune Factory 4 Special +* Shantae and the Seven Sirens +* Star Ocean First Departure R +* Steins;Gate Elite +* Super Mario 3D All-Stars +* Super Mario Odyssey +* Super Smash Bros. Ultimate +* TLOZ - Breath of the Wild +* Tokyo Mirage Sessions #FE Encore +* Trials of Mana +* Xenoblade Chronicles Definitive Edition +* Yu-Gi-Oh: Legacy of the Duelist +{{< /message >}} + +{{< message "Games with known issues">}} +The following games are known to have issues, and we are actively working on fixing them: + +* Alien: Isolation +* Ni no Kuni: Wrath of the White Witch +* Onimusha: Warlords +* Persona 5 Scramble +* Resident Evil 0 +* TLOZ: Link's Awakening +* The Legend of Heroes: Trails of Cold Steel III +* Final Fantasy VIII Remastered +* Pokémon Let's Go +* Pokémon Sword +{{< /message >}} + + +# Fin + +As always, we would like to remind users that the features released on Early Access are still being worked on. +Hence not all games might behave in the way we want them to. +If you come across more games (other than the ones mentioned above) that encounter bugs or issues, feel free to +reach out to us on our [Discord server](https://discord.com/invite/u77vRWY) and share your findings. + +See you next time,
+ - yuzu development team! + + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-nvdec-emulation/summary.png b/site/content/entry/yuzu-nvdec-emulation/summary.png new file mode 100644 index 000000000..19e1cbe71 Binary files /dev/null and b/site/content/entry/yuzu-nvdec-emulation/summary.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2.png new file mode 100644 index 000000000..eb957de46 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_1.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_1.png new file mode 100644 index 000000000..896e812d8 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_1.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_2.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_2.png new file mode 100644 index 000000000..f322c3720 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_2.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_3.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_3.png new file mode 100644 index 000000000..34ae51278 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_3.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_4.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_4.png new file mode 100644 index 000000000..902763860 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_4.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_5.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_5.png new file mode 100644 index 000000000..b75ec6790 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_5.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_6.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_6.png new file mode 100644 index 000000000..9468e2249 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_6.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_7.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_7.png new file mode 100644 index 000000000..0c4e1f174 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_7.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_8.png b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_8.png new file mode 100644 index 000000000..3675b7208 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/SMM2_8.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/banner.png b/site/content/entry/yuzu-patreon-preview-july-2019/banner.png new file mode 100644 index 000000000..c4e6af069 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/banner.png differ diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/index.md b/site/content/entry/yuzu-patreon-preview-july-2019/index.md new file mode 100644 index 000000000..3811a5980 --- /dev/null +++ b/site/content/entry/yuzu-patreon-preview-july-2019/index.md @@ -0,0 +1,86 @@ ++++ +date = "2019-07-02T21:55:00+05:30" +title = "yuzu Patreon Preview Release July 2019" +author = "CaptV0rt3x" +forum = 123917 ++++ + +Hey there, people! You won’t believe what we’ve got in store for you this time! +The new Patreon preview has a big surprise waiting for you. +Hop in now, to find out more details. + + +For the past couple of weeks, the team has been hard at work getting some important services and functions implemented. +It’s thanks to these specific services and functions that you all will now get to play `Super Mario Maker 2` on yuzu! + +Yes, you heard right, `Super Mario Maker 2` now boots and goes in-game, and is mostly playable on yuzu. +Grab our latest - Patreon preview build now, to check it out. + +{{< imgs + "./SMM2.png|Super Mario Maker 2 (Title screen)" +>}} + +#### You can download this release on our [Patreon](https://www.patreon.com/yuzuteam)! + +### Patreon Release Changelog + +- `LR Assignment Mode` by [ogniK](https://www.github.com/ogniK5377) – This handles the press LR to bind controllers screen. +- `SwapNpadAssignment` by [ogniK](https://www.github.com/ogniK5377) – A crucial HID command. +- `Audren` Event and Audio Fixes by [ogniK](https://www.github.com/ogniK5377). + +- `Prepo SaveReport` by [DarkLordZach](https://github.com/DarkLordZach). +- Filesystem Access Logging by [DarkLordZach](https://www.github.com/DarkLordZach). +- Boost Mode by [DarkLordZach](https://www.github.com/DarkLordZach) –
+`Note: does NOT make yuzu faster! We do not overclock yuzu.` +- `SetInterfaceVersion` by [DarkLordZach](https://www.github.com/DarkLordZach) – Another crucial HID command. +- OSS Mii Model by [DarkLordZach](https://www.github.com/DarkLordZach) – An HLE implementation of the Mii Model system archive. + +- Several GPU bug fixes by [Rodrigo](https://github.com/ReinUsesLisp) and [Subv](https://github.com/Subv). +- Implementing Conditional Rendering by [BlinkHawk](https://github.com/FernandoS27) – GPU will now execute, manage, and administer queries, avoiding code paths that are not necessary. +- New Shader Scanner by [BlinkHawk](https://github.com/FernandoS27) – A new, faster, and more reliable shader scanner that’s less prone to crashing and corrupting shader caches. This also fixes a bug with fonts. +- And the baseline `Canary version 2425`. +*** + +Phew, that’s quite a few new implementations. +It’s thanks to the hard work of the yuzu development team, that all of these functions are now ready for testing. +A big shout out to Hexagon12 for hunting down all of the service functions that were necessary to get `Super Mario Maker 2` in game, and also to [DarkLordZach](https://www.github.com/DarkLordZach) for orchestrating the entire project. + +Here are some in-game screenshots from the Patreon preview build, just for you guys. + +{{< single-title-imgs + "Super Mario Maker 2 in-game screenshots" + "./SMM2_1.png" + "./SMM2_2.png" +>}} + +{{< imgs + "./SMM2_3.png" + "./SMM2_4.png" +>}} + +**Note: All these screenshots have been taken using the Patreon preview. We removed the yuzu title-bar, to keep the beauty of images intact.** + +{{< single-title-imgs + "More Super Mario Maker 2 in-game screenshots" + "./SMM2_5.png" + "./SMM2_6.png" +>}} + +{{< imgs + "./SMM2_7.png" + "./SMM2_8.png" +>}} + +~~**Note: Currently saving levels causes yuzu to crash, due to a swkbd (software keyboard) issue. But rest assured, we are working on a fix.**~~ +The issue with the software keyboard has now been fixed. Please download the latest build from our patreon page. + +As always, we bring this to you as a `thank you` for your patronage and dedication to our team! +Please hop on Discord and use the Patreon channels to report any new bugs, or to just say Hi and discuss the new features. +We will keep working diligently to improve yuzu and deliver you with the best possible experience while playing. + +Until next time, keep playing on yuzu and have fun!
+- yuzu development team. + + +**If you'd like to try out this preview release, please head on over to our [Patreon](https://www.patreon.com/yuzuteam) to get access! +Thank you again for your support!** diff --git a/site/content/entry/yuzu-patreon-preview-july-2019/summary.png b/site/content/entry/yuzu-patreon-preview-july-2019/summary.png new file mode 100644 index 000000000..1ecc88058 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-july-2019/summary.png differ diff --git a/site/content/entry/yuzu-patreon-preview-jun-12/banner.png b/site/content/entry/yuzu-patreon-preview-jun-12/banner.png new file mode 100644 index 000000000..fc30b3b01 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-jun-12/banner.png differ diff --git a/site/content/entry/yuzu-patreon-preview-jun-12/index.md b/site/content/entry/yuzu-patreon-preview-jun-12/index.md new file mode 100644 index 000000000..f419e99aa --- /dev/null +++ b/site/content/entry/yuzu-patreon-preview-jun-12/index.md @@ -0,0 +1,26 @@ ++++ +date = "2019-06-12T03:48:00+05:30" +title = "yuzu Patreon Preview Release June 12th" +author = "flamesage" +forum = 116565 ++++ + +Good day, yuzu fans! Today we bring you another exciting yuzu update with the June 2019 Patreon Preview Release! We heard your feedback - this time around, we have some major graphical fixes! + + +The team has been hard at work to constantly improve yuzu, and these additions are extremely important in painting the whole picture. + +**You can download this release on our [Patreon](https://www.patreon.com/yuzuteam)!** + +## What you'll find in this new build: +1. **A brand new Texture Cache:** As certain members of our yuzu team inch ever closer to a Vulkan implementation, they realized the current OpenGL backend has an old yet heavily modified (for yuzu) texture cache that would be incompatible with Vulkan. There were also several bugs in our current cache and not everything was being emulated correctly. Now, we have a brand new API-agnostic texture cache that works with both OpenGL (and will work with Vulkan once we complete that renderer)! It's much more accurate and performant over the old/current implementation, and should also provide several graphical fixes! +2. **Basic GPU Sync Mechanisms:** We're well aware the current Async GPU emulation has major issues. The problem was that our current implementation lacked the real syncing mechanisms used by the Nintendo Switch, thus making it very unstable and caused crashes. With this new implementation, you can expect games to work much better with Async enabled! +3. **Swap Interval Emulation:** yuzu will now properly emulate the swap interval between window's refresh times, allowing us to correctly detect a games actual refresh rate. What this basically means is that if a game natively runs at 30fps, you will no longer need the option to "force 30fps" and yuzu automatically detects the games refresh rate! We still however provide this option, as it's useful to emulate some games at lower framerates when a full 60fps cannot be achieved. + +As always, we look to our dedicated Patrons to not only enjoy this new build, but to report how the build's new features are working for you. Find us on the Patreon section of discord to report issues, or just drop in to leave a comment. We look forward to continuing to lead the way in proper Switch emulation, and we again thank you for your continued support! + +All the best, +yuzu Development Team + +**If you'd like to try out this preview release, please head on over to our [Patreon](https://www.patreon.com/yuzuteam) to get access! +Thank you again for your support!** \ No newline at end of file diff --git a/site/content/entry/yuzu-patreon-preview-jun-12/summary.png b/site/content/entry/yuzu-patreon-preview-jun-12/summary.png new file mode 100644 index 000000000..a2d1c8a4f Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-jun-12/summary.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/AC 1.png b/site/content/entry/yuzu-patreon-preview-oct-2019/AC 1.png new file mode 100644 index 000000000..43138eb28 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/AC 1.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/FE 1.png b/site/content/entry/yuzu-patreon-preview-oct-2019/FE 1.png new file mode 100644 index 000000000..31734fb53 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/FE 1.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/FE 2.png b/site/content/entry/yuzu-patreon-preview-oct-2019/FE 2.png new file mode 100644 index 000000000..974c07555 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/FE 2.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/FE 4.png b/site/content/entry/yuzu-patreon-preview-oct-2019/FE 4.png new file mode 100644 index 000000000..9640b2e46 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/FE 4.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4 II.png b/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4 II.png new file mode 100644 index 000000000..d029317c4 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4 II.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4 Title.png b/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4 Title.png new file mode 100644 index 000000000..81318ae67 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4 Title.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4.png b/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4.png new file mode 100644 index 000000000..f54a6cfac Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/RE 4.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/banner.png b/site/content/entry/yuzu-patreon-preview-oct-2019/banner.png new file mode 100644 index 000000000..e97e025de Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/banner.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/boom.png b/site/content/entry/yuzu-patreon-preview-oct-2019/boom.png new file mode 100644 index 000000000..ae75c0ef8 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/boom.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon.png b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon.png new file mode 100644 index 000000000..240bd0cf4 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon1.png b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon1.png new file mode 100644 index 000000000..5d69630ea Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon1.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon_maker.png b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon_maker.png new file mode 100644 index 000000000..73d0a8b38 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon_maker.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon_maker2.png b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon_maker2.png new file mode 100644 index 000000000..da61bbc58 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/dungeon_maker2.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/fairy.png b/site/content/entry/yuzu-patreon-preview-oct-2019/fairy.png new file mode 100644 index 000000000..e3b567136 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/fairy.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/forest1.png b/site/content/entry/yuzu-patreon-preview-oct-2019/forest1.png new file mode 100644 index 000000000..9cd1dca73 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/forest1.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/forest2.png b/site/content/entry/yuzu-patreon-preview-oct-2019/forest2.png new file mode 100644 index 000000000..70c03359f Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/forest2.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/graveyard.png b/site/content/entry/yuzu-patreon-preview-oct-2019/graveyard.png new file mode 100644 index 000000000..54d179e51 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/graveyard.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/index.md b/site/content/entry/yuzu-patreon-preview-oct-2019/index.md new file mode 100644 index 000000000..88114046c --- /dev/null +++ b/site/content/entry/yuzu-patreon-preview-oct-2019/index.md @@ -0,0 +1,142 @@ ++++ +date = "2019-10-08T04:00:00+05:30" +title = "yuzu Patreon Release October 2019" +author = "CaptV0rt3x" +forum = 150506 ++++ + +Hey there ***yuz-ers***! +Curious about what we have in store for you? +It's the October Patreon preview release! +This build showcases the new game in town, **The Legend of Zelda: Link's Awakening**, in yuzu! +Hop right in to find out more. + + +## Changelog + +Since the last Patreon release, we've made great progress in the OS emulation and GPU emulation areas. +While some of the changes listed below are already in master or tagged for Canary, some are being released as early access to the patrons, with this build. + +### OS Emulation (OS HLE) + +`Public Changes` + +- [#2877](https://github.com/yuzu-emu/yuzu/pull/2877) - Implemented `REV5 Audio`'s frame count. +- [#2873](https://github.com/yuzu-emu/yuzu/pull/2873) - Implemented `ioctl2` & `ioctl3` interfaces in `NVDRV` (Nvidia Services). +- [#2912](https://github.com/yuzu-emu/yuzu/pull/2912) - Fixes and Improvements to Asynchronous GPU: + + * New games boot with `Async` - **Fire Emblem: 3 Houses**, **Cadence of Hyrule**, and **Pokkén Tournament**. + * Fixed the issue where games would suddenly slowdown and report wrong framerates. + * Fixed the issue where some games would surpass frame limiting. + * Fixed the issue where dynamic resolution re-scaler would trigger in **Super Mario Odyssey** with full-speed and wouldn't trigger heavily for under-speed games. + * Removed artificial fence which limited `Async` to `9 ms`. + Now `Async` will be limited by the game and this gives performance boosts in many graphic intensive games. + +`Patreon Changes` + +- Implemented a new `Fair Cycle Core Timer` in order to spread work evenly on the four emulated cores. +- Improved the `New Scheduler` even further, by fixing bugs and implementing `Thread Pre-emption`. + These improvements to the scheduler have improved performance in games like **Fire Emblem:3 Houses**, **Hyrule Warriors** and **Resident Evil 4**.
+ It also has allowed **Astral Chain** and other games to boot (***Not fully playable yet!***). + +{{< imgs + "./AC 1.png| Astral Chain" +>}} + +{{< single-title-imgs + "Fire Emblem: Three Houses" + "./FE 1.png" + "./FE 2.png" + "./FE 4.png" + >}} + + {{< single-title-imgs + "Resident Evil 4" + "./RE 4 Title.png" + "./RE 4.png" + "./RE 4 II.png" + >}} + +### GPU Emulation + +`Public Changes` + +- [#2891](https://github.com/yuzu-emu/yuzu/pull/2891) - Implemented `RGBX16F Format` which is used by **Rocket League** to render graphics. +- [#2870](https://github.com/yuzu-emu/yuzu/pull/2870) - Implemented a `MME draw calls in-liner` which accumulates draw calls from the Macro Interpreter Engine (MME) and sends them as a single unified draw call, thus improving performance significantly in some titles. +- [#2869](https://github.com/yuzu-emu/yuzu/pull/2869), [#2878](https://github.com/yuzu-emu/yuzu/pull/2878), and [#2855](https://github.com/yuzu-emu/yuzu/pull/2855) - Implemented shader instructions: `SULD`, `ICMP`, `SHFL`(Nvidia only) and `SUATOM`. +- [#2872](https://github.com/yuzu-emu/yuzu/pull/2872) - Fixed memory mapping so that it won't call GPU flushing unnecessarily anymore. +- [#2868](https://github.com/yuzu-emu/yuzu/pull/2868) - Fixed mipmap filtering. +- [#2833](https://github.com/yuzu-emu/yuzu/pull/2833) - Fixed stencil testing. +- [#2914](https://github.com/yuzu-emu/yuzu/pull/2914) - Corrected `Fermi2D` to work within crop areas in order to avoid issues in Vulkan. +- [#2917](https://github.com/yuzu-emu/yuzu/pull/2917) - Added deduction method for `blits` which helps figure if a `blit` is on depth textures. +This avoids using the fall-back method of buffer copy. + +`Patreon Changes` + +- Implemented `fast BRX` and fixed `TXQ`. +This fixes graphics in **Crash Team Racing** & **The Legend of Zelda: Link's Awakening**, and also makes shaders a lot easier to be read by AMD and Intel drivers. +- Reworked shader cache system to support `fast BRX` and `TXQ` fixes. + +{{< single-title-imgs + "The Legend of Zelda: Link's Awakening" + "./title.png" + "./intro_house.png" + "./no_blur_fox.png" +>}} + +{{< message "Link's Awakening needs some stuff!!" >}} +**The Legend of Zelda: Link's Awakening** currently needs a few things to work: + + - a save file, to skip the initial movie. + - set your controller settings to `Custom > Docked > Pro Controller`. + - And `Async` needs to be `OFF`. + +A save file is being linked here for users' convenience `-->` Click here to Download +{{}} + +{{< message "Shader caches need to be regenerated!!" >}} +Because of the reworked shader cache system, all previously generated shader caches are `no longer valid`.
+**Users will have to regenerate their shader caches for all games.** +{{}} + +## Screenshots + +Here are some more screenshots from **The Legend of Zelda: Link's Awakening**, just for you. + +{{< imgs + "./shield_get.png" + "./sword.png" + "./sword_get.png" +>}} + +{{< imgs + "./graveyard.png" + "./swamp.png" + "./fairy.png" +>}} + +{{< imgs + "./forest1.png" + "./forest2.png" + "./dungeon.png" +>}} + +{{< imgs + "./dungeon1.png" + "./dungeon_maker.png" + "./dungeon_maker2.png" +>}} + +## Et al. + +Please remember that the early access features are still being worked on, so if you encounter any bugs or have any feedback, please don't hesitate to share it with us in our patreon channels on our [Discord server](https://discord.gg/u77vRWY). + +As always, we are thankful to all our 450+ patrons for their continued support. +We will keep working diligently to bring you many more improvements, so that you can keep enjoying your favourite games on yuzu. + +Until next time, keep playing on yuzu!
+- yuzu development team + +**** +**If you'd like to try out this preview release, please head on over to our [Patreon](https://www.patreon.com/yuzuteam) to get access! +Thank you again for your support!** \ No newline at end of file diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/intro_house.png b/site/content/entry/yuzu-patreon-preview-oct-2019/intro_house.png new file mode 100644 index 000000000..a357b6ee3 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/intro_house.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/no_blur_fox.png b/site/content/entry/yuzu-patreon-preview-oct-2019/no_blur_fox.png new file mode 100644 index 000000000..5a7bbf27e Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/no_blur_fox.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/savedata1.bin b/site/content/entry/yuzu-patreon-preview-oct-2019/savedata1.bin new file mode 100644 index 000000000..b634d3c58 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/savedata1.bin differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/shield_get.png b/site/content/entry/yuzu-patreon-preview-oct-2019/shield_get.png new file mode 100644 index 000000000..0a900f76a Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/shield_get.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/summary.png b/site/content/entry/yuzu-patreon-preview-oct-2019/summary.png new file mode 100644 index 000000000..b70996b8e Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/summary.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/swamp.png b/site/content/entry/yuzu-patreon-preview-oct-2019/swamp.png new file mode 100644 index 000000000..5294772aa Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/swamp.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/sword.png b/site/content/entry/yuzu-patreon-preview-oct-2019/sword.png new file mode 100644 index 000000000..a7073efe2 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/sword.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/sword_get.png b/site/content/entry/yuzu-patreon-preview-oct-2019/sword_get.png new file mode 100644 index 000000000..a1fa1c2e9 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/sword_get.png differ diff --git a/site/content/entry/yuzu-patreon-preview-oct-2019/title.png b/site/content/entry/yuzu-patreon-preview-oct-2019/title.png new file mode 100644 index 000000000..7f89ca2f5 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-oct-2019/title.png differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/banner.png b/site/content/entry/yuzu-patreon-preview-sept-2019/banner.png new file mode 100644 index 000000000..b86a59153 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/banner.png differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/botw-1.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/botw-1.jpg new file mode 100644 index 000000000..6413456a8 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/botw-1.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/botw-2.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/botw-2.jpg new file mode 100644 index 000000000..bd9c1071e Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/botw-2.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/botw-3.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/botw-3.jpg new file mode 100644 index 000000000..403c437de Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/botw-3.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/config.png b/site/content/entry/yuzu-patreon-preview-sept-2019/config.png new file mode 100644 index 000000000..8ed77612e Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/config.png differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/hw-1.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/hw-1.jpg new file mode 100644 index 000000000..9fbad7519 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/hw-1.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/hw-2.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/hw-2.jpg new file mode 100644 index 000000000..a38cfc2a8 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/hw-2.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/hw-3.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/hw-3.jpg new file mode 100644 index 000000000..f69783d8a Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/hw-3.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/index.md b/site/content/entry/yuzu-patreon-preview-sept-2019/index.md new file mode 100644 index 000000000..0c71c61d0 --- /dev/null +++ b/site/content/entry/yuzu-patreon-preview-sept-2019/index.md @@ -0,0 +1,98 @@ ++++ +date = "2019-09-09T01:18:00+05:30" +title = "yuzu Patreon Preview Release September 2019" +author = "CaptV0rt3x" +forum = 144316 ++++ + +Good Day yuz-ers! (*yeah, that's sticking!*) +Many of you thought that yuzu's development slowed down, didn't you? +Well, guess again - The team has been working tirelessly to bring you this exciting new feature! +What is it? Jump right in to find out! + +**** +{{< single-title-imgs + "Super Mario Maker 2 - Rescaled to 6k" + "./smm2-1.jpg" + "./smm2-2.jpg" + "./smm2-3.jpg" +>}} + +We hope everyone had an enjoyable and relaxing summer. +While you may have noticed a bit of a lull during August, make no mistake that our team was still hard at work! +Behind the scenes, our GPU team has been investing a ton of time and talent into bringing about this patreon releases' biggest feature: `Resolution Rescaler!` + +### You can download this release on our [Patreon](https://www.patreon.com/posts/september-2019-29811265)! + +As you might expect from the name, this feature increases native resolution through a set of rules enforced by a profile, very similar to other emulators such as Cemu. +You can select `Profile Scanner (Native)` option in the `Internal Resolution` drop-down list. + +- When this option is selected, yuzu will continuously learn more about your specific games rendering methods, and will help create a resolution profile for that game. +- Once a profile is generated or obtained, the user can then select what multiplier they would like to increase their resolution by (2x, 4x, etc). +- You can find these rescaling profiles under `%APPDATA%/yuzu/rescaling/` on Windows and `~/.local/share/yuzu-emu/rescaling/` on Linux, or you can right-click the game on the UI and click on `Open Rescaling Profile`. + +{{< imgs + "./config.png|Configuration Option" +>}} + +This of course doesn't come without a few kinks that need to be ironed out. +For now, some of the dev teams known issues include: + + - `Super Mario Odyssey` and `The Legend of Zelda: Breath of the Wild` won't rescale correctly on the edges due to a hardcoded AA shader that those games have.
+ The game itself will still look better and more accurate, but you'll noticed the jagged edges typically associated with hardcoded AA games. + + {{< single-title-imgs + "The Legend of Zelda: Breath of the Wild - Rescaled to 6k" + "./botw-1.jpg" + "./botw-2.jpg" + "./botw-3.jpg" + >}} + + - `Pokémon: Let's Go` and some other games have small rendering artefacts when rescaled, such as the flames on Charizard's tail do not render. + + {{< single-title-imgs + "Super Mario Odyssey - Rescaled to 6k" + "./smo-1.jpg" + "./smo-2.jpg" + "./smo-3.jpg" + >}} + +That's not all that has changed, other notable fixes include: + +- sRGB has been fixed. This essentially corrects some games that looked lighter than usual. +- Viewport and scissor testing have been corrected, which fixes a ton of issues in many different games, most notably in `Hyrule Warriors`. + +{{< single-title-imgs + "Hyrule Warriors - Rescaled to 6k" + "./hw-1.jpg" + "./hw-2.jpg" + "./hw-3.jpg" +>}} + +- Tons of refactoring changes, to better prepare us for our Vulkan backend and other future improvements. +- Reworked GPU buffer cache is now more accurate and faster, which lead to fixes in `Super Smash Bros. Ultimate`, `Onimusha Warlords`, and many other titles. + +{{< single-title-imgs + "Super Smash Bros. Ultimate - Rescaled to 6k" + "./ssbu-1.jpg" + "./ssbu-2.jpg" + "./ssbu-3.jpg" +>}} + +- Corrected our shader code to help set up preparation for `Fire Emblem: Three Houses`. +- Several fixes for `Xenoblade 2` - character models look better and most vertex explosions are gone. + +{{< imgs + "./xenoblade.png|Xenoblade 2" +>}} + +This is a huge release for our testing purposes. +The `Resolution Rescaler` is still being thoroughly worked on, so if you come across any bugs that weren't mentioned above, or have any feedback, please don't hesitate to share it with us in our patreon channels on our discord server. + +Once again thank you for your patronage, and we look forward to hearing back from you all!
+Cheers,
+- yuzu development team + +**** +**If you'd like to try out this preview release, please head on over to our [Patreon](https://www.patreon.com/yuzuteam) to get access! +Thank you again for your support!** diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-1.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-1.jpg new file mode 100644 index 000000000..8662d9194 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-1.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-2.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-2.jpg new file mode 100644 index 000000000..4bdffcd43 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-2.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-3.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-3.jpg new file mode 100644 index 000000000..9896f1b24 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/smm2-3.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/smo-1.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/smo-1.jpg new file mode 100644 index 000000000..e3bd415b6 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/smo-1.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/smo-2.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/smo-2.jpg new file mode 100644 index 000000000..9768f656d Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/smo-2.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/smo-3.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/smo-3.jpg new file mode 100644 index 000000000..41ae210fe Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/smo-3.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-1.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-1.jpg new file mode 100644 index 000000000..3ffc7f360 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-1.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-2.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-2.jpg new file mode 100644 index 000000000..d75f4f41f Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-2.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-3.jpg b/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-3.jpg new file mode 100644 index 000000000..f1f90cd88 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/ssbu-3.jpg differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/summary.png b/site/content/entry/yuzu-patreon-preview-sept-2019/summary.png new file mode 100644 index 000000000..ce24e4563 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/summary.png differ diff --git a/site/content/entry/yuzu-patreon-preview-sept-2019/xenoblade.png b/site/content/entry/yuzu-patreon-preview-sept-2019/xenoblade.png new file mode 100644 index 000000000..00de6db3a Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview-sept-2019/xenoblade.png differ diff --git a/site/content/entry/yuzu-patreon-preview/banner.png b/site/content/entry/yuzu-patreon-preview/banner.png new file mode 100644 index 000000000..22928d89b Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview/banner.png differ diff --git a/site/content/entry/yuzu-patreon-preview/botw-1.png b/site/content/entry/yuzu-patreon-preview/botw-1.png new file mode 100644 index 000000000..22928d89b Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview/botw-1.png differ diff --git a/site/content/entry/yuzu-patreon-preview/botw.png b/site/content/entry/yuzu-patreon-preview/botw.png new file mode 100644 index 000000000..0cf0a70bd Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview/botw.png differ diff --git a/site/content/entry/yuzu-patreon-preview/index.md b/site/content/entry/yuzu-patreon-preview/index.md new file mode 100644 index 000000000..6df323346 --- /dev/null +++ b/site/content/entry/yuzu-patreon-preview/index.md @@ -0,0 +1,67 @@ ++++ +date = "2019-02-11T03:48:00+05:30" +title = "yuzu Patreon Preview Release" +author = "CaptV0rt3x" +forum = 84438 ++++ + +A very good day to all you yuzu fans out there! +Today we are here to share with you some very exciting news for our biggest supporters! + + +## Foreword + +As a start, let's talk about how emulator development works from a bird's-eye view. +We all know that developing emulators requires significant reverse-engineering and programming knowledge, as well as lots of coding, testing, and bug fixing. +That's the **technical** stuff. +But before we can even get there, we need people who have the required skills and are willing to invest their time and effort into the project. +These people, our Developers, work tirelessly to keep Switch emulation progressing. +They work mostly in their free time and are very passionate about the project. + +{{< imgs + "./smo-2.png|Super Mario Odyssey" +>}} + +`Wait a second, you guys probably already know all this stuff.` +What you might not know is that, most of the time these developers work for free. +They don't get paid for their efforts nor do they ask to be paid. +In addition to our development costs (Switch consoles and games, web services, etc.), some of our developers are in situations that would really benefit from even a small amount of income from this project. + +As you probably know, we created a [Patreon](https://www.patreon.com/yuzuteam) to address this need. +We have asked the community to help us by subscribing and they heard. +We now have over 200 patrons who collectively contribute to our project! +We would like to sincerely thank them for their love, support, and contributions! + +When we decided to create a Patreon, we promised our patrons that they would get access to exclusive content as a thank you. +Until now, we have only partially fulfilled our promise - by means of exclusive Discord support. +It's about time we fulfilled on our promise. + +## Big News + +**As a token of our thanks, we are announcing today that we will be releasing a special Preview of yuzu to our patrons!** + +We've made lots of incredible progress that we'd like to share first with the folks who have been our biggest supporters and fans. + +> Starting today, patrons with donations of 5$/month and above (Patreon Roles: Supporter, Member, VIP) will get early access to new features via a **yuzu Patreon Preview**, before this content becomes available in our Nightly and Canary releases. + +Features found in this preview are not exclusive and will definitely be available for regular users within a few days. +In accordance with our [open source license](https://github.com/yuzu-emu/yuzu/blob/master/license.txt), the source code for these previews will be made available to our patrons. + +This is just a preview release and is not similar to our Nightly or Canary builds - which get updated daily. +We may do similar releases like this in the future as we have more exciting new features to share, but not with any set regularity. +Support for this preview version will be given exclusively via the Patreon channels on our [Discord server](https://discord.gg/u77vRWY). + +{{< single-title-imgs + "The Legend of Zelda - Breath of the Wild" + "./botw.png" + "./botw-1.png" +>}} + +{{< single-title-imgs + "Super Mario Odyssey" + "./smo.png" + "./smo-1.png" +>}} + +**If you'd like to try out this preview release, please head on over to our [Patreon](https://www.patreon.com/yuzuteam) to get access! +Thank you again for your support!** \ No newline at end of file diff --git a/site/content/entry/yuzu-patreon-preview/smo-1.png b/site/content/entry/yuzu-patreon-preview/smo-1.png new file mode 100644 index 000000000..1f39a45b0 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview/smo-1.png differ diff --git a/site/content/entry/yuzu-patreon-preview/smo-2.png b/site/content/entry/yuzu-patreon-preview/smo-2.png new file mode 100644 index 000000000..977039ef1 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview/smo-2.png differ diff --git a/site/content/entry/yuzu-patreon-preview/smo.png b/site/content/entry/yuzu-patreon-preview/smo.png new file mode 100644 index 000000000..2d9b5749e Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview/smo.png differ diff --git a/site/content/entry/yuzu-patreon-preview/summary.png b/site/content/entry/yuzu-patreon-preview/summary.png new file mode 100644 index 000000000..0c912e274 Binary files /dev/null and b/site/content/entry/yuzu-patreon-preview/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch.png b/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch.png new file mode 100644 index 000000000..b71c71bf0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch_jap.png b/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch_jap.png new file mode 100644 index 000000000..7ce93005e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch_jap.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch_work.png b/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch_work.png new file mode 100644 index 000000000..c13cdcaaa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/1-2-switch_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/banner.png b/site/content/entry/yuzu-progress-report-2018-p1/banner.png new file mode 100644 index 000000000..20ebbaae1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/boi.png b/site/content/entry/yuzu-progress-report-2018-p1/boi.png new file mode 100644 index 000000000..68ba4a094 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/boi.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/boi_2.png b/site/content/entry/yuzu-progress-report-2018-p1/boi_2.png new file mode 100644 index 000000000..a4e3c3ed6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/boi_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/boi_work.png b/site/content/entry/yuzu-progress-report-2018-p1/boi_work.png new file mode 100644 index 000000000..ba0af76b8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/boi_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/cavestory_boot.png b/site/content/entry/yuzu-progress-report-2018-p1/cavestory_boot.png new file mode 100644 index 000000000..27f106ac5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/cavestory_boot.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/cavestory_work.png b/site/content/entry/yuzu-progress-report-2018-p1/cavestory_work.png new file mode 100644 index 000000000..3e032671d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/cavestory_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/homebrew.mp4 b/site/content/entry/yuzu-progress-report-2018-p1/homebrew.mp4 new file mode 100644 index 000000000..9e55ec12a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/homebrew.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/homebrew_game.png b/site/content/entry/yuzu-progress-report-2018-p1/homebrew_game.png new file mode 100644 index 000000000..b862e7ad0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/homebrew_game.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/homebrew_work.jpg b/site/content/entry/yuzu-progress-report-2018-p1/homebrew_work.jpg new file mode 100644 index 000000000..7534a1164 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/homebrew_work.jpg differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/index.md b/site/content/entry/yuzu-progress-report-2018-p1/index.md new file mode 100644 index 000000000..dbbffa70b --- /dev/null +++ b/site/content/entry/yuzu-progress-report-2018-p1/index.md @@ -0,0 +1,240 @@ ++++ +date = "2018-07-14T08:00:00+05:30" +title = "Progress Report 2018 Part 1" +author = "CaptV0rt3x" +forum = 33660 ++++ + +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! + + + +After months of research and countless hours of coding, the developers who gave you [Citra](https://citra-emu.org), +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. + +## Backstory + +The Switch is the 7th 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. + +[bunnei](https://github.com/bunnei), 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 _Horizon_, being +based on the 3DS's operating system. The Switch hacking communities ([ReSwitched](https://reswitched.tech/) +and [Switchbrew](http://switchbrew.org)) had many people working on hacking and documenting the system. +Being _a huge Nintendo fan_, 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. + +{{< imgs + "./homebrew.mp4|Before (Colors are wrong)" + "./homebrew_work.jpg|After (fixed)" +>}} + +{{< imgs + "./homebrew_game.png|Very first homebrew on yuzu, Space Game !!" +>}} + +## Baby Steps + +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 [Unicorn](http://www.unicorn-engine.org/) +into yuzu for CPU emulation. Unicorn was chosen at that time and not [Dynarmic](https://github.com/MerryMage/dynarmic) +(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. + +Later, [Subv](https://github.com/Subv), 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. + +{{< imgs + "./puyo_boot.png|First game rendering triangles (actually SEGA logo) !!" +>}} + +## Pit Crew & Their Efforts So Far + +***Rivalry of scholars advances wisdom***. 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, +[3dmoo](https://github.com/plutooo/3dmoo). In the case of Switch emulation, we have [Ryujinx](https://github.com/gdkchan/Ryujinx). +Our developers have worked with [gdkchan](https://github.com/gdkchan) (the main developer of Ryujinx) on +reverse engineering (RE), figuring out how games work, and how the Switch GPU works. + +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. [ogniK](https://github.com/ogniK5377) +(from the [ReSwitched](https://reswitched.tech/) 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. + +[shinyquagsire](https://github.com/shinyquagsire23), another Citra developer, came forward and implemented +user input and various other things. [Lioncash](https://github.com/lioncash) and [MerryMage](https://github.com/merrymage) +worked tirelessly on adding ARMv8 support to dynarmic, and thanks to their efforts we are now using +[dynarmic](https://github.com/MerryMage/dynarmic) 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. + +## Reverse Engineering (RE) + +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. + +{{< imgs + "./setup.jpg|ogniK's janky RE setup" +>}} + +That said, there are more resources and non-Switch related projects ([Nouveau](https://nouveau.freedesktop.org/wiki/), +[envytools](https://github.com/envytools/envytools), 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. + +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. + +## OS emulation + +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. + +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 ([here](https://github.com/yuzu-emu/yuzu/pull/123)). +Further fixes and improvements to the loader were done by [ogniK](https://github.com/ogniK5377), +[Rozelette](https://github.com/Rozelette), [gdkchan](https://github.com/gdkchan), and +[shinyquagsire](https://github.com/shinyquagsire23). + +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 +([here](https://github.com/yuzu-emu/yuzu/pull/216)). This implementation allowed us to boot further +in "Puyo Puyo Tetris" and "Cave Story". + +{{< imgs + "./cavestory_boot.png|First boot - Cave Story+" + "./cavestory_work.png|Now - Cave Story+" +>}} + +{{< imgs + "./tetris.png|First boot - Puyo Puyo Tetris" + "./tetris_work.png|Now - Puyo Puyo Tetris" +>}} + +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 `libnx`, 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. + +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 `ok` 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. + +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. + +{{< imgs + "./stardew.png|First boot - Stardew Valley" + "./stardew_2.png|in-game - bugs" + "./stardew_work.png|Now - Stardew Valley" +>}} + +In addition to this, we have a couple of different command modes, a typical IPC request response, and +something called a _Domain_. 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. + +A lot of our work is based on background research the ReSwitched team did with their Switch +debug emulators, [CageTheUnicorn](https://github.com/reswitched/CageTheUnicorn) (python) and [Mephisto](https://github.com/reswitched/mephisto)(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 [daeken](https://github.com/daeken) and [misson20000](https://github.com/misson20000), for +without their help with reverse engineering and bug fixing along the way, we wouldn't have gotten as +far as we have. + +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. + +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. + +{{< imgs + "./1-2-switch.png|First boot - 1-2-Switch" + "./1-2-switch_jap.png|Wrong Language" + "./1-2-switch_work.png|Now - 1-2-Switch" +>}} + +{{< imgs + "./boi_2.png|First boot - The Binding of Issac" + "./boi.png|in-game - first renders" + "./boi_work.png|Now - The Binding of Issac" +>}} + +As we now have some games booting, the next step along the line would be adding HID (user input support). +[shinyquagsire](https://github.com/shinyquagsire23) 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! + +Currently Audio HLE is in progress, but we do not support audio playback (_yet!_). [ogniK](https://github.com/ogniK5377) +did a lot of reverse engineering on the `AudRen` service (Audio renderer) which most games use for +audio output. There is another service called `AudOut` 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 `AudRen` 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 +`AudRen` state to be set. ogniK's work on this helped us go further in a few other games. + +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. + +***Check out the next part of this report [here](https://yuzu-emu.org/entry/yuzu-progress-report-2018-p2)*** + +

+Contributions are always welcome ! +

diff --git a/site/content/entry/yuzu-progress-report-2018-p1/puyo_boot.png b/site/content/entry/yuzu-progress-report-2018-p1/puyo_boot.png new file mode 100644 index 000000000..0573cf402 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/puyo_boot.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/setup.jpg b/site/content/entry/yuzu-progress-report-2018-p1/setup.jpg new file mode 100644 index 000000000..9436e664e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/setup.jpg differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/stardew.png b/site/content/entry/yuzu-progress-report-2018-p1/stardew.png new file mode 100644 index 000000000..f8907fa82 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/stardew.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/stardew_2.png b/site/content/entry/yuzu-progress-report-2018-p1/stardew_2.png new file mode 100644 index 000000000..e6279eda2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/stardew_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/stardew_work.png b/site/content/entry/yuzu-progress-report-2018-p1/stardew_work.png new file mode 100644 index 000000000..a7809509d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/stardew_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/summary.png b/site/content/entry/yuzu-progress-report-2018-p1/summary.png new file mode 100644 index 000000000..b8c1bc0bb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/tetris.png b/site/content/entry/yuzu-progress-report-2018-p1/tetris.png new file mode 100644 index 000000000..e011337b7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/tetris.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p1/tetris_work.png b/site/content/entry/yuzu-progress-report-2018-p1/tetris_work.png new file mode 100644 index 000000000..a80c9644d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p1/tetris_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/12switch.png b/site/content/entry/yuzu-progress-report-2018-p2/12switch.png new file mode 100644 index 000000000..cc2986483 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/12switch.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/Lildew.png b/site/content/entry/yuzu-progress-report-2018-p2/Lildew.png new file mode 100644 index 000000000..bb1b15196 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/Lildew.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/SMO.png b/site/content/entry/yuzu-progress-report-2018-p2/SMO.png new file mode 100644 index 000000000..1f51676a6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/SMO.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/SMO_2.png b/site/content/entry/yuzu-progress-report-2018-p2/SMO_2.png new file mode 100644 index 000000000..304ce7e17 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/SMO_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/SMO_2_work.png b/site/content/entry/yuzu-progress-report-2018-p2/SMO_2_work.png new file mode 100644 index 000000000..5f2605c23 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/SMO_2_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/SMO_astc.png b/site/content/entry/yuzu-progress-report-2018-p2/SMO_astc.png new file mode 100644 index 000000000..4940fc4ab Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/SMO_astc.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/SMO_debug.png b/site/content/entry/yuzu-progress-report-2018-p2/SMO_debug.png new file mode 100644 index 000000000..129663a85 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/SMO_debug.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/SMO_work.png b/site/content/entry/yuzu-progress-report-2018-p2/SMO_work.png new file mode 100644 index 000000000..9e97bb919 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/SMO_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/arms.png b/site/content/entry/yuzu-progress-report-2018-p2/arms.png new file mode 100644 index 000000000..d00b4bc2a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/arms.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/banner.png b/site/content/entry/yuzu-progress-report-2018-p2/banner.png new file mode 100644 index 000000000..7057d423c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/celeste.png b/site/content/entry/yuzu-progress-report-2018-p2/celeste.png new file mode 100644 index 000000000..a60d05942 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/celeste.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/debug.png b/site/content/entry/yuzu-progress-report-2018-p2/debug.png new file mode 100644 index 000000000..b5d498456 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/debug.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/doom.png b/site/content/entry/yuzu-progress-report-2018-p2/doom.png new file mode 100644 index 000000000..6fc4aa31a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/doom.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/farming.png b/site/content/entry/yuzu-progress-report-2018-p2/farming.png new file mode 100644 index 000000000..24aff22a8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/farming.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/hmbrewgfx.png b/site/content/entry/yuzu-progress-report-2018-p2/hmbrewgfx.png new file mode 100644 index 000000000..870b1bcba Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/hmbrewgfx.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/hmbrewgfx_nx.jpg b/site/content/entry/yuzu-progress-report-2018-p2/hmbrewgfx_nx.jpg new file mode 100644 index 000000000..41ad2e6a1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/hmbrewgfx_nx.jpg differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/index.md b/site/content/entry/yuzu-progress-report-2018-p2/index.md new file mode 100644 index 000000000..e7eb974da --- /dev/null +++ b/site/content/entry/yuzu-progress-report-2018-p2/index.md @@ -0,0 +1,241 @@ ++++ +date = "2018-07-21T20:00:00+05:30" +title = "Progress Report 2018 Part 2" +author = "CaptV0rt3x" +forum = 35830 ++++ + +We bring you part 2 of the extensive coverage on yuzu's tremendous progress. So buckle up for an +exciting ride, cause its gonna blow your mind! +  +
+***Haven't read the first part yet? Read it [here](https://yuzu-emu.org/entry/yuzu-progress-report-2018-p1)*** +
+ + +## General Improvements + +Software development best practices dictate that one should reuse code whenever possible. +In line with this rule, yuzu began as a fork of the Citra code base with the core emulation code stripped out. +This allows yuzu to focus on the core switch emulation while still having a very functional user interface, but after some time, the code for the user interface will slowly start to diverge. +Several people chipped in to bringing the improvements over from Citra, most notably [Lioncash](https://github.com/lioncash), who over a period of time, has made many number of changes to bring yuzu up to date. +We also ported over some of Citra's recent features like the new fmtlib-based logging backend (thanks to [jroweboy](https://github.com/jroweboy) & [daniellimws](https://github.com/daniellimws) ), 'About' dialog, full-screen rendering support, and themes support. + +We have also implemented features like: + +* Added decrypted NCA support. +* OpenGL extensions support - checking, to ensure system requirements are met. +* 64-bit games - checking, to ensure unsupported 32-bit games aren't launched. +* Switch-specific ***Docked mode*** configuration setting. +* Improved FPS counter. +* And many more. + +All of these improvements were only possible because of the efforts of many contributors. + +## CPU emulation + +The Nintendo Switch is powered by a custom Nvidia Tegra SoC. +For the uninitiated, a SoC (system-on-chip) integrates components like CPU, GPU, memory, input/output ports, storage, etc., on a single chip. +The Switch's SoC (Nvidia ODNX02-A2), is a Tegra X1 chip, has 4 ARM Cortex-A57 CPU cores and 4 ARM Cortex-A53 CPU cores. +The CPU is based on the ARM architecture, which has already been well documented. +We first used [Unicorn](http://www.unicorn-engine.org/) for the CPU emulation. +However Unicorn is meant to assist developers that are debugging code, and isn't capable of running games at an acceptable framerate. +Truth be told, [Lioncash](https://github.com/lioncash) even back-ported relevant changes to Unicorn to make AArch64 emulation more complete. +Our version of Unicorn (QEMU 2.12.50) is miles ahead of actual mainline Unicorn (QEMU 2.2.1). + +No one, dev and user alike, wants their emulator to be slow. +So our talented developers [MerryMage](https://github.com/MerryMage) and Lioncash are working tirelessly to bring ARMv8 support to [Dynarmic](https://github.com/MerryMage/dynarmic), the dynamic recompiler that Merry wrote for Citra. +Dynarmic was designed from the beginning to be reusable for many different ARM CPUs, so when we needed a fast and stable recompiler, we already knew what we would use. +Thanks to their efforts Dynarmic now supports many ARMv8 instructions and we have shifted to using Dynarmic for CPU emulation. +They are currently working to implement complete ARMv8 support in the near future. + +Dynarmic is generally fast, but it is still missing implementations of a few instructions. +When dynarmic hits a missing instruction, it has to fallback to Unicorn, and falling back to using Unicorn is even slower than just using Unicorn directly! +In order to fallback to Unicorn, we need to copy all the CPU state from Dynarmic to Unicorn, execute Unicorn, and then copy the state back to Dynarmic. +These fallbacks are really slow. +Once we implement all instructions in Dynarmic, we will no longer need these and our CPU emulation will be much faster than it is now. +The most recent update to Dynarmic has vastly improved performance in almost all games, with games going up to 60FPS in some cases. + +## GPU emulation + +{{< imgs + "./hmbrewgfx.png|Testing (yuzu)" + "./hmbrewgfx_nx.jpg|Actual (Switch)" +>}} + +We got to the point where commercial games were running on yuzu around February 2018. +We could tell that they were almost ready to draw because they were submitting a command list to the emulated Nvidia GPU services. +For a brief explanation, command lists are how games configure the GPU hardware and let the game know that it is ready to start rendering. +Subv did a lot of work figuring out how the GPU register writes happen and on the communication protocols to get it working. + +As mentioned earlier, the Switch uses a Nvidia Tegra Soc which houses a GPU based on Maxwell architecture. +Nvidia's hardware is proprietary and has no public documentation on how it works. +Fortunately, Maxwell based GPUs were released 3 years ago and there are millions of devices using these GPUs. +The people from Linux community and various other places tried to create open source drivers for these GPUs, despite it being proprietary hardware. +They did a lot of leg work on finding out how these GPUs work. +The [Nouveau](https://nouveau.freedesktop.org/wiki/) project creates these open source Linux drivers for Nvidia GPUs and Tegra family of SoCs. +Although Linux drivers for desktop/laptop GPUs aren't the same as the GPU driver for a console like Switch, which runs its own OS, there is a fair amount of overlap. +There were also tools like [envytools](https://github.com/envytools/envytools) and its submodule envydis (disassembler), which did a lot of research into shader decoding. +envydis doesn't have any documentation about actual workings of each shader instruction, it just has the name, decoding and parameters. +The work done by these projects helped us in bringing initial emulation of GPU. + +{{< imgs + "./sonic_glitch.png|Sonic Mania - Then" + "./sonicmania.mp4|Sonic Mania - Now" +>}} + +With the help of these projects we made good progress in GPU emulation and got games to submit drawing calls, not just configuring the hardware but actually writing to registers, indicating that they were ready to draw triangles on the screen. +Even the simplest 2D games are no longer just 2D. +As the Switch uses a modern GPU, there is no hardware for drawing 2D. +So games instead make 2 triangles in the shape of a rectangle, and then render the current screen as a texture and blits it to the 2 triangles. +This way, the game is still a flexible 2D game, but can take advantage of the fast 3D rendering capabilities that the GPU offers. + +The first game to show graphics was "Puyo Puyo Tetris" around late February - early March. +The game calls this kind of generic `write` to drawing registers indicating that it was done rendering a batch of triangles. +So we knew that we were drawing and we now had to figure out how to decode these triangles and render them on screen. +At the end of the day, Switch uses a modern GPU and like most modern GPUs it relies on a programmable pipeline. +A programmable pipeline gives game developers the power to control some of the graphics pipeline with a full featured programming language, and these programs that they write are called shaders. +Game developers will write shaders in languages such as GLSL and HLSL, and the graphics driver will compile these into a GPU specific assembly language. +Shaders are really useful to give game developers the ability to change how the geometry is drawn, and even how the pixels are colored on the screen. + +{{< imgs + "./debug.png|Behind the scenes!" +>}} + +Because of how much shaders influence the whole scenes, GPU emulation development is not just a matter of handling triangles its also about handling shaders. +We had to actually implement the shader programs to get more graphics output, meaning we needed to decompile each shader instruction. +In case you were wondering, Nintendo Switch games are built with precompiled shader binaries, so we can't just run the original program. +Instead we have to analyze the shader instructions and figure out novel ways to get convert it back to a high level shader code again. +Figuring out what each shader instruction means wasn't an easy task, as this was all Nvidia's proprietary code. +We worked a lot with [gdkchan](https://github.com/gdkchan), as he had made a bit of progress with this, and quickly learned how to decode GPU data based on nouveau and envytools. +envytools and envydis (disassembler) did the reverse engineering of how shaders work in Maxwell based GPUs, so we already know most of the disassemblies of the instructions, but not always what they do. + +{{< imgs + "./sonic_1.png" + "./sonic_2.png" + "./sonic_3.png" + "./sonic_4.png" + "./sonic_5.png" +>}} + +For actual shader implementation in yuzu, we decided to base it on a recent addition to Citra, a shader recompiler that converts the emulated 3DS shaders into GLSL so they can be run on the host GPU. +Instead of running all these shader programs (which have to run for thousands of vertices) on the CPU, we translate these shaders into OpenGL GLSL and upload the program directly as is to GPU. +This is better as GPUs are designed to run these programs in parallel for thousands of vertices, whereas CPUs are not. +In Citra, we were running the fragment shaders on the GPU since at least 2015, but the vertex and geometry shaders were run on the CPU. +The 3DS vertex and geometry shaders have some very hard to account for corner cases, and it took many years to make sure that our reverse engineering efforts were correct. +That way we didn't have to waste effort working on something we couldn't be sure was possible. +If you would like to read more about the feature in Citra, check out the blog post about it ([here](https://citra-emu.org/entry/improvements-to-hardware-renderer/)). + +However this isn't an option in case of yuzu, as Switch's GPU is modern and way too powerful for doing this in software. +Around April 2018, we were able to get enough of shader instructions implemented to get "Puyo Puyo Tetris" to show a bit of graphics. +It wasn't much, just rendered `SEGA logo` and `Tetris logo`, and pretty much hung after that. +Furthermore, we were able to get a few other simple 2D games like "Cave Story" and "The Binding of Issac" booting as well. + +{{< imgs + "./splatoon2.mp4|Splatoon 2 - Then" + "./splatoon2_work.png|Splatoon 2 - Now" +>}} + +Another new feature which we implemented was shader `constbuffer` support by Subv. +We have shader programs that we want to reuse for a bunch of different triangles for features like the UI or 3D models. +It isn't efficient to have individual shaders for every single thing, instead we can have a couple of shader programs that can be reused for everything. +So, shader `constbuffer` support is the equivalent of OpenGL `uniform` and `uniform buffer objects (UBO)`. +Uniforms in general are a way to provide constant data to shaders and can also be used to reconfigure the shader as well. + +Initial rendering support and blending support were done by bunnei. +Blending is used for alpha transparency - translating Switch GPU register writes to OpenGL calls. +It fixed a bug in "Puyo Puyo Tetris", where the `Saving...` icon in the top left corner had a weird box around it. +Initial texture support was done by Subv and mainly involved reading a texture from memory, decoding it, and uploading it to OpenGL. + +Coming to rasterizer cache, its computationally expensive to upload a texture from the emulated Switch memory to the host GPU every time it's used. +The texture will need to be decoded and unswizzled before its uploaded, and then the memory will need to be copied from the CPU RAM into the GPU RAM. +It's much more efficient to just keep texture in the GPU memory, similar to how it works on hardware with normal PC games, but is a little bit trickier for emulation. +This is because we don't know when the game might change the texture or modify it. +bunnei did most of the work to cache these textures, so when a texture is uploaded to OpenGL it is saved in GPU memory and we keep track of it. +When the CPU or our emulated Switch kernel reads or writes to the memory address that the texture was uploaded to, we check to see what we need to do, and reload the texture only if necessary. +This also applies to framebuffers because in some cases, games can use them as textures. +If this caching wasn't existent, we'd essentially have to upload every texture to OpenGL memory (host GPU space) on every draw, copy the final framebuffer back to emulated Switch memory (CPU space) so that the game could potentially use it for framebuffer. + +{{< imgs + "./SMO_astc.png|Testing Super Mario Odyssey" + "./SMO.png|Inverted render" + "./SMO_2.png|Inverted render" +>}} + +{{< imgs + "./SMO_debug.png|Debugging" + "./SMO_work.png| Proper render" + "./SMO_2_work.png| Proper render" +>}} + +We had a couple of fixes to our rasterizer cache mainly because it was based on Citra's rasterizer cache. +Because the compressed texture formats that the 3DS uses are not commonly supported by desktop GPUs, Citra's rasterizer cache decodes any compressed textures before uploading and caching them. +But since the Switch GPU supports many of the same texture formats that desktop OpenGL does, we sped things up by uploading them without decoding them. +At the start, this support was just hacked into Citra's cache, which didn't end up working correctly all the time. +One example was the squid texture in "Splatoon 2", which was identified and fixed by Subv. +We also implemented texture color swizzling, a way to swap color components, which is used by "Splatoon 2" to swap colors for intro background texture. +So, before we implemented this the colors were all wrong. +We fixed YUV2 video playback in our shader support, which fixed the previously busted "Sonic Mania" intro. +We had to implement a field parameter called component masks in `TEX/TEXS` shader instructions, to properly decode `YUV2` videos. +We also implemented texture wrap modes, which gives the ability to specify whether a texture on a triangle is mirrored or repeating etc. + +There are lots of other things already implemented and many more that have to be implemented. +As the Switch's GPU is quite advanced, we have dozens of texture formats, vertex formats, lots of registers, different configuration modes, shader instructions that need to be implemented. + +{{< imgs + "./onepiece.png|One Piece - Then" + "./onepiece_work.png|One Piece - Now" + "./steam_world.png|Steam World Dig 2" +>}} + +Apart from the above mentioned stuff, there have been many more modifications made to yuzu's GPU HLE (high level emulation). +These bug fixes or modifications were done on a per-game experimentation basis and as we progress further we will continue to fix our implementations and improve the accuracy of emulation in yuzu. +All of the progress we have made until now is thanks to the efforts of yuzu's contributors and the good people from Switch hacking communities. + +## Virtual File System (VFS) by [DarkLordZach](https://github.com/DarkLordZach) ([here](https://github.com/yuzu-emu/yuzu/pull/676)) + +A Virtual File System (VFS) is an abstraction layer which allows us to hide the details of where the actual files are stored. +The purpose of a VFS is to enable the emulated Switch file system to read and write to many different types of backends, without changing anything in the emulated FS code. +In layman's terms, the game will still think its reading and writing to a file on the Switch, but in reality it could be reading from a zip file, or from a custom mod that the user adds. +This makes further support for Updates, DLC, new formats, encryption, etc., a little bit easier to implement. [DarkLordZach](https://github.com/DarkLordZach) single-handedly worked on VFS for a couple of weeks and successfully implemented it. + +## Touch-Screen Support by [DarkLordZach](https://github.com/DarkLordZach) ([here](https://github.com/yuzu-emu/yuzu/pull/683)) + +DarkLordZach has been working very actively on various bug fixes, features and has also been lending a hand in testing games too. +His latest contribution comes in the form of touch-screen support for yuzu. +With this feature, yuzu now emulates mouse clicks to touch inputs and if you happen to have a physical touch screen, that can be used as a input device too. + +{{< imgs + "./12switch.png|1-2-Switch" + "./arms.png|ARMS" + "./celeste.png|Celeste" + "./doom.png| Doom" +>}} + +{{< imgs + "./farming.png|Farming Simulator" + "./Lildew.png|Ittle Dew" + "./minecraft.png|Minecraft Story Mode" + "./picross.png|Picross" +>}} + +{{< imgs + "./minecraft.mp4|Our first 3D rendered game - Minecraft" +>}} + +## Miscellaneous + +Apart from these improvements, we have had multiple PRs which fixed bugs and deadlocks in various games. +We got graphics output in Super Mario Odyssey, fixed saves related issues, launched many new games to the title screen, booted into few networked dependent games like Doom, implemented few SVCs and shader instructions, fixed a major performance regression with controller support, optimized logging system and did many more optimizations. +We thank all the contributors for their valuable contributions and applaud their efforts. + +{{< imgs + "./seiken.png|Seiken Densetsu Collection" + "./setsuna.png|I am Setsuna" + "./sm+.png|Sonic Mania Plus" + "./snipper.png|Snipperclips Plus" +>}} + +

+Contributions are always welcome ! +

diff --git a/site/content/entry/yuzu-progress-report-2018-p2/minecraft.mp4 b/site/content/entry/yuzu-progress-report-2018-p2/minecraft.mp4 new file mode 100644 index 000000000..6df4119e6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/minecraft.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/minecraft.png b/site/content/entry/yuzu-progress-report-2018-p2/minecraft.png new file mode 100644 index 000000000..0cddb4fd3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/minecraft.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/onepiece.png b/site/content/entry/yuzu-progress-report-2018-p2/onepiece.png new file mode 100644 index 000000000..423571661 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/onepiece.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/onepiece_work.png b/site/content/entry/yuzu-progress-report-2018-p2/onepiece_work.png new file mode 100644 index 000000000..b78631f2f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/onepiece_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/picross.png b/site/content/entry/yuzu-progress-report-2018-p2/picross.png new file mode 100644 index 000000000..80d8c88f7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/picross.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/seiken.png b/site/content/entry/yuzu-progress-report-2018-p2/seiken.png new file mode 100644 index 000000000..62c4392ff Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/seiken.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/setsuna.png b/site/content/entry/yuzu-progress-report-2018-p2/setsuna.png new file mode 100644 index 000000000..9c86f3c81 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/setsuna.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sm+.png b/site/content/entry/yuzu-progress-report-2018-p2/sm+.png new file mode 100644 index 000000000..d73d05f76 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sm+.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/snipper.png b/site/content/entry/yuzu-progress-report-2018-p2/snipper.png new file mode 100644 index 000000000..1e9e88dcf Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/snipper.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sonic_1.png b/site/content/entry/yuzu-progress-report-2018-p2/sonic_1.png new file mode 100644 index 000000000..5e138bbdd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sonic_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sonic_2.png b/site/content/entry/yuzu-progress-report-2018-p2/sonic_2.png new file mode 100644 index 000000000..c4ae2fec6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sonic_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sonic_3.png b/site/content/entry/yuzu-progress-report-2018-p2/sonic_3.png new file mode 100644 index 000000000..38c84aa6c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sonic_3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sonic_4.png b/site/content/entry/yuzu-progress-report-2018-p2/sonic_4.png new file mode 100644 index 000000000..1ccab7470 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sonic_4.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sonic_5.png b/site/content/entry/yuzu-progress-report-2018-p2/sonic_5.png new file mode 100644 index 000000000..4e67ca0e1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sonic_5.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sonic_glitch.png b/site/content/entry/yuzu-progress-report-2018-p2/sonic_glitch.png new file mode 100644 index 000000000..f0a009260 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sonic_glitch.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/sonicmania.mp4 b/site/content/entry/yuzu-progress-report-2018-p2/sonicmania.mp4 new file mode 100644 index 000000000..0c0955043 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/sonicmania.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/splatoon2.mp4 b/site/content/entry/yuzu-progress-report-2018-p2/splatoon2.mp4 new file mode 100644 index 000000000..d83c1ba5d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/splatoon2.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/splatoon2_work.png b/site/content/entry/yuzu-progress-report-2018-p2/splatoon2_work.png new file mode 100644 index 000000000..8cabd25bc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/splatoon2_work.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/steam_world.png b/site/content/entry/yuzu-progress-report-2018-p2/steam_world.png new file mode 100644 index 000000000..accece2fd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/steam_world.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p2/summary.png b/site/content/entry/yuzu-progress-report-2018-p2/summary.png new file mode 100644 index 000000000..93566bdd7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p2/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/arms.png b/site/content/entry/yuzu-progress-report-2018-p3/arms.png new file mode 100644 index 000000000..41c139cc0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/arms.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/arms_1.png b/site/content/entry/yuzu-progress-report-2018-p3/arms_1.png new file mode 100644 index 000000000..380c63868 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/arms_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/arms_2.png b/site/content/entry/yuzu-progress-report-2018-p3/arms_2.png new file mode 100644 index 000000000..6513f65a7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/arms_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/arms_3.png b/site/content/entry/yuzu-progress-report-2018-p3/arms_3.png new file mode 100644 index 000000000..0446fd17b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/arms_3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/banner.png b/site/content/entry/yuzu-progress-report-2018-p3/banner.png new file mode 100644 index 000000000..069016819 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/bayo.png b/site/content/entry/yuzu-progress-report-2018-p3/bayo.png new file mode 100644 index 000000000..49f7875fb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/bayo.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/bayo_1.png b/site/content/entry/yuzu-progress-report-2018-p3/bayo_1.png new file mode 100644 index 000000000..f89e499d0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/bayo_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/bayo_2.png b/site/content/entry/yuzu-progress-report-2018-p3/bayo_2.png new file mode 100644 index 000000000..a0d0e4f7b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/bayo_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/boi.png b/site/content/entry/yuzu-progress-report-2018-p3/boi.png new file mode 100644 index 000000000..e0c273d5c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/boi.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/boi_1.png b/site/content/entry/yuzu-progress-report-2018-p3/boi_1.png new file mode 100644 index 000000000..6203f7de5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/boi_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/botw.png b/site/content/entry/yuzu-progress-report-2018-p3/botw.png new file mode 100644 index 000000000..bf68845da Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/botw.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/botw_1.png b/site/content/entry/yuzu-progress-report-2018-p3/botw_1.png new file mode 100644 index 000000000..e878bf814 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/botw_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/botw_2.png b/site/content/entry/yuzu-progress-report-2018-p3/botw_2.png new file mode 100644 index 000000000..9e1c1928a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/botw_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/botw_3.png b/site/content/entry/yuzu-progress-report-2018-p3/botw_3.png new file mode 100644 index 000000000..852b5e2ab Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/botw_3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/disg.png b/site/content/entry/yuzu-progress-report-2018-p3/disg.png new file mode 100644 index 000000000..c362fdd38 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/disg.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/disg_1.png b/site/content/entry/yuzu-progress-report-2018-p3/disg_1.png new file mode 100644 index 000000000..e5ec94d0d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/disg_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/disg_2.png b/site/content/entry/yuzu-progress-report-2018-p3/disg_2.png new file mode 100644 index 000000000..4b4494355 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/disg_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/disg_3.png b/site/content/entry/yuzu-progress-report-2018-p3/disg_3.png new file mode 100644 index 000000000..cbc237dd0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/disg_3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/doom.png b/site/content/entry/yuzu-progress-report-2018-p3/doom.png new file mode 100644 index 000000000..78b2ed7ec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/doom.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/doom_1.png b/site/content/entry/yuzu-progress-report-2018-p3/doom_1.png new file mode 100644 index 000000000..d25f63032 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/doom_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/fe-w.png b/site/content/entry/yuzu-progress-report-2018-p3/fe-w.png new file mode 100644 index 000000000..e84bfd399 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/fe-w.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/fe-w_1.png b/site/content/entry/yuzu-progress-report-2018-p3/fe-w_1.png new file mode 100644 index 000000000..27351a94e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/fe-w_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/fh.png b/site/content/entry/yuzu-progress-report-2018-p3/fh.png new file mode 100644 index 000000000..afb249f85 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/fh.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/fh_1.png b/site/content/entry/yuzu-progress-report-2018-p3/fh_1.png new file mode 100644 index 000000000..9fd8067cd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/fh_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/game_list.png b/site/content/entry/yuzu-progress-report-2018-p3/game_list.png new file mode 100644 index 000000000..69ed08f87 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/game_list.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/hb-h.png b/site/content/entry/yuzu-progress-report-2018-p3/hb-h.png new file mode 100644 index 000000000..1801abbac Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/hb-h.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/hb-h_1.png b/site/content/entry/yuzu-progress-report-2018-p3/hb-h_1.png new file mode 100644 index 000000000..d27931fc5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/hb-h_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/hb-h_2.png b/site/content/entry/yuzu-progress-report-2018-p3/hb-h_2.png new file mode 100644 index 000000000..dee9c9dda Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/hb-h_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/hb-h_3.png b/site/content/entry/yuzu-progress-report-2018-p3/hb-h_3.png new file mode 100644 index 000000000..51c0d42b6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/hb-h_3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/humanff.png b/site/content/entry/yuzu-progress-report-2018-p3/humanff.png new file mode 100644 index 000000000..911f721ae Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/humanff.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/humanff_1.png b/site/content/entry/yuzu-progress-report-2018-p3/humanff_1.png new file mode 100644 index 000000000..4d2299ad8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/humanff_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/humanff_2.png b/site/content/entry/yuzu-progress-report-2018-p3/humanff_2.png new file mode 100644 index 000000000..c8fdcb9d9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/humanff_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/hwknight.png b/site/content/entry/yuzu-progress-report-2018-p3/hwknight.png new file mode 100644 index 000000000..1733e5610 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/hwknight.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/hyrule.png b/site/content/entry/yuzu-progress-report-2018-p3/hyrule.png new file mode 100644 index 000000000..1d9d18a40 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/hyrule.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/hyrule_1.png b/site/content/entry/yuzu-progress-report-2018-p3/hyrule_1.png new file mode 100644 index 000000000..8b73e5d8d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/hyrule_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/index.md b/site/content/entry/yuzu-progress-report-2018-p3/index.md new file mode 100644 index 000000000..cdec0a3b1 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-2018-p3/index.md @@ -0,0 +1,398 @@ ++++ +date = "2018-09-11T22:00:00+05:30" +title = "Progress Report 2018 Part 3" +author = "CaptV0rt3x" +forum = 48393 ++++ + +It's only been over a month since our last report, and we have made so much progress already that we simply can't wait to share it with you guys. +Without further ado, let's dive in. + + +  +{{< imgs + "./smo.png|Super Mario Odyssey (Title screen)" +>}} + +## CPU / Core + +On the CPU emulation front, [MerryMage](https://github.com/MerryMage) and [Lioncash](https://github.com/lioncash) have been absolutely phenomenal. +They have implemented a lot of missing ARMv8 instructions to [Dynarmic](https://github.com/MerryMage/dynarmic), our ARM recompiler, and also fixed many bugs in the existing ones. +Because of this, the number of times yuzu has to fallback to [Unicorn](http://www.unicorn-engine.org/) has been reduced and has improved the overall performance of yuzu. + +{{< single-title-imgs + "ARMS" + "./arms.png|Title screen" + "./arms_1.png|Info" +>}} + +{{< imgs + "./arms_2.png|Menu" + "./arms_3.png|In-game" +>}} + +Thanks to [Hedges](https://github.com/Hedges), the previously Unicorn-only GDBStub now works with Dynarmic as well. +GDBStub is a debugging tool which helps the developers find errors/bugs in the code. +[Subv](https://github.com/Subv) fixed a bug in dynarmic which was causing issues with CPU state management, by preventing writing data to a register. + +## General Improvements + +{{< single-title-imgs + "Octopath Traveller" + "./octo.png" + "./octo_1.png" + "./octo_2.png" +>}} + +As both Citra and yuzu share common code, [FearlessTobi](https://github.com/fearlesstobi) ported over various changes made in Citra to yuzu. +Here are some of the things he ported: + +* Logging the yuzu version - to help us identify yuzu version from log file. +* Added "Continue/Pause" & "Toggle Speed limit" hotkeys. +* Updated Dark theme to latest version. +* Added "Build-date" info to the "About" dialog. +* Fixes for Travis CI environment. +* Added Game Compatibility List to yuzu. +* Many more code optimizations and minor bug fixes. + +[DarkLordZach](https://github.com/DarkLordZach) implemented the display of game-title in the window title bar. +[CaptV0rt3x](https://github.com/CaptV0rt3x) ported over the display of version number in the title bar. + + +{{< single-title-imgs + "Puyo Puyo TETRIS" + "./puyo.png" + "./puyo_1.png" +>}} + +## OS + +Lioncash fixed a potential data race condition in the kernel object, by ensuring that the class handles its reference counts atomically. + +{{< message Info >}} +A race condition, is an undesirable situation that occurs when a device or system attempts to perform two or more operations at the same time, but because of the nature of the device or system, the operations must be done in the proper sequence to be done correctly. +{{< /message >}} + +{{< single-title-imgs + "Bayonetta" + "./bayo.png" + "./bayo_1.png" + "./bayo_2.png" +>}} + +The atomicity ensures that the change to the reference count is visible to all threads between operations and thus ensuring a race never happens. +And since that object class is inherited by all of the kernel objects in yuzu, this pretty much affected every kernel object. +Apart from this, he also optimized the code in the kernel scheduler and thread queue list. + +{{< single-title-imgs + "The Binding of Issac" + "./boi.png" + "./boi_1.png" +>}} + +## GPU + +[degasus](https://github.com/degasus), who was responsible for the stream buffer implementation in Citra, replaced the existing stream buffer in yuzu with Citra's. +For the uninitiated, stream buffers are used for uploading vertex data to the GPU. +He has also been doing quite a lot of GPU code profiling and making optimizations. +Because of this, we are getting to the point where GPU emulation is not much of a bottleneck anymore. + +In addition,he's implemented a buffer cache, to avoid redundant uploads, and a VAO (Vertex Array Object) cache, to cache VAO objects. +Buffer cache works by caching the uploaded buffers within the stream_buffer and just reusing the old pointers. +VAO cache works by caching VAO objects instead of re-emitting all pointers per draw call. + +{{< single-title-imgs + "Disgaea 5" + "./disg.png" + "./disg_1.png" +>}} + +{{< imgs + "./disg_2.png" + "./disg_3.png" +>}} + +[bunnei](https://github.com/bunnei), [Subv](https://github.com/Subv), [ogniK](https://github.com/ogniK), and [greggameplayer](https://github.com/greggameplayer) have implemented many missing texture formats, pixel formats, and render targets. +These implementations allowed us to proceed further in a lot of games like One Piece, Fate Extella, Go Vacation, and Xenoblade. +Subv also implemented a few depth buffer formats and added support for depth buffer testing. +Depth buffers are used for specifying the depth of each pixel, thereby creating various visual effects. + +bunnei implemented a couple of vertex attributes, added more texture wrap modes, implemented shader instructions like `TLDS` & `SEL`, fixed `TEXS` shader instruction, implemented `TEXS` masks, and fixed texture unswizzle. +He also made various improvements to the rasterizer cache and improved its performance by avoiding superfluous copies. +This fixed rendering issues in Cave Story+, Disgaea 5, and Binding of Issac. +ogniK fixed `glVertexAttribFormat` for integers - which fixed exploding vertices in One Piece Unlimited World. +Lioncash refactored, cleaned and made improvements / optimizations to the GPU code. + +{{< single-title-imgs + "DOOM" + "./doom.png" + "./doom_1.png" +>}} + +{{< single-title-imgs + "Fire Emblem - Warriors" + "./fe-w.png" + "./fe-w_1.png" +>}} + +## Service HLE + +With the latest documentation available on [Switchbrew](https://switchbrew.org/index.php/Main_Page), we have made various bug fixes to our service implementations and also added new services as well. +Lioncash, [mailwl](https://github.com/mailwl), and Hexagon12 worked on stubbing the `HID` (Human Interface Devices) service and also made a few improvements there as well. + +The `HID` service basically manages the controllers. +It stores all sorts of information related to controllers in a shared memory region, which we read from. +ogniK and bunnei fixed the `Friend` service, which fixed a crash in Splatoon 2 and also got Retro City Rampage booting. + +{{< single-title-imgs + "Has-Been Heroes" + "./hb-h.png" + "./hb-h_1.png" +>}} + +{{< imgs + "./hb-h_2.png" + "./hb-h_3.png" +>}} + +The `Friend` service is mainly for your Nintendo Online friends, your friend list etc. +In this current implementation, we are always offline and we send the same response (offline) to the system and games as well. +The crash in Splatoon 2 was fixed because it was requesting the friend list and we returned a response of `Zero (0) Friends` to it. +It is not exactly an accurate replication of Switch's behavior, but games seem to accept that response. + +Similarly, we got Retro City Rampage booting because it was trying to get the User's Presence and we added a stub in place of it. +mailwl added more stubs for the `Account` service. +Lastly, the `Account` service is mainly for management of your local account or registered users on the system. + +{{< single-title-imgs + "Fantasy Hero" + "./fh.png" + "./fh_1.png" +>}} + +Each user has an unique UUID (Universally Unique Identifier), which is generated when an account is made, and they each have some information about their profile. +This info is typically referenced when saving games. +ogniK worked on the necessary foundation to support multiple user accounts and their management, in the future. +He also implemented functions to allow setting the username and locale of the Switch. + +{{< single-title-imgs + "Hyrule Warriors" + "./hyrule.png" + "./hyrule_1.png" +>}} + +ogniK also implemented support for loading shared fonts in the `pl:u` service. +As we now support loading system `bfttf` fonts, users who have installed their system nand dumps to yuzu will automatically get shared fonts. +For other users, you can now load shared fonts from `ttf` files as well. + +Fearlesstobi, by taking inspiration from Citra's implementation, integrated open-source shared fonts into yuzu. +This can clearly be observed in above screenshots from the game - Hyrule Warriors. + +{{< message Info >}} +The fonts need to be named as follows: + +* FontStandard.ttf +* FontChineseSimplified.ttf +* FontExtendedChineseSimplified.ttf +* FontChineseTraditional.ttf +* FontKorean.ttf +* FontNintendoExtended.ttf +* FontNintendoExtended2.ttf +{{< /message >}} + +Lioncash implemented the skeletons for various new services like `time:a`, `es`, `pm`, `erpt`, `eupld`, `ldr`, and many more. + +## File System + +[DarkLordZach](https://github.com/DarkLordZach) added support for various features like loading encrypted NCA files and XCI files, displaying game icons, parsing metadata, and made error handling more descriptive. + +Encrypted `NCA` files are just game files in a container. +`XCI` files are basically raw gamecard dumps. Gamecards have 3 major partitions. +An `Update` Partition - which stores system updates, a `Secure` Partition - which has the game `NCAs`, and a `Normal` Partition - which just stores miscellaneous files. +What we want is the `Secure` Partition. It contains the game `NCAs` and other metadata as well, which is very useful. +`XCI` files are relatively easy to dump compared to other methods and are very useful. + +{{< imgs + "./game_list.png|Gamelist showing games and updates" +>}} + +By adding support for loading `NCAs` and `XCIs`, it removes a lot of unnecessary steps when you dump your games. +Before, you had to dump your `XCI`, then extract the `Secure` partition, and then extract the `NCA` into the format for yuzu. +This left you with nearly 8 different files, which are binaries and a romfs file. +Now with this feature, you can directly open your `NCA` files or, better yet, your `XCI` files. +And because `XCI` files come with additional metadata, you can also get game icons from them. +The icons can be configured to display at various sizes within yuzu. + +DarkLordZach went a step ahead and implemented support for `NAX` (Nintendo AesXts) archives. +With this, you can load your games from your Switch's SD card ***directly*** by connecting it to your PC. +He also fixed a few issues with our earlier VFS implementation and made further improvements to it as well. + +{{< single-title-imgs + "Runner 3" + "./runner3.png" + "./runner3_1.png" +>}} + +He also added support for the `NSP` (Nintendo Submissions Package) file format, `BKTR` format, and added an option to set custom NAND/SD directories. +As `NSP` support will likely become the new format of choice for advanced dumper homebrew and other tools, adding support means less steps while dumping. +`NSPs` contain all the metadata and can contain game updates / DLCs as well. +With added support for `BKTR` format, you can now install game updates from yuzu NAND or SD directly via the UI. +He and Lioncash also worked on refactoring the File System code and made optimizations wherever possible. + +{{< message Warning >}} +

Keep in mind that, all types of files will still need their decryption keys.

+{{< /message >}} + +## Audio + +As yuzu was progressing at an incredibly fast pace, one of the most sought out features was audio output. +We discussed this in our earlier report that the Switch has 2 methods of audio output `AudRen` and `AudOut`. +First, bunnei emulated `AudOut` without actually producing audio output. +This was used for only a handful of games like One Piece, Snipperclips, Minecraft etc. + +Emulating `AudOut` state without actually outputting audio was sufficient to get these games to go into actual game play. +This was because games often wait for signaling to indicate that an audio clip has finished playing. +We can properly signal this state without actually playing the sound, allowing these games to continue running. +Later he added audio output, based on [cubeb](https://github.com/kinetiknz/cubeb), for games that used the `AudOut` service. + +{{< single-title-imgs + "Human Fall Flat" + "./humanff.png" + "./humanff_1.png" + "./humanff_2.png" +>}} + +ogniK did the reverse engineering and helped with the HLE (High Level Emulation) implementations of `Audout` and `AudRen` services. +He also added opus library and implemented `hwopus` service functions, which uses `AudOut` and `AudRen`, which fixed Pokemon Quest and Touhou. +Since we didn't have `AudRen` yet, it only worked with games using `AudOut`. + +It took a while but bunnei finally implemented the `Audren` method, which got audio output for most games like Cave Story+, Binding of Issac, Super Mario Odyssey, Puyo Puyo Tetris and many more. +bunnei's original implementation of audio output, with cubeb backend, only supported two-channel 48000Hz - which is the most common audio output format. +This works well for `AudOut` games, but games that use `AudRen` could use variable sample rates. +Because we were always playing all sounds at 48000Hz, even though it was working properly, the sounds would be audible but would often sound sped-up or with incorrect pitch. + +{{< single-title-imgs + "One Piece Unlimited World" + "./opuw.png" + "./opuw_1.png" +>}} + +{{< imgs + "./opuw_2.png" + "./opuw_3.png" +>}} + +MerryMage fixed this problem by implementing audio interpolation and filtering, which allowed us to resample these sounds from their original sample rate to 48000Hz. +Audio Interpolation is a method of making digital audio sound better than it actually is and filtering helps reduce artifacts that arise when resampling the audio. +She also found and fixed threading issues with the cubeb backend. +Lioncash did lots of refactoring and made multiple improvements / optimizations to Audio code. + +## Super Mario Odyssey + +As it turns out, Super Mario Odyssey (SMO) has actually been capable of going in-game for quite a while. +However, due to really bad performance and some occasional emulator crashes, no one was really testing it. + +{{< imgs + "./smo_3.png|Super Mario Odyssey" +>}} + +bunnei made a major breakthrough by using save games (dumped from a Switch Console) which enabled him to get in game much quicker, fix crashes, and improve rendering. +By being able to expedite this process, the team was quickly able to get the first 3D rendering working in SMO - Mario's head in the title screen. +From there, we were able to get in-game rendering working, although with very glitchy graphics and lots of variation depending on the kingdom. + +{{< single-title-imgs + "Super Mario Odyssey (In-game)" + "./smo_1.png" + "./smo_2.png" +>}} + +bunnei and [khang06](https://github.com/khang06) implemented various render targets and texture formats necessary to get it booting. +bunnei implemented the `XMAD` shader instruction, improved handling of the `KIL` shader instruction, improved handling of unknown vertex attributes in shaders, added more accurate floats for shaders, fixed the constbuffer size, added a few vertex attribute types, and stubbed the `AM` HLE service functions. + +Subv implemented the `SSY` and `SYNC` shader instructions, implemented alternative blending factors, and improved handling of invalid or unset vertex attributes. +`SSY` and `SYNC` are instructions for control flow in the shaders. +`SSY` tells the shader execution unit where to jump when a `SYNC` is executed. + +{{< single-title-imgs + "Super Mario Odyssey (In-game)" + "./smo_4.png" + "./smo_5.png" + "./smo_6.png" +>}} + +Currently SMO goes in game and the menus are running at full speed. +However, in-game speeds can vary based on what's in view and your PC's hardware specifications. +It is very glitchy, but you ***can*** play it. +Audio output works well when at full speed. Using a save game helps a lot. +There are random softlocks when transitioning to new areas; therefore, a play-through is not possible. + +## Breath of the Wild + +The Legend of Zelda: Breath of the Wild, is a particularly interesting and exciting game to emulate in yuzu. +While you can already play this game on cemu using Wii U emulation, we think its important to also have an open source alternative. +Furthermore, BotW is a very graphically complicated game to emulate, so it's exciting to use it as an opportunity to improve our rendering. + +{{< single-title-imgs + "The Legend of Zelda: Breath of the Wild" + "./botw.png" + "./botw_1.png" +>}} + +Random crashing was one of the main issues we faced while trying to get this game working. +Upon debugging, we found out that there were a few issues with threading in the kernel. +For example, there were a bunch of race conditions when running in multi-core mode, our core timing was inaccurate for multiple cores, and there was a chance of threads being duplicated. + +Subv fixed these issues by removing most of the race conditions, using approximated amount of ticks when advancing core timing, and added more validation asserts to make sure the threads weren't being duplicated. +Before the changes, the four cores incremented the global `ticks` counter independently, which caused it to be approximately 4 times more than what it should have been. + +{{< single-title-imgs + "The Legend of Zelda: Breath of the Wild" + "./botw_2.png" + "./botw_3.png" +>}} + +This made games think that the timing was malfunctioning. +The reason for this was that the ticks counter was not thread-safe and we were incrementing it more than we should have. +This was fixed by amortizing the tick increases by dividing each increment by the number of cores (4). +This is not entirely accurate, as not all cores are active all the time, but it should be better than before. + +bunnei implemented a few necessary render targets, texture formats, vertex attribute types, and some primitive topologies. +Currently, BotW goes in-game but has massively broken graphics. +The map, items, 3D models of Divine Beasts, and Hyrule Castle are properly displayed though. + +# Conclusion + +Finally, we would like to thank all of our valuable [contributors](https://github.com/yuzu-emu/yuzu/graphs/contributors?from=2018-07-20&to=2018-08-31&type=c) who have worked hard to improve yuzu. +yuzu needs contributors like them to become the best it can be. +We would also love to thank our generous [patrons](https://www.patreon.com/yuzuteam) for supporting our efforts in this project. + +{{< single-title-imgs + "Kamiko" + "./kamiko.png" + "./kamiko_1.png" +>}} + + +{{< single-title-imgs + "Soldam" + "./soldam.png" + "./soldam_1.png" +>}} + +{{< imgs + "./mta.png|Mario Tennis Aces" + "./kirby.png|Kirby Star Allies" + "./splatoon2.png|Splatoon 2" + "./hwknight.png|Hollow Knight" +>}} + +{{< message Note >}} +All these screenshots have been taken in handheld mode of yuzu, using a PC with the following specs: + +* CPU - Intel i3 6100 +* GPU - Nvidia GTX 750ti +* RAM - 12 GB DDR3 +{{< /message >}} + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-2018-p3/kamiko.png b/site/content/entry/yuzu-progress-report-2018-p3/kamiko.png new file mode 100644 index 000000000..361f8c31e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/kamiko.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/kamiko_1.png b/site/content/entry/yuzu-progress-report-2018-p3/kamiko_1.png new file mode 100644 index 000000000..85199652f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/kamiko_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/kirby.png b/site/content/entry/yuzu-progress-report-2018-p3/kirby.png new file mode 100644 index 000000000..ed6d88f31 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/kirby.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/mta.png b/site/content/entry/yuzu-progress-report-2018-p3/mta.png new file mode 100644 index 000000000..fb4d83502 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/mta.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/octo.png b/site/content/entry/yuzu-progress-report-2018-p3/octo.png new file mode 100644 index 000000000..2274d399f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/octo.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/octo_1.png b/site/content/entry/yuzu-progress-report-2018-p3/octo_1.png new file mode 100644 index 000000000..30c724540 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/octo_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/octo_2.png b/site/content/entry/yuzu-progress-report-2018-p3/octo_2.png new file mode 100644 index 000000000..7400ae05e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/octo_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/opuw.png b/site/content/entry/yuzu-progress-report-2018-p3/opuw.png new file mode 100644 index 000000000..a1597ff8c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/opuw.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/opuw_1.png b/site/content/entry/yuzu-progress-report-2018-p3/opuw_1.png new file mode 100644 index 000000000..9d6c0eaaa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/opuw_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/opuw_2.png b/site/content/entry/yuzu-progress-report-2018-p3/opuw_2.png new file mode 100644 index 000000000..7b179c180 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/opuw_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/opuw_3.png b/site/content/entry/yuzu-progress-report-2018-p3/opuw_3.png new file mode 100644 index 000000000..f79332bcc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/opuw_3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/puyo.png b/site/content/entry/yuzu-progress-report-2018-p3/puyo.png new file mode 100644 index 000000000..1640c42fe Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/puyo.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/puyo_1.png b/site/content/entry/yuzu-progress-report-2018-p3/puyo_1.png new file mode 100644 index 000000000..859ff6062 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/puyo_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/runner3.png b/site/content/entry/yuzu-progress-report-2018-p3/runner3.png new file mode 100644 index 000000000..8f79e1617 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/runner3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/runner3_1.png b/site/content/entry/yuzu-progress-report-2018-p3/runner3_1.png new file mode 100644 index 000000000..52a4f5db7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/runner3_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/smo.png b/site/content/entry/yuzu-progress-report-2018-p3/smo.png new file mode 100644 index 000000000..0fe3ac573 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/smo.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/smo_1.png b/site/content/entry/yuzu-progress-report-2018-p3/smo_1.png new file mode 100644 index 000000000..090f28881 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/smo_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/smo_2.png b/site/content/entry/yuzu-progress-report-2018-p3/smo_2.png new file mode 100644 index 000000000..3aa8c41cd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/smo_2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/smo_3.png b/site/content/entry/yuzu-progress-report-2018-p3/smo_3.png new file mode 100644 index 000000000..fa9582666 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/smo_3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/smo_4.png b/site/content/entry/yuzu-progress-report-2018-p3/smo_4.png new file mode 100644 index 000000000..299159050 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/smo_4.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/smo_5.png b/site/content/entry/yuzu-progress-report-2018-p3/smo_5.png new file mode 100644 index 000000000..24d533d4a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/smo_5.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/smo_6.png b/site/content/entry/yuzu-progress-report-2018-p3/smo_6.png new file mode 100644 index 000000000..ee1af2f2b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/smo_6.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/soldam.png b/site/content/entry/yuzu-progress-report-2018-p3/soldam.png new file mode 100644 index 000000000..cf273d020 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/soldam.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/soldam_1.png b/site/content/entry/yuzu-progress-report-2018-p3/soldam_1.png new file mode 100644 index 000000000..80996788c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/soldam_1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/splatoon2.png b/site/content/entry/yuzu-progress-report-2018-p3/splatoon2.png new file mode 100644 index 000000000..cd5d15721 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/splatoon2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p3/summary.png b/site/content/entry/yuzu-progress-report-2018-p3/summary.png new file mode 100644 index 000000000..a2ad1b029 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p3/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/SMO-1.png b/site/content/entry/yuzu-progress-report-2018-p4/SMO-1.png new file mode 100644 index 000000000..e34ae137e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/SMO-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/SMO-2.png b/site/content/entry/yuzu-progress-report-2018-p4/SMO-2.png new file mode 100644 index 000000000..22bd81629 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/SMO-2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/SMO.png b/site/content/entry/yuzu-progress-report-2018-p4/SMO.png new file mode 100644 index 000000000..69370a608 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/SMO.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/arms-1.png b/site/content/entry/yuzu-progress-report-2018-p4/arms-1.png new file mode 100644 index 000000000..b49f1b83f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/arms-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/arms-2.png b/site/content/entry/yuzu-progress-report-2018-p4/arms-2.png new file mode 100644 index 000000000..b680f1f62 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/arms-2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/arms.png b/site/content/entry/yuzu-progress-report-2018-p4/arms.png new file mode 100644 index 000000000..e745c735b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/arms.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/bandicoot-1.png b/site/content/entry/yuzu-progress-report-2018-p4/bandicoot-1.png new file mode 100644 index 000000000..6920cc368 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/bandicoot-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/bandicoot.png b/site/content/entry/yuzu-progress-report-2018-p4/bandicoot.png new file mode 100644 index 000000000..61959adf2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/bandicoot.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/banner.png b/site/content/entry/yuzu-progress-report-2018-p4/banner.png new file mode 100644 index 000000000..2cd9ca1af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/botw-1.png b/site/content/entry/yuzu-progress-report-2018-p4/botw-1.png new file mode 100644 index 000000000..a16fbbcb9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/botw-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/botw-2.png b/site/content/entry/yuzu-progress-report-2018-p4/botw-2.png new file mode 100644 index 000000000..b738b16ea Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/botw-2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/botw.png b/site/content/entry/yuzu-progress-report-2018-p4/botw.png new file mode 100644 index 000000000..543e178f8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/botw.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/donkey-kong.png b/site/content/entry/yuzu-progress-report-2018-p4/donkey-kong.png new file mode 100644 index 000000000..367f171c9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/donkey-kong.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/index.md b/site/content/entry/yuzu-progress-report-2018-p4/index.md new file mode 100644 index 000000000..137e904ef --- /dev/null +++ b/site/content/entry/yuzu-progress-report-2018-p4/index.md @@ -0,0 +1,498 @@ ++++ +date = "2018-12-03T4:00:00+05:30" +title = "Progress Report 2018 Part 4" +author = "CaptV0rt3x" +forum = 66507 ++++ + +Sorry for keeping you guys waiting! +A whole slew of new updates and a ton of progress await you. +Let's not waste anymore time and get the party started. + + +These past couple of months have been absolutely fantabulous. +If you were following us closely on [twitter](https://twitter.com/yuzuemu), you might have seen a few tweets but, strictly speaking, they don't even come close to describing the amount of work that has been accomplished. + +Also, a new remake was released on the Switch a few days back and with it a bunch of contributors raced to fix some of the new issues it uncovered. +We will be covering that in a separate section, so hold on to your seats and enjoy the ride. + +{{< imgs + "./lgpe.png|Pokémon: Let's Go, Eevee!" +>}} + +## CPU / Core + +[MerryMage](https://github.com/MerryMage) has added a lot of new ARMv8 instructions to [dynarmic](https://github.com/MerryMage/dynarmic), our ARM dynamic recompiler, which further reduce our fallbacks to [unicorn](https://www.unicorn-engine.org/). +Code generation has also been improved by making use of more recent CPU instructions (e.g. SSE4.1, AVX, AVX512, etc). +We are slowly moving towards completely phasing out unicorn in favor of dynarmic, with nearly 85% of the work done. +While there are still a few missing instructions in dynarmic, we didn't observe any games hitting them. + +Support for Linux `perf` command has been added, which allows us to profile the time we spend in recompiled game code. +In simple terms, it helps us identify areas of code which are being used by games frequently, so that we can optimize those areas. +For more info on `perf`, visit [here](https://perf.wiki.kernel.org/index.php/Main_Page). + +[Lioncash](https://github.com/lioncash) found and fixed a bug in dynarmic's `ExclusiveWrite128()` function. +Due to this bug, when the second half of the value was being written, it would overwrite the first half. +Thankfully this wasn't a bug that was being encountered, as the function is currently unused. + +{{< single-title-imgs + "The Legend of Zelda - Breath of the Wild" + "./botw.png" + "./botw-1.png" + "./botw-2.png" +>}} + +## General Improvements + +To ensure general feature parity between the sister projects, whenever we have new features implemented in [Citra](https://citra-emu.org/), we port them to yuzu and vice versa. +Recently we have had new features like Joystick Hot-plugging support and Touch Input handling implemented in Citra. +While Joystick hot-plugging allows us to connect/disconnect controllers on-the-go, without crashing the emulator, Touch Input handling allows us to use a physical touch screen for input, in the place of a mouse. + +Web Services & Telemetry features are used to gather anonymous user statistics and for other backend stuff like user authentication. +We now have a [Compatibility Database](https://yuzu-emu.org/game/) which lists the playability information for various games. +Mind you that this list is a work-in-progress and is community driven. +Play games on yuzu and while playing, go to `Help -> Report Compatibility` and submit info to help improve the database. +`Discord Rich Presence`, a novelty feature, was also added so that yuzu fans could show off in their discord statuses. + +Apart from these, we've also had a few minor improvements like: + +* Unsupported OpenGL extensions pop-up - which tells you if your GPU isn't suitable for yuzu. +* Background color changer - to change background color. +* Fixed logging initialization, default `username`, and default language in our SDL frontend. + +**Note**: The Multi-core option has been temporarily removed, due to inaccuracies in our kernel and scheduler. +We will likely support multi-core at some point in the future. + +## Audio + +[FearlessTobi](https://github.com/fearlesstobi) and MerryMage teamed up to bring audio-stretching to yuzu! +While the implementation shares a lot in common with audio-stretching in Citra, it's been tuned and optimized for yuzu to decrease the performance impact on emulation and reduce delay and crackling as much as possible. + +If fixes are more your thing, [ogniK](https://github.com/ogniK5377) fixed an annoying softlock in Super Mario Odyssey (SMO). +This game expects various Effect States (for sound effects) to be initialized, even if they aren't updated. +Because SMO hasn't been observed to actually update these states, assertions have been placed to see if they are ever updated. +For now though, his changes mean that various hangs in SMO are fixed, making the game much easier to play. + +## GPU + +Thanks to tons of contributions the past few months, yuzu's GPU core has seen a lot of fixes, optimizations and new features making emulated games look a lot more like their console experience. +At the forefront of these efforts is getting the sublime 3D platformer, Super Mario Odyssey, to playable status. + +#### Super Mario Odyssey (SMO) + +As you probably know, while yuzu technically could boot Super Mario Odyssey, it was neither able to properly render graphics nor run the game at decent speeds. +To get the game working, was like an exciting challenge to the developers which, at the end, held a hidden treasure. +So, they set out on a journey - to dig deeper into the internal workings of the game, as well as the console. + +But, as with any treasure hunt, you need clues to start somewhere. +The only way to move forward was to try fixing the existing bugs and graphical issues, which could give more insight into what else might be broken. +And thus started the journey, with 2 goals in mind - to fix issues in SMO and to make it run at playable speeds in yuzu. + +{{< single-title-imgs + "Super Mario Odyssey" + "./SMO-2.png" + "./SMO.png" + "./SMO-1.png" +>}} + +[bunnei](https://github.com/bunnei) and [Subv](https://github.com/Subv) together implemented `multiple color attachments` for the framebuffers. +A color attachment is a texture, which attaches to a framebuffer as a render target and is used for off-screen rendering. +These are used in several techniques including reflection, refraction, and deferred shading. + +A render buffer, or render target, is any specially created single buffer to which part of rendering may be directed. +Some examples would be color buffers and depth buffers. +A framebuffer is a bound collection of several such render buffers. +While all of these changes fixed many graphical issues in SMO and other games, performance still left a lot to be desired. + +**What if, for a change, instead of fixing bugs, we try to improve rendering in the game?** +bunnei independently set out to scrutinize the way we were rendering graphics and found out that we could improve the accuracy of how we cached and copied our framebuffers. +And the result was improved rendering in SMO's Ruined Kingdom, without even having to use the `Accurate Framebuffers` setting in yuzu. + +{{< imgs + "./smo-1295-b.png|Before" + "./smo-1295-a.png|After" +>}} + +Our further efforts to improve rendering led to the fact that we needed to properly provide textures to shaders. + +> A texture is an OpenGL Object that contains one or more images that all have the same image format. +A texture can be used in two ways - it can either be the source of a texture access from a Shader, or it can be used as a render target. + +There are a number of different types of textures in OpenGL and not all of them are 2D - some are arrays and some are cubemaps. +These are special kinds of textures generally called Layered Textures. +[Blinkhawk](https://github.com/FernandoS27) found that we were incorrectly reading these special textures, which was causing various graphical glitches in games. +He then reworked the code to account for size of mipmaps and made sure that we read these textures properly. + +[Mipmaps](https://en.wikipedia.org/wiki/Mipmap) are generally pre-calculated, optimized sequences of images, each of which is a progressively lower resolution representation of the same image. +If the image to be rendered is big or close to the camera, the renderer uses a bigger texture map, while if it is smaller or farther away, then smaller textures are used. + +The absence of these mipmaps was yet another reason for glitchy rendering in several games. +Blinkhawk identified this, and implemented mipmaps and texture processing modes - which are needed to access said mipmaps. +Mipmaps are intended to increase rendering speed and reduce aliasing artifacts, while texture processing modes change the way games access a texture's mipmaps. + +{{< imgs + "./smo-mip.png|Before" + "./smo-map.png|After" +>}} + +Another missing texture type was Cubemaps. +Cubemaps aren't unique to Super Mario Odyssey - in fact most games use cubemaps. +Essentially, a cubemap is a texture that contains six individual 2D textures that form each side of a textured cube. +The thing that sets SMO apart in this case is *how* it uses cubemaps in an unusual way. +As with emulation, it's easy to emulate *expected* behaviors, but when a game uses a feature for something unanticipated, it can trip up an incomplete implementation. +SMO tends to use a single render target for all six sides of the cubemap surface, necessitating yuzu to allow copying between render targets and cubemaps for correct emulation. + +{{< single-title-imgs + "Before" + "./metro1-b.png" + "./sand1-b.png" +>}} + +{{< single-title-imgs + "After" + "./metro1-a.png" + "./sand1-a.png" +>}} + +Blinkhawk also implemented 3D textures, which are used for global illumination caching and to enable correct coloring. +3D textures work like regular textures, but they are truly 3D and are usually used for volumetric effects like smoke, fire, light rays, realistic fog, etc. +The way in which Switch games create these is very interesting from an emulation perspective. +It turns out that most games compute them on loading, instead of having them pre-computed and they are generated through some sort of hack over Nvidia's memory layout. + +{{< single-title-imgs + "After 3D textures" + "./smo-1505-1.png" + "./smo-1505-2.png" +>}} + +{{< message XtraByte >}} +The game tries to render 2d textures with a block depth of 16, (block depth should only be used on 3d textures), then overlaps them in a specific order of rendering and reinterprets that as a 3d texture. +The solution we came up with was, to flush all textures in that memory area in the order of modification from last modified to newest and then read that memory as a 3D Texture. +{{< /message >}} + +While all the others were trying to fix graphical bugs, bunnei was still searching for ways to optimize performance of the game. +He and Subv identfied a major issue - that we weren't flushing data properly. + +> Flushing is the process of taking render buffers that were modified in the host-GPU and write them back to the guest RAM (Host - hardware, Guest - Switch). +If you modify render buffers that were cached on the host-GPU but never flush them, then the games won't see the latest version of those render buffers when they try to access them. + +bunnei, over a couple of weeks, implemented flushing in the rasterizer cache and also for DMA transfers. +Along with these, he also implemented accelerated Fermi2D copies. +Fermi2D is one of the engines inside the GPU. +It is like a 2D transformation engine, where you feed it 2D images and you can do a bunch of transformations on it in the GPU. +With accelerated copies, the surface copying was now simpler and faster and as an additional bonus, it fixed several things like the ice effect in SMO and the blur effect in One Piece. + +{{< imgs + "./smo-ice.png|Super Mario Odyssey" + "./op-blur.png|One Piece" +>}} + +Days went by without any new findings but then we finally hit a jackpot. +Code investigation and reverse engineering led us to an issue where `macros` could be skipped. +`macros` are command sequences sent to the guest GPU and since they were being skipped, it led to distant objects not being rendered in SMO. + +{{< imgs + "./smo-1622-b.png|Before" + "./smo-1622-a.png|After" +>}} + +bunnei fixed this by restructuring the way we uploaded these macros to the guest GPU. +Instead of piping macro code into separate memory for each program, we now write it to a single macro memory region and then execute macros via the specified offset into this region. +He also found a bug in our memory manager, where buffers were being mapped over memory which was already in use. +By fixing that, we fixed the rendering when changing areas in SMO. + +{{< single-title-imgs + "Before" + "./smo-1630-1b.png" + "./smo-1630-2b.png" +>}} + +{{< single-title-imgs + "After" + "./smo-1630-1a.png" + "./smo-1630-2a.png" +>}} + +#### New Features, Optimizations, and Fixes + +But ~~SMOzu~~ yuzu isn't a Super Mario Odyssey emulator, it's a Nintendo Switch emulator. +And as such, any efforts to fix or improve a single game will definitely impact other games too and thus many other games are reaping the benefits of sustained work. + +{{< message Back-to-School >}} +Let's go back to school for a bit. +**What is rendering and how does it work on modern GPUs?** +Rendering is a very generic term which is basically can be defined as "creating an image", which can be, obviously, created in many ways. + +In modern GPUs, say if you want to render a triangle, you supply triangle coordinates to GPU and also load a shader to GPU. +Then the GPU starts rendering the data you supplied, it is executing your shader on every triangle vertex (vertex shader) and every triangle pixel (pixel shader). +Shaders are simple programs that describe the traits of either a vertex or a pixel. +In the shader, you basically transform coordinates (vertex) and change color (pixel) of your final image. +Shaders are very powerful and very fast, most effects in modern games are possible because of shaders. + +But, how does the shader know to transform given data to our exact requirements? +That's because the shaders are programs that can be written using shader languages. +There are a number of such shader languages, but we use a C-like language GLSL (OpenGL Shader Language). +Modern GPUs make use of shader instruction sets, to pass commands to the individual programmable shader units and make them do the work. + +{{< /message >}} + +{{< single-title-imgs + "Kirby Star Allies" + "./kirby.png" + "./kirby-1.png" +>}} + +{{< single-title-imgs + "In Game" + "./kirby-2.png" + "./kirby-3.png" +>}} + +The Nvidia Tegra X1 - which is the brain of the Switch, houses a Maxwell architecture based GPU. +Like all other Nvidia GPUs, this too utilizes Nvidia's shader instruction sets to make the shaders render graphics. +Unlike most other parts of our code base, which is HLE (High Level Emulation), our GPU emulation is LLE (Low Level Emulation). + +> LLE just translates the native code and is the traditional way of emulating. +Simply put, in LLE we interpret the `macros` sent to the GPU and then read the registers to render stuff. +And to do that, we need to emulate the shader instructions that the GPU uses. + +Our developer Blinkhawk took it upon himself to try and implement the shader instructions in our GPU emulation. +He refactored the existing `IPA` shader instruction, implemented the shader instructions `TMML`, `LEA`, `PSET`, properly implemented `TXQ` and fixed `TLDS`, `FSETP`, `FSET`. + +He implemented Cube Arrays, implemented `3 coordinate array` in `TEXS` instruction - which is used by Breath of the Wild, improved shader accuracy on Vertex and Geometry shaders, and improved GPU Cache's lookup Speed - which resulted in better overall performance. + +Another developer [Rodrigo](https://github.com/ReinUsesLisp), also lent a hand by independently researching the shader instructions we were missing and implementing them. +He implemented a few instructions like `VMAD` & `VSETP`- which are complex instructions used in Geometry Shaders, `PBK` & `BRK` - which are flow instructions used by some games, and also implemented the whole set of "Half-Float" instructions - `HADD2`, `HMUL2`, `HFMA2`, `HSET2`, and `HSETP2`. + +Most games use 32-bit floats, but some use half floats (16-bit floats). +These instructions can execute two operations at once and it's easier for the game to send half the data. +Games like Xenoblade, Hyrule Warriors and L.A. Noire were found to be using these. +As these are not used by [nouveau](https://nouveau.freedesktop.org/wiki/), it required a bit of hardware testing and help from the nouveau team to implement these. +For those of you who don't know, the nouveau project develops and builds open source drivers for Nvidia GPUs on Linux. + +In the meantime, Blinkhawk, in his research efforts, found out that some shader information was going missing. +This was because, not all the info of an Nvidia shader is saved in the registers and some can be sent to a temporary shader memory too. +By implementing a shader local memory, we now began emulating such memory and thus fixed many graphical issues in games like ARMS and Splatoon 2, among others. +He also implemented fast layered copy - which fixed performance regressions in ARMS and Splatoon 2, while improving loading performance in many other games. + +{{< single-title-imgs + "ARMS" + "./arms.png" + "./arms-1.png" + "./arms-2.png" +>}} + +Generally in OpenGL, rendering is done sequentially in multiple steps. +It is called the [Rendering Pipeline](https://www.khronos.org/opengl/wiki/Rendering_Pipeline_Overview). +While we had a working implementation of vertex shaders, we were still missing the geometry shaders. +The geometry shader is an optional shader stage, that sits between the vertex and fragment shaders. + +Rodrigo did lots of research and finally did a basic implementation of geometry shaders. +This shader has the unique ability to create new geometry on-the-fly, using the output of the vertex shader as input. +Geometry shaders in Maxwell architecture do not specify input topology anywhere, they just receive the data as is. +It doesn't care if it's a point or a triangle list. +But in OpenGL, GS requires that input topology is in their source. + +The implementation isn't complete yet, but gets the job done. +Most games that use GS will find correct behavior depending to what extent the games use GS. +It still has scope for improvements and is also missing a few features like: + +* built-in types of output. +* buffer streams. + +Rodrigo found the cause and fixed the infamous "half-screen rendering" bug on Intel GPUs (Windows). +The cause of the bug was an expression, carried from Citra's GPU emulation code. +Because of setting a default clip distance, the render was being cut to half. +Removing that expression, fixed rendering on Intel GPUs. + +Also, he optimized our GPU emulation by using `ARB_multi_bind` for uniform buffers and sampler bindings, and implemented `quads` topology. +The `ARB_multi_bind` is an OpenGL extension, which reduces OpenGL invokes by binding multiple objects to a single call. +`quads` are rendered using OpenGL core and are used by some indie games and Xenoblade. +A `quad` is a 4 vertex quadrilateral primitive and is not exposed in the modern OpenGL API. +So as a workaround, we render `quads` with a pair of triangles. + +On a hunch that he could improve performance, Blinkhawk researched swizzling techniques and algorithms. +Unsurprisingly, he found out that yuzu's initial implementations were grossly inefficient and took up the task of optimizing the various swizzling techniques. +He implemented 3D swizzling and also optimized texture swizzling, fast swizzle, and legacy swizzle. +The new Swizzling algorithm is about 6~12 times faster than the old one and adds functionality to read and interpret 3D Textures. +For the users, this meant improved performance and FPS boosts. + +>In order to load textures, we must convert them from a guest optimized format to linear format i.e., an Nvidia internal format into a linear format for OpenGL to read them. This process is called Swizzling. +The opposite to this i.e., converting the linear format textures to guest optimized format, is called UnSwizzling. + +{{< single-title-imgs + "Crash Bandicoot" + "./bandicoot.png" + "./bandicoot-1.png" +>}} + +Furthermore, he implemented the Scissor test, Alpha test - using shader emulation, depth compare, and shadow samplers. +The Scissor test is a per-sample processing operation that discards fragments that fall outside of a certain rectangular portion of the screen. +Alpha test is a hardware feature to skip certain pixels. +The Alpha channel tells OpenGL which parts of image are transparent and which parts are opaque. +Alpha test is used to discard pixels which fall outside of a certain range of alpha values. +Depth Compare & Shadow Samplers are used to implement occlusion in games. +By adding support for them, games will be able to detect where shadows go by checking a depth texture through a shadow sampler. + +[Tinob](https://github.com/Tinob), well known for Ishiiruka Dolphin, also contributed to the GPU emulation. +He implemented `sRGB` framebuffers and improved OpenGL state handling to reduce redundant state changes and ensure default state to avoid driver implementation issues. +Also, he researched and implemented various missing OpenGL states, added tweaks to reduce state handling redundancy, and added support for various registers. +These fixed many small graphical bugs in SMO and other games. + +[degasus](https://github.com/degasus) fixed few bugs and optimized GPU emulation wherever possible by reducing the overhead per draw call. +His optimization of the shader cache resulted in a significant performance boost across all games. +[FreddyFunk](https://github.com/FreddyFunk), while profiling yuzu, recognized that in some scenarios a lot of time is taken by allocating memory in calls of `CopySurface` and optimized it for better performance. + +#### Pokémon: Let's Go, Pikachu! / Eevee! + +The Pokémon franchise has been and always will be one of Nintendo's most successful and profitable franchises. +And their newest iteration of games for the Nintendo Switch are Pokémon: Let's Go, Pikachu! & Let's Go, Eevee! - remakes of good old Pokémon Yellow from the GameBoy days. +For the developers, the thought of booting and emulating a hot new game on release day was very exciting. +And thus began the rush - to test the games, fix issues, and essentially make it playable on day one. + +{{< single-title-imgs + "Pokémon: Let's Go, Pikachu!" + "./lgpe-1.png" + "./lgpe-2.png" + "./lgpe-3.png" +>}} + +ogniK was the first to get the game, thanks to time zones, and he immediately began his RE (reverse engineering) work. +He found out that the games checked for the `Poké Ball Plus` controller on boot and since we didn't support it, the game wasn't booting in yuzu. +After further research, he implemented a small set of commands and functions used by the bluetooth driver, which got us to the title screen. + +And just when we thought that was it, ***a wild softlock appeared!*** +ogniK identified the cause of this to be in `HWOpus` and simultaneous RE efforts from [gdkchan](https://github.com/gdkchan) of Ryujinx, revealed more info. +It seems that the ordering of output parameters within a `HWOpus` function - `DecodeInterleaveWithPerformance` was wrong and fixing that resulted in audio output for both the Let's Go games. + +{{< single-title-imgs + "Pokémon: Let's Go, Eevee!" + "./lgpe-4.png" + "./lgpe-5.png" + "./lgpe-6.png" +>}} + +Hexagon12 implemented a missing predicate comparison, which fixed trainer battle crashes in the games. +With these, yuzu was finally able to boot into the game properly but it still crashed when naming the characters. +Because the software keyboard applet wasn't implemented in yuzu, the games couldn't load the applet and hence crashed. +[DarkLordZach](https://github.com/DarkLordZach) was already working on implementing the applet and with a bit of research and testing, he was able to complete his implementation. + +{{< imgs + "./swkbd.png|Software Keyboard in Pokémon: Let's Go, Eevee!" +>}} + +Provided that your PC hardware is strong enough to handle yuzu, the new Pokémon games are playable, with a few caveats. +Currently, some of the graphics render well, but there are still a lot of flaws - like fonts missing everywhere. +But hey! the audio works decently, although you still need a save file to bypass softlocks in the beginning. +Even with all these, there are random crashes everywhere - which require more in-depth testing to fix. + +{{< single-title-imgs + "Pokkén Tournament" + "./pokken.png" + "./pokken-1.png" + "./pokken-2.png" +>}} + +Apart from these, there were multiple minor improvements and fixes done by our team and other contributors, which helped us get further into accurate GPU emulation. +We also updated the OpenGL's backend version from 3.3 to 4.3 and removed pre 4.3 `ARB` extensions. +With this, the minimum required OpenGl version for yuzu has been bumped up to 4.3 as well. + +## Operating System - HLE + +In regards, to the operating system, kernel, and various service modules, we have made a lot of progress here as well. +Lioncash has been absolutely phenomenal in fixing and optimizing our HLE (High-level emulation) kernel implementation. +He spent dozens of hours in RE (reverse engineering), to debug our kernel and made sure that everything was proper. +Most of his work in this regard has been: + +* Adding missing error codes in the kernel. +* Handling error cases within memory related functions. +* Handling "invalid address" cases within SVC (Supervisor Call) functions. +* Adding missing address range checks in `MapMemory` & `UnMapMemory` functions. +* Fix VMA (Virtual Memory Access) boundary check in `svcQueryMemory`. +* Added missing Korean font in our open-source implementation fallback. + +{{< imgs + "./octo.png|Octopath Traveler" + "./donkey-kong.png|Donkey Kong" +>}} + +He implemented an svc function - `svcGetThreadContext` - which retrieves the the context backing a thread, or the state of the thread at that given moment, and writes it to a provided buffer. +The thread context contains the state of CPU execution - such as general purpose registers, stack pointer, program counter, and several other fields. +This thread context can be used by the executable for debugging purposes, or to save and reuse it later, or anything else entirely depending on the executable. + +He also made changes in our virtual memory manager, to load NPDM metadata. +NPDM is the Switch equivalent of 3DS exheader. +Previously we were never loading NPDM metadata in the event that it was available and it meant that we'd be making assumptions about the address spaces. +With this, he de-hardcoded our assumption of a 36-bit address space, given that it's possible for a game to demand a 39-bit one or 32-bit one and we can now derive the parameters from supplied NPDM metadata, if the supplied executable supports it. + +Apart from these notable changes, Lioncash made several other contributions to yuzu. +He updated the function tables for various services - based on latest documentation from [Switchbrew](http://switchbrew.org), fixed minor bugs in various svc functions, worked tirelessly on maintaining proper C++ style across the code-base, and made performance optimizations wherever possible. + +While Lioncash has been handling the kernel stuff, our Switch RE expert - ogniK has been busy fixing and implementing more service functions. +ogniK properly implemented the `fatal:u` service, stubbed the `IRS` service, and added many missing functions across various services. +He reworked the `nifm` service stubs - which were found to be incorrect, fixed an `acc` service stub - which allowed us to boot the Nintendo Switch Online NES emulator, implemented a few missing functions in `AudRen` and `HwOpus` services - which fixed audio for Sonic Ages. +(Although Nintendo Switch Online NES emulator boots, it doesn't mean users can play online.) + +{{< single-title-imgs + "Nintendo Switch Online - NES emulator" + "./nso-nes.png" + "./nso-nes-1.png" +>}} + +{{< message XtraByte >}} +Stubbing means that these services return `ok` 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. +{{< /message >}} + +He added the ability to switch between docked and undocked mode while in-game, added support for Amiibo files & uncompressed NSOs, and fixed a few minor bugs in various service functions. +Although, this isn't complete Amiibo support just yet. +Only a few games work and more support will be added in the future. + +ogniK reworked and refactored the entire `HID` service implementation, dubbed `Better HID`, and vastly improved it. +He replaced lot of stubbed functions with actual implementations and fixed our `HID layouts`. +This allowed the registration of multiple user controllers **AND** different **TYPES** of controllers (handheld, joycon left, joycon right, pro controller), except for `tabletop mode` - wireless dual joycons. + +DarkLordZach hasn't been sitting quietly either. +He picked up from where ogniK's `HID` rework left off and made further improvements. +He added full UI support to change the connectivity, type/layouts and buttons for all eight players, the handheld controller, the debug controller, mouse, keyboard, and finally touchscreen. + +He also made many new improvements to the file system and added new features as well. +His other notable works include: + +* Added support for `LayeredFS` mods - which brings infinite possibilities for games in yuzu. +* Added support for packed updates - which are basically `XCI` files with both base game and updates. +* Implemented DLC loading. +* Added support for full key-derivation, so that you don't need 3rd party tools for dumping keys, only our [quickstart](https://yuzu-emu.org/help/quickstart/) guide. +* Added support for loading IPS patches. +* Added support for the more easier IPSwitch format patches. +* Implemented save data types - `TemporaryStorage` and `DeviceSaveData`. +* Added UI for multiple user profiles (emulated). +* And many more minor bug fixes and optimizations. + +bunnei implemented the `loadNRO` functions from the `ldr:ro` service. +This was a basic implementation of the functions which allowed us to boot Super Mario Party. +DarkLordZach later completed the `ldr:ro` service implementation, based on research done by bunnei, Subv, and the folks at Atmosphere. + +## Conclusion + +The improvements we've covered here are only the major ones. +In addition to these, we have had many minor bug fixes & feature implementations done by our valuable contributors. +Many thanks to our contributors and also to the devs from various communities who have indirectly helped us progress forward. +Special thanks to our patrons who have showed their continued support for our efforts in this project. +Also, another special thanks to JMC47 - one of the authors for dolphin-emu blog, for all his inputs and criticism regarding this article. + +{{< imgs + "./splatoon2.png|Splatoon 2" + "./sonic-forces.png|Sonic Forces" + "./sonic-forces-1.png|Sonic Forces (In game)" +>}} + +{{< message Note >}} +All these screenshots have been taken in docked mode of yuzu, using a PC with the following specs: + +* CPU - Intel i3 6100 +* GPU - Nvidia GTX 750ti +* RAM - 12 GB DDR3 +{{< /message >}} + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-2018-p4/kirby-1.png b/site/content/entry/yuzu-progress-report-2018-p4/kirby-1.png new file mode 100644 index 000000000..a2b3cd272 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/kirby-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/kirby-2.png b/site/content/entry/yuzu-progress-report-2018-p4/kirby-2.png new file mode 100644 index 000000000..f8607b14e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/kirby-2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/kirby-3.png b/site/content/entry/yuzu-progress-report-2018-p4/kirby-3.png new file mode 100644 index 000000000..cc860e5d8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/kirby-3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/kirby.png b/site/content/entry/yuzu-progress-report-2018-p4/kirby.png new file mode 100644 index 000000000..8e5a88468 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/kirby.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/lgpe-1.png b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-1.png new file mode 100644 index 000000000..4888a642f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/lgpe-2.png b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-2.png new file mode 100644 index 000000000..773ae6aa9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/lgpe-3.png b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-3.png new file mode 100644 index 000000000..367263b83 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-3.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/lgpe-4.png b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-4.png new file mode 100644 index 000000000..98378bfc1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-4.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/lgpe-5.png b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-5.png new file mode 100644 index 000000000..c3036c36e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-5.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/lgpe-6.png b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-6.png new file mode 100644 index 000000000..0ff36e292 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/lgpe-6.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/lgpe.png b/site/content/entry/yuzu-progress-report-2018-p4/lgpe.png new file mode 100644 index 000000000..0f8bafb80 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/lgpe.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/metro1-a.png b/site/content/entry/yuzu-progress-report-2018-p4/metro1-a.png new file mode 100644 index 000000000..a14674262 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/metro1-a.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/metro1-b.png b/site/content/entry/yuzu-progress-report-2018-p4/metro1-b.png new file mode 100644 index 000000000..5c8b36d23 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/metro1-b.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/nso-nes-1.png b/site/content/entry/yuzu-progress-report-2018-p4/nso-nes-1.png new file mode 100644 index 000000000..fb7c99086 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/nso-nes-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/nso-nes.png b/site/content/entry/yuzu-progress-report-2018-p4/nso-nes.png new file mode 100644 index 000000000..ea60283ec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/nso-nes.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/octo.png b/site/content/entry/yuzu-progress-report-2018-p4/octo.png new file mode 100644 index 000000000..1d7aa398d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/octo.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/one-piece.png b/site/content/entry/yuzu-progress-report-2018-p4/one-piece.png new file mode 100644 index 000000000..28ce4c77d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/one-piece.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/op-blur.png b/site/content/entry/yuzu-progress-report-2018-p4/op-blur.png new file mode 100644 index 000000000..a5f7d00dd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/op-blur.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/pokken-1.png b/site/content/entry/yuzu-progress-report-2018-p4/pokken-1.png new file mode 100644 index 000000000..05d1434b7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/pokken-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/pokken-2.png b/site/content/entry/yuzu-progress-report-2018-p4/pokken-2.png new file mode 100644 index 000000000..3cb9a9e99 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/pokken-2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/pokken.png b/site/content/entry/yuzu-progress-report-2018-p4/pokken.png new file mode 100644 index 000000000..d3df8488c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/pokken.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/sand1-a.png b/site/content/entry/yuzu-progress-report-2018-p4/sand1-a.png new file mode 100644 index 000000000..0b8bb2331 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/sand1-a.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/sand1-b.png b/site/content/entry/yuzu-progress-report-2018-p4/sand1-b.png new file mode 100644 index 000000000..d905e79d7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/sand1-b.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1295-a.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1295-a.png new file mode 100644 index 000000000..a8fe17161 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1295-a.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1295-b.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1295-b.png new file mode 100644 index 000000000..41fd3f7f9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1295-b.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1505-1.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1505-1.png new file mode 100644 index 000000000..960a93fe0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1505-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1505-2.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1505-2.png new file mode 100644 index 000000000..ded2fbb7f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1505-2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1622-a.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1622-a.png new file mode 100644 index 000000000..a78a298aa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1622-a.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1622-b.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1622-b.png new file mode 100644 index 000000000..f0f8d187e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1622-b.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-1a.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-1a.png new file mode 100644 index 000000000..0e2ff610a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-1a.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-1b.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-1b.png new file mode 100644 index 000000000..53cd2636e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-1b.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-2a.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-2a.png new file mode 100644 index 000000000..98a2ce572 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-2a.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-2b.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-2b.png new file mode 100644 index 000000000..d293acacb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-1630-2b.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-ice.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-ice.png new file mode 100644 index 000000000..eb3f75d36 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-ice.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-map.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-map.png new file mode 100644 index 000000000..25136bab7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-map.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/smo-mip.png b/site/content/entry/yuzu-progress-report-2018-p4/smo-mip.png new file mode 100644 index 000000000..b699a586e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/smo-mip.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/sonic-forces-1.png b/site/content/entry/yuzu-progress-report-2018-p4/sonic-forces-1.png new file mode 100644 index 000000000..803903e78 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/sonic-forces-1.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/sonic-forces.png b/site/content/entry/yuzu-progress-report-2018-p4/sonic-forces.png new file mode 100644 index 000000000..e58c10e83 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/sonic-forces.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/splatoon2.png b/site/content/entry/yuzu-progress-report-2018-p4/splatoon2.png new file mode 100644 index 000000000..c45f210bc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/splatoon2.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/summary.png b/site/content/entry/yuzu-progress-report-2018-p4/summary.png new file mode 100644 index 000000000..3b7be79f1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-2018-p4/swkbd.png b/site/content/entry/yuzu-progress-report-2018-p4/swkbd.png new file mode 100644 index 000000000..f448d7249 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-2018-p4/swkbd.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/01.png b/site/content/entry/yuzu-progress-report-apr-2020/01.png new file mode 100644 index 000000000..33bbc1205 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/01.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/02.png b/site/content/entry/yuzu-progress-report-apr-2020/02.png new file mode 100644 index 000000000..309c1a6cc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/02.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/03.png b/site/content/entry/yuzu-progress-report-apr-2020/03.png new file mode 100644 index 000000000..807dbd717 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/03.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/04.png b/site/content/entry/yuzu-progress-report-apr-2020/04.png new file mode 100644 index 000000000..883fea2b1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/04.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/05.png b/site/content/entry/yuzu-progress-report-apr-2020/05.png new file mode 100644 index 000000000..4607f5370 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/05.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/06.png b/site/content/entry/yuzu-progress-report-apr-2020/06.png new file mode 100644 index 000000000..25b1a2d33 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/06.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/07.png b/site/content/entry/yuzu-progress-report-apr-2020/07.png new file mode 100644 index 000000000..479bebefc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/07.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/08.png b/site/content/entry/yuzu-progress-report-apr-2020/08.png new file mode 100644 index 000000000..b51eba1a5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/08.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/09.png b/site/content/entry/yuzu-progress-report-apr-2020/09.png new file mode 100644 index 000000000..15f2717ab Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/09.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/10.png b/site/content/entry/yuzu-progress-report-apr-2020/10.png new file mode 100644 index 000000000..847ccba4e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/10.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/15.png b/site/content/entry/yuzu-progress-report-apr-2020/15.png new file mode 100644 index 000000000..eca911abc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/15.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/16.png b/site/content/entry/yuzu-progress-report-apr-2020/16.png new file mode 100644 index 000000000..58fef076f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/16.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/17.png b/site/content/entry/yuzu-progress-report-apr-2020/17.png new file mode 100644 index 000000000..dce4612ba Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/17.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/18.png b/site/content/entry/yuzu-progress-report-apr-2020/18.png new file mode 100644 index 000000000..5ebfeff86 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/18.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/19.png b/site/content/entry/yuzu-progress-report-apr-2020/19.png new file mode 100644 index 000000000..bd617db1d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/19.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/20_b.png b/site/content/entry/yuzu-progress-report-apr-2020/20_b.png new file mode 100644 index 000000000..738bf7650 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/20_b.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/21_b.png b/site/content/entry/yuzu-progress-report-apr-2020/21_b.png new file mode 100644 index 000000000..bcffb4914 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/21_b.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/22_b.png b/site/content/entry/yuzu-progress-report-apr-2020/22_b.png new file mode 100644 index 000000000..f880c3d2d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/22_b.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/23.png b/site/content/entry/yuzu-progress-report-apr-2020/23.png new file mode 100644 index 000000000..a269d4fe0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/23.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/24.png b/site/content/entry/yuzu-progress-report-apr-2020/24.png new file mode 100644 index 000000000..1356dd1d3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/24.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/25.png b/site/content/entry/yuzu-progress-report-apr-2020/25.png new file mode 100644 index 000000000..22da977c4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/25.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/26.png b/site/content/entry/yuzu-progress-report-apr-2020/26.png new file mode 100644 index 000000000..8c5541759 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/26.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/27.png b/site/content/entry/yuzu-progress-report-apr-2020/27.png new file mode 100644 index 000000000..744e2fe6c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/27.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/28.png b/site/content/entry/yuzu-progress-report-apr-2020/28.png new file mode 100644 index 000000000..e94b5c3cd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/28.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/29.png b/site/content/entry/yuzu-progress-report-apr-2020/29.png new file mode 100644 index 000000000..571746909 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/29.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/30.png b/site/content/entry/yuzu-progress-report-apr-2020/30.png new file mode 100644 index 000000000..ca73ad424 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/30.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/31.png b/site/content/entry/yuzu-progress-report-apr-2020/31.png new file mode 100644 index 000000000..3a09ab7b1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/31.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/32.png b/site/content/entry/yuzu-progress-report-apr-2020/32.png new file mode 100644 index 000000000..8004e5726 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/32.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/33.png b/site/content/entry/yuzu-progress-report-apr-2020/33.png new file mode 100644 index 000000000..f09b8cfad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/33.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/34.png b/site/content/entry/yuzu-progress-report-apr-2020/34.png new file mode 100644 index 000000000..674c277ad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/34.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/35_b.png b/site/content/entry/yuzu-progress-report-apr-2020/35_b.png new file mode 100644 index 000000000..bc7f4b6bc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/35_b.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/36_b.png b/site/content/entry/yuzu-progress-report-apr-2020/36_b.png new file mode 100644 index 000000000..954660572 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/36_b.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/banner.png b/site/content/entry/yuzu-progress-report-apr-2020/banner.png new file mode 100644 index 000000000..e23f08d8a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/index.md b/site/content/entry/yuzu-progress-report-apr-2020/index.md new file mode 100644 index 000000000..2992b990a --- /dev/null +++ b/site/content/entry/yuzu-progress-report-apr-2020/index.md @@ -0,0 +1,203 @@ ++++ +date = "2020-05-28T12:00:00-03:00" +title = "Progress Report April 2020" +author = "GoldenX86" +forum = 243216 ++++ + +Hello awesome yuz-ers! We hope you are all doing well. +We have lots of material to cover in this April progress report: some new additions, bug and regression fixes, and the groundwork for future improvements that affect both Mainline and Early Access. But first, let's discuss a few really big changes. + + +## The Big Changes + +This month brought us huge improvements to compatibility, fidelity and resource management. +Our master of serendipity, [bunnei](https://github.com/bunnei), fixed a softlock in `FINAL FANTASY VIII Remastered`. +What he didn’t know at the time is that this small fix also made `Super Smash Bros. Ultimate` playable. Thanks to this, you can now enjoy local multiplayer battles with your friends, either locally or even via Parsec! + +For quite a while, Nvidia Turing users (GTX 16 series and RTX 20 series GPUs) had to deal with several rendering bugs, like black and white terrain in `Fire Emblem: Three Houses`, or black areas in `Super Monkey Ball: Banana Blitz HD`. +[Rodrigo](https://github.com/ReinUsesLisp) fixed most of them by improving the accuracy of the shader decoder. This also fixes some bugs on older Nvidia GPUs too. + +{{< single-title-imgs + "Monochrome no more (Fire Emblem: Three Houses)" + "./29.png" + "./30.png" + >}} + +{{< single-title-imgs + "No greasy black peels (Super Monkey Ball: Banana Blitz HD)" + "./27.png" + "./28.png" + >}} + +Speaking of shader decoding accuracy, [Rodrigo](https://github.com/ReinUsesLisp) improved the precision of the `HADD2` and `HMUL2` instructions, fixing some long standing bugs like the fog in `Fire Emblem: Three Houses` and the excessive brightness in most maps in `Super Smash Bros. Ultimate`. + +{{< single-title-imgs + "You can now take off your sunglasses (Super Smash Bros. Ultimate)" + "./33.png" + "./34.png" + >}} + +{{< single-title-imgs + "From steampunk, to the proper medieval fantasy setting (Fire Emblem: Three Houses)" + "./15.png" + "./16.png" + >}} + +We talked about this in its own [article](https://www.patreon.com/posts/35856792), but it deserves a mention here: +[bunnei](https://github.com/bunnei) rewrote the Virtual Memory Manager (known internally as `Project Epimetheus`), which drastically reduced the amount of RAM games use, and helped Multicore support (also known as`Project Prometheus`) become a reality. + +One of the features in yuzu, and a common one in other emulators, is the ability to separate the rendering thread from the main emulation thread. This makes better use of the CPU's resources, while also helping deliver better performance. +That is exactly what Asynchronous GPU does in yuzu. Thanks to [Blinkhawk](https://github.com/FernandoS27), our Emulated GPU improved drastically, achieving better performance, stability, and accuracy. +These changes introduce the option to adjust the GPU accuracy level while playing. + +{{< imgs + "./31.png| Performance may be reduced with more accurate levels" + >}} + +{{< single-title-imgs + "Normal accuracy (left) and High accuracy (right) (Super Mario Odyssey)" + "./v1.mp4" + "./v2.mp4" + >}} + + +## One Line to Fix 'em All + +`Toki Tori` had sound problems that were related to a floating point instruction, and while investigating the issue, +[Merry](https://github.com/MerryMage) and [bunnei](https://github.com/bunnei) were worried that it may be a problem in [Dynarmic](https://github.com/MerryMage/dynarmic), our ARM to x64 recompiler. +It turns out the problem was just a bad default value in yuzu’s Dynarmic configuration. +Remember what we said about bunnei and serendipity? With a simple one line change, a plethora of bugs were resolved! A special mention goes to `Pokémon Sword/Shield`, as that single line fixed the softlock that plagued us for months and made the game fully playable! + +Here's only a *partial* list of fixes: + ++ `Pokémon Sword/Shield` - All softlocks fixed, running in tall grass fixed, hair salons fixed ++ `The Legend of Zelda`: Link's Awakening - Miniature placing fixed ++ `Toki Tori`, `Final Fantasy 7`, `Diablo 3`, `Project DIVA MegaMix` - Distorted audio fixed ++ `Team Sonic Racing` - Physics fixed ++ `Onimusha Warriors`, `Tales of Vesperia`, `The Messenger` - Game logic fixed ++ `Skyrim` - Audio looping fixed, game progresses further ++ `Oninaki` - Elevator softlock fixed ++ `All Unreal Engine 4 games` - Motion jitter fixed ++ `Super Smash Bros. Ultimate` - Fighter select jitter / flickers fixed ++ `Starlink` - Softlock fixed, game progresses further + +  + +{{< imgs + "./32.png| This sofa is no longer our enemy (Pokémon Sword/Shield)" + >}} + +## Bug fixes and improvements +[Morph](https://github.com/Morph1984) used some Kirby magic and implemented the first steps to get World of Light +working in `Super Smash Bros. Ultimate`. +Even though it doesn’t work yet, the first step is always the most important one! + +[Kewlan](https://github.com/Kewlan) strikes once again with more quality-of-life UI improvements. +This time, they've fixed the placement of button mappings in the input settings for single joycons. + +{{< imgs + "./03.png| From this" + >}} + +{{< imgs + "./05.png| To this" + >}} + +Not stopping there, Kewlan added a slider for the analog stick modifier, allowing keyboard users to half press the emulated +sticks. Additionally, the sliders now show percentages, making them easier to read. + +{{< imgs + "./07.png| Precision" + >}} + +And to top it off, he also added a way to restore the default value for a hotkey. An important part of the user experience is having a tidy and useful interface. + +{{< imgs + "./08.png| More customization" + >}} + +[Tobi](https://github.com/FearlessTobi) fixed some of the internal workings of the input settings, and improved the games list sorting process. He also reworded some of our error and warning popups to be more user friendly. + +{{< single-title-imgs + "The old errors" + "./19.png" + "./21_b.png" + >}} + +{{< single-title-imgs + "The new errors" + "./20_b.png" + "./22_b.png" + >}} + +Waluigi is not part of Smash, yet, but that doesn't mean he can't enjoy some limelight. +[Rodrigo](https://github.com/ReinUsesLisp) decided to help the purple fellow and fixed the shadows in `Mario Tennis Aces`. +The border color of textures in this game are in sRGB format, and we had some small precision errors. +Now you can enjoy those intense matches! + +{{< single-title-imgs + "WAA! (Mario Tennis Aces)" + "./09.png" + "./10.png" + >}} + +[Rodrigo](https://github.com/ReinUsesLisp) added indexed QUADS to Vulkan, this brings major graphical fixes to `Xenoblade Chronicles 2` and `Fast RMX`! Some barrier fixes are still required to get `Xenoblade Chronicles 2` rendering properly, but work on these rendering fixes is on-going. + +{{< single-title-imgs + "From a dark void to RPG (Xenoblade Chronicles 2)" + "./23.png" + "./24.png" + >}} + +[Blinkhawk](https://github.com/FernandoS27) implemented some optimizations to the GPU command list, improving performance +in Diablo 3 and many other games. +He also ported a [Ryujinx](https://github.com/Ryujinx/Ryujinx) hack made by [gdkchan](https://github.com/gdkchan), `Fast GPU Time`. This helps force games to render at their maximum resolution, when they would otherwise dynamically lower it due to not hitting their target framerate. Some examples include `ARMS`, `Super Mario Odyssey`, `Splatoon 2`, `Luigi’s Mansion 3`, and `Mario Tennis Aces`. +This is not only a graphical improvement, but also a way to avoid very high memory usage in dynamic resolution games. +We still recommend the use of resolution mods, but if such mods are not available for your game, Fast GPU Time will help you. +A good example of this is `The Legend of Zelda: Breath of the Wild` with the latest 1.6.0 update. + +{{< single-title-imgs + "Milk baths are over Link, go save Zelda or something (Legend of Zelda: Breath of the Wild)" + "./35_b.png" + "./36_b.png" + >}} + +## Fixed regressions + +[Rei](https://github.com/Its-Rei) found a 3D texture regression in the Wooden Kingdom of `Super Mario Odyssey` that was affecting both Vulkan and OpenGL. +[Blinkhawk](https://github.com/FernandoS27) investigated it and found that there was a bug in the texture cache. +Now it works as intended again, with no more fog stripes on trees. + +{{< single-title-imgs + "As it should be (Super Mario Odyssey)" + "./17.png" + "./18.png" + >}} + +[Rodrigo](https://github.com/ReinUsesLisp) fixed a regression found in `Puyo Puyo Tetris` while running in OpenGL. +With it in place, character portraits have their proper white border rendered. + +{{< single-title-imgs + "Better, right? (Puyo Puyo Tetris)" + "./01.png" + "./02.png" + >}} + +[Rodrigo](https://github.com/ReinUsesLisp) also fixed a regression in `Kirby Star Allies`, which restored the shading and life to this cute game. +Kirby deserves a colorful world for his adventures! + +{{< single-title-imgs + "Poyo! (Kirby Star Allies)" + "./25.png" + "./26.png" + >}} + +## Future plans + +[Rodrigo](https://github.com/ReinUsesLisp) also removed the need to have a Qt build with Vulkan support in Linux, which will help get Vulkan support in our Ubuntu pre-built packages. + +That’s all for now, folks! See you in the May report! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-apr-2020/summary.png b/site/content/entry/yuzu-progress-report-apr-2020/summary.png new file mode 100644 index 000000000..be0d67ec6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/v1.mp4 b/site/content/entry/yuzu-progress-report-apr-2020/v1.mp4 new file mode 100644 index 000000000..17ba07bdc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/v1.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-apr-2020/v2.mp4 b/site/content/entry/yuzu-progress-report-apr-2020/v2.mp4 new file mode 100644 index 000000000..219e36751 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2020/v2.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/banner.png b/site/content/entry/yuzu-progress-report-apr-2021/banner.png new file mode 100644 index 000000000..3270f5caa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/error1.png b/site/content/entry/yuzu-progress-report-apr-2021/error1.png new file mode 100644 index 000000000..4c658d84b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/error1.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/fav.png b/site/content/entry/yuzu-progress-report-apr-2021/fav.png new file mode 100644 index 000000000..1dc892a66 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/fav.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/hades.mp4 b/site/content/entry/yuzu-progress-report-apr-2021/hades.mp4 new file mode 100644 index 000000000..813aa8645 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/hades.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/index.md b/site/content/entry/yuzu-progress-report-apr-2021/index.md new file mode 100644 index 000000000..1df9dbff7 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-apr-2021/index.md @@ -0,0 +1,224 @@ ++++ +date = "2021-05-09T12:00:00-03:00" +title = "Progress Report April 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 405088 ++++ + +Howdy yuz-ers! Another month gone, another progress report written. From new firmware versions to Vulkan fixes, we have quite a bit to talk about, so let’s get right into it! + + + +## Project Eleuthia + +As described in [its own dedicated article](https://yuzu-emu.org/entry/yuzu-applet-overlays/), [Morph](https://github.com/Morph1984) and [Rei](https://github.com/Its-Rei) have been very busy [*rei*mplementing the applets](https://github.com/yuzu-emu/yuzu/pull/6133) yuzu uses. + +This first step implements the `On-Screen Keyboard` (or OSK) that games use, and the `Error Display` yuzu uses to alert the user to bugs, missing data, or crashes. + +{{< single-title-imgs + "Examples of the different kinds of keyboards games request" + "./osk1.png" + "./osk2.png" + "./osk3.png" + >}} + +Another major advantage is adding gamepad support! No need to get off the couch to grab a keyboard anymore. + +{{< imgs + "./error1.png| An error example" + >}} + +Part of the effort included working around Qt’s quirks, so as a by-product users now have the option to select either the old `Exclusive Fullscreen` (recommended and used as default on Linux), or the [new](https://github.com/yuzu-emu/yuzu/pull/6135) `Borderless Fullscreen` (recommended for most cases and to have OSK properly working). + +Borderless not only gives us better input support for gamepads, but also reduces screen tearing and improves clock management related performance issues on some AMD GPUs. + +## Input improvements + +A feature lacking from our `Stereo Vision` implementation was support for the Switch’s motion detection, and by this we don't mean Joy-Cons, but rather the actual console. +This is commonly used for moving the camera with your head when the Switch is in the Labo goggles. + +[german77](https://github.com/german77) [implemented SevenSixAxis and ConsoleSixAxisSensor](https://github.com/yuzu-emu/yuzu/pull/6226), continuing from [previous work](https://github.com/yuzu-emu/yuzu/pull/6224) done by [Morph,](https://github.com/Morph1984) allowing your configured motion device to freely let you look around in compatible games. + +{{< imgs + "./vr.png| Please don't use it like this..." + >}} + +Both the left and right Joy-Cons map their buttons to different memory locations, as [german77](https://github.com/german77) found out. +He discovered that we had the wrong [location for the SL and SR buttons.](https://github.com/yuzu-emu/yuzu/pull/6131) +One fix later, and everything is as it should be. + +A long standing bug when trying to play `Mario Kart 8 Deluxe` in local split screen multiplayer was a freeze that occurred when confirming all connected players. +[Morph](https://github.com/yuzu-emu/yuzu/pull/6205) fixed this crash by [sending the focus state change message](https://github.com/yuzu-emu/yuzu/pull/6205) on applet state changes. + +Thank you EmulationFanatic and riperiperi for the help! + +{{< imgs + "./mk8input.mp4| Better to crash other players than crash the game!" + >}} + +Taking inspiration from [RPCS3](https://rpcs3.net/), [Morph](https://github.com/yuzu-emu/yuzu/pull/6205) [sets the default keyboard input](https://github.com/yuzu-emu/yuzu/pull/6241) to something more suitable for PC users. +You just can’t beat WASD movement, especially when combined with mouse aiming. + +{{< imgs + "./keys.png| Rip and tear, press and click until it is done" + >}} + +Gamecube controllers connected to an adapter sometimes reported the joystick off-center due to invalid data being sent during the connection. +[german77](https://github.com/german77) solved this [by taking 4 measurements during initialization](https://github.com/yuzu-emu/yuzu/pull/6243), ensuring that the controller finds its center, like any warrior should. + +## User interface changes + +[Kewlan](https://github.com/Kewlan) is back with more UI improvements! + +To start off, they've [added a favourite option in the context menu,](https://github.com/yuzu-emu/yuzu/pull/6198) so you can force some of your games to the top of the list. + +{{< imgs + "./fav.png| Just right click them!" + >}} + +Additionally, they [updated the results from a filtered search](https://github.com/yuzu-emu/yuzu/pull/6261) after you remove a directory. This fixes incorrect behaviour if the user decides to modify the game folders while doing a filtered search. + +And lastly, they fixed a [random bug that caused folders to expand or collapse when moving them in the game list.](https://github.com/yuzu-emu/yuzu/pull/6263) + +Several users reported that `Super Smash Bros. Ultimate` may get stuck when loading our web applet, making the whole game softlock. +Turns out the URL used by the applet was getting deleted before being used. +[Morph](https://github.com/Morph1984) got around this bug [by extending the lifetime of the URL.](https://github.com/yuzu-emu/yuzu/pull/6257) + +## It’s 12 o’clock and it’s time for a new firmware! + +A big challenge made its entrance last month: the Nintendo Switch's firmware version was finally updated to Version 12.X, which has kept our developers quite busy figuring out what has changed and what needs to be implemented. + +Thanks to joint efforts of [german77](https://github.com/german77), [epicboy](https://github.com/ameerj), [lioncash](https://github.com/lioncash), and [Morph](https://github.com/Morph1984), yuzu was able to update many system call ID tables ([PR #6153](https://github.com/yuzu-emu/yuzu/pull/6153), [PR #6154](https://github.com/yuzu-emu/yuzu/pull/6154)), services and function tables ([PR #6157](https://github.com/yuzu-emu/yuzu/pull/6157), [PR #6158](https://github.com/yuzu-emu/yuzu/pull/6158), [PR #6159](https://github.com/yuzu-emu/yuzu/pull/6159), [PR #6160](https://github.com/yuzu-emu/yuzu/pull/6160), [PR #6161](https://github.com/yuzu-emu/yuzu/pull/6161), [PR #6164](https://github.com/yuzu-emu/yuzu/pull/6164), [PR #6171](https://github.com/yuzu-emu/yuzu/pull/6171)), as well as some system values ([PR #6155](https://github.com/yuzu-emu/yuzu/pull/6155)). + +Firmware updates generally aim to improve the stability of the hardware and patch exploits, but they might also add support for new features under the hood, which usually requires changes to services, their structures, and other monsters lurking within the OS. +Since future games could make use of any of these things, it’s imperative to integrate and support these changes as soon as possible. + +## General bugfixes + +Recently, [toastUnlimited](https://github.com/lat9nq) caught some bugs using [Sanitizers](https://github.com/google/sanitizers/wiki): a number of tools present in some compilers, which are used to analyse the source code and alert the programmer about memory-related problems (leaks, overflows), undefined behaviour (code that works in one environment but might fail in another), data races (a synchronization problem that appears when dealing with multiple threads accessing the same data), etc. +This led to a series of PRs implementing fixes in yuzu's code, such as: [Prevent stack-use-after-scope](https://github.com/yuzu-emu/yuzu/pull/6141), which ensures that data that used to be accessed indirectly through pointers cannot be accessed again once the reference is lost (possibly corrupting the data that was being pointed to), [Avoid reference binding to misaligned address](https://github.com/yuzu-emu/yuzu/pull/6142), as well as a number of undefined behaviour bugs that occurred when copying memory from one address to another ([PR #6143](https://github.com/yuzu-emu/yuzu/pull/6143), [PR #6145](https://github.com/yuzu-emu/yuzu/pull/6145), and [PR #6146](https://github.com/yuzu-emu/yuzu/pull/6146)). + +toastUnlimited also reported an overflow that occurred when he tried playing `Pokémon Sword` and `Pokémon Let's Go Pikachu`’s demo, which was related to some of the operations realized by the clock. +This helped [Morph](https://github.com/Morph1984) notice a problem in the implementation of the `CalculateStandardUserSystemClockDifferenceByUser` function, and [promptly submit a fix](https://github.com/yuzu-emu/yuzu/pull/6167). + +Different processes communicate through mechanisms known as `IPC` (Inter-Process Communication), and they can send data by using `data buffers`, typically used for large data transfers, or `raw arguments`, which are usually composed of smaller data sets. +In the case of the clock service of this function, this information has to be sent through the aforementioned `data buffers`, but it was being extracted as `raw arguments` instead. +This caused the function to operate using uninitialized data (in other words, junk), since it retrieved the wrong values. +What should have been generally reported as a couple of milliseconds was instead being reported as a time span of trillions of years — approximately, 320 000 times the calculated age of the universe! +Thankfully, the fix only required a small change, so now the values are retired from the proper buffers, and yuzu won't try to dilate time any more (relatively speaking, if you catch my drift). + +[epicboy](https://github.com/ameerj) made a follow-up of previous work that aimed to improve the accuracy of how the values for `resource limits` are [used in the kernel](https://github.com/yuzu-emu/yuzu/pull/6185). + +By nature, all resources in any piece of hardware are limited. +The amount of memory, the number of I/O devices, and even the number of processors, just to name a few examples, have a fixed value that cannot be changed at whim, without changing the hardware first. +One of the many functions of the kernel in an operating system is to manage and distribute these resources to the processes that request them — and for this, it must know the availability and limits of these resources. +Whenever a process is created or deleted, the hardware calculates the amount of memory that is free to use and being used by checking and updating the variables that keep track of these resources. + +Previously, yuzu created processes in such a way that each instance of a process had their own value for `resource limits`. +This was a work-around to ensure that, whenever a process queried the kernel for the amount of memory available, a correct value was always returned. +This, however, is not how the hardware works. +Memory is a resource that is shared system-wide among all the processes, and the task of the kernel to coordinate how these resources are shared among the processes in the system. + +With this PR, processes don't "own" their own instance of `resource limits`, and they now use the global kernel instance instead. + +[Dynarmic](https://github.com/MerryMage/dynarmic) — yuzu's JIT, used to translate the Switch’s ARM CPU instructions — was recently updated again in order to [increase the size of the code cache](https://github.com/yuzu-emu/yuzu/pull/6132) (where yuzu stores the translated code), and add support for some unimplemented instructions from the `thumb32` set, expanding the amount of code that can be translated. + +[degasus](https://github.com/degasus) found that the code cache size was too small when testing `The Legend of Zelda: Breath of the Wild`, and alerted [merry](https://github.com/MerryMage), the chief maintainer, about the problem. + +{{< imgs + "./smash.png| No items, The Best only, Final Destination" + >}} + +Surprisingly, this simple change fixed a very obnoxious problem in a completely different game: the strange slowdowns in `Super Smash Bros. Ultimate`. +It turned out that these slowdowns were unrelated to the power of the computer running yuzu, nor were they neither related to building the shader cache. +Dynarmic was just translating code again, simply because the cache where the translated code was stored was too small. +But now, with the new size value in place, Dynarmic has no need for any recompilation, and the emulation can proceed smoothly. + +Continuing with previous `Super Smash Bros. Ultimate` Spirit Board’s fixes, [Morph](https://github.com/Morph1984) [synchronized the network clock to the local clock](https://github.com/yuzu-emu/yuzu/pull/6170), solving the game timers getting reset. + +[Morph](https://github.com/Morph1984) also fixed `GetClockSnapshotFromSystemClockContext`. +[This PR](https://github.com/yuzu-emu/yuzu/pull/6214) allowing `Super Kirby Clash` and `Yo-Kai Watch 4` to boot. + +{{< imgs + "./kirby.png| Poyo!" + >}} + +[Morph](https://github.com/Morph1984) [stubbing `SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled`](https://github.com/yuzu-emu/yuzu/pull/6234) and [german77](https://github.com/german77) [adding the `ectx:aw` service](https://github.com/yuzu-emu/yuzu/pull/6235) made `Pixel Game Maker Series Werewolf Princess Kaguya` boot! + +{{< single-title-imgs + "Right picture is from a more recent PR that will be mentioned in the next progress report (Pixel Game Maker Series Werewolf Princess Kaguya)" + "./kaguya.png" + "./kaguya2.png" + >}} + +The game currently has rendering bugs especially affecting Nvidia hardware. AMD users will have a better experience in this particular game for now. + +## Graphics improvements + +For our ~~thermonuclear~~ laptop users and heavy multitaskers, the legendary [degasus](https://github.com/degasus) has a treat for you. +By [avoiding spin loops](https://github.com/yuzu-emu/yuzu/pull/6162) in the video core, more idle time is achieved with no performance loss. +This means the GPU can enter `sleep` state more often, resulting in lower temperatures/power consumption, better battery life, and allows the scheduler to take on other tasks waiting in the background, improving system responsiveness. +No more burned thighs while on the pause menu, laptop users! + +[Joshua-Ashton](https://github.com/Joshua-Ashton), the Frog Master from [DXVK](https://github.com/doitsujin/dxvk), brought us a few Vulkan fixes and improvements. + +First on the list is avoiding a device loss (GPU locks up and the driver restarts it) by [checking the return value of vkAcquireNextImageKHR.](https://github.com/yuzu-emu/yuzu/pull/6180) + +Joshua also [enabled the individual features](https://github.com/yuzu-emu/yuzu/pull/6181) from `VK_EXT_robustness2`, instead of just enabling the extension. + +And finally, [fixing a wrong offset for null vertex buffers](https://github.com/yuzu-emu/yuzu/pull/6182) to properly follow the Vulkan specification. +You never know when a driver will behave in erratic ways. Fixes like this allow developers to report bugs to the vendors' driver development teams, thanks to confirming everything is within specs. Any resulting error falls under responsibility of the driver teams. + +OpenGL wasn't the only API to have BGR issues, it turns out Vulkan can also suffer from "blue madness" when a game uses the `A1B5G5R5_UNORM` texture format. + +[epicboy](https://github.com/ameerj) [swapped the Red and Blue channels](https://github.com/yuzu-emu/yuzu/pull/6238) of this format, fixing colours in games like `Pokémon Let’s Go Eevee/Pikachu`, `Shantae: Risky’s Revenge`, and many others! +You can see the result in the following pictures, before (left) and after (right). + +{{< single-title-imgs + "I didn’t want Pokémon Blue! (Pokémon Let's Go, Eevee!)" + "./pokebug.png" + "./pokefix.png" + >}} + +{{< single-title-imgs + "That’s definitely not Vivi (Shantae: Risky’s Revenge)" + "./shanbug.png" + "./shanfix.png" + >}} + +## Linux Build System + +[toastUnlimited](https://github.com/lat9nq) has been periodically improving yuzu’s build system for our Linux user base. +Not all our users want or are able to use the official AppImage, so not only did our build instructions need to be improved, but it was also equally important to refine the environment necessary to get yuzu running — namely, the dependencies, build process, etc. + +The first step was to [make SDL2](https://github.com/yuzu-emu/yuzu/pull/6204) [an external dependency.](https://github.com/yuzu-emu/yuzu/pull/6207) +This would allow us to ship the latest version without having to face Linux distributions' incompatibilities due to different build flags (different characteristics being enabled), or outright outdated versions that aren’t able to support all of the required features that our input asks for. + +The changes to SDL2 introduced an incompatibility with the Conan-provided Boost version. [Downloading it as an external dependency](https://github.com/yuzu-emu/yuzu/pull/6222) ensures compatibility, as most of the time the local packages provided by the distribution won’t be enough. +This change also makes our external download script cross-platform with Windows and other distributions that used to require special workarounds. + +As a special bonus, due to all of these changes, Red Hat Enterprise Linux 8 and its derivatives can build yuzu in a much more user-friendly way. + +For anyone interested, we keep updated build instructions [on this page.](https://github.com/yuzu-emu/yuzu/wiki/Building-For-Linux) + +## Future projects + +This section has lately turned into Project Hades teasing, but we won’t apologize for that! Here’s more info/teasing: + +While working on implementing SPIR-V for OpenGL, we discovered that Nvidia decided to take the lazy way out and just convert SPIR-V back to GLSL, which is then compiled again to GLASM. +This not only destroys any benefit we expected to gain when switching to SPIR-V by default, it also causes huge delays and rendering problems. +We are forced to also implement GLSL in Project Hades, introducing a considerable amount of extra work that wasn’t expected. + +{{< imgs + "./hades.mp4| The best use of Tessellation Shaders ever" + >}} + +This will provide better compatibility for Nvidia hardware, saving Fermi once again from the gutter. + +Regarding other project news, Morph’s Project Gaia is growing. german77 is working hard on Project Kraken. bunnei has more kernel changes in the oven. + +That’s all folks! Thank you for sticking with us and see you next month! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-apr-2021/kaguya.png b/site/content/entry/yuzu-progress-report-apr-2021/kaguya.png new file mode 100644 index 000000000..334781e11 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/kaguya.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/kaguya2.png b/site/content/entry/yuzu-progress-report-apr-2021/kaguya2.png new file mode 100644 index 000000000..122f64ee7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/kaguya2.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/keys.png b/site/content/entry/yuzu-progress-report-apr-2021/keys.png new file mode 100644 index 000000000..0acefc276 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/keys.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/kirby.png b/site/content/entry/yuzu-progress-report-apr-2021/kirby.png new file mode 100644 index 000000000..90bb0d82c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/kirby.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/mk8input.mp4 b/site/content/entry/yuzu-progress-report-apr-2021/mk8input.mp4 new file mode 100644 index 000000000..1da7def4f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/mk8input.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/osk1.png b/site/content/entry/yuzu-progress-report-apr-2021/osk1.png new file mode 100644 index 000000000..cbf698a35 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/osk1.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/osk2.png b/site/content/entry/yuzu-progress-report-apr-2021/osk2.png new file mode 100644 index 000000000..00e923952 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/osk2.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/osk3.png b/site/content/entry/yuzu-progress-report-apr-2021/osk3.png new file mode 100644 index 000000000..3657c8c0b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/osk3.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/pokebug.png b/site/content/entry/yuzu-progress-report-apr-2021/pokebug.png new file mode 100644 index 000000000..b9f40f14f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/pokebug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/pokefix.png b/site/content/entry/yuzu-progress-report-apr-2021/pokefix.png new file mode 100644 index 000000000..e5b16f0dd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/pokefix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/shanbug.png b/site/content/entry/yuzu-progress-report-apr-2021/shanbug.png new file mode 100644 index 000000000..632248dc4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/shanbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/shanfix.png b/site/content/entry/yuzu-progress-report-apr-2021/shanfix.png new file mode 100644 index 000000000..9c2a5e01a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/shanfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/smash.png b/site/content/entry/yuzu-progress-report-apr-2021/smash.png new file mode 100644 index 000000000..d8a420a9b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/smash.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/summary.png b/site/content/entry/yuzu-progress-report-apr-2021/summary.png new file mode 100644 index 000000000..472cdad29 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2021/vr.png b/site/content/entry/yuzu-progress-report-apr-2021/vr.png new file mode 100644 index 000000000..54ab9b8d8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2021/vr.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/about.png b/site/content/entry/yuzu-progress-report-apr-2022/about.png new file mode 100644 index 000000000..b043420da Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/about.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/addonbug.png b/site/content/entry/yuzu-progress-report-apr-2022/addonbug.png new file mode 100644 index 000000000..137b53bfd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/addonbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/addonfix.png b/site/content/entry/yuzu-progress-report-apr-2022/addonfix.png new file mode 100644 index 000000000..84c7eb4aa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/addonfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/aocbug.png b/site/content/entry/yuzu-progress-report-apr-2022/aocbug.png new file mode 100644 index 000000000..8d7d9576b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/aocbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/aocfix.png b/site/content/entry/yuzu-progress-report-apr-2022/aocfix.png new file mode 100644 index 000000000..5a82bb84a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/aocfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/banner.png b/site/content/entry/yuzu-progress-report-apr-2022/banner.png new file mode 100644 index 000000000..49edaba94 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/compatbug.png b/site/content/entry/yuzu-progress-report-apr-2022/compatbug.png new file mode 100644 index 000000000..490085277 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/compatbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/compatfix.png b/site/content/entry/yuzu-progress-report-apr-2022/compatfix.png new file mode 100644 index 000000000..51da30821 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/compatfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/coords.png b/site/content/entry/yuzu-progress-report-apr-2022/coords.png new file mode 100644 index 000000000..5c87279c4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/coords.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/crop.png b/site/content/entry/yuzu-progress-report-apr-2022/crop.png new file mode 100644 index 000000000..07fcdb919 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/crop.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/cropbug.png b/site/content/entry/yuzu-progress-report-apr-2022/cropbug.png new file mode 100644 index 000000000..17b82e3ca Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/cropbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/cropfix.png b/site/content/entry/yuzu-progress-report-apr-2022/cropfix.png new file mode 100644 index 000000000..195473f31 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/cropfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/gaia1.png b/site/content/entry/yuzu-progress-report-apr-2022/gaia1.png new file mode 100644 index 000000000..7726f2667 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/gaia1.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/gaia2.png b/site/content/entry/yuzu-progress-report-apr-2022/gaia2.png new file mode 100644 index 000000000..a3e25b24a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/gaia2.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/hatbug.png b/site/content/entry/yuzu-progress-report-apr-2022/hatbug.png new file mode 100644 index 000000000..f06ef5214 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/hatbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/hatfix.png b/site/content/entry/yuzu-progress-report-apr-2022/hatfix.png new file mode 100644 index 000000000..9b033c253 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/hatfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/hotkeybug.png b/site/content/entry/yuzu-progress-report-apr-2022/hotkeybug.png new file mode 100644 index 000000000..5bfc586b3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/hotkeybug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/hotkeyfix.png b/site/content/entry/yuzu-progress-report-apr-2022/hotkeyfix.png new file mode 100644 index 000000000..cada7821e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/hotkeyfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/hyperlinkbug.png b/site/content/entry/yuzu-progress-report-apr-2022/hyperlinkbug.png new file mode 100644 index 000000000..dd6fd31bf Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/hyperlinkbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/hyperlinkfix.png b/site/content/entry/yuzu-progress-report-apr-2022/hyperlinkfix.png new file mode 100644 index 000000000..97d22cfce Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/hyperlinkfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/index.md b/site/content/entry/yuzu-progress-report-apr-2022/index.md new file mode 100644 index 000000000..3b0396d30 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-apr-2022/index.md @@ -0,0 +1,330 @@ ++++ +date = "2022-05-11T12:00:00-03:00" +title = "Progress Report April 2022" +author = "GoldenX86" +coauthor = "CaptV0rt3x" +forum = 572728 ++++ + +Hello yuz-ers, the month of April has been amazing! We'll discuss CPU and Kernel performance improvements, several GPU emulation changes, UI tweaks, and more! + + + +## Saving Princess Peach yet again + +Continuing his work to better support the [official](https://yuzu-emu.org/entry/yuzu-progress-report-mar-2022/#the-vulkan-emulator) GameCube/Wii and Nintendo 64 emulators (codenamed `Hagi` and `Hovercraft` respectively), [byte[]](https://github.com/liamwhite) has introduced several new PRs to further improve the compatibility of the titles included within `Super Mario 3D All-Stars`. + +byte[] first implemented support for GLSL in `Super Mario Sunshine`, as not everyone can run Vulkan. +This is achieved by adding {{< gh-hovercard "8133" "support for indirect addressing" >}} in OpenGL. + +This change doesn’t include support for GLASM at the moment, since our developers aren't too fond of having to deal with NVIDIA assembly shader code. +Imagine being asked to fix an issue in a car engine, and the only given tools for the job are a rock and a stick. + +However, that was only half the battle. Proper OpenGL support for `Super Mario Sunshine` and `Super Mario Galaxy` required solving an old limitation we had with the aging API: broken Z scale inversion. + +Most Switch games use either OpenGL, the popular free graphics API, or NVN, the proprietary NVIDIA API exclusive to the console. +Arguably, NVN is much closer to OpenGL than Vulkan in how it operates. + +The Tegra X1 GPU on the Switch is flexible enough to allow the coordinate system to be changed at the discretion of the game developer. While most games will behave closer to what OpenGL expects, with the Z-axis facing away from the camera, `Hagi` and `Hovercraft` emulated games (which render using Vulkan and is exclusive to a tiny handful of titles on the Switch) have the coordinates inverted and the Z-axis facing into the camera, the way Vulkan games would expect to natively render. + +{{< imgs + "./coords.png| byte[]'s Z-axis diagram" + >}} + +This was not an issue if you wanted to play `Super Mario Galaxy` or `Super Mario Sunshine` in yuzu with yuzu's Vulkan backend, as the behaviour matched with what the game expected. +But if you tried to play using OpenGL instead, yuzu would not correctly interpret that the faces were flipped due to the Z scale inversion, and thus rendered only the back faces of objects. + +The solution is very simple, {{< gh-hovercard "8149" "flip the front faces" >}} when the Z-axis is inverted. + +{{< single-title-imgs-compare + "Welcome to the Shadow Realm Resort (Super Mario Sunshine)" + "./zbug.png" + "./zfix.png" +>}} + +Next in line, you may have noticed that `Super Mario Sunshine` rendered with a black bar at the bottom. +This is because the Wii and GC games natively use an aspect ratio different to the usual 16:9 we’re used to. +Instead, the games render at a 5:3 aspect ratio. +`Super Mario Galaxy` informs the system to explicitly crop the screen to its native resolution of 1920x1012, but `Super Mario Sunshine` does not, so yuzu previously did not attempt to crop the game, resulting in a conspicuous black bar at the bottom of the render. + +{{< imgs + "./crop.png| Diagram of the cropping process" + >}} + +While the game proportions in `Super Mario Sunshine`, arguably, appear more correct with the black bar, that’s not how Nintendo intended the game to be played. For accuracy’s sake, byte[] interprets the game's implicit crop request, which stretches the image to match the native 1920x1080 resolution of the Switch, both {{< gh-hovercard "8150" "for Vulkan" >}} and {{< gh-hovercard "8152" "for OpenGL" >}}. + +{{< single-title-imgs-compare + "Do not adjust your set (Super Mario Sunshine)" + "./cropbug.png" + "./cropfix.png" +>}} + +In the previous report, we mentioned how S8D24 < > ABGR8 texture conversions allow `Super Mario Galaxy` star bits to behave correctly. +Well, it’s {{< gh-hovercard "8161" "OpenGL’s turn" >}} to join the fun. + +{{< imgs + "./s8d24.png| S8D24 to ABGR8 texture conversion diagram" + >}} + +We mentioned last month how `Super Mario 64` had special requirements to start running on yuzu. +Most games compile their code `ahead-of-time` ([AOT](https://www.youtube.com/watch?v=DeYTBDQnQZw)), that is, before being shipped to you. The Operating System’s job is to execute that precompiled binary code, and then you're playing games. + +`Super Mario 64`, on the other hand, runs `just-in-time` (JIT), to make it easier to develop the `Hovercraft` emulator, and to allow reusing the same `Hovercraft` binary for different games. +The `Hovercraft` emulator loads a native Nintendo 64 ROM of Super Mario 64, and then its JIT compiler takes the ROM and translates the original [MIPS](https://en.wikipedia.org/wiki/MIPS_architecture) (the architecture of the Nintendo 64’s CPU) instructions into [AArch64](https://en.wikipedia.org/wiki/AArch64) (the Switch’s CPU architecture) instructions on the fly. +Only then will the operating system execute the game code. + +{{< imgs + "./jitsrv.png| Ahead-of-time versus Just-in-time compilation diagram" + >}} + +This is similar to how yuzu translates AArch64 instructions into AMD64 instructions with the assistance of [Dynarmic](https://github.com/merryhime/dynarmic). + +The JIT service, which is required to use JIT compilation on retail titles, is a functionality that yuzu didn’t have implemented, simply because no other game had ever needed it. +Additionally, there were some obstacles to implementing it in a direct way, since it requires calling custom code supplied by the game, something which was never needed by any previous service implementation. +So, {{< gh-hovercard "8164" "some preliminary stubs aside" >}}, byte[] {{< gh-hovercard "8199" "implemented the HLE JIT service" >}} to allow the `Hovercraft` emulator to function and `Super Mario 64` to boot. + +{{< gh-hovercard "8261" "In a separate PR" >}}, byte[] adds documentation of how the JIT service interface operates. +This should help other open source projects, if needed. + +Of course, this wasn’t enough to get `Super Mario 64` playable, as there were rendering issues to solve as well. + +It’s never that simple… but let's try to explain it simply. +Nintendo Switch games bundle their own individual GPU driver with each game. +This is done to increase compatibility, you don't need to update every console in the world if a driver version has an issue. + +For unknown reasons, either the `Hovercraft` emulator or the bundled GPU driver reports Vertex Buffers that are simply too large, especially when compared to what the game actually uses. +Whether it's an issue in the included emulator or just a driver bug, we can't know for certain, but we do need to work around this problem. + +{{< imgs + "./vb.png| Erroneous Vertex Buffer size diagram" + >}} + +So, instead of using the insane reported buffer size, byte[] says NO! and {{< gh-hovercard "8205" "uses the backing memory size" >}} instead. + +{{< imgs + "./sm64.png| It's-a him! (Super Mario 64)" + >}} + +Performance on Vulkan is not stellar for now, but you can finally enjoy all 3 of the `Super Mario 3D All-Stars` games with both APIs. + +Lastly, [Morph](https://github.com/Morph1984) implemented a fix to {{< gh-hovercard "8135" "keep the web applet open in the foreground" >}}, as the `Super Mario 3D All-Stars` games require it or else they would crash a few minutes into gameplay. + +## General graphical fixes + +Following up on last month's NVFlinger rewrite, [bunnei](https://github.com/bunnei) continued to track issues and bug reports. +He fixed the reported issues and further cleaned up the code to improve code quality. +{{< gh-hovercard "8137" "See the code changes for the NVFlinger rewrite here" >}}. + +`Xenoblade Chronicles 2` and `Hyrule Warriors: Age of Calamity` would experience interesting issues which were caused by the new `GPU Garbage Collector` introduced as part of `Project Y.F.C.`. +We talked about those changes back in [January](https://yuzu-emu.org/entry/yuzu-progress-report-jan-2022/#other-graphical-fixes). + +As you can see on the top bar below, `Xenoblade Chronicles 2` would use exorbitant amounts of VRAM in OpenGL (top bar). +The bottom bar shows the result after the fixes were implemented. + +{{< imgs + "./xc2bug.png| Not the best way to test your whole VRAM (Xenoblade Chronicles 2)" + >}} + +`Age of Calamity` would display *interesting* graphics at random intervals: + +{{< single-title-imgs-compare + "This is why you don't blast Caramelldansen too hard (Hyrule Warriors: Age of Calamity)" + "./aocbug.png" + "./aocfix.png" +>}} + +[Blinkhawk](https://github.com/FernandoS27) {{< gh-hovercard "8128" "fixed the regressions" >}} and both games are back in business. + +Often times in emulation, when you fix one issue, another pops up. +The cropping fix byte[] implemented for `Super Mario 3D All-Stars` had the lovely unintended side effect of breaking rendering for homebrew apps in Vulkan. +Thankfully, Morph added the {{< gh-hovercard "8267" "magic line to the code" >}} that solves this regression. + +## Skyline framework: Part 3 + +There has been important progress in getting the [Skyline](https://github.com/skyline-dev/skyline) modding framework working. +[Here are](https://yuzu-emu.org/entry/yuzu-progress-report-nov-2021/#skyline-framework-part-1) the [two links](https://yuzu-emu.org/entry/yuzu-progress-report-dec-2021/#skyline-framework-part-2) if you missed our previous progress reports on the subject. + +[tech-ticks](https://github.com/tech-ticks) has been quite busy {{< gh-hovercard "8171" "working on the finishing touches" >}}. +The latest changes include: +- Better `LayeredExeFs` support, which results in easier mod distribution and self-updating capabilities. +- Support for the `SO_KEEPALIVE` socket option, which allows the Skyline TCP logger to operate. +- Implementation of [DNS](https://en.wikipedia.org/wiki/Domain_Name_System) address resolution, which is required by plugins that use HTTPS requests. + +We must mention that while Skyline kernel support is basically finished, bugs in yuzu’s codebase prevent proper operation of the modding framework. +For example, due to underlying emulation issues, [ARCropolis](https://github.com/Raytwo/ARCropolis) won’t work until `Project Gaia` is finished, and some of the changes previously mentioned need some fine tuning from our part to function properly. + +There’s yet more work to do, but we’re a lot closer. We can see the finish line! + +## UI improvements + +[Merry](https://github.com/merryhime), the core developer of `Dynarmic`, {{< gh-hovercard "8140" "made some changes to the add-ons game properties window" >}}, improving column widths. + +{{< single-title-imgs + "Low resolution users will like this" + "./addonbug.png" + "./addonfix.png" +>}} + +The hotkeys configuration window {{< gh-hovercard "8141" "also got some love" >}}, changing the minimum column width. + +{{< single-title-imgs + "It's also great for GNOME users" + "./hotkeybug.png" + "./hotkeyfix.png" +>}} + +Both changes are extremely beneficial for bloated or size unoptimized desktop environments, like GNOME Shell. + +[Tachi107](https://github.com/Tachi107) {{< gh-hovercard "8142" "fixed some embarrassing typos in our logging" >}}, and {{< gh-hovercard "8225" "updated the About yuzu window" >}} to properly mention our new licence, `GPLv3.0+`. +The `+` is there because we want to leave the door open for newer revisions. + +{{< imgs + "./about.png| Screenshot of the yuzu About box" + >}} + +Not stopping there, Taichi {{< gh-hovercard "8283" "performed some cleanup and made improvements to Flatpak builds" >}}, including using proper app ID, fixing some typos, and adding a launch parameter to make yuzu use the dedicated GPU by default on Linux instead of the integrated GPU. + +[Docteh](https://github.com/Docteh) has also helped considerably in improving yuzu’s UI. + +With a bit of manual thinkering, they managed to bypass some Qt limitations in order to {{< gh-hovercard "8190" "display more readable hyperlinks" >}} in our dark themes. + +{{< single-title-imgs + "People seem to have forgotten what hyperlinks are for, just click them!" + "./hyperlinkbug.png" + "./hyperlinkfix.png" +>}} + +Thanks to a report from GillianMC in our [Discord server](https://discord.gg/u77vRWY), Docteh found out that some quirks in the Qt API caused the compatibility status of listed games to not be translated. +The cause lies in QObject, you can find the specific details in the {{< gh-hovercard "8204" "pull request’s description" >}}. Now the status is properly reported in the corresponding language. + +{{< single-title-imgs + "Example in Spanish" + "./compatbug.png" + "./compatfix.png" +>}} + +Similarly, D-Pad directions also didn’t translate properly. The same suspect, {{< gh-hovercard "8224" "once again" >}}. +Someone, please send a warrant asking for the detention of Carmen Sandiego. + +{{< single-title-imgs + "Example in French" + "./hatbug.png" + "./hatfix.png" +>}} + +## Kernel and CPU emulation changes + +Let's begin with two changes that happened in March. + +Our resident bunnei rabbit continued his work on rewriting yuzu's kernel memory management to make it +accurate to the latest system updates. This time, he tackled and revamped {{< gh-hovercard "7974" "how the kernel code memory is mapped and unmapped" >}}. + +Code memory support, in the context of the Switch, allows games and apps to load and unload smaller parts of their code on the fly. +Thanks to these changes, `Super Smash Bros. Ultimate` no longer causes memory access issues while loading/unloading NROs, making the game stable for long play sessions. + +bunnei also {{< gh-hovercard "8013" "migrated slab heaps for the guest (Switch) kernel objects" >}} from host heap memory to emulated guest memory. +With this change, yuzu's memory layout is now more closely matching the console. + +> A slab represents a contiguous piece of memory. A heap is a general term used for any memory that is +allocated dynamically and randomly. + +The slab heap is the space used to store guest kernel objects. +By moving these away from the host (PC) heap memory (RAM) to emulated guest (Switch) memory, we can ensure +that the kernel objects never go beyond the system limits and cause memory leaks on the host (PC). + +Thread local storage (TLS), the mechanism by which each thread in a given multithreaded process allocates storage for +thread-specific data, was also rewritten making it accurate to the latest HorizonOS behaviour. + +With these changes, we have now completely fixed the kernel memory object leaks that affected a few games, but went largely unnoticed, due to the previous implementation allowing unlimited allocations. + +Back to the list of April changes, bunnei also {{< gh-hovercard "8122" "reimplemented how yuzu handled thread allocation" >}} for HLE service interfaces. + +> Services are system processes running in the background which wait for incoming requests. +The Switch's HorizonOS has various services that perform various tasks e.g Audio, Bluetooth, etc. + +Previously, we used to allocate one host thread per HLE service interface because - + +- some service routines need to potentially wait a long time for completion, like network or filesystem access, and +- we don't support guest thread rescheduling from host threads. + +> A thread which is blocked will have to wait until the action that blocked it, such as I/O or simply sleeping for some amount of time, completes. + +The issue with this approach was that since it's the host (Windows or Linux) that schedules the service threads, yuzu could create weird behaviour particularly on systems with hardware limitations due to the spawning one thread per service and the sheer number of service implementations we emulate. + +With the rewrite, yuzu now has a single "default service thread" that is used for 99% of the service methods that are non-blocking. +For the services that are time-sensitive and for those that need blocking, we still allow thread creation (e.g. Audio, BSD, FileSystem, nvdrv) + +This brings down the service thread count from double digits to single digits, thus improving stability and consistency - especially on systems with less cores. +Users with 4 thread CPUs (either 2 cores + HT/SMT, or 4 cores) should see performance and stability improvements in most games. + +Another battle for proper shutdown behaviour is fought and won. +yuzu currently does not emulate multi-process capabilities of the HorizonOS kernel, because it is not required to emulate any games. However, the multi-process APIs that are used by games still need to be managed in the way they expect. +All HorizonOS services have a port (for both client and server) that is used as a channel of communication between the game process and service process. +A session is opened for each communication interface for them both and they are managed by their respective kernel objects. +When the game closes the client port, the service closes the server port, and everything is shut down. + +The issue with our previous implementation was that yuzu wasn't properly tracking all the `KServerPort` and `KServerSession` objects for each service. +And because of this, the services weren't properly getting closed, which in turn was causing further issues. + +This originally worked fine, but was regressed when we migrated guest kernel objects to emulated guest memory, as we mentioned previously. +bunnei figured out the issue and quickly {{< gh-hovercard "8165" "reimplemented how we track these kernel objects" >}}. + +By having a single place where we can register/unregister open ports and sessions, we can now keep better track of these kernel objects. +And by ensuring that they are closed when we tear down all services and kernel, we get much better emulation shutdown behaviour. + +## Input changes and general bugfixes + +If the user sets a very high DPI value for their mouse while using mouse panning, the cursor may be able to escape the rendering window. +[IamSanjid](https://github.com/IamSanjid) implemented the {{< gh-hovercard "8170" "required fixes" >}}, including better centering timings to solve this issue. Thanks! + +[german77](https://github.com/german77) has several fixes ready for us. + +Let’s begin with an interesting one. +yuzu’s screenshot capture feature allows an easy way to save moments at the resolution the scaler is currently set at. +The hotkey for screenshot capture could be spammed, leading yuzu to a crash if several requests for screenshots were sent. This could be worsened if the rendering resolution was set to a high value. +To solve this, yuzu now {{< gh-hovercard "8192" "ignores new requests while a capture is being processed" >}}, and prints a warning in the log. + +There’s always room for improvements in emulation, as nothing is ever truly complete. This time, german77 focuses on inaccuracies found in our input emulation. + +{{< gh-hovercard "8222" "`IsSixAxisSensorFusionEnabled` is implemented" >}} by reverse engineering all Sixaxis functions, and it was verified by comparing with unit test homebrew results done on the Switch. +This should potentially improve motion accuracy. + +The [HID](https://en.wikipedia.org/wiki/Human_interface_device) service in charge of handling input commands, among other things, used to operate by copying its assigned shared memory and reporting back the changes. +This leads to mismatches or delays in the input process, and can potentially make games read completely incorrect data. + +Obviously this isn't ideal, so german77 {{< gh-hovercard "8229" "gets rid of the memory duplication" >}} and uses the ever magical [* pointers](https://en.wikipedia.org/wiki/Pointer_(computer_programming)) to access the shared memory directly instead. +This can fix bugs affecting countless games, with the biggest example being the `Pokémon: Let’s Go` games having a hard time detecting controllers. + +Hotkey presses will now be {{< gh-hovercard "8249" "triggered by using a queue" >}}. This has the benefit of not having to wait for the UI to respond, reducing their delay. + +Analog sticks {{< gh-hovercard "8272" "got some love" >}}, with a couple of important changes in their mapping: + +The default maximum range is now set to 95%, to ensure that games get to use the whole range. This change, for example, avoids characters walking when the stick is at certain angles in games like `Pokémon Legends: Arceus`. +The minimum range was lowered from 50% to 25%, providing greater precision, particularly for people trying to play racing games with a matching wheel. +Auto-center correction is stronger now, avoiding drifting without having to rely on stronger dead-zone values. +Individual axis values can be manually deleted now if buttons were mapped manually. + +Previously, only Player 1 could automatically reconnect a controller by pressing a button. Other players only could do so when using a keyboard. +german77’s pull requests aims to solve that, {{< gh-hovercard "8277" "allowing any of the remaining 7 players to reconnect their controller" >}}. No privileges for those higher in the hierarchy anymore. + +This change is under testing at the time of writing, as it could potentially cause regressions. Be sure to use the status hovercard to check back in a few days! + +## Future projects + +`Project Y.F.C.` is not far away from releasing its first part of two planned. + +`Project Gaia` continues to progress slowly but surely, now causing some previously broken games to finally boot for the first time. + +{{< single-title-imgs + "Minecraft and Mortal Kombat 11 are now booting!" + "./gaia1.png" + "./gaia2.png" +>}} + +That’s all folks! We're still playing catch up with some kernel and CPU optimization changes, so expect a more extensive section next time. +Thank you for the company, see you next month! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-apr-2022/jitsrv.png b/site/content/entry/yuzu-progress-report-apr-2022/jitsrv.png new file mode 100644 index 000000000..b7f606443 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/jitsrv.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/s8d24.png b/site/content/entry/yuzu-progress-report-apr-2022/s8d24.png new file mode 100644 index 000000000..3ef3fe5a7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/s8d24.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/sm64.png b/site/content/entry/yuzu-progress-report-apr-2022/sm64.png new file mode 100644 index 000000000..d138c2123 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/sm64.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/summary.png b/site/content/entry/yuzu-progress-report-apr-2022/summary.png new file mode 100644 index 000000000..1bff4991f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/vb.png b/site/content/entry/yuzu-progress-report-apr-2022/vb.png new file mode 100644 index 000000000..2402824f9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/vb.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/xc2bug.png b/site/content/entry/yuzu-progress-report-apr-2022/xc2bug.png new file mode 100644 index 000000000..3f443c9e3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/xc2bug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/xc2fix.png b/site/content/entry/yuzu-progress-report-apr-2022/xc2fix.png new file mode 100644 index 000000000..0a6cc758f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/xc2fix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/zbug.png b/site/content/entry/yuzu-progress-report-apr-2022/zbug.png new file mode 100644 index 000000000..b954fe84e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/zbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2022/zfix.png b/site/content/entry/yuzu-progress-report-apr-2022/zfix.png new file mode 100644 index 000000000..e8021cc83 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2022/zfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/afbug.png b/site/content/entry/yuzu-progress-report-apr-2023/afbug.png new file mode 100644 index 000000000..880a06d2e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/afbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/affix.png b/site/content/entry/yuzu-progress-report-apr-2023/affix.png new file mode 100644 index 000000000..3abe65844 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/affix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/async.png b/site/content/entry/yuzu-progress-report-apr-2023/async.png new file mode 100644 index 000000000..1c53f057f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/async.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/banner.png b/site/content/entry/yuzu-progress-report-apr-2023/banner.png new file mode 100644 index 000000000..4eec74fa8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/botwbug.png b/site/content/entry/yuzu-progress-report-apr-2023/botwbug.png new file mode 100644 index 000000000..a95b3ee09 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/botwbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/botwfix.png b/site/content/entry/yuzu-progress-report-apr-2023/botwfix.png new file mode 100644 index 000000000..27950ede2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/botwfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/bsod.png b/site/content/entry/yuzu-progress-report-apr-2023/bsod.png new file mode 100644 index 000000000..ce7d12080 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/bsod.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/case.png b/site/content/entry/yuzu-progress-report-apr-2023/case.png new file mode 100644 index 000000000..e26768bf7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/case.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/d24.png b/site/content/entry/yuzu-progress-report-apr-2023/d24.png new file mode 100644 index 000000000..dc1d85650 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/d24.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/dxgi.png b/site/content/entry/yuzu-progress-report-apr-2023/dxgi.png new file mode 100644 index 000000000..504bc966e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/dxgi.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/extendedbug.png b/site/content/entry/yuzu-progress-report-apr-2023/extendedbug.png new file mode 100644 index 000000000..cfe09dcdd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/extendedbug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/extendedfix.png b/site/content/entry/yuzu-progress-report-apr-2023/extendedfix.png new file mode 100644 index 000000000..dbcceaceb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/extendedfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/gather.png b/site/content/entry/yuzu-progress-report-apr-2023/gather.png new file mode 100644 index 000000000..01d3edbda Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/gather.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/hdr.jxr b/site/content/entry/yuzu-progress-report-apr-2023/hdr.jxr new file mode 100644 index 000000000..048c388cc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/hdr.jxr differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/hdr.png b/site/content/entry/yuzu-progress-report-apr-2023/hdr.png new file mode 100644 index 000000000..7ec5fc171 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/hdr.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/igs.png b/site/content/entry/yuzu-progress-report-apr-2023/igs.png new file mode 100644 index 000000000..c2fc831bf Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/igs.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/index.md b/site/content/entry/yuzu-progress-report-apr-2023/index.md new file mode 100644 index 000000000..9e8a7caf0 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-apr-2023/index.md @@ -0,0 +1,381 @@ ++++ +date = "2023-05-10T12:00:00-03:00" +title = "Progress Report April 2023" +author = "GoldenX86" +forum = 786276 ++++ + +Hello yuz-ers! There were fewer individual changes this month, but the changes that were made are substantial! You won't want to miss this. + + + +Poor Melia up there. + +## Project Y.F.C. 1.90! + +[Blinkhawk](https://github.com/FernandoS27) showed up one weekend and asked, “Want to test a 50% performance boost and almost perfect rendering on Normal GPU accuracy?” +And that’s exactly what we did. + +A more accurate name for this change would be “a rewrite of the Buffer Cache Rewrite”, {{< gh-hovercard "10084" "perhaps rBCR for short?" >}} +Essentially, Blinkhawk rewrote most of the old buffer cache changes that [Rodrigo](https://github.com/ReinUsesLisp) introduced [two years ago](https://yuzu-emu.org/entry/yuzu-bcr/), taking into account the new demands of recent games and the issues found with the original BCR. + +Part of the work {{< gh-hovercard "10088" "also involves:" >}} + +- Allowing the verification of fencing and writing of asynchronous downloads in a separate thread +- Restructuring how accuracy is managed by skipping host-guest fence synchronization and not downloading on host conditional rendering for normal GPU accuracy +- Improving consistency for `Query Cache` asynchronous downloads + +The results are amazing. Most games that used to need High GPU accuracy to render correctly can now run on Normal with no issues. +Additionally, all this wizardry reduces bandwidth usage and boosts performance up to 87% for everyone (50% on average), from the low-end APUs to the high-end beasts. + +Here’s an incomplete list of changes: + +- As noted previously, many games which required High GPU accuracy to be visually accurate now work with Normal GPU accuracy with minimal sacrifice. +- Particles and character lighting/shading in `Pokémon Sword & Shield` have been fixed on Normal GPU accuracy. Performance has improved by up to 40% on Normal GPU accuracy. +- Models (the BowWow, for example) and particle rendering are fixed on Normal GPU accuracy in `The Legend of Zelda: Link's Awakening`. Performance on Normal accuracy, with correct rendering, is now up to 70% higher than before. +- Lighting in `Diablo II: Resurrected` has been fixed and will no longer flicker. +- Lighting and shadows in `Luigi's Mansion 3` will no longer randomly flicker. +- Pokémon photograph detection and data of `New Pokémon Snap` has been fixed on Normal GPU accuracy. This results in up to a 50% increase in performance with working photograph detection. +- `Kirby and the Forgotten Land` vertex explosions, lighting, and particles have been fixed on Normal GPU accuracy. This results in an up to 40% performance increase, with accurate rendering on Normal accuracy. +- Red lights in some machines in `Xenoblade Chronicles 2` have been fixed. +- `Fire Emblem Warriors` has been accurately fixed and no longer requires a workaround. +- `MONSTER HUNTER RISE` now accurately renders on Normal GPU accuracy, resulting in an up to 50% performance increase (note, however, that updates after 3.0.0 still have issues and require more work). +- Vertex explosions in `Persona 5 Royal` no longer occur with Normal GPU accuracy, resulting in an up to 30% increase in performance. +- `Atelier Ryza` series games now render correctly. +- The pessimistic flushes option in advanced graphics settings is no longer needed in any of the affected games it benefitted and we have now removed it. +- `Mortal Kombat 11` no longer has any vertex explosions. +- `NieR:Automata The End of YoRHa Edition` now renders correctly. +- `Bayonetta 3` no longer requires High GPU accuracy to render correctly. +- `Splatoon 2`’s ink physics work correctly on AMD GPUs while using High GPU accuracy. +- Particles in `The Legend of Zelda: Breath of the Wild` have been fixed, resulting in 40% higher performance and accurate rendering on Normal GPU accuracy. +- Tree flickering in `The Legend of Zelda: Breath of the Wild` has been fixed on all GPU accuracy options. +- And much, much more! + +No option needs to be enabled to take advantage of all of this, just switch GPU accuracy to Normal if you haven’t already. What are you waiting for? + +Here are some stats of some of the most popular games. +We compared High GPU accuracy in Mainline 1407, and Normal GPU accuracy in Mainline 1421. +All tests are done at 2X resolution scaling, and using mods to disable dynamic resolution when possible. + +{{< imgs + "./yfc1.png| Hardware makers cry over this kind of free performance boost" + >}} + +And then we have these four, the high FPS squad. They're reason enough to consider asking the modding community to start releasing 240 FPS mods! + +{{< imgs + "./yfc2.png| When you gotta go so fast on a previous generation CPU that a second graph is required" + >}} + +Expect even higher numbers with a Zen 4 3D V-cache chip. +For example, in the same testing spot of `Breath of the Wild`, a non-3D 7900X gets 90 FPS. + +{{< imgs + "./bsod.png| Your writer’s PC is feeling like a snail compared to the current monsters on sale…" + >}} + +## Other graphical changes + +[Citra](https://github.com/citra-emu/citra)-legend [GPUCode](https://github.com/GPUCode) stepped up to give us a hand with presentation. Presentation is the final step of most graphics code — the process of getting the output to the screen. + +GPUCode's work {{< gh-hovercard "9973" "moves swapchain operations" >}} to a separate thread in order to avoid stalling the main GPU thread. This improves performance in more demanding titles and on low-end hardware, and can make the difference between barely getting 60 and getting a smooth 60 frames per second in many cases. + +However, it can also make the frametimes less consistent, therefore we've turned it off by default to allow for further testing. We need to determine which systems and games benefit the most. +For those interested in trying it, the toggle is available in `Emulation > Configure… > Graphics > Advanced > Enable asynchronous presentation (Vulkan only)`. + +{{< imgs + "./async.png| Share your experience with us!" + >}} + +[vonchenplus](https://github.com/vonchenplus) continues to work on making the {{< gh-hovercard "10008" "code match the information NVIDIA has made public" >}} in their latest documentation. + +You may remember [Wollnashorn](https://github.com/Wollnashorn) from their role in [overhauling the Vulkan pipeline cache](https://yuzu-emu.org/entry/yuzu-progress-report-jan-2023/#new-challenger-approaching). +Now, Wollnashorn presents us with a technique to bypass hardware limitations in order to make `The Legend of Zelda: Breath of the Wild` render accurately on non-NVIDIA hardware. + +Object edges, especially grass blades, had distinct black borders on AMD and Intel GPUs. +The issue occurred regardless of the driver in use, so it was clearly a hardware limitation, and an incompatibility with what the game expects. +`The Legend of Zelda: Breath of the Wild` uses a technique called deferred rendering–in this particular case, shadows render at half the resolution. +Four pixels of the full resolution depth texture are sampled simultaneously with a [textureGather](https://registry.khronos.org/OpenGL-Refpages/gl4/html/textureGather.xhtml) call. +`textureGather` has the characteristic of working with normalized floating-point coordinates for the texture, so each fragment is always at the boundary of the four selected pixels. + +{{< imgs + "./gather.png| The four special pixels" + >}} + +Now, `textureGather` uses floating-point, and each GPU design will have a different rounding precision. +Additionally, thanks to a [blogspot by Nathan Reed](https://www.reedbeta.com/blog/texture-gathers-and-coordinate-precision/), we know the integer coordinates of the pixel on the texture are calculated by the GPU after a conversion from a floating-point number to a fixed-point number. + +With floating point conversions involved, you may be able to tell where this is going. +If the user’s GPU is not using the same rounding precision as the Nintendo Switch, different pixels can be sampled. Ergo, only NVIDIA GPUs got the four correct pixels the game intended. + +How did Wollnashorn solve this? With a {{< gh-hovercard "10030" "clever little trick," >}} of course. +Adding a very tiny (1/512) subpixel offset to the sample coordinates is sufficient to fudge the rounding. +Achieving that required modifying the code of the SPIR-V and GLSL backends, altering how the operation is handled only for AMD and Intel hardware for now, with the option to force it for any other future hardware that may require it, for example, a certain fruit company. + +Here’s the final result: + +{{< single-title-imgs-compare + "Funny how we end up sharing the same problems Cemu faced (The Legend of Zelda: Breath of the Wild)" + "./botwbug.png" + "./botwfix.png" +>}} + +Something we have to mention is that this doesn’t fix a very similar-looking black line issue present when using `anisotropic filtering` values higher than Default with AMD and Intel GPUs. +That’s a separate issue and we recommend Red and Blue Team users to at least set a per-game setting for `The Legend of Zelda: Breath of the Wild` to set it to Default only. +The game doesn’t benefit from higher values anyway, since its terrain textures don’t seem to take advantage of it. + +{{< single-title-imgs-compare + "That’s a clean look all around (The Legend of Zelda: Breath of the Wild)" + "./afbug.png" + "./affix.png" +>}} + +Linux got its well deserved share of love too thanks to [byte[]](https://github.com/liamwhite). + +First up, he fixed up {{< gh-hovercard "10051" "initialization of the Vulkan swapchain on Wayland," >}} helping Linux NVIDIA users to be able to launch their games. +As some of you may know, NVIDIA was historically very stubborn about their support of Wayland, and it doesn’t help that most Wayland compositors are very stubborn on their own too. +The year of the Linux desktop, always around the corner… + +Second, he fixed a crash that happened to Flatpak users trying to play `Bayonetta 3`. +An {{< gh-hovercard "10069" "out-of-bounds" >}} could occur in an array access intended for size estimations, leading to “nasty stuff”. +A small adjustment, and the issue is no more. Nice pull request number there. + +Speaking of out-of-bounds, [Maide](https://github.com/Kelebek1) found an interesting case happening in corner sampling due to a previously added offset. +Not accounting for this offset caused another out-of-bounds situation during {{< gh-hovercard "10074" "2D texture blitting." >}} + +Fixing this special case solved the depth-of-field rendering issues in `Kirby Star Allies`. + +{{< single-title-imgs-compare + "Poyo! (Kirby Star Allies)" + "./kirbybug.png" + "./kirbyfix.png" +>}} + +Still on fire, and with more work to come, Blinkhawk hasn’t stopped. +For something light, he decided to refactor a big part of [Accelerate DMA](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2023/#project-yfc-175) to do {{< gh-hovercard "10082" "texture downloads" >}} through the texture cache instead. +The result is a return to the performance `Pokémon Sword & Shield` and `Hyrule Warriors: Age of Calamity` had before the old Y.F.C 1.75 changes. +Add up the gains from Y.F.C 1.90, and you have a winner for low-end systems! + +We have many more changes Blinkhawk implemented, but they didn’t make it in time for the deadline for the progress report, so we will be mentioning them next month. + +## General changes and settings glossary + +The modding community requested us to allow for larger texture mods. The old 6GB limit was not enough, so byte[] {{< gh-hovercard "10035" "expanded it to support a custom 8GB arrangement" >}} instead, giving almost all of it to the emulated program. + +However, this had unforeseen consequences. + +We discovered that users like to enable settings without knowing what they do. +Shocking, right? + +Having a much higher amount of memory available than the normal development console would has caused problems. For example, after getting several reports of Pokémon failing to respawn in `Pokémon Scarlet & Violet` after playing the game for a few minutes, we narrowed the changes down to users with this setting enabled. + +However, this option is **only meant** for very large texture mods, and should not be enabled unless you are using such a mod. +Unfortunately, it was on the first page of the yuzu settings when opening it, so it was a very visible setting. +Additionally, we found some YouTube tutorials which incorrectly suggested it may improve performance and stability, and users followed that. +This would have resulted in 4GB of extra RAM wasted for no benefit, and potentially caused issues in games. + +To try to prevent this, we recommend reading our new [settings glossary](https://community.citra-emu.org/t/settings-glossary/768483), which together with our [recommended settings](https://community.citra-emu.org/t/recommended-settings/319349) page, should help people understand what each setting does, and what’s recommended to change. + +Moreover, to solve the problem for the users who don’t check our official channels, byte[] {{< gh-hovercard "10124" "moved the setting" >}} to the bottom of the `System` tab, and renamed it, ensuring that no previous configuration file will enable it again without user intervention. +If you have a real need for extended memory layout, make sure to manually enable it again. +Or don’t, we won’t judge you… too much. + +{{< single-title-imgs-compare + "You have been relegated to System settings" + "./extendedbug.png" + "./extendedfix.png" +>}} + +Users reported that `IGS Classic Arcade Collection` wasn’t playable. +vonchenplus investigated the cause and found the reason in our audio emulation. +Apparently the game doesn’t do a very good job implementing its audio code on the Switch, and fails to initialize a new audio output session, which should return an error. +Properly {{< gh-hovercard "10056" "returning this error as a result" >}} is enough to get the game working. + +{{< imgs + "./igs.png| Nothing beats the classics (IGS Classic Arcade Collection)" + >}} + +One of the options made available to our [LDN](https://yuzu-emu.org/entry/ldn-is-here/) users is the ability to [create private rooms](https://yuzu-emu.org/help/feature/multiplayer/), providing hosts with several options to configure their servers as they want. + +[twitchax](https://github.com/twitchax) knows that for certain server hosts, such as `fly.io`, a {{< gh-hovercard "10068" "custom bind address" >}} is needed. +They implemented the functionality and now users can pass the `--bind-address` argument to the room’s configuration. +Thanks! + +Continuing his work on {{< gh-hovercard "10086" "improving CPU timing accuracy," >}} [Morph](https://github.com/Morph1984) fixed confusion between the raw CPU frequency and `Counter-timer Frequency`, or CNTFRQ. +The difference between the two is that CNTFRQ reports the frequency of the system clock, instead of the CPU frequency. +While fixing this, he also reduced the time it takes to measure timing information by about 60%. + +What does this mean for the user? +A sweet 1-7% performance boost. + +## Input changes + +Also known as [german77](https://github.com/german77)’s section. + +How you interact with a game might just be more important than even graphics or audio. After all, it’s what differentiates it from a CG animated movie. +As it is tradition by now, our dear Kraken has been working on further improving yuzu’s input emulation. + +A big part of the work of writing an emulator involves reverse engineering, so he’s been working on making the NFC service match what the Switch does internally — in this case, implementing all the {{< gh-hovercard "10053" "remaining missing interfaces," >}} putting them on the same level as what the real console does. + +This next change is a simple revelation that came from the work done on TAS. +If you implement a {{< gh-hovercard "10060" "virtual controller," >}} it won’t need range and dead zone settings as it will be *virtually* perfect (sorry, not sorry). + +But not all work was done by german77, [v1993](https://github.com/v1993) caught a little nasty bug that slipped by. +Motion emulation with mouse movement is handled by a 3D vector (x, y, z). Yes, surprise math lesson, deal with it. +Anyway, yuzu was doing this: + +(x, y, z) = (x, y, z) + (1, 2, z) + +Which results in: + +(x + 1, y + 2, 2z) + +The z component was being doubled by mistake! + +{{< gh-hovercard "10055" "The solution" >}} is to instead do: + +(x, y, z) = (x, y, z) + (1, 2, 0) + +Which gives us: + +(x + 1, y + 2, z) + +And now all’s right with the world. +This should improve the quality of mouse motion, for those that prefer an FPS experience with a keyboard and mouse. +Or just like to torture themselves. + +## Hardware section + +A recurring problem users face when running modern emulators that utilize Vulkan is the lack of a way to get helpful feedback if the program crashes. +Vulkan is very picky. +Any wrong step in the middle and it will refuse to start, and any Vulkan layer program can cause this. Anything from outdated screen recorders, to mod managers, performance overlays, and even the disaster code motherboard vendors call RGB software. +Of particular nasty interest is the Epic Game Store’s overlay, which is reported to cause severe performance issues. + +To some extent, yuzu can detect these problems and switch to OpenGL to avoid them, but that doesn’t tell the user where the problem is. +We recently found out about a cute little program the [RPCS3](https://github.com/RPCS3/rpcs3) community has been using for some time to diagnose these problems, [VkDiag](https://github.com/13xforever/vkdiag). +You can find its latest version [here](https://github.com/13xforever/vkdiag/releases). + +What this program does is list all relevant components and layers affecting Vulkan rendering and warn about potential problems in any of them. + +{{< single-title-imgs + "It's already been combat tested, both outdated drivers and broken layers are in its sights" + "./vkdiag1.png" + "./vkdiag2.png" + >}} + +We have started using it in our support channels with amazing success, and we recommend self-serving users to keep it in their toolkit. You never know when that OBS install you forgot to update can cause you problems, or when that RGB software decides to go rogue. + +### NVIDIA, enjoying Auto HDR + +Here’s some great news for Windows 11 users rocking HDR displays. +Some time ago, GitHub user [svonolfen](https://github.com/svonolfen) in our issue tracker found an interesting way to make Auto HDR work with NVIDIA GPUs. [Here’s the link](https://github.com/yuzu-emu/yuzu/issues/9221#issuecomment-1493392941). By renaming yuzu to "Cemu" and performing additional steps, Auto HDR is suddenly functional. + +{{< imgs + "./hdr.png| Don’t mind the Spanish" + >}} + +Cemu gets privileges, indeed. +This is only available for NVIDIA Windows drivers because, at least for now, only the NVIDIA Control Panel offers the option to force a DXGI swapchain — effectively making the Vulkan program present to screen as a Direct3D one. +This has a few benefits: Auto HDR works, improving dynamic range considerably, borderless optimizations are applied to yuzu, improving input lag and frame synchronization, and the G-Sync/Freesync issue is solved. +It has a downside worth mentioning, it can be up to 5% slower than regular Vulkan presentation. + +{{< imgs + "./dxgi.png| Don’t forget to set up your NVIDIA control panel accordingly!" + >}} + +While this fun renaming works fine, we also heard from Windows Insider users that future versions of the Xbox Game Bar application will allow yuzu to work with Auto HDR without doing any renaming. +This will most likely require newer NVIDIA drivers to work. + +If you own an HDR-compatible monitor and want to compare the results, here’s a .jxr [HDR capture](https://github.com/yuzu-emu/yuzu-emu.github.io/blob/hugo/site/content/entry/yuzu-progress-report-apr-2023/hdr.jxr) that the default Windows 11 photo viewer can open, and a comparable .png native [SDR capture](https://github.com/yuzu-emu/yuzu-emu.github.io/blob/hugo/site/content/entry/yuzu-progress-report-apr-2023/sdr.png). +You will of course need HDR output enabled in both your display’s and Windows 11 settings. +Notice the difference in the sky and lamps. +The tonemapping isn’t perfect, but we will never get Switch games outputting native HDR anyway. + +Your writer’s simple HDR400 display with no dimming zones is enough to notice the benefits, so here’s your excuse to convince your parents/wife to buy that OLED monitor you’ve been eyeing for weeks. Zelda. In HDR. + +A Vulkan extension can be implemented in yuzu to get global support for any GPU. +You can be sure I’ll be nagging our GPU devs until it gets added. + +### AMD, delivering on their promises + +[Last month,](https://yuzu-emu.org/entry/yuzu-progress-report-mar-2023/#amd-2332-and-newer-drivers) we mentioned that AMD introduced a regression that caused graphical corruption and crashes with some games. + +We’re happy to announce that since driver version 23.4.2 and later the issue is resolved for Vega and newer, allowing Radeon Windows users to fully benefit from the new Vulkan extensions supported by the latest drivers, reducing shader building stuttering to a minimum. +Just as AMD promised, except... + +Polaris (RX 400/500 series) cards may still be unstable under some rare cases, but a fix shouldn't take too long to appear. +In the meantime, Polaris users should stick to driver [23.3.1](https://www.amd.com/en/support/kb/release-notes/rn-rad-win-23-3-1), unless they want to face results like this: + +{{< imgs + "./polaris.png| Your whole desktop looks like this" + >}} + +On another topic, we reported to AMD what we suspect is the cause of the Pentelas Region vertex explosions in `Xenoblade Chronicles 3`, which also now affect the initial regions in its new expansion, `Future Redeemed`. + +{{< imgs + "./pentelas.png| That’s the water performing the mother of all vertex explosions (Xenoblade Chronicles 3)" + >}} + +Since the issue affects both the official AMD and Mesa drivers indiscriminately, we suspect it’s a hardware limitation — possibly the lack of support for D24 depth formats, which many games utilize (Xenoblade games included), and both NVIDIA and Intel support. + +{{< imgs + "./d24.png| That’s what a hardware limitation looks like" + >}} + +### Intel… + +As we’ve been previously reporting, [Intel Windows Vulkan drivers are unstable](https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/159). +The SPIR-V compiler (the part that handles Vulkan pipeline shaders) can crash working on compute shaders and some specific shader instructions. + +We found a case where the driver crashes when compiling a shader with more than 5 cases in a switch block, or more than 5 if-else blocks of the same condition. +Maybe an optimization gone wrong? + +{{< imgs + "./case.png| If you uncomment out the last two cases, the driver crashes" + >}} + +We reported the crash to Intel six months ago, and their reply this month was: + +> Thank you for reporting this issue. Our priority is to target the most popular games and apps to focus our efforts on providing a high quality, stable experience for the broadest set of users. We will continue to improve our software performance and compatibility throughout 2023 and beyond. + +So even after waiting six months with a test case provided, the reason explained, and even after pointing out where in the driver the crash happens, Intel can’t find the time to fix the issue. +This is some kind of twisted joke. +For comparison, when you do this with NVIDIA, they *hire* you. + +We’re left with no option but to mitigate the crashes as much as we can. +To do so, Morph {{< gh-hovercard "10110" "disabled compute shaders" >}} entirely for Intel Windows drivers, ensuring games like `The Legend of Zelda: Breath of the Wild` can still boot ― even though they'll have gameplay issues as a result. + +This isn’t enough to solve all crashes. Some games like `Xenoblade Chronicles 3` will still crash the shader compiler. We haven't diagnosed this yet, but believe that it's likely closely related to the same issue we have already reported. + +Disabling compute shaders produces this lovely side effect on some games like `Super Smash Bros. Ultimate`: + +{{< imgs + "./smash.png| That’s what happens when we’re forced to remove an entire pipeline stage, Intel (Super Smash Bros. Ultimate)" + >}} + +For those that prefer proper rendering on Intel Windows drivers, can tolerate the random crashes, and don’t want to just use the actually working Linux Mesa drivers, [Mainline 1414](https://github.com/yuzu-emu/yuzu-mainline/releases/download/mainline-0-1414/yuzu-windows-msvc-20230429-3aaa245f7.7z) is currently the last version with support for compute shaders. +We’re working to add a toggle that can be configured per game. + +But wait, there’s more, the fun doesn’t stop there. +Reddit users discovered that Intel 12th and 13th Gen CPUs running on Windows 11 have noticeably worse frametimes than the same hardware running on Windows 10. + +{{< imgs + "./intel.png| What would EA say to this" + >}} + +So if you notice stutter while playing, the solution may be quite simple: perform a clean Windows 10 install! + +## Future projects + +So releasing `Project Y.F.C` in parts paid off. +Blinkhawk is working on the final part of it, which includes a restructuring of the GPU accuracy settings, and a few other surprises. +Stay tuned. + +You will also hear news about `Project Lime` *very soon!* + +That’s all folks! Thank you for reading until the end, nothing makes us happier. + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-apr-2023/intel.png b/site/content/entry/yuzu-progress-report-apr-2023/intel.png new file mode 100644 index 000000000..aad2ce2fe Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/intel.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/kirbybug.png b/site/content/entry/yuzu-progress-report-apr-2023/kirbybug.png new file mode 100644 index 000000000..a92567bca Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/kirbybug.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/kirbyfix.png b/site/content/entry/yuzu-progress-report-apr-2023/kirbyfix.png new file mode 100644 index 000000000..44ddcd9fa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/kirbyfix.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/pentelas.png b/site/content/entry/yuzu-progress-report-apr-2023/pentelas.png new file mode 100644 index 000000000..08cc6b720 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/pentelas.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/polaris.png b/site/content/entry/yuzu-progress-report-apr-2023/polaris.png new file mode 100644 index 000000000..69f1a324c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/polaris.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/sdr.png b/site/content/entry/yuzu-progress-report-apr-2023/sdr.png new file mode 100644 index 000000000..206e124fa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/sdr.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/smash.png b/site/content/entry/yuzu-progress-report-apr-2023/smash.png new file mode 100644 index 000000000..74f0ac6b5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/smash.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/summary.png b/site/content/entry/yuzu-progress-report-apr-2023/summary.png new file mode 100644 index 000000000..a79e92053 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/vkdiag1.png b/site/content/entry/yuzu-progress-report-apr-2023/vkdiag1.png new file mode 100644 index 000000000..ddd877761 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/vkdiag1.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/vkdiag2.png b/site/content/entry/yuzu-progress-report-apr-2023/vkdiag2.png new file mode 100644 index 000000000..581f094de Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/vkdiag2.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/yfc1.png b/site/content/entry/yuzu-progress-report-apr-2023/yfc1.png new file mode 100644 index 000000000..745b77744 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/yfc1.png differ diff --git a/site/content/entry/yuzu-progress-report-apr-2023/yfc2.png b/site/content/entry/yuzu-progress-report-apr-2023/yfc2.png new file mode 100644 index 000000000..1a224aa9d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-apr-2023/yfc2.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/automap.mp4 b/site/content/entry/yuzu-progress-report-aug-2020/automap.mp4 new file mode 100644 index 000000000..227fd44d7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/automap.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/banner.png b/site/content/entry/yuzu-progress-report-aug-2020/banner.png new file mode 100644 index 000000000..1821c0f7e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/bordercolor.png b/site/content/entry/yuzu-progress-report-aug-2020/bordercolor.png new file mode 100644 index 000000000..d93ec914c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/bordercolor.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/concept.png b/site/content/entry/yuzu-progress-report-aug-2020/concept.png new file mode 100644 index 000000000..118aedaa0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/concept.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/controllerselect.mp4 b/site/content/entry/yuzu-progress-report-aug-2020/controllerselect.mp4 new file mode 100644 index 000000000..11169469d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/controllerselect.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/dark.png b/site/content/entry/yuzu-progress-report-aug-2020/dark.png new file mode 100644 index 000000000..84e6fbe5b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/dark.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/darkbug.png b/site/content/entry/yuzu-progress-report-aug-2020/darkbug.png new file mode 100644 index 000000000..a69629b68 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/darkbug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/darkfix.png b/site/content/entry/yuzu-progress-report-aug-2020/darkfix.png new file mode 100644 index 000000000..ac147ad4f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/darkfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/explaintext.png b/site/content/entry/yuzu-progress-report-aug-2020/explaintext.png new file mode 100644 index 000000000..33af6e64e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/explaintext.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/firstapplet.png b/site/content/entry/yuzu-progress-report-aug-2020/firstapplet.png new file mode 100644 index 000000000..a9dc7634a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/firstapplet.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/fma.png b/site/content/entry/yuzu-progress-report-aug-2020/fma.png new file mode 100644 index 000000000..c18ab2413 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/fma.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/index.md b/site/content/entry/yuzu-progress-report-aug-2020/index.md new file mode 100644 index 000000000..17ce0e8d3 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-aug-2020/index.md @@ -0,0 +1,208 @@ ++++ +date = "2020-08-30T12:00:00-03:00" +title = "Progress Report August 2020" +author = "flamboyant_ham" +coauthor = "GoldenX86" +forum = 302337 ++++ + +[Yahallo](https://www.youtube.com/watch?v=s28a3nVHCLo) yuz-ers! We hope you are doing well. This monthly report has a few critical topics to cover. Yet another major rewrite is done, some graphical bugs are fixed, the UI is further refined, and ghosts from our past are expelled. Here we go! + + + +## Project Mjölnir + +### Part 1 - Input Rewrite + +Let's start with the biggest change. One of yuzu's weakest aspects was its input support. It was riddled with bugs, not very intuitive, and lacked several critical features. Earlier this year, [jroweboy](https://github.com/jroweboy) and [Rei](https://github.com/Its-Rei) decided to start working on what would end up a complete rewrite of the input UI and its internal workings, dubbed `Project Aphrodite`. + +{{< imgs + "./oldinput.png| Never gonna give you up" + >}} + +As you can see in the following images, the original draft lacked some of the features we have working right now and some that we plan to add in the future. No code is ever complete, better ideas and new implementations can always be achieved. So that's exactly what happened, Rei continued to iterate on the concept design that is inspired by [RPCS3's](https://github.com/RPCS3/rpcs3) controller UI. + +{{< imgs + "./concept.png| The first draft, in all its glory" + >}} + +With this concept in mind, jroweboy implemented an automapping feature which correctly maps all the inputs upon selecting an input device. + +{{< imgs + "./automap.mp4| Finally, no more spending hours mapping controls!" + >}} + +Since jroweboy's departure from emulator development, [Morph](https://github.com/Morph1984) continued his legacy and picked up where he left off, not wanting to have all this work go to waste. With renewed hope, both Morph and Rei have taken the reins and are continuously refining the UI to achieve the best user experience possible. Their efforts have culminated in the UI we have today. + +{{< single-title-imgs + "The fruits of our labor, the triforce of themes is complete!" + "./light.png" + "./dark.png" + "./midnightblue.png" + >}} + +The user experience would not be complete unless a [long standing issue where updating controllers in the UI will not update them in game](https://github.com/yuzu-emu/yuzu/issues/2906) is fixed. Knowing this, Morph decided to find out what is causing this issue and fix it along with the UI changes. With some guidance from the shark [ogniK](https://github.com/ogniK5377), he discovered that 1. The frontend was not signalling to the backend when a controller changes configuration and 2. `StyleSetChangedEvents` were not being signalled on a controller change. By fixing these two issues, he managed to fix input issues in a wide array of games and allowed users to change their controller and input devices while in game without needing to restart yuzu. + +{{< imgs + "./controllerselect.mp4| Smash players rejoice!" + >}} + +The games that demonstrated the most benefit from these fixes are `Pokemon Let's Go: Pikachu` and `Pokemon Let's Go: Eevee`, as single joycons can now be properly detected in game, bringing us one step closer to hardware accuracy. + +{{< imgs + "./plgjoycon.png| Professor Oak! Input is now in working order!" + >}} + +### Part 2 - Controller Applet + +Morph began on [Part 2](https://github.com/yuzu-emu/yuzu/pull/4597) knowing that yuzu lacked an implementation of a Controller Applet, which is crucial for a lot of multiplayer games such as `Super Mario Maker 2`, `Kirby Star Allies`, `Hyrule Warriors: Definitive Edition` and many more. It had previously been [attempted](https://github.com/yuzu-emu/yuzu/pull/1940) by [DarkLordZach](https://github.com/DarkLordZach) but was riddled with issues due to the immature input implementation at the time. Therefore, Morph decided that it was time to implement it after gaining knowledge of and fixing HID in [Part 1](https://github.com/yuzu-emu/yuzu/pull/4530). + +While Morph was completing the backend implementation of the applet, Rei was designing the UI that was inspired by DarkLordZach's initial implementation, with an error box showing all the issues with the current controller configuration as shown. + +{{< imgs + "./firstapplet.png| The very first concept of the Controller Applet inspired by DarkLordZach's initial implementation" + >}} + +After taking a look at this first concept, they decided that it wasn't very intuitive for the user. One morning, as Morph was about to finish the backend implementation, [Rei](https://github.com/Its-Rei) had an epiphany to replicate the Switch's native UI for the `Controller Applet` and whipped up the concept design you see below: + +{{< imgs + "./secondapplet.png| The one that started it all" + >}} + +As you can see, this was much closer to the design we have now, but was lacking some features such as the number of supported controllers, LED pattern, border color, and explain text. +Wanting to get as close to the Switch's design as possible, Morph implemented these features one by one, and the frontend UI was adapted by Rei to include these features, bringing us to the final design we have now. + +{{< single-title-imgs + "" + "./supportedplayers.png" + "./ledpatterns.png" + >}} + +{{< single-title-imgs + "It's all coming together now" + "./bordercolor.png" + "./explaintext.png" + >}} + +As the design was now complete, Morph hooked up all of these features from the backend to the frontend and produced these clean and pretty results! + +Below are comparisons between the Nintendo Switch's and yuzu's Controller Applets: + +{{< single-title-imgs + "Mario Kart 8 Deluxe" + "./mariokart8deluxe-switch.png" + "./mariokart8deluxe-yuzu.png" + >}} + +{{< single-title-imgs + "Kirby Star Allies" + "./kirbystarallies-switch.png" + "./kirbystarallies-yuzu.png" + >}} + +{{< single-title-imgs + "Super Mario Maker 2" + "./smm2-switch.png" + "./smm2-yuzu.png" + >}} + +### There is still more to come! + +There is always room for improvement, keep your eyes peeled for future additions and features! + +As we cannot fit in all the changes present in both parts, our more tech savvy users can read about all the changes in the following PRs: [[Mjölnir Part 1]](https://github.com/yuzu-emu/yuzu/pull/4530), [[Mjölnir Part 2]](https://github.com/yuzu-emu/yuzu/pull/4597). + +## Bugfixes and improvements + +[Khronos](https://www.khronos.org/) recently added the new `VK_EXT_extended_dynamic_state` extension to the Vulkan API, and driver support is slowly being completed by the vendors. Per the norm with newly supported extensions, you can expect stuff to be in a *non-perfect* state, or as we like to say, "Expect Dragons." AMD recently added support for this extension in the 20.8.3 Windows driver, but part of it is glitched, resulting in graphical errors in games like `Super Mario Odyssey`. [Rodrigo](https://github.com/ReinUsesLisp) temporarily solved this by [blacklisting the extension on the AMD Windows drivers until it is fixed](https://github.com/yuzu-emu/yuzu/pull/4599). Intel doesn't support `VK_EXT_extended_dynamic_state` at the time of writing this, and Nvidia had already fixed their issues with the extension. + +{{< single-title-imgs + "Mario stared into the abyss, and the abyss stared back (Super Mario Odyssey)" + "./smobug.png" + "./smofix.png" + >}} + +Continuing with `VK_EXT_extended_dynamic_state`, a glitch affecting `Super Smash Bros. Ultimate`, and others, was discovered when using this new extension. Attack sprites were missing during gameplay, but [Rodrigo](https://github.com/ReinUsesLisp) was able to [solve the issue on all compatible drivers](https://github.com/yuzu-emu/yuzu/pull/4555). + +{{< single-title-imgs + "The Master Sword can't just look like a regular sword (Super Smash Bros. Ultimate)" + "./smashbug.mp4" + "./smashfix.mp4" + >}} + +Thumbnail pictures in in-game save slots were a black rectangle for most games up until now. By [fixing block linear copies](https://github.com/yuzu-emu/yuzu/pull/4453), [Rodrigo](https://github.com/ReinUsesLisp) prevented users from loading up the wrong save or course by mistake in games such as `The Legend of Zelda: Breath of the Wild` and `Super Mario Maker 2`. + +{{< single-title-imgs + "Ohh, this one was my good course! (Super Mario Maker 2)" + "./smm2bug.png" + "./smm2fix.png" + >}} + +## Precision has a cost + +Up until now, CPUs lacking the FMA instruction set had to run generic code as fallback. After a lot of work, [Merry](https://github.com/MerryMage) added [optimizations intended for CPUs lacking the `FMA instruction set`](https://github.com/yuzu-emu/yuzu/pull/4541). + +This means that users with CPUs from the AMD Phenom II series or older, Intel 3rd generation Core-i series or older, and all Pentium, Celeron and Atom CPUs can now select the "Unsafe" setting and see major performance improvements in almost all games. Don't bother to try this setting on CPUs that have FMA, as it will not improve your performance in that case. + +However, due to being a less precise alternative, expect emulation inaccuracies if you decide to enable it. Here be dragons, as they say. + +{{< imgs + "./fma.png| You can find it here" + >}} + +## UI Changes + +As part of the input rewrite, [Rei](https://github.com/Its-Rei) fixed several consistency bugs affecting the `Midnight Blue` UI theme. You can see the results below. + +{{< single-title-imgs + "Input window fixes, before (left) and after (right)" + "./input_before.png" + "./input_after.png" + >}} + +  + +{{< single-title-imgs + "Gamelist fixes, before (left) and after (right)" + "./main_before.png" + "./main_after.png" + >}} + +Both of our dark themes (Dark and Midnight Blue) had a transparency bug affecting the per-game settings pop-up window. [toastUnlimited](https://github.com/lat9nq) made the necessary changes to fix this by [setting QLabel background color to transparent](https://github.com/yuzu-emu/yuzu/pull/4420). You can see the changes below. + +{{< single-title-imgs + "Dark theme, before (left) and after (right)" + "./darkbug.png" + "./darkfix.png" + >}} + +  + +{{< single-title-imgs + "Midnight Blue theme, before (left) and after (right)" + "./midnightbug.png" + "./midnightfix.png" + >}} + +[toastUnlimited](https://github.com/lat9nq) also added an option to [access game specific settings while playing.](https://github.com/yuzu-emu/yuzu/pull/4515) This makes it easy to change graphics accuracy or other settings on the fly. + +{{< imgs + "./pergame.png| Found it!" + >}} + +`Force 30FPS` was an option that was used for debugging, and as an emergency brake for the old days when yuzu lacked a proper frame limiter. The fate of this tick-box was undecided for long, moving it to the `Debug` tab was considered at one point. But in the end, it was finally [removed by](https://github.com/yuzu-emu/yuzu/pull/4446) [Morph](https://github.com/Morph1984). This option was no longer functional after the changes of `Project Prometheus` took effect, so this was a necessary sacrifice. + +Our users reported that some checkboxes were duplicated after the addition of Vulkan. These were `Dump Decompressed NRO` and `Dump ExeFS` which could be found both in `General > Debug` and `System > Filesystem > Patch Manager`. [Tobi](https://github.com/FearlessTobi) put an end to this clone war, [removing the duplicates in Debug](https://github.com/yuzu-emu/yuzu/pull/4429). + +## Future Projects + +[epicboy](https://github.com/ameerj) is working on a universal, GPGPU (General-Purpose GPU) accelerated method to decode ASTC textures. We shall hear more of this after the Texture Cache rewrite is finished. + +Whispers of more audio changes have been heard, and a certain shark will be responsible for this. + +[Devs uh... find a way.](https://www.youtube.com/watch?v=D8zlUUrFK-M) + +That's all for now folks! See you again in the September progress report! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-aug-2020/input_after.png b/site/content/entry/yuzu-progress-report-aug-2020/input_after.png new file mode 100644 index 000000000..58e9d8ca2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/input_after.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/input_before.png b/site/content/entry/yuzu-progress-report-aug-2020/input_before.png new file mode 100644 index 000000000..c337782f3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/input_before.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/kirbystarallies-switch.png b/site/content/entry/yuzu-progress-report-aug-2020/kirbystarallies-switch.png new file mode 100644 index 000000000..dc123c2af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/kirbystarallies-switch.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/kirbystarallies-yuzu.png b/site/content/entry/yuzu-progress-report-aug-2020/kirbystarallies-yuzu.png new file mode 100644 index 000000000..0ffc1794e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/kirbystarallies-yuzu.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/ledpatterns.png b/site/content/entry/yuzu-progress-report-aug-2020/ledpatterns.png new file mode 100644 index 000000000..4303b1d29 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/ledpatterns.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/light.png b/site/content/entry/yuzu-progress-report-aug-2020/light.png new file mode 100644 index 000000000..751aaa643 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/light.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/main_after.png b/site/content/entry/yuzu-progress-report-aug-2020/main_after.png new file mode 100644 index 000000000..696a51de4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/main_after.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/main_before.png b/site/content/entry/yuzu-progress-report-aug-2020/main_before.png new file mode 100644 index 000000000..4dfabfdb4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/main_before.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/mariokart8deluxe-switch.png b/site/content/entry/yuzu-progress-report-aug-2020/mariokart8deluxe-switch.png new file mode 100644 index 000000000..65d6c982c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/mariokart8deluxe-switch.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/mariokart8deluxe-yuzu.png b/site/content/entry/yuzu-progress-report-aug-2020/mariokart8deluxe-yuzu.png new file mode 100644 index 000000000..1821c0f7e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/mariokart8deluxe-yuzu.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/midnightblue.png b/site/content/entry/yuzu-progress-report-aug-2020/midnightblue.png new file mode 100644 index 000000000..f2682939d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/midnightblue.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/midnightbug.png b/site/content/entry/yuzu-progress-report-aug-2020/midnightbug.png new file mode 100644 index 000000000..3919e5872 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/midnightbug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/midnightfix.png b/site/content/entry/yuzu-progress-report-aug-2020/midnightfix.png new file mode 100644 index 000000000..4f38af394 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/midnightfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/oldinput.png b/site/content/entry/yuzu-progress-report-aug-2020/oldinput.png new file mode 100644 index 000000000..e882cbe6c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/oldinput.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/pergame.png b/site/content/entry/yuzu-progress-report-aug-2020/pergame.png new file mode 100644 index 000000000..9238b661a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/pergame.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/plgjoycon.png b/site/content/entry/yuzu-progress-report-aug-2020/plgjoycon.png new file mode 100644 index 000000000..9c8243c7b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/plgjoycon.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/secondapplet.png b/site/content/entry/yuzu-progress-report-aug-2020/secondapplet.png new file mode 100644 index 000000000..121e9d0ee Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/secondapplet.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smashbug.mp4 b/site/content/entry/yuzu-progress-report-aug-2020/smashbug.mp4 new file mode 100644 index 000000000..985ee4d62 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smashbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smashfix.mp4 b/site/content/entry/yuzu-progress-report-aug-2020/smashfix.mp4 new file mode 100644 index 000000000..ca8905c3d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smashfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smm2-switch.png b/site/content/entry/yuzu-progress-report-aug-2020/smm2-switch.png new file mode 100644 index 000000000..4600df7fa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smm2-switch.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smm2-yuzu.png b/site/content/entry/yuzu-progress-report-aug-2020/smm2-yuzu.png new file mode 100644 index 000000000..0b084ff18 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smm2-yuzu.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smm2bug.png b/site/content/entry/yuzu-progress-report-aug-2020/smm2bug.png new file mode 100644 index 000000000..e323ec138 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smm2bug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smm2fix.png b/site/content/entry/yuzu-progress-report-aug-2020/smm2fix.png new file mode 100644 index 000000000..20cf3e579 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smm2fix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smobug.png b/site/content/entry/yuzu-progress-report-aug-2020/smobug.png new file mode 100644 index 000000000..0b30d5c53 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smobug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/smofix.png b/site/content/entry/yuzu-progress-report-aug-2020/smofix.png new file mode 100644 index 000000000..370d2ea6a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/smofix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/summary.png b/site/content/entry/yuzu-progress-report-aug-2020/summary.png new file mode 100644 index 000000000..b78cc8350 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2020/supportedplayers.png b/site/content/entry/yuzu-progress-report-aug-2020/supportedplayers.png new file mode 100644 index 000000000..504b58273 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2020/supportedplayers.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/art.png b/site/content/entry/yuzu-progress-report-aug-2021/art.png new file mode 100644 index 000000000..29636ea13 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/art.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/banner.png b/site/content/entry/yuzu-progress-report-aug-2021/banner.png new file mode 100644 index 000000000..3471a0180 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/boyfriend.png b/site/content/entry/yuzu-progress-report-aug-2021/boyfriend.png new file mode 100644 index 000000000..11160aa7c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/boyfriend.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/fethbug.mp4 b/site/content/entry/yuzu-progress-report-aug-2021/fethbug.mp4 new file mode 100644 index 000000000..da83347d2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/fethbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/fethfix.mp4 b/site/content/entry/yuzu-progress-report-aug-2021/fethfix.mp4 new file mode 100644 index 000000000..0382676a0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/fethfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/index.md b/site/content/entry/yuzu-progress-report-aug-2021/index.md new file mode 100644 index 000000000..f19a5bffb --- /dev/null +++ b/site/content/entry/yuzu-progress-report-aug-2021/index.md @@ -0,0 +1,356 @@ ++++ +date = "2021-09-12T12:00:00-03:00" +title = "Progress Report August 2021" +author = "Honghoa" +coauthor = "GoldenX86" +forum = 461810 ++++ + +Welcome, yuz-ers, to our monthly report of developer perseverance and other happenings! In this recap, we'll discuss Radeon fixes, Reaper v3, LAN support, smooth video rendering, and more! + + + +## **A**nother **T**errible **I**mplementation, and other graphical fixes + +This month was certainly a happy one for AMD users, as our developers managed to fix a number of graphical bugs present for those with AMD graphics cards. + +[epicboy](https://github.com/ameerj) pushed a [fix for the wireframe issue](https://github.com/yuzu-emu/yuzu/pull/6900) affecting various 3D models when playing +`Pokémon Sword and Shield` while using an AMD GPU on Windows. +Unfortunately, some games, like `Super Mario 3D World + Bowser's Fury`, have similar bugs which were not improved by this fix. +Also, do note that, in some rare cases and conditions, the issue can still occur. + +{{< single-title-imgs + "Best character (Pokémon Sword)" + "./wirebug.png" + "./wirefix.png" + >}} + +The cause of the problem boils down to the drivers of *a certain vendor* (AMD) not properly reading shader attributes near a `demote` or `discard` instruction. + +Among the many programs that run on the GPU to render graphics, fragment shaders are in charge of calculating the colour of every pixel written into the frame-buffer that will +be sent to your screen. In some cases, these shaders are used to perform subordinate calculations instead, such as derivatives. + +This is a problem, however, as fragments shaders are *always* expected to write into the frame-buffer. When used like this, the colour data of these shader instances remains +uninitialized, which is undefined behaviour that will most likely result in rainbow-puke graphics being sent to your screen. + +This is where the `demote` and `discard` instructions come in to the rescue. +They are used to mark these fragment shaders, so that the colour of every shader instance that is demoted is ignored, keeping the thread alive to perform calculations while the +frame-buffer remains untouched. + +Whenever the driver tried to read attributes (i.e. data such as positions, normals, etc.) in the proximity of these instructions, it would misread them, causing the infamous +graphical glitch. + +Thankfully, this was fixed by simply delaying the demotion of these fragments to the end of the shader program, which has a slight impact on their performance, albeit not one big +enough to be concerned. + +Next on epicboy's list, we have a [fix that solves the brightness of sRGB graphics](https://github.com/yuzu-emu/yuzu/pull/6941) when rendering from a secondary GPU, since they +looked much darker than they should. + +{{< single-title-imgs + "Free HDR! (Super Mario Odyssey)" + "./presentationbug.png" + "./presentationfix.png" + >}} + +This occurred when the rendering was performed by an AMD GPU, but the presentation of images from the [swap chain](https://en.wikipedia.org/wiki/Swap_chain) (the virtual buffers +used by the GPU to prevent tearing and stuttering when updating your screen) was done by an Intel or Nvidia GPU. +The swap chains that were being rendered on the AMD GPU, which contained images in `sRGB` format, were being read as `Linear` on the secondary GPU, causing them to +be presented with erroneous intensity levels. +This is because the scales used in these formats are incompatible, and their values do not automatically map to an equivalent value on their counterpart space, resulting in a +quality degradation of the image when using the wrong format. + +As a solution, the `Linear` colour space format is now preferred when presenting frames from the swap chain. +This alleviates the wrong interpretation of the frame's format, allowing all frames to display properly in the linear colour space. + +Another annoying Windows-only AMD GPU bug gone for good thanks to epicboy is [the horrible bright squares](https://github.com/yuzu-emu/yuzu/pull/6948) that would appear in the +shading of a number of titles: most notably, `Fire Emblem: Three Houses`. + +{{< single-title-imgs + "Not so psychedelic any more (Fire Emblem: Three Houses)" + "./fethbug.mp4" + "./fethfix.mp4" + >}} + +The cause of this problem lies at the hardware-level differences between the GPU of the Nintendo Switch, and that of AMD cards. + +In graphics programming, it's extremely common to perform the same operation over a considerable number of elements — such as vertices, pixels, etc. +GPUs were, thus, designed to operate over large amounts of data at the same time (i.e. in parallel), using instructions that exploit this principle, known as `SIMD` +([Single Instruction, Multiple Data](https://en.wikipedia.org/wiki/SIMD)). +This method of parallel computing, combined with multi-threading, is known as `SIMT` +([Single Instruction, Multiple Threads](https://en.wikipedia.org/wiki/Single_instruction,_multiple_threads)). + +In the case of the Tegra X1 (the GPU of the Nintendo Switch), these instructions operate on bundles of 32 threads (called `workgroups`), all of which run the same code — +although they do not necessarily operate on the same data. +The `SIMT` instructions in AMD cards post the [`GCN` architecture](https://en.wikipedia.org/wiki/Graphics_Core_Next), however, only work with workgroups of 64 threads. +This presented a challenge, as yuzu had to divide these workgroups of 64 threads and make them behave as two workgroups of 32 threads in order to properly emulate the guest GPU +on these devices. + +epicboy [addressed this problem](https://github.com/yuzu-emu/yuzu/pull/6948) and fixed these instructions, so that by using the thread's invocation ID, it's possible to tell +whether any thread is part of the "lower" or "upper" 32-thread group, effectively allowing AMD cards to emulate the behaviour of the Nintendo Switch GPU. + +[Blinkhawk](https://github.com/FernandoS27) has also contributed a number of fixes for bugs affecting AMD, starting with +[disabling a vulkan extension](https://github.com/yuzu-emu/yuzu/pull/6943) (`VK_EXT_SAMPLER_FILTER_MINMAX`) in their GPUs prior to `GCN4` (Polaris), which do not have the +necessary hardware to support the extension. +Notably, this fixed the psychedelic graphics in `The Legend of Zelda: Skyward Sword HD`, one that many of us will miss, for sure. + +{{< single-title-imgs + "This was originally a video, but it could have triggered epilepsy (The Legend of Zelda: Skyward Sword)" + "./sshdbug.png" + "./sshdfix.png" + >}} + +On a similar vein, [he increased the number of sets per pool on AMD](https://github.com/yuzu-emu/yuzu/pull/6944) (a feature used in Vulkan to manage the memory of resources), +fixing the random crashes that occurred when booting `Xenoblade Chronicles 2`. + +[K0bin](https://github.com/K0bin) is back again, fixing another major issue. +This time, yuzu was not following the official Vulkan specification correctly, leading to overlapping information for textures and buffers on Nvidia graphics cards. + +`bufferImageGranularity` specifies the size in bytes at which textures and buffers can be aligned. +AMD and Intel GPUs allow for pretty precise values of 1 or 64 bytes depending on the hardware, but Nvidia on the other hand is hard limited to a 1024 byte block. + +yuzu didn’t take this alignment into consideration, leading to data corruption primarily shown by `Super Mario Odyssey` with and without the GPU cache garbage collector enabled. +But the same issue could affect any game that handles small textures at any time, as any buffer could corrupt any texture, and any texture could corrupt any buffer. + +[Properly respecting this hardware set value](https://github.com/yuzu-emu/yuzu/pull/6834) fixes unheard instabilities when running games in Vulkan with an Nvidia GPU, and allows +Reaper, the GPU cache garbage collector, to work on all games. + +There was a bug that made Mario's moustache appear to be light-brown (instead of the classic dark shade we are used to seeing) when using an Intel GPU with the Vulkan API. +The problem was a simple one: yuzu was returning the wrong data type when querying the `gl_FrontFacing` attribute — an unsigned integer, instead of a 32-bit floating-point value. +The solution was equally simple: epicboy changed the code so that the [queried attribute returned with the correct data type](https://github.com/yuzu-emu/yuzu/pull/6928). + +{{< single-title-imgs + "Finally, that hair dye was on discount (Super Mario Odyssey)" + "./intelbug.png" + "./intelfix.png" + >}} + +[v1993](https://github.com/yuzu-emu/yuzu/pull/6887) has been using [PVS-Studio](https://pvs-studio.com/en/) to catch logic errors in the code with good success so far. For example, +[a small clean up in SPIR-V was possible thanks to this](https://github.com/yuzu-emu/yuzu/pull/6887). + +## LAN party time! + +Work on `Local Wireless` continues, but in the meantime, yuzu is proud to announce that `LAN` +[(Local Area Network)](https://github.com/yuzu-emu/yuzu/pull/6863) support has been added for all users! This is all thanks to work done by [spholz](https://github.com/spholz). + +This means that a small selection of games can now be played with a Switch or any other computer running yuzu while connected to the same network (be it wired ethernet, or via +WiFi). With a service like [ZeroTier](https://www.zerotier.com/) (hamachi has not worked so far) or by manually configuring a VPN +[(Virtual Private Network)](https://en.wikipedia.org/wiki/Virtual_private_network), this can be extended to global gameplay! + +**Games with LAN support so far are:** + +- `ARMS` +- `Bayonetta 2` +- `Duke Nukem 3D: 20th Anniversary World Tour` +- `Mario & Sonic at the Olympic Games Tokyo 2020` +- `Mario Golf: Super Rush` +- `Mario Kart 8 Deluxe` +- `Mario Tennis Aces` +- `Pokkén Tournament DX` +- `Pokémon Sword & Shield` (limited game functions by design) +- `Saints Row IV®: Re-Elected™` +- `SAINTS ROW®: THE THIRD™ - THE FULL PACKAGE` +- `Splatoon 2` (works with auto-stub enabled) +- `Titan Quest` + +At the moment, not all of the listed games work due to missing services or not having the best compatibility with yuzu, but gameplay proved stable in all working cases. + +{{< imgs + "./lan.png| It just works! (Mario Kart 8 Deluxe)" + >}} + +Keep in mind that some games require certain button combinations to switch between LAN and Local Wireless modes. +For example, `Mario Kart 8 Deluxe` requires the user to simultaneously hold L + R and depress the left analog stick (L3) in the main menu to be able to create or join a LAN room. + +[Morph](https://github.com/Morph1984) later followed with [network interface cleanups](https://github.com/yuzu-emu/yuzu/pull/6905). + +## Smooth and glitchless videos for the win + +Thanks to the [introduction of VA-API](https://github.com/yuzu-emu/yuzu/pull/6713) by [yzct12345](https://github.com/yzct12345) back in July, epicboy made it possible to +[use hardware video acceleration](https://github.com/yuzu-emu/yuzu/pull/6846) to decode videos with [FFmpeg](https://en.wikipedia.org/wiki/FFmpeg) for all other compatible GPU +and driver combinations. +Furthermore, yuzu will gracefully fall back to software decoding in case none of the combinations are supported. + +This considerably speeds up the decoding process, improving the performance of the emulator when playing videos. + +Currently, the following GPU decoders are implemented: + +| GPU | WINDOWS | LINUX | +| :------: | :------: | :------: | +|NVIDIA | NVDEC/D3D11VA | NVDEC/VDPAU | +|AMD | D3D11VA | VA-API/VDPAU | +|INTEL | D3D11VA | VA-API | + +Please note that, since the GPU used to decode videos isn't necessarily the same as the one used for rendering, NVDEC is preferred on Windows over D3D11VA, as the performance +experienced with the latter when it defaults to using the iGPU for decoding was lower. + +Next on the list, we have had reports of noisy artifacts appearing in the videos of some games. Notably, those that were encoded with the +[VP9 format](https://en.wikipedia.org/wiki/VP9). +epicboy [investigated the problem and solved it by stubbing `UnmapBuffer`](https://github.com/yuzu-emu/yuzu/pull/6799), a driver command that is, as you could guess, used to free +GPU memory held by a buffer. +But what was exactly the problem behind this? I'm afraid that this will get a tad bit technical, so bear with me for a while. +I promise it will not hurt... much. + +The VP9 codec defines, among other things, a number of frames in the video to be used as references, which are in turn employed to reconstruct the frames in-between these +`key-frames`. +That means that, to properly interpolate these "in-between" frames, one must rely on the information from both the `key-frames`, and previous `inter-frames`. +`key-frames`, on the other hand, are decoded completely on their own, without relying on any reference. +Decoding a frame like this is a slower process, but it guarantees that the frame will be as clean of errors as possible, which is why they can be used as references. + +As was previously mentioned, FFmpeg is used to decode videos. +In the case of the VP9 format, yuzu needs to send FFmpeg the raw bytes that will be decoded (i.e. the actual images that you see in the video), along with a header that contains +metadata, such as the dimensions of the frame, whether it is a `key-frame`, or, if it isn't, what frames are used as references when processing it, etc. + +The information that constitutes this header is mapped to a buffer in memory. +And now, here's where things turn a bit funny. +For some reason, the information in this buffer — namely, that part of the header that specified what `key-frames` should be used as reference, would change inconsistently among +`inter-frames`. +This led to a degradation of the quality of the video, as every interpolated frame would reference a different `key-frame`, leading to the creation of these infamous garbled noise +artifacts. + +By stubbing the `UnmapBuffer` command, the addresses of these reference frames now remain constant for as long as they are needed, allowing yuzu to pass to `FFmpeg` the correct +information and decode the videos without any problems. + +{{< single-title-imgs + "Both glitch free and smoother (The Legend of Zelda: Link's Awakening)" + "./vp9bug.mp4" + "./vp9fix.mp4" + >}} + +On a related note, epicboy fixed another VP9 problem: the first frame of the bitstream was missing its frame data, so he changed the logic to +[ensure the first frame is complete](https://github.com/yuzu-emu/yuzu/pull/6844), silencing a runtime error thrown by FFmpeg. + +As previously mentioned, yuzu reads the header information directly from the NVDEC registers contained in a buffer. +Unfortunately, one key flag that needs to be passed to FFmpeg, `is_hidden_frame`, was not actually held in this buffer. + +To circumvent this problem, our implementation also buffers the next frame, and then, based on another flag that holds the same information (`is_previous_frame_hidden`), informs FFmpeg +whether the previous frame should be displayed or not. +This means that yuzu would always decode one frame late, and since that was already the case, yuzu wasn't sending the header information for the very first frame, as it needs to +know the value of `is_hidden_frame` beforehand. + +What epicboy did was simply copy the first frame in the bitstream, so that essentially the first and second frame are the same, and thus, exploiting this fact, the header information can be passed +to FFmpeg so it stops complaining. + +Alas, the joys of software development are fleeting in this world. + +## General bugfixes + +You can’t predict how a bug will show up, sometimes they pop out like daisies. With the addition of Brazilian Portuguese as a language for the user interface, +`Paper Mario: The Origami King` started to run only in Japanese, ignoring any user setting. + +[Fixing the copy amount of `GetAvailableLanguageCodes`](https://github.com/yuzu-emu/yuzu/pull/6793) was enough to solve this issue. Thanks Morph! + +{{< imgs + "./papermario.png| True native gameplay (Paper Mario: The Origami King)" + >}} + +[sankasan](https://github.com/yuzu-emu/yuzu/pull/6795) gave `yuzu-cmd`, our command-line SDL2 alternative to the regular Qt yuzu, some additional love. +By correctly implementing `SDL_ShowCursor`, yuzu-cmd can now [properly hide the mouse cursor while in fullscreen](https://github.com/yuzu-emu/yuzu/pull/6795). Thank you! + +Also relating to `yuzu-cmd`, in the past, while button mapping and other settings were working correctly, the toggle to enable the controller was being completely ignored. +[Reading the `connected` value as a boolean](https://github.com/yuzu-emu/yuzu/pull/6816) was all it took to get past this misstep, thanks +[toastUnlimited](https://github.com/lat9nq)! + +toast also found an issue in the logic of how per-game profiles were handled: only the default user profile was ever selected. +[Some code changes, and now the currently selected user profile will be used](https://github.com/yuzu-emu/yuzu/pull/6805). + +[gidoly](https://github.com/gidoly) opened his first ever pull request, fixing a small but arguably very important description. + +`Use Fast GPU time`, one of the options in the Advanced Graphics tab, is a hack intended to improve compatibility with games that use dynamic resolution as a way to keep steady +performance on the Switch. + +By lying and informing the game/application that performance is always good, the emulator avoids unnecessary destruction and reconstruction of textures, saving both performance and VRAM. +As an added benefit, some games use this *totally-not-adulterated* information to constantly render at their highest supported resolution. + +For both these reasons we recommend users to keep this option always enabled, as no regressions have been found when using it, and the stability benefits on some particular titles +like `Luigi’s Mansion 3` are more than worth it. + +So, by calling a spade a spade, gidoly now informs us that `Use Fast GPU time` [is indeed a hack](https://github.com/yuzu-emu/yuzu/pull/6817). Al pan, pan, y al vino, vino. + +[Stubbing the `NGCT:U` service](https://github.com/yuzu-emu/yuzu/pull/6927) allows `Boyfriend Dungeon` to boot. Good catch by [german77](https://github.com/german77). + +{{< imgs + "./boyfriend.png| Boyfriend Dungeon" + >}} + +epicboy [flipped the positions of `Limit Speed Percent` and `Framerate Cap`](https://github.com/yuzu-emu/yuzu/pull/6839) in the configuration window. Tidying the user interface +never hurts. + +Are there any developers tired of having to wait over 3 minutes to compile each change done to the texture cache section of the code? Well, [yzct12345](https://github.com/yzct12345) +[split out the definitions](https://github.com/yuzu-emu/yuzu/pull/6820), reducing the build time to only 30 seconds. + +yzct12345 also found a [deadlock](https://en.wikipedia.org/wiki/Deadlock) in our `Single-Producer, Single Consumer queue`, +[and submitted a fix](https://github.com/yuzu-emu/yuzu/pull/6868) to address this problem. +The work to rewrite this queue and make it `Multi-Producer, Multi-Consumer` has also been started, so hopefully we might see a follow-up next month. +If you’re confused about these "[Producer-Consumer](https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem)" terms, just know that they basically describe how to tackle +the access to a resource in a multi-core system, so that the processes that write into (produce), and those that read from (consume), a shared resource, are properly synchronized — +in this case, the queue. + +This adventurous developer also [optimized the UnswizzleTexture function](https://github.com/yuzu-emu/yuzu/pull/6861), yielding a sweet speed gain. +Swizzling refers to a technique used to optimize how textures are stored in memory to minimize cache misses. +The opposite operation, thus, would be to take a swizzled texture and reorganize it so it makes sense to humans. + +Some time ago, toast detected a potential out-of-bounds access, which is a bug that occurs when the program accesses memory that is outside the range where it should be operating +at that given moment. +The code in question is also part of the function used to unswizzle textures. +epicboy noticed that the root of the problem laid in the calculation of the frame buffer size, used to limit where the code should operate, +[and fixed it in this PR](https://github.com/yuzu-emu/yuzu/pull/6879), effectively eliminating the bug. + +While inspecting yuzu manually and with the help of analysis tools, v1993 also found a number of small bugs in different parts of our codebase, such as a +[misplaced break statement](https://github.com/yuzu-emu/yuzu/pull/6884) in the kernel function `GetThreadContext()` — a human error that changed the logic of the algorithm, +preventing it from behaving as intended. +In a similar vein, he also corrected a [copy-paste error](https://github.com/yuzu-emu/yuzu/pull/6889) affecting the code of the software keyboard. + +v1993 also found another bug in the `GetSubmappedRange()` function, used to obtain the CPU memory segments from a GPU memory address. Blinkhawk +[went ahead and fixed it](https://github.com/yuzu-emu/yuzu/pull/6894). + +Another noteworthy change by Blinkhawk is that he [changed the logic of the Garbage Collector](https://github.com/yuzu-emu/yuzu/pull/6897) (Reaper), so that it uses a Least-Recently Used +(`LRU`) cache instead. + +Previously, the cache of the GC (Garbage Collector) would iterate over `n` textures every frame, checking whether they should be cleaned from memory or not. +It also used certain heuristics that would make the cleaning more aggressive towards certain kinds of textures, cleaning them without synchronizing with the host memory. + +The `LRU` scheme, however, orders the textures based on how recently they were used. +Once the memory is full, the GC starts iterating over the elements of the `LRU` cache, eliminating the textures that haven't been used in the longest time. +Additionally, the GC now prioritizes eliminating textures that do not need to synchronize with the host memory, and only considers other textures once these have been emptied +from the cache. +These changes make the new Garbage Collector more stable, so we can safely enable it by default for all users. + +Meanwhile, [BreadFish64](https://github.com/BreadFish64) found that yuzu spent considerable CPU time running `GetHostThreadID()` — a function of the kernel used to manage threads +— while profiling `Fire Emblem: Three Houses`, and [submitted a patch that optimized the generated code](https://github.com/yuzu-emu/yuzu/pull/6878), providing a small performance +boost. + +# Input improvements + +german77 implemented a few input changes this month. + +First of all, when mapping and moving an analog stick, the previous implementation used to only show a blue dot representing the relative position of the analog stick. +[A new green dot is now present](https://github.com/yuzu-emu/yuzu/pull/6815), representing the emulated position of the stick, considering range and dead zones values. +It's useful to know if the stick actually reaches the whole input range. + +{{< imgs + "./stick.mp4| Remember to test and set both Range and Deadzone" + >}} + +Next, the usual [update to SDL](https://github.com/yuzu-emu/yuzu/pull/6855), which always brings some goodies. In this case: + +- The ability to send effects to DualSense triggers (not implemented at the moment). +- Better sensor data rate for Switch and PlayStation controllers. +- Added support for the Amazon Luna controller. +- Added rumble support for the Google Stadia controller. +- Improved rumble for the Pro Controller. + +And finally, the Web Applet can cause the SDL process to die, [disabling an unnecessary feature](https://github.com/yuzu-emu/yuzu/pull/6862) solves the issue. + +## Future projects + +{{< imgs + "./art.png| 4K beach episode (Xenoblade Chronicles Definitive Edition)" + >}} + +Progress on `Project A.R.T.` is going well, most major problems have been addressed. Morph had several eureka moments with `Project Gaia`. And now other secret recipes are in the oven, +waiting their turn. + +That’s all folks! Thank you for your attention — happy playing, and see you next time! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-aug-2021/intelbug.png b/site/content/entry/yuzu-progress-report-aug-2021/intelbug.png new file mode 100644 index 000000000..74f71556a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/intelbug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/intelfix.png b/site/content/entry/yuzu-progress-report-aug-2021/intelfix.png new file mode 100644 index 000000000..1bc90d406 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/intelfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/lan.png b/site/content/entry/yuzu-progress-report-aug-2021/lan.png new file mode 100644 index 000000000..c24e2bf66 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/lan.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/papermario.png b/site/content/entry/yuzu-progress-report-aug-2021/papermario.png new file mode 100644 index 000000000..f0fecada5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/papermario.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/presentationbug.png b/site/content/entry/yuzu-progress-report-aug-2021/presentationbug.png new file mode 100644 index 000000000..851154162 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/presentationbug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/presentationfix.png b/site/content/entry/yuzu-progress-report-aug-2021/presentationfix.png new file mode 100644 index 000000000..82491364d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/presentationfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/sshdbug.png b/site/content/entry/yuzu-progress-report-aug-2021/sshdbug.png new file mode 100644 index 000000000..49aa355d4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/sshdbug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/sshdfix.png b/site/content/entry/yuzu-progress-report-aug-2021/sshdfix.png new file mode 100644 index 000000000..cf9d7b80a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/sshdfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/stick.mp4 b/site/content/entry/yuzu-progress-report-aug-2021/stick.mp4 new file mode 100644 index 000000000..7c81bbaae Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/stick.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/summary.png b/site/content/entry/yuzu-progress-report-aug-2021/summary.png new file mode 100644 index 000000000..a50924581 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/vp9bug.mp4 b/site/content/entry/yuzu-progress-report-aug-2021/vp9bug.mp4 new file mode 100644 index 000000000..1abf3e924 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/vp9bug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/vp9fix.mp4 b/site/content/entry/yuzu-progress-report-aug-2021/vp9fix.mp4 new file mode 100644 index 000000000..0bb34bfd7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/vp9fix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/wirebug.png b/site/content/entry/yuzu-progress-report-aug-2021/wirebug.png new file mode 100644 index 000000000..5c874f061 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/wirebug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2021/wirefix.png b/site/content/entry/yuzu-progress-report-aug-2021/wirefix.png new file mode 100644 index 000000000..5ed1bca69 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2021/wirefix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/128mb.png b/site/content/entry/yuzu-progress-report-aug-2022/128mb.png new file mode 100644 index 000000000..ff9983784 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/128mb.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/2048mb.png b/site/content/entry/yuzu-progress-report-aug-2022/2048mb.png new file mode 100644 index 000000000..1ddc4c220 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/2048mb.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/aboutbug.png b/site/content/entry/yuzu-progress-report-aug-2022/aboutbug.png new file mode 100644 index 000000000..9fa715a9c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/aboutbug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/aboutfix.png b/site/content/entry/yuzu-progress-report-aug-2022/aboutfix.png new file mode 100644 index 000000000..28e805fd2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/aboutfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/audio.png b/site/content/entry/yuzu-progress-report-aug-2022/audio.png new file mode 100644 index 000000000..d547ed590 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/audio.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/axiombug.png b/site/content/entry/yuzu-progress-report-aug-2022/axiombug.png new file mode 100644 index 000000000..4cfe149dd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/axiombug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/axiomfix.png b/site/content/entry/yuzu-progress-report-aug-2022/axiomfix.png new file mode 100644 index 000000000..4cc4cef31 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/axiomfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/bad1.png b/site/content/entry/yuzu-progress-report-aug-2022/bad1.png new file mode 100644 index 000000000..170994d1c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/bad1.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/bad2.png b/site/content/entry/yuzu-progress-report-aug-2022/bad2.png new file mode 100644 index 000000000..e3d94ad6d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/bad2.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/banner.png b/site/content/entry/yuzu-progress-report-aug-2022/banner.png new file mode 100644 index 000000000..84bfd2131 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/byte.png b/site/content/entry/yuzu-progress-report-aug-2022/byte.png new file mode 100644 index 000000000..60d517580 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/byte.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/celestebug.png b/site/content/entry/yuzu-progress-report-aug-2022/celestebug.png new file mode 100644 index 000000000..2ffade143 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/celestebug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/celestefix.png b/site/content/entry/yuzu-progress-report-aug-2022/celestefix.png new file mode 100644 index 000000000..d8b326f9a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/celestefix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/colour.png b/site/content/entry/yuzu-progress-report-aug-2022/colour.png new file mode 100644 index 000000000..abbece80c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/colour.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/cooking.png b/site/content/entry/yuzu-progress-report-aug-2022/cooking.png new file mode 100644 index 000000000..532754f55 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/cooking.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/digits.png b/site/content/entry/yuzu-progress-report-aug-2022/digits.png new file mode 100644 index 000000000..2f4a002e9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/digits.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/ears.png b/site/content/entry/yuzu-progress-report-aug-2022/ears.png new file mode 100644 index 000000000..9986cac75 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/ears.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/index.md b/site/content/entry/yuzu-progress-report-aug-2022/index.md new file mode 100644 index 000000000..17b83185f --- /dev/null +++ b/site/content/entry/yuzu-progress-report-aug-2022/index.md @@ -0,0 +1,336 @@ ++++ +date = "2022-09-16T10:00:00-03:00" +title = "Progress Report August 2022" +author = "GoldenX86" +forum = 628866 ++++ + +Welcome back, yuz-ers! August was a month packed with progress. A plethora of graphical changes, kernel and file system improvements, and more work pumped into network emulation. Next slide, please! + + + +## Graphical changes + +This month included a number of notable fixes for July's blockbuster release, `Xenoblade Chronicles 3`. +While `Xenoblade Chronicles 3` did technically work on release day in yuzu, it took us some time to work out the stability issues. + +The first of these, mentioned last month, was a fix for yuzu's shader recompiler. +yuzu does not use a GLSL compiler to generate SPIR-V, the Vulkan shader language. +Instead, it generates SPIR-V directly, which is much faster, but has more potential for error. +In this case, the shader recompiler failed to declare some variables in the SPIR-V shaders, and left references to them as null, causing the shaders to crash the driver when compiling. +[Maide](https://github.com/Kelebek1) and [byte[]](https://github.com/liamwhite) {{< gh-hovercard "8667" "quickly found and fixed the problem," >}} allowing the game to run in Vulkan on release day. + +{{< imgs + "./wotah.png| Wotah! (Xenoblade Chronicles 3)" + >}} + +The set of pipelines used by `Xenoblade Chronicles 3` is huge, with many pipeline caches clocking over 15000 entries after extended gameplay. +With all graphics backends, yuzu precompiles shaders before the game starts, and doesn't allow starting it before compilation is finished. +With OpenGL on GLSL, compilation takes over a full minute to complete with a pipeline cache as large as the ones generated by `Xenoblade Chronicles 3`. +To make matters worse, you previously could not cancel out of the process while it was compiling. +If you tried, yuzu would freeze up and continue to wait for the compilation to finish before allowing you to close the game. +byte[] resolved this minor UX annoyance {{< gh-hovercard "8678" "by having the shader compiler check for cancellation after each shader is compiled," >}} allowing compilation to instantly be stopped at any time. + +{{< imgs + "./muppet.png| Name's Kermit the Frog, pleased to meet you (Xenoblade Chronicles 3)" + >}} + +`Xenoblade Chronicles 3`'s massive set of pipelines also causes problems for emulation. +Because yuzu tries to give you as stutter-free an experience as it can, it tries to load all known pipelines into memory before you even start playing. +This might be a reasonable proposition if a game had just a few thousand pipelines. +However, keeping Xenoblade's 15000+ distinct pipelines all in memory simultaneously causes the memory usage in the GPU driver to skyrocket. +[Cemu](https://github.com/cemu-project/Cemu) users of old may remember facing a similar issue when using NVIDIA GPUs. + +To this end, byte[] looked for any issues in yuzu that might be causing the GPU driver to hold on to more memory than it needs to. +byte[] noticed that OpenGL tracks individual objects for shader source code in addition to just for compiled shaders. +Properly {{< gh-hovercard "8684" "allowing these shader source code objects to be freed" >}} reclaims a substantial amount of wasted memory. +Users can expect much lower VRAM and RAM usage now while running OpenGL and [suffering emotional damage](https://www.youtube.com/watch?v=i1ojUmdF42U). + +{{< imgs + "./ears.png| That's a big snuffin' difference (Xenoblade Chronicles 3)" + >}} + +One advantage yuzu's OpenGL backend has had for `Xenoblade Chronicles 3` for some time was stability. +It didn't really crash. However, Vulkan was another story. +Even after the initial Vulkan shader fixes previously mentioned, the game would still randomly crash during cutscenes. +byte[] was able to reliably reproduce the issue and found that yuzu was receiving some invalid references in the GPU processing. +Whether or not this was something the game was legitimately doing, or just an emulation bug, he identified that yuzu could avoid the crash by {{< gh-hovercard "8700" "passing `VK_NULL_HANDLE` for an image view," >}} instead of trying to create an image view for a null image, which was guaranteed to crash. + +{{< imgs + "./cooking.png| Vulkan no longer cooks itself (Xenoblade Chronicles 3)" + >}} + +AMD users on Windows were left in the dark about Vulkan support for `Xenoblade Chronicles 3` for a bit. +One of our testers, [your writer](https://community.citra-emu.org/u/GoldenX86), obtained a log with Vulkan validation errors, and determined that the crash was due to trying to use some vertex formats that were not supported by the Windows driver. +However, they were supported by `RADV`, the Linux Mesa driver. +byte[] additionally identified a case of the opposite, where a format was supported by the Windows driver but not RADV, and implemented a generic workaround that would {{< gh-hovercard "8702" "substitute a compatible format for both cases," >}} fixing multiple crashes at once. + +{{< imgs + "./stretching.png| Progressively getting fit (Xenoblade Chronicles 3)" + >}} + +A few GPU changes not related to Xenoblade also made it in this month. + +After years, since the beginning of our [Vulkan backend](https://yuzu-emu.org/entry/yuzu-vulkan/), yuzu finally added {{< gh-hovercard "8735" "support for VSync in Vulkan" >}} by new contributor [djrobx](https://github.com/djrobx). +As described by the pull request adding it, if the emulation and display are very close to precise sync, there can be fits of juddering when the newly generated frames don't decisively fall as next to be displayed. +This change allows yuzu to completely synchronize frames with the monitor refresh rate, preventing any juddering. +Thank you very much! + +{{< imgs + "./vsync.png| No more tearing, Vulkan edition" + >}} + +[Merry](https://github.com/merryhime), the author of [dynarmic](https://github.com/merryhime/dynarmic) (and a real life White Mage), implemented an {{< gh-hovercard "8739" "optimization for the process of converting between tiled and untiled images" >}} for the GPU. +This doesn't impact the performance of games very much, as they generally avoid converting between tiled and untiled images, but it significantly improves the performance of homebrew apps, which convert every frame to display to the console. + +On the topic of unusual techniques, [vonchenplus](https://github.com/vonchenplus) implemented support for a legacy OpenGL format called {{< gh-hovercard "8752" "rectangle textures." >}} + +{{< single-title-imgs-compare + "Legacy features seem to be popular with some game studios" + "./ractanglebug.png" + "./rectanglefix.png" +>}} + +As a side effect of this change, a {{< gh-hovercard "8837" "pipeline cache purge" >}} had to be issued by [Morph](https://github.com/Morph1984). + +You may be thinking, but aren't all textures rectangles? +That is true, but the thing making rectangle textures distinct is that they are indexed in shaders with coordinates from 0 to their width/height -- texel coordinates, instead of 0 to 1 -- normalized coordinates. +This mode is not very useful, so it is a surprise to see it still used by games. This change fixed a lot of rendering issues in `Fast RMX` and `The Touryst` (two games using the same engine). + +{{< single-title-imgs-compare + "No more vacations in the Abyss (The Touryst)" + "./tourystbug.png" + "./tourystfix.png" +>}} + +In the case of `Fast RMX`, disabling `DYNAMIC CAMERA EXPOSURE` in its in-game graphic settings fixes an overbright rendering bug. +Testing shows that OpenGL seems to be more stable for this title. + +{{< single-title-imgs + "F-Zero for Switch when, Nintendo? (FAST RMX)" + "./rmx.png" + "./settings.png" + >}} + +Also focusing on homebrew, vonchenplus implemented support for a few things needed to get the [RetroArch](https://www.retroarch.com/) homebrew working inside yuzu. +Yup, more "emulator in emulator" shenanigans. + +The first step is the `clkrst` service, used to control clock speeds on the console, {{< gh-hovercard "8794" "which was stubbed" >}} to allow RetroArch to boot. +Emulation of clock speed is not very meaningful for yuzu, so it’s not a loss. +The second is a specialty behaviour by `switch-mesa`, which uses a {{< gh-hovercard "8795" "different framebuffer crop" >}} and appears halfway down the screen without proper emulation. + +While preparing the `Project London` changes for release, [Tobi](https://github.com/FearlessTobi) found some issues with `Rocket League` that were preventing it from working properly. +byte[] found that it could boot in single core, but the game had terrible rendering in Vulkan. +To do this, byte[] added {{< gh-hovercard "8791" "support for the `R16G16B16X16` format" >}} used by the game, fixing the rendering issues. +Still, more work is needed to make this game playable on yuzu. + +{{< single-title-imgs-compare + "The better League (Rocket League)" + "./rocket.png" + "./rocketfix.png" +>}} + +Working on his Magnum Opus, byte[] also implemented a workaround for a {{< gh-hovercard "8074" "previous performance fix" >}} to `Super Mario Galaxy` and `Super Mario Sunshine`. +While the performance fix should have been regression-free, since it was a bug in the buffer cache, many games needed the *less* accurate behaviour from before the change. +`Mario + Rabbids Kingdom Battle`, `Splatoon 2`, and `Super Smash Bros. Ultimate` all had some extra flickering that was introduced after this pull request, so byte[] made the {{< gh-hovercard "8819" " feature, `pessimistic flushing`, optional," >}} and disabled by default, since most games were unaffected. + +{{< imgs + "./pessimistic.png| Feel free to test it, but expect a performance loss" + >}} + +Finally on the list for GPU changes this month, [german77](https://github.com/german77), along with [bylaws](https://github.com/bylaws) from the [Skyline emulator](https://github.com/skyline-emu/skyline), added {{< gh-hovercard "8809" "emulation for the viewport swizzling extensions" >}} used by some games. +These were supported by NVIDIA GPUs with an extension, but not AMD or Intel GPUs, and so a few games would appear to render upside down or flipped. +Games like `Street of Rage 4`, `Celeste`, `Axiom Verge`, and many others are now playable on AMD and Intel! + +{{< single-title-imgs-compare + "A new meaning for inverse climbing (Celeste)" + "./celestebug.png" + "./celestefix.png" +>}} + +{{< single-title-imgs-compare + "There should be a difficulty mode called upside-down (Axiom Verge)" + "./axiombug.png" + "./axiomfix.png" +>}} + +## CPU, kernel, and file system emulation + +We have some good news for users _still_ running out-of-support versions of Windows! +Thanks to [an investigation](https://github.com/merryhime/dynarmic/issues/701) done by [vladkosi](https://github.com/vladkosi), Merry was able to {{< gh-hovercard "8745" "implement the required changes in fastmem" >}} to support Windows versions older than Windows 10 version 1803 again. + +While this is great news for the Windows 7 gang, it does not change our position regarding operating system version support: only Linux, Windows 10 version 1803, and newer are _officially_ supported. +Time will tell what happens to compatibility with older Windows versions after future changes to Vulkan and memory management are implemented, but for now, they work for a while longer. + +But the good news doesn't end there. Here are some changes intended to help the modding community! + +In the past, inline comments added to `pchtxt` mods weren’t allowed, as we parsed the text in a way that made them incompatible. +Morph now {{< gh-hovercard "8755" "delimits the hexadecimal value string," >}} allowing modders to add comments. +For example: + +``` +Before: here to here + v v +12345678 12345678 // comment + ^ ^ +After: here to here +``` + +Our current file system emulation can be considered spaghetti code due to old guesses made when less information was available, and patchwork done by developers that are no longer contributing to the project. +There’s no way to sugar-coat it, this is the main reason Morph has been working so hard for over a year on `Project Gaia`, a full rewrite of the current virtual file system implementation. + +Meanwhile, some further patchwork can be done to reduce the headaches developers and modders currently endure. +For example, `Build IDs` are padded by a bunch of zeroes, and modders are more used to the short form without including the irrelevant zeroes at the beginning. +To remedy this, byte[] {{< gh-hovercard "8790" "parses the Build ID string using fmt" >}} to dynamically add the required zeroes when needed. + +Continuing to focus on improving RetroArch’s experience in yuzu, vonchenplus discovered that recursively calculating the size of the files when parsing the directories has a negative effect on performance, in this case perceived as “loading times” when booting a game with the emulator (inside an emulator). +{{< gh-hovercard "8804" "Simply ignoring this information" >}} is a good way to improve the user experience. +Note that this change doesn’t help in running native Switch games on yuzu, it only provides faster load times for RetroArch. + +## UI changes + +People have been asking for stronger audio volume in yuzu for a long time, and Maide delivers. +Now, if the user goes to `Emulation > Configure… > Audio`, they can {{< gh-hovercard "8756" "set the volume up to 200%," >}} really cranking it to 11! + +{{< imgs + "./audio.png| Don't wake up your neighbours" + >}} + +Something to keep in mind is that some games have their volume tuned up to the output they are using. +A game may be louder in handheld over docked, for example, so don’t stress your poor ears. + +Part of yuzu’s code is still based on [Citra](https://citra-emu.org/), even some sections that are no longer relevant, or have become outdated over the years. +Cleaning up code is a boring but necessary part of any project, more so for open source ones, and yuzu is no exception. +One feature that was very useful in the early days is loading ELF binaries. +Instead of dealing with XCI and NSP dumps, back in the early days, devs dumped and extracted the whole file structure of the game, and loaded the ELF binary directly, in a similar way to how on Windows the user opens a .exe file to load a program. + +Some years down the line and not only is this feature [tarnished out of grace](https://www.youtube.com/watch?v=6R3ouGNcACQ), but it also stopped working. +Since it’s not a priority at the moment, and it can lead to user confusion, byte[] {{< gh-hovercard "8701" "removed it from the File dropdown." >}} + +Asian Language Windows users noticed that the Size column in the game list and the Speed Percent setting displayed *very weird* characters. + +{{< single-title-imgs + "Alien numbers" + "./bad1.png" + "./bad2.png" + >}} + +Of course this isn’t acceptable, so [Docteh](https://github.com/Docteh) implemented the {{< gh-hovercard "8715" "necessary changes" >}} to workaround this issue in Windows. + +{{< imgs + "./digits.png| Much better" + >}} + +Adding to the list of Asian-language-only UI bugs, if a user started yuzu, for example, in Chinese and then switched to English, the Filter bar at the bottom and the game list columns at the top would remain untranslated, refusing to switch. +{{< gh-hovercard "8797" "Forcing Qt to retranslate" >}} these objects solves the issue, making Docteh happy. + +Docteh implemented {{< gh-hovercard "8741" "a couple more UI fixes" >}} as well, cleaning up the About dialog and making the default Port number in the Direct Connect UI ignore translations. + +{{< single-title-imgs-compare + "yuzu About dialog changes" + "./aboutbug.png" + "./aboutfix.png" +>}} + +Users complained that the Controller Profile drop down list's character limit was too short, inhibiting their creativity. +german77 stepped up and {{< gh-hovercard "8783" "increased the character limit." >}} + +## Input improvements + +UI navigation with a controller is a relatively recent addition to yuzu, so there is room for improvement. +For example, users reported that if the "Prompt for user on game boot" feature is enabled, controller inputs will be able to navigate the options and start the game, but it won’t be able to actually change the profile or cancel the boot process. +Newcomer [jonesyUK](https://github.com/jonesyUK) {{< gh-hovercard "8716" "solves both issues" >}} with a bit of Qt magic. +Thank you! + +Some users prefer to depend on [DS4Windows](https://github.com/Ryochan7/DS4Windows) instead of yuzu’s native support for game controllers. +While there is a good reason for that, it’s a simple way to have a single app handle XInput emulation, it can also lead to some interesting issues german77 discovered. +For example, current versions of DS4Windows can’t handle two subsequent vibration commands, producing (depending on the person you ask) an uncomfortable, constant vibration. +To solve this brrrrrracing issue, german77 {{< gh-hovercard "8722" "added a small delay" >}} so the app doesn’t skip the stop signal. + +On a more colourful topic, and with the intention of fixing a bug with `Mario Party Superstars`, german77 spent many hours cooking {{< gh-hovercard "8724" "how to properly emulate controller colours," >}} with a side dish of fixing battery level icons too! + +{{< imgs + "./colour.png| Art Attack!" + >}} + +Navigate to `Emulation > Configure… > Controls > Advanced` and go to town! + +And to close this section out, we have to own up to an oopsie on our side. +With the initial implementation of IR camera support, the output was saved to storage. Every single video frame as an individual image file… +This led to TONS of files being written to disk, making navigation with the file manager a pain, and eating a lot of free storage. Oops. +german77 acted quickly and {{< gh-hovercard "8805" "moved the output to a buffer." >}} + +If any user suffered from this and can’t remove the files, open the Command Prompt or Terminal, navigate to the Pictures folder, and run `del IMG_00*.jpg` to wipe them all out in a single blow. + +## Hardware section + +#### Intel ARC joins the fun + +We received information that early adopters of A380 Intel GPUs had issues running their games using Vulkan. +Since this hardware is not globally available yet, it’s not easy for our developers and testers to get their hands on it, so please [post issues in our GitHub](https://github.com/yuzu-emu/yuzu/issues) including [log files](https://yuzu-emu.org/help/reference/log-files/), or contact us on our [forums](https://community.citra-emu.org/c/yuzu-support/14) or our [Discord server](https://discord.gg/u77vRWY). +We’ll ask for more information, if needed, to find the reason for this. +Hurray for the early adopter woes. + +#### AMD, making use of OpenGL + +Users with AMD GPUs reported that specific points in `Xenoblade Chronicles 3` always resulted in vertex explosions. +A workaround for this is to run the game with OpenGL and a 2X resolution multiplier, get past the area, save, and swap to Vulkan. + +Why the oddly specific 2X resolution multiplier? For the same reason our performance chart last month had no results for `Xenoblade Chronicles 2` on this new OpenGL driver, it leads to a driver related crash. +2X works around this crash and AMD has been properly alerted to this issue. +No news from them so far, but since we got access into their Vanguard beta testing program, we’ll tell you as soon as the fix is out in a public driver. +The game is not that much slower under OpenGL now, but shader stuttering will always be significantly better under Vulkan. + +We recommend more emulator developers to [apply to Vanguard](https://www.amd.com/en/technologies/amd-vanguard-program), as the indirect approach of the built-in driver bug report tool is not ideal for the specific needs of console emulators. + +#### NVIDIA making us go compute ourselves + +We confirmed that at least a big part of the crashes affecting Maxwell and Pascal GPUs by the current 516.XX series of drivers is caused by some driver change in compute shaders, which resonates with our compute shader based ASTC texture decoder. +As a solution, and to avoid this problem in the future as it isn’t the first time an NVIDIA driver update broke it, we’re considering {{< gh-hovercard "8849" "switching to a multithreaded CPU decoder" >}} developed by Morph. + +The cause for the shadow flickering on KOEI games is still under investigation. + +## Future projects + +The delays in merging `Project Y.F.C.` don’t only affect Mainline users, they also impede progress in development. +In another example of Hell freezing over (no one expected AMD fixing OpenGL), NVIDIA of all people [open sourced some documentation](https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/3d/clb197.h) (partially of course, this is NVIDIA we’re talking about, they’re so closed source they don’t even get fresh air). This includes proper names for Maxwell 3D registers, completely new registers, and even previously unknown values. +Maide has been {{< gh-hovercard "8766" "checking, replacing, and cleaning a lot of code" >}} thanks to this new official information, but the merge for this change will have to wait. +No game fixes are expected out of this, but the clean-up and ease of understanding is very much worth it. + +An interesting experiment that will benefit all users in a few bandwidth-starved games like `The Legend of Zelda: Breath of the Wild`, `Xenoblade Chronicles 3`, and `SHIN MEGAMI TENSEI V`, among others, is increasing the size of Vulkan’s stream buffer size. +Testing shows a performance boost of 10-50% depending on the system, even without ReBAR support, which limits the buffer size to 256MB. +Having access to all available VRAM opens the possibility for even higher gains! + +{{< single-title-imgs-compare + "Look at the performance difference! (Xenoblade Chronicles 3)" + "./128mb.png" + "./2048mb.png" +>}} + +After too much nagging from your writer, byte[] implemented a {{< gh-hovercard "8861" "draft to easily test the feature with a slider," >}} but the final goal is to manage it dynamically, so don’t expect to see this feature as a UI option in an official release. + +Working on the finishing touches for `Project London`, Tobi has not been passive at all: + +- {{< gh-hovercard "8685" "Adding the ability to proxy socket packets," >}} which includes custom rooms with local network support, including LAN games, not only LDN. +- {{< gh-hovercard "8731" "Stubbing and adding some required data types." >}} +- {{< gh-hovercard "8822" "Improvements to the in-progress room feature." >}} + +{{< imgs + "./ldn.png| The most fun ever doing internal testing" + >}} + +Oh! How could we almost forget? `Project London`, LDN support, is _finally_ out now! More information in [the dedicated article](https://yuzu-emu.org/entry/ldn-is-here/) and [Multiplayer Guide](https://yuzu-emu.org/help/feature/multiplayer/). +We’ll recap the release in the next Progress Report. + +That’s all folks! Thank you so much for sticking with us, and I hope to see you all next time! + +Special thanks to Mysterious Writer B for your help on this article! + +{{< imgs + "./byte.png| The suspense bites me" + >}} + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-aug-2022/ldn.png b/site/content/entry/yuzu-progress-report-aug-2022/ldn.png new file mode 100644 index 000000000..facedbef0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/ldn.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/menu.png b/site/content/entry/yuzu-progress-report-aug-2022/menu.png new file mode 100644 index 000000000..a169fbe70 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/menu.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/muppet.png b/site/content/entry/yuzu-progress-report-aug-2022/muppet.png new file mode 100644 index 000000000..3b890adc2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/muppet.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/pessimistic.png b/site/content/entry/yuzu-progress-report-aug-2022/pessimistic.png new file mode 100644 index 000000000..797d23a1e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/pessimistic.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/ractanglebug.png b/site/content/entry/yuzu-progress-report-aug-2022/ractanglebug.png new file mode 100644 index 000000000..50cebbd4d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/ractanglebug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/rectanglefix.png b/site/content/entry/yuzu-progress-report-aug-2022/rectanglefix.png new file mode 100644 index 000000000..c3db2c09f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/rectanglefix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/rmx.png b/site/content/entry/yuzu-progress-report-aug-2022/rmx.png new file mode 100644 index 000000000..15a75dba1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/rmx.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/rocket.png b/site/content/entry/yuzu-progress-report-aug-2022/rocket.png new file mode 100644 index 000000000..c0b342430 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/rocket.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/rocketfix.png b/site/content/entry/yuzu-progress-report-aug-2022/rocketfix.png new file mode 100644 index 000000000..dd067461a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/rocketfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/settings.png b/site/content/entry/yuzu-progress-report-aug-2022/settings.png new file mode 100644 index 000000000..2fb6f7ea3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/settings.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/stretching.png b/site/content/entry/yuzu-progress-report-aug-2022/stretching.png new file mode 100644 index 000000000..a624b987c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/stretching.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/summary.png b/site/content/entry/yuzu-progress-report-aug-2022/summary.png new file mode 100644 index 000000000..2dea65154 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/tourystbug.png b/site/content/entry/yuzu-progress-report-aug-2022/tourystbug.png new file mode 100644 index 000000000..29c7ba05a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/tourystbug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/tourystfix.png b/site/content/entry/yuzu-progress-report-aug-2022/tourystfix.png new file mode 100644 index 000000000..51b03441d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/tourystfix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/vsync.png b/site/content/entry/yuzu-progress-report-aug-2022/vsync.png new file mode 100644 index 000000000..629b5465a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/vsync.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2022/wotah.png b/site/content/entry/yuzu-progress-report-aug-2022/wotah.png new file mode 100644 index 000000000..61e4b2f68 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2022/wotah.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/ai.png b/site/content/entry/yuzu-progress-report-aug-2023/ai.png new file mode 100644 index 000000000..2b937649c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/ai.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/arc1.png b/site/content/entry/yuzu-progress-report-aug-2023/arc1.png new file mode 100644 index 000000000..658c85db5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/arc1.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/arc2.png b/site/content/entry/yuzu-progress-report-aug-2023/arc2.png new file mode 100644 index 000000000..aeabecd4a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/arc2.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/arc3.png b/site/content/entry/yuzu-progress-report-aug-2023/arc3.png new file mode 100644 index 000000000..d0f28e5a8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/arc3.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/arc4.png b/site/content/entry/yuzu-progress-report-aug-2023/arc4.png new file mode 100644 index 000000000..26314a741 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/arc4.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/arc5.png b/site/content/entry/yuzu-progress-report-aug-2023/arc5.png new file mode 100644 index 000000000..65279d901 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/arc5.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/astc.png b/site/content/entry/yuzu-progress-report-aug-2023/astc.png new file mode 100644 index 000000000..b9c5cadcc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/astc.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/banner.png b/site/content/entry/yuzu-progress-report-aug-2023/banner.png new file mode 100644 index 000000000..6229c787c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bayo1.png b/site/content/entry/yuzu-progress-report-aug-2023/bayo1.png new file mode 100644 index 000000000..96439bbc7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bayo1.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bayo2.png b/site/content/entry/yuzu-progress-report-aug-2023/bayo2.png new file mode 100644 index 000000000..7dd8c7776 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bayo2.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bayo3.png b/site/content/entry/yuzu-progress-report-aug-2023/bayo3.png new file mode 100644 index 000000000..870af717d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bayo3.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bayobug.png b/site/content/entry/yuzu-progress-report-aug-2023/bayobug.png new file mode 100644 index 000000000..f23a8d919 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bayobug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bayofix.png b/site/content/entry/yuzu-progress-report-aug-2023/bayofix.png new file mode 100644 index 000000000..a1e3c6a48 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bayofix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bike1.png b/site/content/entry/yuzu-progress-report-aug-2023/bike1.png new file mode 100644 index 000000000..8e65bcb04 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bike1.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bike2.png b/site/content/entry/yuzu-progress-report-aug-2023/bike2.png new file mode 100644 index 000000000..5a7e02b08 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bike2.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/bike3.png b/site/content/entry/yuzu-progress-report-aug-2023/bike3.png new file mode 100644 index 000000000..31d7368de Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/bike3.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/civ.png b/site/content/entry/yuzu-progress-report-aug-2023/civ.png new file mode 100644 index 000000000..5ed918f20 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/civ.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/close.gif b/site/content/entry/yuzu-progress-report-aug-2023/close.gif new file mode 100644 index 000000000..377e67e34 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/close.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/console.png b/site/content/entry/yuzu-progress-report-aug-2023/console.png new file mode 100644 index 000000000..36b6bc775 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/console.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/d24bug.png b/site/content/entry/yuzu-progress-report-aug-2023/d24bug.png new file mode 100644 index 000000000..95b14e1b9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/d24bug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/d24fix.png b/site/content/entry/yuzu-progress-report-aug-2023/d24fix.png new file mode 100644 index 000000000..0b17d1234 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/d24fix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/dai.gif b/site/content/entry/yuzu-progress-report-aug-2023/dai.gif new file mode 100644 index 000000000..9264d0405 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/dai.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/grey.png b/site/content/entry/yuzu-progress-report-aug-2023/grey.png new file mode 100644 index 000000000..03fb35337 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/grey.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/grid.png b/site/content/entry/yuzu-progress-report-aug-2023/grid.png new file mode 100644 index 000000000..8c4d7763c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/grid.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/gunvolt.png b/site/content/entry/yuzu-progress-report-aug-2023/gunvolt.png new file mode 100644 index 000000000..944e18f2a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/gunvolt.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/icon.gif b/site/content/entry/yuzu-progress-report-aug-2023/icon.gif new file mode 100644 index 000000000..dc5bf318b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/icon.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/index.md b/site/content/entry/yuzu-progress-report-aug-2023/index.md new file mode 100644 index 000000000..88f73ef4d --- /dev/null +++ b/site/content/entry/yuzu-progress-report-aug-2023/index.md @@ -0,0 +1,541 @@ ++++ +date = "2023-09-13T12:00:00-03:00" +title = "Progress Report August 2023" +author = "GoldenX86" +coauthor = "CaptV0rt3x" +forum = 896040 ++++ + +[Tuturu~](https://www.youtube.com/watch?v=HkGNeN0LGOE) yuz-ers. Did you feel that the last report was too short? Well, August was at full throttle! This month offers important graphical fixes, developers working around GPU limitations, several long overdue file system fixes, Skyline framework support, some Android and Apple love, and more! + + + +## yuzu Fried Chicken Forever + +And Robin. + +This is {{< gh-hovercard "11225" "the final piece" >}} of `Project Y.F.C.`, the `Query Cache Rewrite`, and the implementation of `Host Conditional Rendering`. But before we start, we must explain a few things. + +### Why do we need a query cache? + +Many GPUs expose _counters_, which are used to gather data from the various commands that GPU executes — things like how many pixels were drawn or how many triangles were generated. +Games use _queries_ to fetch and load these counters into memory whenever they need to use them. + +yuzu's query cache is responsible for tracking the values of GPU counters for Switch games and services query requests from the game. + +### What is it used for? + +Some games can make use of this fetched data to further optimise their rendering. For example, `SUPER MARIO ODYSSEY` optimises the amount of triangles it renders using a commonly used technique called _occlusion culling_. + +Occlusion culling is a feature that disables rendering of objects when they are not currently seen by the camera because they are offscreen or obscured (occluded) by other objects. + +In `SUPER MARIO ODYSSEY`, the game first renders simple boundary boxes that cover all objects that will be rendered on the screen. +It then queries the number of pixels rendered to each box, and only renders the real objects whose corresponding boxes had any pixels rendered. + +Similarly, `Splatoon` games use pixel counts to check whose ink a given character is touching. +The game tests for both ally ink and enemy ink and if both tests fail, then the character is not standing in any ink. + +{{< imgs + "./ink.png| Medium-well (Splatoon 2)" + >}} + +### Development & Challenges + +yuzu already had a query cache which was developed many years ago. +However, this implementation was not perfect and had many issues. To name just a few: +- It could not hold any queries except pixel counts +- It failed to write to memory in the correct order +- It didn't invalidate queries that were later overwritten by other query types + +Our resident GPU dev, [Blinkhawk](https://github.com/FernandoS27), set out to rework the query cache to fix these issues and modernise the code. +But, as he would later come to figure out, it wasn't going to be easy. + +Recall that the query cache works by running queries on the host GPU. +As it turns out, figuring out how to make it work on the host GPU was actually the hardest part of the entire rewrite, due to significant differences between what the Switch GPU does and what host graphics APIs like Vulkan expose. + +During development, Blinkhawk ran into two big challenges with Host GPU queries. +First, for performance reasons, we can't submit commands to the host GPU immediately upon processing them. We need to batch them in order to get any reasonable level of speed. This leads to the question: when do we need to perform the queries and sync the memory? + +As soon as you start a game, the game begins making queries to get GPU counters. +Normally, the results are obtained by the Switch's GPU immediately after counting is done — when the rendering is done. +But games like `SUPER MARIO ODYSSEY`, which use occlusion culling, make a _lot_ of queries. + +So, if we tried to run all those queries and write the results on the host (user's) GPU in the same way, it would stall the GPU heavily after drawing each scene element to write back the counters. + +To prevent this from happening, Blinkhawk synchronises memory whenever the game requests the GPU to wait for commands to finish rendering. This allows for efficient batching, and for GPU commands which occur after the wait to utilize the counter values. + +{{< imgs + "./occ.png| Turn the camera around and the whole city magically disappears (SUPER MARIO ODYSSEY)" + >}} + +Second, in the guest (Switch's) GPU, counters can be reset at any time or not at all. +But this behaviour is not exposed in graphics APIs such as OpenGL and Vulkan. +Instead, these APIs have queries that only count a smaller section such as a single draw or multiple draws. +This meant that we would need to take all the query results and sum them up, especially if the game never resets the counter. + +In the old query cache, we used to sum all of the query results on a single GPU thread, which couldn't keep up with heavy workloads. +As the number of query results increased, so did the time it took to sum them. +This was fine for around 50 or 80 queries, but some games can easily make thousands of queries within a single frame. + +Blinkhawk experimented with a few different algorithms before finally settling on an implementation based on the [Hillis Steele Scan Algorithm](https://en.wikipedia.org/wiki/Prefix_sum). + +The result? Well, let the following list speak for itself: + +- The lantern in `Luigi’s Mansion 3` is fixed. + +{{< imgs + "./qcr1.png| No flashbangs (Luigi’s Mansion 3)" + >}} + +- The level of detail in `Pokémon Scarlet & Violet` is fixed when using High GPU accuracy. No more tree flickering. +- Rendering in some Koei Tecmo games like `Marvel Ultimate Alliance 3: The Black Order` is fixed when using High GPU accuracy. +- Glow particles in `Xenoblade Chronicles 2 & 3` are fixed when using High GPU accuracy and disabling Asynchronous shader building. + +{{< imgs + "./xc3.mp4| Properly filling the Flame Clock (Xenoblade Chronicles 3)" + >}} + +- Shadows in `Metroid Prime Remastered` are fixed. + +{{< imgs + "./qcr2.png| Not that Dark Samus (Metroid Prime Remastered)" + >}} + +- Performance increased for low-end and/or power-limited hardware in games that make use of Host Conditional Rendering, like `Pokémon Scarlet & Violet`, `Luigi’s Mansion 3`, `SUPER MARIO ODYSSEY`, most Koei Tecmo titles, and many others. +- And more! + +## More GPU changes + +GPU changes don’t end there; there’s still quite a bit to cover. + +Let’s begin with a surprise port: `Red Dead Redemption` arrived on Switch and other consoles this month, and with it came a new take on the proprietary RAGE engine, giving our devs some quirks to iron out. +You know, the usual with new releases. + +The Dynamic GPU Duo (Blinkhawk and [Maide](https://github.com/Kelebek1)) analysed the game and concluded that the reason for the initial broken rendering was caused by the lack of support on Vulkan for masked [depth stencil](https://en.wikipedia.org/wiki/Stencil_buffer) clears. + +A depth stencil, or combined depth and stencil buffer, is a type of image that combines a depth buffer and stencil buffer into a single image in memory, speeding up the GPU's tests to determine if any given pixel will be drawn. + +To elaborate a bit further: + +- The depth buffer stores the distance between the camera and pixel currently closest to it, allowing the GPU to determine which pixels will be covered up by other objects and therefore shouldn't be drawn. +- The stencil buffer is more specialised: it stores a single byte for each pixel, which developers generally use to tag certain types of objects. As an example, the ground may be assigned a value of 1, trees and foliage 2, the player 17, and so on. It’s useful to know which pixels belong to which objects for applying various effects. [Here](https://youtu.be/By7qcgaqGI4?t=1390) is a great video showing an example of how stencil buffers are used in `The Legend of Zelda: Breath of the Wild`. The material mask buffer mentioned in this video is a stencil buffer, and is used to prevent effects from applying to undesired materials. + +The main use for these buffers is to correctly render scenes with shadows, reflections, and transparency. As the video example shows, many types of graphical effects are made much easier by tagging each pixel, since this allows the GPU to conditionally apply an effect based on the pixel's material type. + +So why were clear operations a problem on Vulkan? +In graphics programming, clears are used to reset all of a buffer's data to a specified value. +Graphics APIs such as the Switch’s NVN and OpenGL support applying a [mask](https://registry.khronos.org/OpenGL-Refpages/es2.0/xhtml/glStencilMask.xml) to clear operations. +The mask changes which bits of the image will be affected when the clear is applied: bit positions set to 1 are affected by the clear, and bit positions set to 0 are left alone. +For example, if the game needs the upper 4 bits of the 8-bit stencil for a subsequent draw, then it may set the mask to binary `00001111`, and clear the stencil with a value of 0. +This will cause only the lower 4 bits to be cleared, and the upper 4 bits are left alone, as desired. + +OpenGL supports masks on all clear operations, including colour, depth, and stencil buffers. +However, Vulkan was designed to support mobile GPUs, and on mobile GPUs, the most efficient implementation may be to entirely discard the old buffer when clearing it. +This avoids reading the buffer back from memory, which can be expensive. +So Vulkan does not have a direct equivalent of masked clears, and requires clearing the entire "aspect" of an image (colour, depth, or stencil) at once. + +`Red Dead Redemption` was using a masked clear on its stencil buffer. This is why the bug was only affecting grass and bushes: the game was trying to keep those values intact with the mask. +But since we translated clears directly from the game to Vulkan clears, we were just wiping out the entire stencil buffer, breaking the bush and grass rendering in the process. + +The solution we came up with for Vulkan is similar to a trick [we previously used for Persona 5 Royal](https://github.com/yuzu-emu/yuzu/pull/9631): use a regular draw, rather than a clear. +With a regular draw, we are able to use the built-in hardware support for applying a stencil mask, and produce the same result as OpenGL. + + +The new system in place works by drawing a fullscreen triangle, which allows the regular stencil hardware to handle masking and buffer writing. Thanks to this, {{< gh-hovercard "11320" "rendering issues in grass and bushes in Red Dead Redemption are now solved." >}} +Howdy! You get correct rendering directly to your face, like it or not. + +{{< single-title-imgs + "You have some tequilas, then Juan decides he is an adventurer (Red Dead Redemption)" + "./rdr.png" + "./juan.png" + >}} + +Blinkhawk and Maide also spotted an old regression in how indirect compute dispatch is emulated. +For the uninitiated, indirect dispatch is a technique used to allow the GPU to get the amount of work it needs to perform from a result generated by another compute shader or GPU operation, instead of being passed by the CPU at the moment of recording. Avoiding the slower CPU path by letting the GPU work indepedently like this improves performance. +Such an independent and strong Tegra X1 GPU. Look at it grow. + +Thanks to this {{< gh-hovercard "11383" "late intervention," >}} `Mario + Rabbids Kingdom Battle`, `Mario + Rabbids Sparks of Hope`, and `Sea of Solitude` now render much better: shadows in the Rabbids series have the proper level of shade, and environments in Sea of Solitude are now visible. + +{{< single-title-imgs + "This one took a while, eh (Mario + Rabbids Kingdom Battle & Sea of Solitude)" + "./mr.png" + "./sos.png" + >}} + +The water in Sea of Solitude requires emulating other very tricky aspects of the Tegra X1, so that’s homework for later. + +As Maide also has learnt by now, `Accelerated DMA` fast path is an eccentric lady. +She’s responsible for uploading and downloading image data directly from the GPU, converting image data on the CPU and system memory. +But, it can only work when just the right conditions are met. +If you don’t tread carefully enough near her, you will get the wrong data, in the wrong place, at the wrong moment. +Such was the fortune of `Sid Meier's Civilization VI`, a game that crashed on Vulkan, and rendered completely broken on OpenGL. + +The culprit? Not marking a destination buffer and/or image as modified, causing any future read to not trigger the corresponding download. This resulted in the game reading the wrong data. +{{< gh-hovercard "11278" "This quirk of the fast path has now been solved," >}} and a CPU fallback path for cases when an address isn’t valid for a given image format has been added. Strategy fans can now nuke each other to their heart's content. +Gandhi says peace was never an option. + +{{< imgs + "./civ.png| Just one more turn (Sid Meier's Civilization VI)" + >}} + +For our *cultured* players out there, Blinkhawk and [byte[]](https://github.com/liamwhite) bring us much-awaited fixes for `Bayonetta 3`. +They involve emulating how the Switch’s GPU drivers emulate a feature the hardware doesn’t support. Yep. + +This story revolves around `textureGrad`, an OpenGL function that does texture lookups over multiple mipmap levels based on the supplied angle, and returns a single texel. + +Well, the Maxwell-based GPU on the Tegra X1 of the Switch can’t do this natively for 3D textures, so it uses the SAM and RAM instructions to enter into and leave a special mode, which we don't know much about — but we do know it is used for calculating the derivatives for the texture fetch. + +By looking for this {{< gh-hovercard "11316" "instruction pattern," >}} Blinkhawk implemented preliminary support for the fog and clouds in `Bayonetta 3`. +byte[] later {{< gh-hovercard "11430" "fixed the implementation" >}} to make it behave the way Blink initially intended, and to avoid crashes on Mesa and RDNA3-based GPUs (AMD Radeon RX 7000 series). + +{{< single-title-imgs-compare + "Mystic Mist (Bayonetta 3)" + "./bayobug.png" + "./bayofix.png" +>}} + +Not intending to stop there, Blinkhawk also improved the {{< gh-hovercard "11389" "logic for discarding unnecessary writes" >}} in the buffer cache, and improved how the {{< gh-hovercard "11393" "size of the index buffer" >}} (where indices of vertices to form meshes is stored) is estimated. +The result? A 69% or higher performance boost in `Bayonetta 3`, depending on the system specs. Nice. + +{{< single-title-imgs + "Ara, ara (Bayonetta 3)" + "./bayo1.png" + "./bayo2.png" + "./bayo3.png" + >}} + +byte[] discovered that yuzu’s implementation of nvnflinger, the service responsible for presenting to screen, was missing a scale mode option, {{< gh-hovercard "11281" "preserve aspect ratio." >}} +Implementing it solves the rendering of `Gunvolt Chronicles Luminous Avenger iX` in its base version. + +{{< imgs + "./gunvolt.png| Hell yeah, sprites! (Gunvolt Chronicles Luminous Avenger iX)" + >}} + +A user reported an unknown change from a long time ago was causing `AI: THE SOMNIUM FILES` to constantly crash. +byte[] found the culprit was hiding in how mappings were being aligned during allocation but not deallocation, a bug originally discovered by ex-Skyline emulator developer [bylaws](https://github.com/skyline-emu/skyline/commits?author=bylaws). +{{< gh-hovercard "11375" "Regression solved, game stable, case closed." >}} + +{{< imgs + "./ai.png| Elementary, my dear user (AI: THE SOMNIUM FILES)" + >}} + +And finally, to close this section with what is more of a build process change than a graphics code change, [vonchenplus](https://github.com/vonchenplus) added {{< gh-hovercard "11302" "MoltenVK as an external dependency" >}} to yuzu’s CMake settings, allowing Apple users to automatically get the latest version of this translation library when building yuzu on their Vulkan-starved machines. (AGXV, anyone?) + +{{< imgs + "./m1.png| Let’s begin with simple stuff (DRAGON QUEST III The Seeds of Salvation)" + >}} + +Properly keeping up with MoltenVK updates allows macOS builds to run some basic games, but there’s still much to do to get the forbidden fruit company's devices up to speed. + +## OpenGL-specific improvements, which also improve Vulkan + +That’s right, Mesa and NVIDIA Fermi/Kepler users, it’s your turn to get some love. +[Epicboy](https://github.com/ameerj) is back with some great changes for the ~~old~~ classic API that started it all, OpenGL. + +First on the list is a major overhaul for GPU ASTC decoding, for both OpenGL and Vulkan APIs. +{{< gh-hovercard "11149" "Code optimizations" >}} in several areas of the compute shader-based decoder improved Vulkan ASTC decoding performance by up to 60%, but it made OpenGL on NVIDIA *15 times* faster, making it now slightly faster than Vulkan at decoding ASTC textures. + +{{< imgs + "./astc.png| Subtle jump" + >}} + +GPUs which were left behind on Vulkan support can now enjoy much smoother performance in titles like `The Legend of Zelda: Tears of the Kingdom`, `Bayonetta 3`, `Luigi’s Mansion 3`, etc. + +To get the most out of this change, the `ASTC recompression` method must be set to `Uncompressed`, and `Enable asynchronous presentation` should be enabled if you’re using Vulkan. +Both options can be found in `Emulation > Configure… > Graphics > Advanced`. + +[toastUnlimited](https://github.com/lat9nq) later {{< gh-hovercard "11216" "blocked Mesa’s native ASTC decoder," >}} as it is now considerably slower than our implementation. + +And lastly, Epicboy solved what was a very common issue for `Pokémon Legends: Arceus` players before we made Vulkan the default API. +Sit down, kids, it’s story time. + +In the not-so-far-away good old days, yuzu was only experimenting with an incomplete and immature Vulkan backend, there was no LDN/LAN support, and an Android release was considered to be a fever dream. +Back then we used the OpenGL API by default, and out of its three options for shader backends, GLASM was the shader backend of choice, since it didn’t affect incompatible drivers — it’s an NVIDIA-only "feature" and any other driver would automatically revert to the vendor-agnostic GLSL. +This provided NVIDIA users the best experience at the time, with the lowest shader build times available, until Vulkan improved enough to be the full replacement it is today. + +A very common report during these migration days was that character shading in `Pokémon Legends: Arceus` was wrong — it either introduced weird motes to characters, or they looked completely devoid of any form of lighting. +This problem was quickly found to be rooted in GLASM. + +Since GLASM was, and continues to be, almost impossible to work on due to its complete lack of tools to debug and assist development, no developer wanted to touch it after Rodrigo introduced it. As he later left for greener pastures, this has resulted in our GLASM shader backend becoming entirely unmaintained. + +Well, enter 2023, and Epicboy rolled up his sleeves and got to work. He discovered that the issue was in {{< gh-hovercard "11282" "how GLASM handled transform feedback." >}} +By implementing support for multiple transform feedback buffers, he has not only solved the issue in the only good main Pokémon release in the Switch (writer’s opinion, you can’t prove me wrong), but most likely many other modern Switch games that rely on transform feedback to render. + +{{< single-title-imgs-compare + "Still good graphics for the Gamecube (Pokémon Legends: Arceus)" + "./plabug.png" + "./plafix.png" +>}} + +We hope our warriors still rocking the never-dying GTX 400 to 700 series GPUs benefit from these changes. + +## Skyline framework: Part 3 + +After a long, *looong* wait, support for the [Skyline](https://github.com/skyline-dev/skyline) framework, and with it, support for the [ARCropolis](https://github.com/Raytwo/ARCropolis) modding framework for `Super Smash Bros. Ultimate` has finally landed! +But we’re getting ahead of ourselves. Let’s see how byte[] made this possible. + +As part of implementing a security technique called ASLR (Address Space Layout Randomization), there is a large range of addresses that a program's code can be loaded at on the Switch. +In fact, even though the Switch only has 4 GB of physical memory, the size of the region where program code can be virtually mapped can be as large as 512GB. +Programs shouldn't make assumptions about where they are loaded inside the address space, because they can be shifted around anywhere inside this range on the console. +As it turns out, the Skyline framework requires that the program not be loaded at the very start of the region, but yuzu always loaded it there, causing it to reliably crash. +byte[] {{< gh-hovercard "11326" "worked around this limitation of Skyline" >}} by shifting the code load address further into the ASLR region, allowing room for it to operate. + +yuzu’s code responsible for handling service calls from guest code is not exactly in *ideal shape*. +One particularly annoying issue from the early days of the emulator is a lock which prevents a service object from receiving concurrent requests from different sessions. +Since the implementation is incorrect (the lock should not be present at all), but a lot of existing yuzu code depends on it, byte[] instead {{< gh-hovercard "11327" "avoids locking only around calls to socket interfaces," >}} avoiding a deadlock when Skyline's TCP logger is active. +More work remains to be done to remove this service lock once and for all. + +With these changes, the Skyline framework is operational, but a bit more work was needed to get ARCropolis up and running, and the Smash modding community happy. +Thankfully, byte[] didn’t stop there, and continued implementing the required changes. + +ARCropolis used to incorrectly initiate the handshake when connecting to an SSL/TLS socket without first setting a hostname. +This has been [fixed](https://github.com/skyline-rs/rust-native-tls/commit/94134cd3bcf5b495d1be336b4b0e8c47399ae1a4) in ARCropolis’s dependencies, but most users have not updated yet to the corrected releases, so {{< gh-hovercard "11328" "yuzu has to support this behaviour." >}} + +And lastly, yuzu was missing support for HTML manual mods, so byte[] {{< gh-hovercard "11342" "implemented support for that" >}} too. + +The end result after these few fixes is that most mods for Super Smash Bros. Ultimate are now working! + +{{< single-title-imgs + "Let the modding begin! (Super Smash Bros. Ultimate)" + "./arc1.png" + "./arc2.png" + >}} + +{{< single-title-imgs + "Bocchi-chan vs Melia, the fight of the century (Super Smash Bros. Ultimate)" + "./arc3.png" + "./arc4.png" + "./arc5.png" + >}} + +Happy modding! [Here’s a tutorial](https://gamebanana.com/tuts/14688) for those interested. + +## Project Terra? + +Yep, byte[] asked for a rename. From now on, Project Terra will be the name of the effort to fix the current virtual file system emulation implementation while Project Gaia is in the works. + +Why the rename? Because we have a lot of fixes to tell you about. +To begin with, yuzu now {{< gh-hovercard "11284" "supports sparse and compressed NCA games!" >}} +This means a long list of titles whose eShop releases couldn’t previously boot are now either running or perfectly playable, and their RomFS can be fully dumped. + +Here’s a nowhere-close-to-complete list of now-working eShop titles: + +- `Splatoon 3` +- `Bayonetta 3` +- `Atelier Ryza 3: Alchemist of the End & the Secret Key` +- `Double Dragon Gaiden: Rise of the Dragons` +- `OneShot: World Machine Edition` +- `Skullgirls: 2nd Encore` +- `Everdream Valley` +- `Magical Drop VI` +- `Hatsune Miku - The Planet Of Wonder And Fragments Of Wishes` +- `MLB The Show 23` +- `Sports Story` +- `Front Mission 1st: Remake` +- `Cursed to Golf` +- `Ruined King: A League of Legends Story` +- `Mega Man Battle Network Legacy Collection` +- And many more! + +{{< gh-hovercard "11309" "Support for gamecard dumps with a prepended key area" >}} has been added too, thanks to byte[]. This allows using dumps with the option to dump the key area enabled. + +{{< single-title-imgs + "Nice bike (Fuuraiki 4)" + "./bike1.png" + "./bike2.png" + "./bike3.png" + >}} + +Installing updates and DLC for multi-program applications (such as a game launcher with several games inside) didn't work properly on yuzu. +This meant games like `Super Mario 3D All-Stars` would only launch the base game version no matter what the user did. +The current virtual file system implementation can’t properly support this, which is one of the many areas Project Gaia is geared to fix. +To bypass this limitation, byte[] {{< gh-hovercard "11319" "creates synthetic update metadata" >}} inside yuzu, allowing the update/DLC to pass through and load correctly. + +[FearlessTobi](https://github.com/FearlessTobi) fixed {{< gh-hovercard "11367" "an *old* regression" >}} affecting how the game’s size is displayed on the game list when using games dumped with an outdated method. +How old is the regression? Well, it’s 5 years old by now. + +FearlessTobi also fixed a bug in {{< gh-hovercard "11370" "how an error is handled" >}} when a game tries to rename a file to a name that already exists. +This was causing `GRID Autosport` to crash on boot. + +{{< imgs + "./grid.png|Running in the 90s (GRID Autosport)" + >}} + +Not stopping there, FearlessTobi also fixed yuzu's command line arguments to {{< gh-hovercard "11371" "properly load updates and DLC" >}} when booting a game — for example, when using a script. + +Users reported that some RomFS dumps from games don’t always include all game assets, with one example being `KLONOA Phantasy Reverie Series`. +byte[]’s investigation showed that several areas of the RomFS dump code were… of low quality. +{{< gh-hovercard "11381" "After a moderate rewrite," >}} RomFS dumps of multi-title games should now include all assets. + +## Audio, input, and core changes + +Let’s start with the sole input change of this progress report. [german77](https://github.com/german77) almost broke his streak! + +{{< gh-hovercard "11406" "Updating SDL to version 2.28.2" >}} fixed issues affecting Xbox controller trigger motion events and their rumble while the program runs in the background. +8BitDo gamepad mapping while in XInput mode was fixed for Linux. +And a controller lockup that happened when initialising some unofficial PS4 controllers is now fixed. + +Some users' machines have improperly configured audio devices, which can lead to games locking up on boot. +This lovely behaviour forced Maide to work on a {{< gh-hovercard "11359" "test to run early in the boot process" >}} to see which audio backend can properly start the audio device. If the device fails to initialise with both cubeb and SDL, the null backend is selected and the game continues to work, just without any audio output. + +If you find that a game has no audio but is otherwise working, you should check your drivers, check any intermediate programs like equalisers, and check your OS settings for issues. + +Opus is a lossy open-source and royalty-free (as it always should be) audio format used by several games. +Like with the VP9 video format, its implementation in yuzu is not as simple as just playing the file. +{{< gh-hovercard "11390" "By implementing" >}} the `OpenHardwareOpusDecoderForMultiStreamEx` and `DecodeInterleavedForMultiStream` service methods (Opus multistream support), FearlessTobi ensured games like `MLB The Show 22` are now playable. + +{{< gh-hovercard "11419" "Implementing" >}} the `GetWorkBufferSizeExEx` service method, on the other hand, allowed `Sea of Stars` to boot. + +{{< single-title-imgs + "Nothing beats the look of a classic RPG (Sea of Stars)" + "./sos1.png" + "./sos2.png" + "./sos3.png" + "./sos4.png" + >}} + +If anyone experienced audio related crashes (specifically related to audio effects) in games like `The Legend of Zelda: Tears of the Kingdom`, `SUPER MARIO ODYSSEY`, and some others, well, with the help from [ChiefGokhlayeh](https://github.com/ChiefGokhlayeh), Maide {{< gh-hovercard "11408" "found the broken node Id index" >}} that caused the problem. + +Still fighting the war of shutting down yuzu in a sensible manner, byte[] changed the {{< gh-hovercard "11384" "shutdown timeout" >}} to more closely match the behaviour of the Switch. Most games now exit within one second. + +Another area where shutting down has improved, this time related to the Skyline framework, is cancelling pending socket operations caused by the TCP logger. +One of the operations can remain waiting for a host to be accepted. +This will never complete once a shutdown event is triggered, so {{< gh-hovercard "11385" "a swift termination is issued" >}} now. + +## Android augmentation + +Besides all previously reported changes, Android got its share of specific bugfixes and UI changes too, courtesy of [t895](https://github.com/t895): + +- {{< gh-hovercard "11271" "Miscellaneous settings tweaks," >}} including displaying settings values in list view, reducing the opacity of non-editable settings, removing some unnecessary default buttons in slider dialogs, and a few other minor changes. + +{{< imgs + "./grey.png|These settings can't be changed while running a game" + >}} + +- {{< gh-hovercard "11272" "Show associated values for home settings." >}} +- {{< gh-hovercard "11273" "Changes to the initial setup," >}} showing if a step was completed, and automatically moving to the next page on completion. + +{{< imgs + "./setup.gif|Easier setup!" + >}} + +- {{< gh-hovercard "11337" "Automatically rotate the screen" >}} between landscape and reverse-landscape. +- {{< gh-hovercard "11352" "Search for programs up to 3 subfolders deep." >}} +- {{< gh-hovercard "11378" "Use appCategory to report yuzu as a game." >}} This should improve game launcher detection, but surprisingly, it’s not enough to make Samsung’s Game Launcher detect yuzu. +- {{< gh-hovercard "11380" "A settings rework," >}} including better material animations, hiding paired options, adding a settings search function, and improving restore states for dialogs properly. + +{{< single-title-imgs + "Cleaner and more functional" + "./setting1.gif" + "./setting2.gif" + "./setting3.gif" + "./setting4.gif" + >}} + +- {{< gh-hovercard "11392" "Fixing some activity issues," >}} like the surface appearing stretched when changing orientation, or starting a game in landscape mode and then switching to portrait. +- {{< gh-hovercard "11405" "Adding new loading and closing animations." >}} + +{{< single-title-imgs + "Showing the progress" + "./load.gif" + "./close.gif" + >}} + +- {{< gh-hovercard "11413" "Support intents to emulation activity," >}} so users can launch games from other apps like Daijishō. + +{{< imgs + "./dai.gif|For those who prefer it" + >}} + +- {{< gh-hovercard "11416" "Adding the ability to create dynamic app shortcuts," >}} so users can make per game icons. + +{{< imgs + "./icon.gif|A faster way to get in-game!" + >}} + +- {{< gh-hovercard "11420" "Fixing a bug in the game content installer" >}} that would lead to a crash when trying to install an update or DLC. +- And more! + +Also joining forces in the Android effort, byte[] fixed a {{< gh-hovercard "11357" "virtual file system bug" >}} that made any game with updates installed fail to boot after merging his earlier changes to support compressed and sparse NCAs. + +## Desktop UI improvements + +The desktop side of things also got its share of developer love. + +Newcomer [mdmrk](https://github.com/mdmrk) brings us a very requested feature: {{< gh-hovercard "10519" "per-game play time tracking!" >}} +It’s shown in the game list as a new column. +Thank you! + +{{< imgs + "./time.png|Power level reading" + >}} + +Since the introduction of the screenshot feature, yuzu has only saved captures in a 16:9 aspect ratio, regardless of the selected aspect ratio in graphics settings. +Also, the resolution of the captures was always based on the chosen resolution multiplier value; if 2x was in use, any capture while playing in docked mode would be 3840x2160 in size. + +With motivation from some recent mods that bypass our scaler and render games in 1x resolution directly at 4K, toastUnlimited added {{< gh-hovercard "11303" "configuration options for screenshot resolution," >}} along with considering the aspect ratio selected by the user. +Now users can set the screenshot resolution in `Emulation > Configure… > General > UI > Resolution`. Auto will use the previous logic of using the resolution multiplier value, but many other resolution options can be picked. +Additionally, what the user selects in `Emulation > Configure… > Graphics > Aspect Ratio` will determine the aspect ratio and resulting resolution of the screenshots. +Feel free to experiment, and save your best gameplay moments! + +{{< imgs + "./res.png|A picture is worth a thousand words" + >}} + +Per-game settings are a great way to customise the settings and mods of each game. +One option in a weird spot was `Console mode` — whether a game was played in docked or handheld mode. +The old implementation relied on controller profiles: the user would set some controller mapping, the type of controller, the console mode, save all of this as a profile, and then set each game to use the preferred controller profile. +The problem with this approach is that it forces users to save different controller profiles, when in most cases a single one is used, for example, a Pro Controller profile using a Sony Dual Sense. +To simplify this particular situation, toastUnlimited {{< gh-hovercard "11356" "added a Console Mode to the per-game system properties." >}} Much easier, right? + +{{< imgs + "./console.png|For even more customisation" + >}} + +## Hardware section + +This section has been pretty calm lately. For the most part, drivers have been behaving and not introducing critical regressions recently, and the Mesa Turnip driver for the Adreno Android players has been progressing healthily. It’s not fully stable yet, but rendering and performance are in a good spot. +There’s only one vendor to discuss this time, and it is… + +### AMD, and the D24 situation + +We continue our investigations into how to deal with the lack of hardware support for the D24 depth format on Red Team hardware. + +Some fun and totally-not-evil experiments (faking lack of support with an RTX 3060 Ti) proved that while the D24 glitches are easy to reproduce on compatible hardware by just commenting out some lines, we also confirmed that the vertex explosions affecting `Xenoblade Chronicles 3` in its DLC, `Future Redeemed`, and in the `Pentelas region` of the main game are *not* caused by the lack of D24 on AMD cards. +Any other GPU vendor with D24 support disabled renders those sections perfectly fine, leaving us again with no clue on what Radeon GPUs hate about this particular game. + +On Windows, OpenGL continues to be the only alternative for Red Team users for the time being. +Mesa, on the other hand, seems to have solved the issue (at least on Polaris hardware) with their latest version, so "just use Linux" seems to be a way to fix an AMD-specific problem once again. + +But it’s not all bad news! A new Vulkan extension, `VK_EXT_depth_bias_control`, which is for now only available on the Linux Mesa RADV driver, allows yuzu to properly fake D24 support, fixing the rendering issues on games like `Pokémon Sword & Shield`, `Super Smash Bros. Ultimate`, and `Mario Tennis Aces`, among others. + +Blinkhawk {{< gh-hovercard "11402" "added a preliminary implementation" >}} supporting `VK_EXT_depth_bias_control` to yuzu for testing. +We hope AMD adds support for it in their Windows drivers, as it is known they use the feature internally for OpenGL. + +{{< single-title-imgs-compare + "Hardware support for the right formats matters (Pokémon Sword)" + "./d24bug.png" + "./d24fix.png" +>}} + +As a small anecdote about `Super Smash Bros. Ultimate`, we had to hardcode a value to allow AMD cards to render this game not long after the introduction of our Vulkan API. +The story with D24 has been with us since the very beginning. + +### Samsung Xclipse 920 + +Technically it is the same vendor, right? + +Recent changes in which Vulkan extensions are mandatory and which are optional made this AMD RDNA2-based GPU work with the Android releases, adding another compatible vendor to the group of decent-enough SoC GPUs, along with Adreno and Mali. +Exynos 2200 users can now enjoy their Switch games on their Android devices! + +## Future projects + +Blinkhawk is back to proposing ideas which are so crazy, we could never properly explain them here. +And both byte[] and Morph are cooking interesting projects for after they finish their current challenges. + +That’s all folks! Thank you for taking the time to read until the end. We hope to see you next time! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-aug-2023/ink.png b/site/content/entry/yuzu-progress-report-aug-2023/ink.png new file mode 100644 index 000000000..1ad4f6753 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/ink.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/juan.png b/site/content/entry/yuzu-progress-report-aug-2023/juan.png new file mode 100644 index 000000000..c5b95192a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/juan.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/load.gif b/site/content/entry/yuzu-progress-report-aug-2023/load.gif new file mode 100644 index 000000000..f24cc09f8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/load.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/m1.png b/site/content/entry/yuzu-progress-report-aug-2023/m1.png new file mode 100644 index 000000000..2ceaa7110 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/m1.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/mr.png b/site/content/entry/yuzu-progress-report-aug-2023/mr.png new file mode 100644 index 000000000..10e6ac9f1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/mr.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/occ.png b/site/content/entry/yuzu-progress-report-aug-2023/occ.png new file mode 100644 index 000000000..baa7b14c0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/occ.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/plabug.png b/site/content/entry/yuzu-progress-report-aug-2023/plabug.png new file mode 100644 index 000000000..9b3f4312e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/plabug.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/plafix.png b/site/content/entry/yuzu-progress-report-aug-2023/plafix.png new file mode 100644 index 000000000..dad41f6b7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/plafix.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/portrait.png b/site/content/entry/yuzu-progress-report-aug-2023/portrait.png new file mode 100644 index 000000000..1c7d54116 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/portrait.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/qcr1.png b/site/content/entry/yuzu-progress-report-aug-2023/qcr1.png new file mode 100644 index 000000000..e14ab2739 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/qcr1.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/qcr2.png b/site/content/entry/yuzu-progress-report-aug-2023/qcr2.png new file mode 100644 index 000000000..a5f68d49b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/qcr2.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/rdr.png b/site/content/entry/yuzu-progress-report-aug-2023/rdr.png new file mode 100644 index 000000000..bc15fd235 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/rdr.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/res.png b/site/content/entry/yuzu-progress-report-aug-2023/res.png new file mode 100644 index 000000000..b75210ef2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/res.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/setting1.gif b/site/content/entry/yuzu-progress-report-aug-2023/setting1.gif new file mode 100644 index 000000000..ccddcd4d7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/setting1.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/setting2.gif b/site/content/entry/yuzu-progress-report-aug-2023/setting2.gif new file mode 100644 index 000000000..39820e04c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/setting2.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/setting3.gif b/site/content/entry/yuzu-progress-report-aug-2023/setting3.gif new file mode 100644 index 000000000..28dbd5e51 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/setting3.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/setting4.gif b/site/content/entry/yuzu-progress-report-aug-2023/setting4.gif new file mode 100644 index 000000000..357460ed1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/setting4.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/setup.gif b/site/content/entry/yuzu-progress-report-aug-2023/setup.gif new file mode 100644 index 000000000..4cacb34a4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/setup.gif differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/sos.png b/site/content/entry/yuzu-progress-report-aug-2023/sos.png new file mode 100644 index 000000000..f5c5bb29a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/sos.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/sos1.png b/site/content/entry/yuzu-progress-report-aug-2023/sos1.png new file mode 100644 index 000000000..650a2e8c0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/sos1.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/sos2.png b/site/content/entry/yuzu-progress-report-aug-2023/sos2.png new file mode 100644 index 000000000..1cf301d89 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/sos2.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/sos3.png b/site/content/entry/yuzu-progress-report-aug-2023/sos3.png new file mode 100644 index 000000000..a9a47c78c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/sos3.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/sos4.png b/site/content/entry/yuzu-progress-report-aug-2023/sos4.png new file mode 100644 index 000000000..4bf8a90da Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/sos4.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/summary.png b/site/content/entry/yuzu-progress-report-aug-2023/summary.png new file mode 100644 index 000000000..69e208c51 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/time.png b/site/content/entry/yuzu-progress-report-aug-2023/time.png new file mode 100644 index 000000000..108c2332b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/time.png differ diff --git a/site/content/entry/yuzu-progress-report-aug-2023/xc3.mp4 b/site/content/entry/yuzu-progress-report-aug-2023/xc3.mp4 new file mode 100644 index 000000000..5e3a5939a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-aug-2023/xc3.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/banner.png b/site/content/entry/yuzu-progress-report-dec-2020/banner.png new file mode 100644 index 000000000..185201f19 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/botwbug.png b/site/content/entry/yuzu-progress-report-dec-2020/botwbug.png new file mode 100644 index 000000000..581bad109 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/botwbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/botwfix.png b/site/content/entry/yuzu-progress-report-dec-2020/botwfix.png new file mode 100644 index 000000000..89a573446 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/botwfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/camera.png b/site/content/entry/yuzu-progress-report-dec-2020/camera.png new file mode 100644 index 000000000..fd895dfb8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/camera.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/fonts.png b/site/content/entry/yuzu-progress-report-dec-2020/fonts.png new file mode 100644 index 000000000..32979e288 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/fonts.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/index.md b/site/content/entry/yuzu-progress-report-dec-2020/index.md new file mode 100644 index 000000000..6db16713b --- /dev/null +++ b/site/content/entry/yuzu-progress-report-dec-2020/index.md @@ -0,0 +1,162 @@ ++++ +date = "2021-01-10T12:00:00-03:00" +title = "Progress Report December 2020" +author = "Honghoa" +coauthor = "GoldenX86" +forum = 345724 ++++ + +Happy New Year, dear yuz-ers! 2020 is finally behind us, so what better way to start 2021 than with a progress report? Follow us for a summary of the last changes yuzu saw in 2020, and a small preview of what will come. This time we offer you kernel changes, new input and user interface additions, and the first changes applied to get the Buffer Cache Rewrite finished. + + + +## General improvements and bug fixes + +[epicboy](https://github.com/ameerj) has been busy squashing bugs, in this case [killing two with one PR.](https://github.com/yuzu-emu/yuzu/pull/5201) In some instances, we were trying to read data from an nvflinger buffer before it even existed. By adding a check addressing this, `Yoshi’s Crafted World` now boots, albeit with several graphical glitches. +This PR also fixes how buffers are accessed, so several games now boot for the first time. Some examples include: `Katana ZERO`, `DELTARUNE Chapter 1`, `Dragon Ball FighterZ` and `Wonder Boy: The Dragon’s Trap`. + +{{< imgs + "./katanazero.png| " + >}} + +{{< imgs + "./wonderboy.png| Now booting!" + >}} + +A PSA for our Intel graphics users. With the release of the Windows driver version `27.20.100.9126`, Intel added support for not only the much needed `VK_EXT_robustness2`, but also `VK_EXT_custom_border_color`, improving performance and stability with the former extension and solving rendering issues in `The Legend of Zelda: Breath of the Wild` with the latter. Nothing better than free improvements for our integrated graphics crew running Vulkan. Latest is best! + +Linux distributions compatibility, and the dependency issues that come with it, have been a long standing problem for our tuxedo-wearing users... Until now. + +Thanks to [toastUnlimited,](https://github.com/lat9nq) we now provide [AppImage builds,](https://appimage.org/) simplifying the installation process considerably. AppImages eliminate the dreaded dependencies issues, and bringing back support for Ubuntu 18.04, Debian Buster, CentOS 8, and many older distributions. + +In the future, Early Access will finally be able to be distributed pre-compiled like this, the promise has been made. Thanks to the reduced source code compilation work hours, the CPU Union approves of this change. + +During the time the Texture Cache Rewrite spent in Early Access, several regressions have been fixed. One of the notorious ones is related to the camera rune in `The Legend of Zelda: Breath of the Wild`. + +{{< imgs + "./camera.png| " + >}} + +As you can clearly see with [Rodrigo’s](https://github.com/ReinUsesLisp)... art, the game informs two different size values for the same texture, named `pitch` and `width`, so yuzu didn’t transfer needed information between them as it considered them different textures. By changing this behaviour, entities like animals, flowers, enemies, etc. are properly registered by the camera now. + +{{< single-title-imgs + "Tony, get the boulder (The Legend of Zelda: Breath of the Wild)" + "./botwbug.png" + "./botwfix.png" + >}} + +There were some crashes when exiting yuzu that was related to the telemetry process. [Tobi](https://github.com/FearlessTobi) ported a fix from [Citra](https://github.com/citra-emu/citra) that [changes the type of `AddField` to a string,](https://github.com/yuzu-emu/yuzu/pull/5127) squashing one bug down. + +A commonly reported issue was that configuration changes are lost if yuzu crashes. [toastUnlimited](https://github.com/lat9nq) changed this behaviour to simply [save the current settings before booting a game.](https://github.com/yuzu-emu/yuzu/pull/5217) This change saves several headaches. + +[Morph](https://github.com/Morph1984) implemented the [new OSS fonts](https://github.com/yuzu-emu/yuzu/pull/5200) that [Rei](https://github.com/Its-Rei) put together. With this, users no longer require to dump the Switch firmware to get proper button fonts. The firmware dumping process is still needed for games that have Mii related content. + +{{< single-title-imgs + "It’s far cleaner to have ZL and ZR as a trigger button, than just the letters alone, don’t you agree? (Super Mario Maker 2)" + "./smm2fontbug.png" + "./smm2fontfix.png" + >}} + +A separate PR [added +/-](https://github.com/yuzu-emu/yuzu/pull/5205) to the fonts. + +{{< single-title-imgs + "THE anime swordsman (Super Smash Bros. Ultimate)" + "./smashfontbug.png" + "./smashfontfix.png" + >}} + +{{< imgs + "./fonts.png| Some insight in the process behind this." + >}} + +Some games report the wrong device handle when sending vibration signals, like `NEKOPARA Vol. 3` (don’t Google this series). [Morph](https://github.com/Morph1984) fixed this by [validating the device handles before use.](https://github.com/yuzu-emu/yuzu/pull/5190) Man of culture. + +## Kernel Rewrites + +yuzu's kernel received important changes this month, focused on refactoring the code for thread management and synchronization. [bunnei](https://github.com/bunnei) started working on these changes two months ago, as covered on the previous progress report. Although a bit technical, these modifications are essential for accurate Nintendo Switch emulation. They also improve yuzu's code quality and make it easier to work with. There are still many changes planned for the kernel, so stay tuned for even more improvements in the very near future. + +First, there is an improvement to yuzu [ensuring safe memory access across threads](https://github.com/yuzu-emu/yuzu/pull/5206). A `Race Condition` happens when multiple threads are running simultaneously, and one thread modifies data while another thread accesses it. Race conditions can cause faulty or unexpected behaviour: a thread can retrieve partial data or even overwrite changes made by another. yuzu emulates the Nintendo Switch's internal memory using a type of abstract data structure called a `Page Table`, which works as a virtual layer between the physical and the emulated memory. It maps these addresses in a "contiguous table" that lets the programmer access memory easily without checking where actual memory stores everything. Most memory management operations were written before multicore CPU and asynchronous GPU were implemented. There was only a single thread back then, so there were no guards for thread-safe memory access. bunnei introduced a lock in this PR to alleviate a race condition where the data in the memory pages was being accessed while the GPU was operating on them. + +bunnei has also been rewriting the [kernel scheduler](https://github.com/yuzu-emu/yuzu/pull/5131). Modern operating systems run many processes simultaneously, however, a single CPU core can only process one of them at any given time. The scheduler is an essential piece of the kernel, as it is in charge of swapping CPU access to the different processes and choosing in which order this happens. This will make yuzu’s kernel match `Horizon OS` more closely. + +As a follow-up to this rewrite, bunnei reworked the way service calls were implemented in yuzu, by allocating their calls in their own [individual service threads](https://github.com/yuzu-emu/yuzu/pull/5208). Many services are running in the background on the Nintendo Switch. They are in charge of initializing and managing specific tasks, such as audio, graphics, user input, networking, etc. yuzu emulates these services through HLE - High Level Emulation. This means that, instead of dumping the binary code of these routines from the Nintendo Switch and translating their instructions so that a PC can run them, the programmer reimplements the functionality of these services in C++. Thus, HLE works like a "black box": these services are called whenever there's a request from the games, and they send (or ask) for the corresponding data, even though internally they may be different to how the service was originally implemented in hardware. But, as long as the information requested or sent through the service is valid and processed appropriately, the system is being emulated correctly. + +These service processes are independent of each other, so games call them asynchronously. But before this PR, all of these services were being processed in the `CoreTiming` thread -- a thread that is used to process events at certain times in the future (for example, when a frame completes rendering). This meant that games would call these processes, but they would not be processed until the `CoreTiming` thread was run, which resulted in these requests piling up in a queue and possibly introducing lag if the queue wasn't emptied fast enough. + +Thanks to the changes in this PR, each of these processes was moved to their own thread and is processed more quickly. An immediate benefit of this change is that load times improve significantly, and input lag is also reduced. But another important perk is that this implementation is more accurate, as it resembles the behaviour of services in the Nintendo Switch. GPU emulation also runs on its own thread now, which is synchronized on GPU pushes and flushes. This means that `async GPU` can be decoupled from multicore and these settings can now be toggled independently from each other. + +Finally, as a continuation to the previous two PRs, comes the [rewrite of the kernel synchronization primitives](https://github.com/yuzu-emu/yuzu/pull/5266) – namely, `Synchronization Objects`, `Condition Variables` and `Address Arbiters`. An in-depth explanation of how these mechanisms work goes beyond the scope of this report, but essentially they are tools used by threads in different processes to communicate with each other and be synchronized properly. The major benefit of these changes is that a lot of code that was being carried over from Citra (and that required major workarounds to make it function properly with multicore) has been changed in favour of mechanisms more appropriate for how yuzu works, besides making it closer to how the `Horizon OS` of the Nintendo Switch works. + +Going in hand with these synchronization changes, [epicboy](https://github.com/ameerj) introduced a PR to [incorporate a syncpoint manager for nvdec](https://github.com/yuzu-emu/yuzu/pull/5237). This utilizes the tools mentioned previously to implement a more accurate GPU-CPU synchronization mechanism. It is crucial to avoid race conditions when async operations are being performed by the emulator when decoding a video. + +## UI changes + +Finally, a very needed User Interface change, [language support](https://github.com/yuzu-emu/yuzu/pull/5239) is here. Thanks to work done by [Tobi](https://github.com/FearlessTobi) and many, *many* members of the community from around the globe, we can now offer support for 11 different languages, plus regional variations. ¡Muchas gracias! + +{{< imgs + "./language.png| You can find this in Emulation > Configure > General > UI > Interface language" + >}} + +Anyone is welcome to help [expand the available language list.](https://www.transifex.com/yuzu-emulator/yuzu) + +For our command-line or shortcut lovers, [Morph](https://github.com/Morph1984) adds [command-line arguments.](https://github.com/yuzu-emu/yuzu/pull/5229) Current options are: + +- `yuzu.exe "path_to_game"` - Launches a game at `path_to_game`. +- `yuzu.exe -f` - Launches the next game in fullscreen. +- `yuzu.exe -g "path_to_game"` - Launches a game at `path_to_game`. +- `yuzu.exe -f -g "path_to_game"` - Launches a game at `path_to_game` in fullscreen. + +Feel free to create desktop shortcuts of all of your games! + +Thinking of our fast typers, [toastUnlimited](https://github.com/lat9nq) added several [menubar access hot-keys](https://github.com/yuzu-emu/yuzu/pull/5223). Now, for example, a user can press `Alt + F, R, ENTER` to load the most recently played game. Look Ma! No mouse! + +[german77](https://github.com/german77) added the option to [resize yuzu’s window to 1920x1080](https://github.com/yuzu-emu/yuzu/pull/5178), on top of the traditional 1280x720. This ensures a perfect 1:1 pixel ratio with native 1080p games while playing windowed, for those with high-resolution displays. + +{{< imgs + "./resize.png| " + >}} + +## Input changes + +[german77](https://github.com/yuzu-emu/yuzu/pull/5178) is back in action with a couple of input improvements. + +Adding a way to invert an analog stick axis was a problem we did not expect to have on Xbox and PlayStation controllers, but some alternative brands don’t seem to follow the specifications very closely. Now if you right-click on an axis, you get the [option to invert it.](https://github.com/yuzu-emu/yuzu/pull/5233) + +{{< imgs + "./invert.png| " + >}} + +This is also a great way to invert a camera if a game doesn’t allow it in its own settings, for example in `Star Wars Jedi Knight II: Jedi Outcast`. + +Analog triggers were sometimes mapped inverted to what the user intended. As a way to avoid some bad moments to our users, now [the program takes two samples when mapping an analog trigger,](https://github.com/yuzu-emu/yuzu/pull/5265) to better determine the direction of movement. This was [ported from Citra](https://github.com/citra-emu/citra/pull/5509), so thanks, guys! + +A few games like `Voez` and `The Room` require specific touch gestures, and to achieve that, [multitouch support was added.](https://github.com/yuzu-emu/yuzu/pull/5270) With this, yuzu now offers support for up to 16 touch inputs with the keyboard, touch screen or via UDP services. + +{{< imgs + "./room.png| " + >}} + +## Preliminary work for the Buffer Cache Rewrite + +While we sadly couldn’t give you a Christmas present in the form of the `Buffer Cache Rewrite` (or BCR for short), the preliminary work needed to have it ready has started. [Rodrigo](https://github.com/ReinUsesLisp) has his hands full with cleaning up the TCR recently merged into Mainline, the current internal work and testing on the BCR, and his first steps with `Project Hades`. *“Sleep is for the weak”* indeed. + +{{< imgs + "./rodrigo.png| And you don't seem to understand... (Rodrigo sleeping)" + >}} + +We will go in-depth once BCR is completed, but one of the required features is [having access to Vulkan at all times](https://github.com/yuzu-emu/yuzu/pull/5225) to make use of `interop`, a driver feature (or as Rodrigo calls it, a monstrosity) that allows developers to cross-code between different graphics APIs on Nvidia and AMD products. This way, [Vulkan can be used from OpenGL if it offers a better solution to a problem.](https://github.com/yuzu-emu/yuzu/pull/5230) + +A rather interesting change needed is [related](https://github.com/MerryMage/dynarmic/pull/566) to [Dynarmic](https://github.com/MerryMage/dynarmic). By [masking data in three lower pointer bits](https://github.com/yuzu-emu/yuzu/pull/5249) before reading them, Rodrigo can now store required information of the page tables without needing to use a lock, saving precious execution time and, at most, some 128MB of system memory. + +Lastly, [additional granularity in the CPU pages.](https://github.com/yuzu-emu/yuzu/pull/5262) This PR allows informing if the CPU or the GPU modified a range of data in the CPU page. If the relevant range was modified by the CPU, it must be uploaded to the GPU. Processors supporting the `BMI1` instruction set will get a slim performance improvement, these include Intel Haswell (Gen. 4) or newer, and AMD Piledriver (2nd Gen. FX)/Jaguar or newer. + +## Future projects + +It’s no surprise, but the `Buffer Cache Rewrite` is close to release. Vulkan performance and stability improvements are planned, with kernel improvements continuing to be a high priority. +Plus we also have some other interesting things we’ll reveal later on. + +That’s all folks! Thank you so much for sticking around. See you next time in the January progress report! Take care and stay safe! +Thanks to Darkerm and Morph for helping with the pictures. + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-dec-2020/invert.png b/site/content/entry/yuzu-progress-report-dec-2020/invert.png new file mode 100644 index 000000000..03b015fb3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/invert.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/katanazero.png b/site/content/entry/yuzu-progress-report-dec-2020/katanazero.png new file mode 100644 index 000000000..5e898a893 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/katanazero.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/language.png b/site/content/entry/yuzu-progress-report-dec-2020/language.png new file mode 100644 index 000000000..3b8978704 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/language.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/resize.png b/site/content/entry/yuzu-progress-report-dec-2020/resize.png new file mode 100644 index 000000000..c4062f4cd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/resize.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/rodrigo.png b/site/content/entry/yuzu-progress-report-dec-2020/rodrigo.png new file mode 100644 index 000000000..edea1f678 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/rodrigo.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/room.png b/site/content/entry/yuzu-progress-report-dec-2020/room.png new file mode 100644 index 000000000..40b4f5d75 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/room.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/smashfontbug.png b/site/content/entry/yuzu-progress-report-dec-2020/smashfontbug.png new file mode 100644 index 000000000..5700a73a1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/smashfontbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/smashfontfix.png b/site/content/entry/yuzu-progress-report-dec-2020/smashfontfix.png new file mode 100644 index 000000000..b33c6223c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/smashfontfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/smm2fontbug.png b/site/content/entry/yuzu-progress-report-dec-2020/smm2fontbug.png new file mode 100644 index 000000000..1929da590 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/smm2fontbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/smm2fontfix.png b/site/content/entry/yuzu-progress-report-dec-2020/smm2fontfix.png new file mode 100644 index 000000000..ec758d7fa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/smm2fontfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/summary.png b/site/content/entry/yuzu-progress-report-dec-2020/summary.png new file mode 100644 index 000000000..ea2c8db2a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2020/wonderboy.png b/site/content/entry/yuzu-progress-report-dec-2020/wonderboy.png new file mode 100644 index 000000000..af02b4133 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2020/wonderboy.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/banner.png b/site/content/entry/yuzu-progress-report-dec-2021/banner.png new file mode 100644 index 000000000..7cffc9fda Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/bd1.png b/site/content/entry/yuzu-progress-report-dec-2021/bd1.png new file mode 100644 index 000000000..7e8ce1021 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/bd1.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/bd2.png b/site/content/entry/yuzu-progress-report-dec-2021/bd2.png new file mode 100644 index 000000000..6ba00c847 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/bd2.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/gamepad1.mp4 b/site/content/entry/yuzu-progress-report-dec-2021/gamepad1.mp4 new file mode 100644 index 000000000..834bcdc55 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/gamepad1.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/gamepad2.mp4 b/site/content/entry/yuzu-progress-report-dec-2021/gamepad2.mp4 new file mode 100644 index 000000000..c0d39dcd8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/gamepad2.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/golf.png b/site/content/entry/yuzu-progress-report-dec-2021/golf.png new file mode 100644 index 000000000..9342f55fe Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/golf.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/hotkeys.png b/site/content/entry/yuzu-progress-report-dec-2021/hotkeys.png new file mode 100644 index 000000000..d109739f5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/hotkeys.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/index.md b/site/content/entry/yuzu-progress-report-dec-2021/index.md new file mode 100644 index 000000000..e27eee0c9 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-dec-2021/index.md @@ -0,0 +1,372 @@ ++++ +date = "2022-01-11T12:00:00-03:00" +title = "Progress Report December 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 518438 ++++ + +Yuz-ers! Welcome to the last progress report of 2021, released in 2022 because we still haven’t figured out how to travel back in time. +December brought us improved kernel emulation, fixes for driver issues, improvements to input, rendering, overall stability, and more! + + + +We keep trying with the time machine, but we’re running out of bananas to microwave and trash to fuel the Mr. Fusion. Okay, let's get started! + +## PSA for NVIDIA users: Part 2 + +As mentioned [two months ago](https://yuzu-emu.org/entry/yuzu-progress-report-oct-2021/#psa-for-nvidia-users), NVIDIA users have been experiencing issues when using GLSL due +to the changes introduced by NVIDIA dropping support for Kepler cards in the 49X series of drivers. + +We’re happy to announce that we have a [set of workarounds](https://github.com/yuzu-emu/yuzu/pull/7629) implemented by [epicboy](https://github.com/ameerj) that solve all +known issues. +These are already available for both Mainline and [Early Access](https://yuzu-emu.org/help/early-access/). + +The root of the problem in NVIDIA’s drivers seems to be in negation of integer and floating point values, and bitwise conversions of input values. + +On previous drivers, you could assign a value to a variable named `x`, then assign `-x` as the value to a new variable named `y`. +`y` would be equal to `-1 * x`. +New drivers ignore this negation entirely, resulting in random spontaneous fires, security breaches, too many dogs causing a +[Howl](https://www.youtube.com/watch?v=Jw0c9z8EllE), and total chaos. + +The workaround is to simply subtract the value from 0. +In our example, `y` would get the value of `0 - x`. + +The bitwise conversion issue is more complex, but we talked about it in the past. +Back in August, +[we mentioned how Intel had issues in Vulkan](https://yuzu-emu.org/entry/yuzu-progress-report-aug-2021/#another-terrible-implementation-and-other-graphical-fixes) +affecting Mario’s legendary moustache. + +`GetAttribute` returns a float value, so a conversion is needed when working with integer values. + +The same issue that affected Intel GPUs now happens here on the “greener” side, but inverted. +When using `instance_id`, old drivers accepted a float to unsigned integer conversion without issue, and you could do this conversion multiple times without losing the +correct value. +The current drivers, on the other hand, can sometimes return zero. + +Interpreting the value directly as unsigned integers now solves this issue in both GLSL and [GLASM](https://github.com/yuzu-emu/yuzu/pull/7630). +Since this counts as an optimization, we now apply it to all APIs. + +{{< single-title-imgs-compare + "Back to the early days (Fire Emblem: Three Houses)" + "./nvidiabug.png" + "./nvidiafix.png" +>}} + +Please report if you find any issues, as there could be more broken games due to yet unknown driver bugs. +On a similar note, more fixes should be coming to Vulkan too, if needed. +One such issue solved itself, most likely NVIDIA fixed it on the latest drivers. + +## Other graphical fixes + +Whenever a game played multiple videos at the same time, some of them would glitch and flicker. +This happened because yuzu was limited to decoding a single video stream at a time. +Having multiple videos running at the same time would cause the decoder to receive frames that were sent from different video sources, confusing the interpolation algorithm +and causing the aforementioned problems. +To prevent this issue from happening, [vonchenplus](https://github.com/vonchenplus) implemented a temporary solution that gives each video stream their own video decoder, +sending the correct frame data only to the correct decoder. + +{{< single-title-imgs + "It still flickers, but that's the Chozo's fault (Metroid Dread)" + "./mdbug.mp4" + "./mdfix.mp4" + >}} + +[Morph](https://github.com/Morph1984) added the missing formats [R16G16_UINT](https://github.com/yuzu-emu/yuzu/pull/7544) and +[ASTC_2D_8X5_UNORM](https://github.com/yuzu-emu/yuzu/pull/7549) to the Vulkan API, fixing the missing graphics on `Immortals Fenyx Rising` and making +`LEGO® CITY UNDERCOVER` playable, respectively. +(Please note that `Immortals Fenyx Rising` gets in game but has broken graphics at the moment). + +{{< imgs + "./lcu.png| I brick you not (LEGO® CITY UNDERCOVER)" + >}} + +[Blinkhawk](https://github.com/FernandoS27) [fixed a bug in the texture cache](https://github.com/yuzu-emu/yuzu/pull/7495) that was conveniently ignored by the AMD driver, +but would cause Nvidia GPUs to crash when using the Vulkan API. +This crash happened when blitting textures with different format types, something that points to a problem in the texture cache that will be addressed in a future PR. + +Blinkhawk also updated the Vulkan headers to [fix an extension and implemented logical operations](https://github.com/yuzu-emu/yuzu/pull/7599). +Both the extension and these logical operations are used by Vulkan to describe and process data, in order to compose the frames that will later be sent to the screen. +This PR fixes the sand and shadow graphical problems in `The Legend of Zelda: Skyward Sword`, and also the shadow problems as seen in `Xenoblade Chronicles 2`. + +{{< single-title-imgs-compare + "When you invert the polarity of your HDR display (Xenoblade Chronicles 2)" + "./xc2bug.png" + "./xc2fix.png" +>}} + +epicboy took a look at the issues that affected games that made heavy use of sparse GPU memory, and [made the changes necessary](https://github.com/yuzu-emu/yuzu/pull/7658) +to mitigate the problem. + +Sparse memory is a technique to store data non-contiguously, which is a fancy way to say that data is broken down into small blocks and only the relevant bits are loaded +into memory. +There was a bug in the code used to map this data into the memory, as the offsets needed to get the right address weren't being included in the calculations. +For the sake of precaution, he also added an extra guard that prevents modifying the memory address 0, as it is used as a placeholder to signal addresses that haven't +been loaded in yet. + +These changes are meant to address (no pun intended) issues related to the GPU memory management, and hopefully alleviate some stability complications related to it. +Notably, the crashes on titles developed with the `UE4` engine *(cough, True Goddess Reincarnation V or some such, cough)*. +The devs are still investigating any other oddities surrounding this game, so stay tuned for more updates. + +{{< imgs + "./ue4.png| These changes mitigate memory-related problems but are not guaranteed to “fix” them completely (SHIN MEGAMI TENSEI V)" + >}} + +Users reported crashes when playing `Sonic Colors Ultimate` on AMD and Intel GPUs on Vulkan after the resolution scaler was introduced. +epicboy quickly jumped in to intervene and save the Blue Hedgehog. + +On the AMD side, Sonic suffers from ImageView issues, causing an invalid pointer dereference when the `slot_images` container of the texture cache is resized. +This can happen even at native resolution. +epicboy found that [keeping a reference of the container](https://github.com/yuzu-emu/yuzu/pull/7622) resolves the issue. + +Intel’s turn now. +The Intel Vulkan Windows driver strongly follows the specification when dealing with image blits. +Khronos defines that [MSAA](https://en.wikipedia.org/wiki/Multisample_anti-aliasing) blits are not allowed, and while most drivers let this pass, Intel is being a good boy and +crashes when trying to rescale MSAA textures. +Leaving aside that using traditional antialiasing on a mobile device like the Switch is a *crime against humanity* (you don’t waste extremely limited bandwidth on +traditional antialiasing), the issue is solved by [rendering directly into the scaled image](https://github.com/yuzu-emu/yuzu/pull/7624) when rescaling by using the 3D pipeline. +The performance cost is higher (integrated GPUs like most Intel ones also hate traditional antialiasing), but it’s a price to pay to avoid crashing or losing the scaling. + +{{< imgs + "./sc.png| Colourful (Sonic Colors: Ultimate)" + >}} + +The texture cache has to handle several weird situations when dealing with rendering. +One aspect of the process is `overlaps`, when different textures compete for the same video memory space. +A bug in the texture cache's logic was found when an overlap occurs over relatively big distances in GPU memory. An overflow could happen leading to a wrongly massive texture +trying to be rendered, causing VRAM to fill up instantly, and leading yuzu to a crash. +This issue was common in `BRAVELY DEFAULT II`. +Thanks to epicboy, [users no longer have to suffer this sudden crash](https://github.com/yuzu-emu/yuzu/pull/7659). + +{{< single-title-imgs + "BRAVELY DEFAULT II" + "./bd1.png" + "./bd2.png" + >}} + +## Skyline framework: Part 2 + +[itsmeft24](https://github.com/itsmeft24) submitted a patch to +[implement the `ProcessMemory` and `CodeMemory` kernel SVCs](https://github.com/yuzu-emu/yuzu/pull/7519) (Supervisor Calls), which are some of the changes needed to support +the [Skyline](https://github.com/skyline-dev/skyline) framework for modding. + +Part of the ongoing work includes adding support in yuzu for all tiers of `subsdk`. +Games can use `subsdk` tiers from 0 to 8, with 9 being free. +Skyline uses `subsdk9` to operate, so [jam1garner](https://github.com/jam1garner) included support for the remaining +[two missing tiers in yuzu, 8 and 9](https://github.com/yuzu-emu/yuzu/pull/7523). + +There are still a couple of things that need to be implemented before it's ready, but things are certainly getting closer to being completed. + +You can check the current progress [here](https://github.com/yuzu-emu/yuzu/issues/7392). + +## Input changes + +[german77](https://github.com/german77) has several fixes for us and some important new additions. + +Let’s kick things off with a great new feature for handheld PC users, couch players, and anyone not wanting to reach all the way to their keyboard while playing: +[support for gamepad hotkeys](https://github.com/yuzu-emu/yuzu/pull/7633). + +{{< imgs + "./hotkeys.png| You can customize them" + >}} + +With this, users can customize button macros. For example: access or exit fullscreen, unlock the framerate, pause/continue emulation, capture a screenshot +(by default conveniently mapped to the capture button of the Nintendo controllers), close yuzu, and more! +{{< single-title-imgs + "Sorry about the bad quality" + "./gamepad1.mp4" + "./gamepad2.mp4" + >}} + +When certain games start, some internal testing is done to ensure that things are where they should be and respond with an acceptable delay. One of those tests involves rumble. +Games prod the controllers with a low frequency rumble test, but sometimes, some games never stop and the controller continues to vibrate, depleting battery and making you +doubt what the original intention of the developer was. +german77 [forces the rumble amplitude to zero after the test](https://github.com/yuzu-emu/yuzu/pull/7593), stopping unwanted vibrations for these affected games. + +VR games may use the gyroscope sensor on the Switch itself (not the controllers) to feed motion data. +Previously, yuzu would only give partial data to the game, causing erratic movement of the game’s camera. +german77 added [all missing data, including the gyro sensor](https://github.com/yuzu-emu/yuzu/pull/7481), to solve this issue. + +german77 also added support for the `SetNpadJoyAssignmentMode` series of services, removing some spam from the logs. +This change [also adds support for](https://github.com/yuzu-emu/yuzu/pull/7521) dual Joy-Con pairs with a single Joy-Con connected, which is something that some +games seem to do. + +After the release of `Project Kraken`, [the input rewrite](https://yuzu-emu.org/entry/yuzu-progress-report-nov-2021#projekt-kraken), analog triggers were accidentally broken. +A simple bug slipped by, causing them to only work when the joysticks were moved. +[Two lines of code were changed](https://github.com/yuzu-emu/yuzu/pull/7583), and the issue was made no more. + +german77 has also been working on making `Ring Fit Adventure` playable. +While working on implementing support for the pressure ring accessory that the game requires, german77 also ended up making some global improvements. + +One change that ended up benefiting all games is [controller type validation](https://github.com/yuzu-emu/yuzu/pull/7503), which ensures that the emulator can only +accept controller types that the game supports, while discarding and disconnecting anything else. + +A bug in the controller type validation code caused `Captain Toad: Treasure Tracker` to constantly spam the controller applet when trying to launch two-player mode. +Well, [not any more](https://github.com/yuzu-emu/yuzu/pull/7647)! Again thanks to german77. + +{{< imgs + "./toad.png| Co-op treasure hunting, what else could you ask for? (Captain Toad: Treasure Tracker)" + >}} + +## Flatpak fixes + +Following up from our previous mention [last month](https://yuzu-emu.org/entry/yuzu-progress-report-nov-2021/#graphical-fixes), [liushuyu](https://github.com/liushuyu) +continues to fight against the weirdness of [Flatpak](https://flatpak.org/). + +[NVDEC requirements are now more flexible](https://github.com/yuzu-emu/yuzu/pull/7565), the CUDA libraries are no longer mandatory, without actually affecting CUDA +decoding support. +Also, [FFmpeg](https://ffmpeg.org/) requirements have been raised to version 4.3 and higher. +This should enable native Vulkan video support later on when there is driver support for it. + +With this, decoding crashes are solved when running Flatpak builds of yuzu. + +liushuyu also solved an issue affecting the prevent sleep functionality on Flatpak. +[Implementing XDP’s Inhibit API solves the issue](https://github.com/yuzu-emu/yuzu/pull/7614), preventing the display from turning off at the worst moment while playing. + +Additionally, Flatpak builds are compiled with asserts enabled, meaning that the emulator will be stopped when an assertion fails or an out-of-bound access inside a +vector is encountered. +[Appimage](https://appimage.org/) and regular Mainline/Early Access builds are shipped with asserts disabled. + +While this usually isn’t an issue, Flatpak users reported crashes in `Pokémon Sword & Shield` when trying to set their uniform number. +As it turns out, the on-screen keyboard (OSK) was performing an out-of-bounds access when calling the number pad. +Morph [pointed the OSK to the proper array](https://github.com/yuzu-emu/yuzu/pull/7579) and the crashing stopped. + +{{< imgs + "./numpad.png| Thank you RodrigoTR for the pic! (Pokémon Sword)" + >}} + +## General changes and bugfixes + +[bunnei](https://github.com/bunnei) continues to work on the kernel rewrite, toiling away to increase the accuracy of our implementation. + +This time, by simplifying a number of functions and polishing the tracking of resources, he introduced more changes to +[improve the threading and scheduling kernel routines](https://github.com/yuzu-emu/yuzu/pull/7462). +These changes increase yuzu's parity with recent updates to the Nintendo Switch OS, and also fix a number of race conditions and crashes, such as the ones experienced in +`Pokémon Sword & Shield` and `Dead or Alive Xtreme 3 Scarlet`. + +bunnei also implemented [SetMemoryPermission](https://github.com/yuzu-emu/yuzu/pull/7621), and updated the implementation of +[SetHeapSize](https://github.com/yuzu-emu/yuzu/pull/7635), which are SVCs used by the kernel to manage the memory resources. + +Previously, `SetHeapSize` only supported setting the heap size and expanding it, which was good enough for most games. +But since some titles (such as `Donkey Kong Tropical Freeze`) may shrink this size, the implementation was updated to allow games to change the heap as needed, making it +more accurate. + +Both these changes were validated with hardware tests, ensuring that they behave as expected. + +While working on these changes, bunnei [found a bug in the service used to retrieve information of the currently executing process](https://github.com/yuzu-emu/yuzu/pull/7616). +Correcting this behaviour allowed `The Witcher 3: Wild Hunt` to boot, although there are still plenty of graphical issues to fix on this title. + +Blinkhawk also made a number of [changes to the building process](https://github.com/yuzu-emu/yuzu/pull/7497) to enforce more link time optimizations, and improve the +time needed to generate the `PDB` ([Program Database](https://llvm.org/docs/PDB/index.html)) file, which contains debug information. +If this mumbo-jumbo sounds confusing, the gist of it is that the process of building yuzu should produce more efficient code and smaller binaries now. +But feel free to skip the following few paragraphs if you're not interested in the specifics. + +Roughly speaking, compiler optimizations work on a "local" level per object. +This optimization step will [inline](https://en.wikipedia.org/wiki/Inline_expansion) some functions, merge loops, put calling and called functions close in memory for +better caching, etc. +But if a function defined in another file is called within the file, the compiler can't perform these optimizations, as it doesn't know what this external function does, +or how to optimize it. + +Link time optimizations, on the other hand, take into consideration all the functions in the project. +The linker, thus, is able to perform the same optimizations as the compiler, but more efficiently, as it is aware of the contents of all the functions defined in the project. +This comes at a price, since the process needs more memory and takes more time to finish, but it guarantees that the released binaries perform better. + +Along with this work, we considered enforcing [SSE4.2](https://en.wikipedia.org/wiki/SSE4#SSE4.2) support, improving performance but making yuzu incompatible with 12 year +old CPUs like the Core 2 Duo and Phenom II or older. +While the performance results were positive, we are still debating whether we should reduce CPU compatibility or not. + +When you open yuzu, the emulator has to take some time to measure the [RDTSC frequency](https://en.wikipedia.org/wiki/Time_Stamp_Counter), a way to measure the clock +speed of the CPU. +Due to a bit of bloat in the previous implementation, 3 full seconds were needed to complete the operation. +Morph [rewrote the whole function](https://github.com/yuzu-emu/yuzu/pull/7494) and now only 0.2 seconds (200 milliseconds) are needed to get results as accurate as +before, considerably reducing the boot times of the emulator itself. + +As previously stated, german77 continues to work towards making `Ring Fit Adventure` playable. +He has [stubbed the](https://github.com/yuzu-emu/yuzu/pull/7524) `SetNpadCaptureButtonAssignment`, `ClearNpadCaptureButtonAssignment`, `ListAlarmSettings`, and +`Initialize` services, and [added support](https://github.com/yuzu-emu/yuzu/pull/7525) for the `notif:a` service. + +With all his changes, the current Early Access build (at the time of writing this article) can boot and play the first stage of the game! + +{{< imgs + "./ringfit.mp4| Ring Fit Adventure" + >}} + +[Tatsh](https://github.com/Tatsh) [added NSP and XCI file association to Linux](https://github.com/yuzu-emu/yuzu/pull/7609). +Thanks! + +[Tachi107](https://github.com/Tachi107) [updated cubeb](https://github.com/yuzu-emu/yuzu/pull/7527) and removed now deprecated functions. +Cleaner is always better, thanks! + +[heinermann](https://github.com/heinermann) fixed a crash that would occur when the +[emulation was paused and the window was out of focus](https://github.com/yuzu-emu/yuzu/pull/7506). +Thank you! + +[jbeich](https://github.com/jbeich) changed the building configuration so that +[VA-API, one of the video decoding APIs of Linux, is enabled on Unix systems](https://github.com/yuzu-emu/yuzu/pull/7602), allowing the users who want to build targeting +BSD or other Unix-based systems to use hardware acceleration for video decoding. + +This is just one of several PRs jbeich wrote to help yuzu work on BSD systems, thank you for your contributions! + +## UI changes + +The favourites row in yuzu’s game list was always expanded, even if the user collapsed it. +epicboy [added a persistent setting](https://github.com/yuzu-emu/yuzu/pull/7570) to remember the user preference between launches. + +One of the most common issues users face is lack of Vulkan support on their PC. Not lack of hardware support, but instead missing software support caused by outdated GPU +drivers or poorly coded/outdated Vulkan injections. + +Our old error popup didn’t reflect this so [your writer](https://github.com/goldenx86), with his total lack of coding skills, +[decided to improve it](https://github.com/yuzu-emu/yuzu/pull/7532). + +{{< single-title-imgs + " " + "./vidbug.png" + "./vidfix.png" + >}} + +This is a complex issue and the main reason Vulkan is not yuzu's default API. +Users of old laptops with AMD and Intel integrated GPUs tend to use the driver shipped by either the laptop vendor or Windows Update. +In both cases, those drivers are most likely years old (yuzu can run on AMD GPUs from 2012) and either lack Vulkan support at all, or only support a portion of what’s +needed to run yuzu. +Also, since laptops, by default, connect the display directly to the integrated GPU, that’s the first Vulkan driver that will be seen, so it’s critical to have the latest +GPU driver installed *even if* your laptop has a dedicated NVIDIA GPU running the latest driver. + +While telling AMD users to [manually download and install updated drivers](https://www.amd.com/en/support) is a viable option and works as it should, in its +*infinite wisdom*, Intel decided to block manual installation of its own official drivers if a custom laptop vendor driver is in use (those modified drivers are usually +created to cheat on battery life metrics and/or to save money on cooling). + +The only alternative in those cases is to [manually download the ZIP version](https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html) +of the driver > unpack it > Launch the Device Manager > right-click the correct GPU in Display Adapters > select `Update Driver Software…` > select +`Browse my computer for driver software` > select `Let me pick from a list of device drivers on my computer` > select `Have Disk…` > then finally browse to the folder where +the driver was unpacked and select the `iigd_dch.inf` file. +What a very intuitive and user-friendly way to update a GPU driver... great job Intel. + +Here's a [video tutorial](https://www.youtube.com/watch?v=BZG50Nm5sOM&t=72s) for those that prefer visual aid over our rambling. Just make sure to use the `iigd_dch.inf` +file instead of the one shown in the slightly outdated video. +Other mentioned optimizations on the video no longer apply. + +With this *easy job* done, the Intel GPU gets full Vulkan support, runs at its intended performance, and has access to all the new features, fixes, and performance +improvements that the driver developers worked on. +The driver is also allowed to auto-update on new official releases. + +Known software that uses broken Vulkan injectors are outdated screen recorders like Bandicam, Action!, and even OBS. +We strongly recommend using an up-to-date OBS, the native encoders from the GPU vendor (Radeon ReLive and Geforce Experience), or the integrated Xbox Game Bar on Windows. +Overwolf and GShade are also known to break Vulkan support, so we **strongly** recommend avoiding them. + +## Future projects + +`Project Gaia` is progressing smoothly. Heads up, SSD users will notice improvements once it is released. + +Blinkhawk informs us that `Project Y.F.C.` will be released in smaller chunks in order to push more progressive updates instead of delaying for a big release +that would require more testing time. We want to get these updates in your hands as soon as possible! +We continue to plan to add several GPU features that have been pending. Here's a screenshot as an example: + +{{< imgs + "./golf.png| Mario Golf: Super Rush" + >}} + +That’s all folks! Thank you for your attention, and we hope to see you next month! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-dec-2021/lcu.png b/site/content/entry/yuzu-progress-report-dec-2021/lcu.png new file mode 100644 index 000000000..62d90341b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/lcu.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/mdbug.mp4 b/site/content/entry/yuzu-progress-report-dec-2021/mdbug.mp4 new file mode 100644 index 000000000..b4542aa23 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/mdbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/mdfix.mp4 b/site/content/entry/yuzu-progress-report-dec-2021/mdfix.mp4 new file mode 100644 index 000000000..159e4b269 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/mdfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/numpad.png b/site/content/entry/yuzu-progress-report-dec-2021/numpad.png new file mode 100644 index 000000000..f0f9240ab Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/numpad.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/nvidiabug.png b/site/content/entry/yuzu-progress-report-dec-2021/nvidiabug.png new file mode 100644 index 000000000..92d1e0e6f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/nvidiabug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/nvidiafix.png b/site/content/entry/yuzu-progress-report-dec-2021/nvidiafix.png new file mode 100644 index 000000000..824dd9c83 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/nvidiafix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/ringfit.mp4 b/site/content/entry/yuzu-progress-report-dec-2021/ringfit.mp4 new file mode 100644 index 000000000..259aff9fd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/ringfit.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/sc.png b/site/content/entry/yuzu-progress-report-dec-2021/sc.png new file mode 100644 index 000000000..ed4344e66 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/sc.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/summary.png b/site/content/entry/yuzu-progress-report-dec-2021/summary.png new file mode 100644 index 000000000..3287483ee Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/toad.png b/site/content/entry/yuzu-progress-report-dec-2021/toad.png new file mode 100644 index 000000000..3be064ffb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/toad.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/ue4.png b/site/content/entry/yuzu-progress-report-dec-2021/ue4.png new file mode 100644 index 000000000..a7173130a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/ue4.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/vidbug.png b/site/content/entry/yuzu-progress-report-dec-2021/vidbug.png new file mode 100644 index 000000000..216387196 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/vidbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/vidfix.png b/site/content/entry/yuzu-progress-report-dec-2021/vidfix.png new file mode 100644 index 000000000..609c9a603 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/vidfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/xc2bug.png b/site/content/entry/yuzu-progress-report-dec-2021/xc2bug.png new file mode 100644 index 000000000..6cc4882b7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/xc2bug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/xc2fix.png b/site/content/entry/yuzu-progress-report-dec-2021/xc2fix.png new file mode 100644 index 000000000..03cd0b720 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/xc2fix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2021/yfc.png b/site/content/entry/yuzu-progress-report-dec-2021/yfc.png new file mode 100644 index 000000000..3be6f9076 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2021/yfc.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/1smaa.png b/site/content/entry/yuzu-progress-report-dec-2022/1smaa.png new file mode 100644 index 000000000..3d2245da9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/1smaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/all3.png b/site/content/entry/yuzu-progress-report-dec-2022/all3.png new file mode 100644 index 000000000..493760ada Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/all3.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/alphabug.png b/site/content/entry/yuzu-progress-report-dec-2022/alphabug.png new file mode 100644 index 000000000..fa57da663 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/alphabug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/alphafix.png b/site/content/entry/yuzu-progress-report-dec-2022/alphafix.png new file mode 100644 index 000000000..624581ae9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/alphafix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/banner.png b/site/content/entry/yuzu-progress-report-dec-2022/banner.png new file mode 100644 index 000000000..075a10825 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/botwbug.png b/site/content/entry/yuzu-progress-report-dec-2022/botwbug.png new file mode 100644 index 000000000..f2f1c9354 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/botwbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/botwfix.png b/site/content/entry/yuzu-progress-report-dec-2022/botwfix.png new file mode 100644 index 000000000..425f58a55 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/botwfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/botwfxaa.png b/site/content/entry/yuzu-progress-report-dec-2022/botwfxaa.png new file mode 100644 index 000000000..de7ba88e8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/botwfxaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/botwsmaa.png b/site/content/entry/yuzu-progress-report-dec-2022/botwsmaa.png new file mode 100644 index 000000000..76be007a1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/botwsmaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/dbqbug.png b/site/content/entry/yuzu-progress-report-dec-2022/dbqbug.png new file mode 100644 index 000000000..3df6bd067 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/dbqbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/dbqfix.png b/site/content/entry/yuzu-progress-report-dec-2022/dbqfix.png new file mode 100644 index 000000000..d0046989b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/dbqfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/ds.png b/site/content/entry/yuzu-progress-report-dec-2022/ds.png new file mode 100644 index 000000000..e653dfee0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/ds.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/dynamic.png b/site/content/entry/yuzu-progress-report-dec-2022/dynamic.png new file mode 100644 index 000000000..62cc6eb97 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/dynamic.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/index.md b/site/content/entry/yuzu-progress-report-dec-2022/index.md new file mode 100644 index 000000000..bc28dbe90 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-dec-2022/index.md @@ -0,0 +1,401 @@ ++++ +date = "2023-01-10T12:00:00-03:00" +title = "Progress Report December 2022" +author = "Honghoa" +coauthor = "GoldenX86" +forum = 706631 ++++ + +Hello yuz-ers. What a year! We ended 2022 with more yuzu Fried Chicken, Vulkan changes, a new input driver, an exorbitant amount of kernel work, more performance, better visuals, and much more! + + + +## Project Y.F.C. part… 1.5, and a cache invalidation + +[Blinkhawk]() has also been working hard on his beloved project, releasing {{< gh-hovercard "9501" "Y.F.C. Part 1.5." >}} +Basically an abridged version of what is expected for the full “Part 2” release. +The changes in this pull request include a rework of the `MacroHLE` implementation to include various new macros for indirect draws and configurations. + +As discussed in previous articles, macros are small GPU programs that implement features like indirect and instanced draws. They must be emulated. +MacroHLE (High-Level Emulation) is the process of avoiding executing a requested macro and instead translating it directly to the code that it would have generated (like an instanced or indirect draw). +This works in contrast and in parallel with MacroJIT, which works by actually emulating the loops and control flow contained in macro programs in a [just-in-time](https://en.wikipedia.org/wiki/Just-in-time_compilation) fashion. + +Now, why keep both? Well, each one performs their own specialized task. +MacroHLE's advantage compared to MacroJIT has to do with the emulation of indirect calls. +An indirect call, such as a draw, uses data generated somewhere in the GPU through some shader in order to establish the draw parameters and its draw count. +Traditionally with MacroJIT we had to sync the Host GPU and Guest GPU to obtain the indirect data in order to execute the macro correctly. +With MacroHLE, we create an indirect draw command in the host GPU that points to the translated address of where the GPU generated data should be. +Thus skipping the syncing. + +Thanks to these improvements, yuzu now is able to more efficiently execute macros, considerably reducing CPU overhead, and without having to change any setting. +What we internally like to call a “passive skill”. + +As a result of these changes, performance has been improved in several titles, including those developed by Koei Tecmo, `Pokémon Scarlet and Violet`, `Bayonetta 3`, and `Monster Hunter Rise` (with the exception of version 12.0.0, which still requires further fixes) to name a few. +The crashes in `Fire Emblem: Warriors` have also been fixed. +We measured a 5-20% performance boost in select titles, but the improvement may be higher on CPUs with a lot of cache. From our testing, the 5800X3D can reach over 30% in some games. +The performance cost of rendering at higher resolutions was also greatly reduced. + +{{< imgs + "./yfc.png| R5 5600X - 2x16GB 3933MHz CL18 - RX 6600" + >}} + +But the goodies don’t end here! Blinkhawk also added support for the `VK_EXT_extended_dynamic_state2` and `VK_EXT_extended_dynamic_state3` Vulkan extensions, reducing the amount and size of shaders needed to be built during gameplay. + +This relatively “new” pair, along with the already implemented `VK_EXT_extended_dynamic_state` and `VK_EXT_vertex_input_dynamic_state`, are the four extensions responsible for considerably reducing shader building stuttering. +But as it always goes, support for these extensions in consumer GPUs is spotty at best, and a mess to support at worst. +`State3` in particular is only supported by the [NVIDIA Vulkan Beta](https://developer.nvidia.com/vulkan-driver) drivers, version 527.86 at the time of writing, and recent (late 2021 and newer) RADV Mesa drivers. +We recommend anyone interested in testing how a fresh shader cache performs to give these drivers a go. + +With no alternative, implementing these extensions forced us to perform another dreaded cache invalidation. + +{{< imgs + "./dynamic.png| Proof that the best GPUs for yuzu continue to be NVIDIA for either OS, or AMD on Linux" + >}} + +Most drivers cover at least 3 of the 4 extensions without issue, one way or another, with one glaring exception, AMD Windows drivers. +The price of this is higher stuttering during gameplay when new shaders are being processed compared to running the same card on Linux with RADV, or using any other brand. + +A small side-note, Linux RADV users should update their Mesa version to the latest (or use a more recent distro version if needed), as support for `state2` was broken in versions before 21.2. + +As a last second change, Blinkhawk tested removing the 16-bit floating point (FP16) blacklist enforced on NVIDIA Ampere and newer GPUs (RTX 3000 series and higher). If it worked, it would have allowed them to work similarly to Turing and AMD Radeon offerings in this aspect. However, NVIDIA redesigned how their FP32 and FP16 units operate on Ampere and newer, with both providing identical performance. Unfortunately, even if it were faster, it'd be irrelevant in the end, as FP16 on Ampere and Ada is still bugged in the drivers, producing graphical issues in many games. + +The only remaining architecture that could benefit from enabling blacklisted FP16 support is Intel on Windows, but their drivers are a dumpster fire regarding FP16. So they continue to emulate 16-bit precision with 32-bit the same way as Ampere and Ada, in this case with its always present performance loss. +_Of course_ the weakest architecture that could benefit the most from this change is the only one that remains broken… + +Another extra benefit of this iteration of `Y.F.C.` is that `Normal` GPU accuracy is much safer to use. +Particles will continue to be better in `High`, but games like `Pokémon Scarlet/Violet`, `Bayonetta 3`, and many others can be played with `Normal` accuracy without glitches much more regularly with the big performance benefit this provides (`Bayonetta 3` in particular still needs `High` for its title screen, but gameplay is safe on `Normal`). + +## Other awesome GPU changes, and yet more cache invalidations + +The month doesn’t stop there, there has been a plethora of changes worth mentioning too in our GPU codebase. + +Oh boy, [byte[]](https://github.com/liamwhite) sure has been busy this month. + +To start off, he is responsible for {{< gh-hovercard "9409" "implementing the SMAA anti-aliasing filter" >}} for our Vulkan and OpenGL backends. +But that’s not the whole story, so let’s elaborate further. + +`SMAA`, or enhanced subpixel morphological antialiasing, is an improvement over [MLAA](https://en.wikipedia.org/wiki/Morphological_antialiasing) developed by the Spanish Universidad de Zaragoza and video game studio Crytek, of Crysis fame. + +[BreadFish](https://github.com/breadfish64) implemented the original OpenGL version, intending to release it as part of the [resolution scaler](https://yuzu-emu.org/entry/yuzu-art/). As it turns out, implementing `SMAA` for Vulkan is no joke, and after being nagged by your writer, byte[] had to work 2 weeks to get it in shape. + +`SMAA`, being based on `MLAA`, intends to be a post-processing (aka shader-based) option focused on quality over performance by analyzing adjacent pixels, unlike `FXAA` which just blurs the entire screen. +The `SMAA` filter is implemented using render passes and it produces its best results when combined with FSR filtering. +AMD recommends properly anti-aliasing the image in their official Overview Integration Guide. +The results speak for themselves: + +{{< single-title-imgs-compare + "Here you can see an ideal test case for SMAA, the simple triangle of death" + "./noaa.png" + "./1smaa.png" + >}} + +{{< single-title-imgs + "Ropes and power lines, the classic example for anti-aliasing testing (Pokémon Scarlet)" + "./svnoaa.png" + "./svfxaa.png" + "./svsmaa.png" + >}} + +{{< single-title-imgs + "Sprite elements in 3D games benefit from it (Xenoblade Chronicles 3)" + "./xc3noaa.png" + "./xc3fxaa.png" + "./xc3smaa.png" + >}} + +For those interested, we used the `ULTRA` preset, testing showed a low performance loss even with a GT 1030, so we preferred to focus on quality. +Only users with old integrated GPUs should avoid `SMAA`. For the rest, it’s a safe option to turn on and forget. +You can find the feature in `Emulation > Configure > Graphics > Anti-Aliasing Method`. + +{{< single-title-imgs-compare + "SMAA doesn’t suffer from the horrible colour banding of FXAA (The Legend of Zelda: Breath of the Wild)" + "./botwfxaa.png" + "./botwsmaa.png" + >}} + +{{< single-title-imgs-compare + "And it's a great help for users running low resolution multipliers. This example is 0.5x Bilinear alone Vs 0.5x FSR + SMAA (Pokémon Scarlet)" + "./lowresbug.png" + "./lowresfix.png" + >}} + +{{< imgs + "./all3.png| A close-up to finish (Xenoblade Chronicles 3)" + >}} + +As a side note, NVIDIA’s version of FSR, NIS, was also tested, but the result is so ugly and over-sharpened, that we decided to keep the best option of the two, FSR. + +byte[] has also fixed a {{< gh-hovercard "9420" "problem with anisotropic filtering." >}} +If users ran the RADV driver on Linux, anisotropic filtering values other than `Default` would cause a distinct "acne-like" rendering issue in `Super Mario Odyssey`. The issue persists at other anisotropic filtering and resolution multiplier values., but byte[] continues to work on the issue. + +{{< single-title-imgs-compare + "The so called RADV acne (Super Mario Odyssey)" + "./off1bug.png" + "./off1fix.png" + >}} + +The change also addresses an issue with the buggy water rendering in `Super Mario Sunshine` with automatic anisotropic filtering on Lavapipe (Mesa, Linux), although the error still occurs at other anisotropic filtering values. + +{{< single-title-imgs-compare + "Kind of makes it look even older (Super Mario Sunshine)" + "./off2bug.png" + "./off2fix.png" + >}} + +byte[] also {{< gh-hovercard "9415" "corrected the semantics of data cache management operations" >}} in the memory. + +Previously, when the guest requested a cache invalidation, the implementation would simply invalidate the cache on the hardware, rather than making the memory visible to the GPU as intended. + +On the side, he also {{< gh-hovercard "9372" "promoted various Vulkan Extensions to use core methods." >}} In the Vulkan API, vendor extensions are optional features provided by specific hardware vendors or drivers that may not be available on all systems. In contrast, core methods are a fundamental part of the Vulkan specification and are guaranteed to be available on all systems that support the API. Thus, promoting extensions to use core methods can improve their reliability and portability. + +byte[] made further {{< gh-hovercard "9393" "initialization tweaks to the Vulkan API." >}} These changes included the restoration of `VK_KHR_timeline_semaphore` and `VK_EXT_host_query_reset`, which were mistakenly removed in a previous PR. He also added the flag `VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR` to the `VkInstanceCreateInfo` structure for `MoltenVK` to allow `MoltenVK` to be detected as an available Vulkan device. + +Keep in mind that a lot more work is needed in order to get yuzu rendering on macOS devices. This is only early preliminary work. + +[vonchenplus](https://github.com/vonchenplus) has implemented the {{< gh-hovercard "9401" "draw manager for Maxwell3D" >}} with the aim of eliminating workarounds and reorganising the drawing process to more accurately enumerate the drawing behaviour. +As a result of these changes, the issue in `Dragon Quest Builders` where some 3D models were not rendering properly has been fixed. + +{{< single-title-imgs-compare + "No more missing stuff! (Dragon Quest Builders)" + "./dbqbug.png" + "./dbqfix.png" +>}} + +{{< imgs + "./ds.png| No armour is best armour (DARK SOULS)" + >}} + +Following these changes, vonchenplus also {{< gh-hovercard "9406" "improved the code for the topology update logic" >}} so that the implementation is more accurate. This change was necessary in order to {{< gh-hovercard "9423" "implement special topologies with Vulkan." >}} + +This includes support for `quad strips`, which require the use of triangles to simulate them, and the ability to simulate indexed and non-indexed modes. +In non-indexed mode, a fixed mapping table is used to connect the vertices, while in indexed mode, a compute shader is used to dynamically map the original drawing indices. +vonchenplus has also implemented support for line loops, which require the use of triangle lists to simulate them, and for polygons, which require the use of triangle fans. + +These changes fixed the Hero's path in `Legend of Zelda: Breath of the Wild`, as well as the Status Summary graphic in `Pokémon Scarlet and Violet`, and they also gave us another shader cache invalidation, yay! + +{{< single-title-imgs-compare + "Don’t mess with the stats! Can’t do breeding without the stats! (Pokémon Scarlet)" + "./pokebug.png" + "./pokefix.png" +>}} + +{{< single-title-imgs-compare + "When the Sheika GPS signal returns (The Legend of Zelda: Breath of the Wild)" + "./botwbug.png" + "./botwfix.png" +>}} + +Blinkhawk has added {{< gh-hovercard "9383" "alpha to coverage and alpha to one" >}} to our Vulkan backend. + +`Alpha to coverage` is a multisampling technique that is used to improve the quality of transparent or partially transparent pixels. +It works by blending the alpha values of multiple samples taken from the same pixel to produce a single, more accurate result. +This can help to reduce aliasing and other rendering artifacts that can occur when rendering transparent pixels. + +`Alpha to one`, on the other hand, is a technique that is used to improve the quality of partially transparent pixels by setting the alpha value of each pixel to a maximum of `1.0`. +This can help to reduce the amount of alpha blending that needs to be performed, which can improve the performance of the rendering pipeline. + +These changes have fixed the shading of trees and grass problems when viewed up close or from a distance in `Pokémon Scarlet and Violet`. + +{{< single-title-imgs-compare + "The camera isn’t more interested in that tree, you should learn from this, Dark Souls (Pokémon Scarlet)" + "./alphabug.png" + "./alphafix.png" +>}} + +vonchenplus has corrected errors caused by yuzu's faulty detection of draw types. +In the past, yuzu would set every vertex and index count register to zero after each draw to determine if the next draw would be a regular or indexed draw. +`Xenoblade Chronicles 3` proves to us that these registers initiate some draw calls based on previous values. +{{< gh-hovercard "9353" "Changing this behaviour" >}} partially fixes the particles present in `Xenoblade Chronicles 3`. You can now more easily perform your off-seer duties. + +{{< imgs + "./xc3.mp4| Meat is on the menu! (Xenoblade Chronicles 3)" + >}} + +## CPU requirement changes, with free performance + +We don’t usually cover compilation changes here, but this time we had to do it because it affects compatibility. + +[Your writer](https://github.com/goldenx86) (or co-writer in this progress report, my [partner](https://github.com/kurenaihana) did most of the work this time) has been playing with compilation flags in order to get more free performance, following previous work done by Blinkhawk some time ago. + +Microsoft Visual C++ (MSVC, Visual Studio) is simple enough (we’ll talk about Linux later). You enable full program optimizations, optimize for performance instead of size, a bit here, a bit there, and you gain a nice 3%, but I wanted more. +Last month, [epicboy](https://github.com/ameerj) improved the build process, saving both time and memory. This created a “gap” big enough to enable the *Big One*, {{< gh-hovercard "9442" "Link-Time Optimizations" >}} (LTO), an optimization that in the past had to be discarded for eating all the available RAM of our buildbots. + +Windows testing went well and in some cases the performance uplift reached up to 12%. +The problem was Linux. LTO is aggressive by nature, and there’s no guarantee that all parts of the project will react nicely to it. +In this case, the problem was Qt, the UI looked completely garbled. +So LTO had to go, but in its place, we now require what [Dynarmic](https://github.com/merryhime/dynarmic/) already did for a while, [x86-64-v2](https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels) hardware. + +GCC and Clang builds will now compile assuming the features of CPUs are compatible with the instruction sets that form part of x86-64-v2, the highest one being SSE4.2. +This means the minimum CPU required for yuzu to work without crashing, in both Windows and Linux, is now the first generation of Core i-series (500-900 series), which are almost 15 years old, and the FX and APU series from AMD, which are almost 12 years old. +The performance boost on GCC and Clang is up to 7%. + +{{< single-title-imgs + "First system runs i7-12700H - 2x16GB 4800MHz CL40 - RTX 3080 Mobile 16GB 175W, second system runs R7 5800X3D - 2x16GB 3600MHz CL16 - RTX 4090" + "./lto1.png" + "./lto2.png" + >}} + +We originally wanted to enforce x86-64-v3 to get an even bigger performance boost, as well as to ensure a minimum level of performance, as any CPU lacking AVX, AVX2, and in particular, FMA, will be ***very*** slow, no matter its clock speed or core count. + +Yes, that means the 8 core Ivy Bridge Xeon you bought for 20 bucks is *not* fast enough for this task. + +The problem, however, is that doing so would leave close to 9% of the user base out of support, according to our telemetry. +That many users is a considerable number, so we've decided to wait until more users adopt more modern CPUs before implementing this change. +We’ll re-evaluate enforcing x86-64-v3 in the future once OpenGL eventually ends up on the chopping block as well. + +While this change would also apply for Windows, MSVC is not flexible enough to let us build for x86-64-v2, it either supports SSE2, or jumps straight to the first AVX. +Dynarmic already manually uses x86-64-v2 extensions, so any CPU lacking SSE4.2 is considered unstable regardless of the OS in use. + +x86-64-v4 will not be an option for many years, mainly because Intel can’t decide if AVX-512, made by themselves, is something that their users should be allowed to actually use. + +If an old-school user is so strongly set on running yuzu on decades old CPUs, the Flatpak builds are still generic, or there’s always the option of building yuzu manually, allowing you to configure any requirements. + +## New Joy-Con driver and other input improvements + +[german77](https://github.com/german77) has done it again, giving us an amazing Christmas gift, a {{< gh-hovercard "9492" "new input driver for Joy-Cons" >}} +This is an in-house development that doesn’t rely on SDL, so it gives us much more freedom to add features that weren’t previously available. + +The basics are covered. Single and Dual Joy-Con modes are available, button, stick, motion mapping works the same as before. +But that's not exciting, here’s all the new stuff that was added: + +* When launching yuzu, the controller player LEDs will show a blinking pattern to signal that the emulator has taken control. Once you’re in game, the LEDs will reflect the player number. +* HD Rumble is fully implemented now, complete parity to pairing natively. +* The emulator can now automatically select between automatic and custom calibration profiles, avoiding stick drift (as much as the Joy-Con can physically do, we can’t fix Nintendo’s problems) and providing much more accurate motion. +* Colour reading is added, now the actual colour of the controller is reflected in the UI and in games, just like on Switch. +* Amiibos can now be loaded with the Joy-Con just like you do on the Switch. +* The Ring Controller is now fully supported, no need for external programs. +* Preliminary support for the IR camera is done, games like `Night Vision`, `Game Builder Garage`, and `Nintendo Labo` can make use of this neat feature at the base of the right Joy-Con. + +All this extra accuracy highlights a problem we didn’t often face before: PC Bluetooth connections are very easy to saturate. Cheaper/Intel bluetooth chipsets or areas with tons of interference are especially prone to this. +For this reason, HD Rumble can potentially cause lag depending on the user’s specific circumstances. We recommend unmapping/disabling rumble in those cases. + +Speaking of saturation, the IR camera may be slow in some games. The reason being that we currently implement only the image transfer mode, which saves 320x240 pictures. Some games prefer faster framerates at the cost of resolution, going as low as 40x30. +Once all modes are added in, the choppy framerate will disappear. + +Amiibo data writing is a work in progress. + +german77's desire for incredible input improvements doesn't end there. + +german77 implemented the {{< gh-hovercard "9369" "`mifare` service," >}} allowing games read and write plain mifare tags. +Games like `Skylanders Imaginators` make use of this feature. +The only feature lacking is support for encrypted read and writes. + +{{< imgs + "./sky.png| Tagging! (Skylanders Imaginators)" + >}} + +Speaking of SDL, a recent update broke the way it handled the GUID, the identifier of several controllers, including the one integrated into the Steam Deck, causing many annoyances for Deck users. +So, with no alternative on hand, german77 had to implement a {{< gh-hovercard "9404" "custom filter" >}} to solve the issue. + +And lastly, as a very important quality of life change, german77 made the {{< gh-hovercard "9495" "input device list refresh automatically," >}} ensuring that yuzu detects controllers without the need for manual intervention. +Goodbye tiny refresh button! + +To close the section, [MonsterDruide1](https://github.com/MonsterDruide1) {{< gh-hovercard "9489" "increased the accuracy of analog sticks" >}} for TAS by hardcoding the range and deadzones of the user input. + +## Kernel, building, and core changes + +With an update for Dynarmic and SDL2, byte[] enabled {{< gh-hovercard "9374" "support for ARM64" >}} compilation. +This means all Switch titles can be tested on Linux ARM64 devices with compatible Vulkan drivers. + +As part of this effort, we started implementing Flatpak support for ARM64 Linux devices. This {{< gh-hovercard "9419" "required making OpenGL optional" >}} for the build process, as Flatpak’s Qt build only supports OpenGL ES, not the full fledged OpenGL 4.6 compatibility profile we require. + +Part of these changes fixed compilation for macOS, but the situation remains the same, without `MoltenVK` support, nothing will be rendered. + +epicboy implemented a series of changes with the goal of minimizing the overhead of dynamic memory allocation, a task which involves requesting memory from the operating system, and can slow-down performance in some circumstances. + +The texture cache, in particular, was a significant contributor to this issue, as it constantly allocated and then deallocated memory when transferring textures to and from the GPU. +To address this problem, epicboy optimized the texture cache to {{< gh-hovercard "9490" "pre-allocate a buffer to store swizzle data" >}} and reuse it whenever possible, rather than performing a dynamic memory allocation every time this was done. +This change should result in reduced stuttering, as memory will now only be requested from the operating system if the buffer is not large enough to hold the data. + +epicboy also made similar changes to {{< gh-hovercard "9508" "optimise the `ReadBuffer` function" >}}, which likewise takes a similar approach: instead of allocating and deallocating memory, a buffer is created once to hold data in the memory, and it only reallocates whenever it needs to grow. + +Additionally, he introduced a {{< gh-hovercard "9453" "`ScratchBuffer` class" >}} to act as a wrapper around a heap-allocated buffer of memory. + +The advantage of this class lies with the fact that it eliminates the need to initialize the stored values, and the need to copy the data when the buffer needs to grow. +Thus, it would help to speed up things by minimizing the amount of time spent on memory management tasks. + +german77 implemented {{< gh-hovercard "9444" "the `FreeThreadCount` info type," >}} which is needed by titles such as `Just Dance 2023 Edition` (although that game requires additional changes in order to work). + +[Saalvage](https://github.com/Saalvage) noticed an error in yuzu's kernel implementation and made the necessary changes to {{< gh-hovercard "9411" "unlock thread mutex before destruction," >}} as not doing so incurs an undefined behaviour. “Here be Dragons” and all that. + +byte[] submitted a change that {{< gh-hovercard "9398" "improves the handling of system startup failure," >}} in order to prevent deadlocks and crashes when/if the GPU initialization fails. + +He also {{< gh-hovercard "9474" "added `KHardwareTimer`." >}} +This component is designed to fix an issue with incorrect event unregistration when threads request a timeout for certain operations. + +Without the fix, the threads would return successfully from the operation but fail to cancel the timeout, which would cause the timer to mistakenly fire on the thread and cancel a random unrelated operation. + +This change fixes the random hangs that have been plaguing us for months in `The Legend of Zelda: Breath of the Wild`, as well as `Persona 5 Royal`. + +{{< imgs + "./p5.png| The soundtrack that steals your heart (Persona 5 Royal)" + >}} + +byte[] also introduced a {{< gh-hovercard "9496" "workaround for crashes caused due to unallocated memory" >}} after noticing that yuzu always used memory blocks without marking them as allocated, causing it to overlap memory used by the game. +He fixed the bug by making sure we now allocate the memory before using it. +This is meant to alleviate the situation while other parts of the kernel are being ironed out. + +This is more related to error handling, but counts nonetheless. +byte[] added an option to {{< gh-hovercard "9370" "force the emulator to break when an invalid memory access happens." >}} +This means that if/when a game explodes in the background, the emulator will crash instead of slowly eating all the available system RAM. +Problems like these can be caused by emulation issues, damaged game dumps, or even some wonky mods, so it’s always a better option to avoid crashing the entire emulator, and if the user has little enough RAM, making the OS suffer. + +Along with endless silent changes that don’t get mentioned here, [lioncash](https://github.com/lioncash) made some changes to the input code to {{< gh-hovercard "9389" "reduce memory use ever so slightly." >}} + +## User interface and audio changes + +We've had some interesting user interface quality of life changes implemented! +lioncash made the {{< gh-hovercard "9394" "SPIR-V shader backend element translatable," >}} so it doesn’t always show in English for everyone. +The community effort working on translation can now take the label and update it accordingly. + +{{< imgs + "./spirv.png| We still don’t recommend using it over GLSL, but Mesa users report they enjoy it" + >}} + +Some months ago, with the core timing changes, we allowed users to boot games with their framerate unlocked after continuous requests from the community. +As it turns out, nothing changed. Several games hate booting with unlocked framerates, and the support channels get their fair share of people asking why their game doesn’t want to boot. +So, simple fix, {{< gh-hovercard "9425" "unlocked framerate at boot rights denied." >}} +The hotkey to toggle unlocked framerate is `Ctrl + U` by default, only a small nuisance. + +Users reported that they couldn’t record or stream their yuzu window while in windowed mode. +byte[] found the cause was setting the `WA_DontCreateNativeAncestors` Qt property for all platforms, instead of just for wayland. +{{< gh-hovercard "9461" "Issue down, streamers rejoice." >}} + +Discord user piplup reported that yuzu didn’t save the device name (what you would call the console) after accessing a game’s custom configuration window. +german77 {{< gh-hovercard "9466" "fixed the issue" >}} (this particular setting lacked a custom configuration equivalent), and also fixed Qt 6 build issues while at it. + +Another very nice quality of life improvement made by german77 is making yuzu {{< gh-hovercard "9467" "remember the last selected directory" >}} for `Install files to NAND…`. +If you keep your dumps in the same folder, updating your games is going to take fewer clicks now. + +byte[] managed an amazing victory in the war against crashes when closing/stopping games. He worked on {{< gh-hovercard "9476" "making shutdown not visibly freeze yuzu," >}} avoiding crashing the emulator while the game quits, and showing a nice pop-up message while at it too! + +{{< imgs + "./shutdown.png| We take longer than the Switch, but some games really love to take their time on console" + >}} + +[Morph](https://github.com/Morph1984) helped make this possible by {{< gh-hovercard "9477" "hiding button dialog boxes," >}} allowing for the creation of the dialog overlay byte[] added. + +Another battle fought on this front is related to homebrew apps. byte[] is responsible for {{< gh-hovercard "9486" "making them quit properly" >}} now too. + +[ChrisOboe](https://github.com/ChrisOboe) suddenly shows up with a glorious quality of life fix for the terminal-based yuzu-cmd build. +Marking the build as a “Windows” application instead of a “Console” one {{< gh-hovercard "9485" "ensures that no empty command line window pops up" >}} needlessly. +This can help streaming programs set up to run specific games with yuzu-cmd, as this prevents the sudden empty black box from appearing in front of other windows. + +For our single audio change of this month, [Maide](https://github.com/Kelebek1) properly {{< gh-hovercard "9455" "signals a buffer event on audio stops," >}} fixing an early softlock that affected the `Pokémon Brilliant Diamond/Shining Pearl` games. + +## Future projects + +We’re only a few days into 2023 and we already want to publish the next progress report. So much has happened in such a short time! + +Also, Blinkhaw, bunnei, and byte[] are up to something, and we can’t wait to tell you more. +And yes, there will be yet more cache invalidations. All in the name of progress. + +That’s all folks! Expect a few but *very* critical Vulkan improvements next time, hope to see you then! + +⭐⭐⭐ +Grande Messi + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-dec-2022/lowresbug.png b/site/content/entry/yuzu-progress-report-dec-2022/lowresbug.png new file mode 100644 index 000000000..af7cc09bc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/lowresbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/lowresfix.png b/site/content/entry/yuzu-progress-report-dec-2022/lowresfix.png new file mode 100644 index 000000000..4afff0921 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/lowresfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/lto1.png b/site/content/entry/yuzu-progress-report-dec-2022/lto1.png new file mode 100644 index 000000000..fbd2a8d47 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/lto1.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/lto2.png b/site/content/entry/yuzu-progress-report-dec-2022/lto2.png new file mode 100644 index 000000000..7367aa617 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/lto2.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/noaa.png b/site/content/entry/yuzu-progress-report-dec-2022/noaa.png new file mode 100644 index 000000000..3c9114273 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/noaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/off1bug.png b/site/content/entry/yuzu-progress-report-dec-2022/off1bug.png new file mode 100644 index 000000000..047f27669 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/off1bug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/off1fix.png b/site/content/entry/yuzu-progress-report-dec-2022/off1fix.png new file mode 100644 index 000000000..c90e35f6b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/off1fix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/off2bug.png b/site/content/entry/yuzu-progress-report-dec-2022/off2bug.png new file mode 100644 index 000000000..b7e622a11 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/off2bug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/off2fix.png b/site/content/entry/yuzu-progress-report-dec-2022/off2fix.png new file mode 100644 index 000000000..de750f739 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/off2fix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/p5.png b/site/content/entry/yuzu-progress-report-dec-2022/p5.png new file mode 100644 index 000000000..4a3929fd6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/p5.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/pokebug.png b/site/content/entry/yuzu-progress-report-dec-2022/pokebug.png new file mode 100644 index 000000000..c1182d6d1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/pokebug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/pokefix.png b/site/content/entry/yuzu-progress-report-dec-2022/pokefix.png new file mode 100644 index 000000000..26021a334 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/pokefix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/shutdown.png b/site/content/entry/yuzu-progress-report-dec-2022/shutdown.png new file mode 100644 index 000000000..030c4829c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/shutdown.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/sky.png b/site/content/entry/yuzu-progress-report-dec-2022/sky.png new file mode 100644 index 000000000..3fd03411a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/sky.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/spirv.png b/site/content/entry/yuzu-progress-report-dec-2022/spirv.png new file mode 100644 index 000000000..a160199fd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/spirv.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/summary.png b/site/content/entry/yuzu-progress-report-dec-2022/summary.png new file mode 100644 index 000000000..53e812656 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/svfxaa.png b/site/content/entry/yuzu-progress-report-dec-2022/svfxaa.png new file mode 100644 index 000000000..76632734b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/svfxaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/svnoaa.png b/site/content/entry/yuzu-progress-report-dec-2022/svnoaa.png new file mode 100644 index 000000000..b0f65f469 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/svnoaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/svsmaa.png b/site/content/entry/yuzu-progress-report-dec-2022/svsmaa.png new file mode 100644 index 000000000..f192dec8b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/svsmaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/xc3.mp4 b/site/content/entry/yuzu-progress-report-dec-2022/xc3.mp4 new file mode 100644 index 000000000..3a6d21020 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/xc3.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/xc3fxaa.png b/site/content/entry/yuzu-progress-report-dec-2022/xc3fxaa.png new file mode 100644 index 000000000..503b17cac Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/xc3fxaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/xc3noaa.png b/site/content/entry/yuzu-progress-report-dec-2022/xc3noaa.png new file mode 100644 index 000000000..3f530bf9c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/xc3noaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/xc3smaa.png b/site/content/entry/yuzu-progress-report-dec-2022/xc3smaa.png new file mode 100644 index 000000000..1a8a7c485 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/xc3smaa.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2022/yfc.png b/site/content/entry/yuzu-progress-report-dec-2022/yfc.png new file mode 100644 index 000000000..926dfe08c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2022/yfc.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/async.png b/site/content/entry/yuzu-progress-report-dec-2023/async.png new file mode 100644 index 000000000..61a58d601 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/async.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/banner.png b/site/content/entry/yuzu-progress-report-dec-2023/banner.png new file mode 100644 index 000000000..18da499fc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/batman.png b/site/content/entry/yuzu-progress-report-dec-2023/batman.png new file mode 100644 index 000000000..f686fa366 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/batman.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/bayo3.png b/site/content/entry/yuzu-progress-report-dec-2023/bayo3.png new file mode 100644 index 000000000..4200a7d7d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/bayo3.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/config1.gif b/site/content/entry/yuzu-progress-report-dec-2023/config1.gif new file mode 100644 index 000000000..04d9adaee Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/config1.gif differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/config2.png b/site/content/entry/yuzu-progress-report-dec-2023/config2.png new file mode 100644 index 000000000..d0bc35747 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/config2.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/config3.png b/site/content/entry/yuzu-progress-report-dec-2023/config3.png new file mode 100644 index 000000000..52cc0178d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/config3.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/config4.png b/site/content/entry/yuzu-progress-report-dec-2023/config4.png new file mode 100644 index 000000000..9a79f34e6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/config4.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/config5.png b/site/content/entry/yuzu-progress-report-dec-2023/config5.png new file mode 100644 index 000000000..349802c7f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/config5.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/config6.png b/site/content/entry/yuzu-progress-report-dec-2023/config6.png new file mode 100644 index 000000000..593ddf9e1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/config6.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/doabug.png b/site/content/entry/yuzu-progress-report-dec-2023/doabug.png new file mode 100644 index 000000000..a0f3dd5df Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/doabug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/doafix.png b/site/content/entry/yuzu-progress-report-dec-2023/doafix.png new file mode 100644 index 000000000..d07e4ee2d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/doafix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/few.png b/site/content/entry/yuzu-progress-report-dec-2023/few.png new file mode 100644 index 000000000..5818418af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/few.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/fnrbug.png b/site/content/entry/yuzu-progress-report-dec-2023/fnrbug.png new file mode 100644 index 000000000..f543e5669 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/fnrbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/fnrfix.png b/site/content/entry/yuzu-progress-report-dec-2023/fnrfix.png new file mode 100644 index 000000000..7f08f6b2f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/fnrfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/fxaabug.png b/site/content/entry/yuzu-progress-report-dec-2023/fxaabug.png new file mode 100644 index 000000000..70b1c88af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/fxaabug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/fxaafix.png b/site/content/entry/yuzu-progress-report-dec-2023/fxaafix.png new file mode 100644 index 000000000..a7e5dd5d1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/fxaafix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/hwde.png b/site/content/entry/yuzu-progress-report-dec-2023/hwde.png new file mode 100644 index 000000000..16f9d5e21 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/hwde.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/index.md b/site/content/entry/yuzu-progress-report-dec-2023/index.md new file mode 100644 index 000000000..e41dc76dc --- /dev/null +++ b/site/content/entry/yuzu-progress-report-dec-2023/index.md @@ -0,0 +1,539 @@ ++++ +date = "2024-01-10T12:00:00-03:00" +title = "Progress Report December 2023" +author = "GoldenX86" +forum = 982561 ++++ + +Happy New Year, yuz-ers! We say goodbye to 2023 with several great changes, ranging from driver fixes to big memory savings, and quite a bit in between! Let’s go. + + + +## Graphics changes and driver fixes + +### Vulkan + +Drivers are fantastical creatures. +They love to exhibit major behavioural changes while still following the Vulkan specification — or more correctly for this issue, the SPIR-V specification. + +Such was the case with NVIDIA drivers. +Since the release of the 540 branch back in September, users have reported sudden crashes when building specific shaders in games, the most common example being some cutscenes and scenarios in `Bayonetta 3`. However, the problem extended to many other games in unexpected places. + +After investigating the issue, your writer and [byte[]](https://github.com/liamwhite) came to the conclusion that the problem was not the drivers, but a miscompilation in yuzu's shader compiler for [texture gradient](https://registry.khronos.org/OpenGL-Refpages/gl4/html/textureGrad.xhtml) operations. + +Pesky shaders, why don’t we just make them disappear? Well, if you like your games displaying anything besides a [black out](https://www.youtube.com/watch?v=6Peinf-xQWg), you want them, all of them. + +In some cases, yuzu would incorrectly (and unintentionally) fetch the gradient derivatives as integers (U32), when they were intended to be reinterpreted bitwise as floats (F32). +While older drivers would implicitly reinterpret when using the wrong type, the 540 driver series will throw a proper shader validation error, which is the correct behaviour for a bug like this. + +This meant that if a user with any NVIDIA GPU loaded a pipeline cache with the affected shader after updating to a 540 series driver, or reached a moment where a new affected shader would be built, the game would crash. +At the same time, if the user reverted the driver to the older 536/537 series drivers, the same cache would work fine. + +Culprit found (it was us the whole time), sentence dictated: texture gradient operations will now {{< gh-hovercard "12435" "enforce F32 types on derivatives" >}} to comply with the SPIR-V specification. +Now games don’t have to crash, users can keep their drivers up to date, and your writer sleeps peacefully at night knowing this is resolved. +Anyone using an NVIDIA GPU, regardless of operating system, feel free to update to the latest release for your platform. + +{{< imgs + "./bayo3.png|Magical Infernal Ladies Fighting (Bayonetta 3)" + >}} + +Android users have a knack for finding bugs, partially thanks to the different set of default settings we use for the small screen. +Handheld mode, for example, is selected by default to improve performance (Mali users appreciate this substantially) and save a tiny bit of RAM, but hey, we’re not in the Android section yet! + +`Fight'N Rage`, a fantastic beat’em up, had its screen cut in half in handheld mode, something most desktop users missed since it runs fine in docked mode. +The issue was — and this is a classic for sprite games by now — in how swizzle and window origin adjustments were being handled. +Viewport transform and window origin mode are handled separately in the GPU, so {{< gh-hovercard "12235" "splitting the two jobs" >}} is what doctor byte[] ordered. Feel free to smash that attack button now. + +{{< single-title-imgs-compare + "Quite a big difference (Fight'N Rage)" + "./fnrbug.png" + "./fnrfix.png" +>}} + +Guess who’s back. A game that is special in many aspects, an emulator itself, one of the few native Vulkan titles on the Switch, a game that is even out of print in an era of digital releases, and the reason byte[] started contributing to yuzu. + +That’s right, `Super Mario 3D All-Stars` is back in a report, this time addressing one of its remaining interesting quirks: the incredibly slow performance of its intro video on non-NVIDIA and non-Mesa drivers. + +The quirkiness was the result of the game causing yuzu to continuously recreate its swapchain on every single frame. +A swapchain is a set of framebuffer images used by the graphics API and the GPU to draw to the screen. + +The game used one of its framebuffer images as sRGB during startup, which caused yuzu to detect it as sRGB. The other framebuffer image was only used as linear. Since yuzu tries to respect the colorspace of the output image, this problem was causing yuzu to incorrectly think it needed to recreate the swapchain on every single frame. +This constant, per-frame swapchain recreation is not that expensive on NVIDIA and Mesa drivers, but anything else (Intel, AMD, Android drivers) can spend as much as 30ms processing this switching. +That’s around 30 FPS lost in a game supposed to render at 60! + +How do we avoid this? Well, Vulkan always interprets any framebuffer currently being presented to screen as sRGB, so replacing the frame with a non-sRGB one is just adding unnecessary additional work and pissing off several drivers. +Changing the logic to {{< gh-hovercard "12274" "ignore sRGB in framebuffer images" >}} provides smooth frametimes for users of these drivers. + +{{< imgs + "./sm3d.png|What does Mario do with that many stars? Not sing Peaches I hope (Super Mario 3D All-Stars)" + >}} + +On a related note, let’s talk about presentation limits and how they affect asynchronous presentation, which moves presenting to the screen to a different CPU thread. + +Due to several factors, yuzu’s Vulkan renderer could only process up to 6 frames at a time. +While this isn’t normally an issue on desktop, especially for users that don’t enable Asynchronous Presentation (available in `Emulation > Configure… > Graphics > Advanced`), Android, a platform that demands always using asynchronous presentation, showed us that low enough performance with the setting toggled on, regardless of OS or platform, can cause the queue of swapchain images to grow beyond the limit of 6 frames. Thus, leading to a driver crash and your progress being lost. Ouch. + +{{< imgs + "./async.png|Feel free to test enabling it now" + >}} + +Android users found a workaround to this very early on: lowering the game speed limit under 100%, which slowed down the presentation rate, thereby usually keeping yuzu under the 6 frame limit. + +While that technically worked, the idea is to run games at least at 100% speed whenever possible, right? + +The easy solution byte[] found for this problem after identifying it was to {{< gh-hovercard "12345" "force the presentation process to wait" >}} before reaching the limit, improving stability substantially on low-end hardware, including Android devices, while also improving input lag! +Now asynchronous presentation is safe to use, improves frametimes, reduces input latency, and does your laundry! That’s a solid win for everyone. + +Enough about presentation, let’s talk about clip distance instead now. +I can hear you asking in the back, "what the living Koopa Castle is a clip distance?" + +Most GPUs allow shaders to set up custom clipping planes for vertex data, which allows the GPU to cut geometry invisible to the viewport with no extra triangles generated or rendering cost. +The members of `gl_ClipDistance`, a global variable and float array declared in the shader, represent the distance to the clipping plane on each vertex. + +Many games use these values, including `Red Dead Redemption`, `Fire Emblem Warriors: Three Hopes`, `DEAD OR ALIVE Xtreme 3 Scarlet`, `Hyrule Warriors: Definitive Edition`, and `Portal`. +Weird group, isn’t it? A cowboy, a skimpy Japanese fighter, two medieval warriors, and a Companion Cube walk into a bar… + +On most desktop drivers, the default values for all global variables will be zero implicitly. +However, SPIR-V says that these values are actually undefined. +This assumption broke rendering in `Portal` on the radv Mesa driver ― for clip distances specifically. + +byte[]'s {{< gh-hovercard "12403" "first fix" >}} attempted to only declare an array of clip distances as large as actually needed, which would prevent any undefined values from persisting in the array. +While some shaders (like those used in `Portal`) write directly to the clip distance array values, others (like in `Red Dead Redemption`) use a loop variable to access the array. +Thus, the first fix attempt resulted in declaring an array of zero clip distances in those games, which is illegal in SPIR-V. + +{{< imgs + "./doabug.png|Emulation, when The Void does indeed stare back (DEAD OR ALIVE Xtreme 3 Scarlet)" + >}} + +After revisiting the issue, byte[] {{< gh-hovercard "12487" "implemented a more robust solution:" >}} when clip distances are used, always declare an array of as many clip distances as the host driver supports, and use a default value to ensure the array members are all set to zero, avoiding any undefined behaviour. +All drivers except Mali support eight clip distances; Mali supports *zero*, so a special case had to be made for this driver. +Mali moment #1. + +{{< single-title-imgs + "This was a triumph" + "./doafix.png" + "./rdr.png" + "./hwde.png" + "./few.png" + "./portal.png" + >}} + + +GPUs often work with texture data in a variety of formats. +Among the parameters used by compressed textures like ASTC and BCn is `pitch`, which is the size of one row of compressed blocks. +This eventually gets divided by the block size of the texture by the emulator, giving the number of blocks per row. +This worked flawlessly for linear 1x1 block-sized uncompressed textures, but broke compressed ones that have larger block sizes. +Vulkan expects the pitch to be the number of texels (the minimum unit of a texture map, think of pixels but for textures) per row, plus some padding, but yuzu was calculating the value incorrectly. + +{{< single-title-imgs-compare + "A new tournament begins (THE KING OF FIGHTERS XIII GLOBAL MATCH)" + "./kofbug.png" + "./koffix.png" +>}} + +{{< gh-hovercard "12479" "Fixing the buffer row length," >}} and, while at it, tuning the software BCn decoder Mali needs (Mali moment #2), is how [GPUCode](https://github.com/GPUCode) fixed the rendering of `THE KING OF FIGHTERS XIII GLOBAL MATCH` and the Eatsa Pizza minigame from `Mario Party Superstars`. + +{{< imgs + "./pizza.png|Your writer is old enough to remember playing this on the Nintendo 64 (Mario Party Superstars)" + >}} + +That ends the Vulkan section, so what’s left is to follow up with the: + +{{< imgs + "./opengl.png|And you can’t prove Khronos wrong" + >}} + +### OpenGL + +Because [epicboy](https://github.com/ameerj) won’t let the old API rest. + +One remaining issue (of many) for the OG open API was a bug with the shadows of `Metroid Prime Remastered`. +By bringing the {{< gh-hovercard "12412" "counter query accuracy," >}} which was first seen in Vulkan, to OpenGL, this issue is now solved. + +{{< imgs + "./metroid.png|SPAAAAACE (Metroid Prime Remastered)" + >}} + +OpenGL users saw another win with the implementation of two fixes for `Xenoblade Chronicles 3`. +This is particularly important for AMD users, Windows or Linux, since most AMD GPUs can’t avoid vertex explosions while running the game with Vulkan in the Pentelas region of the main story, and the DLC, Future Redeemed. + +First, by {{< gh-hovercard "12415" "implementing" >}} the `DrawTransformFeedback` macro, which is the OpenGL equivalent of Vulkan’s `DrawIndirectByteCount`, particles were fixed. + +{{< imgs + "./xc3.mp4|Remember the Game Awards flute guy? (Xenoblade Chronicles 3)" + >}} + +And second, a lesson of how a simple typo can cause havoc, {{< gh-hovercard "12377" "fixing the transform feedback binding" >}} from `strides` to `sizes` stopped the grass in the game from becoming some space demon abomination. + +{{< single-title-imgs-compare + "That experiment really went wrong, Dr. (Xenoblade Chronicles 3)" + "./xc3bug.png" + "./xc3fix.png" +>}} + +With these changes, AMD users suffering from the Pentelas/DLC vertex explosion bug can safely play the game in OpenGL. + +But you know what would help even more? If epicboy also added more optimizations for the AMD proprietary OpenGL driver. {{< gh-hovercard "12437" "Which is exactly what he did." >}} + +With the release of the new OpenGL driver back in [July of 2022](https://yuzu-emu.org/entry/yuzu-progress-report-jul-2022/#amd-opengl-25-years-in-the-making), several unsavoury workarounds that yuzu code had for the red vendor could be removed (and now have been), improving performance. + +## Android adventures, and kernels with benefits + +Instead of a bulleted list like in previous articles, let’s start with the big change first. + +### Saving RAM makes games boot fast + +One of the properties of the Linux kernel, which GNU/Linux distributions and Android benefit from, is its flexibility and constant progress made by the community and contributors. +One such case is the Linux kernel extension [MADV_REMOVE](https://man7.org/linux/man-pages/man2/madvise.2.html), which allows for freeing up a given range of memory pages, "punching a hole" in the specified range of memory. + +Thanks to byte[]’s work, the emulator can {{< gh-hovercard "12358" "take advantage" >}} of this extension to remove the requirement of needing 3GB of free RAM immediately after booting a game, and to also significantly decrease boot times while at it. +Memory isn’t a problem for most users with 16GB of system RAM (unless you have too many background processes), but for users with 8GB or lower running an OS with a Linux kernel (desktop Linux or Android), this greatly reduces immediate memory requirements, even allowing `Celeste` to work on 4GB devices… + +…For a time. While the system doesn’t need to provide the full 3GB at game boot now, the game will still slowly demand that amount as it runs. +But this might be enough to let 8GB devices, or even 6GB ones (which we don’t officially support, but users use them anyway) reach the next save point. + +Feel free to play the most complex games now on your 8GB Linux laptop or phone and enjoy the improved boot times! +We believe only `The Legend of Zelda: Tears of the Kingdom` still requires 12GB on ASTC compatible devices (Android devices or Intel iGPUs) to be safely playable now. + +For the Windows gang, sorry: only bad news. +The Windows kernel doesn’t have an equivalent to MADV_REMOVE, so if you have a low-end device with a small amount of RAM, Linux is the way to go. + +No surprise there though. + +### 4K + +The resolution? No, worse, crazier than pixel density. +Remember `Paper Mario: The Origami King`? Good game, pretty graphics, and fun humour. +This game has a unique situation on its hands, its ARM CPU code is illegal. +Not "FBI OPEN UP" illegal, but "not able to run natively on contemporary systems due to a difference in stack pointer alignment handling" type of illegal. +The Switch clears a hardware bit that checks the stack pointer alignment and generates an exception, but practically every other operating system sets it, and there is no way to turn it off without a kernel modification. + +This meant modern devices couldn’t run this game with NCE enabled. +Until now. + +By using the {{< gh-hovercard "12237" "ARM parser" >}} of [Dynarmic](https://github.com/merryhime/dynarmic), byte[] parses the instructions responsible for causing the crash due to the alignment error this game produces, and interprets them in software. +The result? Three thousand eight hundred and fifty eight lines of code added to get a game that doesn’t render correctly on Android booting, and it still needs a save file to get past the intro… + +{{< imgs + "./tokbug.png|Luigi sure is brave to drive in the Dark Woods (Paper Mario: The Origami King)" + >}} + +So, wasted effort? With byte[]? Never. +The game wouldn’t render correctly because the emulator was binding float images with a mismatched sampler type. +By {{< gh-hovercard "12432" "forcing the use of floats" >}} for all pixel formats in the shader cache which aren’t explicitly declared as integer, mobile drivers are now able to properly render the Mario brothers in all their flat glory, along with at least **71** [other games!](https://www.reddit.com/r/EmulationOnAndroid/comments/18od8vw/single_pr_fixes_a_lot_of_games_in_yuzu/) + +{{< imgs + "./tokfix.png|Now that’s more like it, it only costs us a shader invalidation (Paper Mario: The Origami King)" + >}} + +Slight deja-vu with the fix for NVIDIA 540 driver series previously mentioned, right? +This work was an additional one hundred and eighty four lines of code, giving a total of four thousand and thirty eight lines of code, 4K, spent on Origami paper, just for Android. + +### Other Android specific GPU changes + +Another peculiar problem the Android builds faced were the slow video decoding performance in games like `SUPER MARIO ODYSSEY`, famous for its video pop-up tutorials. +The culprit was unnecessarily downloading some texture memory which was about to be overwritten anyway. Some {{< gh-hovercard "12543" "tweaks to the DMA code" >}} by [Blinkhawk](https://github.com/FernandoS27), and the performance is now fixed! + +{{< imgs + "./smo.png|No more hints here, scra-CAW! ♪ No more hints (SUPER MARIO ODYSSEY)" + >}} + +One early regression yuzu had when the Android builds were first introduced affected the FXAA antialiasing filter. +As it turns out, the fix for the colour banding FXAA experienced on desktop hardware (which byte[] implemented back in June) missed updating the renderpass to the {{< gh-hovercard "12256" "proper format." >}} +By properly using the `VK_FORMAT_R16G16B16A16_SFLOAT` format for the renderpass, GPUCode resolved the issue. + +{{< single-title-imgs-compare + "From Cursed Triforce to proper Triangle of Death" + "./fxaabug.png" + "./fxaafix.png" +>}} + +The Switch offers a JIT service (not to be confused with yuzu’s JIT, Dynarmic) that allows games to write to code memory during runtime — which wouldn't normally be possible due to the restrictions of the platform. +This is currently only used for the official Nintendo 64 emulators in `Super Mario 3D All-Stars` and the `Nintendo Switch Online` collection. + +Properly using {{< gh-hovercard "12513" "code memory handles" >}} allows the JIT service to work with yuzu’s NCE backend, letting the user run games from the `Nintendo 64 - Nintendo Switch Online` library. +Thank you byte[] for yet again making an emulator work inside an emulator. + +{{< imgs + "./n64.png|Look, savestates! (SUPER MARIO 64)" + >}} + +As a continuation to November’s progress on improving Mali stability due to their lack of support for `nullDescriptor`, byte[] now added the workaround to {{< gh-hovercard "12410" "not pass null views." >}} + +Mali moment #3. + +nullDescriptor was added with the Vulkan extension [VK_EXT_robustness2](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_robustness2.html), back in 2020, for version 1.1 of the API. Vulkan is currently at version 1.3. +Given that the feature has native hardware support on all Direct3D-compatible GPUs, and is trivial to emulate in the driver, we are not sure why this has not been implemented yet... + +Turnip drivers are a work in progress from the Mesa developers — while they typically perform and render very well, they are still in development. +One case that demonstrated this was how a change to improve driver compatibility in Mali caused Turnip to regress in response. +Mali moment # 4? No. This was last month. + +This only specifically affects the Adreno 610 series GPUs when running Turnip drivers. +byte[]’s solution to the issue is to purposely {{< gh-hovercard "12390" "use the Vulkan API incorrectly" >}} for Turnip while we wait for Mesa to address the issue. +Now Adreno 610 users can run Turnip drivers again. + +### Android-specific UI and miscellaneous changes + +Let’s round up the Android changes — we have more to cover, affecting both desktop and Android users too. + +First and most important to mention, [t895](https://github.com/t895) outdid himself and finished implementing {{< gh-hovercard "12335" "Game Properties" >}}. + +{{< imgs + "./config1.gif|Kept you waiting, huh" + >}} + +This new feature can be accessed by long-pressing a game in the list, and allows access to the following menus: + +- A game information page to check program ID, game developer, game version running, and game ROM path. + +{{< imgs + "./config2.png| Great for diagnosing update installation shenanigans" + >}} + +- Per-game settings page, with the option to revert a setting to the global default. + +{{< imgs + "./config3.png|As a game tester, and an 8GB sufferer, your writer considers this a huge blessing" + >}} + +- Similarly, a per-game driver selector, for the cases where Qualcomm did something correctly, or an older Turnip release is better. +- An add-ons manager to install, enable, and disable updates, DLCs, and mods. While there are plans to support compressed mods, right now they must be uncompressed and manually selected here. + +{{< single-title-imgs + "Bet you enjoy this one the most" + "./config4.png" + "./config5.png" + >}} + +- A save data manager, allowing users to export or import per-game saves, alongside the global option. +- An option to delete all save data of that particular game. +- An option to clear the pipeline cache of that particular game. +- And a Start button, which allows you to select a global or custom configuration. Launching from the game list will always load the custom configuration. + +{{< imgs + "./config6.png|To round it up" + >}} + +This covers one of the biggest missing components the Android build has left. +The only remaining settings are a content manager to delete installed content, and a controller mapping UI. +Rest assured, we’re working on them. + +t895 has continued to work on bringing Android to feature parity with the desktop build, while considering the specific needs of the mobile platform. +Some of the {{< gh-hovercard "12520" "recent changes" >}} included are: + +- Hiding the Fastmem toggle if CPU debugging is disabled, avoiding confusion on how it operates. +- Exposing the anisotropic filtering setting in graphics, an option that greatly helps visuals in several games with minimal performance cost. +- Centering the switch setting title when no description is present. + +One of the unique Android features is their {{< gh-hovercard "12387" "Oboe" >}} audio backend, which is, as expected of something unique to the platform, quite robust. +byte[] implemented it into yuzu to stop audio from cutting off when changing audio outputs (switching to wireless headphones for example) or starting a screen video capture. + +The option can be found at `Settings > Advanced settings > Audio > Output engine`. +While Auto is the recommended value (it will always use Oboe on Android), users can take advantage of per-game settings to test Oboe vs Cubeb in any game they want. + +And finally, a minor change for end users which we think someone out there will enjoy. +With the work on the game properties section, t895 also had to equalise the {{< gh-hovercard "12518" "configuration file" >}} `config.ini` to make it work on both desktop and Android builds. + +## Memory heap allocation, or how the Linux kernel can be wrong sometimes + +Yes, Linux did an oopsie, how will they ever recover? + +The Linux kernel has a large set of runtime parameters. +One in particular is a limit on how many times a program can use the `mmap` system call. +The default maximum value is 65530, which "ought to be enough for anyone", or so the meme goes, but in practice that isn’t always the case. + +Typically, Switch games will query the amount of memory heap they have available, reserve all of it, and then suballocate from their OS-level reservation as they use up memory. +This is already well-supported when using host-mapped addressing (most commonly known as fastmem) on Linux-based operating systems, as it only requires a few calls to map the physical memory blocks which comprise the heap. + +Games based on Unreal Engine 4 do not do this. +Instead of reserving all of the available memory heap immediately, they reserve small blocks from the kernel on demand. +If only the software page table is being used, there’s no problem, as the blocks aren’t resulting in calls to `mmap`. + +When yuzu uses host-mapped addressing, the emulator propagates all of these mappings into the host address space. +That in itself wouldn’t normally be a problem, if it wasn’t for the fact that Unreal Engine 4 can allocate hundreds of thousands of small heap blocks, going over the kernel limit with ease, and crashing the entire program. + +yuzu is not the only [project](https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html) affected by this completely arbitrary limitation — it has been a complaint for quite a long time. + +To work around this limitation, byte[] {{< gh-hovercard "12466" "inserts a layer" >}} between the software page table and the host mapping system, constantly tracking the heap allocations made by programs and automatically recycling some less recently used mappings, which causes some stuttering ― but that's better than a game crash. Collection will reduce the number of mappings to around half of the 65530 limit most systems ship with. + +Yep, 64k is not enough for everyone. + +This way, Unreal Engine games can be safely played on Linux-based systems, like desktop distributions and Android devices, without needing to disable fastmem and NCE, two big performance settings that no one wants to keep off. + +## Project Leviathan, applets, and input fun + +As usual, [german77](https://github.com/german77) has been having his good share of fun working on input and the native applets. + +First in the list is a solution for Amiibos with read-only permissions. If a program mounted them as read-only, yuzu doesn’t access any of their encrypted data, and could mark them as corrupt, which wasn’t really the case. +Since read-only data is set from the factory, {{< gh-hovercard "12255" "skipping the corruption check" >}} allows the use of read-only mounts in games like `The Legend of Zelda: Tears of the Kingdom`. + +Next up, an announcement. german77 started working on a rewrite for the HID (human interface devices) code, called `Project Leviathan` with the intention of further improving the accuracy of yuzu’s input emulation. +So far only preliminary work has been done, but some results have already been put into service. + +The first part finished is the {{< gh-hovercard "12289" "emulation" >}} of `AppletResource`, which allows the developers to start working on multiprocess support in the near future, as well as other necessary resources like `AppletResourceUserId`, or simply `aruid`. + +Following up, german77 implemented the necessary code to allow the {{< gh-hovercard "12359" "creation of multiple instances" >}} of HID shared memory, removing an old workaround and relieving the kernel from being responsible for handling shared memory, which in turn allows having a single shared memory instance per aruid. + +Another spot that is starting to shape up thanks to this HID rewrite is {{< gh-hovercard "12425" "object creation," >}} more specifically, `InitializeVibrationDevice`, which would cause games like `Rocket League` to crash. + +But not only german77 worked on input this month, newcomer [HurricanePootis](https://github.com/HurricanePootis) brought us an interesting fix for Linux users. +Linux handles hardware permissions on a per-user level. +For example, if for some reason the administrator desires it, a user can be completely blocked from having access to the `video` group, or `audio`, etc. + +Connected devices are often only able to be accessed by the `root` user or group. While this usually isn’t a problem for just using the device, it can block access to the custom Joy-Con and Pro Controller drivers german77 implemented, regardless of whether the user runs an appimage or Flatpak yuzu build. +By {{< gh-hovercard "12292" "adding a udev rule" >}} to grant access to `hidraw` devices, HurricanePootis circumvented this limitation. +Thank you! + +## Miscellaneous changes + +### Multiprocess preliminary work + +We spoke about preliminary work for multiprocess support. There’s more to cover on the matter. + +byte[] refactored how yuzu emulates {{< gh-hovercard "12236" "CPU core activation." >}} +He assures us writing three thousand lines of code simplifies the design of the ARM interface the emulator uses. +This has the added benefit of allowing code from multiple guest processes to run simultaneously, which is another of the prerequisites for starting the multiprocess effort. + +ARM guest emulation also received support for {{< gh-hovercard "12394" "multiple memory instances," >}} which can now coexist and interact with multiple server sessions. +One step closer with every pull request. + +### Core, kernel, and file system changes + +german77 found some… unexpected… behaviour in how the {{< gh-hovercard "12328" "user profile manager" >}} behaved. +It generated around 13 instances of itself, which lead to multiple, hard to explain bugs related to user data, including the sudden loss of profile after emulator crashes. +Slapping the profile manager and telling it to run a single instance should mitigate most random profile loss issues. + +Sometimes, games have unexpected file organisation strategies. +A recent episode of this phenomenon affects the `Batman: Arkham` trilogy: the base games ship with a null RomFS. +That shouldn't have been a problem; having a RomFS is never a requirement to run a program. +`Batman: Arkham Asylum` did have a RomFS, and was launching fine, but `Batman: Arkham City` and `Batman: Arkham Knight` require their updates installed to be playable (their base game size is only 8MB). +The update contains the RomFS, but since the base game didn't contain it, yuzu couldn't find the RomFS to load, even with the update installed. + +Handling this {{< gh-hovercard "12263" "peculiar case" >}} fell into byte[]’s hands, and the World’s Greatest Detective can now go fetch `?` signs all over the place at ease. + +{{< imgs + "./batman.png|I am vengeance! I am the night! (Batman: Arkham Knight)" + >}} + +Another {{< gh-hovercard "12392" "file system implementation" >}} byte[] gave us was support for the `OpenDirectoryMode` flag, which allows `Portal 2` to save and load properly. One has to wonder why this wasn’t fixed earlier. + +{{< imgs + "./portal21.png|Are we going to space? (Portal 2)" + >}} + +Some additional work was needed to get this masterpiece fully playable. +An entire service needed some patching-up, specifically, `ro`, or {{< gh-hovercard "12321" "relocatable object" >}} (allowing programs to load libraries on the fly), needed to be rewritten a bit — just over a thousand lines of code. + +And finally, `vi`, one of the services responsible for drawing on the screen, needed to distinguish between {{< gh-hovercard "12331" "closing and destroying layers" >}} in order to get `Portal 2` in-game. + +{{< imgs + "./portal22.png|Ever get that feeling of Deja Vu? (Portal 2)" + >}} + +A silly issue byte[] made in the [SSL](https://www.openssl.org/) buffer size configuration broke the Open Course World section of `SUPER MARIO MAKER 2`. +{{< gh-hovercard "12372" "Fixing this configuration mishap" >}} allows the game to run its "main mode". + +Yet another set of findings by byte[], yet another battle won against shutdown crashes. +This time we have timing related crashes in {{< gh-hovercard "12454" "core timing" >}} being addressed, and a rather rare {{< gh-hovercard "12455" "shutdown crash" >}} in the kernel being squashed. + +Let’s close this longer-than-expected report and move to the hardware section. +Our last section in the list is: + +### UI changes + +german77 spotted an oopsie in the UI configuration files, leading to the language selection never getting saved. +If anyone noticed yuzu always selected the default language, you now know what the reason was. +{{< gh-hovercard "12402" "Making this value persistent" >}} solved the problem. + +And lastly one last minor buff to Linux desktop users, from the hands of newcomer [ReillyBrogan](https://github.com/ReillyBrogan). + +When using a Wayland compositor, program windows are matched to their `.desktop` shortcut file. +The `appId` window property is intended to match the name of the `.desktop` file, for example, `org.yuzu_emu.yuzu.desktop`. +Plasma desktop, by default, sets this property to the name of the binary file, which in this case is just `yuzu`, and doesn’t match the expected value of `org.yuzu_emu.yuzu`. +This led to Plasma desktop users (Steam Deck included) displaying yuzu without our glorious icon. +One {{< gh-hovercard "12521" "manual override" >}} later, and the icon is properly there. Thank you! + +## Hardware section + + +## NVIDIA, safe to update + +### Proprietary NVIDIA driver + +As previously mentioned, it’s safe to update to the latest driver versions thanks to the fixes implemented by byte[]. +This will become more critical once the SUPER refresh of Ada cards is out, so perfect timing there. +Hopefully they finally provide good value. + +### NVK + +What’s this? A free and open source Mesa Vulkan driver for Turing and later NVIDIA hardware? + +[It’s still very early days](https://www.phoronix.com/news/Mesa-23.3-Released), Mesa just started shipping preliminary support for this new driver, but we can’t wait to try it out once it’s mature enough. +There’s nothing better than having the option to choose. + +## AMD + +We identified `Pokémon Scarlet & Violet` crashes on RDNA1 hardware exclusively (RX 5000 series). +The usual standard procedure was followed, a custom test case was provided in a bug report. + +## Intel… + +In contrast, Intel failed us again. +No word on the fix for the geometry shader crash we [reported](https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/551) back in October yet. + +We hope it’s just a delay from the holidays. +2024 is the year of ~~the Linux desktop~~ working Intel Windows drivers. + +## Qualcomm + + +### Proprietary Qualcomm driver + + +We recently got our hands on a Snapdragon 8 Gen 3 device (a Red Magic 9), and while the official Qualcomm driver is still mediocre at best, we’re very impressed with the performance of the new Adreno 750 GPU. +In spite of its driver, it managed to bruteforce amazing framerate numbers. It still produced the same graphical glitches any other Adreno card has with their respective official drivers. + +Some games reached the 120 FPS limit imposed by the device’s screen refresh rate. +In short, Balanced mode in the Red Magic 9 is faster than Diablo mode in the previous Red Magic 8. + +Even Turnip, with its [early support](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/v24.0.0_R15) already shows outstanding results. Here is an Adreno 740 vs an Adreno 750: + +{{< single-title-imgs-compare + "i9-14900K who? (The Legend of Zelda: Breath of the Wild)" + "./sd8g2.jpg" + "./sd8g3.jpg" +>}} + +Speaking of which. + +### Turnip + +Leaving Adreno 750 aside for a moment, the Turnip network of support continues to improve. +Current [releases](https://github.com/K11MCH1/AdrenoToolsDrivers/releases) have added support for rare GPU variants, like Adreno 642L and Adreno 644. +Performance and stability have improved as well. + +Keep up to date with Turnip releases; they usually only bring improvements. + +## Mali moment + +Total Mali moments count this month: 3. + +But it’s not all bad news dear Mali sufferers! + +[Newer generations](https://www.phoronix.com/news/Panthor-DRM-Newer-Mali) of Mali hardware, codenamed "Panthor" will have an officially backed Mesa driver, the already existing but almost abandoned [Panfrost/PanVK](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358) driver. +This means that Mali moments may cease existing sometime in the future, in a similar way to how Turnip provides a much better experience to Adreno users. + +## Future projects + +Multiprocess [GPU SMMU](https://github.com/yuzu-emu/yuzu/pull/12579) support is almost done now, thanks to Blinkhawk. +We’ll cover it in more detail next month, but you can check the pull request draft meanwhile to see the expected benefits it brings. + +And maybe the rest of the team has something more going on, yeah. But let’s save that surprise for later, it’s more fun that way (this in no way means any attempt to leak a picture of the current progress was rejected by all devs, no no). + +That’s all folks! Thank you for reading until the end, we hope to see you all again in the first progress report of 2024! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-dec-2023/kofbug.png b/site/content/entry/yuzu-progress-report-dec-2023/kofbug.png new file mode 100644 index 000000000..545a785fb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/kofbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/koffix.png b/site/content/entry/yuzu-progress-report-dec-2023/koffix.png new file mode 100644 index 000000000..9ab986512 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/koffix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/metroid.png b/site/content/entry/yuzu-progress-report-dec-2023/metroid.png new file mode 100644 index 000000000..5db1024af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/metroid.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/n64.png b/site/content/entry/yuzu-progress-report-dec-2023/n64.png new file mode 100644 index 000000000..55de0b8c7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/n64.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/opengl.png b/site/content/entry/yuzu-progress-report-dec-2023/opengl.png new file mode 100644 index 000000000..a9ead4d35 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/opengl.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/pizza.png b/site/content/entry/yuzu-progress-report-dec-2023/pizza.png new file mode 100644 index 000000000..8258049a1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/pizza.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/portal.png b/site/content/entry/yuzu-progress-report-dec-2023/portal.png new file mode 100644 index 000000000..d98c5bf68 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/portal.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/portal21.png b/site/content/entry/yuzu-progress-report-dec-2023/portal21.png new file mode 100644 index 000000000..7668cf901 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/portal21.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/portal22.png b/site/content/entry/yuzu-progress-report-dec-2023/portal22.png new file mode 100644 index 000000000..0bde1be13 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/portal22.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/rdr.png b/site/content/entry/yuzu-progress-report-dec-2023/rdr.png new file mode 100644 index 000000000..128640579 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/rdr.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/sd8g2.jpg b/site/content/entry/yuzu-progress-report-dec-2023/sd8g2.jpg new file mode 100644 index 000000000..060edab1b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/sd8g2.jpg differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/sd8g3.jpg b/site/content/entry/yuzu-progress-report-dec-2023/sd8g3.jpg new file mode 100644 index 000000000..f7d3e3da1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/sd8g3.jpg differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/sm3d.png b/site/content/entry/yuzu-progress-report-dec-2023/sm3d.png new file mode 100644 index 000000000..25ab66c2c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/sm3d.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/smo.png b/site/content/entry/yuzu-progress-report-dec-2023/smo.png new file mode 100644 index 000000000..a2fda8150 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/smo.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/summary.png b/site/content/entry/yuzu-progress-report-dec-2023/summary.png new file mode 100644 index 000000000..6c9559bd7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/swapchain.png b/site/content/entry/yuzu-progress-report-dec-2023/swapchain.png new file mode 100644 index 000000000..b087ea0e9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/swapchain.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/tokbug.png b/site/content/entry/yuzu-progress-report-dec-2023/tokbug.png new file mode 100644 index 000000000..9e0d151ac Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/tokbug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/tokfix.png b/site/content/entry/yuzu-progress-report-dec-2023/tokfix.png new file mode 100644 index 000000000..1659df9c4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/tokfix.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/xc3.mp4 b/site/content/entry/yuzu-progress-report-dec-2023/xc3.mp4 new file mode 100644 index 000000000..5ae70ffd9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/xc3.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/xc3bug.png b/site/content/entry/yuzu-progress-report-dec-2023/xc3bug.png new file mode 100644 index 000000000..41488e8da Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/xc3bug.png differ diff --git a/site/content/entry/yuzu-progress-report-dec-2023/xc3fix.png b/site/content/entry/yuzu-progress-report-dec-2023/xc3fix.png new file mode 100644 index 000000000..4e44bd391 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-dec-2023/xc3fix.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/astral_chain_atsc.mp4 b/site/content/entry/yuzu-progress-report-feb-2021/astral_chain_atsc.mp4 new file mode 100644 index 000000000..fdd3ec095 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/astral_chain_atsc.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/banner.png b/site/content/entry/yuzu-progress-report-feb-2021/banner.png new file mode 100644 index 000000000..04c03dfb7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/d6bug.mp4 b/site/content/entry/yuzu-progress-report-feb-2021/d6bug.mp4 new file mode 100644 index 000000000..6eb29afc1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/d6bug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/d6fix.mp4 b/site/content/entry/yuzu-progress-report-feb-2021/d6fix.mp4 new file mode 100644 index 000000000..45ea398a0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/d6fix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/index.md b/site/content/entry/yuzu-progress-report-feb-2021/index.md new file mode 100644 index 000000000..648d7ab4d --- /dev/null +++ b/site/content/entry/yuzu-progress-report-feb-2021/index.md @@ -0,0 +1,220 @@ ++++ +date = "2021-03-10T12:00:00-03:00" +title = "Progress Report February 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 375270 ++++ + +Welcome back yuz-ers, welcome to ~~City 17~~ February’s progress report! This time we will talk about Vulkan performance improvements, audio changes, how to make good use of compute shaders, new input additions, and more kernel rewrites. + + + +## New minimum requirements + +Thanks to progress in Linux’s mesa drivers, we've recently modified our minimum graphics requirements. + +[yuzu now requires OpenGL 4.6](https://github.com/yuzu-emu/yuzu/pull/5888). However, any previously compatible hardware reaches this requirement with its latest GPU drivers installed, even old Fermi or GCN 1.0 series products. +Laptop users, like desktop users, should visit the GPU manufacturer's site ([AMD](https://www.amd.com/en/support), [Intel](https://downloadcenter.intel.com/product/80939/Graphics), and [Nvidia](https://www.nvidia.com/en-us/geforce/drivers/)) instead of the laptop vendor’s site (HP, Lenovo, Asus, etc.), as it will provide compatible and up-to-date drivers. +Thanks [Morph](https://github.com/Morph1984) for the change! + +On the flip side, while the requirement of Vulkan 1.1 hasn't changed, as stated in previous articles, [Rodrigo](https://github.com/ReinUsesLisp) made `VK_EXT_robustness2` [a hard requirement.](https://github.com/yuzu-emu/yuzu/pull/5917) +This means that updated drivers are critical now, as lacking this extension will stop yuzu from booting games while on Vulkan. +AMD users still require to install the latest `Optional` driver version to get support for `VK_EXT_robustness2`. At the time of writing, the latest version is `21.2.3`, but yuzu will work with drivers as old as `20.12.1`. + +Multi-GPU systems must have all their drivers updated, even for integrated graphics that are functional but not in use. + +## Technical bugfixes + +[Merry](https://github.com/MerryMage) recently caught a bug in the implementation of yuzu's `SPSC` ring buffer and fixed it by [removing the granularity template argument](https://github.com/yuzu-emu/yuzu/pull/5885). +What does this mean exactly? Let's explain! + +A buffer is a data structure that reserves space in memory as slots to store information temporarily: for example, an audio buffer. +In particular, a [ring buffer](https://en.wikipedia.org/wiki/Circular_buffer) is a special type of buffer where the slot next to the final one is the first slot in the buffer (so the start and the end are connected). +Once it's full, no new data is added until some information has been extracted from the buffer and processed. + +`SPSC` stands for "Single-Producer/Single-Consumer," and is a model that comes from the [Producer-Consumer problem](https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem) proposed by computer scientists to deal with the problem of proper synchronization when various simultaneous processes write and read from the same buffer. +In this case, only one thread at a time can insert data into the buffer (the Single-Producer), and only one thread at a time can remove elements from the buffer (the Single-Consumer). + +It's possible to choose a minimal size for each "slot" of the buffer in order to exploit regularities of the information stored. +The entities inside these slots are then considered a single "unit" of information, an *information granule*, from which the term "granularity" stems from. +The ring buffer implementation in yuzu was meant to be as general as possible, which is why granularity was a parameter that the programmer could modify to fit their needs. +Merry noticed there was a small bug when pushing data into the buffer with a granularity different from `1`, but since there is no use case for a granularity different from `1` in yuzu, Merry decided to remove the parameter altogether, in favor of simplifying the codebase. + +[bunnei](https://github.com/bunnei) has been taking a look at the timing code and [fixed an integer overflow in the wall-clock](https://github.com/yuzu-emu/yuzu/pull/5964) - a tool used to measure the passage of time in the emulator. +Previously, these calculations would use 128-bit math for high precision, which can be quite expensive on the processor, so a few optimizations were done to perform 64-bit math instead. +However, there was a bug introduced with these optimizations, and the timing math would result in an integer overflow. +This PR fixed the bug by preventing the wall-clock from overflowing, and now things are back to working as intended. + +bunnei also continues on his campaign to rewrite the kernel and its codebase. This time, he has been tidying up the [memory management code](https://github.com/yuzu-emu/yuzu/pull/5953) and refactoring the implementation to be closer to the latest Switch firmware in order to make it easier to import code from newer firmware. + +Additionally, he changed the implementation of [fibers](https://en.wikipedia.org/wiki/Fiber_(computer_science)) to [use unique_ptr instead of shared_ptr](https://github.com/yuzu-emu/yuzu/pull/6006), but later [changed it again to use weak_ptr](https://github.com/yuzu-emu/yuzu/pull/6041) as it's more appropriate in this use case. + +Fibers are similar to threads, except they can't be executed in parallel. +Instead, they *yield* control to other fibers in a process. +In yuzu, they're used to have better control over thread scheduling, working as tools for the kernel to quickly pause and resume emulated guest threads from within the application, without having to rely on the OS scheduler. + +Previously, fibers were managed through a special object called a `shared pointer`, a kind of variable that stores the memory addresses of other objects - it “references” them. +In particular, this variable keeps track of how many `shared_ptr` references to an object exist in the program, and the memory won't be freed until the total amount of references is zero (i.e. when the object isn't being used anymore). +If these references aren't managed with proper care, some pointers may retain memory and never free it, resulting in memory leaks. +For this reason, bunnei changed the implementation to use a different kind of object, a `weak pointer`, which is similar to the `shared pointer` but it doesn't increase the reference counter, nor is it capable of deleting the original referenced object. +Thus, the referenced memory will be free only when the original pointer is deleted, regardless of how many other `weak_ptr` references to the same memory exist, eliminating the memory leaks caused by the old implementation. + +One of the many tasks of the kernel is to assign resources to processes whenever they ask for them. +For this reason, [epicboy](https://github.com/ameerj) started the work necessary to [utilize a more accurate resource_limit implementation](https://github.com/yuzu-emu/yuzu/pull/5877), in order to match the hardware behavior more closely. + +Be it memory, threads, or ports, the kernel checks for their availability and keeps track of them through a variable called `resource limit`. +By comparing the current amount of resources being used against the resource limit, the kernel can determine whether to deny a request or not. +This stems from the fact that resources are finite, especially in weaker hardware such as that in the Nintendo Switch. +A PC, on the other hand, isn't as restricted as a Nintendo Switch. +Until now, whenever a process requested resources, yuzu would create its own instance of `resource limit` instead of using a system-wide variable to keep track of it. +This PR is just the initial step in preparation to reverse engineer the correct behavior and implement it in the emulator. + +## Paint me like one of your french bits + +[epicboy](https://github.com/ameerj) has also been busy this month implementing two features through [compute kernels](https://en.wikipedia.org/wiki/Compute_kernel), a special kind of program that is written to run in the GPU instead of the CPU. +Originally, these subroutines were used to calculate light levels, darkness, colors, and other properties to render 3D images on the screen. +Thus, these programs were promptly named as [shaders](https://en.wikipedia.org/wiki/Shader). + +Modern GPUs are designed to break down their workload into smaller sized problems, which in turn are processed simultaneously in the many compute units of the card (entities akin to cores in a CPU). +The reason for this design choice is simply because parallelisation is a very efficient scheme to process computer graphics. A single instruction is capable of operating over many components of data at the same time, such as the vertices and textures of a 3D scene, and produce separate results for each parallel thread of execution, which is generally a pixel. This increases the throughput of information, especially when compared against the performance of running the same operations on a CPU. +Their potential isn't limited to just these functions though. +It is possible to write programs that won't necessarily operate over graphics, but can still take advantage of the high levels of parallelisation provided by GPUs. +This is known as `GPGPU` - [General-purpose computing on graphics processing units](https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units) - and it's intended to be used when there is a problem that can be separated into a number of parallel tasks in order to be processed more efficiently. These problems are commonly called `embarrassingly parallel problems`. + +One of these cases was the [use of compute shaders to decode ASTC textures](https://github.com/yuzu-emu/yuzu/pull/5927). +`ASTC` stands for "Adaptable Scalable Texture Compression," and it's a fairly new image compression format developed by ARM and AMD mainly aimed at mobile devices. +The Nintendo Switch is capable of decoding these textures natively in hardware, but it's a feature that most PC GPU vendors lack in their products (with the exception of Intel Graphics, being the only vendor that offers native support). +The decoding of these textures is therefore a non-trivial task that can have a huge impact on performance. Two notable examples are `Astral Chain` and `Luigi's Mansion 3`, since both games make extensive use of this format, but it can also be observed to varying degrees in other titles, where these textures are generally used in menu icons, minimaps, etc. + +{{< imgs + "./astral_chain_atsc.mp4| Comparison between the old and the new implementation of the ASTC decoder" + >}} + +This led to the implementation of an `ASTC` decoder through the CPU, which was faster than what GPUs could do with their lack of native support. The CPU decoder was still far from being a satisfactory solution, since it consumed precious CPU resources and, consequently, slowed down to a halt when running games that made extensive use of this format. +The solution, thus, was to implement the decoding through compute shaders. +Since this is an embarrassingly parallel process, seeing as how every block of pixels can be decoded independently, it's more fit to be performed on the GPU by manipulating the data through `GPGPU`. +This way, the load on the CPU will be shifted to the GPU, allowing emulation to run in parallel with the texture decoding. +As a side benefit, now textures remain in the GPU memory all the time, since they don't need to be transferred between CPU and GPU for decoding. +This means that there won't be time spent downloading the texture to the CPU and then uploading it back to the GPU after the decoding is done, like in the old implementation. + +This feature works as intended on all GPU vendors on Windows, although there are a few problems on Linux (more specifically, the `AMDGPU-PRO` driver) that still need to be ironed out. +Our devs are working hard to solve these bugs, so we ask our tux-friends to be patient and stay tuned! + +Since compute programs were originally meant to manipulate image data, they also worked out nicely to fix a problem with one of the rendering APIs used in yuzu: by [using compute shaders to swizzle BGR textures on copy](https://github.com/yuzu-emu/yuzu/pull/5891). + +{{< single-title-imgs + "Color-swapped and properly swizzled versions of Octopath Traveler's title screen" + "./octopath1.jpg" + "./octopath2.jpg" + >}} + +In OpenGL, colors are stored in channels, and the way they are laid out varies depending on the format used. +For example, the `RGB` format stores the color channels in the order "Red, Green, and Blue," while the `BGR` format stores the channels in the order "Blue, Green, and Red." +Unfortunately, this latter format isn't supported internally by OpenGL, which caused problems with a number of games that made use of `BGR` textures: their Red and Blue channels were swapped and the final images looked blue-ish. + +{{< single-title-imgs + "Blue Christina looks nice, but the red hue definitely suits the Nixie Tubes much better in Steins;Gate: My Darling's Embrace" + "./sg1.jpg" + "./sg2.jpg" + >}} + +The solution to this problem then was to reorder the Blue and Red channels of `BGR` textures in the copy uploaded to the GPU. +Reordering the graphical information of an image to process it in the graphics card is called swizzling, so what this PR does is copy the values of the Red channel into the Blue channel and vice-versa, a process that can be exploited through parallel computation. +This way, the limitation with OpenGL is directly bypassed on the GPU, and these textures are rendered as intended on screen. + +## General bug fixes and improvements + +`Pokémon Sword and Shield` players can enjoy one less frequent crash. +Boss [bunnei](https://github.com/bunnei) [fixed a problem on LDN initialization](https://github.com/yuzu-emu/yuzu/pull/5920), eliminating the crash that occurred if the player pressed `Y` during gameplay (activating online services that yuzu lacks). +An error window will still pop up, but emulation will continue. + +Yet another `Animal Crossing: New Horizons` update, yet another service to stub or implement to regain playability. +This time, [stubbing GetSaveDataBackupSetting](https://github.com/yuzu-emu/yuzu/pull/5892) made `1.7.0` and later versions playable again. +Thanks [german77](https://github.com/german77)! + +Under certain conditions, the `WebApplet` would crash yuzu when opening, for example, the Action Guide in `Super Mario Odyssey`. +[aleasto](https://github.com/aleasto) managed to solve this by [fixing an out of bounds read.](https://github.com/yuzu-emu/yuzu/pull/5878) + +A common annoyance that affected new users was a prompt asking for the derivation keys to be placed in the correct `keys` folder, a folder which had to be manually created until now. +Thanks to [Morph](https://github.com/Morph1984), now there is an empty `keys` folder created by default as part of the installation process of yuzu, ready to be populated by the user’s own Switch keys. + +## Graphics improvements + +[Maide](https://github.com/Kelebek1) has been working on improving the recently released `Disgaea 6: Defiance of Destiny`. + +First, Vulkan needed some [corrected offsets](https://github.com/yuzu-emu/yuzu/pull/5936) for `TexelFetch` and `TextureGather`, types of texture instructions. + +A similar change [was needed for OpenGL.](https://github.com/yuzu-emu/yuzu/pull/5980) This code also includes better handling of `signed atomics`, improving precision. +Thanks to [Ryujinx](https://github.com/Ryujinx/Ryujinx) for helping here. + +Finally, [implementing glDepthRangeIndexedNV](https://github.com/yuzu-emu/yuzu/pull/5997) solves out of range issues in the depth buffer. + +{{< single-title-imgs + "The result of Maide's work (Disgaea 6: Defiance of Destiny)" + "./d6bug.mp4" + "./d6fix.mp4" + >}} + +[Rodrigo](https://github.com/ReinUsesLisp) [fixed a bug in Vulkan’s stream buffer](https://github.com/yuzu-emu/yuzu/pull/5919), improving performance and reducing VRAM use, while also making better use of the dedicated VRAM, instead of falling back to shared VRAM, which is better known as just system RAM. + +By [using dirty flags](https://github.com/yuzu-emu/yuzu/pull/5923), [Rodrigo](https://github.com/ReinUsesLisp) also managed another slim, but measurable, Vulkan performance bump. +Reducing draw calls always helps! + +After a lot of time spent experimenting, [Rodrigo](https://github.com/ReinUsesLisp) [reduced the size of Vulkan’s command pool](https://github.com/yuzu-emu/yuzu/pull/5989), from 4096 to just 4. +This makes the driver assign less memory for command buffers, saving a considerable amount of system RAM. + +For example, in `Pokémon Sword and Shield`, Vulkan’s use of system RAM goes from 707MB, to just 2MB. + +To end the day, [Rodrigo](https://github.com/ReinUsesLisp) fixed a regression introduced by the `Buffer Cache Rewrite`. +Some games benefit from skipping the cache, but others lose performance. `Animal Crossing: New Horizons` was an example severely affected in Vulkan. +By [implementing a way to heuristically decide when to skip the cache](https://github.com/yuzu-emu/yuzu/pull/6021), performance was not only restored, but also increased. + +## Input improvements + +First and foremost, [german77](https://github.com/german77) finished implementing [native Gamecube controller support!](https://github.com/yuzu-emu/yuzu/pull/4940) +With this change, games will now actually register GC controllers instead of registering them as, for example, emulated Pro Controllers. +Right now Gamecube triggers are mapped as buttons, but they will be correctly handled as analog triggers in coming changes. + +[Morph](https://github.com/Morph1984) later added [vibration support for the GC controller.](https://github.com/yuzu-emu/yuzu/pull/5944) + +Another new feature [german77](https://github.com/german77) added is stick [mouse panning.](https://github.com/yuzu-emu/yuzu/pull/5869) +This allows users to set the mouse as an analog stick, enabling very comfortable gameplay on titles that use the right analog stick as camera control. +By default, pressing Ctrl + F9 toggles this feature. + +{{< imgs + "./panning.mp4| Keyboard warriors rejoice! (The Legend of Zelda: Breath of the Wild)" + >}} + +A [separate PR](https://github.com/yuzu-emu/yuzu/pull/5929) improves panning functionality even more, giving it a more natural control. + +[Morph](https://github.com/Morph1984) [implemented the Finalize request](https://github.com/yuzu-emu/yuzu/pull/5908) on the inline keyboard implementation, allowing it to exit in a stable and graceful way instead of looping indefinitely. +This solves issues experienced in `Super Mario 3D World + Bowser’s Fury`. + +[Jatoxo](https://github.com/Jatoxo) gives us a feature we didn’t know we wanted. +[They've added depth to the analog sticks](https://github.com/yuzu-emu/yuzu/pull/5894) of the Pro Controller in the controls preview. +See the result for yourself! + +{{< single-title-imgs + "Nothing beats quality of life changes like this" + "./stickold.mp4" + "./sticknew.mp4" + >}} + +## Audio achievements + +One of our most requested fixes is finally here. +`Fire Emblem: Three Houses` no longer echoes voices! +[ogniK](https://github.com/ogniK5377) is responsible for this fix, which properly [implemented I3dl2Reverb.](https://github.com/yuzu-emu/yuzu/pull/5909) + +If you paused emulation and resumed it some time later, you would experience severe stuttering until the audio caught up to the rendering. +[german77](https://github.com/german77) resolved this unpleasant experience by [preventing overscheduling audio events](https://github.com/yuzu-emu/yuzu/pull/5868), allowing for a seamless experience after resuming emulation. + +## Future projects + +Project Kraken is underway. Project Gaia started. Project Hades, the shader decompiler rewrite, is progressing steadily. If it continues like this, it will be released before Memory Reaper. As you’ve seen in this article, bunnei continues to suffer through implementing Kernel changes. + +That’s all folks! As always, thank you for reading until the end, and see you next time! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-feb-2021/octopath1.jpg b/site/content/entry/yuzu-progress-report-feb-2021/octopath1.jpg new file mode 100644 index 000000000..a8def4ff2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/octopath1.jpg differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/octopath2.jpg b/site/content/entry/yuzu-progress-report-feb-2021/octopath2.jpg new file mode 100644 index 000000000..b515fac31 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/octopath2.jpg differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/panning.mp4 b/site/content/entry/yuzu-progress-report-feb-2021/panning.mp4 new file mode 100644 index 000000000..9e173365a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/panning.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/sg1.jpg b/site/content/entry/yuzu-progress-report-feb-2021/sg1.jpg new file mode 100644 index 000000000..1651f9417 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/sg1.jpg differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/sg2.jpg b/site/content/entry/yuzu-progress-report-feb-2021/sg2.jpg new file mode 100644 index 000000000..dafd61508 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/sg2.jpg differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/sticknew.mp4 b/site/content/entry/yuzu-progress-report-feb-2021/sticknew.mp4 new file mode 100644 index 000000000..e8bc07164 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/sticknew.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/stickold.mp4 b/site/content/entry/yuzu-progress-report-feb-2021/stickold.mp4 new file mode 100644 index 000000000..7729a1bd2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/stickold.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2021/summary.png b/site/content/entry/yuzu-progress-report-feb-2021/summary.png new file mode 100644 index 000000000..dacb5ecea Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/6gb.png b/site/content/entry/yuzu-progress-report-feb-2022/6gb.png new file mode 100644 index 000000000..dcd0b1c54 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/6gb.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/axis.png b/site/content/entry/yuzu-progress-report-feb-2022/axis.png new file mode 100644 index 000000000..b3d145908 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/axis.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/banner.png b/site/content/entry/yuzu-progress-report-feb-2022/banner.png new file mode 100644 index 000000000..627ba9bff Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/batterynew.png b/site/content/entry/yuzu-progress-report-feb-2022/batterynew.png new file mode 100644 index 000000000..b7ef572e3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/batterynew.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/batteryold.png b/site/content/entry/yuzu-progress-report-feb-2022/batteryold.png new file mode 100644 index 000000000..be1a1a8f7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/batteryold.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/center.png b/site/content/entry/yuzu-progress-report-feb-2022/center.png new file mode 100644 index 000000000..f7f0e97f0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/center.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/gaia.png b/site/content/entry/yuzu-progress-report-feb-2022/gaia.png new file mode 100644 index 000000000..10b7446fb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/gaia.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/gamd.png b/site/content/entry/yuzu-progress-report-feb-2022/gamd.png new file mode 100644 index 000000000..121433792 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/gamd.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/gnv.png b/site/content/entry/yuzu-progress-report-feb-2022/gnv.png new file mode 100644 index 000000000..0ae53756d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/gnv.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/hotkeys.png b/site/content/entry/yuzu-progress-report-feb-2022/hotkeys.png new file mode 100644 index 000000000..75286542f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/hotkeys.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/index.md b/site/content/entry/yuzu-progress-report-feb-2022/index.md new file mode 100644 index 000000000..c6ac37a01 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-feb-2022/index.md @@ -0,0 +1,285 @@ ++++ +date = "2022-03-15T12:00:00-03:00" +title = "Progress Report February 2022" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 548871 ++++ + +Glad to have you here, yuz-ers! This month, we're proud to showcase a ton of kernel changes that finally fix long standing bugs, massive performance improvements, UI and input changes, and more! + + + +But first, we present to you: a heavily requested feature. Not for yuzu, but for our articles. + +While we try to only discuss changes that are currently available in Mainline builds, due to time constraints or delays, we sometimes list pull requests that will be in Early Access for a few extra days after the release of a progress report. + +To allow for accurate status reports, [liushuyu](https://github.com/liushuyu) implemented hovercards that we writers can then add to links for pull requests. +If you place the mouse over the dotted hyperlink, you will be able to see the current status, title, number, and merge date of a PR. Try it {{< gh-hovercard "7969" "here!" >}}. + +The different possible statuses are: + +- Red: Pull request closed, it won’t be part of any build +- Purple: Merged to master, it already is on Mainline, or will be in 24 hours at most (if our buildbot doesn’t die in the process!) +- Green: Pull request open, not yet added to Mainline unless it has the `mainline-merge` tag, check the pull request link to confirm + +{{< imgs + "./merge.png| There are a few more, but these 3 are the most important" + >}} + +You can come back to the articles at any time from now on to see if a feature has been merged to Mainline already, as these cards will update dynamically accordingly. +Keep in mind that this is not an immediate process. +A merged pull request will be added to Mainline in the next autobuild, so it may take up to 24 hours to see a status change on this site. + +With that out of the way, let’s get started! + +## Graphical fixes, and how to increase performance + +Due to problems with the RADV drivers on Linux, using the Vulkan API would crash yuzu when run on AMD's RDNA2 graphics cards. +Most notably, this problem affected the Steam Deck, as reported by users who tried testing yuzu on their devices. + +It was determined that the crash happened because of `VK_EXT_vertex_input_dynamic_state`, a Vulkan extension used to minimize the number of pipeline objects needed during the shader compilation process. +These structures are massive, and sometimes, a game may want to change only a small portion of the contents held in them, such as the vertex input state. +Using this extension allows the API to dynamically change these members in the structure with a simple function call, eliminating the need to create a whole new object, thus, reducing the amount of resources used by the operation. + +While this bug is being resolved upstream, [epicboy](https://github.com/ameerj) pushed a PR to {{< gh-hovercard "7953" "blacklist the extension" >}} on RDNA2 devices running RADV drivers, so yuzu does not outright crash. + +But there was still one more driver with problems for us out there. + +Mesa's ANV driver on Linux does not support the texture format `VK_FORMAT_B5G6R5_UNORM_PACK16`, and this caused yuzu to crash when running a game that made use of it, such as `Bowser's Fury`. +To bypass this problem, [voidanix](https://github.com/voidanix) implemented a solution that emulates `BGR565` textures by {{< gh-hovercard "7913" "swizzling the RGB565 format" >}} instead. + +In a similar vein, [Morph](https://github.com/Morph1984) implemented a {{< gh-hovercard "7948" "missing vertex format" >}}, used by the title `パワプロクンポケットR` (Power Pro Kun Pocket R). + +[asLody](https://github.com/asLody) also implemented a missing {{< gh-hovercard "7939" "framebuffer format" >}}, this time used by `Yo-kai Watch 4`. + +{{< imgs + "./ykw4.png| The original name is technically 妖怪ウォッチ4 ぼくらは同じ空を見上げている (Youkai Wotchi Bokura wa Onaji Sora wo Miageteiru)" + >}} + +Another fix by this developer was {{< gh-hovercard "7930" "adding missing semaphore operations" >}} for `MaxwellDMA`, used by `Legend of Zelda: Breath of the Wild` and `Pokémon Legends: Arceus`. + +## Kernel changes, and how to tame Smash + +Continuing with the ongoing work on the kernel, [bunnei](https://github.com/bunnei) has {{< gh-hovercard "7956" "revamped the kernel memory manager" >}} to make it more compatible with the latest system updates. + +One neat setting that came along with these changes is the ability for yuzu to support different memory layouts, such as the "6 GB extended memory layout", used in developer units (a feature requested by the modding community). + +Some mods can utilize more RAM than the Switch can provide, mainly high resolution texture replacements. +To solve this issue, bunnei {{< gh-hovercard "7932" "added a toggle to enable the extended 6GB memory layout" >}} that real developer kits would have available. +Those extra 2GB will allow heavy mods to work without issues. +You can find the setting in `Emulation > Configure… > General > Extended memory layout (6GB DRAM)`. + +{{< imgs + "./6gb.png| Mod away!" + >}} + +Don’t expect it to make a difference in emulation performance, games will not care if the emulated console has more than 4GB, they only care about having enough free memory for their operations. + +bunnei has also been improving the accuracy of the page table management by {{< gh-hovercard "7835" "migrating locks to using emulated guest locks" >}} and {{< gh-hovercard "7919" "improving the mapping and unmapping of physical memory" >}}. + +As always, the biggest motivator behind this work is increasing the accuracy of our implementation, while also fixing any bugs that may have been hiding there these past years. + +[Dynarmic](https://github.com/merryhime/dynarmic), our ARM JIT recompiler, also got a number of new optimizations and bugfixes this month. + +[Blinkhawk](https://github.com/FernandoS27) corrected the fencing logic for the serialization of memory store/load operations in Dynarmic's `x64` code emitter, and subsequently {{< gh-hovercard "7827" "updated the submodule" >}} to bring these changes into yuzu's codebase. +This fixed the freezes that affected `Pokémon Legends: Arceus`. + +While investigating the stability issues of `Super Smash Bros. Ultimate`, bunnei and [Merry](https://github.com/merryhime) found that the problem was caused by an error in the `SpaceRemaining` function, used to calculate the remaining space available for JITed code in a cache block. + +Dynarmic splits these code blocks in two regions, named `near` and `far`. +This scheme aims to minimize L1 CPU cache misses by keeping "hot" code in `near` readily available for execution, while "cold" code is pushed into the `far` region. +Due to a bug in the way the remaining space was being computed, the `near` region would overflow into the `far` region, overwriting "cold" code with "hot" code. +The CPU would then attempt to run the "cold" code that was previously there, and crash horribly on the try. + +Ultimately (no pun intended), this translated as crashes after a few matches in `SSBU`, since that was the time it took to run out of space and overflow the cache. +By {{< gh-hovercard "7955" "correcting the comparisons" >}} used to compute this value, the devs were finally able to mitigate one of the longest-standing problems surrounding this title. + +{{< imgs + "./smash.png| We did so many CPU fights to test these changes... (Super Smash Bros. Ultimate)" + >}} + +Merry has also been busy {{< gh-hovercard "7959" "implementing support for a new CPU optimization" >}}, which makes the emulation of ARM exclusive access instructions through the use of `cmpxchg` (compare and exchange) instruction of the `x64` architecture. + +The ARM instruction set contains instructions that can exclude access to a memory address, so that only some instructions — a pair, in this case: one for reading values, and another for writing them — can operate safely in a multicore environment, without the interference of instructions from other threads, who may also want to access the same value in memory. + +It achieves this by marking the address "for exclusive access" after reading the value in memory, so that an "exclusive" store instruction only writes into this address if it is marked with this flag. +A "normal" store instruction, on the other hand, was designed to always clear this flag after writing. +Thus, the exclusive instructions can use this information to know when the value in the memory address was altered by a non-exclusive instruction, and restart the whole job again, until the operation succeeds. + +ARM is able to control this behaviour through a piece of hardware called the `Exclusive Monitor`. +But emulating these instructions accurately on the `x64` architecture can be very difficult, given the complex nature of testing and debugging in a multithreaded environment. +Thus, their previous implementation was rather conservative and inefficient, to ensure concurrency. + +It is possible, however, to approximate the original behaviour through the use of `cmpxchg`, which compares the value in the memory address with a reference, and if they match, it writes a new value into it. +Thus, one can use the value in a memory address as the reference, and later write another value into the same address if, and only if, the stored value matches the reference. +Relying on the semantics of this instruction, exclusive memory reads and writes can be inlined into the JITed code and speed up their execution. + +Titles that make extensive use of these exclusive instructions, such as `Pokémon Legends: Arceus`, should see a slight increase in performance. + +{{< imgs + "./gnv.png| Some Nvidia numbers" + >}} + +{{< imgs + "./gamd.png| Some AMD numbers" + >}} + +## General bugfixes and UI changes + +[german77](https://github.com/german77) did some work on the UI to spice things up. + +He {{< gh-hovercard "7859" "improved SDL battery level detection" >}}, realigned some of the UI elements in the control settings, {{< gh-hovercard "7839" "and gave us new, prettier battery symbols!" >}} + +{{< single-title-imgs-compare + "Cute and simple!" + "./batteryold.png" + "./batterynew.png" +>}} + +german77 also {{< gh-hovercard "7861" "added new hotkeys" >}} by popular request. +Joining the fray are Docked/Undocked (for controllers), Window Adapting Filter, GPU accuracy (switches between normal and high), and mute/unmute audio. + +{{< imgs + "./hotkeys.png| Once you master the hotkey-jutsu, no one will be able to stop you" + >}} + +Another highly requested fix was {{< gh-hovercard "7867" "improving Amiibo support" >}}. +Our old code wasn’t very accurate, leading to several games failing. +While there is room for improvement, this new implementation is far more accurate and should allow stable use of Amiibo dumps in most games now. + +We also want to announce that native support for NFC scanning of physical Amiibos is being worked on! We'll have more information to share as progress is made. + +Morph fixed a weird issue that’s been appearing lately. +Under some circumstances, after reopening yuzu, the window would be a maximized borderless... *thing*. +As it turns out, for some reason the configuration file was not resetting the frameless flag after closing yuzu. +{{< gh-hovercard "7849" "Forcing a removal of the flag" >}} at each boot solves the issue. + +[Maide](https://github.com/Kelebek1) added a very useful feature to modders and anyone interested in the internals of their games. +Previously, yuzu dumped the base `exeFS`, which only includes data from the base game, missing any new addition from updates or DLCs. +Instead, by {{< gh-hovercard "7899" "dumping the patched `exeFS`" >}}, like [EliEron](https://github.com/EliEron) {{< gh-hovercard "4341" "suggested in the past" >}}, users will have access to update files! + +[toastUnlimited](https://github.com/lat9nq) found out that `Splatoon 2` crashes when accessing the inventory in the [LAN lobby](https://yuzu-emu.org/entry/yuzu-progress-report-aug-2021/#lan-party-time). +{{< gh-hovercard "7887" "Stubbing the `IsUsbFullKeyControllerEnabled` function" >}} is all that was needed. +Splat your friends with impunity! + +{{< imgs + "./splat.png| With all that ink evaporating into the atmosphere, rain must be fantastic" + >}} + +For retro gaming fans, both toastUnlimited and german77 have fixes for the SNES and NES emulators included with the Nintendo Switch Online service (yes, you can dump and play those offline too). +{{< gh-hovercard "7878" "Stubbing`mnpp:app`" >}} solves crashes, and {{< gh-hovercard "7877" "updating the process revision" >}} of our audio emulation allows the official emulators to work properly on yuzu. + +{{< single-title-imgs + "Our team members are big Earthbound fans" + "./nes.png" + "./snes.png" + "./snes2.png" + "./snes3.png" + >}} + +## Input improvements + +As it happens each month, german77 dominates this section. + +As a way to test how strong the current rumble setting is, you can now {{< gh-hovercard "7842" "force the controller to vibrate" >}} by pressing any button while the Configure Vibration window is open. + +{{< imgs + "./rumble.png| Joy-Con goes BRRRR" + >}} + +Gamepads have drift, not only in the exaggerated fashion Joy-Cons are known for, but every gamepad has a certain degree of drifting to it. +To hide this, consoles auto-center their sticks. + +On yuzu, one of the limitations of [SDL](https://www.libsdl.org/) is that it will only read the factory calibration on a Nintendo official controller, skipping any user calibration profile that may be available. +We counter this by auto-centering at boot, but sticks can still go anywhere they like, so german77 {{< gh-hovercard "7860" "adds an option to manually center each axis" >}} as an additional option. +Just right click any direction of a stick in our controller settings. + +{{< imgs + "./center.png| Just one right click away" + >}} + +Support was added to {{< gh-hovercard "7900" "allow mapping the Enter key" >}}, which previously just restarted the mapping process. + +toastUnlimited {{< gh-hovercard "7851" "added support for motion inputs" >}} to `yuzu-cmd`, our terminal version of the executable. +Terminal warriors can now enjoy some Just Dance too. + +## Improving emulation to not use emulation + +[xerpi](https://github.com/xerpi) {{< gh-hovercard "7866" "implemented the 32 bit version" >}} of the `OutputDebugString`, `CreateCodeMemory`, and `ControlCodeMemory` supervisor calls. Thanks! + +xerpi’s help has a bigger objective in mind than just helping some little-known Switch emulator. +They’re developing [vita2hos](https://github.com/xerpi/vita2hos), a translation layer to run `PlayStation Vita` apps and games natively on the Nintendo Switch! +The road ahead is long, since most Switch debug tools are 64-bit only, and the Vita is firmly a 32-bit console, so several rewrites and changes are in order to get the project going. + +yuzu lacks some functionality to offer full 32-bit execution mode support, so the PR was opened to help improve that area, since xerpi is using Switch emulators to assist and ease development. +We can’t wait to see how this project grows! + +## Vulkan is the future + +With the work on `Project Y.F.C` and other changes scheduled, we’re slowly aiming for enabling Vulkan by default, and keeping OpenGL in long term support. +This section will not list changes in yuzu, but settings users can tweak to improve their Vulkan performance in yuzu and other emulators. + +One of the main issues with performance on Vulkan is the aggressive frequency management current GPUs will do to save power. +Since the actual 3D load produced by Nintendo Switch games will be very low for even a modern low-end GPU, clock speeds tend to stay on the power saving side of their spectrum. + +An easy way to considerably improve performance is to force the GPU to run at higher *sustained clock speeds*. The highest value the GPU can reach is usually irrelevant here as most GPUs will be faster than a Switch’s Tegra X1, but the sustained clock speed is what will keep framerates high and stuttering to a minimum. + +NVIDIA users have a simple single setting in the `NVIDIA Control Panel`, `Prefer maximum performance`. +You can find this toggle in `3D Settings > Manage 3D settings > Program Settings tab` click on `Add` and select yuzu from the available options, then scroll down to `Power management mode` and set it to `Prefer maximum performance`. + +{{< imgs + "./nvidia.png| Ol' Reliable UI" + >}} + +On the AMD side, this requires a bit of manual work, and may only be compatible with RDNA based GPUs. Only relatively recent Radeon drivers added the option to tune both minimum and maximum GPU frequencies on the included `Radeon WattMan`. +This can disable the warranty of your Radeon product. + +What needs to be done, in a similar way to NVIDIA, is to add yuzu as a profile on the `Gaming` tab, click on `Tune Game Performance` and set Tuning Control to `Custom`. +Enable GPU Tuning and you will be able to tweak the `Min. Frequency (%)`. + +{{< imgs + "./radeon1.png| While this can be set globally on Radeon Software, we recommend to use per-application profiles" + >}} + +{{< imgs + "./radeon2.png| Besides the GPU, increasing the memory clock speeds will always help in emulation, especially at high resolutions" + >}} + +Using a humble (and worse than mediocre) RX 6500 XT as an example, we can see `Pokémon Legends: Arceus` increase its framerate up to 73% *for free*, managing to surpass an RX 570 at ease, simply by raising the minimum clock speed from 500MHz to 2875MHz (a 475% increase, as the next graph shows). + +{{< imgs + "./radgraph.png| Too much power-saving can also be a bad thing" + >}} + +The performance gains here can be massive, but one can start to see diminishing returns past a certain point. + +## Future projects + +`Project Y.F.C.` continues to mature as more previously broken games start to become playable. +Blinkhawk informs us that he's currently changing focus to performance. +We can't wait to tell you more! + +{{< imgs + "./yfc.png| Fire Emblem Warriors" + >}} + +Morph has a message regarding the progress of `Project Gaia`: + +{{< imgs + "./gaia.png| Poyo!" + >}} + +And german77 has been playing with {{< gh-hovercard "7964" "implementing a Mii editor applet" >}}. +Current support is pretty barebones, but anyone interested is free to build the pull request and try it. + +{{< imgs + "./mii.png| Sweet home Alabama?" + >}} + +That’s all folks! We thank you for your time, and we hope to see you next month. [Glory to Mankind](https://www.youtube.com/watch?v=DsqfwQwPTH8). + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-feb-2022/merge.png b/site/content/entry/yuzu-progress-report-feb-2022/merge.png new file mode 100644 index 000000000..06c8de41e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/merge.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/mii.png b/site/content/entry/yuzu-progress-report-feb-2022/mii.png new file mode 100644 index 000000000..0c35415aa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/mii.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/nes.png b/site/content/entry/yuzu-progress-report-feb-2022/nes.png new file mode 100644 index 000000000..b5290cee2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/nes.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/nvidia.png b/site/content/entry/yuzu-progress-report-feb-2022/nvidia.png new file mode 100644 index 000000000..50d4c3916 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/nvidia.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/radeon1.png b/site/content/entry/yuzu-progress-report-feb-2022/radeon1.png new file mode 100644 index 000000000..c521518be Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/radeon1.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/radeon2.png b/site/content/entry/yuzu-progress-report-feb-2022/radeon2.png new file mode 100644 index 000000000..639546217 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/radeon2.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/radgraph.png b/site/content/entry/yuzu-progress-report-feb-2022/radgraph.png new file mode 100644 index 000000000..42e7cd52d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/radgraph.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/rumble.png b/site/content/entry/yuzu-progress-report-feb-2022/rumble.png new file mode 100644 index 000000000..bfc7a8fd0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/rumble.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/smash.png b/site/content/entry/yuzu-progress-report-feb-2022/smash.png new file mode 100644 index 000000000..c45034f6a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/smash.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/snes.png b/site/content/entry/yuzu-progress-report-feb-2022/snes.png new file mode 100644 index 000000000..697be82f1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/snes.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/snes2.png b/site/content/entry/yuzu-progress-report-feb-2022/snes2.png new file mode 100644 index 000000000..88f682fb1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/snes2.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/snes3.png b/site/content/entry/yuzu-progress-report-feb-2022/snes3.png new file mode 100644 index 000000000..6581f3c5f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/snes3.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/splat.png b/site/content/entry/yuzu-progress-report-feb-2022/splat.png new file mode 100644 index 000000000..b2bb13260 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/splat.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/summary.png b/site/content/entry/yuzu-progress-report-feb-2022/summary.png new file mode 100644 index 000000000..621d000fd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/yfc.png b/site/content/entry/yuzu-progress-report-feb-2022/yfc.png new file mode 100644 index 000000000..7e92ea75e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/yfc.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2022/ykw4.png b/site/content/entry/yuzu-progress-report-feb-2022/ykw4.png new file mode 100644 index 000000000..01231b013 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2022/ykw4.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/astc.png b/site/content/entry/yuzu-progress-report-feb-2023/astc.png new file mode 100644 index 000000000..e6c009074 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/astc.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/async.mp4 b/site/content/entry/yuzu-progress-report-feb-2023/async.mp4 new file mode 100644 index 000000000..11228e9d1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/async.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/banner.png b/site/content/entry/yuzu-progress-report-feb-2023/banner.png new file mode 100644 index 000000000..e5987f974 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/botw1.png b/site/content/entry/yuzu-progress-report-feb-2023/botw1.png new file mode 100644 index 000000000..934bba101 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/botw1.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/botw2.png b/site/content/entry/yuzu-progress-report-feb-2023/botw2.png new file mode 100644 index 000000000..a57961e35 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/botw2.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/compute.mp4 b/site/content/entry/yuzu-progress-report-feb-2023/compute.mp4 new file mode 100644 index 000000000..9ee38b9e0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/compute.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/discord1.png b/site/content/entry/yuzu-progress-report-feb-2023/discord1.png new file mode 100644 index 000000000..1f43ced73 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/discord1.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/discord2.png b/site/content/entry/yuzu-progress-report-feb-2023/discord2.png new file mode 100644 index 000000000..eb4e99665 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/discord2.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/dma.png b/site/content/entry/yuzu-progress-report-feb-2023/dma.png new file mode 100644 index 000000000..fc1b7f89d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/dma.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/fee.png b/site/content/entry/yuzu-progress-report-feb-2023/fee.png new file mode 100644 index 000000000..9b3bcd034 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/fee.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/ffcc.png b/site/content/entry/yuzu-progress-report-feb-2023/ffcc.png new file mode 100644 index 000000000..593e18f47 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/ffcc.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/index.md b/site/content/entry/yuzu-progress-report-feb-2023/index.md new file mode 100644 index 000000000..d8ff60043 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-feb-2023/index.md @@ -0,0 +1,381 @@ ++++ +date = "2023-03-12T12:00:00-03:00" +title = "Progress Report February 2023" +author = "GoldenX86" +forum = 740528 ++++ + +Hello yuz-ers! This month has seen changes across all aspects of yuzu. We have improvements in the GPU, Kernel, Services, Input, User Interface and Experience, Driver related rants, and more! + + + +## Project Y.F.C. 1.75? + +Another month, another Project Y.F.C. addendum. Introducing one of the features that was missing from the previous 1.5 release. + +[Blinkhawk](https://github.com/FernandoS27) implemented host texture download acceleration for the Switch’s DMA engine (or Accelerate DMA for short). + +{{< gh-hovercard "9786" "DMA acceleration" >}} reduces a ton of overhead by letting the GPU handle texture downloads, improving performance considerably with games that aren’t CPU bottlenecked. + +yuzu, in the past, ran everything via the host's CPU and system memory, with the process of [swizzling/unswizzling](https://en.wikipedia.org/wiki/Z-order_curve#Texture_mapping) textures being a primary task. +Now this process is done on the GPU and its VRAM, saving CPU cycles and avoiding having to transfer information back to system memory, and giving us access to the vastly superior bandwidth available in a modern GPU's video memory. + +When you find a game that benefits from faster texture downloads, the numbers speak for themselves: + +{{< imgs + "./dma.png| Bottleneck busters!" + >}} + +## Other GPU (and video) changes + +Before going over the *rendering* changes in GPU emulation, let’s cover something we haven’t touched in a while: video decoding. + +Firstly, [vonchenplus](https://github.com/vonchenplus) improved the speed at which {{< gh-hovercard "9777" "video frame data" >}} is copied. +That is, as long as the compiler notices the optimization and makes use of it. +When it works, this has the added benefit of reducing the time it takes to start playing videos. + +Next, [Maide](https://github.com/Kelebek1) disabled multi-frame decoding, which caused a frame of delay, giving Maide the option to also {{< gh-hovercard "9810" "set the decoder to use all available CPU threads." >}} +While most people don’t have issues with video decoding performance, people running old GPUs, for example AMD Polaris series (RX 400/500 cards), will use their CPU for decoding VP9 videos, as these older cards lack the required hardware decoder. + +Games such as `The Legend of Zelda: Skyward Sword HD` will provide much smoother video playback with these changes. + +Okay, enough about pre-rendered 2D frames in sequence, what about real 3D stuff? +Happily, we have a bit to talk about. + +[behunin](https://github.com/behunin) is back, {{< gh-hovercard "9744" "optimizing the" >}} `gpu_thread` code. +The `gpu_thread` has one job and only one job, to consume its command queue. +The problem is that it was also generating commands as well as consuming them. +By getting rid of this undesired behaviour, the `gpu_thread` is back to only consuming commands, leaving the road open for more future fixes. + +Even from the shadows, [epicboy](https://github.com/ameerj) still gifts us a handful of new toys. A true Eminence in Shadow. + +Avid readers may remember that [MSAA image uploads](https://yuzu-emu.org/entry/yuzu-progress-report-dec-2021/) hold a weird spot in Switch emulation. +There’s a conflict between what the Switch can do with its native NVN API, and what our available graphics APIs (OpenGL and Vulkan) allow. + +Both OpenGL and Vulkan are very restrictive regarding {{< gh-hovercard "9746" "MSAA texture" >}} uploads and copies, leaving epicboy with the only remaining tool available. Yep, you’re right! Time to use a compute shader! + +{{< single-title-imgs + "Breaking the rules to get proper rendering (Sonic Forces)" + "./msaabug.mp4" + "./msaafix.mp4" + >}} + +This way, rendering is accurate. +Do keep in mind that this is an implementation only for OpenGL. +Vulkan, as always, is much more work so it’s homework for later. + +While working on {{< gh-hovercard "9749" "fixing regressions" >}} in Blinkhawk’s [cached writes pull request](https://github.com/yuzu-emu/yuzu/pull/9559) affecting `Yoshi's Crafted World` (the game would freeze when using Normal GPU accuracy), epicboy also fixed `Pokémon Scarlet/Violet`’s missing building geometry issues. + +{{< single-title-imgs-compare + "No more ghost town (Pokémon Scarlet)" + "./pokebug.png" + "./pokefix.png" +>}} + +Ahh, [ASTC](https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression), most of you know the struggle by now. +Mobile devices like phones, tablets, Macs, the Nintendo Switch, among others, have native support for this very compressed texture format, but laptop/desktop/server GPUs don’t. +This leaves the Switch emulation community struggling with ways to mitigate the slow process of decoding these textures on hardware that is not designed for such a task. + +Yes, even the weak and outdated Switch beats an RTX 4090 in this task. +Bet your wallet isn’t happy about that fact. + +yuzu’s weapons in this fight so far were multithreaded CPU decoding, and GPU decoding via compute shaders, which takes advantage of the huge parallelization power of modern GPUs. +Both solutions have stuttering always present while the decoding takes place, especially in new games that overly use large ASTC textures, like `Bayonetta 3` and `Metroid Prime Remastered`. + +Well, epicboy adds a new weapon to our arsenal, and oh boy it can help. At a price. +Introducing {{< gh-hovercard "9849" "Asynchronous ASTC texture decoding!" >}} + +For those that prefer zero ASTC related stuttering during their gameplay, this new toggle uses a background thread to decode ASTC textures while the game is being rendered. +Such an approach will eliminate stuttering, but has the cost of introducing graphical glitches until the textures finish loading in. + +Here’s a comparison of asynchronous decoding with a 16 threads Ryzen 7 5800X3D (so not even the king of the hill in thread count, what matters the most for CPU decoding), vs an RTX 4090, the biggest commercially available compute monster for consumers right now. + +{{< single-title-imgs + "GPU compute shader decoding on the left, asynchronous CPU decoding on the right (ASTRAL CHAIN)" + "./compute.mp4" + "./async.mp4" + >}} + +As you can see, while the process taking place is pretty obvious to the eye with asynchronous decoding, it’s significantly faster than the best GPU available right now. +Even a 12-thread CPU would still win a drag race in the most intensive ASTC game ever, `ASTRAL CHAIN`. +Users with lower thread count CPUs (like quad cores with 8 threads or lower) may need to time their results. + +You can find the option in `Emulation > Configure… > Graphics > Advanced > Decode ASTC textures asynchronously (Hack)`. +Enabling it will also override the setting `Accelerate ASTC texture decoding` in the `Graphics` tab. This setting makes yuzu use the GPU, but enabling `Decode ASTC textures asynchronously (Hack)` will force yuzu to always use CPU decoding. So remember to disable asynchronous ASTC decode if you want to use GPU compute decoding instead. + +{{< imgs + "./astc.png| We recommend low CPU thread users to stick to GPU decoding" + >}} + +According to epicboy, while an asynchronous GPU compute method is possible, the rules and limitations of compute shaders hinder its potential, most likely making it barely any better than regular GPU decoding with the compute units. + +Life would be so much easier if GPU vendors properly added native ASTC support to their GPUs… Your reporter would gladly take it over useless stuff like RGB, ugly plastic shrouds, or driver DVDs. + +NVIDIA, AMD, please consider adding native ASTC support. +It’s certainly more useful than generating fake frames with disgusting artifacting. +Intel, you had great ASTC support in your iGPUs. +Consider adding it back to future versions of Arc graphics. + +Maide has been working on trying to solve the overlapping textures glitches that can be spotted in games like `The Legend of Zelda: Breath of the Wild` and `Xenoblade Chronicles 3`. +While it isn’t a perfect solution, {{< gh-hovercard "9802" "re-adding" >}} the (accidentally) removed `invalidate_texture_data_cache` register helps mitigate the issue at almost any camera angle except the most oblique ones. + +{{< single-title-imgs + "We present you: New crack sealer! Move the camera and the cracks are gone! (The Legend of Zelda: Breath of the Wild)" + "./botw1.png" + "./botw2.png" + >}} + +Depending on the shape of the terrain, or the camera angle, the issue can surface again. +But as a temporary solution, this change makes playing affected games much more tolerable. +Work continues! + +## CPU, kernel, services, and optimizations + +[Merry](https://github.com/merryhime) {{< gh-hovercard "9735" "updated dynarmic" >}}, our JIT, to version 6.4.5, solving some issues and improving compilation times. +One game that benefited from this is `Taiko Risshiden V DX`, which got its load times reduced considerably. + +{{< single-title-imgs + "Take your time (Taiko Risshiden V DX)" + "./taiko1.png" + "./taiko2.png" + >}} + +[byte[]](https://github.com/liamwhite) has also been going deep into the kernel code. One of his changes improves the `SVC wrappers`. +But what are the wrappers? Well, games and homebrew need to talk to the kernel, and to do so they use SVC instructions, which act as an interface with the kernel. + +{{< imgs + "./wrapper.png| The return of mspaint" + >}} + +The work of the wrapper is to translate a request from the game into a C++ call into the kernel, and then get the result from the kernel back into the game. +In the past, yuzu used manually written wrappers that were very error-prone. With this change, byte[] instead {{< gh-hovercard "9742" "automatically generates" >}} the needed wrappers. +This code is far more accurate, so if you find games that no longer crash or soft-lock, here’s the new code responsible for it. +One such example is `Moero Crystal H` which starts booting for the first time. + +{{< imgs + "./mch.png| Don’t judge, it’s part of the Switch’s library (Moero Crystal H)" + >}} + +This game requires more work to get proper video and gameplay rendering. + +Keeping the pursuit for accuracy, byte[] also implemented {{< gh-hovercard "9832" "HLE multiprocess" >}} for services. +Now instead of pushing the game’s requests to the services, the services wait for the requests to arrive. +All this processing is done, for the most part, in what would be the emulated `core 3` of the Switch, instead of all over the place with one thread per service. +Games usually only have access to cores 0 to 2, so we're now dedicating the last core for system service processing, just as the actual Switch operating system does! + +This part of CPU emulation is one of the main reasons we recommend at least 6 cores in our [hardware requirements](https://yuzu-emu.org/help/quickstart/#hardware-requirements), 4 for uninterrupted emulation of the Switch’s CPU, and extras for other processes and tasks. Just a 4 core CPU will be usually overburdened. HT/SMT may help, but that will always depend on the workload at any given moment. +A SMT/HT thread can’t improve performance in a significant way if the core is already saturated. + +[bunnei](https://github.com/bunnei) chimed in too, fixing a mistake in {{< gh-hovercard "9773" "memory mapping." >}} +We erroneously used the (bear with me, it’s not a redundancy) system’s system resource tracking, instead of relying on the application’s resource tracking when loading programs into memory. +Most games were tolerant to this, but `FINAL FANTASY CRYSTAL CHRONICLES Remastered Edition` didn’t like it, getting stuck every time the user tried to load a save. +A tweak here and there and the regression is now gone! + +{{< imgs + "./ffcc.png| Feel free to progress the game now (FINAL FANTASY CRYSTAL CHRONICLES Remastered Edition)" + >}} + +New Pokémon game update, new things to fix. +Once again, `Pokémon Scarlet/Violet` is giving us a headache. + +This time, the recently released update 1.2.0 wouldn’t boot on yuzu. After investigating for a bit, [german77](https://github.com/german77) found out that the cause was that some {{< gh-hovercard "9874" "Bluetooth functions" >}} weren’t properly implemented, causing the game to crash when attempting to start with the latest update installed. + +{{< imgs + "./ps.png| Mandatory protagonist seat (Pokémon Scarlet)" + >}} + +Some code changes later, and german77 fixed the issue! Now anyone can enjoy the reduced NPC count and lower draw distance. + +Even [your writer](https://github.com/goldenx86) tried to give a hand (emphasis on tried). +[As reported in the past](https://yuzu-emu.org/entry/yuzu-progress-report-dec-2022/#cpu-requirement-changes-with-free-performance), we applied `Link-time Optimization` to all of yuzu’s subprojects. This meant that every section like audio, input, UI, etc. used LTO at build time, trying to squeeze out every possible bit of performance. +This caused an unexpected problem: RAM consumption while building increased enough to cause our buildbot to cry for help, causing builds on our Azure DevOps CI to randomly run out of memory. + +byte[] suggested that I instead profile which subprojects would provide the most performance boosts, and to only apply LTO to those. +A few rounds of toasting a CPU by building yuzu later, and it was determined that the two most obvious candidates, core and video_core, were the responsible ones for the performance boost provided by enabling LTO. + +{{< gh-hovercard "9872" "Partially applying LTO" >}} to only the core and video_core projects not only reduced compiler RAM use, but also provided a very minor but still consistently measured performance increase. For example, `The Legend of Zelda: Link’s Awakening` increased from 257 FPS to 260 FPS. +Nothing groundbreaking, but it’s a free bonus from a change that was only intended to reduce RAM use! + +[Morph](https://github.com/Morph1984) later added a {{< gh-hovercard "9887" "small but very critical fix" >}} to get all this actually working. +I’m a disaster, sorry. + +## Input improvements + +`Metroid Prime Remastered` introduced a serious dilemma: People want to play the game as an FPS with mouse and keyboard. + +{{< single-title-imgs + "This game is gorgeous, like Samus (Metroid Prime Remastered)" + "./mpr.png" + "./mpr2.png" + >}} + +The problem is that the game uses motion on top of stick input to aim, making it an interesting case for how to handle non-controller input. + +This was incentive enough to get german77 interested in giving it a try: + +- First off, he fixed an issue where {{< gh-hovercard "9757" "motion would be constantly getting recalibrated." >}} +- Next, german77 tweaked the {{< gh-hovercard "9815" "mouse scaling" >}} for users running a DPI scaling higher than 100% (1.0x). +- Following up, the {{< gh-hovercard "9842" "mapping for mouse input" >}} was improved. By default a mouse to stick is considered a joystick, which includes assuming deadzone and ranges that aren’t zero by default. This pull request includes some other miscellaneous changes, like fixing some UI elements not working. +- And finally, to address `Metroid Prime Remastered`’s "Dual Stick mode", support for {{< gh-hovercard "9848" "dedicated motion using the mouse" >}} was added. Since the game only uses two axes, this can be directly mapped 1:1 to mouse movement, making aiming a breeze! + +To use this feature, go to `Emulation > Configure… > Controls`, click on `Motion 1`, then click again to set the mouse to motion. Then in the Advanced tab, enable mouse panning. After that map the keys manually as if to configure an FPS. + +GitHub user [SixelAlexiS90](https://github.com/SixelAlexiS90) provides an input profile. To use it, on yuzu go to `File > Open yuzu folder` and place [this input profile](https://github.com/yuzu-emu/yuzu/files/10958194/MetroidPrimeRemasteredM%2BK.txt) inside the `config\input` folder (make a new "input" folder if there isn't one). All that's left to do after that is to select the profile in yuzu's control settings. + +The user can adjust the sensitivity of mouse motion with the same setting used for mouse panning in `Emulation > Configure… > Controls > Advanced` + +{{< imgs + "./mouse.png| Remember to set sensitivity to your liking" + >}} + +But did german77 focus on nothing but `Metroid Prime Remastered`? No. +Continuing the work started in [December of 2022](https://yuzu-emu.org/entry/yuzu-progress-report-dec-2022/#new-joy-con-driver-and-other-input-improvements), {{< gh-hovercard "9759" "support for Pro Controllers" >}} within the new custom “Joy-Con” driver. +Since the option is experimental, it only works properly on official Switch Pro Controllers and not with third party controllers, so it’s disabled by default. +Owners of *real* Pro Controllers are encouraged to enable this option, as it will provide much improved motion and HD Rumble support. + +{{< imgs + "./procon.png| Not the same screenshot as the previous one, I swear" + >}} + +Previous limitations, like being unable to use a Pro Controller for Amiibo detection, still exist as there’s still work to be done. + +## Audio improvements + +There are some interesting changes in audio emulation that many users will be happy about, let’s go one by one. + +A crash was fixed by german77 when {{< gh-hovercard "9758" "initializing" >}} [cubeb](https://github.com/mozilla/cubeb), our default audio library. +Guess having fewer crashes is always good, right? + +Merry made an attempt at fixing a {{< gh-hovercard "9768" "rounding issue" >}} in the bi-quad filter. + +While the intention of this change is to partially improve the audio quality in several games, most notably `Metroid Prime Remastered` (the game of the month), it didn’t quite hit the mark. +This wasn’t enough to solve the random noise issues affecting the game, so Maide set out to investigate and found out that the audio emulation codebase was incorrectly saving the state of all different audio channels in the same address! + +As you can imagine, if the left audio channel stores some samples, the right channel does the same (overwriting what the left channel stored), and then the left channel fetches back something unexpected, the result can sound... interesting. +Users described this problem in Metroid as “if someone shot a gun right by your ears”. + +Now each audio channel stores its information in {{< gh-hovercard "9795" "different memory regions," >}} avoiding any issues with overlapping access. +Not only `Metroid Prime Remastered` benefits from this; both `Fire Emblem` games have shown improvements as well. + +{{< imgs + "./fee.png| Clown Swimsuit (Fire Emblem Engage)" + >}} + +Another issue Maide found was a missed check causing an array index to read negative values, which is, in simple terms, “very wrong”. +This was causing the audio engine to grab {{< gh-hovercard "9769" "random chunks of memory" >}} as information for mixing, crashing the audio engine, and yuzu with it. + +Solving this oopsie resolves crashes happening while playing `Metroid Prime Remastered`, and most likely others too. + +## UI changes + +The LDN lobby window got some love from newcomer [unfamiliarplace](https://github.com/unfamiliarplace), adding the option to {{< gh-hovercard "9713" "hide empty rooms." >}} +Nothing beats quality of life changes like this, thanks! + +{{< imgs + "./lobby.png| Only the dankest rooms, please" + >}} + +For Discord gamers, [SoRadGaming](https://github.com/SoRadGaming) implemented proper game images for your {{< gh-hovercard "9720" "Discord Status!" >}} +The images are grabbed from our compatibility wiki, which is under a rewrite, so expect some games to be missing for now. + +{{< single-title-imgs + "Make your friends envy you with this simple trick!" + "./discord1.png" + "./discord2.png" + >}} + +A small mistake caused the web applet to lose the ability to redraw and zoom its content when resizing the yuzu web applet window. +{{< gh-hovercard "9761" "Re-adding" >}} the `setZoomFactor` call fixes the scaling, allowing players to fit their Mario Manual to their needs. + +Per-game settings are very useful, but also very tricky to get right codewise. +[m-HD](https://github.com/m-HD) greets us by adding a few missing graphical settings to the list, solving conflicting issues when setting the fullscreen mode, resolution scaling, filter, and antialiasing values in the {{< gh-hovercard "9784" "per-game" >}} configuration window. + +german77 then properly implemented per-game configuration support for the `Force maximum clocks` {{< gh-hovercard "9863" "setting" >}} AMD GPUs [benefit](https://yuzu-emu.org/entry/yuzu-progress-report-jan-2023/) so much from. + +While we are constantly working to improve the user experience, yuzu sometimes does crash. That’s expected of any first generation emulator, but what shouldn’t happen is not saving changes made to the configuration settings after a crash or a force close. +The problem was in our Qt UI, and german77 worked to properly tell Qt to save and sync the configuration to file, avoiding any {{< gh-hovercard "9817" "configuration change loss" >}} after a force close. + +## General fixes + +[MonsterDruide1](https://github.com/MonsterDruide1) continues to do wonders with the [LDN](https://yuzu-emu.org/entry/ldn-is-here/) code. +This time, proper error handling. +One of the possible errors when handling TCP connections is `ECONNRESET`, which happens when the other end closes the connection abruptly. +Old-school gamers call this “rage quitting”. + +Jokes aside, when a sudden disconnection like this happens, the error used to get caught by yuzu instead of the game, causing the game to never get the notification of the client disconnection. +Properly {{< gh-hovercard "9843" "passing the error" >}} through to the game allows it to handle the issue its own way instead of crashing the yuzu LDN session. + +Some improvements were done to yuzu-cmd, the command-line alternative to the default Qt UI. + +german77 added support for {{< gh-hovercard "9729" "touch inputs from mouse clicks and SDL controller input support," >}} and {{< gh-hovercard "9730" "two parameters:" >}} `-g` for specifying a game file location and `-u` for specifying a user profile. + +Your writer also showed up, {{< gh-hovercard "9737" "updating" >}} the graphical filters and resolution multiplier options that were recently added to the Mainline yuzu. + +## Hardware section + +### NVIDIA driver 531.18, it’s a good one + +This latest (at the time of writing) release of the NVIDIA driver, 531.18, includes support for `VK_EXT_extended_dynamic_state3`, a Vulkan extension previous readers will be familiar with. +Having this extension supported means fewer shaders need to be built, resulting in a smoother experience thanks to reduced shader stuttering, and lower RAM use. + +We recommend at least Turing and newer (GTX 1600, RTX 2000-4000) users to update, as we expect this release to not fix the issues affecting Pascal and Maxwell hardware (GTX 1000 and older). + +### AMD Ryzen 7000X3D series, and the importance of Game Mode + +AMD recently released their Zen 4 CPUs with 3D V-Cache technology, and in an effort to copy Intel in weirdness, they decided to release a top of the line asymmetric design with the 7950X3D. + +Only one of this gaming-beast CPU’s two CCDs (modules containing 8 cores each) has access to the expanded L3 V-Cache, and the decision on which one to use is up to Windows Game Bar. +To our dismay, there is no hardware scheduler here. +The chipset driver and a Windows toggle decide which mode is better. + +Since yuzu, and basically any other emulator, are not registered as games by Windows, the user will have to manually intervene and enable `Game Mode` in order to let the chipset driver profile performance and decide which CCD will perform the best. + +Doing this should also benefit every user, not just 7000X3D ones, as Windows uses the toggle to allocate resources (RAM, threads) to the affected program, so it’s not a bad practice at all! + +Here are the steps: + +With yuzu or any other emulator/program of choice open, press `Windows + G`, and go to the Settings cogwheel. + +{{< imgs + "./xbox1.png| Bet you didn’t know about this extra bloat in Windows" + >}} + +Then enable `Remember this is a game`. + +{{< imgs + "./xbox3.png| And just like that, better performance!" + >}} + +That’s it! + +Now Windows will allocate resources in a smarter way, and Ryzen 7000X3D users will get the best performance out of their shiny new CPU. +Testing also shows that this helps improve performance with proper P-Core and E-Core allocation on current Intel CPUs too. +For older Ryzen users, the latest chipset update that enables the performance profiling for the 3D Zen4 products reportedly also improves performance slightly. + +Who can say no to free performance after two clicks, right? + +### Intel, please fix your Vulkan support + +We’re waiting for Intel to fix their SPIR-V compiler crashes on the Windows drivers. +In its current state, any game can crash at any moment if you use Vulkan, and unlike AMD who solved most of their OpenGL issues with a rewrite, Intel doesn’t get a fallback option with the old graphics API, which in its current state renders almost everything in black. + +{{< imgs + "./intel.png| This crash can happen at any moment" + >}} + +Frustratingly, this isn’t a problem with the Mesa Linux drivers, or the old Gen9/9.5/11 iGPUs and its discontinued Windows drivers, so it’s a proper critical regression affecting the new driver branch that will have to wait until AAA native PC games are running well enough to give the developers time to focus on the “less important stuff”, like professional programs, and console emulators. + +## Future projects + +I’ve been kidnapped by our devs, so no leaks this time. I promise more for next month! + +There is one thing I’m allowed to mention, recent core timing changes have reduced CPU use by 5-20% across the board on Windows depending on the total thread count. This means better performance and reduced power consumption, especially benefiting mobile devices like laptops and handhelds. +This change is already in both [Mainline](https://yuzu-emu.org/downloads/) and [Early Access](https://yuzu-emu.org/help/early-access/), but we’ll talk more about it and other nice things next month. + +That’s all folks! + + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-feb-2023/intel.png b/site/content/entry/yuzu-progress-report-feb-2023/intel.png new file mode 100644 index 000000000..43034a890 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/intel.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/lobby.png b/site/content/entry/yuzu-progress-report-feb-2023/lobby.png new file mode 100644 index 000000000..6db6d193f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/lobby.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/mch.png b/site/content/entry/yuzu-progress-report-feb-2023/mch.png new file mode 100644 index 000000000..796f95a00 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/mch.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/mouse.png b/site/content/entry/yuzu-progress-report-feb-2023/mouse.png new file mode 100644 index 000000000..9c9161b6c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/mouse.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/mpr.png b/site/content/entry/yuzu-progress-report-feb-2023/mpr.png new file mode 100644 index 000000000..648fac924 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/mpr.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/mpr2.png b/site/content/entry/yuzu-progress-report-feb-2023/mpr2.png new file mode 100644 index 000000000..b90616048 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/mpr2.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/msaabug.mp4 b/site/content/entry/yuzu-progress-report-feb-2023/msaabug.mp4 new file mode 100644 index 000000000..779d477ec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/msaabug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/msaafix.mp4 b/site/content/entry/yuzu-progress-report-feb-2023/msaafix.mp4 new file mode 100644 index 000000000..b9e9a1f3b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/msaafix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/pokebug.png b/site/content/entry/yuzu-progress-report-feb-2023/pokebug.png new file mode 100644 index 000000000..4d4f63aa5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/pokebug.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/pokefix.png b/site/content/entry/yuzu-progress-report-feb-2023/pokefix.png new file mode 100644 index 000000000..b40ccd41e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/pokefix.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/procon.png b/site/content/entry/yuzu-progress-report-feb-2023/procon.png new file mode 100644 index 000000000..c5dad0912 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/procon.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/ps.png b/site/content/entry/yuzu-progress-report-feb-2023/ps.png new file mode 100644 index 000000000..813b9ebad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/ps.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/summary.png b/site/content/entry/yuzu-progress-report-feb-2023/summary.png new file mode 100644 index 000000000..c2d784d02 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/taiko1.png b/site/content/entry/yuzu-progress-report-feb-2023/taiko1.png new file mode 100644 index 000000000..a27bdb173 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/taiko1.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/taiko2.png b/site/content/entry/yuzu-progress-report-feb-2023/taiko2.png new file mode 100644 index 000000000..c6dbbe268 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/taiko2.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/wrapper.png b/site/content/entry/yuzu-progress-report-feb-2023/wrapper.png new file mode 100644 index 000000000..5ed9c11c8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/wrapper.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/xbox1.png b/site/content/entry/yuzu-progress-report-feb-2023/xbox1.png new file mode 100644 index 000000000..a471e378f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/xbox1.png differ diff --git a/site/content/entry/yuzu-progress-report-feb-2023/xbox3.png b/site/content/entry/yuzu-progress-report-feb-2023/xbox3.png new file mode 100644 index 000000000..34b7d495d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-feb-2023/xbox3.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/LM3_1.mp4 b/site/content/entry/yuzu-progress-report-jan-2021/LM3_1.mp4 new file mode 100644 index 000000000..81b2425f6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/LM3_1.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/acfp16.png b/site/content/entry/yuzu-progress-report-jan-2021/acfp16.png new file mode 100644 index 000000000..b29805292 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/acfp16.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/acnh.png b/site/content/entry/yuzu-progress-report-jan-2021/acnh.png new file mode 100644 index 000000000..a964bbbe6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/acnh.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/banner.png b/site/content/entry/yuzu-progress-report-jan-2021/banner.png new file mode 100644 index 000000000..8bb943beb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/bcr.png b/site/content/entry/yuzu-progress-report-jan-2021/bcr.png new file mode 100644 index 000000000..4bcd7de25 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/bcr.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/dmc2.png b/site/content/entry/yuzu-progress-report-jan-2021/dmc2.png new file mode 100644 index 000000000..89e1b39cc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/dmc2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/index.md b/site/content/entry/yuzu-progress-report-jan-2021/index.md new file mode 100644 index 000000000..25894e795 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jan-2021/index.md @@ -0,0 +1,280 @@ ++++ +date = "2021-02-10T12:00:00-03:00" +title = "Progress Report January 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 359093 ++++ + +Welcome yuz-ers, to the first progress report of 2021! We have quite a bit in store for you: from kernel and CPU emulation improvements to another major graphical rewrite. Here are the most important changes of January. + + +## The Buffer Cache Rewrite + +While we have a [dedicated article detailing the improvements from the Buffer Cache Rewrite](https://yuzu-emu.org/entry/yuzu-bcr/) [(BCR)](https://github.com/yuzu-emu/yuzu/pull/5741), [Rodrigo](https://github.com/ReinUsesLisp) didn't sit idle and continued to improve the buffer cache. These new changes and improvements deserve some time in the spotlight. For the full context, we advise reading the dedicated article before continuing. + +{{< single-title-imgs + "The BCR offers performance and rendering improvements (Xenoblade Chronicles Definitive Edition)" + "./xcdebug.mp4" + "./xcdefix.mp4" + >}} + +Vulkan needed some improvements to be compatible with the BCR. In particular, its [memory allocator](https://github.com/yuzu-emu/yuzu/pull/5297) got a complete overhaul, improving its functionality. + +A performance bottleneck affecting Intel GPUs in Vulkan was fixed by [using timeline semaphores instead of spin waits.](https://github.com/yuzu-emu/yuzu/pull/5311) + +[Preliminary work was done](https://github.com/yuzu-emu/yuzu/pull/5363) to have the compute accelerated texture decoders working in the near future. + +Assembly shaders are very limited and hard to work with due to their [ancient origins.](https://en.wikipedia.org/wiki/ARB_assembly_language#History) A problem faced during the BCR development is keeping compatibility with them while offering their advantage in shader build times to Nvidia users. +At release, the first implementation [Rodrigo](https://github.com/ReinUsesLisp) tried made use of `interops`, a feature that allows calling functions of one graphics API from another. In this particular case, he used the new memory allocator of Vulkan from within an OpenGL context. +While the results in Windows 10 and Linux were satisfactory, this had some limitations: + +- Windows 7 was unstable due to broken memory management. A known problem that was never fixed during the lifetime of this now discontinued operating system. +- Fermi era GPUs (mostly 400 and 500 series) had to skip assembly shaders due to Nvidia never adding Vulkan support. + +So, as a workaround for now, the old pre-BCR method is currently in place. Since this method may be slower in some games compared to the updated GLSL implementation, assembly shaders is now disabled by default while Rodrigo works on a different implementation. Feel free to re-enable this setting if you get playable performance in your games. You can find it in `Emulation > Configure… > Graphics > Advanced tab` + +Vulkan users are advised to update their GPU drivers to the very latest version, as the BCR makes the extension `VK_EXT_robustness2` mandatory, instead of its previous optional status after the release of the Texture Cache Rewrite. +All three main GPU companies (Nvidia, AMD, and Intel) now offer support for this extension in their latest driver. +AMD users updating from Radeon Software may need to allow `Optional` driver download support to get the corresponding driver version to have access to this valuable Vulkan extension (at the time of writing). + +Several games now prefer `High` GPU accuracy over the default `Normal` value. +Users can change this setting while playing by going to `Emulation > Configure… > Graphics > Advanced tab > Accuracy level`. +We recommend users to play with this setting to find the optimal performance, but to avoid the `Extreme` value for the moment, as it will either result in very low performance (intended result), or crash the game entirely (not intended, being investigated). + +{{< imgs + "./bcr.png| While there are big improvements across the board, this graph shows the limitations of integrated GPUs constantly fighting the CPU for RAM resources. Having your own fast dedicated on-board VRAM is very important for performance." + >}} + +Analysis time. If you compare this graph to the one of the RX550 in the [BCR artricle,](https://yuzu-emu.org/entry/yuzu-bcr/) you will notice that a small integrated Vega manages to beat a dedicated Polaris card in `Fire Emblem: Three Houses` by a few frames. +This is because newer GPU architectures offer features that are useful for Switch emulation. Ray tracing is not the only cool kid in town! + +The Tegra X1 SoC in the Nintendo Switch offers native support for FP16 with a 2:1 performance ratio, allowing games to double their performance over regular FP32 when doing floating point calculations. A simple way to achieve a higher frame rate on limited hardware. +Vega (GCN 5.0), Turing, Gen 9 Intel Graphics and newer offer native support for FP16, or as AMD calls it, “Rapid Packed Math”. +Series like Polaris (GCN 4.0), Pascal and older may offer support in their drivers but don’t provide a performance advantage, and in the case of Pascal, it reduces performance considerably (64 times slower than FP32). +In those cases FP32 is used to emulate FP16, obviously resulting in no performance gains. + +This is the main reason our [Hardware Requirements](https://yuzu-emu.org/help/quickstart/#hardware-requirements) lists Gen 9.5, Vega, and Turing cards, as the recommended GPUs. Maxwell v2, Vega, Gen9 and later series also offer `conservative rasterization`, a very useful feature that yuzu can take advantage of in the future. + +## General bug fixes and improvements + +Let’s start with good news, Champion Leon can no longer win by default! +Thanks to [ogniK’s](https://github.com/ogniK5377) work, [unregistering already registered events](https://github.com/yuzu-emu/yuzu/pull/5799), games like `Pokémon Let’s Go Eevee/Pikachu` and `Pokémon Sword/Shield` won’t softlock when the game requests playing a video. Gotta beat em all, was it? + +{{< imgs + "./pksw.png| Let’s battle, for real this time! (Pokémon Sword)" + >}} + +Quality of Life improvements, although seemingly small, can still require several considerations. +[Morph](https://github.com/Morph1984) made [docked mode the default option](https://github.com/yuzu-emu/yuzu/pull/5324), with the intention to offer users the highest game quality, and to remove flickering experienced in `Super Mario Odyssey` when running the game with assembly shaders enabled while in undocked mode. +Users with integrated, slow, and/or old GPUs should consider using undocked mode, as the reduced resolution and detail level will help avoid performance bottlenecks. + +[german77](https://github.com/german77) solved one of the most common problems users had when playing `Super Smash Bros. Ultimate`, [the inability to boot the game if more than one user profile was created](https://github.com/yuzu-emu/yuzu/pull/5842). +Thanks to this fix, users are no longer forced to play the game with the top profile in the list. + +[toastUnlimited](https://github.com/lat9nq) continues his work on Linux’s `AppImages`. +Now yuzu’s [AppImage build can be updated](https://github.com/yuzu-emu/yuzu/pull/5302), reducing the download size to just around 9MB [if you use AppImageUpdate.](https://appimage.github.io/AppImageUpdate/) + +[By improving `nvflinger`, the display service of the Nintendo Switch,](https://github.com/yuzu-emu/yuzu/pull/5279) [bunnei](https://github.com/bunnei) made `Katana ZERO` playable again. + +Serendipity strikes again. +By [fixing a data race](https://github.com/yuzu-emu/yuzu/pull/5284) introduced by one of the recent kernel changes, [epicboy](https://github.com/ameerj) also fixed unlimited FPS mods which previously made the emulator crash. + +By [fixing invalid buffer index errors,](https://github.com/yuzu-emu/yuzu/pull/5840) [Morph](https://github.com/Morph1984) was able to resolve various crashes in booting `Super Mario Maker 2` that occurred due to file system issues. + +In the eternal torture that is audio development, [ogniK](https://github.com/ogniK5377) [implemented `FlushAudioOutBuffers`,](https://github.com/yuzu-emu/yuzu/pull/5809) making the `Devil May Cry` series playable. + +{{< imgs + "./dmc2.png| Look at the graphics, that's you know, what it's really all about (Devil May Cry 2)" + >}} + +## Miscellaneous graphical improvements + +We have three public service announcements, one for each GPU vendor: + +First, a message for AMD users with RX 5000 series graphics cards. +In the past, we blacklisted the `VK_EXT_extended_dynamic_state` Vulkan extension on all RDNA1 based GPUs on Windows. The drivers at the time were unstable when using this extension, causing yuzu to crash to the desktop. +[This block has been removed](https://github.com/yuzu-emu/yuzu/pull/5814) by [Rodrigo,](https://github.com/ReinUsesLisp) but keep in mind that the user needs to be running `20.12.1` or newer driver versions. +“Navi“ users can expect several graphical fixes thanks to this change. + +Blue team’s turn. On the topic of blacklists, [Rodrigo](https://github.com/ReinUsesLisp) had to [disable FP16 math support from Intel Windows Vulkan drivers](https://github.com/yuzu-emu/yuzu/pull/5798) to solve stability issues affecting `Astral Chain`. +For now, half-float operations will be emulated using FP32 math. This will result in lower performance if the game manages to make full use of the compute capabilities of the GPU. However, on current Intel Graphics, rasterization (to put it simple, the raw power of the GPU) is usually the first element to bottleneck performance, even before being affected by the aforementioned operations. + +Thanks to this change and Intel’s native ASTC texture decoding support, Intel Graphics now has the best rendering quality in this particular game. +We’re waiting for a driver fix to come relatively soon, so as always, keep your drivers updated! + +{{< imgs + "./acfp16.png| Astral Chain on integrated GPUs, reaching 30 FPS (docked mode)" + >}} + +Finally, regarding Nvidia. +If the shader cache is stored in Nvidia’s own provided directory, a 200MB total folder size limit is imposed. +BSoD found out that such a limit is easy to surpass if other shader intensive programs are in use, like Adobe’s software suite. +[Rodrigo](https://github.com/ReinUsesLisp) bypassed this problem [by moving the cache to yuzu’s own directory,](https://github.com/yuzu-emu/yuzu/pull/5778) instead of using the default directory the driver provides. + +With this change, we recommend building your cache with assembly shaders enabled, but once the cache is complete or close to completion, switch to regular GLSL (disable assembly shaders). +That way (after a long period of shader compilation at boot), stuttering will be completely avoided. +Thanks to [Exzap](https://github.com/Exzap) from [Cemu](https://cemu.info/) for the help! + +Our resident shark, [ogniK,](https://github.com/ogniK5377) [implemented the missing services to have `Stereo Vision`,](https://github.com/yuzu-emu/yuzu/pull/5810) the Nintendo Switch’s implementation of Virtual Reality using a `Nintendo Labo` “headset”. +Games like `The Legend of Zelda: Breath of the Wild`, `Super Mario Odyssey`, `Super Smash Bros. Ultimate`, and `Captain Toad: Treasure Tracker` can now render for both eyes. + +While this doesn’t offer full VR support for PC compatible headsets yet, it allows users to make their own cardboard headsets à la Google, so long as they are handicraft-inclined. +Pro tip, stream to a phone or tablet. + +{{< imgs + "./vr.png| You will need a lot of cardboard if you want to use this on big displays (The Legend of Zelda: Breath of the Wild)" + >}} + +By [fixing the constant buffer’s size calculation](https://github.com/yuzu-emu/yuzu/pull/5786), `Undertale` can now be run in OpenGL with Assembly Shaders disabled, allowing the game to run on Intel and AMD GPUs. +[Rodrigo](https://github.com/ReinUsesLisp) will no longer have a [bad time.](https://www.youtube.com/watch?v=wDgQdr8ZkTw) + +The Buffer Cache Rewrite helped expose new issues in games, one example is geometry explosions in `Zombie Panic in Wonderland DX`. +[Rodrigo](https://github.com/ReinUsesLisp) fixed this by [flushing the destination buffer on CopyBlock.](https://github.com/yuzu-emu/yuzu/pull/5785) + +{{< single-title-imgs + "More work is needed to make this game look right (Zombie Panic in Wonderland DX)" + "./zpiwbug.png" + "./zpiwfix.png" + >}} + +One of the important additions of the Texture Cache Rewrite is the support for `Format Views`, a feature games request and use natively. +Unfortunately, AMD and Intel Windows drivers have a broken implementation, and format views had to be disabled to fix rendering problems. + +{{< single-title-imgs + "Mushroom Dark World? (Super Mario Odyssey)" + "./smobug.png" + "./smofix.png" + >}} + +We reported this problem a long time ago to both vendors, but it seems like OpenGL is not a priority on Windows. The Linux mesa team, on the other hand, [has *fantastic* response times](https://gitlab.freedesktop.org/mesa/mesa/-/issues/4034) to bug reports of any API. + +For the Linux side, recent changes made the Vulkan Intel driver `anv` incompatible. +By [removing a not critical requirement](https://github.com/yuzu-emu/yuzu/pull/5341) (for now), and [fixing initialization,](https://github.com/yuzu-emu/yuzu/pull/5349) [Rodrigo](https://github.com/ReinUsesLisp) restored functionality. + +Due to its constant use of ASTC textures of considerable size (way bigger than the display resolution of the Nintendo Switch), `Astral Chain` is a prime example for testing the stability of yuzu’s software ASTC decoder. +Game crashes were common due to reading or writing out of bounds, [Rodrigo](https://github.com/ReinUsesLisp) fixes this by [improving the robustness of the decoder.](https://github.com/yuzu-emu/yuzu/pull/5348) + +## [The Youkai, the rabbit, and friends](https://www.youtube.com/watch?v=195XntreoMc) + +[MerryMage](https://github.com/MerryMage) has recently made some changes to [Dynarmic](https://github.com/MerryMage/dynarmic) that improved the performance of some games. + +We start off with [a PR that introduces a setting to remove some NaN checks from JITed code.](https://github.com/yuzu-emu/yuzu/pull/5278) +This inherently results in a decrease of accuracy on the representation of these and other special values, which is why this setting is `unsafe`. +However, this also boosts the performance of games that make heavy use of NaN values, such as `Luigi's Mansion 3` (especially in the `basement 2` and `floor 12` areas, where previously performance would decrease greatly). +This setting can be found in `Emulation > Configure > CPU > Unsafe` as a toggle option, `Inaccurate NaN handling`. + +{{< imgs + "./LM3_1.mp4| Luigi's Mansion 3, the new and the old. The general performance of the game improved drastically thanks to this PR." + >}} + +On any digital system, all numbers are represented in a binary base in order to be stored and perform operations with them. +Naturally, there is a limit to the amount of numbers and the precision with which they can be represented, not to mention that a number can be expressed in many ways by just declaring it as a different type (e.g. integer, [floating-point](https://en.wikipedia.org/wiki/Floating-point_arithmetic) number, etc.). +Likewise, there are also many mathematical elements that aren't numbers per se, but special cases that result from mathematical operations. +Think, for example, about the square root of a negative number: although the result of this operation is a valid [complex number](https://en.wikipedia.org/wiki/Complex_number), it's not a defined type (i.e. a number that the computer understands), therefore, it becomes *something else*. +Or think about dividing any number by zero: this mathematical operation is undefined, and thus it yields a similar result. + +These types of indeterminations are defined as a special floating-point value called [`NaN`](https://en.wikipedia.org/wiki/NaN) - which stands for "Not a Number". +The architecture of the CPU of the Nintendo Switch (`ARM`) handles these NaN values differently from the architecture used by any computer CPU (`AMD64`). +For example, while a NaN is always produced as a positive value in `ARM`, it is always produced as a negative value in `AMD64`. +These NaN values might also be `quiet` or `signaling` - a characteristic that determines whether the CPU detects a NaN value at the end of an operation, or in an intermediate step (which can be halted or not, depending on the program). +Dynarmic is in charge of translating the code of a game from instructions understood by the `ARM` architecture into instructions understood by the `AMD64` architecture. +This includes ensuring these NaN values are represented properly. +By toggling this optimization, however, many of these checks are now skipped by dynarmic in favor of performance. +The reason is quite simple: most software, including games, ignore the sign and payload of these values, so it's safe to ignore them. + +MerryMage also submitted [a PR to prevent flushing the cache when an ISB instruction is executed](https://github.com/yuzu-emu/yuzu/pull/5831), fixing a wide range of games that ran at 1-2fps, such as `Cobra Kai`, `Megadimension Neptunia VII`, `Super Robot Wars series`, `Windbound`, and many others. + +{{< imgs + "./mn7.png| Megadimension Neptunia VII" + >}} + +In order to process instructions faster, modern CPUs read program code from memory and store it in a cache, because access times are much faster that way. +But processing these instructions isn't an instantaneous task. +First, an instruction is fetched from the cache, decoded, executed, and the result is written back to a register or memory. +To make this process more efficient, the CPU has a dedicated circuit for every one of these steps, and they execute these tasks for different instructions at the same time. +This parallelization process is known as [Instruction Pipelining](https://en.wikipedia.org/wiki/Instruction_pipelining). + +The `ARM` architecture has a variety of special instructions (called `Memory Barrier Instructions`) that give the CPU better control over how instructions are written in and from program memory. +One of these is `ISB`, which stands for "Instruction Synchronization Barrier", and it's used to flush the CPU pipeline and cache, so that all instructions following the `ISB` instruction are refeteched from memory. +Normally, this is useful when running self-modifying programs, since there is new code being written into executable memory (where the program is stored), and flushing the queued instructions ensures that no old code is run. +So, naturally, when Dynarmic executed an ISB instruction, the whole cache was being flushed on the assumption that it was outdated. +This resulted in yuzu constantly flushing out and recompiling the cache, which translated as severe slowdowns and performance drops for certain games. + +Now, here's the catch. +The Nintendo Switch is a platform that, with some exceptions, doesn't allow for executable code to be rewritten. +So, there will never be a case where yuzu will need to flush the cache this way, because games can't overwrite code in memory. +This PR changed the behaviour of dynarmic, so that whenever there's an `ISB` instruction, it executes a `NOP` (no operation) instead - a special instruction that does nothing. +This way, performance is not affected anymore, as yuzu doesn’t need to rebuild the cache since it safely ignores these `ISB` instructions. + +On a different note, [bunnei](https://github.com/bunnei) has been continuing with his work on the kernel. +The first change introduced last month was [a PR to rewrite threads to be more accurate](https://github.com/yuzu-emu/yuzu/pull/5779). +While there are not many visible benefits for the user due to the low-level nature of the change, it helped to fix a lot of smaller inaccuracies, including the softlocks in `Animal Crossing: New Horizons` when transitioning between scenes. + +{{< imgs + "./acnh.png| We don't judge you, Isabelle (Animal Crossing: New Horizons)" + >}} + +Originally, yuzu started as a fork of [Citra](https://github.com/citra-emu/citra), the 3DS emulator. +Naturally, there is a remnant of code that was used on Citra and later modified to work for the Nintendo Switch. +While it was fully functional and did the job, it was far from being accurate. +`KThread` is yuzu's implementation of [computing threads](https://en.wikipedia.org/wiki/Thread_(computing)), and this change aims to make it match as closely as possible to the implementation of threads of the real Nintendo Switch kernel. + +The second change introduced last month is [Refactoring of KEvent/KReadableEvent/KWritableEvent](https://github.com/yuzu-emu/yuzu/pull/5862). +A `Kernel Event` is a kernel primitive that is used to "signal events", generally across processes. +This is one of the simplest mechanisms used to communicate different threads: one thread signals an event, and then another thread waits for it. +The `KReadableEvent` and `KWritableEvent` attributes are just an abstraction used to further enhance the synchronization across processes. +These three objects are thus used to represent a single "signallable event". + +These mechanisms would be used, for example, when a game needs to play a sound. +The audio service will produce a `KEvent` that will "signal" when it's ready for more audio data from a game, and this will communicate with the audio thread so that data can be submitted and requested as needed by using these `KReadableEvent` and `KWritableEvent` attributes. + +As always, the major benefit of these rewrites is accuracy. +These changes will also make it easier in the long term to add the code of future updates that Nintendo might do to their kernel, since the behaviour of this implementation will be closer to the hardware and the existing code won’t need many changes to accommodate for it. + +There’s still room for more additions and improvements, so stay tuned for more work on this area. + +After a period of inactivity, [FernandoS27](https://github.com/FernandoS27) is back with a PR to [optimize clock calculations](https://github.com/yuzu-emu/yuzu/pull/5275) by introducing a new method to compute time values, such as nanoseconds, microseconds, milliseconds, and also guest clock and cpu cycles, from the native clock of the CPU. +This is a relatively small change, but since these calculations are performed often, all optimizations are helpful to reduce the time spent on these transformations. + +## Input changes + +What can be better than QoL changes that you didn’t know you wanted until you saw them? +[german77](https://github.com/german77) gives us just that by [animating the controller input settings image](https://github.com/yuzu-emu/yuzu/pull/5339) on player actions. +You can see the results yourself: + +{{< single-title-imgs + "I like to move it, move it!" + "./pro.mp4" + "./joy.mp4" + >}} + +The animation will highlight the buttons that are currently being pressed. +There’s also a second animation for the analog sticks to make the calibration of deadzones and range more intuitive. +Your controller will behave in-game as shown by the animation in the settings, so if you think there’s any problem with your input, it’s a good idea to check if it’s working as intended here. + +Input lag, the worst enemy of competitive games… And [german77](https://github.com/german77) comes to the rescue, by [preventing overscheduling events.](https://github.com/yuzu-emu/yuzu/pull/5861) + +`Pokémon Let’s Go Eevee/Pikachu` may disconnect the emulated controller, or fail to recognise the connection. +By [applying a delay to this process](https://github.com/yuzu-emu/yuzu/pull/5805), [german77](https://github.com/german77) improves the stability of input emulation for this series of games. +Handheld or single Joy-Con input modes are still needed to play this game, be sure to check your input settings in `Emulation > Configure… > Controls`. Swap the default Pro Controller to, for example, Handheld. + +Users discovered that some games may continue to send vibration signals, this is due to the game never sending a 0 amplitude signal. +[Morph](https://github.com/Morph1984) fixes those erroneous vibrations by [adding a 1 second maximum time for any vibration.](https://github.com/yuzu-emu/yuzu/pull/5800) + +In a double combo, [Morph](https://github.com/Morph1984) and [german77](https://github.com/german77) hit us with fixes regarding Handheld mode. +[A wrong behaviour regarding player 1 was addressed](https://github.com/yuzu-emu/yuzu/pull/5743), which used to result in input changes not saving, especially in Handheld mode. +[A check was added to ensure Handheld mode is connected](https://github.com/yuzu-emu/yuzu/pull/5757) only in the correct `npad_index` value. + +Holding a button would sometimes stutter, resulting in unstable behaviour. [Morph](https://github.com/Morph1984) [adds a new method to check the duration of the press or hold of the buttons](https://github.com/yuzu-emu/yuzu/pull/5366), resulting in stable behaviour. + +## Future projects + +The merge of the Buffer Cache Rewrite will open the way to some improvements and fixes on the roadmap, epicboy will have some interesting things to show thanks to this. Morph is up to something. german77 is up to something. ogniK is up to something. bunnei continues to suffer with the Kernel rewrites. Rodrigo is making the first tests on Project Hades, while also planning a couple of nice Vulkan and video memory management improvements. + +That’s all folks! Thank you so much for staying with us. See you in the February report! + +And remember kids, winners update their GPU drivers to the latest version! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-jan-2021/joy.mp4 b/site/content/entry/yuzu-progress-report-jan-2021/joy.mp4 new file mode 100644 index 000000000..93c51e916 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/joy.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/mn7.png b/site/content/entry/yuzu-progress-report-jan-2021/mn7.png new file mode 100644 index 000000000..59a2ba630 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/mn7.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/pksw.png b/site/content/entry/yuzu-progress-report-jan-2021/pksw.png new file mode 100644 index 000000000..c14373967 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/pksw.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/pro.mp4 b/site/content/entry/yuzu-progress-report-jan-2021/pro.mp4 new file mode 100644 index 000000000..2d17dcb7f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/pro.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/smobug.png b/site/content/entry/yuzu-progress-report-jan-2021/smobug.png new file mode 100644 index 000000000..7a8273b09 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/smobug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/smofix.png b/site/content/entry/yuzu-progress-report-jan-2021/smofix.png new file mode 100644 index 000000000..1b89d1802 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/smofix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/summary.png b/site/content/entry/yuzu-progress-report-jan-2021/summary.png new file mode 100644 index 000000000..341758582 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/vr.png b/site/content/entry/yuzu-progress-report-jan-2021/vr.png new file mode 100644 index 000000000..f979eaa8c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/vr.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/xcdebug.mp4 b/site/content/entry/yuzu-progress-report-jan-2021/xcdebug.mp4 new file mode 100644 index 000000000..a1402ea12 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/xcdebug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/xcdefix.mp4 b/site/content/entry/yuzu-progress-report-jan-2021/xcdefix.mp4 new file mode 100644 index 000000000..fcb44d932 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/xcdefix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/zpiwbug.png b/site/content/entry/yuzu-progress-report-jan-2021/zpiwbug.png new file mode 100644 index 000000000..4e8e97465 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/zpiwbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2021/zpiwfix.png b/site/content/entry/yuzu-progress-report-jan-2021/zpiwfix.png new file mode 100644 index 000000000..48ac28a98 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2021/zpiwfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/1.png b/site/content/entry/yuzu-progress-report-jan-2022/1.png new file mode 100644 index 000000000..e9cff1e6d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/1.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/2.png b/site/content/entry/yuzu-progress-report-jan-2022/2.png new file mode 100644 index 000000000..6dc7946af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/aoc.png b/site/content/entry/yuzu-progress-report-jan-2022/aoc.png new file mode 100644 index 000000000..0f72c30a6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/aoc.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/astcbug.png b/site/content/entry/yuzu-progress-report-jan-2022/astcbug.png new file mode 100644 index 000000000..f6975126b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/astcbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/astcfix.png b/site/content/entry/yuzu-progress-report-jan-2022/astcfix.png new file mode 100644 index 000000000..a7eec64dd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/astcfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/banner.png b/site/content/entry/yuzu-progress-report-jan-2022/banner.png new file mode 100644 index 000000000..aec407235 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/battery.png b/site/content/entry/yuzu-progress-report-jan-2022/battery.png new file mode 100644 index 000000000..327f18b88 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/battery.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/ending.png b/site/content/entry/yuzu-progress-report-jan-2022/ending.png new file mode 100644 index 000000000..cebf1375a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/ending.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/esp.png b/site/content/entry/yuzu-progress-report-jan-2022/esp.png new file mode 100644 index 000000000..08def88d5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/esp.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/glasmbug.png b/site/content/entry/yuzu-progress-report-jan-2022/glasmbug.png new file mode 100644 index 000000000..876d2434f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/glasmbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/glasmfix.png b/site/content/entry/yuzu-progress-report-jan-2022/glasmfix.png new file mode 100644 index 000000000..6f0cab6f0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/glasmfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/gyro.png b/site/content/entry/yuzu-progress-report-jan-2022/gyro.png new file mode 100644 index 000000000..a1868ac3b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/gyro.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/hotkeys.png b/site/content/entry/yuzu-progress-report-jan-2022/hotkeys.png new file mode 100644 index 000000000..85859332b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/hotkeys.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/index.md b/site/content/entry/yuzu-progress-report-jan-2022/index.md new file mode 100644 index 000000000..dbf820511 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jan-2022/index.md @@ -0,0 +1,366 @@ ++++ +date = "2022-02-11T12:00:00-03:00" +title = "Progress Report January 2022" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 535150 ++++ + +What a month we've had, yuz-ers. This time, we offer you a plethora of kernel changes, input fixes and new additions, yet more NVIDIA driver fixes, user interface changes, and more! + + + +## PSA for NVIDIA users: Part 3 + +[It’s not over yet](https://www.youtube.com/watch?v=g02QU-xPV1I). + +[As you know](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2021/#paint-me-like-one-of-your-french-bits), regular NVIDIA desktop and laptop GPUs don't support decoding ASTC textures, so yuzu makes use of the compute capabilities of the GPU to parallelize the process. However, the recent release of the 511.XX drivers introduced an issue that affected our compute shader based accelerated ASTC texture decoding. + +{{< single-title-imgs-compare + "Crispy (Super Mario Odyssey)" + "./astcbug.png" + "./astcfix.png" +>}} + +After some investigation, [epicboy](https://github.com/ameerj) found that the reason for the bug is an over-optimization introduced by the new drivers (an optimization for one scenario results in issues for another). +{{< gh-hovercard "7724" "A small change in behaviour solves the issue" >}}. +You can find more technical information in the pull request. + +Users playing `Hyrule Warriors: Age of Calamity` or `Luigi’s Mansion 3` should stick to the 47X.XX series of drivers, as any version newer than that will have several rendering issues. +Don't fret, we’re investigating the cause! + +{{< imgs + "./aoc.png| Abstract art generator (Hyrule Warriors: Age of Calamity)" + >}} + +On the flip side, version 511.65 includes support for the recently released Vulkan 1.3, and improves performance considerably when using said API. +Some games show an increase in performance of up to 24%! + +## A new Legend + +Finally, after over two decades, the Pokémon franchise diverges from its tired formula and implements a big change to gameplay in the recently released `Pokémon Legends: Arceus`. + +All this at the cost of graphical fidelity. But hey, there are worse looking games... [on the GameCube](https://www.youtube.com/watch?v=-vak7MUaa5E). + +Apart from the disappointing graphics, this game's release exposed several issues with yuzu, and has even helped us fix long standing issues that affected many more games. + +[bunnei](https://github.com/bunnei) fixed a deadlock found in the code used to {{< gh-hovercard "7787" "migrate threads among the cores" >}}, which caused some noteworthy softlocks present in `Pokémon Legends: Arceus`. + +The problem can be summarised as follows: One thread (thread `A`) would be waiting for another one (thread `B`) to release a lock, and conversely, thread `B` would be waiting for thread `A` to release another lock, resulting in a deadlock. + +{{< imgs + "./ending.png| Best gameplay change in decades (Pokémon Legends: Arceus)" + >}} + +Moving on from kernel issues, epicboy implemented various GPU changes. + +He found that {{< gh-hovercard "7788" "reducing the amount of buffer allocations" >}} at the start, rather than only at the end, prevented the game from crashing in certain locations. + +Some Vulkan drivers, especially Intel Windows ones, can’t process 64-bit atomic operations (operations that can run independently of any other processes). +epicboy {{< gh-hovercard "7800" "adds support in yuzu for unsigned 2x32-bit atomic operations" >}}, as that’s the fallback option such drivers use. +With this change, the game boots with Intel GPUs running Vulkan. + +AMD had a longstanding issue with `Transform Feedback` in both their official Windows and Linux drivers, causing rendering issues in countless games. +While this was recently solved in the Linux AMDVLK drivers, AMD Windows drivers still need to be told which `Execution Mode` will be in use next. + +{{< gh-hovercard "7799" "Explicitly stating to use Xfb" >}} `Execution Mode` before starting to use Transform Feedback solves all issues related to it on AMD Windows Vulkan drivers, not only benefiting `Pokémon Legends: Arceus`, but also games like `Xenoblade Chronicles 2`, `Xenoblade Chronicles Definitive Edition`, `Hellblade: Senua's Sacrifice`, `Donkey Kong Country: Tropical Freeze`, `POKKÉN TOURNAMENT DX`, and many many others. + +{{< single-title-imgs-compare + "Pokémon Legends: Arceus" + "./tfbug1.png" + "./tffix1.png" +>}} + +  + +{{< single-title-imgs-compare + "Xenoblade Chronicles Definitive Edition" + "./tfbug2.png" + "./tffix2.png" +>}} + +  + +{{< single-title-imgs-compare + "Donkey Kong Country: Tropical Freeze" + "./tfbug3.png" + "./tffix3.png" +>}} + +`Pokémon Legends: Arceus` is affected by vertex explosions, exhibiting what looks like textures stretching at random. +The bad news is that this is a problem with the `Buffer Cache`, and fixing it will take considerable time. + +The good news is that [Blinkhawk](https://github.com/FernandoS27), with some help from epicboy, managed to implement a temporary workaround to avoid this problem while a permanent solution starts taking shape. +{{< gh-hovercard "7805" "Flushing the buffer before writing" >}} saves us from polygon hell, at a minimal performance cost. + +{{< single-title-imgs-compare + "Imagine how it looks from space (Pokémon Legends: Arceus)" + "./vebug.png" + "./vefix.png" +>}} + +Mark this the day we start to plan yet another Buffer Cache Rewrite. + +As a start, Arceus showed a considerably higher VRAM use than normal, causing 2GB GPU users to crash during cutscenes. +Blinkhawk’s solution is to {{< gh-hovercard "7812" "expand the specific direction the buffer cache is increasing" >}}, instead of the previous method of doubling the size. +This allows 2GB users to play regularly, and 4GB users to be able to scale to 2x without fear of crashes. + +Now for some general recommendations: + +Having a save from previous Switch Pokémon games will unlock special clothing options after the tutorial. + +We measured a slim performance improvement on the (currently) latest 22.2.1 AMD Windows drivers and, as mentioned, a 24% boost with the 511.65 NVIDIA Windows driver. +Chad Vulkan 1.3 lending a hand. + +Regarding GPU accuracy, while `Normal` produces the highest performance, `High` allows for proper particle rendering, so if you want the extra accuracy and have the performance to spare, stick to `High`. + +Effects, particles, and certain attacks seem to render incorrectly at resolutions over native 1x. While we’re investigating the reason for this, it seems to also happen on the Switch itself, so it could just be the nature of these shaders (feels reminiscent of the ghosting in the [3DS Pokémon games](https://www.reddit.com/r/Citra/comments/ft28sw/is_there_any_way_to_fix_ghosting_on_pokemon_ultra/). + +{{< imgs + "./particles.png| Thanks Serfrost! (Pokémon Legends: Arceus)" + >}} + +yuzu’s default setting is to run games in OpenGL using GLASM, commonly known as assembly shaders. +These settings will cause weird shadow acne on characters, and the solution is to either use GLSL instead of GLASM, or what we recommend, switch to Vulkan altogether. + +{{< single-title-imgs-compare + "Broken shadows? Zero! (Pokémon Legends: Arceus)" + "./glasmbug.png" + "./glasmfix.png" +>}} + +Users of Radeon GPUs older than the 400 series running Windows will experience crashes due to outdated and out of support drivers. +Not even modified drivers seem to help, so the only solution is to use Linux with its still supported, and quite faster, Mesa drivers. + +Finally, excessive mod use or high values of `Anisotropic Filtering` can cause vertex explosions with some GPU configurations. We’re still investigating the cause for this. + +## Other graphical fixes + +Blinkhawk made some {{< gh-hovercard "7720" "changes to the Garbage Collector" >}} (`GC`), which encompasses a number of bug fixes, improving the algorithm to make it clean memory in a smarter fashion, and also making it more efficient for iGPUs. + +The value of the `minimal`, `expected`, and `critical` thresholds were rebalanced, so that it does not act as aggressively on GPUs with more memory, while it still performs the job within an acceptable margin for low-memory graphics cards. +Additionally, yuzu now queries the size of the GPU memory instead of estimating it, allowing the `GC` to make better decisions when cleaning it. +These changes seek to benefit both low-end and high-end GPUs the most, without affecting either negatively. + +Special consideration was put on ASTC textures, which are notoriously heavy on the memory. +The `GC` would clean them too early, causing graphical corruptions on titles that make use of these resources. +For this reason, the conditions to determine when to clean ASTC textures were made less strict, which should mitigate the problem in most scenarios. + +Although these changes were originally part of the `YFC` project, Blinkhawk decided to implement these changes now, in order to alleviate the problems related to the previous `GC` implementation. +There is still a lot to come from this project, so please stay tuned for more information in future updates. + +Keep in mind, special case titles like `ASTRAL CHAIN` will still require 3GB of VRAM or more to properly emulate. + +On another hand, some titles, such as the `Super Mario 64` port (homebrew), would experience freezes in some GPU models (especially iGPUs). + +Blinkhawk investigated the problem, and noticed it lay within our Vulkan Scheduler, a class that abstracts the command buffer so it can perform OpenGL-like operations in a Vulkan environment. + +As the scheduler manages the order in which it must queue GPU commands before sending them to the device, it is vital that the fencing logic used to determine this is timed correctly. + +Previously, the scheduler would only queue command chunks whose type offsets were different from zero. +The problem arose because there exists a specific valid type of command whose offset is actually zero. +Not taking into consideration this case hindered the fencing logic of the scheduler, preventing it from performing its work properly. + +Thankfully, the solution did not require any difficult change, and Blinkhawk was able to mitigate these freezes by {{< gh-hovercard "7814" "submitting a simple patch" >}} that addresses this specific problem. + +{{< imgs + "./mario.png| It's-a him! (Super Mario 64 homebrew)" + >}} + +## Kernel changes + +The code for Memory Management — one of the functions of the kernel — was originally written back in early 2020, based on the information available at the time. +Since then, there have been numerous updates to the Nintendo Switch's operating system, as well as new documentation obtained through reverse engineering. + +For this reason, [bunnei](https://github.com/bunnei) has been going through each and every part of the code used to manage the memory, focusing on improving both the stability and the accuracy of the kernel. + +These changes involved brushing up the memory {{< gh-hovercard "7684" "attribute definitions" >}} and {{< gh-hovercard "7698" "permissions" >}}, so they match the behaviour of the latest `HorizonOS` more closely. +Most of the code used to map and unmap memory was {{< gh-hovercard "7762" "tidied up" >}}, and various functions were renamed to match the official naming. +Similarly, the code used to allocate and clear the heap memory was {{< gh-hovercard "7701" "reviewed" >}} in this way. + +This new implementation should perform better, and also make the code easier to read and navigate. + +While investigating the long-standing crashes pertaining to `Pokémon Sword/Shield`, bunnei found they were related to race conditions. + +The first would happen when opening a new session to a service: that is, yuzu would create a `host thread` (a non-emulated thread), where service session requests can be dispatched to asynchronously. +When this session was closed, the `host thread` for the closing session was being removed from the tracking list at the same time as a new one was added, which caused the race condition. + +Services are requested by games when they want to send certain audio to play to the speakers, request certain graphics to be loaded into memory, etc. +`Pokémon Sword/Shield`, in particular, opens and closes LDN service sessions very frequently, which is why it is one of the most affected titles. + +By {{< gh-hovercard "7711" "introducing a worker thread to manage the service list" >}}, now only one thread will be able to create or destroy service sessions, preventing the crash from happening. + +Following this lead, bunnei revisited the code used to exit threads, and found that another race condition occurred, where thread references were being destroyed while they were still selectable for scheduling, resulting in a crash. + +The solution was to {{< gh-hovercard "7712" "reimplement the thread termination code more accurately" >}}, so that it matches that of the HorizonOS. +yuzu now waits for the thread to be unscheduled from all cores before closing it, so that it is destroyed only when it is no longer running. + +Another long-standing problem with `Pokémon Sword/Shield` was related to the code used for the High-Level Emulation (`HLE`) Service Thread Management. + +When a game requests certain services, instead of emulating the internal logic of the Nintendo Switch's OS (which would be Low-Level Emulation, `LLE`), yuzu runs an implementation written by the developers that performs the same job on the user's computer. + +These `HLE` services need to be able to interact with the emulated kernel, in order to grab locks and triggers for rescheduling, etc. +yuzu achieves this by making use of `dummy threads`, which are created as an emulated `KThread` entity. + +A `dummy thread` is created for every `host thread` of a service interface running in the user's computer, so that whenever the kernel needs to interact with a `host thread`, it can do so through these `dummy threads`. + +Previously, these `dummy threads` were not being released when their main thread was destroyed, and hence, they would accumulate over time. +Since the kernel imposes a limit on the amount of threads a process can make, yuzu was eventually unable to create more threads to open service interfaces in long gaming sessions. +Furthermore, these dummy threads could inadvertently be scheduled on the emulated cores, which resulted in a crash, as they are not real threads meant to be run. + +After investigating these problems, bunnei {{< gh-hovercard "7737" "implemented various fixes and checks" >}} to correct this faulty behaviour, and prevent resource leaks and crashes. + +Next, bunnei {{< gh-hovercard "7765" "fixed the KThread counter increment/decrement" >}} operations, as the old implementation was incorrect, and could occasionally underflow. +This is the aforementioned counter used to keep track of all the `KThread`s in a process, ensuring the limits imposed by the kernel are not breached. + +[epicboy](https://github.com/ameerj) also took a look at the kernel, and added a new shut-down method to {{< gh-hovercard "7670" "properly synchronise threads" >}} before their destruction. +This change fixes a hang that could occur when stopping emulation in yuzu. + +## UI improvements + +In a series of minor changes, a number of contributors decided to improve and correct some elements displayed on our interface, and the way the user can interact with them. + +[german77](https://github.com/german77) noticed that some items, such as the `Stop` and `Start` buttons, were not being disabled from interaction once the emulation process stopped, and {{< gh-hovercard "7662" "promptly fixed this erroneous behaviour" >}}. + +He also went ahead and implemented the graphical elements needed to {{< gh-hovercard "7735" "report the battery levels" >}} of UDP controllers. +While this code has been in yuzu's source for some time already, preparing the appropriate front-end graphics and the subsequent implementation into the UI had been pending tasks for a long time. + +{{< imgs + "./battery.png| Pretty useful for Joy-Cons!" + >}} + +While {{< gh-hovercard "7768" "updating the AMD FidelityFX Super Resolution" >}} (`FSR`) dependency to the latest version, [Moonlacer](https://github.com/Moonlacer) changed the text string to replace the brackets around the `Vulkan Only` message with parenthesis, for consistency with all the other text in our interface. + +In a similar vein, [gidoly](https://github.com/gidoly) corrected a series of spelling mistakes in the strings describing the name of commercial gamepads, namely the {{< gh-hovercard "7713" "PlayStation" >}} and {{< gh-hovercard "7715" "Xbox" >}} controllers. + +Based on a Patreon poll conducted in our [discord server](https://discord.gg/u77vRWY), gidoly also made the necessary changes to make the `Dark Colorful` theme the {{< gh-hovercard "7719" "default theme" >}} used when running yuzu for the first time on Windows. + +[v1993](https://github.com/v1993) also made changes, so that now using the Colourful theme {{< gh-hovercard "7755" "allows Qt to use the system-wide colours in *NIX systems" >}}, instead of forcing dark ones. + +{{< imgs + "./theme.png| Default by popular demand" + >}} + +Naturally, users can still change the theme through the configuration settings, if so desired. + +## Input changes + +german77 has been *especially* busy this month, so there’s quite a bit to cover in this section. + +Users reported that the game `パワプロクンポケットR`, and other games of the Power Pocket saga, crashed when in-game. +This is caused by the `SetNpadAnalogStickUseCenterClamp` service being able to initialize the `applet_resource` subsystem even if it wasn’t initialized before. +{{< gh-hovercard "7726" "Emulating this behaviour solves the issue and makes some game modes playable" >}}. +However, some game modes still show that yuzu lacks support for some vertex formats, causing crashes. + +{{< imgs + "./power.png| パワプロクンポケットR" + >}} + +yuzu will now {{< gh-hovercard "7663" "only display the currently supported controller types in the applet" >}}, depending on what each game reports as compatible. + +`Fullkey` is the codename used by Nintendo to refer to a generic type of controller that reports itself as a Pro Controller if you connect an “unsupported” gamepad. This can refer to the GameCube, NES, SNES, N64 and Sega Genesis controllers. +In case of problems, the console falls back to reporting a Pro Controller for those types of controllers. german77 {{< gh-hovercard "7664" "added this functionality to yuzu as well" >}}. + +Support was added to {{< gh-hovercard "7680" "allow devices with only an accelerometer present to act as motion devices" >}}. +While this means broader support, lacking a gyroscope means very poor results in motion, as some axis movements won’t be registered. + +With the help of v1993, german77 {{< gh-hovercard "7682" "fixed the mapping of UDP controllers" >}} (any device connected using the cemuhook protocol). +Motion now correctly automaps and manual mapping won’t reset the device in the input list. + +In a separate PR, by request of v1993, german77 {{< gh-hovercard "7807" "added support for the Home and Touch buttons on UDP connections" >}}. + +Some motion devices can input very precise values, if the threshold is too high, the motion values will be ignored. +{{< gh-hovercard "7700" "Reducing the threshold for gyro data" >}} fixes this issue. + +While playing `Mario Tennis Aces` in swing mode, motion could suddenly stop working. +This was because the update rate interval for motion data was set too high. +{{< gh-hovercard "7707" "Decreasing the motion update rate to 10ms restores functionality" >}}. + +Also related to motion emulation, the quality and sensitivity of the device can also affect gameplay. As a way to compensate, german77 introduced {{< gh-hovercard "7770" "an option to configure the gyro threshold" >}}, you can find it if you have a motion capable controller (in the example, dual Joy-Cons). Configured in `Emulation > Configure… > Controls > right click Motion > Set gyro threshold`. + +{{< imgs + "./gyro.png| Right clicking!" + >}} + +Accessing 2-player mode in `Pokémon: Let’s Go Eevee & Pikachu` requires performing a shake motion. +The emulated shake on the keyboard was too weak to be registered by the game, so {{< gh-hovercard "7710" "increasing its “force”" >}} shakes things up to allow local multiplayer. + +One of the features missing with the release of `Project Kraken`, the input rewrite, was mouse motion support. +{{< gh-hovercard "7725" "German77 reintroduced support for it" >}}, now using the mouse wheel as input for the Z-axis. +Also, mouse buttons get their proper names when being mapped. + +Another feature that somehow missed the memo {{< gh-hovercard "7760" "was stick modifiers for keyboard input" >}}, holding a mapped key to move an analog stick with a reduced limit. +For example, with default keyboard mappings, if you hold shift, the left analog stick will move only up to 50% of its range, allowing keyboard users to walk. + +We recently introduced controller UI navigation. +While comfortable, some users run external programs to translate controller input into keyboard and mouse input. +For them, {{< gh-hovercard "7769" "a toggle to disable controller navigation was added" >}} in `Emulation > Configure… > Controls > Advanced > Controller Navigation`. + +{{< imgs + "./nav.png| Couch gamers will love this" + >}} + +By default, yuzu assumes that non-Nintendo Switch controllers, for example the Xbox controllers, will use rumble motors. These are cheaper and use an exponential amplitude curve for their rumble, making this kind of method incompatible for emulating HD Rumble. +The DS5 on the PlayStation 5, instead, uses more expensive linear actuators (and needs a linear amplitude curve), like the Pro Controller and Joy-Cons. +{{< gh-hovercard "7784" "With this change" >}}, german77 extended support to include the official PlayStation 5 controller, the DS5, which is capable of the required precision for HD Rumble. + +## General changes and bugfixes + +TAS scripts can sometimes have errors in them, resulting in yuzu encountering a crash. +german77 provides the necessary code to {{< gh-hovercard "7687" "add error handling to TAS scripts" >}}, preventing these crashes. + +Windows has a nasty, hidden limitation that is the maximum open-file limit a program can use. +Some game mods can contain many, *many* files, going over the previous 4096 limit. Therefore, [Morph](https://github.com/Morph1984) {{< gh-hovercard "7690" "doubled the limit to 8192" >}}. + +v1993 has been working on code cleaning using [PVS-Studio](https://pvs-studio.com/en/pvs-studio/), and the results have been great. +So far, errors were found and fixed in {{< gh-hovercard "7727" "four" >}} {{< gh-hovercard "7728" "separate" >}} {{< gh-hovercard "7729" "input" >}} {{< gh-hovercard "7730" "related areas" >}}, {{< gh-hovercard "7731" "the shader recompiler" >}}, and even {{< gh-hovercard "7732" "kernel emulation" >}}! + +Thanks v1993! Nothing beats cleaner code, especially if it solves out-of-bounds issues. + +Morph {{< gh-hovercard "7752" "stubbed the `SetCpuOverclockEnabled` service" >}} (you don’t need to overclock the host CPU on the fly when emulating). +This allows `Gravity Rider Zero` to boot, but nothing is yet displayed on screen due to missing texture format support. + +And finally, german77 {{< gh-hovercard "7821" "implemented the 32-bit variant of the supervisor call (SVC) `SynchronizePreemptionState`" >}}, making `Espgaluda II` playable. + +{{< imgs + "./esp.png| Espgaluda II" + >}} + +Meanwhile, [liushuyu](https://github.com/liushuyu) updated the dynarmic external submodule, providing {{< gh-hovercard "7679" "optimizations and also fixing compile errors" >}} caused by an update of another external, the `fmt` library — used to format text in yuzu's log and interface. + +german77 also added new {{< gh-hovercard "7716" "hotkeys that allow users to manipulate the volume" >}} of the application directly with the gamepad, a feature that will surely come in handy to the people who enjoy yuzu from the comfort of their couch. + +By default, `Home + D-Pad Right` will mute the application, while `Home + D-Pad Down` will lower the volume, and `Home + D-Pad Up` will increase it. +Users are free to change these mappings through the configuration menu `Emulation > Configure > Hotkeys`. + +{{< imgs + "./hotkeys.png| The more the merrier!" + >}} + +While working on this change, german77 noticed the equation used to transform from percentage values to "loudness" (i.e. output power) was too aggressive below the 70% mark, making the volume extremely soft in this range. +Thus, he decided to modify the formula, so that the transformation is smoother throughout the full range of percentage values. + +{{< imgs + "./volume.png| Old is in red and new is in green. Look at those curves!" + >}} + +## Future changes + +Progress continues smoothly on our projects in development. +For example, german77 is having fun with some heavily requested features. +Blinkhawk managed to complete one of the top secret projects [Rodrigo](https://github.com/reinuseslisp) left unfinished before *turning green*, `Host Conditional Rendering`. Expect to hear more of it in future `Project Y.F.C.` news. + +Now for a small leak of some recent internal testing: `Marvel Ultimate Alliance 3: The Black Order` jumped from 19 to 51 FPS, and your enemy's ink in `Splatoon 2` works correctly, both changes improving Vulkan. + +{{< single-title-imgs-compare + "More than double the performance, for only a few liters of developer tears (Marvel Ultimate Alliance 3: The Black Order)" + "./1.png" + "./2.png" +>}} + +That’s all folks! It’s always a pleasure to have you here, hope we see you again next month! + +  +{{< article-end >}} +{{< gh-hovercard-include-end >}} +{{< imgs-compare-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-jan-2022/mario.png b/site/content/entry/yuzu-progress-report-jan-2022/mario.png new file mode 100644 index 000000000..d6c4ebec4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/mario.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/nav.png b/site/content/entry/yuzu-progress-report-jan-2022/nav.png new file mode 100644 index 000000000..8fc1cec67 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/nav.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/particles.png b/site/content/entry/yuzu-progress-report-jan-2022/particles.png new file mode 100644 index 000000000..5d36c5af6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/particles.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/power.png b/site/content/entry/yuzu-progress-report-jan-2022/power.png new file mode 100644 index 000000000..8ab8bcaac Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/power.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/summary.png b/site/content/entry/yuzu-progress-report-jan-2022/summary.png new file mode 100644 index 000000000..2e01f0bdb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/tfbug1.png b/site/content/entry/yuzu-progress-report-jan-2022/tfbug1.png new file mode 100644 index 000000000..5f9a77055 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/tfbug1.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/tfbug2.png b/site/content/entry/yuzu-progress-report-jan-2022/tfbug2.png new file mode 100644 index 000000000..aa005af63 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/tfbug2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/tfbug3.png b/site/content/entry/yuzu-progress-report-jan-2022/tfbug3.png new file mode 100644 index 000000000..12037ca22 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/tfbug3.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/tffix.png b/site/content/entry/yuzu-progress-report-jan-2022/tffix.png new file mode 100644 index 000000000..04a6f5693 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/tffix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/tffix1.png b/site/content/entry/yuzu-progress-report-jan-2022/tffix1.png new file mode 100644 index 000000000..b78eda104 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/tffix1.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/tffix2.png b/site/content/entry/yuzu-progress-report-jan-2022/tffix2.png new file mode 100644 index 000000000..a56941477 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/tffix2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/tffix3.png b/site/content/entry/yuzu-progress-report-jan-2022/tffix3.png new file mode 100644 index 000000000..69ba56c75 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/tffix3.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/theme.png b/site/content/entry/yuzu-progress-report-jan-2022/theme.png new file mode 100644 index 000000000..8b32de906 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/theme.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/vebug.png b/site/content/entry/yuzu-progress-report-jan-2022/vebug.png new file mode 100644 index 000000000..a6112bbc9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/vebug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/vefix.png b/site/content/entry/yuzu-progress-report-jan-2022/vefix.png new file mode 100644 index 000000000..33fa61e9a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/vefix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2022/volume.png b/site/content/entry/yuzu-progress-report-jan-2022/volume.png new file mode 100644 index 000000000..5963860af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2022/volume.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/16k.jpg b/site/content/entry/yuzu-progress-report-jan-2023/16k.jpg new file mode 100644 index 000000000..8ae6484ad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/16k.jpg differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/banner.png b/site/content/entry/yuzu-progress-report-jan-2023/banner.png new file mode 100644 index 000000000..07d9ad7a4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/byte.jpg b/site/content/entry/yuzu-progress-report-jan-2023/byte.jpg new file mode 100644 index 000000000..837d3141d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/byte.jpg differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/dc.png b/site/content/entry/yuzu-progress-report-jan-2023/dc.png new file mode 100644 index 000000000..69874e0d8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/dc.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/dpibug.png b/site/content/entry/yuzu-progress-report-jan-2023/dpibug.png new file mode 100644 index 000000000..97225ab81 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/dpibug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/dpifix.png b/site/content/entry/yuzu-progress-report-jan-2023/dpifix.png new file mode 100644 index 000000000..9826b8203 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/dpifix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/feebug.png b/site/content/entry/yuzu-progress-report-jan-2023/feebug.png new file mode 100644 index 000000000..3deef2afc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/feebug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/feefix.png b/site/content/entry/yuzu-progress-report-jan-2023/feefix.png new file mode 100644 index 000000000..1cc8c06e0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/feefix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/fsr.png b/site/content/entry/yuzu-progress-report-jan-2023/fsr.png new file mode 100644 index 000000000..2584e50ed Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/fsr.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/gaia.png b/site/content/entry/yuzu-progress-report-jan-2023/gaia.png new file mode 100644 index 000000000..7d395325d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/gaia.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/index.md b/site/content/entry/yuzu-progress-report-jan-2023/index.md new file mode 100644 index 000000000..13ecc18be --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jan-2023/index.md @@ -0,0 +1,491 @@ ++++ +date = "2023-02-11T12:00:00-03:00" +title = "Progress Report January 2023" +author = "GoldenX86" +forum = 724529 ++++ + +New year, more work to do! 2023 started with a plethora of graphical changes, audio and input improvements, TAS and LAN/LDN fixes, and more! Stay tuned yuz-ers, this is just the start of what's to come this year! + + + +## New challenger approaching! + +During the time it took to merge last month’s `Project Y.F.C. 1.5`, several other GPU related changes had to be delayed. +One change that slipped by, made by a new contributor, improved the Vulkan experience so dramatically, it almost feels like cheating… +The change is simple: instead of relying on the GPU driver to store and validate the pipeline cache (a.k.a. the shaders), and having the usual suspects like the Windows AMD driver fail to store 95% of them because of some arbitrary low size limitation, [Wollnashorn](https://github.com/Wollnashorn) decided that {{< gh-hovercard "9527" "doing it with the official Vulkan API is better." >}} + +By storing the entire pipeline cache in a custom file among yuzu’s folders, AMD GPUs running on Windows can now properly load large caches in mere seconds, as it should be. +This has saved me literal hours of time while playing `Xenoblade Chronicles 3` with an RX 6600, as the game has the _lovely perk_ of many heavy shaders. +Booting the game with 25000 shaders used to take close to 15 minutes, with the driver only providing the first 3000 shaders or so, and the rest always being recompiled. The process now takes mere *seconds*. + +{{< imgs + "./shaders.mp4| NVIDIA and Intel are faster at shader building than AMD" + >}} + +But this isn’t just another fix for AMD Windows users. While the objective was accomplished, the benefits didn’t stop there. +As it turns out, locally stored files are much quicker to save compared to relying on the GPU driver. +Possibly due to fewer checks being performed? +All GPU vendors see reduced stuttering when facing new shaders! + +The usual limitations apply: the cache still asks the driver for validation, so updating it to a newer or older version will require a recompilation, and since the cache is vendor-specific, you won’t get to keep the cache if you switch to a new GPU from another vendor. (And we’re glad there are more than two options now.) + +While Wollnashorn intended this feature to be optional at first, we consider it fully stable, so it’s now enabled by default. +Anyone interested in testing disabling it will find the new option in `Emulation > Configure… > Graphics > Advanced > Use Vulkan pipeline cache`. + +{{< imgs + "./turboui.png| Vulkan only, OpenGL is not this flexible with compute work" + >}} + +Wollnashorn, delivering another amazing entry for the new year, implemented {{< gh-hovercard "9539" "support for AMD's FidelityFX Super Resolution (FSR) in the OpenGL backend." >}} +While AMD only really intended this adapting filter to be used with Vulkan and Direct3D 12, it is actually portable to OpenGL, and provides generally superior results compared to other filters. +Thanks! + +{{< imgs + "./fsr.png| Fermi users rejoice" + >}} + +## Fire Emblem Unity + +A new entry in the series, and, some core changes aside, a good one at that! +The best part of this release is in the technical aspect. +Gone is the clunky and slow Koei Tecmo engine. `Fire Emblem Engage` uses the much more flexible and optimized Unity engine instead. + +For us emulation fans, this means 60 FPS is achievable on very low-end hardware, and the game can be reasonably played with the framerate unlocked too. Only some animations and 2D elements experience issues with the higher framerates, something we hope the modding community can solve. +We expect to see 120 and even 240 FPS mods working fine on reasonably powerful hardware. + +Another point, and maybe even more important, is shader stuttering. +Koei’s engine is notoriously infamous for having bloated shaders that, without tons of work from our side, can make any GPU driver crash on timeouts. +Unity, on the other hand, has much lighter shaders, allowing Vulkan’s parallel building to shine, and asynchronous shader building provides extra help, if your CPU doesn’t have enough threads to hide what little stutter remains. + +Still, new game release, new issues, and new fixes for them. So let’s list what has been done so far. + +[byte[]](https://github.com/liamwhite), who may or may not have just discovered the Fire Emblem series, noticed an issue with the shader compiler: the only place where multisampled (MSAA) textures were actually being intentionally processed in shaders was in the `GLASM` shader backend, albeit incorrectly. +In the `GLSL` backend, it was completely ignored, and in the `SPIR-V` backend, it produced an invalid combination of arguments to a `SPIR-V` instruction, which caused Mesa to abort when processing our shader. +{{< gh-hovercard "9652" "Passing through multisample information" >}} fixed the crash, but left more work to do... + +...which [epicboy](https://github.com/ameerj), one of the original authors of the shader compiler, took notice of, and came back with a rapid-fire series of fixes to address. +His first fix was to continue what byte[] had started and fully {{< gh-hovercard "9687" "implement multisampled texture fetches" >}} in the `GLSL` and `GLASM` backends, cleaning up rendering of the game with those backends. + +{{< single-title-imgs-compare + "From Stealth to Tactical RPG (Fire Emblem Engage)" + "./oglbug.png" + "./oglfix.png" + >}} + +He then implemented two more changes: {{< gh-hovercard "9694" "preventing translations of the `TXQ instruction` from producing another invalid combination of arguments," >}} and then {{< gh-hovercard "9703" "implementing full support for multisampled images" >}} with the `TXQ instruction`, with only a few minor loose ends to tidy up -- which will require another cache invalidation. +We preemptively apologize to all Smash players (even though it hasn't happened yet). + +{{< single-title-imgs-compare + "Now your favorite characters won't be half-way in the Shadow Realm (Fire Emblem Engage)" + "./feebug.png" + "./feefix.png" + >}} + +This fixed menu rendering in other games, such as `Dokapon UP!` and `Pokémon Mystery Dungeon: Rescue Team DX`. + +{{< single-title-imgs-compare + "Fight fire with fire (Pokémon Mystery Dungeon: Rescue Team DX)" + "./pmdbug.png" + "./pmdfix.png" + >}} + +As any NVIDIA `Pokémon Brilliant Diamond/Shining Pearl` player will tell you, Unity engine games are more stable on OpenGL, one of the rare cases where the old API is preferred. +We’re working to fix this issue, but for now, if you are experiencing crashes when using Vulkan with an NVIDIA GPU, try using OpenGL instead, and as an alternative, see if disabling Accelerate ASTC texture decoding helps. +As always, both options can be found in `Emulation > Configure… > Graphics`. + +## [Turbo mode](https://www.youtube.com/watch?v=D3djVW3dSGA) + +If you followed previous progress reports, you may have noticed a certain pattern. +Your writer has a stupid idea, and byte[] is the one that ends up listening to my rambling and makes that idea a reality. +This routine worked successfully with SMAA for Vulkan, unsuccessfully with increasing the staging buffer size to take advantage of ReBAR, sadly, and this time, it _almost worked_ with `Turbo mode`, or its official/boring name, {{< gh-hovercard "9552" "Force maximum clocks." >}} + +You might be able to see where this is going. +[A year ago,](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2022/#vulkan-is-the-future) Patreon funding got your writer access to an RX 6500 to help with testing and debugging. +That card died a horrible, premature death (and no one misses it), but before kicking the bucket, it allowed us to learn that RDNA and RDNA2 hardware from AMD suffer from serious downclocking issues if you’re not constantly shoving work to the GPU. +Thankfully, due to the cryptomining crash, an RX 6600 took its place for no extra cost. +In your face, miners. + +Ehem, back on topic. +The card will try to idle as much as possible to save power, so if the workload is not constant, it switches to a lower clock speed, and raising the clocks again takes time. +This results in lower performance. +While the issue affects all GPU vendors in one way or another, only AMD suffers from up to 70% performance losses, with both Windows *and* Linux drivers. Yes, even RADV. + +Since asking the users to apply external workarounds like encoding video in the background to keep VRAM usage high or overclocking the minimum clock speed are not easy to communicate, or can count as voiding your warranty, your writer was going insane trying to find ways to cleanly solve this issue, as it seems AMD isn’t very interested in it. + +The solution came from an overclocking background again. +[memtestCL](https://github.com/ihaque/memtestCL) is a tool to test stability of video memory: you set a size, how many iterations to run, and the compute load will compare results, informing you of any errors. +Running yuzu and memtestCL at the same time completely fixed the downclocking issues of AMD cards! + +Some small discussions and prototyping later, and a solution was starting to take shape. +Creating and running an OpenCL/CUDA process in parallel was deemed to be too much work, and could be sent to the background by the scheduler, nullifying any gain. +Instead, we decided to use Vulkan’s own compute capabilities. +A useless dummy load will constantly run on the GPU, forcing it to always keep its clocks as high as possible, and with it, the power consumption. + +{{< imgs + "./turboperf.png| Four of the most GPU intensive games. Lower end cards like the infamous RX 6500 XT can see jumps as high as 70%" + >}} + +While this is a simple solution, it has a few drawbacks that forced us to sadly not enable this option by default: + +First, not all users want to or can run their GPUs at maximum performance. On mobile devices, it results in terrible battery life, or hitting power limits on AMD and Intel APUs, like the Steam Deck for example, with its small 15W default TDP. + +Second, low constant loads like an old game running at very high framerates, or an emulator performing dummy cycles, produce a noise known as coil whine, an electrical “purring” that varies in intensity with each GPU. Some are barely audible, others can scare their users, even if the card is under no harm. + +And third, while this is a safe option for AMD dedicated GPUs, on NVIDIA and Intel, the results are much more variable. +Weaker NVIDIA cards (anything weaker than an RTX 3060) will most likely lose considerable performance with Turbo mode, while the powerful, expensive cards will see performance gains similar to AMD. +The RTX 4090 in particular performs better with Turbo than even NVIDIA’s own “Prefer maximum performance” setting in their control panel. + +{{< single-title-imgs + "Left is default performance with an RTX 4090, middle is using the driver's 'Prefer maximum performance', right is yuzu's Turbo mode (Pokémon Scarlet)" + "./nvidia1.png" + "./nvidia2.png" + "./nvidia3.png" + >}} + +Intel is, as always, a special case. +While Turbo mode certainly helps desktop Arc GPUs, integrated Xe graphics and older can only run a single queue. +This means that, by design, these iGPUs can’t render and run compute tasks at the same time. +While the scheduler seems to do a fantastic job, not causing any performance loss with Turbo, you still get all the drawbacks and no benefit while using Intel iGPUs. + +We have worked to resolve as many limitations as we could, but since the results are so variable between different vendors and cards, the option will remain disabled by default. +We strongly recommend that everyone tests it. If it produces a performance gain in a game, it should be consistent across the board. +At least all desktop AMD users, Big Chungus NVIDIA owners, and the 5 people with an Arc will benefit greatly from it. +The option can be found in `Emulation > Configure… > Graphics > Advanced > Force maximum clocks`. +…I still prefer calling it Turbo mode… + +{{< imgs + "./turboui.png| Let's reuse the same pic, no one will notice it" + >}} + +## Yet more GPU changes + +Starting off the new year with a bang, [bylaws](https://github.com/bylaws) of [Skyline](https://github.com/skyline-emu/skyline) fame returned with another round of fixes for our shader compiler project. +`Geometry shader passthrough` is an NVIDIA hardware feature available on the Switch which is primarily used to select a viewport or layer without needing an actual geometry shader, and it is available to and used by yuzu with desktop NVIDIA cards. +However, AMD, Intel, and other vendors don't support this extension, and require emulation using geometry shaders. +bylaws {{< gh-hovercard "9535" "added support for geometry shader passthrough emulation," >}} which fixed rendering issues in `NieR:Automata The End of YoRHa Edition`, `Marvel Ultimate Alliance 3: The Black Order`, `Pokémon: Legends Arceus`, and likely many other games. + +{{< single-title-imgs-compare + "Robot shoot is pretty funny (NieR:Automata The End of YoRHa Edition)" + "./nabug.png" + "./nafix.png" + >}} + +[vonchenplus](https://github.com/vonchenplus) {{< gh-hovercard "9556" "implemented the `draw texture method`," >}} another NVIDIA-exclusive feature, with both native and emulated versions. +It’s like the Switch used some sort of NVIDIA GPU, hmm. + +Generally, graphics APIs like OpenGL and Vulkan require shaders and some geometry (at minimum, a triangle) defined to render a texture to the framebuffer, but the `draw texture method` bypasses this requirement and draws an axis-aligned texture to the screen with only the coordinates of the bounding rectangle. +When using OpenGL on NVIDIA hardware, yuzu will try to use the host's draw texture function, and it will be emulated with shaders on Vulkan or other platforms. +This fixes the rendering of the title screen on `Titan Quest`. + +{{< single-title-imgs-compare + "And people ask why we 'make' games run faster on NVIDIA hardware (Titan Quest)" + "./tqbug.png" + "./tqfix.png" + >}} + +byte[] {{< gh-hovercard "9608" "corrected a mistake in the way yuzu treated swap intervals." >}} +One method for limiting framerate on the Switch is to set a number controlling how many times a frame will be presented, where presentation happens 60 times per second. +A program could limit itself to 30 frames per second by setting this number to 2, 20 frames per second by setting this value to 3, and so on. +yuzu mistakenly treated the swap interval as being based on powers of two, so the values of 1 and 2, corresponding to 60 and 30 frames per second, worked correctly, but a value of 3 incorrectly presented at 15 frames per second. +While fixing this mistake, byte[] also added support for mod developers to use negative values as _multiples_ of 60 frames per second. +Let the (high-framerate) games begin! + +epicboy also {{< gh-hovercard "9708" "fixed a longstanding issue with asynchronous shader building on OpenGL," >}} forcing shaders to be fully flushed and available to the main rendering context before signalling availability. +This should alleviate any persistent graphical errors exclusive to asynchronous shaders in the old API. + +[Blinkhawk](https://github.com/FernandoS27) returns with another {{< gh-hovercard "9559" "significant performance improvement" >}} for the world's seemingly-least optimized Pokémon games. This allows them to render in our much faster, but lower-accuracy, GPU Normal mode, and implements a few related optimizations along the way. +Have fun shiny hunting! + +{{< single-title-imgs + "If you ask why all pics are in the same area, it's one of the best benchmarking spots. Normal accuracy on the left, High accuracy on the right (Pokémon Scarlet)" + "./psn.png" + "./psh.png" + >}} + +Keep in mind that Normal GPU accuracy will produce vertex explosions for a frame, but only last just as long. Permanent vertex explosions be gone! +High GPU accuracy will be cleaner, but slower, so pick your side. + +As one final note for the GPU section, your writer implemented a feature which had been requested for quite a while since the resolution scaler was released, but nobody had really bothered to look at until now -- {{< gh-hovercard "9612" "additional resolution options." >}} + +Now you can select from the additional options of 1.5x scaling, or 7x and 8x (if you have a death wish for your graphics card). +User reports confirm that the RTX 4090 can play some games at 8x, and the RX 6950 XT doesn't have many problems with 7x. +The odd one, 1.5x, was added because our metrics show that the most used non-iGPU cards are strong enough to have surplus performance at 1x, but are not powerful enough to handle 2x. +A middle ground is ideal to get crisper graphics while keeping the 30/60FPS target, or if the user has a 1440p display. +We think this should be reasonably future proof for now. + +{{< imgs + "./16k.jpg| Warning, don't click this image on weak devices: 16K resolution (SUPER MARIO ODYSSEY)" + >}} + +Small warning, AMD and Intel hardware don't support textures as big as NVIDIA, so it's possible to hit this limit in some games and make the driver crash. +If you have performance and VRAM to spare and you hit a crash, lower the multiplier. + +## macOS progress + +Since we have been providing little snippets of a possible return for macOS support for the past few months, know that the progress is slow for now, but we have some significant results to report. + +{{< imgs + "./mvk.png| Baby Mario steps (SUPER MARIO ODYSSEY)" + >}} + +byte[] implemented a {{< gh-hovercard "9528" "fallback for the absence of `nullDescriptor` support" >}} in MoltenVK, avoiding a crash when attempting to bind buffer slots on MoltenVK. + +Then, he implemented a _substantial_ refactor of how {{< gh-hovercard "9530" "yuzu performs Vulkan feature testing," >}} making it both more streamlined and able to cope with the absence of features which yuzu currently still requires as mandatory -- such as the aforementioned `nullDescriptor` feature. + +Finally, [PCSX2](https://github.com/PCSX2/pcsx2) and [Dolphin](https://github.com/dolphin-emu/dolphin) contributor [TellowKrinkle](https://github.com/TellowKrinkle) helped us {{< gh-hovercard "9596" "discover a bug in MoltenVK" >}} where the number of bindings it reports as available doesn't correspond to the number we can actually use, and suggested a workaround, which byte[] committed, allowing trivial homebrew examples to finally begin rendering correctly. +We are also able to render some simpler games, but be aware: most things don't work yet. +Baby steps! + +{{< single-title-imgs-compare + "It's hard to describe, has the performance, but lacks the features, but has modern features" + "./mvkbug.png" + "./mvkfix.png" + >}} + +## General changes + +byte[] {{< gh-hovercard "9561" " triggered the scheduled mandatory Dynarmic update," >}} blessing us with [fastmem and page table support](https://yuzu-emu.org/entry/yuzu-fastmem/) for ARM64 devices, boosting performance considerably. +Anyone with an ARM64 device running a “normal” GPU (not mobile-tier hardware) interested in testing yuzu, feel free to install our official [Flatpak](https://flathub.org/apps/details/org.yuzu_emu.yuzu). + +[german77](https://github.com/german77) stumbled upon an issue which was causing input threads to randomly crash yuzu for seemingly no reason, but only on shutdown. +byte[] found that `CoreTiming` had the same logic issue that he fixed last month in the kernel code when adding `KHardwareTimer`: callbacks could be removed while in-progress, which could cause the input threads to continue using memory after it had been freed. +With this code changed to {{< gh-hovercard "9619" "wait until any in-progress callbacks are finished before removal," >}} this issue should be solved for good. + +After the merge of german77's impressive Joy-Con driver release [last month](https://yuzu-emu.org/entry/yuzu-progress-report-dec-2022/#new-joy-con-driver-and-other-input-improvements), [Morph](https://github.com/Morph1984) noticed that yuzu was often taking a significantly longer amount of time to shutdown, sometimes more than 5 seconds longer than it should have been allowed to. +He discovered that this was due to sleep calls in the Joy-Con driver to poll for new devices that weren't being cancelled on shutdown, and with help from byte[], he {{< gh-hovercard "9677" "implemented a proper fix" >}} so that they would immediately stop waiting when shutdown was signalled. + +More battles won for the Shutdown Wars, with seemingly no end in sight! +It's starting to almost feel like a [Worms](https://www.youtube.com/watch?v=HWJsY4FoSZ8) game. + +An interesting report from a user pointed byte[] to the visual novel `うみねこのなく頃に咲 ~猫箱と夢想の交響曲~` (Umineko no Naku Koro ni Saku - Nekobako to Musou no Koukyoukyoku), which seemed to reliably crash in fast-forward mode, but only when audio was enabled. +He quickly identified that the issue was happening at the same time the audio system was temporarily stalling the game (in order to avoid dropping any samples). +He had previously implemented stalling in the kernel in a way that seemed superficially reasonable, but actually completely broke the scheduler when just the right conditions were met! +byte[] then {{< gh-hovercard "9666" "reimplemented stalling more carefully," >}} avoiding breaking the conditions required by the scheduler, and preventing a deadlock due to incorrect behaviour around suspension. + +{{< imgs + "./umi.png| Without love, it cannot be seen (Umineko no Naku Koro ni Saku - Nekobako to Musou no Koukyoukyoku)" + >}} + +Users reported a regression when trying to play `Mario Kart 8 Deluxe` over LAN mode. +The game would refuse to access the mode and return to the main menu. +german77 {{< gh-hovercard "9543" "updated the implementation to match the latest reverse engineering efforts" >}} and poof, back to launching blue shells at all your friends! + +{{< imgs + "./lan.png| Hot take, only Gran Turismo gets close to this series in music quality (Mario Kart 8 Deluxe)" + >}} + +[MonsterDruide1](https://github.com/MonsterDruide1) is back with _the good fixes_. +This time? LDN. +Game mods that add network connectivity sometimes use sockets with a timeout in order to keep the game responsive while waiting for more packets. +yuzu used to hate this behaviour, spamming errors in the log, and generally just having a bad time. +{{< gh-hovercard "9558" "Changing this unnecessarily cautious behaviour" >}} allows network gameplay mods to work properly, for example, [smo-practice](https://github.com/fruityloops1/smo-practice). + +[SoRadGaming](https://github.com/SoRadGaming) suddenly showed up one day and {{< gh-hovercard "9661" "implemented IPv6 and hostname support" >}} for LDN. +Thanks! Now more players can enjoy their online matches, and we’re ready for the eventual death of IPv4, which is expected to happen someday in this geological era. +Or maybe the next one. + +{{< imgs + "./dc.png| Remember when domain names were free?" + >}} + +[Merry](https://github.com/merryhime), taking a break from Dynarmic to play with some areas of yuzu, {{< gh-hovercard "9615" "implemented a set of fixes" >}} to the audio codebase, focusing on upsampling. +An off-by-one error fix should translate to in-game music not cutting off as much, and improved audio fidelity. + +## Input and TAS improvements + +TAS got its fair share of improvements, all thanks to MonsterDruide1 and german77. +The first fix is {{< gh-hovercard "9540" "properly recording sanitized inputs," >}} instead of the raw inputs from the player. +By sanitized, we mean input adjusted by range and dead zone settings. +There isn't much use for a TAS script if what you record doesn’t correspond to what the game received originally. + +Next, yuzu, by design, can support multiple controllers per player, which can lead to multiple stick inputs overlapping (“flapping”) each other. +yuzu would ignore switching to any stick input that didn’t reach full tilt. +To avoid this behaviour causing problems with TAS, MonsterDruide1 {{< gh-hovercard "9547" "overrules this safety threshold value" >}} for TAS-based stick input, so every movement gets registered, even the most minuscule ones right from the start. +This change also adds the extra logic of returning to regular input if the TAS stick reaches a value of 0 in both axes. + +And to end the TAS changes, MonsterDruide1 also now {{< gh-hovercard "9565" "shows the progress of multiple scripts" >}} when several controllers are running their own records, for example, `TAS state: Running 35/100, 20, 0, 40`. +Now all players in local multiplayer matches can get their corresponding information. + +On the topic of regular input, german77 has been busy improving it, and he has implemented a couple of changes that we think many will like. + +For our keyboard and mouse fans, there’s now {{< gh-hovercard "9605" "support for mapping the mouse wheel" >}} to any button. +Sounds like a simple way to switch gear in `The Legend of Zelda: Breath of the Wild` to me, for example. + +german77 has been gluing his eyes to some unit tests lately trying to find out why `EARTH DEFENSE FORCE: WORLD BROTHERS` would outright ignore input in some cases. +After several back and forths between yuzu and the real Switch, he found out that the stick range didn’t seem to have minimum value of -32768, the usual value expected from a 16-bit signed integer (a range of -32768 to 32767), and instead seemed to have a minimum of -32766. + +{{< imgs + "./input.png| Unpatched Switch consoles are invaluable for us" + >}} + +Okay, [Nintendo is as Nintendo does](https://www.youtube.com/watch?v=VreFw1Zd020), have it your way, we will just {{< gh-hovercard "9617" "fix the minimum stick range" >}} in our code. +Problem solved, right? + +No. + +As it turns out, this is a game bug. +You can get the Switch to reach -32767 under certain conditions, and `EARTH DEFENSE FORCE: WORLD BROTHERS` will _also_ refuse to accept input on the real hardware. +So what do we do then? german77 decided that the best solution is to {{< gh-hovercard "9676" "apply a 0.99996x multiplier" >}} to the received input from the sticks, just to avoid weird games from behaving incorrectly. + +People have been complaining about poor Joy-Con reception since, well, ever, and honestly, there’s a limit to how much we can do, only Nintendo knows what Bluetooth black magic they use to get good range on the Switch. +Thankfully, the new custom Joy-Con driver allows us to have more freedom on the parameters of the Bluetooth connection, and german77 discovered that {{< gh-hovercard "9683" "disabling low power mode," >}} one of the available parameters, after establishing a connection is closer to what the console does, and should help improve range to some extent. + +Our general recommendations still apply: if you’re using an Intel WiFI + BT combo chipset, turn off WiFi, and make sure to have your phone away from the BT chipset and the Joy-Cons. +It’s known that off-brand generic USB dongles provide better range than WiFi + BT combo chips. + +Now for players interested in bending the game engines to their limit, or just wanting to have some extra fun (us boomers like to call this “cheating”), german77 has a gift for you. +{{< gh-hovercard "9696" "Turbo button support!" >}} Also known as rapidfire, this allows you to, as the name implies, repeatedly auto-press a button as fast as the game can register it. + +{{< imgs + "./turbo.png| For some reason, Mega Man comes to mind" + >}} + +Enjoy finding new ways to break your games with this! + +## UI changes + +This one has been cooking for over 2 years now, sheesh. +Morph originally started working on {{< gh-hovercard "4949" "improving high-DPI support" >}} in yuzu all the way back in November of 2020. +Now it’s ready, and the results are great. +Users that run displays at DPI values over 100% can now see proper UI element scaling, particularly noticeable in the Controls setting window. + +{{< single-title-imgs-compare + "4K display users rejoice" + "./dpibug.png" + "./dpifix.png" + >}} + +Nothing is safe from bugs in the user interface code, and Wollnashorn found an interesting one affecting LDN. +The Direct Connect window asks the user for an IP and nickname. + +{{< imgs + "./dc.png| We believe in recycling here, that includes pics" + >}} + +Those settings got lost every time a game was booted. +Well, the issue was that those settings were being saved on the per-game configuration files for no reason. +It doesn't make sense to include a fundamentally global setting in the per-game settings, so {{< gh-hovercard "9521" "removing them" >}} solved the issue. + +byte[] solved an issue where accessing fullscreen would cause yuzu to crash. +{{< gh-hovercard "9601" "Adjusting the behaviour of yuzu’s bootmanager" >}} was enough to stop the [CRASH!!](https://github.com/yuzu-emu/yuzu/issues/9550) + +Newcomer [SaiKai](https://github.com/SaiKai) implements one of those Quality of Life changes that you can’t live without and you can’t believe it wasn’t a thing before. +Pressing and holding the hotkey assigned to lowering or raising {{< gh-hovercard "9637" "volume will now auto-repeat," >}} making it much easier to control. +Thanks! + +Per-game configuration returns to mess with us, now with the language selection. +The language ComboBox index gets altered in per-game configuration, so setting the region to Korea or Taiwan would result in a crash. +german77 {{< gh-hovercard "9660" "fixes this discrepancy" >}} and solves the issue. + +## Hardware section + +Let’s revive this section for a bit, there’s some information I’d like to discuss. + +#### NVIDIA, forgetting about their old cards. + +We previously mentioned that the 527.XX release of drivers solved issues we previously had with Pascal and newer cards. +While this was true for most issues, Pascal is still hitting some of the old problems, like crashes with ASTC texture decoding enabled. +We recommend Pascal users to either disable ASTC texture decoding, or revert back to 512.95 drivers. +We hope NVIDIA backports the fixes Turing and newer cards got to the old guard too. + +#### AMD, custom drivers are not good + +The recently released RX 7000 series, or RDNA3, are not particularly compatible with emulators right now, with yuzu not being an exception. +Broken rendering and crashes were reported by early adopters. + +Sadly, we can’t focus on these products while they run a custom driver branch. +Until AMD merges the RDNA3 driver with the regular Polaris to RDNA2 one we’re all used to, it’s impossible to focus efforts on trying to solve any particular issues of this new release. +Sorry early adopters, you will have to wait. + +Having access to hardware that doesn’t cost NVIDIA-stupid levels would also help. +AMD, please don’t take a year to release the mid and low end. + +Now, regarding unofficial custom drivers, we received reports that Amermine Zone drivers break rendering in many games. +Regular drivers are perfectly fine, so just stick to official AMD releases. + +#### Intel, artificial limitations capping good hardware + +Your writer recently had to replace an old i3-5005U laptop because its WiFi died, but HP only allows a very limited selection of cards as replacements, and said parts are no longer in production. +I’m never buying HP ever again. + +Sorry, back on topic. +This was a great opportunity to get an Iris Xe GPU, so an i5-1240P was acquired. +ASUS this time. +As this was first hand experience for a tester with a Gen 12 Intel GPU, we now have both good and bad information to discuss. + +Let’s start with the bad, and this is something that affects many users, as it is the default configuration of most laptops. + +Intel, in their *infinite wisdom*, decided that single channel memory configurations should [artificially limit the integrated GPU to the slower UHD Graphics spec](https://www.intel.com/content/www/us/en/support/articles/000059744/graphics.html), reducing its EU (execution unit) count. +Basically, running the GPU with half its cylinders. + +Unless the user pays the premium for a dual channel configuration, or has the option to manually add the extra SO-DIMM stick later, performance on Intel Xe devices, or “UHD Graphics”, is *terrible*. +Most 3D games can’t run at playable framerates even at 0.5x handheld scaling. + +To top it out, it’s very clear that Vulkan drivers are still a weak spot with Intel hardware. +It’s a lottery with each game. They may perform correctly, similar to their AMD and NVIDIA counterparts, or may have glaring issues. +Some shaders, for example, outright crash the driver. We will report these issues to Intel as we find them. + +Sadly, the usual solution of just running Linux is not a fix this time. Mesa support for Gen 12 Intel graphics hardware (Xe, Arc, etc) is still in very early stages, and the performance is usually in the sub-10 FPS territory. +We can’t wait to see Mesa once again show the Windows driver team how their job is done. +Windows users, make sure to periodically update your drivers, as each release introduces major changes, so it’s critical to keep up. +Intel is finally caring about their GPU division with the release of Arc. +And finally, as a side note, Xe graphics are sensitive to the use of FSR. They lose a considerable amount of performance, so we strongly recommend using Scaleforce instead. + +Now the good parts. +Getting a proper dual channel configuration not only doubles the available bandwidth, which is the most critical point of iGPU performance, but also raises the EU count to the proper Iris Xe spec you originally paid for. + +Benchmarking shows that under these conditions, Xe graphics manage to surpass Vega iGPUs in yuzu, as long as the Intel Vulkan drivers cooperate. +It also shows that Xe graphics are more tolerant to SMAA than, for example, NVIDIA Pascal GPUs, being an almost free setting, performance wise. +This, coupled with the better IPC of Intel CPUs, should provide an edge on budget laptops. +At least, until AMD remembers that not everyone wants to pay a fortune for an RDNA2 integrated GPU and releases a refreshed low end lineup. I got tired of waiting. + +As an extra juicy bonus, unlike Arc, the Intel iGPUs still have their amazing native ASTC texture decoder. +This means no delays in ASTC heavy games like `Luigi’s Mansion 3`, `Bayonetta 3`, or `Astral Chain`. The almighty RTX 4090 can’t do that. + +A small note regarding the ASTC support of Intel iGPUs. +Not all texture formats used by Switch games are supported by Intel, some will still need to be specially decoded. +Since these GPUs only have a single queue, Xe users should disable ASTC texture decoding from yuzu’s graphics settings. +Most of the time the Xe GPU will be the bottleneck, and making it constantly switch between decoding textures and rendering the game will incur a performance loss. +Letting the CPU carry this work will help graphical performance. +Finally some good use for those E-Cores. + +For those that don’t fear noise or heat, tweaking the sliders in [XTU](https://www.intel.com/content/www/us/en/download/17881/29183/intel-extreme-tuning-utility-intel-xtu.html?) is an easy way to get an extra GHz out of their CPUs while plugged in. +This can help double the performance in yuzu. + +Unfortunately, Intel’s EoL status regarding Windows drivers is starting to affect compatibility with recent games, so we officially consider Gen 9/9.5/11 Intel GPUs to be out of support on yuzu. +This covers Gen 6 to 11 CPUs, Skylake to Ice Lake. +We will provide support and log issues for them only if they run on Linux. +Or, well, macOS, once MoltenVK is fully working. + +## Future projects + +I’m still under a sort of “NDA” with the developers, so I’m not allowed to tell you what’s cooking yet, or else. + +Our spies still managed to pass along a bit of information before going dark, `Project Lime`, a co-development between bunnei, Tobi, german77, and byte[]. +Stay tuned for its official announcement. + +`Project Gaia` continues to progress slowly, growing closer to the internal beta testing phase. +Some of its standalone features have already been tested: + +{{< imgs + "./gaia.png| This was a performance test to see how long it takes to load a game list" + >}} + +A bit of sad news for outdated hardware users: we have discussed plans to discontinue OpenGL. +Fixes and improvements that are critical for Vulkan are becoming a chore to port to OpenGL, and, as you’ve seen with the progress on MoltenVK support, we have to worry about new devices that depend exclusively on Vulkan. +It won’t be very soon, but it’s time to consider getting a GPU with Vulkan support, you know, something made within the last 11 years. + +That’s all folks! + +Thank you for reading to the end. +And very special thanks to Mysterious Writer B, without their help, this article would have been seriously delayed. + +{{< imgs + "./byte.jpg| Out of the night, when the full moon is bright, comes a horseman known as B…" + >}} + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-jan-2023/input.png b/site/content/entry/yuzu-progress-report-jan-2023/input.png new file mode 100644 index 000000000..c9b495569 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/input.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/lan.png b/site/content/entry/yuzu-progress-report-jan-2023/lan.png new file mode 100644 index 000000000..efb6ccf47 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/lan.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/mvk.png b/site/content/entry/yuzu-progress-report-jan-2023/mvk.png new file mode 100644 index 000000000..5d227852d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/mvk.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/mvkbug.png b/site/content/entry/yuzu-progress-report-jan-2023/mvkbug.png new file mode 100644 index 000000000..6d25b4b3d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/mvkbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/mvkfix.png b/site/content/entry/yuzu-progress-report-jan-2023/mvkfix.png new file mode 100644 index 000000000..e6d7b486d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/mvkfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/nabug.png b/site/content/entry/yuzu-progress-report-jan-2023/nabug.png new file mode 100644 index 000000000..e91ea4878 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/nabug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/nafix.png b/site/content/entry/yuzu-progress-report-jan-2023/nafix.png new file mode 100644 index 000000000..f05878f2b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/nafix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/nvidia1.png b/site/content/entry/yuzu-progress-report-jan-2023/nvidia1.png new file mode 100644 index 000000000..82f0e1f01 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/nvidia1.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/nvidia2.png b/site/content/entry/yuzu-progress-report-jan-2023/nvidia2.png new file mode 100644 index 000000000..e630de89f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/nvidia2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/nvidia3.png b/site/content/entry/yuzu-progress-report-jan-2023/nvidia3.png new file mode 100644 index 000000000..ffc8b5dbc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/nvidia3.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/oglbug.png b/site/content/entry/yuzu-progress-report-jan-2023/oglbug.png new file mode 100644 index 000000000..009b1cee3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/oglbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/oglfix.png b/site/content/entry/yuzu-progress-report-jan-2023/oglfix.png new file mode 100644 index 000000000..50e5ec5af Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/oglfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/pmdbug.png b/site/content/entry/yuzu-progress-report-jan-2023/pmdbug.png new file mode 100644 index 000000000..3ba856871 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/pmdbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/pmdfix.png b/site/content/entry/yuzu-progress-report-jan-2023/pmdfix.png new file mode 100644 index 000000000..30de94a18 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/pmdfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/psh.png b/site/content/entry/yuzu-progress-report-jan-2023/psh.png new file mode 100644 index 000000000..6b0a40953 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/psh.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/psn.png b/site/content/entry/yuzu-progress-report-jan-2023/psn.png new file mode 100644 index 000000000..8b2160bea Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/psn.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/shaders.mp4 b/site/content/entry/yuzu-progress-report-jan-2023/shaders.mp4 new file mode 100644 index 000000000..33330dbb1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/shaders.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/summary.png b/site/content/entry/yuzu-progress-report-jan-2023/summary.png new file mode 100644 index 000000000..61b5f8581 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/tqbug.png b/site/content/entry/yuzu-progress-report-jan-2023/tqbug.png new file mode 100644 index 000000000..69fbe55ef Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/tqbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/tqfix.png b/site/content/entry/yuzu-progress-report-jan-2023/tqfix.png new file mode 100644 index 000000000..85ee4d7b4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/tqfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/turbo.png b/site/content/entry/yuzu-progress-report-jan-2023/turbo.png new file mode 100644 index 000000000..66c2ee8ef Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/turbo.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/turboperf.png b/site/content/entry/yuzu-progress-report-jan-2023/turboperf.png new file mode 100644 index 000000000..42ba9597c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/turboperf.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/turboui.png b/site/content/entry/yuzu-progress-report-jan-2023/turboui.png new file mode 100644 index 000000000..768cb4336 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/turboui.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2023/umi.png b/site/content/entry/yuzu-progress-report-jan-2023/umi.png new file mode 100644 index 000000000..98e0fa7ff Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2023/umi.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/audio.gif b/site/content/entry/yuzu-progress-report-jan-2024/audio.gif new file mode 100644 index 000000000..f5322f339 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/audio.gif differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/banner.png b/site/content/entry/yuzu-progress-report-jan-2024/banner.png new file mode 100644 index 000000000..5ac2c2a87 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/bc.png b/site/content/entry/yuzu-progress-report-jan-2024/bc.png new file mode 100644 index 000000000..61033bd28 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/bc.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/controller1.png b/site/content/entry/yuzu-progress-report-jan-2024/controller1.png new file mode 100644 index 000000000..2f5d27638 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/controller1.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/controller2.png b/site/content/entry/yuzu-progress-report-jan-2024/controller2.png new file mode 100644 index 000000000..94d7f44dc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/controller2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/controller3.png b/site/content/entry/yuzu-progress-report-jan-2024/controller3.png new file mode 100644 index 000000000..a80ebce2f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/controller3.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/dozen.png b/site/content/entry/yuzu-progress-report-jan-2024/dozen.png new file mode 100644 index 000000000..b426b75c5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/dozen.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/driver.png b/site/content/entry/yuzu-progress-report-jan-2024/driver.png new file mode 100644 index 000000000..7cbb01503 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/driver.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/fullscreen.png b/site/content/entry/yuzu-progress-report-jan-2024/fullscreen.png new file mode 100644 index 000000000..2a9d7cec5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/fullscreen.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/icon.gif b/site/content/entry/yuzu-progress-report-jan-2024/icon.gif new file mode 100644 index 000000000..3a7272e71 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/icon.gif differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/index.md b/site/content/entry/yuzu-progress-report-jan-2024/index.md new file mode 100644 index 000000000..bb96b505e --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jan-2024/index.md @@ -0,0 +1,547 @@ ++++ +date = "2024-02-10T12:00:00-03:00" +title = "Progress Report January 2024" +author = "GoldenX86" +coauthor = "CaptV0rt3x" +forum = 1006867 ++++ + +Welcome to 2024, yuz-ers! What better way to begin the year than to do major code refactors resulting in almost full applet support. We present this, and plenty more, to you today! Remember to right click and unmute the embedded videos. + + + +## Multiprocess, services, LLE applets, and Project Leviathan + +Converting a single process emulator into a multiprocess one is no simple task. + +{{< imgs + "./keyboard.png| Typing speed challenge with the Nintendo keyboard?" + >}} + +2024 started out quite busy thanks to the combined efforts of [byte[]](https://github.com/liamwhite), [german77](https://github.com/german77), [Blinkhawk](https://github.com/FernandoS27), and [Maide](https://github.com/Kelebek1) in implementing multiprocess support, taking advantage of it in multiple areas (heh, get it?) including GPU, input, services, and applet emulation, and fixing long standing problems along the way. + +As of writing, multiprocess support {{< gh-hovercard "12756" "is not yet merged," >}} but fixes in the GPU, input, and other modules (implemented by byte[], Blinkhawk, and german77) have already been staged and released, allowing full support to be added in parts. + +Implementing the requirements to support multiprocess in yuzu led us to make five significant changes in the past month: + +- Allow the GPU to run multiple programs. This is where SMMU support comes in, which we will discuss in the next section. +- Rewrite the old, basic applet manager. +- Rewrite presentation. Part of the prerequisites to run more than one program simultaneously is to be able to display all of them to the user. +- Rewrite every other relevant area (for example, input) to support multiple processes. +- Automate the serialization of service calls. + +### Device mapping and SMMU + +We start off with a big one: Blinkhawk implemented device memory mapping emulation and rewrote the GPU implementation with support for the {{< gh-hovercard "12579" "SMMU," >}} or for desktop enthusiasts/Linux VM users/UEFI lurkers, its other common name, IOMMU. + +The ARM **S**ystem **M**emory **M**anagement **U**nit handles memory mapping for peripheral devices like the GPU. +It’s a hardware component on the Switch in charge of translating device virtual memory addresses into physical memory addresses. +The GPU adds an MMU of its own, `GMMU`, an additional layer that maps over the SMMU. + +The emulator already had a performant memory translation layer for the GMMU, but it could only handle a single program using the GPU at a time, unable to share it with other processes. And support for *multiple processes* was needed. + +The main benefits of this rewrite are: + +- Increased accuracy. +- Reduced video memory usage (testing shows around a 300MB reduction). +- Enables multiprocess use of the GPU. +- Allows other emulated devices to use the device mapper. +- Leaves room for potential future optimizations + +One downside of this change was how it increased debugging complexity, which led to more development time spent with every bug found on its implementation. +For example, games on Android getting stuck at 0 FPS randomly, breaking compatibility with NCE, or running out of memory on some game engines. +This led to a couple of fixes implemented first by {{< gh-hovercard "12749" "byte[]" >}} and then {{< gh-hovercard "12869" "Blinkhawk himself," >}} with more on the way. + +This change opened the floodgates to applet emulation and is the starting point to implement [Direct Memory Import](https://github.com/skyline-emu/skyline/pull/2106) sometime in the future — but let’s slow down a bit, there’s more to cover. + +{{< imgs + "./miiedit.mp4| Time to launch another program, GPU!" + >}} + +### Project Leviathan + +german77 had to adapt his input rewrite, `Project Leviathan` to the requirements of multiprocess too. The rewrite is still ongoing, with more parts planned. +But just in January, the following changes, either specifically for multiprocess or more generally as part of the rewrite, were implemented: + +- {{< gh-hovercard "12536" "Use individual applet resources," >}} so each applet has its own view of the controller input. +- {{< gh-hovercard "12549" "Implement NpadResource emulation," >}} now using the input process ID to distinguish HID state and controller style configuration between multiple processes. +- Create the {{< gh-hovercard "12605" "abstracted pad" >}} structure, which is in charge of updating the shared memory and assignment of controllers. The old implementation was too simple, causing the controller applet to unnecessarily be shown, or showing up with no supported controllers available. +- Fully implement {{< gh-hovercard "12660" "abstract vibration," >}} removing old inaccurate code and matching the behaviour of newer Switch firmware. + +While this leads to us being able to load the native controller applet (among others) and have fun with it, it doesn’t have much use for emulation. + +{{< single-title-imgs + "Just for fun" + "./controller1.png" + "./controller2.png" + "./controller3.png" + >}} + +### Now Presenting + +Besides the emulated GPU, {{< gh-hovercard "12761" "presentation to screen" >}} also needed some work to support running applets — without it, none of the benefits could actually be displayed. +If there is no multi-layer composition in place, there is no applet fun. + +byte[] rewrote almost all of the presentation code to support layer overlays and blending, taking special care to not break the existing filtering and antialiasing options. +FSR in particular was converted from a compute shader to a fragment shader, so proper blending could be enabled. +The end result is the same, with no image quality changes — but now FSR can be used while games display the native inline keyboard, for example. + +{{< imgs + "./keyboard.mp4| That transparency behind the keyboard wasn’t free." + >}} + +### [I AM the applet manager](https://www.youtube.com/watch?v=7ZLS5KNDelI) + +Another critical service that required a rewrite to have proper multiprocess support is `AM`, the {{< gh-hovercard "12760" "Applet Manager." >}} +AM has now been almost completely refactored to track state for every applet individually, properly allowing it to support running more than one at the same time. + +{{< imgs + "./web1.mp4| Help is only one button press away (Super Smash Bros. Ultimate)" + >}} + +While byte[] got the rewrite up and running, german77 {{< gh-hovercard "12837" "fixed an issue" >}} causing `The Battle Cats Unite` to softlock past the starting loading screen. + +{{< imgs + "./bc.png| This is one of the games of all time. Nyaa. (The Battle Cats Unite)" + >}} + + +### Sounds good + +Maide was responsible for making {{< gh-hovercard "12831" "audio emulation" >}} compatible with multiprocess. +Games should be able to share audio playback with applets, right? Sharing is caring. + +{{< imgs + "./web2.mp4| Special menus included (Super Mario 3D All-Stars)." + >}} + +### Universal Serialization Byte[] + +The {{< gh-hovercard "12783" "serialization and deserialization" >}} of service calls from programs is one of the most important tasks yuzu must perform when interacting with guest programs. +Communication between programs and the Switch system modules uses a special binary format with custom parsers. +Interacting with guest processes required tedious and error-prone layout calculations for every single interface method yuzu needed to implement, wasting a lot of development time on error checking and maintenance. + +With the increased involvement in service implementations and the exponential growth of complexity you’ve seen so far, byte[] aims to automate and simplify serialization by using a template-based approach that automatically generates the code needed for the method. + +So far, the work on multiprocess has taken over twenty thousands lines of code and continues growing. +All you have to do now to enjoy your native applets is to [dump your firmware](https://rena21.github.io/yuzu-wiki/setup-guide/dump-firmware/). The minimum required version to get the applets running is firmware 14.0.0. + +### Other service rewrites and fixes + +Here’s a toast to Maide for fixing one of the longest standing bugs in yuzu: the passage of time in games like `Pokémon Sword/Shield` and `Pokémon Quest`. + +In the past, while time tracked during saving, some game events like Dens or Pokéjobs wouldn’t reset, forcing users to manually advance time with the custom RTC option. +It was quite bothersome. + +It took an entire {{< gh-hovercard "12499" "rewrite of the time services" >}} to resolve the issue, “only” about nine thousand lines of code. +The new implementation is much more accurate, allowing Pokéjobs and other timed events to finally be enjoyed normally in this low-poly, almost-always-30-FPS masterpiece. + +{{< single-title-imgs + "Get to work! (Pokémon Sword)" + "./pj1.png" + "./pj2.png" + >}} + +Continuing this work, Maide removed some old workarounds that were no longer needed in the time services, and fixed {{< gh-hovercard "12864" "network clock to local clock" >}} synchronisation on every game boot. +This fixed time progression in `Pokémon Quest`. +No longer a [Time Quest](https://en.wikipedia.org/wiki/Hype:_The_Time_Quest). + +{{< imgs + "./pq.png| Set camp (Pokémon Quest)" + >}} + +To close the section, byte[] fixed how the {{< gh-hovercard "12867" "AOC service" >}} lists available DLC for multi-program applications, allowing `Assassin’s Creed Rogue` to boot with its DLC installed. +Just like the Navy intended. + +## Graphics changes + +### A dose of Dozen + +Unforeseen issues are one of the signature “comes with the job” moments of emulation — you never know from where a new problem will arise, so we’ll have to start this section with a PSA. + +**PSA:** If yuzu has recently started showing Microsoft as the GPU vendor for you, and you can no longer play any game, uninstall the package named `OpenCL™, OpenGL®, and Vulkan® Compatibility Pack`, or if you prefer to keep it, go to `Emulation > Configure… > Graphics > Device` and change the GPU to your correct model, without “Microsoft Direct3D 12” at the start of its name. + +AMD and Intel users running Windows 11 suddenly started having their hardware completely incapable of launching any games while using Vulkan. +The reason is something none of us expected at all, Microsoft… And Mesa! Please lower those pitchforks. + +Microsoft decided to roll out an install of this package, which allows incapable hardware to run the mentioned APIs if no proper driver was provided from the hardware vendor, or just if the hardware is incapable of running it. + +The project used to achieve this is Mesa `Dozen`, which [runs Vulkan atop a Direct3D 12 interface](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14766). +The intended purpose is to offer Vulkan support to devices that only ship a Direct3D 12 driver, for example, Qualcomm ARM laptops. +We don’t know why Microsoft decided to silently test this feature on x86-64 PCs that already ship hardware capable of proper Vulkan support, but here we are. + +Those new devices generated by `Dozen` are added to the Vulkan devices available to the OS, named “Microsoft Direct3D 12 (GPU model name)”, and conflict with how yuzu orders its device list. + +To ensure the best GPU is selected by default on yuzu, three sorts are performed in order: + +- Prefer NVIDIA hardware over AMD, AMD hardware over Intel. This favours NVIDIA hardware and also double ensures dedicated GPUs get selected over integrated ones. Plus, in the rare case a user has multiple GPUs from different vendors on a system, we ensure the one with the least issues is picked by default. “Outdated NVIDIA tablet-turned-console likes NVIDIA drivers,” after all. +- Prefer dedicated hardware over any other, including integrated and CPU rendering. There are people out there trying to run yuzu with CPU rendering. +- Order in inverse alphabetical order. This helps ensure an RTX 4090 is picked over a GTX 1050, or an RX 7900 XTX over an RX 780m. + +Did you notice it? The last point is the problem. `Dozen` devices share the same identical features as the real Vulkan device but change the name. +Since the list is ordered in inverse alphabetical order, a device named “Microsoft” will take priority over an identical one named AMD or Intel. + +The issue is simple enough to solve: detect when a {{< gh-hovercard "12781" "device is Dozen" >}} and demote it to the bottom of the list. +Even if `Dozen` was capable of running yuzu, we would prefer not to run a layered implementation by default. + +{{< imgs + "./dozen.png| Nice way of having a Dozen GPUs" + >}} + +Sadly, `Dozen` isn't compatible with yuzu for the moment — it lacks multiple mandatory extensions and has some issues your writer enjoyed reporting to its devs while testing this. +Fixes for multiple of them arrived in just a couple of days. Mesa devs are built differently. + +This could be an interesting experiment for Fermi users or other end-of-life hardware once `Dozen` is suitable for yuzu. + +### Your regularly scheduled GPU changes + +The fun testing for multiprocess revealed a graphical issue when opening the web applet help page in `Super Smash Bros. Ultimate`. +One fix for {{< gh-hovercard "12875" "pitch linear reading and writing" >}} in the software blitter code later, and Blinkhawk resolved the issue. + +{{< single-title-imgs-compare + "Da Rules (Super Smash Bros. Ultimate)" + "./webappletbug.png" + "./webapplet.png" +>}} + +Android users have regularly reminded us that `Mortal Kombat 11` is unable to boot. +After his enthusiastic walk through the code, byte[] found that {{< gh-hovercard "12652" "8-bit and 16-bit storage writes" >}} in shaders were completely broken on hardware which did not support them. + +The problem, at least one of them, was lack of hardware support for `shaderInt8` and `shaderInt16`, something the big three, NVIDIA (the Switch included, of course), AMD (and by extension, Xclipse), and Intel, have full support for with up-to-date drivers, but [Android devices](https://vulkan.gpuinfo.org/listdevicescoverage.php?core=1.2&feature=shaderInt8&platform=all&option=not) with Adreno and Mali GPUs don’t. + +Mali moment #1, along with Adreno. + +The solution byte[] implemented to solve this specific issue is the usual for the lack of hardware support. If you can’t run it, emulate it! Those are very enthusiastic walks. +These platforms support storage atomics, so by performing a compare-and-swap loop to atomically (in the thread safety sense, not radioactive) write a value to a memory location, 8-bit and 16-bit values can be written to larger 32-bit memory words without tearing the value seen by other threads. + +{{< imgs + "./mk11.png| Dear gods, you don’t need to make the menu low resolution too (Mortal Kombat 11)" + >}} + +This emulation incurs a small performance loss, but beggars can’t be choosers. +Mobile GPUs are very stingy with their feature sets, which frequently holds our development back and necessitates adding workarounds. + +We doubt only `Mortal Kombat 11` is affected — this change improved many unknown games that were crashing on Android devices or for people running outdated GPU drivers on desktop/laptop PCs. +Sadly, this change alone isn’t enough to make the game playable on Android devices. +This issue exposed other shader problems related to lack of support for `StorageImageExtendedFormats`, but that’s homework for later, most likely for future byte[]. + +Switching to the other Linux kernel equipped OS (erm, Linux), Tuxusers reported garbled rendering issues when resizing the yuzu window while on Wayland. + +The solution was thankfully simple, reverting an unnecessary change in one of the previous DMA fixes. +By forcing a {{< gh-hovercard "12688" "recreation of the swapchain" >}} each time the window frame size changes, the issue is gone. + +Proper tear-free gameplay with safe window management shall return to Wayland. +HDR support when, Linux? + +Newcomer [shinra-electric](https://github.com/shinra-electric) {{< gh-hovercard "12713" "updated the MoltenVK dependency" >}} to its latest version. Thank you! + +While the update brings tons of improvements and many Vulkan extensions are now supported, there are no new changes to report in rendering or compatibility on Apple devices. +But hey, no reported regressions is good news! + +## Android augmentations + +[t895](https://github.com/t895) kicked off the new year with a flurry of changes to improve yuzu Android. +While one of these changes enhances the overall app performance, the majority are quality-of-life (QoL) fixes that some of our users have been anticipating. + +As many of you might already be aware, yuzu Android supports exporting user data and saves in ZIP format to transfer between different versions of the app. +ZIP compression, in most cases, can result in a reduction of file size compared to the original size of files on disk. +However, applying compression overtop of encrypted data is almost always a waste of time. + +t895 observed that when compression was turned on, these ZIP exports were excessively slow, while still resulting in negligible size reduction gains, as the largest files in the user data are NCAs, and those are encrypted. +Therefore, he {{< gh-hovercard "12558" "disabled compression for these ZIP exports," >}} exhibiting up to a 3x decrease in export times. + +Moving on to the QoL fixes, t895 {{< gh-hovercard "12571" "extended support for custom screen orientations." >}} +With this change, yuzu now supports a total of seven orientation styles, listed below. + +- Auto. Selects any of the four orientations based on the phone’s sensor. +- Sensor Landscape. Limits the sensor detection to only landscape orientations. +- Landscape. Fixed regular landscape. +- Reverse Landscape. Fixed inverted landscape. +- Sensor Portrait. Limits the sensor detection to only portrait orientations, if the device allows it. +- Portrait. Fixed regular portrait. +- Reverse Portrait. Fixed inverted portrait + +{{< imgs + "./orientations.png| Reverse portrait, the way it’s meant to be played" + >}} + +Next up is the improved global save manager. +There are two possible save directories for games, and the original global save manager was only checking one of them. +So, t895 removed this broken feature a while back and has now {{< gh-hovercard "12576" "reintroduced an improved version" >}} of the same. + +With this improved version, you can now also use exports made with the global save manager in the per-game save manager and vice versa. + +Following that are the new uninstall add-on buttons. +t895 {{< gh-hovercard "12715" "added an uninstall button" >}} for every kind of add-on in the Android app. +yuzers can now easily uninstall any updates, DLCs, mods, and cheats that they might have installed. +Note: Currently, yuzu on PC doesn't have UI support for uninstalling mods or cheats. + +{{< imgs + "./uninstall.png| Your internal storage starts breathing again" + >}} + +Ever spend a long time copying over your dumps or installing content to NAND, only to have them fail to work? +Look no further: t895 {{< gh-hovercard "12736" "brings the PC version's integrity check features to Android." >}} +You can now easily verify the file integrity of your game dumps and your NAND contents. +To verify a game dump, simply go to your game's properties and under `Info`, select `Verify Integrity`. +There is also a separate, self-explanatory button within `Settings` labelled `Verify Installed Content`. + +{{< single-title-imgs + "Great for peace of mind after experiencing a game crash" + "./verify1.gif" + "./verify2.gif" + >}} + +How many times have you accidentally opened the in-game menu when using the left thumbstick area? +Well, {{< gh-hovercard "12738" "you can now lock the in-game menu" >}} so as to avoid accidentally triggering it. +When locked, you can still bring up the in-game menu by using the "back" button or gesture on your device. + +{{< imgs + "./lock.png| Anti-frustration changes" + >}} + +Now, let's delve into game shortcuts on your home screen. +With Android's dynamic shortcuts feature, apps can now provide users with quick access to specific actions or content within an app directly from the home screen. +Although this feature was introduced back in 2016, it seems that some Android launchers do not yet support it. + +While this feature is already supported on yuzu and works perfectly, it becomes pretty tedious when you have to launch each and every game to get a shortcut for it, especially after a reinstall. +As a one-size-fits-all solution to this problem, t895 {{< gh-hovercard "12747" "implemented a button" >}} in the game properties activity that allows you to easily add a shortcut to any game to your home screen without needing to launch the game first. + +{{< imgs + "./icon.gif| Gotta pin ’em all" + >}} + +t895 followed that up with some {{< gh-hovercard "12796" "controller focus optimizations." >}} +Android controller focus is the highlight you see over buttons indicating that you can select it. +These changes fix a few issues observed when using a controller to navigate the yuzu app UI and solved an issue where the emulation surface would appear gray. + +In his quest to bring feature parity between yuzu on PC and yuzu on Android, t895 implemented {{< gh-hovercard "12777" "the 'encryption keys missing' warning on Android." >}} +You will now get this warning on app startup if you don't have the keys required to decrypt games/firmware. + +{{< imgs + "./keys.png| Time to grab that jig" + >}} + +t895 also implemented {{< gh-hovercard "12824" "support for multi-program app switching." >}} +This feature allows for game compilations like `Super Mario 3D All-Stars` and `Klonoa: Phantasy Reverie Series` to switch between games within the bundle. + +{{< imgs + "./multiprogram.mp4| Multi-game drifting! (Klonoa: Phantasy Reverie Series)" + >}} + +He also made some minor UI improvements like: + + - {{< gh-hovercard "12786" "Show driver vendor in the FPS overlay." >}} This informs users which driver is loaded. + - {{< gh-hovercard "12826" "Show System GPU driver information" >}} in the driver manager for improved visibility. + +{{< imgs + "./driver.png| Now you can know how outdated it is" + >}} + +And that's not all. +Newcomer [Emma](https://github.com/GayPotatoEmma) {{< gh-hovercard "12560" "implemented basic support for the game dashboard" >}} feature found on Pixel devices. +Thank you! + +Resident AMD tester [Moonlacer](https://github.com/Moonlacer) noticed that Samsung mobile devices with the new RDNA-based Xclipse GPUs had the {{< gh-hovercard "6900" "same wireframe issues in various Pokémon games,">}} that plague the PC AMD Vulkan drivers. +With some help from [byte[]](https://github.com/liamwhite), {{< gh-hovercard "12885" "a fix for these Xclipse GPU drivers was implemented" >}} by considering these devices as AMD, gaining access to the same old workarounds Radeon cards benefit from. +Thanks to user `no.kola` on discord for testing these! + +Xclipse moment #1. We have some bad news for Xclipse users we’ll discuss in the hardware section. + +## Miscellaneous changes + +One notable standing issue with yuzu is profile corruption, when after a badly-timed crash, the emulator creates a new profile and leaves all user data in the old one, forcing the user to manually move their saves back to the newly created active profile. +Thankfully, german77 {{< gh-hovercard "12665" "fixes user profile corruption" >}} issues by only saving profile data when contents change. + +While NCE has been with us for some time now, that doesn’t mean it’s entirely stable yet. +As an Android user pointed out, some hardcore mods like `Luminescent Platinum` for `Pokémon Brilliant Diamond/Shining Pearl` would get stuck in a black screen while using NCE. + +After the detective work was finished by byte[], the reason was found to be in how some mods make assumptions about the module layout, and yuzu would try to give each module a dedicated patch section. +To alleviate this bottleneck, [GPUCode](https://github.com/GPUCode) modified +the {{< gh-hovercard "12677" "NCE loader" >}} to try to use the same patch section for as many sequential modules as possible. + +{{< imgs + "./platinum.jpg| The community never fails to provide impressive mods (Pokémon Brilliant Diamond)" + >}} + +This should allow mods for other games that make assumptions about module layout to work under NCE as well. + +Jumping to a bit of input changes, german77 was notified that a user tried to dump their Amiibos, but yuzu failed to generate any dump because the Amiibos were mounted as read-only and no backup was available. +The solution? {{< gh-hovercard "12683" "Dump Amiibos" >}} if no backup exists, no questions asked. + +Resident helper [anpilley](https://github.com/anpilley) decided it was time to improve the available command-line arguments for the yuzu binaries, adding the use of `-u` to specify a {{< gh-hovercard "12695" "user to load" >}} and suppress the user selector from showing. +Thank you! + +Back for more, [FearlessTobi](https://github.com/FearlessTobi) decides to tackle a few problems with the virtual file system emulation, or `VFS`. +Since Project Gaia is in indefinite hiatus, priorities have shifted into patching as much of the current implementation as possible. + +The {{< gh-hovercard "12707" "list of changes" >}} is long: it includes moving files, unifying error code naming for ease of debugging, making file system definitions more consistent with current reverse engineering information available, and leaving the overall structure prepared for future code additions. +Never hurts to improve an area that was designed back when there was little information available. + +The boss of Dynarmic herself, [merryhime](https://github.com/merryhime), {{< gh-hovercard "12830" "updated the bundled build" >}} in yuzu to the latest version, bringing some new changes and fixes with it. +There are some instruction emulation optimizations, more 32-bit ARM instructions were added, and the startup times of games on Android was improved — it’s not as fast as NCE, but it’s considerably faster for those games that must run on JIT. + +To close this section and move to an interesting hardware discussion, t895 has one last gift for us this month, {{< gh-hovercard "12868" "per-game audio settings." >}} +One of the missing settings that could be set on a per-game basis, and it includes the full set, output engine, output device, input device, etc. + +{{< imgs + "./audio.gif| Sounds good to me!" + >}} + +The more you’re able to choose, the better, right? + +## Hardware and software section + +As promised last month, we’ll talk about frame generation, and the new tools available to take advantage of it in yuzu. +But first, one last HDR example for NVIDIA users. + +### NVIDIA TrueHDR + +With the 551.XX series of drivers, NVIDIA introduced the option to auto-generate an HDR output for any video displayed on a Chromium-based browser (Google Chrome, Microsoft Edge, Brave, etc). +It didn’t take long for the community to come up with plug-ins to take advantage of this change in [local video players](https://github.com/emoose/VideoRenderer/releases), but that’s not the only application outside NVIDIA’s official intended use. + +Enter [NvTrueHDR](https://www.nexusmods.com/site/mods/781), an alternative to Windows AutoHDR and Special K HDR. +Always fun to have more options to pick from! + +### Lossless Scaling to the rescue + +[Lossless Scaling](https://store.steampowered.com/app/993090/Lossless_Scaling/), a program intended for resolution scaling, recently introduced a generic frame generation option, making it the first vendor agnostic implementation. + +{{< imgs + "./ls1.png| Clean UI" + >}} + +Simply set Frame Generation on the right to `LSFG`. If you’re an Intel iGPU user, set Legacy capture API to enabled, open yuzu, enable Scale, and switch back to playing your game, or press the default hotkey `Ctrl + Alt + S` while in-game. Exclusive fullscreen is recommended. + +{{< imgs + "./ls2.png| Scroll down to find it" + >}} + +The results are good on smaller displays, but on larger monitors (such as 27 inch displays), the artifacts of the generated frames are too noticeable, making this tool more suitable for laptops and handhelds than for desktop or TV gameplay. +Still, it’s a cheap way of improving perceived framerates and bypassing CPU bottlenecks on any GPU vendor without driver or hardware restrictions. + +Below you can see comparison videos between native 30 FPS and Lossless Scaling generating frames to 60 FPS in `The Legend of Zelda: Breath of the Wild`. +Due to YouTube only supporting 60FPS video, you won't see the true 120 FPS framegen examples. + +{{< youtube v-U7GJYrY64 >}} {{< youtube XNBTxr6HBlA >}} + +The above videos demonstrate native 30 FPS vs Lossless Scaling generating frames from a 30 FPS base. +You can see with so little information, artifacts are common. Lossless Scaling doesn’t handle scene transitions. + +{{< youtube CG_e5yOnd9E >}} {{< youtube UpvdLJUtEis >}} + +The above videos demonstrate native 60 FPS vs Lossless Scaling generating frames from a 60 FPS base. +With more information to play with, Lossless Scaling does a better job. Scene transitions are still an issue. + +While the quality is not perfect, it’s a simple and harmless way of improving the experience on any hardware — especially on ~~ugly~~ 30 FPS games like the Pokémon series, or cinematic experiences like the Xenoblade saga. No double standards here. +Still, for those with recent AMD GPUs (RDNA2 and RDNA3 so far), there’s a better option available now: + +### AMD Fluid Motion Frames + +Driver release 24.1.1 introduced the first public release of [AFMF](https://community.amd.com/t5/gaming/amd-fluid-motion-frames-is-out-now-on-amd-radeon-rx-7000-series/ba-p/634372), AMD’s game-independent frame generation algorithm. + +“But writer, AFMF is only for Direct3D 11 and 12 games!” you say. +That’s where you’re wrong. You see, the [Guru3D forums](https://forums.guru3d.com/threads/amd-software-adrenalin-edition-23-40-01-10-preview-driver-for-amd-fluid-motion-frames.449598/page-35#post-6197794) has some fantastic information, AFMF can be run on Vulkan, OpenGL, and Direct3D 9/10 too, it only needs a registry edit: + +``` +[HKEY_LOCAL_MACHINE\SOFTWARE\AMD\DVR] +"GFGEnableAPI"=dword:00000007 +``` + +Manually make this change with regedit, reboot Windows if needed, add yuzu to the Radeon Software, set `Wait for Vertical Refresh` to `Disabled`, enable AMD Fluid Motion Frames: + +{{< imgs + "./radeon.png| Good looking UI, AMD" + >}} + +In the performance tab, you can set the overlay to show the generated frames' performance (it won’t show up on regular apps or yuzu, as it isn’t informed by the game engine), along with latency and stuttering. + +Open yuzu, set Fullscreen Mode to Exclusive Fullscreen: + +{{< imgs + "./fullscreen.png| It’s as shrimple as that" + >}} + +And that’s it, start a game, go into fullscreen by pressing F11 or the hotkey assigned to your controller, and enjoy 2x to 3x the perceived framerate. + +Note that, while the image quality is much better than the result from Lossless Scaling, AMD disables AFMF if there is too much variance between one frame and the next in order to avoid smoothing out scene transitions like camera changes or opening the menu. +This leads to a noticeable frametime inconsistency when a lot of action is happening on screen. We hope AMD adds an option in the future to toggle the sensitivity of this behaviour. + +{{< youtube v-U7GJYrY64 >}} {{< youtube 8Cbov_uR2Dc >}} + +The above videos demonstrate native 30 FPS vs AFMF generating frames from a 30 FPS base. +While a better result than Lossless Scaling at 30 FPS, artifacts are still noticeable in faster movements, especially on vegetation. Scene transitions are clear and there is less shimmering around the player. + +{{< youtube CG_e5yOnd9E >}} {{< youtube GfRjc9v0jls >}} +The above videos demonstrate native 60 FPS vs AFMF generating frames from a 60 FPS base. +And at 60 FPS, the results are great! Allowing for smoother gameplay on 120-180Hz displays. + +No performance graphs are included because your writer doesn’t consider perceived framerate as real performance, but to provide an example, `The Legend of Zelda: Tears of the Kingdom`, which produces solid 60 FPS in open world with a 5600X and an RTX 3060 Ti, can produce 170-180 “FPS” with AFMF enabled, and with little to no distortion visible. + +The games can be rendered with an NVIDIA or Intel GPU while still generating frames with AFMF, although the experience is slightly worse than just using the AMD card directly due to the added latency of transmitting the finished frames over PCIe. +The only requisite for AFMF to work is to have the display connected to the compatible AMD GPU, any other GPU can do the actual rendering after that. +Time to invest in an RX 6400? Smash must look amazing at 240 FPS. + +### Intel delivering on its promises + +As promised, Intel fixed [their crashes](https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/551) while building geometry shaders, starting with driver version [31.0.101.5186/5234](https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html). + +While this allows for games like `Xenoblade Chronicles 3` to finally get in-game on integrated GPUs and ARC dedicated cards, it seems like there are other areas where the driver needs to mature to produce proper rendering: + +{{< imgs + "./xc3.png| Intel moment (Xenoblade Chronicles 3)" + >}} + +On the flip side, `The Legend of Zelda: Tears of the Kingdom` improved stability with this driver fix, so Intel Windows specific rendering issues aside, the game should be quite playable now. + +### Qualcomm + +[K11MCH1](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/v24.1.0_R16)’s driver releases continue to flow out, improving performance and compatibility for Adreno users. +We strongly recommend staying up-to-date. + +While there have been new releases of the proprietary driver, nothing of value has been added or fixed yet. + +Total Adreno moments count this month: 1. + +### Exynos and Mali + +Why together? Because we found some *interesting* limitations in the Exynos hardware that reminds us of the existential crisis Mali suffers. +Besides the AMD specific issue we previously mentioned, Exynos’ Xclipse GPU series shares a quality with Mali: total lack of support for BC4 to BC7 texture decoding. + +While this is *fine* for native Android games (developers just have to scratch their head at the decision to skip basic texture support, and use an alternative like ASTC), Switch games do use BCn textures, extensively in some cases, and adding the extra CPU work of having to decode those textures into something the GPU can handle (RGBA8) will limit performance and increase memory usage. +This is one of the main reasons these GPUs are not on par with Adreno in terms of feature support. + +So: + +Total Xclipse moments count this month: 2. + +Total Mali moments count this month: 2. + +## Linux + +Certain distributions like SteamOS, Fedora since [version 39](https://bugzilla.redhat.com/show_bug.cgi?id=2216765), and any distro with a [linux-zen](https://github.com/zen-kernel/zen-kernel/commit/d22e337dca65bd7056e27b93c212df25a9b4c376) package available (Arch Linux for example), have significantly increased their default `vm.max_map_count` values, leading to much more stable out-of-box experiences when running Unreal engine games on yuzu. + +Progress feels so good! You could learn a little, Windows. + +## Future projects + +Work on multiprocess support is far from over. We’re aiming to support `QLaunch`, meaning being able to boot the native game launcher, launch games from there, close them, suspend them, launch a different game, the whole deal. + +{{< imgs + "./ql1.mp4| QLaunching in 3, 2, 1!" + >}} + +Resuming a game works too. + +{{< imgs + "./ql2.mp4| Back and forth." + >}} + +The work on applets and multiprocess is exposing a lot of hidden bugs in multiple areas — the accuracy improvements are a very welcome addition; we're having so much fun testing and running the applets. + +That’s all folks! Thank you for reaching the end of this progress report. We hope to see you next time! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-jan-2024/keyboard.mp4 b/site/content/entry/yuzu-progress-report-jan-2024/keyboard.mp4 new file mode 100644 index 000000000..00cff30e1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/keyboard.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/keyboard.png b/site/content/entry/yuzu-progress-report-jan-2024/keyboard.png new file mode 100644 index 000000000..d286d8335 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/keyboard.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/keys.png b/site/content/entry/yuzu-progress-report-jan-2024/keys.png new file mode 100644 index 000000000..497454d45 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/keys.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/lock.png b/site/content/entry/yuzu-progress-report-jan-2024/lock.png new file mode 100644 index 000000000..38daf1c80 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/lock.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/ls1.png b/site/content/entry/yuzu-progress-report-jan-2024/ls1.png new file mode 100644 index 000000000..70839507b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/ls1.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/ls2.png b/site/content/entry/yuzu-progress-report-jan-2024/ls2.png new file mode 100644 index 000000000..119888f18 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/ls2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/miiedit.mp4 b/site/content/entry/yuzu-progress-report-jan-2024/miiedit.mp4 new file mode 100644 index 000000000..f0a1e96a6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/miiedit.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/mk11.png b/site/content/entry/yuzu-progress-report-jan-2024/mk11.png new file mode 100644 index 000000000..eedcc9a71 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/mk11.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/multiprogram.mp4 b/site/content/entry/yuzu-progress-report-jan-2024/multiprogram.mp4 new file mode 100644 index 000000000..0b91a1fbd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/multiprogram.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/orientations.png b/site/content/entry/yuzu-progress-report-jan-2024/orientations.png new file mode 100644 index 000000000..654289b67 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/orientations.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/pj1.png b/site/content/entry/yuzu-progress-report-jan-2024/pj1.png new file mode 100644 index 000000000..f294a8ae2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/pj1.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/pj2.png b/site/content/entry/yuzu-progress-report-jan-2024/pj2.png new file mode 100644 index 000000000..630c7620a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/pj2.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/platinum.jpg b/site/content/entry/yuzu-progress-report-jan-2024/platinum.jpg new file mode 100644 index 000000000..a279b20bb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/platinum.jpg differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/pq.png b/site/content/entry/yuzu-progress-report-jan-2024/pq.png new file mode 100644 index 000000000..5371cab56 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/pq.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/ql1.mp4 b/site/content/entry/yuzu-progress-report-jan-2024/ql1.mp4 new file mode 100644 index 000000000..4e64553e4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/ql1.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/ql2.mp4 b/site/content/entry/yuzu-progress-report-jan-2024/ql2.mp4 new file mode 100644 index 000000000..49150821d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/ql2.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/radeon.png b/site/content/entry/yuzu-progress-report-jan-2024/radeon.png new file mode 100644 index 000000000..babe4abad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/radeon.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/summary.png b/site/content/entry/yuzu-progress-report-jan-2024/summary.png new file mode 100644 index 000000000..615580bce Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/uninstall.png b/site/content/entry/yuzu-progress-report-jan-2024/uninstall.png new file mode 100644 index 000000000..909cdcabe Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/uninstall.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/verify1.gif b/site/content/entry/yuzu-progress-report-jan-2024/verify1.gif new file mode 100644 index 000000000..f0ce63a72 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/verify1.gif differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/verify2.gif b/site/content/entry/yuzu-progress-report-jan-2024/verify2.gif new file mode 100644 index 000000000..7ac4b01a2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/verify2.gif differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/web1.mp4 b/site/content/entry/yuzu-progress-report-jan-2024/web1.mp4 new file mode 100644 index 000000000..1fa483e34 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/web1.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/web2.mp4 b/site/content/entry/yuzu-progress-report-jan-2024/web2.mp4 new file mode 100644 index 000000000..bf09f8048 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/web2.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/webapplet.png b/site/content/entry/yuzu-progress-report-jan-2024/webapplet.png new file mode 100644 index 000000000..feff6ff64 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/webapplet.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/webappletbug.png b/site/content/entry/yuzu-progress-report-jan-2024/webappletbug.png new file mode 100644 index 000000000..47430adb2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/webappletbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jan-2024/xc3.png b/site/content/entry/yuzu-progress-report-jan-2024/xc3.png new file mode 100644 index 000000000..67d290df5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jan-2024/xc3.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/async.mp4 b/site/content/entry/yuzu-progress-report-jul-2020/async.mp4 new file mode 100644 index 000000000..e230b6484 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/async.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/banner.png b/site/content/entry/yuzu-progress-report-jul-2020/banner.png new file mode 100644 index 000000000..454a79e39 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/batch_install.png b/site/content/entry/yuzu-progress-report-jul-2020/batch_install.png new file mode 100644 index 000000000..994e3c690 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/batch_install.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/bioshock_out_of_space.png b/site/content/entry/yuzu-progress-report-jul-2020/bioshock_out_of_space.png new file mode 100644 index 000000000..05fbfaf45 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/bioshock_out_of_space.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/bioshock_saved.png b/site/content/entry/yuzu-progress-report-jul-2020/bioshock_saved.png new file mode 100644 index 000000000..d8281294a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/bioshock_saved.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/diablo3fixed.png b/site/content/entry/yuzu-progress-report-jul-2020/diablo3fixed.png new file mode 100644 index 000000000..90a6ebd7e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/diablo3fixed.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/index.md b/site/content/entry/yuzu-progress-report-jul-2020/index.md new file mode 100644 index 000000000..c0f14b8aa --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jul-2020/index.md @@ -0,0 +1,207 @@ ++++ +date = "2020-08-04T12:00:00-03:00" +title = "Progress Report July 2020" +author = "Morph" +coauthor = "GoldenX86" +forum = 290819 ++++ + +Hey yuz-ers, what is up and welcome back to the… progress report. In this monthly report, we offer you major rewrites to critical components, another successful attack on shader compilation times, tons of game fixes, and the promise of a very bright future ahead. Let’s get started! + + + +## Paper Mario: The Origami King fixes + +To begin with, [Rodrigo](https://github.com/ReinUsesLisp) implemented several fixes to make `Paper Mario: The Origami King` playable: + +- By [clamping the host’s compute shared memory limit](https://github.com/yuzu-emu/yuzu/pull/4359), the game doesn’t get stuck when trying to start rendering. + +{{< imgs + "./pmm.png| Now in A4 format! (Paper Mario: The Origami King)" + >}} + +- Some graphical artifacts affecting OpenGL can be fixed in GLASM by executing the shader instruction [BAR inside control flow](https://github.com/yuzu-emu/yuzu/pull/4360). + +{{< single-title-imgs + "That is one big sheet of paper! (Paper Mario: The Origami King)" + "./pmcastlebug.png" + "./pmcastlefix.png" + >}} + +- Lighting issues were fixed by [implementing the S2R.LaneId instruction in the shader decoder](https://github.com/yuzu-emu/yuzu/pull/4361). + +{{< single-title-imgs + "Lights, please! (Paper Mario: The Origami King)" + "./pmintrobug.png" + "./pmintrofix.png" + >}} + +## New GPU Virtual Memory Manager + +[bunnei](https://github.com/bunnei) brings the big guns. The complete [rewrite of the `GPU Virtual Memory Manager`](https://github.com/yuzu-emu/yuzu/pull/4430) fixes *several* bugs in many games, with the two strongest examples being `Mario Kart 8 Deluxe` and `Super Smash Bros. Ultimate`. Now several graphical bugs are fixed in Mario Kart 8, including tracks that show invisible terrain or missing graphics. In Smash's case, there are no more vertex explosions now. + +This rewrite also should reduce committed memory a bit, hopefully reducing the size of the required page file, and opens the possibility to implement new features in the future. We have to clarify that this doesn't fix the high VRAM usage in Vulkan. + +{{< single-title-imgs + "That's not what I meant when I said Anti-Gravity! (Mario Kart 8 Deluxe)" + "./mk8bug.png" + "./mk8fix.png" + >}} + +## Bug fixes and improvements + +Accompanying the recent addition of 32-bit emulation support, [bunnei](https://github.com/bunnei) implemented [support for the creation of random and default Miis](https://github.com/yuzu-emu/yuzu/pull/4292). This does not include full support for custom ones for now. +With Miis in place, games like `Mario Kart 8 Deluxe` and `New Super Mario Bros. U Deluxe` can now get past their menus and become playable. + +For this service to work, the user needs to dump the system archives from their Nintendo Switch. The process requires the [Goldleaf homebrew](https://github.com/XorTroll/Goldleaf). + +To obtain the files, you must open Goldleaf from the Homebrew menu, select "Console and Goldleaf settings," select "Firmware and updates," pick "Export update," confirm on the "Directory" option, and the files will be dumped in the `switch\Goldleaf\dump\update` location. After that, just copy the files to `%AppData%\yuzu\nand\system\Contents\registered`. + +{{< single-title-imgs + "Ports, ports everywhere! (Mario Kart 8 Deluxe & New Super Mario Bros. U Deluxe)" + "./mk8.png" + "./smbud.png" + >}} + +This is tradition by now. [Morph](https://github.com/Morph1984) fixed another bug in `Kirby Star Allies`, this time by [implementing MirrorOnceClampOGL](https://github.com/yuzu-emu/yuzu/pull/4082). This is done by using the `GL_EXT_texture_mirror_clamp` extension on the OpenGL drivers that support it. The Intel driver doesn’t, so, with those GPUs, yuzu falls back to `GL_MIRROR_CLAMP_TO_EDGE`. + +Improvements to the texture cache by [implementing additional checks](https://github.com/yuzu-emu/yuzu/pull/4176), done by [Rodrigo](https://github.com/ReinUsesLisp), fixed crashing issues on Turing GPUs (RTX 2000 and GTX 1600 series) in `The Legend of Zelda: Breath of the Wild`. Now you can load saves normally! So get moving and save the princess! + +Our GLASM users experienced black textures on top of the vegetation in `The Legend of Zelda: Link’s Awakening`. By using the extensions [`NV_shader_buffer_load` and `NV_shader_buffer_store`](https://github.com/yuzu-emu/yuzu/pull/4168), [Rodrigo](https://github.com/ReinUsesLisp) solved this issue for good. + +{{< single-title-imgs + "Beware of the dark weeds, legend says rupoors lay there (The Legend of Zelda: Link's Awakening)" + "./zlabug.png" + "./zlafix.png" + >}} + +We talked about this in the previous June progress report, and we're happy to announce that [Rodrigo](https://github.com/ReinUsesLisp) finished [implementing support for `VK_EXT_extended_dynamic_state`](https://github.com/yuzu-emu/yuzu/pull/4150). This fixes the “triangle glitch” that affects `Super Mario Odyssey` on all Vulkan drivers that support this new extension. + +Thanks to help from [gdkchan](https://github.com/gdkchan) and [Blinkhawk](https://github.com/FernandoS27), [Rodrigo](https://github.com/ReinUsesLisp) added support for [copying 2D arrays of pixels into 3D voxels](https://github.com/yuzu-emu/yuzu/pull/4242), fixing rendering bugs in games like `LEGO Marvel Super Heroes 2` and possibly others. + +[toastUnlimited](https://github.com/lat9nq), along with [Rodrigo](https://github.com/ReinUsesLisp), started preliminary work to fix crashes only happening in recent Nvidia Linux Vulkan drivers. Through trial and error, it was found that [increasing the Vulkan device allocable size](https://github.com/yuzu-emu/yuzu/pull/4283) mitigates this issue on most GPUs, but some still remain affected for now. + +[epicboy](https://github.com/ameerj) is working on [implementing support for GameCube adapters](https://github.com/yuzu-emu/yuzu/pull/4137), allowing players to use original GameCube controllers! Veteran Smash players will surely enjoy it. + +[`Project Prometheus`](https://yuzu-emu.org/entry/yuzu-prometheus/) introduced so many changes that we are still working on reaching feature parity with the original single-core implementation. [ogniK](https://github.com/ogniK5377) [improved the audio timing](https://github.com/yuzu-emu/yuzu/pull/4219), fixing audio bugs that were introduced with the implementation of the new multicore and single-core emulation methods. + +Since its introduction, enabling multicore was the only way to reach stable gameplay on Linux systems, as the single-core option would lead to a crash in every game. Thanks to [comex's report](https://github.com/yuzu-emu/yuzu/issues/4424), [Lioncache](https://github.com/lioncash) fixed it by [using the return value of Lock() in the nvflinger surface compositor](https://github.com/yuzu-emu/yuzu/pull/4426). Thanks to this fix, games that are not yet stable with multicore, like `Luigi’s Mansion 3`, can now be safely played in the Tux OS (Linux). + +## Project Kobra + +Six months ago, [Morph](https://github.com/Morph1984) proposed an [implementation of a batch installer to yuzu](https://github.com/yuzu-emu/yuzu/pull/3385), which allowed users to install many updates and DLCs at the same time. This was a boon for many users, but it remained in Early Access for a long time due to several issues and anticipation of a new VFS implementation dubbed `Project Viper`. With renewed hope and motivation from the shark ([ogniK](https://github.com/ogniK5377)), [Morph](https://github.com/Morph1984) went on to fix all of its remaining issues, allowing it to finally be merged into the master/Mainline branch of yuzu. + +{{< imgs + "./batch_install.png| I can finally install all the DLCs of Super Smash Bros. Ultimate!" + >}} + +Additionally, as `Project Viper` has been delayed until further notice, [Morph](https://github.com/Morph1984) took it upon himself to fix the list of Virtual File System (VFS) bugs that had been plaguing yuzu. + +It was well known that yuzu had problems with installing Updates and DLC into the NAND and reading them correctly. Due to the inability to easily remove individual game files, users had to delete all their installed game files just to ensure that their new Update or DLC got detected properly. + +{{< imgs + "./uninstall_before_fix.png| Not again, my precious write cycles! *sobs*" + >}} + +Upon closer inspection of the inner workings of the VFS, [Morph](https://github.com/Morph1984) found that the previous Updates or DLC were not removed when a newer one was being installed, leading to issues with the detection of these files in yuzu. He solved this by [properly removing the previous update or DLC if it exists on installation](https://github.com/yuzu-emu/yuzu/pull/4249). In addition to this, he also [corrected a small oversight in the way yuzu stores autogenerated titlekeys](https://github.com/yuzu-emu/yuzu/pull/4250). Now invalid titlekeys will no longer be written into the `title.keys_autogenerated` file, ensuring that only valid ones are written. If your game, update or DLC is not being detected by yuzu, ensure you have the latest key files dumped from your switch, as newer game updates and DLC require newer firmware keys to decrypt. +With these fixes in place, yuz-ers no longer have to delete all installed game files to install a newer update or DLC as this properly overwrites the previously installed ones. + +Next, he looked into fixing one of the oldest and well known VFS bugs - the `Luigi's Mansion 3` autosave issue. Every time an autosave was triggered, the game would softlock. This had also affected other games such as `KATANA KAMI: A Way of the Samurai Story` and `Okami HD`. Building upon the initial research by theboy181 (the creator of the mod that bypassed the Luigi's Mansion saving issue), Morph dug into the VFS code and found that files were not closed prior to being renamed or moved, leading to a [simple fix](https://github.com/yuzu-emu/yuzu/pull/4265) for any games that use this function. + +Keeping the ball rolling, he went on to find out why `Diablo III: Eternal Collection` was not able to get past the EULA screen and thus needing a save file to bypass it. It turned out that an [old PR](https://github.com/yuzu-emu/yuzu/pull/1012) was causing *folders* instead of *files* to be created. After this discovery, the PR was immediately removed from Mainline/Early Access and closed as it was no longer needed. + +{{< imgs + "./diablo3fixed.png| EULAs can't stop me! (Diablo III)" + >}} + +Looking for the next meal, Morph took a bite at the saving issues of the Bioshock Trilogy. These games were unable to save due to checking for free space prior to saving. This was fixed by [ensuring that the NAND partition sizes were set to their defaults](https://github.com/yuzu-emu/yuzu/pull/4282) and are read correctly by the relevant filesystem service commands. + +{{< single-title-imgs + "Game saves are for the weak! (Bioshock Remastered)" + "./bioshock_out_of_space.png" + "./bioshock_saved.png" + >}} + +After this little treat, the Kirby embarked on an adventure to fix the last remaining issues with the VFS. After 3 days of debugging the Pokemon Sword and Shield RomFS weather bug, he discovered that these games contained a 0 byte file called `global_setting.bin` which caused the file right after it called `weather_data.bin` to be skipped entirely. And you may have guessed by now - this file contains all the data for weather and without it, no weather can be generated within the game! This eureka moment led to an extremely simple fix which [accommodates for 0 byte files during RomFS building](https://github.com/yuzu-emu/yuzu/pull/4309). + +{{< single-title-imgs + " Let it snow, let it snow, let it snow! (Pokemon Sword and Shield)" + "./swsh_weather.png" + "./swsh_weather2.png" + >}} + +[Morph's](https://github.com/Morph1984) adventures have led him to save ~~Zelda~~ Link from the eternal softlocks after awakening from his slumber, seems like Ganon may have known Zelda's plan after all. Our Kirby traveled to the shattered Kingdom of Hyrule and foiled Ganon's plans by [creating the save subdirectories](https://github.com/yuzu-emu/yuzu/pull/4345) that would allow Link to save his progress. Finally, he can save the princess without wasting his time eternally stuck after his slumber. + +Hearing stories of Nook Inc's deserted islands, Kirby flew off to visit some of them, only to be met by a barrier preventing access to the other realms. He managed to bypass the barrier by [stubbing two filesystem service commands](https://github.com/yuzu-emu/yuzu/pull/4456) which were blocking access to the islands. Now he can view all the latest treats added in the islands since the last update. + +Wrapping up his adventures, he went and brought peace to Dreamland once again by adding an option to [remove individual NAND or SDMC installed games, updates, and DLCs](https://github.com/yuzu-emu/yuzu/pull/4372) and fixing the last remaining issues with the game list, such as [opening the Save/Mod Data Location of installed titles](https://github.com/yuzu-emu/yuzu/pull/4381), [game list subdirectory scanning](https://github.com/yuzu-emu/yuzu/pull/4450), and [game list metadata detection](https://github.com/yuzu-emu/yuzu/pull/4448). + +{{< imgs + "./title_removal.png| Removal of installed game files has never been easier!" + >}} + +## The old guard + +When yuzu started using [Conan](https://conan.io/), most of yuzu's dependencies were migrated to it. Unfortunately, our audio decoding dependency, Opus, had bad settings in the Conan version. These settings forced the use of the `AVX/AVX2 instruction set` even on old CPUs that don't support it, such as AMD Phenom CPUs or any Intel Pentium, Celeron, or Atom CPU. This caused some games to crash when processing audio on the affected CPUs. [ogniK](https://github.com/ogniK5377) fixed this by [replacing our included Opus version](https://github.com/yuzu-emu/yuzu/pull/4218). + +[Merry](https://github.com/MerryMage) finished the preliminary work needed to [fix a performance regression affecting CPUs that lack the `FMA instruction set`](https://github.com/yuzu-emu/yuzu/pull/4294). This includes AMD Phenom series or older, Intel 3rd generation Core-i series or older, and all Pentium, Celeron and Atom CPUs. For now this shows up as a debug CPU configuration in yuzu’s settings. We recommend that our users not play with these settings, as altering them will only produce a worse experience than the default settings. + +## UI changes + +A very requested feature from our users. [toastUnlimited](https://github.com/lat9nq) rose to the challenge and decided to [add per-game configurations](https://github.com/yuzu-emu/yuzu/pull/4098) to yuzu! For now it lacks support for input settings, but this will be added in the future. To access this new feature, right click a game in yuzu's game list and select Properties. + +{{< imgs + "./settings.png| No need to remember specific settings before booting a game!" + >}} + +[Morph](https://github.com/Morph1984) added [a new theme for our anti-light themes users](https://github.com/yuzu-emu/yuzu/pull/4377), `Midnight Blue`! You can access it in Configuration > General > UI. + +{{< imgs + "./midnight.png| Oooh, Spooky" + >}} + +Fixing small annoyances is something that is overlooked most of the time, but very appreciated when done. [Tobi](https://github.com/FearlessTobi) [removed the need to confirm which Switch profile to use when there is only a single one created](https://github.com/yuzu-emu/yuzu/pull/4297). Thank you so much Tobi. + +{{< imgs + "./profile.png| Bye little fella!" + >}} + +## The Sharkman, episode one + +[ogniK](https://github.com/ogniK5377) has been working for a long time on a [major audio rewrite](https://github.com/yuzu-emu/yuzu/pull/4310) for yuzu. To avoid a very long explanation of the complexity of Nintendo’s audio renderer systems, we recommend our more tech savvy readers to read the Pull Request’s description where you will find more detailed information. + +This is “Part 1,” several fixes and more complex (or annoying to code) features will be finished at a later date. Right now the results speak for themselves. Tons of games with broken audio of any kind - like missing sound effects, fading music, mixing errors, crackling or even no sound at all - are either running perfectly or are starting to sound a lot more like the native hardware. Some bugs are to be expected for now, for example, `Shovel Knight` and `Fast RMX` experience choppy audio, and the voices in `Animal Crossing: New Horizons` will play from only one ear. + +You would think that this is enough, but [ogniK](https://github.com/ogniK5377) has another fantastic gift for us. Up until now, when several new shaders had to be built during gameplay, they could only be done one at a time. Thanks to some good help provided by [Exzap](https://github.com/Exzap), Cemu's lead developer, [yuzu can now decode shaders asynchronously!](https://github.com/yuzu-emu/yuzu/pull/4273) This means that, depending on the amount of threads your CPU has, the shader compilation will happen on several threads at the same time. Thus cutting down shader build time significantly, especially if you can also use assembly shaders. + +To top it off, [epicboy](https://github.com/ameerj) added [async shader support for Vulkan](https://github.com/yuzu-emu/yuzu/pull/4443)! + +{{< imgs + "./async.mp4| Thanks to BSoD Gaming for the video comparison (Super Smash Bros. Ultimate)" + >}} + +Due to limitations in the AMD Windows OpenGL driver, we recommend that you avoid using asynchronous shaders in OpenGL if you have a Radeon GPU, as it will only produce frame skipping and lead to a very poor gameplay experience. The Linux OpenGL drivers are unaffected by this, as well as any of the Vulkan drivers. + +The number of threads used for asynchronous shader compilation (along with example CPUs to illustrate the number of CPU threads) are as follows: + +| CPU Threads | Shader Threads | Example CPUs | +| :-----------: | :--------------: | ------------ | +| 1 - 7 | 1 | R3-1200, i3-6100 | +| 8 - 11 | 2 | R3-3300X, i7-7700K | +| 12 - 15 | 3 | R5-3600, i7-8700K | +| 16+ | 4 | R7-3700X, i7-10700K | + +## Future projects + +[Rodrigo](https://github.com/ReinUsesLisp) started rewriting the Texture Cache and once the work is finished, this should positively affect both OpenGL and Vulkan by introducing bug fixes, better performance, and a better experience in Vulkan in particular. + +There are also some other yet undisclosed but very impressive projects that we will reveal soon enough. Stay tuned! + +That’s all for now, folks! Until the August progress report! + +{{< imgs + "./starallies.png" + >}} + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-jul-2020/midnight.png b/site/content/entry/yuzu-progress-report-jul-2020/midnight.png new file mode 100644 index 000000000..441080aa5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/midnight.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/mk8.png b/site/content/entry/yuzu-progress-report-jul-2020/mk8.png new file mode 100644 index 000000000..b58b4b478 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/mk8.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/mk8bug.png b/site/content/entry/yuzu-progress-report-jul-2020/mk8bug.png new file mode 100644 index 000000000..2edf001d2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/mk8bug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/mk8fix.png b/site/content/entry/yuzu-progress-report-jul-2020/mk8fix.png new file mode 100644 index 000000000..c528a3a38 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/mk8fix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/pmcastlebug.png b/site/content/entry/yuzu-progress-report-jul-2020/pmcastlebug.png new file mode 100644 index 000000000..acbfa3263 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/pmcastlebug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/pmcastlefix.png b/site/content/entry/yuzu-progress-report-jul-2020/pmcastlefix.png new file mode 100644 index 000000000..737af1025 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/pmcastlefix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/pmintrobug.png b/site/content/entry/yuzu-progress-report-jul-2020/pmintrobug.png new file mode 100644 index 000000000..b1abcc288 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/pmintrobug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/pmintrofix.png b/site/content/entry/yuzu-progress-report-jul-2020/pmintrofix.png new file mode 100644 index 000000000..d69384c70 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/pmintrofix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/pmm.png b/site/content/entry/yuzu-progress-report-jul-2020/pmm.png new file mode 100644 index 000000000..728a46bad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/pmm.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/profile.png b/site/content/entry/yuzu-progress-report-jul-2020/profile.png new file mode 100644 index 000000000..f25d8c073 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/profile.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/settings.png b/site/content/entry/yuzu-progress-report-jul-2020/settings.png new file mode 100644 index 000000000..b6d83faf6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/settings.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/smbud.png b/site/content/entry/yuzu-progress-report-jul-2020/smbud.png new file mode 100644 index 000000000..51c0d9ee6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/smbud.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/starallies.png b/site/content/entry/yuzu-progress-report-jul-2020/starallies.png new file mode 100644 index 000000000..9e389dbd3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/starallies.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/summary.png b/site/content/entry/yuzu-progress-report-jul-2020/summary.png new file mode 100644 index 000000000..c185bffe7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/swsh_weather.png b/site/content/entry/yuzu-progress-report-jul-2020/swsh_weather.png new file mode 100644 index 000000000..b7f79eaa9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/swsh_weather.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/swsh_weather2.png b/site/content/entry/yuzu-progress-report-jul-2020/swsh_weather2.png new file mode 100644 index 000000000..88704e5fb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/swsh_weather2.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/title_removal.png b/site/content/entry/yuzu-progress-report-jul-2020/title_removal.png new file mode 100644 index 000000000..3eb29bf72 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/title_removal.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/uninstall_before_fix.png b/site/content/entry/yuzu-progress-report-jul-2020/uninstall_before_fix.png new file mode 100644 index 000000000..8b71a75b7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/uninstall_before_fix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/zlabug.png b/site/content/entry/yuzu-progress-report-jul-2020/zlabug.png new file mode 100644 index 000000000..cd8d4edef Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/zlabug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2020/zlafix.png b/site/content/entry/yuzu-progress-report-jul-2020/zlafix.png new file mode 100644 index 000000000..2459f21c2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2020/zlafix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/1d2dbug.png b/site/content/entry/yuzu-progress-report-jul-2021/1d2dbug.png new file mode 100644 index 000000000..bbf147141 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/1d2dbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/1d2dfix.png b/site/content/entry/yuzu-progress-report-jul-2021/1d2dfix.png new file mode 100644 index 000000000..8540c8567 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/1d2dfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/aocbug.png b/site/content/entry/yuzu-progress-report-jul-2021/aocbug.png new file mode 100644 index 000000000..ad315fe64 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/aocbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/aocfix.png b/site/content/entry/yuzu-progress-report-jul-2021/aocfix.png new file mode 100644 index 000000000..12b9147f2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/aocfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/art.png b/site/content/entry/yuzu-progress-report-jul-2021/art.png new file mode 100644 index 000000000..43e2a6722 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/art.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/backend.png b/site/content/entry/yuzu-progress-report-jul-2021/backend.png new file mode 100644 index 000000000..89520a97a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/backend.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/banner.png b/site/content/entry/yuzu-progress-report-jul-2021/banner.png new file mode 100644 index 000000000..8013aa2bc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/best.png b/site/content/entry/yuzu-progress-report-jul-2021/best.png new file mode 100644 index 000000000..2ee01701d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/best.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/bordersbug.png b/site/content/entry/yuzu-progress-report-jul-2021/bordersbug.png new file mode 100644 index 000000000..7b731309e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/bordersbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/bordersfix.png b/site/content/entry/yuzu-progress-report-jul-2021/bordersfix.png new file mode 100644 index 000000000..a5adda608 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/bordersfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/botwbug.png b/site/content/entry/yuzu-progress-report-jul-2021/botwbug.png new file mode 100644 index 000000000..2abc639c1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/botwbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/botwfix.png b/site/content/entry/yuzu-progress-report-jul-2021/botwfix.png new file mode 100644 index 000000000..8f726ea49 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/botwfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/flipbug.png b/site/content/entry/yuzu-progress-report-jul-2021/flipbug.png new file mode 100644 index 000000000..f026df14c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/flipbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/flipfix.png b/site/content/entry/yuzu-progress-report-jul-2021/flipfix.png new file mode 100644 index 000000000..8ae4fbf3a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/flipfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/fpscap.png b/site/content/entry/yuzu-progress-report-jul-2021/fpscap.png new file mode 100644 index 000000000..39f6a2326 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/fpscap.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/games.png b/site/content/entry/yuzu-progress-report-jul-2021/games.png new file mode 100644 index 000000000..57e464285 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/games.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/hades.png b/site/content/entry/yuzu-progress-report-jul-2021/hades.png new file mode 100644 index 000000000..ebffd3ccb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/hades.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/index.md b/site/content/entry/yuzu-progress-report-jul-2021/index.md new file mode 100644 index 000000000..0ae992dbf --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jul-2021/index.md @@ -0,0 +1,474 @@ ++++ +date = "2021-08-12T12:00:00-03:00" +title = "Progress Report July 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 446373 ++++ + +Bienvenidos, yuz-ers, to our latest monthly progress report! We have a *lot* to talk about this month, so buckle up, ‘cause this will be one good ride! + + + +# Project Hades + +{{< imgs + "./hades.png| Why Hades? Well here's why!" + >}} + +[Kept you waiting, huh?](https://www.youtube.com/watch?v=4Zq3OCrzn84) +After being in development for six months, and spanning almost 50,000 lines of new code, `Project Hades` has finally been released. This massive [rewrite of the shader decompiler](https://github.com/yuzu-emu/yuzu/pull/6585) is brought to you by [Rodrigo](https://github.com/ReinUsesLisp), [Blinkhawk](https://github.com/FernandoS27), and [epicboy](https://github.com/ameerj). + +Fixing an innumerable amount of rendering bugs, reducing shader build times, improving compatibility, and increasing performance by over 30% for all GPU vendors, Hades is easily +one of the biggest changes made to yuzu to date. + +[We have a dedicated article explaining the process in technical detail](https://yuzu-emu.org/entry/yuzu-hades/), so we will be focusing only on the end user changes and some +recommendations to help you get the best experience out of this new feature that both Early Access and Mainline users can enjoy. + +While we keep OpenGL as the default graphics API for compatibility reasons (outdated drivers won’t affect it as much, and it lets Nvidia Fermi GPU users run yuzu out of the box), we +strongly recommend testing your games with the Vulkan API first. Vulkan performance and compatibility have improved significantly (especially if paired with the [Texture Reaper](https://yuzu-emu.org/entry/yuzu-progress-report-jun-2021/#project-texture-reaper), the GPU Cache Garbage Collector), additionally, rendering and shader build performance almost always beat OpenGL. +This applies not only for AMD and Intel GPU users, but also Nvidia users. + +There is an exception, however. The Intel Linux Vulkan driver is not stable at the moment, but we’re investigating the cause of the issue. For now, Intel Linux users should +stick to OpenGL. + +{{< imgs + "./perf_ea_vs_hades_ea.png| Integrated GPU users benefit the most from Hades" + >}} + +Hades implements a `Pipeline Cache` for both Vulkan and OpenGL, meaning that regardless of which API you are using, all shaders are now stored and reused the next time the game is +started. This functions similarly to how the old OpenGL Shader Cache behaved. +Needless to say, this means that all previous Shader Caches are no longer valid, and will be discarded if someone tries to use them. + +The difference in terminology lies in the fact that the whole [Graphics Pipeline](https://en.wikipedia.org/wiki/Graphics_pipeline) is now stored, not just a specific set of +Shader stages. +An important detail, the OpenGL pipeline cache is not interchangeable with the Vulkan pipeline cache and vice versa. +Two separate sets of shaders are generated if you use both APIs. + +Vulkan now also benefits from `parallel shader building`, meaning all CPU threads will be able to handle all upcoming shaders in a parallel fashion, instead of asynchronously, +avoiding graphical issues and building faster. +The end result is the shortest build times of all API and shader backends (more on this later). +Thus, on a fresh game with no previously built cache, more CPU threads will provide a smoother experience, with no imposed limit. +Someone should test running `Super Smash Bros. Ultimate` on a big server CPU! + +{{< imgs + "./vulkan.mp4| First time gameplay has never been smoother!" + >}} + +All CPU threads, save for one, are used to build shaders. The remaining free thread either handles shader saving to the pipeline cache, or continues the rendering process, depending +on if all shaders have been dealt with at the moment. +This decision was made not only to improve performance, but also to improve overall system response times while building several shaders simultaneously, and to avoid certain +“gaming” laptops from overheating the CPU while keeping all threads busy. + +Note that this is a hardware design flaw by the laptop vendors, not an issue with the emulator. The product should provide enough cooling performance to keep its components +cool enough even at full demand, not just for reaching advertised turbo clock speeds in short bursts. +(Writer note: basically, if you want good gaming performance and longevity, buy **thicc** laptops.) + +Now, not all games will perform or render the best in Vulkan, some will still show better results with OpenGL instead. For the old API, we have some changes too. + +{{< imgs + "./backend.png| When selecting OpenGL, new options show up!" + >}} + +We have introduced a new drop list option in the Graphics settings. +Replacing the device selection of Vulkan when using OpenGL, `Shader backend` shows up, giving three different options to choose from. + +Out of the box, yuzu uses [GLSL](https://en.wikipedia.org/wiki/OpenGL_Shading_Language), the default backend for OpenGL. +On good performing OpenGL GPU drivers (only Nvidia and the Linux Mesa drivers as of now), it has the best performance, but also takes the longest time to build shaders, +resulting in noticeable stuttering when accessing new areas or performing new attacks. +This is the recommended option for Nvidia users with a previously built cache searching for the highest performance. +While it has its uses in some edge cases, we recommend Windows AMD and Intel users to run Vulkan instead. +Linux Mesa users don’t have this limitation and can enjoy GLSL without issues, thanks to far more mature drivers. + +Next up is [GLASM](https://en.wikipedia.org/wiki/ARB_assembly_language), what in the past was called Assembly Shaders. +This is an Nvidia only feature, it provides lower performance than GLSL or Vulkan, but the second fastest shader build times, only behind Vulkan’s parallel shaders. +We recommend Nvidia users interested in using OpenGL to first run games in GLASM in order to build their pipeline cache, and once done, move to GLSL to get the best performance +without suffering the shader stuttering associated with GLSL. +Any other GPU vendor will skip GLASM and default to GLSL. + +Finally, [SPIR-V](https://en.wikipedia.org/wiki/Standard_Portable_Intermediate_Representation), the default backend of Vulkan, which is a valid option in OpenGL since the +release of version 4.6. +Originally, we wanted OpenGL to use this backend, discontinuing support for GLSL. + +Reality always hits back like the laws of thermodynamics, delaying the release of Hades for several months. +Driver support for SPIR-V in Windows is very bad (especially for Nvidia), with only the Linux Mesa drivers having a correct and fast implementation. +So we decided to keep the option as an experimental feature, focusing on the old GLSL and GLASM backend first. We plan to improve SPIR-V rendering and performance later. +Ideally, SPIR-V in OpenGL should be a jack-of-all-trades, a mix of the performance of GLSL and the shader build times of GLASM. + +So to ease our user’s decision on what to choose, here’s a chart of all possible options for the most common GPU vendors. + +{{< imgs + "./best.png| " + >}} + +Another important change is in how GPU accuracy operates. +In the past, certain games like `Pokémon Sword & Shield` required using High GPU accuracy to get the best performance. +This is no longer the case. Now, Normal consistently produces the best performance, at a low cost in accuracy, while High produces better particle effects and lighting, at a +low performance cost. + +[We removed values](https://github.com/yuzu-emu/yuzu/pull/6575) that should be enabled by default from the bottom left action buttons of the user interface, like Asynchronous +GPU shaders and Multicore. In their place, users can now *switch* between Normal and High GPU accuracy while playing. +A fast and easy way to test what’s better for each game, GPU vendor, and API. + +{{< imgs + "./statusbar.png| Old (top) vs new (bottom)" + >}} + +## Thank you, Captain Obv — er, I mean, Captain Vortex + +Communication is vital for any project, and it is essential that we make our configuration options *even more explanatory* than they already are. + +We want to thank our fellow developer, [Vortex](https://github.com/CaptV0rt3x), for the marvelous change of +[rewording the explanation of GLASM](https://github.com/yuzu-emu/yuzu/pull/6736). This change was made in order to elaborate that it is, effectively, a shorthand for `OpenGL Assembly Shaders`. + +{{< imgs + "./vortex.png| This is critical" + >}} + +Fear not, my fellow yuz-ers, for we always have the most serious and capable people doing only the best work for your benefit. +Rest assured that if a similar situation were to arise again in the future, Vortex will have your back. +I salute you, my dear friend, and pray that you may ennoble yuzu even further with your future contributions. + +## Graphical fixes + +epicboy was very busy during the development of Hades, and continues to be busy after it was finished. + +World 1-5 of `Super Mario 3D World + Bowser's Fury` used to crash when loading on AMD and Intel GPU equipped systems running Vulkan. +A depth image was being cleared as a regular colour image and, while OpenGL is totally fine with this, Vulkan is more strict which lead to a crash. +[By only clearing valid colour images](https://github.com/yuzu-emu/yuzu/pull/6635), epicboy resolved the issue. + +{{< imgs + "./sm3dw.png| Affected world in Super Mario 3D World + Bowser's Fury" + >}} + +As a way to limit the maximum framerate a dynamic FPS game can run at, epicboy [implemented a multiplier based cap](https://github.com/yuzu-emu/yuzu/pull/6697). +So, for example, if a game natively runs at 30 FPS, but can be run without issues at 240 FPS, setting an FPS cap of 8x will limit the FPS unlimiter to that value. Ideal for +high refresh displays! + +To avoid confusion with the FPS unlimiter, the old Frame limit was [renamed to Speed limit.](https://github.com/yuzu-emu/yuzu/pull/6696) + +{{< imgs + "./fpscap.png| You can find the new options here" + >}} + +From before the [release of the texture cache rewrite](https://yuzu-emu.org/entry/yuzu-tcr/), a regression has existed that caused users' screenshots to save in the wrong directory. +Turns out [a single directory separator was missing in the code](https://github.com/yuzu-emu/yuzu/pull/6709). +Now, screenshots will work correctly by either pressing the `Ctrl + P` hotkey, or via selecting the `Tools > Capture Screenshot…` menu option, and save in the selected folder. + +epicboy also [added support for taking screenshots in the Vulkan API](https://github.com/yuzu-emu/yuzu/pull/6720), solving an old issue from way back when +[Vulkan was first implemented](https://yuzu-emu.org/entry/yuzu-vulkan/) two years ago. How time flies... + +Finally, before being dragged against his will to work on Hades, epicboy was working on improving the performance of our compute shader accelerated ASTC decoder. +By reducing the size of the workgroup, making some code simplifications, moving some look up tables, and other changes, +[performance increased by 15% on average.](https://github.com/yuzu-emu/yuzu/pull/6791) +`Astral Chain` and similar titles that madly love ASTC should see more consistent frametimes with this change. + +Blinkhawk has also been working constantly lately, not only on Hades and several other improvements, but also in some top secret projects we will mention later. + +Koei Tecmo games are usually quite special, they never fail to give our developers headaches thanks to… unique decisions the studio makes. +It’s not an exaggeration to say that Project Hades’ main motivation was improving how these games run in yuzu. + +One of the remaining issues with `Hyrule Warriors: Age of Calamity`, `Fire Emblem: Three Houses`, and similar Koei games was instability caused by running them in High +GPU accuracy when loading specific levels. +In Blink’s own words, [a simple fix](https://github.com/yuzu-emu/yuzu/pull/6627), and the problem was solved. + +Another old regression introduced by the [Buffer Cache Rewrite](https://yuzu-emu.org/entry/yuzu-bcr/) affected particles in games like `The Legend of Zelda: Breath of the Wild`, the rendering of the BowWow in +`The Legend of Zelda: Link’s Awakening` and caused vertex explosions in Unreal Engine 4 games like `Yoshi’s Crafted World`, `BRAVELY DEFAULT 2` and similar. +[Tuning how to handle high downloads and not fully waiting for command buffers to finish](https://github.com/yuzu-emu/yuzu/pull/6557) solved these issues. +To make the best out of this change, High GPU accuracy needs to be enabled. + +{{< single-title-imgs + "High GPU Accuracy is recommended (The Legend of Zelda: Breath of the Wild)" + "./particlebug.mp4" + "./particlefix.mp4" + >}} + +When Blinkhawk introduced the new fence manager while working on improvements for `Asynchronous GPU Emulation` two years ago, some frame delays came with it, causing stuttering +in gameplay even if the framerate counter showed a solid 30 or 60 FPS value. +To counter this, Blink starts [pre-queueing frames](https://github.com/yuzu-emu/yuzu/pull/6787), providing a smooth gameplay experience, especially noticeable if the user's +hardware can’t sustain perfect performance constantly. + +{{< single-title-imgs + "Smooth as butter (Xenoblade Chronicles Definitive Edition)" + "./vsyncbug.mp4" + "./vsyncfix.mp4" + >}} + +Rodrigo has also been hitting those keycaps without rest. + +`Hyrule Warriors: Age of Calamity` suffered from very dark environments due to unprepared images that were used as render targets. When their dirty flags were not properly set, +a desynchronization happened on the texture cache, causing the issue shown below. +[By correctly preparing such images](https://github.com/yuzu-emu/yuzu/pull/6670), the game renders correctly. + +{{< single-title-imgs + "That looks like the Dark World to me (Hyrule Warriors: Age of Calamity)" + "./aocbug.png" + "./aocfix.png" + >}} + +By optimizing shaders doing [FMA](https://en.wikipedia.org/wiki/Multiply%E2%80%93accumulate_operation#Fused_multiply%E2%80%93add) operations, yuzu +[gains an extra 4% of performance](https://github.com/yuzu-emu/yuzu/pull/6722) overall. + +By [flipping the viewport](https://github.com/yuzu-emu/yuzu/pull/6765) in `Y_NEGATE`, Rodrigo matches in Vulkan the correct behaviour OpenGL has, resolving the "flipping" issues for the following games: +`Katana ZERO`, `UNDERTALE`, `DELTARUNE`, `Shantae`, `Fire Emblem: Shadow Dragon and the Blade of Light`, and others. + +{{< single-title-imgs + "Fire Emblem: Shadow Dragon and the Blade of Light" + "./flipbug.png" + "./flipfix.png" + >}} + +`Xenoblade Chronicles 2` experienced crashes with the Vulkan Mesa drivers due to them lacking null buffers in its transform feedback bindings. Rodrigo had to +[emulate the lack of this function](https://github.com/yuzu-emu/yuzu/pull/6580) in order to solve the crashing. + +AMD Radeon Linux users may have noticed that `The Legend of Zelda: Skyward Sword` would run at very slow framerates in stable versions of the OpenGL Mesa drivers. +This is caused by a driver level bottleneck resulting in very slow [PBO](https://www.khronos.org/opengl/wiki/Pixel_Buffer_Object) (Pixel Buffer Object) downloads. +While the current mesa-git has this bottleneck solved, a solution is needed until those fixes reach the stable release versions. +[By specifying the `GL_CLIENT_STORAGE_BIT` flag](https://github.com/yuzu-emu/yuzu/pull/6685), an alternative faster path can be used, increasing performance from around 8 FPS +to a solid 60 FPS. +Mesa drivers are the best drivers. + +[Morph](https://github.com/Morph1984) also contributed with some graphical fixes. + +`New Super Mario Bros. U Deluxe` provides video tutorials accessed via the web applet. Prior to his fix, trying to access that list would only result in the game returning to the +previous menu. +[By implementing how to handle Nintendo CDN URLs in the web applet](https://github.com/yuzu-emu/yuzu/pull/6641), this section of the game can now be accessed. + +{{< imgs + "./nsmbuvid.png| Video playback is still a work in progress (New Super Mario Bros. U Deluxe)" + >}} + +Morph also solved a quite specific render issue affecting users with multiple displays. +If two or more monitors were in use and the user started a game from any display besides the primary, black borders would appear in the rendering window. +To solve this, [Morph needed to tell Qt to create a dummy render widget.](https://github.com/yuzu-emu/yuzu/pull/6658) + +{{< single-title-imgs + "Sonic Mania, in proper pixelated format" + "./bordersbug.png" + "./bordersfix.png" + >}} + +Newcomer [yzct12345](https://github.com/yzct12345) arrived like a sonic boom, implementing critical improvements at impressive speeds! + +By [ignoring an invalid texture operation](https://github.com/yuzu-emu/yuzu/pull/6679), an early crash affecting `Pokémon: Let’s go, Eevee! & Pikachu!` in Vulkan was solved. +No more crashes when catching your first Pokémon. Gotta catch ’em all! + +[yzct12345’s work on optimizing UnswizzleTexture](https://github.com/yuzu-emu/yuzu/pull/6790) resulted in up to double the performance for video decoding, and it also improved +general gameplay! +This results in far smoother video playback and a considerable reduction of the CPU performance needed to get a pleasant gaming experience. Thanks! + +[toastUnlimited](https://github.com/lat9nq) is our specialist in Linux testing and bug reporting. +He noticed that the rune teleporting animation in `The Legend of Zelda: Breath of the Wild` wasn’t working correctly on the Iris and RadeonSI Mesa drivers, the default OpenGL +drivers for recent Intel and AMD GPUs, respectively. + +[Thanks to instructions the Mesa driver team gave us](https://gitlab.freedesktop.org/mesa/mesa/-/issues/3820#note_753371) in how to properly use BindImageTexture, +toastUnlimited was able to [implement the needed changes in yuzu](https://github.com/yuzu-emu/yuzu/pull/6570), making the animation render correctly. + +{{< single-title-imgs + "Well excuse me, Princess (The Legend of Zelda: Breath of the Wild)" + "./botwbug.png" + "./botwfix.png" + >}} + +[K0bin](https://github.com/K0bin) arrived to give us a hand, fixing an important screw up we made. + +Prior to the introduction of full support on Resizable BAR in modern GPUs and systems, the PCI-Express standard is limited to a buffer of 256MB in video memory to communicate +to the CPU at a time. +yuzu uses this small portion of VRAM for allocating its staging buffer, but if the user has GPU intensive background applications, there may not be enough space to allow the +allocation to happen, and yuzu would refuse to create a Vulkan instance, failing to boot any game. +OpenGL is, as usual, excluded from this issue thanks to letting the GPU driver handle those allocations on its own. + +K0bin fixes this issue by [performing the allocation in system RAM](https://github.com/yuzu-emu/yuzu/pull/6740) if there isn’t enough free space. Many thanks! + +## Stop This Sound! + +[Maide](https://github.com/Kelebek1) has been dedicated to improving the audio side of yuzu this month. +By [introducing some missing PCM formats](https://github.com/yuzu-emu/yuzu/pull/6564), the missing audio present in `Ys IX: Monstrum Nox` was finally fixed. + +`PCM` stands for [Pulse-Code Modulation](https://en.wikipedia.org/wiki/Pulse-code_modulation), an encoding technique used to represent analogue audio signals digitally. +These signals have two basic properties: The [sample rate](https://en.wikipedia.org/wiki/Sampling_(signal_processing)#Sampling_rate) (how many samples of the signal are taken +per second), and the [bit-depth](https://en.wikipedia.org/wiki/Audio_bit_depth) (how many bits are used to represent the "loudness" of the signal's samples at any given point +in time). + +In this PR, Maide introduced a number of methods to process formats that were missing in the current implementation — namely, the ability to decode PCM files encoded with a +bit-depth of 8-bit, 32-bit, and also floating-point values. +Since previously none of these formats were being decoded by yuzu, any audio file that made use of them was not being reproduced, causing this behaviour. + +`Tales of Vesperia` was another title with sound problems, in which audio would be played monaurally through the left channel — far from a pleasant experience, as you can hear +here: + +{{< audio "./vesperiabug.mp3" >}} + +This game in particular would request the available number of active channels and cap its output based on this information — in other words, the game would not output audio to +more channels than what yuzu reported. +Since yuzu was always returning a value of `1`, the game ended up outputting all the audio into the left channel. +Thus, this problem was fixed by [reporting two channels as active instead of one](https://github.com/yuzu-emu/yuzu/pull/6567), which is now mixed properly: + +{{< audio "./vesperiafix.mp3" >}} + +Not satisfied with just this, Maide also went on and [changed the downmixing logic](https://github.com/yuzu-emu/yuzu/pull/6569), which improved the audio in titles such as +`The Legend of Zelda: Link's Awakening`, `New Super Mario Bros. U`, `Disgaea 6: Defiance of Destiny`, and `Super Kirby Clash`. + +Simply put, downmixing refers to the process of combining multiple audio channels so it is possible to reproduce them in a system with a lower number of available audio +channels. +There is some mathematics involved here and there, but the general idea behind it is to balance the volume of these individual channels so that the resulting signal sounds +centred. + +In the case of the Nintendo Switch, many games report six audio channels as available to the system, even though they end up providing data for only two channels (stereo sound). +Consequently, yuzu would think the games used all these channels and then "downmix" them to stereo, affecting the volumes of the left and right channel in the process, which +would end up being much quieter than needed. +While the math used by yuzu is valid when used to downmix six channels to two, it certainly was not a desirable effect in this case. +Therefore, Maide changed the code to preserve the volume of these channels if the audio in a game is already stereo, which now reproduces with the correct levels. + +On the same page of volume problems, there was also a bug with the volume in certain areas of `Xenoblade Chronicles 2`, where it would occasionally spike out of proportion. +Maide tracked down the cause of this behaviour, and discovered that the gain of the samples sent by this game to yuzu had their values set as `NaN`. + +A [NaN](https://en.wikipedia.org/wiki/NaN) is a type of placeholder used by computers to represent numeric values that can't be defined otherwise — hence, the acronym +`N`ot `a` `N`umber. +Particularly, the problem at hand lies in the fact that, in order to operate over the samples of the audio signal, these gain values must be converted into integers. +But in this process, the `NaN` values, in turn, become obscenely large positive and negative integer values. + +As these samples were further processed by yuzu before sending them to your sound system, these gains would distort and cap the volume of the audio samples to their maximum or +minimum value, causing this bug. +To prevent this problem, Maide added a check that [changes the gain value from NaN to zero in such cases](https://github.com/yuzu-emu/yuzu/pull/6571), so that no error is +propagated along the mixing. + +This is mostly a workaround, as it still remains under investigation why the game is yielding these `NaN` values, but at the very least, it should help prevent a number of +bleeding ears here and there. + +## Input changes + +Along with some miscellaneous quality of life changes, [german77](https://github.com/german77) also changed the behaviour of recently enabled controllers in yuzu. +In order to provide the most precise experience, now [sticks will be auto-centred](https://github.com/yuzu-emu/yuzu/pull/6698) the moment the device is detected by yuzu. +Surprisingly, this happens with almost every game controller, sticks are always slightly off-centre, and if the dead zone value is small enough, users would experience slight drifting during gameplay. +No drift in this emulator! + +Thanks to internal changes on how settings are stored, the default values of mouse panning were affected. +german77 [restored the previous values](https://github.com/yuzu-emu/yuzu/pull/6659) and additionally solved an issue where the emulated stick would always look down if the user +had multiple screens. +No drift, not even with the mouse! + +# UI changes + +A silent change that has the potential to improve performance considerably for users of old or low-end CPUs has been made by toastUnlimited. +In the past, we recommended our users to manually select the `Unsafe` CPU accuracy option if their CPU lacked the FMA instruction set. This is not only confusing for users, +as it required them to know if their specific CPU model was compatible with FMA, but also relied on communication channels and guides properly explaining this to as many people +as possible. This, of course, resulted in several users not even knowing why games performed so poorly. + +Additionally, it was later discovered that using the whole Unsafe preset can cause precision issues affecting things like the shape of the character hitboxes in +`Super Smash Bros. Ultimate`. A better solution was needed. + +In response, toastUnlimited implemented [the all new `Auto` CPU accuracy setting!](https://github.com/yuzu-emu/yuzu/pull/6573) +Enabled by default for all users, this setting determines the need to use the `Unfuse FMA` value automatically by reading if the FMA instruction set is supported by the CPU +in +use. +It also sets other values, for example `Faster ASIMD instructions`, to boost the performance of 32-bit games. +Auto CPU accuracy has the potential to more than triple the performance of users running old or very low end CPUs! + +Thanks to work done by Morph, [now all default six Miis are available to the user](https://github.com/yuzu-emu/yuzu/pull/6556) in games that request them. + +{{< imgs + "./mii.png| We're still far away from offering full Mii customization, but at least more options are available now (Mario Kart 8 Deluxe)" + >}} + +[lioncash](https://github.com/lioncash), our silent optimizer and code cleaner, found an issue with the new strings that report if a game is 32 or 64-bit. +Languages that read from right to left had issues with the initial implementation, and translating this string was disabled. +[Now both issues are resolved!](https://github.com/yuzu-emu/yuzu/pull/6574) + +After gathering more information on the behaviour of the FPS unlimiter, epicboy discovered that some games will crash when attempting to boot them unlimited. +[Simply force-enabling the limiter at each game boot is enough to solve the issue.](https://github.com/yuzu-emu/yuzu/pull/6576) +Remember to unlock the framerate manually after you start a game! + +[vonchenplus](https://github.com/vonchenplus) is back with another nice addition! +Certain game dumps contain several games inside them, and yuzu would default to only launching the first one in the list. +[This change makes the necessary modifications so all games are properly listed.](https://github.com/yuzu-emu/yuzu/pull/6582) + +{{< imgs + "./games.png| " + >}} + +## Command-Line Shenanigans + +toastUnlimited performed a general [update to the settings of the command-line version of yuzu](https://github.com/yuzu-emu/yuzu/pull/6651), `yuzu-cmd`. + +The previous implementation had many options that were originally carried over from Citra and later deprecated, as well as others that were not read properly from the `ini` +file, or were read but not written into the `ini` file, etc. +In other words, there were a lot of things wrong with it, and some updating was in order to properly synchronize everything back with the settings present in the main +executable of yuzu. + +Since toastUnlimited was already working on `yuzu-cmd`, he also went on and [fixed some problems related to Vulkan on Linux](https://github.com/yuzu-emu/yuzu/pull/6652). +When this executable was launched, it wasn't able to detect the window manager, and would proceed to exit instead of booting a game. + +The cause behind this problem lies in the fact that we recently updated how the SDL external library is being fetched for our Linux binaries, which came with a dummy +configuration file with invalid settings. +toastUnlimited made it so that we manually include the correct generated configuration file for building SDL instead of this dummy, while also adding some new logging +information to report when support for a window manager was not compiled. + +In a follow-up PR, toastUnlimited also added [support for the full-screen mode settings](https://github.com/yuzu-emu/yuzu/pull/6693) to `yuzu-cmd`. +Concurrently, he also fixed a bug that caused yuzu to render with the wrong resolution when in full-screen. + +Some time ago, we made it possible for yuzu to run in different full-screen modes, but these options were never added to the command-line version of our executable, which is +addressed in this PR. + +## Technical Changes + +Meanwhile, [bunnei](https://github.com/bunnei) was busy [improving the management of kernel objects](https://github.com/yuzu-emu/yuzu/pull/6551), drastically reducing the +amount of objects that kept dangling in memory after closing the emulation session. + +A dangling object refers to a stale object in memory that still has references, even though the object is no longer in use. + +In yuzu, kernel objects are implemented so that they keep track of themselves through a [reference counter](https://en.wikipedia.org/wiki/Reference_counting), which keeps the +object alive for as long as they're needed. +In other words, whenever a process needs an object, the reference counter is increased, and conversely, the reference is decreased when the object isn't needed any more. + +Once this value reaches zero, the object is automatically deleted. +Previously, yuzu wasn't doing a great job at maintaining this reference counter, as these kernel objects can be called by more more than just one process — i.e. the "owners", +who are responsible for freeing the resource once they're done with it. +In some cases, some of these owners weren't properly freeing the object at all, which meant that the reference counter never reached zero, leaving this object "dangling" in +memory, even though the information became basically useless at this point. + +One of the many jobs of the kernel in the OS is to keep track of all the resources available in the system. +For this reason, these dangling objects were a problem, as the kernel calculates the number of resources that can be spawned based partly on the number of active objects in +memory. +With dozens of different kernel objects being created thousands of times between emulation sessions, this easily saturated the amount of objects that could be spawned due to yuzu hitting the resource limits much earlier than expected. +What's more, since these objects stick around even after the emulation session is closed, this is a memory leak that would gradually increase for as long as the emulator is running a game — in other words, it would persist even if you stopped the emulation and started it again. + +bunnei took a long look at the problem and improved the situation, but there's still ongoing work to make our implementation more robust and accurate. + +Blinkhawk also had his share of bug-fixing work, as he revisited the texture cache code related to [1D-to-2D texture overlaps](https://github.com/yuzu-emu/yuzu/pull/6553), which fixes problems in `Monster Hunter Rise` and both the the trial and final versions of `Monster Hunter Stories 2: Wings of Ruin`. + +Similarly to how two-dimensional textures are mapped to three dimensions, one-dimensional textures are a simple type of texture that is mapped as two-dimensional when rendered +on the screen. +The problem here lies in the fact that the GPU is unable to tell the difference between a one-dimensional texture and a two-dimensional texture with a height of one. + +As such, it was necessary to add support for them, so that they can be processed correctly by our texture cache. +With the changes in this PR, Blink made it so that they can be copied seamlessly, fixing this faulty behaviour. + +{{< single-title-imgs + "From Zero to Hero (MONSTER HUNTER STORIES 2: WINGS OF RUIN Trial Version)" + "./1d2dbug.png" + "./1d2dfix.png" + >}} + +If you're interested in a more technical explanation about textures and their types, we recommend reading +[the D3D11 documentation provided by Microsoft](https://docs.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-resources-textures-intro). + +## Future projects + +`Project A.R.T.`, the designated name for our revival of the resolution scaler, has started, and early results look very promising! + +{{< imgs + "./art.png| Getting blue-shelled at 4K doesn't really help with anger management (Mario Kart 8 Deluxe)" + >}} + +There are many bugs to fix, optimizations to make, and tons of testing to do before we can confidently release this feature. +So for now, know that the scaler is returning! + +toastUnlimited [started the preliminary work to get an operational Linux installer](https://github.com/yuzu-emu/yuzu/pull/6667) to accompany our current Windows one. +This also means offering precompiled builds for both Mainline and Early Access. +Once it is finished, Linux users will no longer need to be forced to build from the source (if they so prefer)! + +That’s all folks! As a certain AI singer would say, thank you for your kind attention. See you next time! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-jul-2021/mii.png b/site/content/entry/yuzu-progress-report-jul-2021/mii.png new file mode 100644 index 000000000..4613c422f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/mii.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/nsmbuvid.png b/site/content/entry/yuzu-progress-report-jul-2021/nsmbuvid.png new file mode 100644 index 000000000..5e46de0ec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/nsmbuvid.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/particlebug.mp4 b/site/content/entry/yuzu-progress-report-jul-2021/particlebug.mp4 new file mode 100644 index 000000000..c581b0c7e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/particlebug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/particlefix.mp4 b/site/content/entry/yuzu-progress-report-jul-2021/particlefix.mp4 new file mode 100644 index 000000000..662d621a5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/particlefix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/perf.png b/site/content/entry/yuzu-progress-report-jul-2021/perf.png new file mode 100644 index 000000000..ddf020ab7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/perf.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/perf_ea_vs_hades_ea.png b/site/content/entry/yuzu-progress-report-jul-2021/perf_ea_vs_hades_ea.png new file mode 100644 index 000000000..36730a7e9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/perf_ea_vs_hades_ea.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/sm3dw.png b/site/content/entry/yuzu-progress-report-jul-2021/sm3dw.png new file mode 100644 index 000000000..6bf282b30 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/sm3dw.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/statusbar.png b/site/content/entry/yuzu-progress-report-jul-2021/statusbar.png new file mode 100644 index 000000000..eda83dc79 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/statusbar.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/summary.png b/site/content/entry/yuzu-progress-report-jul-2021/summary.png new file mode 100644 index 000000000..406a56fe4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/vesperiabug.mp3 b/site/content/entry/yuzu-progress-report-jul-2021/vesperiabug.mp3 new file mode 100644 index 000000000..69d9d5377 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/vesperiabug.mp3 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/vesperiafix.mp3 b/site/content/entry/yuzu-progress-report-jul-2021/vesperiafix.mp3 new file mode 100644 index 000000000..d09216370 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/vesperiafix.mp3 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/vortex.png b/site/content/entry/yuzu-progress-report-jul-2021/vortex.png new file mode 100644 index 000000000..2db8a6c08 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/vortex.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/vsyncbug.mp4 b/site/content/entry/yuzu-progress-report-jul-2021/vsyncbug.mp4 new file mode 100644 index 000000000..4bae25a20 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/vsyncbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/vsyncfix.mp4 b/site/content/entry/yuzu-progress-report-jul-2021/vsyncfix.mp4 new file mode 100644 index 000000000..b6fe0b45c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/vsyncfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2021/vulkan.mp4 b/site/content/entry/yuzu-progress-report-jul-2021/vulkan.mp4 new file mode 100644 index 000000000..1eebb240a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2021/vulkan.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/3hopes.png b/site/content/entry/yuzu-progress-report-jul-2022/3hopes.png new file mode 100644 index 000000000..98aadc88b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/3hopes.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/aoc.mp4 b/site/content/entry/yuzu-progress-report-jul-2022/aoc.mp4 new file mode 100644 index 000000000..8fe5e0bbe Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/aoc.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/aocbug.mp4 b/site/content/entry/yuzu-progress-report-jul-2022/aocbug.mp4 new file mode 100644 index 000000000..b3e027369 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/aocbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/audiobug.mp3 b/site/content/entry/yuzu-progress-report-jul-2022/audiobug.mp3 new file mode 100644 index 000000000..feb2a8af6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/audiobug.mp3 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/audiofix.mp3 b/site/content/entry/yuzu-progress-report-jul-2022/audiofix.mp3 new file mode 100644 index 000000000..0f36c6b8e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/audiofix.mp3 differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/banner.png b/site/content/entry/yuzu-progress-report-jul-2022/banner.png new file mode 100644 index 000000000..8f56fe6ea Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/botw.png b/site/content/entry/yuzu-progress-report-jul-2022/botw.png new file mode 100644 index 000000000..af10885f2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/botw.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/camera.png b/site/content/entry/yuzu-progress-report-jul-2022/camera.png new file mode 100644 index 000000000..a94578791 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/camera.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/dock.png b/site/content/entry/yuzu-progress-report-jul-2022/dock.png new file mode 100644 index 000000000..0b1240185 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/dock.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/feth.png b/site/content/entry/yuzu-progress-report-jul-2022/feth.png new file mode 100644 index 000000000..ac79212a4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/feth.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/few3h.png b/site/content/entry/yuzu-progress-report-jul-2022/few3h.png new file mode 100644 index 000000000..36be81017 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/few3h.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/flathub.png b/site/content/entry/yuzu-progress-report-jul-2022/flathub.png new file mode 100644 index 000000000..f492b21f6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/flathub.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/ftnew.png b/site/content/entry/yuzu-progress-report-jul-2022/ftnew.png new file mode 100644 index 000000000..6b84f4ff9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/ftnew.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/ftold.png b/site/content/entry/yuzu-progress-report-jul-2022/ftold.png new file mode 100644 index 000000000..67a9d15ad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/ftold.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/golf.png b/site/content/entry/yuzu-progress-report-jul-2022/golf.png new file mode 100644 index 000000000..cbaf530d1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/golf.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/hades.png b/site/content/entry/yuzu-progress-report-jul-2022/hades.png new file mode 100644 index 000000000..78c6604a3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/hades.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/index.md b/site/content/entry/yuzu-progress-report-jul-2022/index.md new file mode 100644 index 000000000..bbceefc11 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jul-2022/index.md @@ -0,0 +1,480 @@ ++++ +date = "2022-08-15T12:00:00-03:00" +title = "Progress Report July 2022" +author = "GoldenX86" +forum = 614640 ++++ + +Hello yuz-ers, what a month we've had! Great graphical changes, an amazing audio rewrite, preliminary work on LDN support, testing new OpenGL drivers, and plenty of fixes! Continue reading to find out more. + + + +## Part 1 of Project Y.F.C. + +Since we’ve been teasing you for months (and we will continue to do so) in previous articles, you know [Blinkhawk](https://github.com/FernandoS27) has been working on {{< gh-hovercard "8467" "a bunch of miscellaneous GPU related fixes and performance improvements." >}} +While we will have more information in a dedicated article in the near future, please enjoy the following brief overview. + +As the scope of the project grew, the team decided to split it in two parts, with the released first part focusing more on game fixes and improving accuracy. +While that doesn’t mean part 1 doesn’t already improve performance, part 2 will focus exclusively on it. + +{{< single-title-imgs + "Becoming playable! (Hades & Mario Golf: Super Rush)" + "./hades.png" + "./golf.png" + >}} + +This story started [many moons ago](https://www.youtube.com/watch?v=6IXecLOXWR4). +The awesome devs working on [Skyline Emulator](https://github.com/skyline-emu/skyline) finished implementing their `NVDRV` service (NVIDIA Driver service) and they offered it to us, as it is much more accurate than our old implementation. + +{{< single-title-imgs-compare + "YO-KAI WATCH 4, before and after" + "./yokaibug.png" + "./yokaifix.png" +>}} + +The implemented changes in part 1 of Project Y.F.C. include: + + * Full rework of the GPU driver, based on the reverse-engineering and code from Skyline Emulator with full permission from the respective team. + * Full rework of GPU memory management. + * Initial implementation of GPU Channels, fixing `Super Smash Bros. Ultimate` “World of Light” mode, `Deltarune`, and several other games. + * Bug fixes and performance improvements to the GPU DMA engine. + * Several fixes for Vulkan, the GPU Buffer Cache, and the Shader Decompiler, all of which affect multiple games. + * Reworked host frame presentation to be considerably smoother (improves `Xenoblade Chronicles` games). + +{{< single-title-imgs + "The World of Light single-player mode is now playable! (Super Smash Bros. Ultimate)" + "./wol.png" + "./wol2.png" + >}} + +A large list of critical changes like this, sadly, brings regressions with it. +We’re working to resolve these regressions, but Blinkhawk is busy with IRL things, so expect a delay to see these changes implemented into Mainline while we sort things out and pave the way for part 2. +(Remember: you can check the hovercard or the PR itself to see its merge status!) + +{{< single-title-imgs + "Not all games are in perfect shape... yet! (The Witcher 3: Wild Hunt)" + "./witcher.png" + "./plaid.png" + >}} + +## Project Andio + +Not a name we've mentioned before, right? Well, it was a surprise for us as well! +[Maide](https://github.com/Kelebek1) is behind this wonderful gift: {{< gh-hovercard "8545" "an almost complete rewrite of yuzu’s audio engine." >}} + +The main driving force behind this project was to resolve the multi-year old issues that have accumulated thanks to our very old initial audio implementation. +yuzu was missing many playback features, such as audio effects. But the old code was too hard to maintain, making it impossible to keep up with the Switch's updates over the years. + +Here is a before and after of `Metroid Dread` while underwater. You can notice the effects missing in the first recording, as if Samus was just out in the open. + +{{< audio "./audiobug.mp3" >}} + +{{< audio "./audiofix.mp3" >}} + + +Cleaner code allows developers to more easily stay up to date (the current implementation uses the changes introduced in firmware version 14.0.0), and should help introduce changes found by reverse engineering in the future. + +The list of fixes is so large, it’s practically countless. +While over 15 official issues were fixed, it’s impossible to know how many undocumented issues have been resolved. + +We plan to have a dedicated article for Andio in the near future where we will dig deeper into the changes introduced. + +All users can enjoy the benefits of Project Andio, available in both Mainline and Early Access! + +## Preliminary work on Project London + +Yes, [bunnei](https://github.com/bunnei), it’s London. + +For those that didn’t catch on to the name, Project **L**on**d**o**n** is our work to get LDN (Local Wireless) support into yuzu, including hosted rooms for online connectivity. + +{{< gh-hovercard "8541" "Such rooms, and their corresponding user interface," >}} are what [Tobi](https://github.com/yuzu-emu/yuzu/pull/8541) has been working on. + +{{< imgs + "./lobby.png| Multiplayer rooms can be created, with chat functionality." + >}} + +The implementation is based on [Citra](https://citra-emu.org/), and while it’s already perfectly functional, it won’t be available for users until the network backend is ready. + +{{< imgs + "./puyo.png| How's SEGA nowdays? (Puyo Puyo Tetris)" + >}} + +Thankfully, as you can see above, internal testing has been positive under ideal conditions, so the “only” remaining work is tweaking and bug fixing. +If only it were that simple… + +An online service like this requires the transfer of network packets, so [ENet](http://enet.bespin.org/) is added as a dependency. + +Stay tuned for future improvements on this work in progress! + +## Core timing, or how to suffer so much with a fix + +It has been an eventful month for a long-maligned corner of the yuzu codebase, generally referred to in hushed tones among developers as CoreTiming. CoreTiming may be the cause of many timing-related emulation issues in yuzu. + +While reviewing Project Andio, Blinkhawk noted that one of his longstanding open pull requests, which implemented a more precise version of CoreTiming, fixed some audio corruption regressions in emulated games, and even fixed some games that were previously having issues with freezing, such as `Mario Strikers: Battle League`. +With the new audio code being almost ready to go at that point, the team decided to get this pull request rebased and merged so we could have a new audio system without any regressions. +The new CoreTiming implementation would use multiple host threads to wait for events, and should have been much better in theory. + +However, it didn't fix everything. +Maide found that there were still some lingering issues with audio callbacks not looping as precisely as they needed to. +In yuzu, looping events previously used CoreTiming to reschedule themselves for an exact number of milliseconds after their execution, instead of when they were intended to be executed. +This caused significant drifting and issues with the new audio renderer. +The usual victims were the most affected, users running CPUs with only 4 threads. + +To fix this, Maide {{< gh-hovercard "8561" "reworked the way looping events were handled." >}} +Now, CoreTiming automatically computes the correct time to reschedule a looping event, making the implementation significantly more precise for those types of events. +With the change to looping events in, and noticing that the other changes Blinkhawk had added were causing serious regressions, the team opted to {{< gh-hovercard "8531" "remove the multi-threaded host CoreTiming implementation," >}} and then {{< gh-hovercard "8591" "most of Blinkhawk's new implementation entirely," >}} as it was still causing serious performance problems for a subset of users. + +But that wasn't all that changed for timing this month. +Intel Alder Lake (Gen. 12) CPU users on Windows have long been reporting noticeable clock drift in `Super Smash Bros. Ultimate`, but it got a lot worse since the NVNFlinger rewrite a few months ago. +As previously reported, the resident bunnei rabbit mostly fixed this issue in {{< gh-hovercard "8428" "a follow-up pull request" >}} which restored the (inaccurate) behaviour of the old implementation, and the clock drift issue improved significantly for those users. + +Maide, not content to just improve audio, discovered that {{< gh-hovercard "8650" "the way yuzu's NVNFlinger implementation was waiting on buffers would drift," >}} due to the same problem that was previously fixed in CoreTiming! +Instead of reimplementing the fix here as well, he modified NVNFlinger to use a timing callback, which fixed the drifting issues in SSBU, and also resolved many longstanding issues with frametime inconsistency. +This also provides a significant performance boost in many games due to keeping the frametime presentation consistent, and allows `Fire Emblem Warriors: Three Hopes` to be playable. + +{{< imgs + "./ftold.png| Jumpy, visible stuttering" + >}} + +{{< imgs + "./ftnew.png| Flat, smooth as silk" + >}} + +{{< single-title-imgs + "Time to smash those attack buttons (Fire Emblem Warriors: Three Hopes)" + "./few3h.png" + "./3hopes.png" + >}} + +Finally, [BreadFish64](https://github.com/BreadFish64) {{< gh-hovercard "8543" "implemented a way to read the exact TSC frequency of the host CPU." >}} +The `TSC` (timestamp counter) is a high precision timer measuring the number of base clock ticks performed by an Intel or AMD processor since boot. +CoreTiming uses this value to emulate the ARM physical count register, which performs a similar role as the `TSC` for ARM devices, like the Switch. +Getting the exact `TSC` frequency, as opposed to just estimating it, allows CoreTiming to avoid drifting due to mismatch between the host frequency, which depends on your CPU and the guest clock frequency, which is fixed to 19.2MHz. + +More precision and faster boot times are never a bad thing! + +## Kernel changes + +While using the new debugger on games and homebrew, [comex](https://github.com/comex) spotted an issue causing yuzu to miss breakpoints in code that had already been run, or hit breakpoints which had already been deleted. +[Merry](https://github.com/merryhime) investigated and discovered an inaccuracy in [Dynarmic's](https://github.com/merryhime/dynarmic) caching of code blocks. +{{< gh-hovercard "8571" "Fixing the cache clearing and calculating block hashes correctly" >}} fixes the issues with breakpoints being hit. + +comex also observed an issue with watchpoints, where resuming execution after breaking on a watchpoint would seemingly fail to resume with the correct state. +[byte[]](https://github.com/liamwhite) investigated the issue and found that it happened when Dynarmic failed to update the PC register inside watchpoint callbacks. +Merry fixed this issue again by {{< gh-hovercard "8569" "completely rewriting Dynarmic's support for watchpoints," >}} now breaking immediately when necessary and avoiding almost all of the performance penalty of enabling watchpoints. Nice! + +byte[] has also been hard at work fixing various kernel issues and inconsistencies throughout June, and this month is no exception. +This time around, while searching for the source of a mysterious freezing bug in `Super Mario Galaxy`, he rewrote the entire scheduler and brought it in line with the current state of the art in reverse engineering of the Switch kernel. +This fixed issues in a number of games, but most notably fixed the freezing issues users had in `Mario Strikers: Battle League` (once you use an [intro-skipping mod](https://github.com/piplup55/switch-mods/blob/master/mario%20strike%20battle%20league/cutscene%20skip.7z?raw=true)), and allowed `Mononoke Slashdown` to boot for the first time. + +{{< imgs + "./strikers.png| Some graphical bugs are expected for now (Mario Strikers: Battle League)" + >}} + +{{< imgs + "./mononoke.png| Mononoke Slashdown" + >}} + +While preparing the new scheduler for release, byte[] also noticed an inefficiency in the way guest threads were being emulated. To fix it, he changed the {{< gh-hovercard "8532" "process of starting fibers" >}} to use support for C++ language features, and significantly simplified the implementation. + +## GPU changes + +Last month, [Behunin](https://github.com/behunin) contributed a new GPU queue implementation intended to improve the performance of submission handling from the emulated game. +Some time after this, freezing issues in `Fire Emblem: Three Houses` started cropping up. +After a long trail of hunting, byte[] thought the issue had been found and fixed by pull requests [#8483](https://github.com/yuzu-emu/yuzu/pull/8483) and [#8538](https://github.com/yuzu-emu/yuzu/pull/8538), but more careful debugging revealed that the cause of the freeze was unfortunately from the new GPU queue implementation! +[Morph](https://github.com/Morph1984) stepped up and {{< gh-hovercard "8542" "reverted the use of the new queue implementation," >}} finally fixing the issue, at least for now. + +{{< imgs + "./feth.png| Don't ask (Fire Emblem: Three Houses)" + >}} + +`Xenoblade Chronicles 3`, one of the most anticipated Switch releases in a while, released, and to the dismay of the yuzu community, would crash on boot when using Vulkan. +Due to differences in time zones, Maide was our first developer to lay hands on the new game, with byte[] lagging behind. +Maide found that there were some Vulkan shaders that crashed the GPU driver when they were compiled. yuzu is different from most Vulkan programs, and it directly generates shaders in binary format to respond to the needs of the game's shaders, which can cause problems when the way yuzu translates a shader is different from the way a GLSL compiler would translate it. +byte[] quickly helped Maide identify the sources of these shader compilation crashes and, together, fixed both `FSwizzleAdd` and `ConvertDepthMode`, {{< gh-hovercard "8667" "allowing users to run the game in Vulkan." >}} + +{{< single-title-imgs + "Thank you Night for the amazing pics! (Xenoblade Chronicles 3)" + "./xc31.png" + "./xc32.png" + "./xc33.png" + "./xc34.png" + "./xc3.png" + >}} + +We’re aware that AMD Radeon GPUs running on Windows still experience crashes with Vulkan at boot. This is because those drivers lack support for the `VK_FORMAT_R16G16B16_SFLOAT` texture format. +We implemented an alternative path emulating this format with a similar one to solve this issue. +We’ll cover it more deeply in the next progress report, along with several other bugfixes for this amazing game. + +Another of the various issues affecting this new release is an absurd level of memory usage when running in OpenGL. +yuzu, in the past, cleaned shader sources after dealing with the shader. +Now, for some reason, this game manages to skip that check. +In order to improve the ridiculous memory usage, byte[] {{< gh-hovercard "8684" "implemented" >}} `glDetachShader`, a more “official” way to achieve the same result. +While this doesn’t solve the issue entirely, testing shows a 5GB reduction in RAM usage from just a single code line addition. + +Let’s stay on the subject of GPU emulation for a bit longer. +In a past Progress Report, we explained how [toastUnlimited](https://github.com/lat9nq) [implemented a status check system](https://yuzu-emu.org/entry/yuzu-progress-report-may-2022/#vulkan-by-default) to ensure good Vulkan compatibility when opening yuzu for the first time. + +The original implementation worked by running a small Vulkan instance at boot, detecting if it crashed, and saving the result in the configuration file. +On the next boot after the crash, yuzu informs the user and locks itself to only offer OpenGL. +This required two boots to get the whole picture, and a manual intervention by the user was needed to re-enable Vulkan as an option, pressing a button in yuzu’s configuration. + +{{< gh-hovercard "8564" "This new approach" >}} uses a child process that is only tasked with starting the Vulkan loader. +If the child process crashes, the parent process marks the currently running instance of yuzu as not being Vulkan compatible. +This has the benefit of only having to run yuzu once to detect the current status. +If the user solves the issue (updating the drivers or any Vulkan layer application causing issues), only restarting yuzu is needed as nothing is changed in the configuration files now. + +This change helps users identify issues and stop potential crashes, but the general recommendations still apply: manually update your GPU drivers (never trust Windows Update), and keep any application that runs an overlay or records the screen updated to their latest version. + +Moving on to more specific game fixes not related to GOAT `Xenoblade Chronicles 3`, our resident Kirby clone, Morph, {{< gh-hovercard "8528" "implemented a texture format" >}} `MONSTER HUNTER RISE` has been asking for: `ASTC_10x6_UNORM`. +That’s right, another `ASTC` format. Your GPU will hate you while decoding it. + +This doesn’t solve the rendering bugs we face with this game, but it makes things look a bit better! + +{{< imgs + "./mhr.png| Rise ye Tarnished! Wait, wrong game (MONSTER HUNTER RISE)" + >}} + +## Linux Flatpak (Discover) and AppImage fixes + +While Flatpak is not the recommended way for our users to enjoy their favourite Switch titles on Linux, due to lower performance and some missing desktop integration features, it is a great option for many Linux users who have Flatpak installed by default and want a low-friction way to get access to yuzu. +It has been the preferred choice by Steam Deck users since its release. +As the reports from users rolled in, the team fixed some notable Flatpak-exclusive regressions this month. + +But why were these issues Flatpak-exclusive, and not found in the regular Linux AppImage builds? +Flatpak enables extra checks in the C++ standard library, which are aimed to catch buffer overflow errors before they happen, intending to help with debugging. +Unfortunately, if a check fails, it causes yuzu to instantly crash, which makes it more difficult to debug the issue from yuzu's log files alone. + +The switch to Vulkan by default caused games which used any CPU-based rendering to crash. +If a game wants to render an image to the screen from the CPU, instead of the GPU, it will first convert the image into an optimized layout that the Switch GPU understands, and then ask the GPU to render the optimized image. +To deal with this, yuzu undoes this layout conversion and uploads the data to the host GPU for presentation. +byte[] discovered that due to the size of the optimized layout and the unoptimized layout being different, a subspan used in unoptimizing the layout would overflow and cause the check to fail. +The fix was simple: just {{< gh-hovercard "8611" "use the optimized size for the converted layer," >}} since it would always be larger. + +{{< imgs + "./wetbear.png| Thanks Wetbear for the pic!" + >}} + +It wouldn't be a proper yuzu pull request without a seemingly unrelated regression. +`Pokémon: Let's Go, Pikachu!/Eevee!` had a strange performance regression caused by byte[]'s previous change, where the framerate when attempting to play with Pikachu or Eevee would drop to approximately 7 frames per second. +byte[] investigated it and found that using the larger size caused the process of re-optimizing a frame for the game to read back to be much slower, since it was now dealing with a much larger image. +He then fixed it by {{< gh-hovercard "8658" "using different sizes for the optimized and unoptimized images," >}} finally putting these foolish performance issues to rest. + +Project Andio introduced a few new regressions in the Flatpak builds as well. +One of these was fixed in the pull request itself before it was merged. + +When decoding buffers which were input from the emulated game, it was possible for a span operation to overflow. +Maide fixed this by being more careful about handling the sample buffers when decoding input. +From user reports, there were still crashes, and Maide found an issue with {{< gh-hovercard "8657" "the `DepopPrepare` command, causing another overflowing span." >}} +Fixing this finally allowed users to enjoy the Flatpak builds once more. +Flatpak Linux users rejoice! + +{{< imgs + "./flathub.png| Simple and convenient" + >}} + +Flatpak isn't the only one to get a piece of the cake, AppImage receives some love too! + +Vulkan detection is not only a Windows issue, it can also happen in [free land](https://www.linuxfoundation.org/). +toastUnlimited found out that the `libQt5Multimedia` library causes issues with Vulkan in AppImage builds. +Since the library is used, {{< gh-hovercard "8642" "excluding `libwayland-client`" >}} is the workaround in place for now. +We’ll evaluate the user response we get from this change and consider keeping it or removing `libQt5Multimedia` altogether. + +[Docteh](https://github.com/Docteh) started working on {{< gh-hovercard "8625" "improving the environment variables" >}} used in our build process to give AppImages a proper title bar. +Once this work is finished, the title bar should look identical to Windows builds. + +## Input improvements + +A unique feature of the Nintendo Switch is the capability to use infrared cameras installed in the right Joy-Con. +The main function of the cameras is to detect shapes and measure the distance to objects, but it can also be used to transmit a feed to a screen, letting you turn your Joy-Con into a heat-seeking monstrosity. [Fox-2](https://en.wikipedia.org/wiki/Fox_(code_word))! + +Interested in adding this awesome feature to yuzu, and providing full support for games like `Game Builder Garage` or the `Nintendo Labo` collection, [german77](https://github.com/german77) {{< gh-hovercard "8636" "emulated the clustering processor" >}} required to let the games access the camera on the Joy-Cons or any camera the user wants to provide, even if it is a desktop capture obtained from OBS Studio. + +{{< imgs + "./ir.png| While this looks like a homebrew app, it's in fact the real IR interface Nintendo provides for its games" + >}} + +Users wanting to play with this setting can find it in `Emulation > Configure… > Controls > Advanced tab > Infrared Camera`. + +{{< imgs + "./camera.png| What a sleek little menu" + >}} + +This work doesn’t include the moment processor required by `1-2-Switch!` just yet. + +Steam Deck users reported having issues when using external controllers, but not while using the integrated Deck controls. +toastUnlimited hopped onto the issue and found that the reason is the included prerelease [SDL2](https://www.libsdl.org/) version we’ve been using. +{{< gh-hovercard "8607" "Reverting to a slightly older version" >}} solved the issue. + +A recent and very interesting community effort is to focus on adding online functionality to single player games, allowing for fun co-op opportunities not possible in the original game. +`Super Mario Odyssey` recently received a [mod that allows for this online functionality](https://github.com/CraftyBoss/SuperMarioOdysseyOnline), and the one thing keeping yuzu from supporting it was the on-screen keyboard lacking a way to input an IP address! +Luckily, Morph was on the case and {{< gh-hovercard "8633" "implemented the necessary symbols" >}} to input the required IPv4 addresses by the online mod. + +{{< imgs + "./smoo.png| Up to 10 people at once! (Super Mario Odyssey)" + >}} + +[Link4565](https://github.com/Link4565) {{< gh-hovercard "8598" "implemented some required fixes" >}} in yuzu’s network services to improve compatibility with this awesome mod. +Thank you very much! + +Have fun ruining Bowser’s wedding! + +## UI changes + +A small regression from the [input rewrite](https://yuzu-emu.org/entry/yuzu-progress-report-nov-2021/#project-kraken) revealed itself just now. +The WebApplet’s input bit was assumed incorrectly, causing user input to be completely ignored. +Thankfully, Morph {{< gh-hovercard "8536" "found the reason" >}} and implemented the fix. + +Last month, Docteh [renamed](https://yuzu-emu.org/entry/yuzu-progress-report-jun-2022/#ui-changes) the status bar’s DOCKED status (redundancy, yeah!). +For consistency, [this dumb writer](https://github.com/goldenx86) decided to {{< gh-hovercard "8610" "do the same for the Controls configuration window," >}} for consistency. + +{{< imgs + "./dock.png| Boring change, who is responsible for this?" + >}} + +Sometimes something "functioning as designed" can look stalled from the user’s point of view due to how the UX (user experience) is presented, ask any new Linux user for example. +In this case, when loading an application, the shader progress bar at boot would appear stuck if a game was started with no previous pipeline cache or if a homebrew was booted. +Since this leads to confusion, byte[] decided that {{< gh-hovercard "8622" "it’s better to reset the status bar" >}} than let it remain stuck until the program finishes loading. +As said before, the devil is in the details. + +One of the available configurable hotkey options in `Emulation > Configure… > General > Hotkeys` is `Audio Volume Up/Down`. +Users have requested to tune the curve in how volume is changed so that it’s more sensitive at lower values. +Human hearing senses volume logarithmically instead of linearly, so it makes perfect sense. +german77 {{< gh-hovercard "8656" "added incremental steps" >}} the closer you are to 0% volume as a way to better copy how our flesh and bone bodies perceive the world. + +## General bugfixes and improvements + +A beautiful feature of tightly integrated systems is their wonderful control over suspend and resume, and the Steam Deck is no exception. +If you've ever experienced issues with suspend and resume, you know what I mean. +Experienced developer [devsnek](https://github.com/devsnek) wants to help yuzu take advantage of this feature over the course of three {{< gh-hovercard "8585" "different" >}} {{< gh-hovercard "8592" "pull requests." >}} +This includes {{< gh-hovercard "8581" "emulating the actual suspend/resume mechanic of the Switch," >}} as some games make use of it as one of their gameplay features. +With these changes, users can suspend their games by simply pressing the power button of the Deck, exactly like on a Switch. + +For those of us living in remote places, suffering from terrible ISPs, or both (FML), we have fantastic news! +toastUnlimited reduced the size of each yuzu download by around 24MB by {{< gh-hovercard "8686" "only including what specifically belongs to yuzu" >}} in its source. +Those interested in building the bundled source that comes with the installer must now run `git submodule update --init --recursive` in order to be able to compile the project. + +## Hardware section + +This is a new section to communicate and discuss new relevant bugs, fixes, and findings related to specific hardware that can affect the user experience within yuzu. + +#### NVIDIA, missing the perfection that 472.12 was + +[We mentioned last month](https://yuzu-emu.org/entry/yuzu-progress-report-jun-2022/#psa-for-amd-radeon-users-and-nvidia-tags-along) how the 516 series of drivers is detrimental to Maxwell and Pascal users, making Vulkan unstable. +We’re still debugging the issue, as it isn’t easy to catch, but a possible cause is suspected: GPU accelerated `ASTC` texture decoding. +If you own a Maxwell or Pascal GPU, must remain on the latest driver update, and want to test if you can make Vulkan stable again, try disabling `Accelerate ASTC Texture Decoding` in `Emulation > Configure… > Graphics`. +Please report your results on our [forums](https://community.citra-emu.org/c/yuzu-support/14) or [Discord server](https://discord.gg/u77vRWY). + +Another known issue caused by the 516 series of drivers is some funny flickering on trees in KOEI TECMO games like `Hyrule Warriors: Age of Calamity`. + +{{< single-title-imgs + "Day time party! NVIDIA Vulkan Left: 516.94 & Right: 512.95 (Hyrule Warriors: Age of Calamity)" + "./aocbug.mp4" + "./aoc.mp4" + >}} + +These issues could either be regressions or undocumented behaviour changes, possibly caused after following the API specification more rigorously. + +There are also performance related issues affecting users with G-SYNC/FreeSync displays, causing low framerates (usually games get stuck at 24-30 FPS). +We have a few ways to bypass this issue: + +1. Unfocus and refocus yuzu’s window each time you boot a game. +2. In yuzu, disable `View > Single Window Mode`. +3. Enable `Exclusive Fullscreen` from `Emulation > Configure.. > Graphics > Fullscreen Mode`. Then just play your games in fullscreen by pressing F11. + +The root of the problem is caused by some bad combination of running a Qt window inside another window, and NVIDIA’s way of detecting the framerate of windowed applications. +Removing any of the two factors solves the low framerate while still taking advantage of Variable Refresh Rate. + +#### AMD OpenGL, 25 years in the making + +Hell froze over, pigs learned to fly, and starting with the Windows driver version 22.7.1, AMD introduced a completely new OpenGL driver, making Radeon cards on Windows viable options to use both APIs, not just cool kid Vulkan. +Performance is close to 100% higher, or more in some titles, and many rendering bugs are fixed. +But why write about it, let the numbers do the talking: + +{{< imgs + "./perf.png| Thank you RodrigoTR!" + >}} + +Wow! That's a lot of numbers, let's try to make it easier to digest: + +{{< single-title-imgs + "Thanks toastUnlimited!" + "./xc2.png" + "./botw.png" + "./smo.png" + "./psw.png" + "./pla.png" + "./md.png" + "./mk8.png" + >}} + +We're not experts in the benchmarking area, so hopefully the above graphs help. + +Above are results of an RX 6600 and a GTX 1660 SUPER running a few games in OpenGL and Vulkan. +22.6.1 represents the old infamous OpenGL driver, 22.7.1 is of course the new driver. Linux is represented by Mesa 22.1.3 running radeonsi with the amdgpu kernel module for OpenGL, and RADV for Vulkan. NVIDIA is running its latest (at the time of writing) Windows driver. +Remaining relevant hardware used is a 5600X and 16GB of RAM at 3600MHz. The RX 6600 was running at PCIe 4.0 8x with Smart Access Memory enabled, although that won’t make a difference, more on that later. +Operating systems used are Windows 11 and Manjaro Linux, both up to date and on their respective default stable branches. +yuzu is on Mainline 1112, with GPU accuracy set to normal to make GPU driver bottlenecks easier to measure, 1X resolution multiplier, and Default value for Anisotropic Filtering. + +A single regression under investigation and reported to AMD aside (`Xenoblade Chronicles 2` crashes loading Abble’s Fountain, the measuring spot, could be caused by some driver thread crash), performance is now very close to Vulkan numbers, be it either from AMD or NVIDIA. + +It’s now perfectly valid for a Radeon user to switch to OpenGL if a specific game requires it, like for example with `Xenoblade Chronicles 3`, or a Unity/Unreal Engine based game (`SHIN MEGAMI TENSEI V`). +As a bonus, while not being very stable, the SPIR-V shader back-end can be used on games with “simple” shaders like `Super Smash Bros. Ultimate` or `Super Mario Odyssey`, making shader building much more tolerable when compared to GLSL, giving it a performance much closer to the Nvidia-only GLASM. + +Another lesson learned from this is that some games, like `Legend of Zelda: Breath of the Wild`, just outright prefer NVIDIA's mature OpenGL driver. Ara ara. + +Lastly, to end this Red Team section. +[In the past](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2022/#vulkan-is-the-future), we reported a way to defeat RDNA2’s overcorrecting power manager in order to get decent framerates. +This method, while simple, has a downside: It’s an overclock. +Or at least counts as one. + +We found an alternative that should be more globally applicable. +The trick this time is to make the driver force high clocks on a more important section of the GPU when speaking about emulation performance in general: GPU VRAM. +All this while keeping the warranty in check. + +The process is simple, make the integrated video encoder work in the background while yuzu (or any other emulator) runs. +This is easily achieved from Radeon Software by going to `Settings > Record & Stream` and enabling `Instant Replay`. +Intel/Linux owners should be able to reach similar results by instead using the Xbox Game Bar or [setting OBS to keep a buffer](https://obsproject.com/forum/resources/instant-replay.575/). + +{{< imgs + "./instantreplay.png| A driver toggle for power management would be so much simpler" + >}} + +After this, in yuzu enable Exclusive Fullscreen from `Emulation > Configure.. > Graphics > Fullscreen Mode`. +Then just play your games in fullscreen by pressing F11. +This step can be avoided if you also enable `Record Desktop`, but please keep in mind this will increase your power consumption even while idling. + +The performance gains are the same as with the previous overclocking method, up to 73% in GPU bottlenecked titles. + +RX 6500 XT and RX 6400 users, since you lack a video encoder in the first place, refer to our original method mentioned at the start, or ask for a refund. + +#### Intel, killing support for 2 year old hardware + +Intel [recently announced](https://community.intel.com/t5/Graphics/Graphics-Driver-Support-Update-for-10th-Generation-and-Older/m-p/1403969/thread-id/108899) that their Windows driver for Gen. 9, Gen. 9.5, and Gen. 11 GPUs (that is any CPU based on the 14nm Skylake architecture and all its many marketing renames, plus Ice Lake) is now in “legacy software support”, which in layman's terms means they are officially dead. +While this doesn’t affect yuzu immediately, any new Vulkan features we add in the future could potentially break functionality in a similar way to what happened with old AMD GCN hardware last year. +This leaves integrated Intel GPU users with a single alternative, Linux, which offers support for even older hardware. +For example, an ancient HD Graphics 4400 *can* run yuzu with the Mesa drivers. + +Users should consider learning how to use Linux if a hardware upgrade is not a viable option in the near future, Mesa has always offered better performance for Intel GPUs. + +## Future projects + +Part 2 of `Project Y.F.C.` is a bit delayed for now, real life issues as previously mentioned, but its feature list and expected progression is laid out. + +`Project London` is progressing in a healthy fashion, we loved the internal testing done so far. + +And a possibility has just recently started to open for even better GPU performance in the (not so near) future. +`GPU fastmem` is one of the features that [Rodrigo ](https://github.com/ReinUsesLisp) had to leave for later, before passing the torch and moving onto “greener sides”. + +The main roadblock holding `GPU fastmem` back was driver support, which is now a mostly solved issue. We *only* need to start talks with the AMD, Intel, and the AMD Linux kernel module developers to ask for some increased limits. +Once those obstacles are out of the way, yuzu should, for example, be able to take partial advantage of Resizable BAR/Smart Access Memory, helping reduce PCIe bottlenecks, and should help improve particle rendering to make GPU accuracy a less critical performance setting. +No pressure, Blinkhawk! + +That’s all folks! This one turned out to be longer than expected. Thank you for staying until the end, and we hope to see you again next month! +Thank you NazD for the summary pic! + + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-jul-2022/instantreplay.png b/site/content/entry/yuzu-progress-report-jul-2022/instantreplay.png new file mode 100644 index 000000000..6c4949716 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/instantreplay.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/ir.png b/site/content/entry/yuzu-progress-report-jul-2022/ir.png new file mode 100644 index 000000000..ee695d53e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/ir.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/lobby.png b/site/content/entry/yuzu-progress-report-jul-2022/lobby.png new file mode 100644 index 000000000..2fa5bc28f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/lobby.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/md.png b/site/content/entry/yuzu-progress-report-jul-2022/md.png new file mode 100644 index 000000000..15aa1cb1a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/md.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/mhr.png b/site/content/entry/yuzu-progress-report-jul-2022/mhr.png new file mode 100644 index 000000000..6a110de20 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/mhr.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/mk8.png b/site/content/entry/yuzu-progress-report-jul-2022/mk8.png new file mode 100644 index 000000000..fbe6ea60f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/mk8.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/mononoke.png b/site/content/entry/yuzu-progress-report-jul-2022/mononoke.png new file mode 100644 index 000000000..a1a2381d6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/mononoke.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/perf.png b/site/content/entry/yuzu-progress-report-jul-2022/perf.png new file mode 100644 index 000000000..f71f2d13f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/perf.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/pla.png b/site/content/entry/yuzu-progress-report-jul-2022/pla.png new file mode 100644 index 000000000..19f67e707 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/pla.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/plaid.png b/site/content/entry/yuzu-progress-report-jul-2022/plaid.png new file mode 100644 index 000000000..c765aa694 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/plaid.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/psw.png b/site/content/entry/yuzu-progress-report-jul-2022/psw.png new file mode 100644 index 000000000..a1bb70a89 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/psw.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/puyo.png b/site/content/entry/yuzu-progress-report-jul-2022/puyo.png new file mode 100644 index 000000000..e72b86596 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/puyo.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/smo.png b/site/content/entry/yuzu-progress-report-jul-2022/smo.png new file mode 100644 index 000000000..31ee2f268 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/smo.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/smoo.png b/site/content/entry/yuzu-progress-report-jul-2022/smoo.png new file mode 100644 index 000000000..25d4cf191 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/smoo.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/strikers.png b/site/content/entry/yuzu-progress-report-jul-2022/strikers.png new file mode 100644 index 000000000..e3340b174 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/strikers.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/summary.png b/site/content/entry/yuzu-progress-report-jul-2022/summary.png new file mode 100644 index 000000000..fe3b6bd91 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/wetbear.png b/site/content/entry/yuzu-progress-report-jul-2022/wetbear.png new file mode 100644 index 000000000..167f2510e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/wetbear.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/witcher.png b/site/content/entry/yuzu-progress-report-jul-2022/witcher.png new file mode 100644 index 000000000..d14a3bc40 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/witcher.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/wol.png b/site/content/entry/yuzu-progress-report-jul-2022/wol.png new file mode 100644 index 000000000..f92dcb738 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/wol.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/wol2.png b/site/content/entry/yuzu-progress-report-jul-2022/wol2.png new file mode 100644 index 000000000..b5b29abf4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/wol2.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/xc2.png b/site/content/entry/yuzu-progress-report-jul-2022/xc2.png new file mode 100644 index 000000000..ee73f6bb3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/xc2.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/xc3.png b/site/content/entry/yuzu-progress-report-jul-2022/xc3.png new file mode 100644 index 000000000..79c238617 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/xc3.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/xc31.png b/site/content/entry/yuzu-progress-report-jul-2022/xc31.png new file mode 100644 index 000000000..26699f7bd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/xc31.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/xc32.png b/site/content/entry/yuzu-progress-report-jul-2022/xc32.png new file mode 100644 index 000000000..d0ffbcf40 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/xc32.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/xc33.png b/site/content/entry/yuzu-progress-report-jul-2022/xc33.png new file mode 100644 index 000000000..d71ac989e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/xc33.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/xc34.png b/site/content/entry/yuzu-progress-report-jul-2022/xc34.png new file mode 100644 index 000000000..1818a0b63 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/xc34.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/yokaibug.png b/site/content/entry/yuzu-progress-report-jul-2022/yokaibug.png new file mode 100644 index 000000000..6b273d393 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/yokaibug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2022/yokaifix.png b/site/content/entry/yuzu-progress-report-jul-2022/yokaifix.png new file mode 100644 index 000000000..51d75747b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2022/yokaifix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/banner.png b/site/content/entry/yuzu-progress-report-jul-2023/banner.png new file mode 100644 index 000000000..f61ff5e25 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/custombug.png b/site/content/entry/yuzu-progress-report-jul-2023/custombug.png new file mode 100644 index 000000000..56806c56d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/custombug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/customfix.png b/site/content/entry/yuzu-progress-report-jul-2023/customfix.png new file mode 100644 index 000000000..e6c20306f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/customfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/gpubug.png b/site/content/entry/yuzu-progress-report-jul-2023/gpubug.png new file mode 100644 index 000000000..abb696f9a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/gpubug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/gpufix.png b/site/content/entry/yuzu-progress-report-jul-2023/gpufix.png new file mode 100644 index 000000000..298088e8d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/gpufix.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/index.md b/site/content/entry/yuzu-progress-report-jul-2023/index.md new file mode 100644 index 000000000..44e00204c --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jul-2023/index.md @@ -0,0 +1,201 @@ ++++ +date = "2023-08-13T06:45:00+05:30" +title = "Progress Report July 2023" +author = "CaptV0rt3x" +coauthor = "GoldenX86" +forum = 876723 ++++ + +Hey there, yuz-ers! +Welcome back to our monthly report on all the improved features, performance gains, and bug fixes we've made. +Let's jump right in! + + + +## Aliens and ghosts are real... and they run on Unreal Engine! + +The wait was long, but worth it. Another game in the charming Pikmin franchise has finally arrived on Earth, just in time to join the wave of UFO reports! + +{{< imgs + "./pk1.png| Imagine a crossover with Toy Story, it would explain The Claw! (Pikmin 4)" + >}} + +This time, `Pikmin 4` decided to use Unreal Engine 4, which guarantees good performance and quality on the Switch. +However, this engine also guarantees headaches for emulating its use of sparse textures, as well as guaranteeing instability for NVIDIA GPU users running Vulkan, as previous games have demonstrated. + + +[byte[]](https://github.com/liamwhite) identified and fixed a regression caused by a recent change to the texture cache which severely {{< gh-hovercard "11093" "impacted stability" >}} on NVIDIA GPUs, causing constant device losses (the driver cutting off the GPU from rendering, resulting in an emulator crash). + +{{< imgs + "./pk2.png| Moss seems tired (Pikmin 4)" + >}} + +[emufan](https://github.com/GPUCode) found that hardcoding the total number of texture buffers to `16` was causing crashes in some Unreal Engine 4 games and {{< gh-hovercard "11098" "bumped up the count" >}} to `32`. + +{{< single-title-imgs + "Good thing this game didn't cross paths with Pikmin (Master Detective Archives: RAIN CODE)" + "./rain1.png" + "./rain2.png" + >}} + +This change has not only helped `Pikmin 4` but also `Master Detective Archives: RAIN CODE`, another recent release using this same engine. + +{{< imgs + "./rain3.png| Yeah, good name for a train, I'll board it in Dracula Station (Master Detective Archives: RAIN CODE)" + >}} + +Many things have improved, but there's still a lot of work remaining to improve the compatibility of games using this popular game engine! + +# Per-game configurations - Reimagined! + +If you're experienced with yuzu, it is very likely that you've seen and used per-game configurations. +But if you didn't know, yuzu supports per-game configurations as an easy way to set game-specific settings, without having to change your global settings for every game you start. +For the games which require GPU accuracy to be high instead of normal, or for games which work best with OpenGL over Vulkan, per-game configurations allow you to easily override settings like these. + +So, what's new, you ask? +The brains behind this feature's implementation and our trusty slice of toast, [toastUnlimited](https://github.com/lat9nq/), has started working towards a future where yuzu could select a game-specific configuration file curated by the community, and then apply those settings by default! +The ultimate goal is for users to be able to apply the optimal settings for any game by default, without having to tinker with the many, many configuration options we have today. + +Sounds exciting, right? Heck yeah! +While toast was finalizing his designs, he quickly ran into a road-block of his own design: our current per-game configuration system. +The existing system's design made it difficult to programmatically define and override each setting in multiple places across yuzu's backend and frontend systems. + +toast decided to take the challenge head-on and {{< gh-hovercard "10839" "rewrote the entire settings backend" >}} to improve it, all while making it programmatically easier to define and implement any setting. +Thanks to these changes, developers now only need to write out the UI text for a setting and the system will do the rest (reading, writing, representing in the UI, resetting global state). + +This also had the benefit of providing the perfect opportunity to rework several parts of the global settings UI! +For example, System settings now includes `Multicore CPU Emulation` support, all three possible values for `Memory Layout`, and `Limit Speed Percent`. + +{{< single-title-imgs-compare + "Important changes to System settings" + "./systembug.png" + "./systemfix.png" +>}} +  + +The Graphics section also got its fair share of changes. +Besides reorganizing the different options, the new `ASTC Decoding Method` option now lists our 3 different alternatives for handling that pesky ASTC format: CPU, GPU, and asynchronous CPU decoding. + +{{< single-title-imgs-compare + "Graphics settings also got some love" + "./gpubug.png" + "./gpufix.png" +>}} + + +There are plenty of changes here, but enough about the global settings! toast also changed how per-game configurations are updated. They will now show an X button on the right of each setting if they were modified from the global value, allowing you to quickly revert them if needed. + +{{< single-title-imgs-compare + "Graphics settings also got some love" + "./custombug.png" + "./customfix.png" +>}} + +Stay tuned for follow-up changes to our settings, building on top of this new foundation! + +# Graphics changes + +[Maide](https://github.com/Kelebek1) continued his efforts to improve performance through optimization and {{< gh-hovercard "10996" "his latest changes further optimize" >}} one of his {{< gh-hovercard "10457" "earlier optimizations." >}} We heard you like optimizations, so we put optimizations in your optimizations so you can optimize while you optimize. +While the original changes aimed to reduce memory allocations while copying data from the guest to the host (user's PC), the latest changes remove data copying entirely, resulting in nearly 10% performance boost in parts of `Super Mario Odyssey`, such as the Metro Kingdom area. `Xenoblade Chronicles: Definitive Edition` also sees similar gains. + +byte[]'s {{< gh-hovercard "11136" "latest fix" >}} significantly improves the slowest shader compilation times in `Splatoon 3`, reducing it from `30 seconds` to about `4 seconds`. +A {{< gh-hovercard "10583" "recent change to our texture cache's `AccelerateDMA` logic" >}} was identified to have been causing device losses and {{< gh-hovercard "10993" "has been since been reverted." >}} + +{{< imgs + "./sp3.png| She calls it Sasha (Splatoon 3)" + >}} + +# Input Changes + +[german77](https://github.com/german77) continued his reverse engineering of the Switch NFC service and {{< gh-hovercard "11096" "improved yuzu's code accuracy." >}} +He also fixed a bug, which would cause mice to stop working after some time, by avoiding an accidental division by zero. + +Newcomer [SuperSamus's](https://github.com/SuperSamus) first contribution to yuzu was to {{< gh-hovercard "11050" "remove a workaround on button mapping within yuzu" >}} which used to invert the face buttons mapping. +With these changes, SDL properly uses the native A/B and X/Y mapping of Nintendo devices. Thank you! + +Note: This change **BREAKS** controller configurations for those using Nintendo controllers without the direct driver. + +# Android changes + +[bunnei](https://github.com/bunnei/) implemented changes to {{< gh-hovercard "11017" "fix an issue where Turnip drivers would fail" >}} on certain Snapdragon devices and added checks for broken Qualcomm 7xx drivers. +This means that any Snapdragon user should be able to run Turnip drivers now. Links are provided in the Hardware section later in this article. + +[t895](https://github.com/t895) {{< gh-hovercard "11067" "disabled the prompt to save user data when uninstalling yuzu." >}} This feature often caused issues when users attempted to use different APK versions. + +t895 also {{< gh-hovercard "11070" "added some helpful error prompts" >}} to inform users why certain buttons were disabled on some devices. +The most common case is Mali or Xclipse users trying to install custom drivers, a feature that is only available for Adreno users, at least for now. + +{{< imgs + "./mali.png| Your Mesa driver is in another castle" + >}} + +# Miscellaneous changes + +Apart from the ones highlighted above, there have also been several smaller changes that don't necessarily fit nicely into a single category. So let's quickly discuss them below: + +[FearlessTobi](https://github.com/FearlessTobi) added {{< gh-hovercard "11047" "detection for compressed and sparse NCAs within yuzu's filesystem." >}} Instead of failing silently, yuzu will now log this info and abort the parsing. + +toast added a {{< gh-hovercard "11042" "new Linux build script which added the libraries required to enable `Wayland` support" >}} in our official AppImage releases. + +Not stopping there, toast {{< gh-hovercard "11186" "fixed a memory leak with the new timezone data generator." >}} This would happen when games tried to ask for timezone information too many times. +This was resolved by keeping track of the generated timezone binary instead of recreating it repeatedly. + +toast also {{< gh-hovercard "11030" "bypassed an MSVC build crash" >}} on `Windows version 10 1809 LTSC` from the new timezone binary changes by temporarily disabling it for MSVC until there is a solution from Microsoft. +The reason, for those interested, is [documented here](https://github.com/microsoft/STL/issues/3853#issuecomment-1627630752). + +byte[] implemented missing service functions, {{< gh-hovercard "11113" "fixing a bug that caused `Quake` to fail to launch," >}} and {{< gh-hovercard "11135" "fixed a bug that resulted in `Splatoon 3` having an endless loading screen when LAN was enabled." >}} + +byte[] also {{< gh-hovercard "11016" "fixed an issue within yuzu's filesystem" >}} which resulted in either corrupt save data or failing to save data. + +A previous merge caused games with non-ASCII titles to crash on Linux due to `DBus` expecting a `UTF8` string. This has now been {{< gh-hovercard "11007" "fixed." >}} +Thanks [zeltermann](https://github.com/zeltermann)! + +[Morph](https://github.com/Morph1984) {{< gh-hovercard "10999" "fixed a bug that broke the game installation progress bar" >}} after the recent buffer size increase by refactoring the progress bar calculation code. + +Morph also {{< gh-hovercard "11173" "fixed a bug where yuzu would crash on systems with weak CPUs running at very low clock speeds" >}} due to yuzu's strict requirements on CPU clock precision. + +german77 eliminated almost 2GB of memory usage in some circumstances by {{< gh-hovercard "11128" "fixing a memory leak within Discord presence code," >}} presumed to be caused by `cpp-httplib`. + +german77 also {{< gh-hovercard "11142" "fixed a crash in yuzu's gamelist" >}} that happened when you launched yuzu without keys. + +yuzu newcomer and Citra expert, [Steveice10](https://github.com/Steveice10), implemented {{< gh-hovercard "10974" "a few improvements to Vulkan surface creation on macOS." >}} [comex](https://github.com/comex) submitted {{< gh-hovercard "10990" "a few fixes and workarounds for macOS to resolve a few undefined behaviour errors." >}} Thank you both! +This doesn't mean full MoltenVK support yet, but the gap is now smaller. + +## Hardware section + +### NVIDIA + +The latest driver released at the time of writing, 536.99, is stable and also seems to have improved Vulkan performance a small but measurable amount, between 3% and 7%. +Free performance is free performance. + +### AMD + +It's July and we have another new AMD GPU driver with yet another extension causing issues. +If you recall from our [June progress report](https://yuzu-emu.org/entry/yuzu-progress-report-jun-2023/#amd), we reported that the latest AMD drivers had broken a Vulkan feature - `extendedDynamicState3ColorBlendEquation`, and we had to temporarily disable usage of it on AMD driver version `23.5.2` and above. + +Fast-forward to July, and it's still broken for some. +Giving credit where due, AMD ***did*** fix this issue with driver version `23.7.2`, but only for `RDNA2` GPUs (RX 6000 series). `GCN4`, also known as `Polaris` (RX 400 and 500 series), are confirmed to still be broken. +In light of this, and the fact that the fixed driver still reports the same Vulkan version, we {{< gh-hovercard "11182" "reverted" >}} {{< gh-hovercard "11163" "our revert" >}} of {{< gh-hovercard "10946" "our original change from June" >}} and have {{}} until this is fixed and has a new version number. + +### Turnip + +Mesa never slows down its progress, and [K11MCH1's](https://github.com/K11MCH1) AdrenoTools releases are a true blessing from the fairies. + +For Adreno 600 users (Snapdragon ### series), [progress is steady](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/vk.1.3.261-A6XX). +But the [best news](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/v23.3.0-dev) is for A700 users (Snapdragon # Gen # series), which now see much improved rendering and performance on the Mesa Turnip drivers. + +Some games still require the proprietary Adreno driver to be more stable or faster, but at this rate of progress, we’ll most likely see this change soon! + +## Future projects + +Behind the counter, there has been great progress in some key projects. +The last missing piece of `Project Y.F.C.`, the `Query Cache Rewrite`, was released but we'll talk about it next time. We're sure Xenoblade and Luigi's Mansion fans will love it! +byte[] continues to improve the current file system emulation — maybe some particular games will start working soon? +And Maide has some interesting ideas to implement in the shader cache code. + +That's all folks! Thank you for reading until the end. See ya next time! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-jul-2023/mali.png b/site/content/entry/yuzu-progress-report-jul-2023/mali.png new file mode 100644 index 000000000..d551c2dad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/mali.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/pk1.png b/site/content/entry/yuzu-progress-report-jul-2023/pk1.png new file mode 100644 index 000000000..59d357e8d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/pk1.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/pk2.png b/site/content/entry/yuzu-progress-report-jul-2023/pk2.png new file mode 100644 index 000000000..bbfbba7d9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/pk2.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/rain1.png b/site/content/entry/yuzu-progress-report-jul-2023/rain1.png new file mode 100644 index 000000000..230e95a2e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/rain1.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/rain2.png b/site/content/entry/yuzu-progress-report-jul-2023/rain2.png new file mode 100644 index 000000000..6a01fe0cc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/rain2.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/rain3.png b/site/content/entry/yuzu-progress-report-jul-2023/rain3.png new file mode 100644 index 000000000..b96600b9d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/rain3.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/sp3.png b/site/content/entry/yuzu-progress-report-jul-2023/sp3.png new file mode 100644 index 000000000..6a305144e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/sp3.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/summary.png b/site/content/entry/yuzu-progress-report-jul-2023/summary.png new file mode 100644 index 000000000..380cbb603 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/systembug.png b/site/content/entry/yuzu-progress-report-jul-2023/systembug.png new file mode 100644 index 000000000..6f0cf312f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/systembug.png differ diff --git a/site/content/entry/yuzu-progress-report-jul-2023/systemfix.png b/site/content/entry/yuzu-progress-report-jul-2023/systemfix.png new file mode 100644 index 000000000..2729a8b4b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jul-2023/systemfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/Kirby_before.png b/site/content/entry/yuzu-progress-report-jun-2020/Kirby_before.png new file mode 100644 index 000000000..651c7b072 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/Kirby_before.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/acnh-credits.png b/site/content/entry/yuzu-progress-report-jun-2020/acnh-credits.png new file mode 100644 index 000000000..4c16dc68a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/acnh-credits.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/acnh.mp4 b/site/content/entry/yuzu-progress-report-jun-2020/acnh.mp4 new file mode 100644 index 000000000..c672994d6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/acnh.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/banner.png b/site/content/entry/yuzu-progress-report-jun-2020/banner.png new file mode 100644 index 000000000..e35b6b23c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/bioshock.png b/site/content/entry/yuzu-progress-report-jun-2020/bioshock.png new file mode 100644 index 000000000..026bae5b0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/bioshock.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/index.md b/site/content/entry/yuzu-progress-report-jun-2020/index.md new file mode 100644 index 000000000..3f2da005b --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jun-2020/index.md @@ -0,0 +1,174 @@ ++++ +date = "2020-07-01T12:00:00-03:00" +title = "Progress Report June 2020" +author = "GoldenX86" +coauthor = "Morph" +forum = 264710 ++++ + +Hello fellow yuz-ers! We hope you are doing well. Once again, we're here to tell you about some of the exciting changes that were implemented last month in both yuzu Mainline and Early Access. + + + +In this episode, we have lots of fixes and optimizations, a feature many have been requesting, and as always, some hints of what the future will bring. + +## Bug fixes and improvements + +How should we start? Oh, I know! With [Morph](https://github.com/Morph1984) fixing another Kirby issue of course! By [reserving 4 image bindings](https://github.com/yuzu-emu/yuzu/pull/4092) in the fragment stage, instead of just one as before, he was able to fix several shader compilation errors that affected both `GLSL` and `GLASM` in `Kirby Star Allies`. Check out the results below, [Poyo!](https://www.youtube.com/watch?v=ObHK_K853k4) + +{{< single-title-imgs + "Here you can see the bug affecting an attack (Kirby Star Allies)" + "./Kirby_before.png" + "./kirby_after.png" + >}} + +{{< single-title-imgs + "And here affecting terrain (Kirby Star Allies)" + "./kirby_before2.png" + "./kirby_after2.png" + >}} + +[Rodrigo](https://github.com/ReinUsesLisp) fixed a bug that previously manifested as random black flickering by [marking vertex buffers as dirty after a cache invalidation](https://github.com/yuzu-emu/yuzu/pull/4064). This issue primarily affected `Animal Crossing: New Horizons`, but the bugfix should affect a lot of other games as well. Feel free to share any other games you discover that benefit from this! + +{{< imgs + "./acnh.mp4| Now that doesn't look nice, does it? (Animal Crossing: New Horizons)" + >}} + +A very elusive bug in `Super Mario Odyssey`, dubbed the "triangle glitch," had been tormenting us for ages. [Rodrigo](https://github.com/ReinUsesLisp) managed to solve the issue, but only in OpenGL with Nvidia GPUs due to the exclusive `NV_vertex_buffer_unified_memory` extension. However, due to both a yuzu and driver bug, we're unable to use this extension on Turing based GPUs (RTX 2000 and GTX 1600 series) for the moment. + +{{< single-title-imgs + "Dark and glitchy (Super Mario Odyssey)" + "./smo-bug.png" + "./smo-fix.png" + >}} + +We are working on a [universal implementation in Vulkan](https://github.com/yuzu-emu/yuzu/pull/4150) that requires the `VK_EXT_extended_dynamic_state` extension, but it is not yet available in all the GPU vendors' drivers. At the time of writing, only the Intel Mesa `ANV` Linux driver and the latest Nvidia Vulkan Beta driver support it. + +A rare bug was affecting `Xenoblade Chronicles 2`, causing fantastic vertex explosions on time-of-day transitions. [Rodrigo](https://github.com/ReinUsesLisp) managed to solve the issue by [improving the shader cache](https://github.com/yuzu-emu/yuzu/pull/4194). + +{{< single-title-imgs + "Exactly the same spot (Xenoblade Chronicles 2)" + "./xc2-bug.png" + "./xc2-fix.png" + >}} + +By [implementing RendererInfo](https://github.com/yuzu-emu/yuzu/pull/4080) into yuzu’s audio emulation, [ogniK](https://github.com/ogniK5377) solved the softlocks affecting the credit sequence in `Animal Crossing: New Horizons` and the softlocks in several areas of `The Legend of Zelda: Link's Awakening`. Now you can enjoy both games without the fear of getting stuck, and even listen to some newly working sound effects! + +{{< single-title-imgs + "Nothing to report! (Animal Crossing: New Horizons & The Legend of Zelda: Link's Awakening)" + "./acnh-credits.png" + "./zla-mermaid.png" + >}} + +Also thanks to [ogniK](https://github.com/ogniK5377), `Animal Crossing: New Horizons` no longer needs the crash-fix patch we were distributing in our compatibility article for the game. This was done by [improving the emulation of the Tegra X1 GPU drivers](https://github.com/yuzu-emu/yuzu/pull/4070). As a bonus, this also fixed T-posing on the later updates in `Super Smash Bros. Ultimate`! + +Not all games are native to the Nintendo Switch, with a portion of its library consisting of ported games from other consoles or the PC. Up until now, yuzu failed to run PC game ports that were originally developed for `Direct3D` (a Windows graphics API), even though they ran perfectly fine in `NVN` (a Switch exclusive graphics API). However, [Rodrigo](https://github.com/ReinUsesLisp) found a [way to translate this behavior](https://github.com/yuzu-emu/yuzu/pull/4049) to yuzu’s OpenGL and Vulkan implementations, resulting in tons of western games going in-game. This change was also accompanied by a shader cache invalidation. + +{{< imgs + "./bioshock.png| Would you kindly? (BioShock Remastered)" + >}} + +By implementing a [missing texture format](https://github.com/yuzu-emu/yuzu/pull/4005), [Rodrigo](https://github.com/ReinUsesLisp) fixed dark surface glitches that appear in `Xenoblade Chronicles Definitive Edition`. + +{{< single-title-imgs + "This is the Monado's power!" + "./xcde_before.png" + "./xcde_after.png" + >}} + +{{< single-title-imgs + "(Xenoblade Chronicles Definitive Edition)" + "./xcde_before2.png" + "./xcde_after2.png" + >}} + +Intel used to have a bug in their OpenGL driver causing many games using `Compute Shaders` to crash or render effects incorrectly. This forced us to disable them on any supported Intel GPU, which introduced adverse effects in many games. One game of note is `Super Smash Bros. Ultimate`, wherein compute shaders are used to render character model animations and without them, character models will be in a `T-pose`. + +Additionally, Intel's OpenGL `Geometry Shader` implementation (unlike AMD's and Nvidia's one) lacks an OpenGL extension called `GL_ARB_shader_viewport_layer_array`. This forces us to re-evaluate yuzu's implementation of it. + +By [re-enabling Compute Shaders](https://github.com/yuzu-emu/yuzu/pull/4025) and [changing the way yuzu handles Geometry Shaders](https://github.com/yuzu-emu/yuzu/pull/4031), [Morph](https://github.com/Morph1984) closed a big box of issues that previously affected only our Intel GPU users. + + +{{< single-title-imgs + "Gone are the rainbows on Intel (Octopath Traveler)" + "./octopath-before.png" + "./octopath-fixed.png" + >}} + +  + +{{< single-title-imgs + "No more T-posing (Super Smash Bros. Ultimate)" + "./ssbu-tpose.png" + "./ssbu-fixed.png" + >}} + +[Volca](https://github.com/VolcaEM) [stubbed an input instruction](https://github.com/yuzu-emu/yuzu/pull/4032) allowing `Minecraft: Nintendo Switch Edition` to go in-game. + +{{< imgs + "./minecraft.png| Don't dig too deep! (Minecraft: Nintendo Switch Edition)" + >}} + +Not all games have to be in 3D. [Morph](https://github.com/Morph1984) [replaced the default texture filtering behaviour](https://github.com/yuzu-emu/yuzu/pull/4081) to achieve crisp graphics in 2D games like `Undertale`. + +{{< single-title-imgs + "Crisp, just the way I like it" + "./undertale-before.png" + "./undertale-after.png" + >}} + +Now on to our final bug fix of last month. Old AMD GPUs from 2012 lack the OpenGL `GL_EXT_texture_shadow_lod` extension, leading to shaders that failed to build in `The Legend of Zelda: Breath of the Wild`. As described [here](https://github.com/KhronosGroup/SPIRV-Cross/issues/207), by using the [textureGrad function](https://github.com/yuzu-emu/yuzu/pull/4129), [Morph](https://github.com/Morph1984) achieved similar results, improving compatibility with such old devices. + +## Vulkan improvements + +`OCTOPATH TRAVELER` got some Vulkan love thanks to [Rodrigo](https://github.com/ReinUsesLisp). By implementing a [missing image format](https://github.com/yuzu-emu/yuzu/pull/4033) and [storage texels and atomic image operations](https://github.com/yuzu-emu/yuzu/pull/4034), the game can now reach in-game status in Vulkan, and with some very beautiful visuals! + +{{< imgs + "./octopath.png| This is how nostalgia makes us remember the SNES era (OCTOPATH TRAVELER)" + >}} + +[Rodrigo](https://github.com/ReinUsesLisp) also worked on [multiple](https://github.com/yuzu-emu/yuzu/pull/4110) [performance](https://github.com/yuzu-emu/yuzu/pull/4111) optimizations for the Vulkan API. This results in lower frametimes and higher framerates on average. + +## User Interface changes + +An old misconception our users had with yuzu had to do with the `Internal Resolution` option in the graphics settings. This was carried over from [Citra's](https://citra-emu.org/) UI, but it wasn't coded to do anything in yuzu. So, lots of users set it up at higher values expecting an image quality increase that could never happen. [Morph](https://github.com/Morph1984) decided it was time to [remove it for good](https://github.com/yuzu-emu/yuzu/pull/3966), and so he did. + +{{< imgs + "./res-scaler-removed.png| Until we meet again, Internal Resolution!" + >}} + +Thanks to users requesting it, [Volca](https://github.com/VolcaEM) added [Open Mods](https://github.com/yuzu-emu/yuzu/pull/4136), [FAQ, and Quickstart](https://github.com/yuzu-emu/yuzu/pull/4166) shortcuts to yuzu's interface. This is a great way for users to find helpful information on how to use the emulator — you just need to click on `Help`! + +{{< imgs + "./volca-ui.png| Just an easier way. Thanks Volca!" + >}} + +Continuing with UI changes, [Kewlan](https://github.com/Kewlan) added a [mute audio hotkey](https://github.com/yuzu-emu/yuzu/pull/4164). They also fixed a bug with the [fullscreen hotkey](https://github.com/yuzu-emu/yuzu/pull/4182), where the default hotkey would still function even when changed. + +## Dreams and reality + +`Project Maribel Hearn` has been released, and is available in Mainline too! Native 32-bit Switch games are now starting to work, with some of them even being fully playable! This means that games like `New Super Mario Bros. U Deluxe` and `Captain Toad: Treasure Tracker` work almost perfectly and with great performance, while games like `Mario Kart 8 Deluxe` still need more work. + +This has been a highly requested feature for a very long time, but implementing it required a major rewrite of the kernel, and official support for ARMv7 was needed in [Dynarmic](https://github.com/MerryMage/dynarmic), our ARM JIT recompiler. This took a tremendous amount of work from several of our developers, including, but not limited to: [Merry](https://github.com/MerryMage), [Lioncache](https://github.com/lioncash), [Blinkhawk](https://github.com/FernandoS27), [bunnei](https://github.com/bunnei), [Rodrigo](https://github.com/ReinUsesLisp), [Tobi](https://github.com/FearlessTobi), [ogniK](https://github.com/ogniK5377), [Morph](https://github.com/Morph1984), and many others. Special mention goes to Merry and Lioncache: they are the soul of this project, and without them we couldn't have even started it. Several of their pull requests are "too technical" to be included in the progress reports, but it should be known that Merry and Lioncache are the main code contributors at the heart of yuzu. + +You may not have noticed that four months ago, [bunnei](https://github.com/bunnei) and [Tobi](https://github.com/FearlessTobi) laid down the [initial framework](https://github.com/yuzu-emu/yuzu/pull/3478) towards 32-bit support in yuzu. + +They accomplished this by refactoring the ARM interface to support 32-bit and 64-bit JIT backends, implementing a 32-bit ARM interface based on Citra's ARMv6 dynarmic backend by adding CP15 coprocessor support, and implementing several 32-bit SVCs such as `GetThreadPriority32`, `WaitSynchronization32`, and many more. + +While rewriting the kernel for Prometheus, [Blinkhawk](https://github.com/FernandoS27) and [bunnei](https://github.com/bunnei) saw an excellent opportunity to include support for 32-bit ARMv7 CPU instructions and services. With this spark of motivation, they worked with [Merry](https://github.com/MerryMage) and [Lioncache](https://github.com/lioncash) to make the dream of 32-bit support a reality, by ramping up the implementation of various ARMv7 instructions such as `VPADD`, `VCVT`, and `VSHL` in Dynarmic, and 32-bit SVCs such as `CreateTransferMemory32`, `MapSharedMemory32`, and `CreateThread32` in yuzu. There are many other ARMv7 instructions and SVCs that we cannot cover here, but the culmination of this work allowed us to get the very first 32-bit games up and running! + +{{< imgs + "./toad.png| Good performance even on low-end hardware!" + >}} + +Additionally, the merge of this work into the Master branch also means that Multicore support is now working in Mainline! Thanks [Blinkhawk](https://github.com/FernandoS27) for all your hard work on this! Please refer to our previous [May progress report](https://yuzu-emu.org/entry/yuzu-progress-report-may-2020/) and the dedicated [Project Prometheus article](https://yuzu-emu.org/entry/yuzu-prometheus/) to read more about this crucial new feature. + +## Future projects + +With Multicore finally in Master, some of the ideas we have "in the oven" can start to take shape. `Project Apollo` is starting to be nice and sound. And finally, I've heard [bunnei](https://github.com/bunnei) is up to something, *again*. + +That’s all for now, folks! We hope to see you in our July progress report! +Special thanks to gidoly for providing screenshots. + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-jun-2020/kirby_after.png b/site/content/entry/yuzu-progress-report-jun-2020/kirby_after.png new file mode 100644 index 000000000..3d3578d69 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/kirby_after.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/kirby_after2.png b/site/content/entry/yuzu-progress-report-jun-2020/kirby_after2.png new file mode 100644 index 000000000..ecb5db5fd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/kirby_after2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/kirby_before2.png b/site/content/entry/yuzu-progress-report-jun-2020/kirby_before2.png new file mode 100644 index 000000000..4d8cb1002 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/kirby_before2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/minecraft.png b/site/content/entry/yuzu-progress-report-jun-2020/minecraft.png new file mode 100644 index 000000000..f2a2b723b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/minecraft.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/octopath-before.png b/site/content/entry/yuzu-progress-report-jun-2020/octopath-before.png new file mode 100644 index 000000000..218e6368a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/octopath-before.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/octopath-fixed.png b/site/content/entry/yuzu-progress-report-jun-2020/octopath-fixed.png new file mode 100644 index 000000000..a936f2a2e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/octopath-fixed.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/octopath.png b/site/content/entry/yuzu-progress-report-jun-2020/octopath.png new file mode 100644 index 000000000..632507d50 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/octopath.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/res-scaler-removed.png b/site/content/entry/yuzu-progress-report-jun-2020/res-scaler-removed.png new file mode 100644 index 000000000..5be00b672 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/res-scaler-removed.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/smo-bug.png b/site/content/entry/yuzu-progress-report-jun-2020/smo-bug.png new file mode 100644 index 000000000..bfed6f912 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/smo-bug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/smo-fix.png b/site/content/entry/yuzu-progress-report-jun-2020/smo-fix.png new file mode 100644 index 000000000..21ac306fc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/smo-fix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/ssbu-fixed.png b/site/content/entry/yuzu-progress-report-jun-2020/ssbu-fixed.png new file mode 100644 index 000000000..a9a360a59 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/ssbu-fixed.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/ssbu-tpose.png b/site/content/entry/yuzu-progress-report-jun-2020/ssbu-tpose.png new file mode 100644 index 000000000..1eaf43068 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/ssbu-tpose.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/summary.png b/site/content/entry/yuzu-progress-report-jun-2020/summary.png new file mode 100644 index 000000000..bd2badad0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/toad.png b/site/content/entry/yuzu-progress-report-jun-2020/toad.png new file mode 100644 index 000000000..567eacbef Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/toad.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/undertale-after.png b/site/content/entry/yuzu-progress-report-jun-2020/undertale-after.png new file mode 100644 index 000000000..0f272b960 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/undertale-after.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/undertale-before.png b/site/content/entry/yuzu-progress-report-jun-2020/undertale-before.png new file mode 100644 index 000000000..e63990c2b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/undertale-before.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/volca-ui.png b/site/content/entry/yuzu-progress-report-jun-2020/volca-ui.png new file mode 100644 index 000000000..7d33aa1d7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/volca-ui.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xc2-bug.png b/site/content/entry/yuzu-progress-report-jun-2020/xc2-bug.png new file mode 100644 index 000000000..abda6b712 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xc2-bug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xc2-fix.png b/site/content/entry/yuzu-progress-report-jun-2020/xc2-fix.png new file mode 100644 index 000000000..db3539c46 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xc2-fix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xcde_after.png b/site/content/entry/yuzu-progress-report-jun-2020/xcde_after.png new file mode 100644 index 000000000..c935e24e7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xcde_after.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xcde_after2.png b/site/content/entry/yuzu-progress-report-jun-2020/xcde_after2.png new file mode 100644 index 000000000..5de4ad6bc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xcde_after2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xcde_after3.png b/site/content/entry/yuzu-progress-report-jun-2020/xcde_after3.png new file mode 100644 index 000000000..df5d09518 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xcde_after3.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xcde_before.png b/site/content/entry/yuzu-progress-report-jun-2020/xcde_before.png new file mode 100644 index 000000000..bb6fba216 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xcde_before.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xcde_before2.png b/site/content/entry/yuzu-progress-report-jun-2020/xcde_before2.png new file mode 100644 index 000000000..e21875eb4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xcde_before2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/xcde_before3.png b/site/content/entry/yuzu-progress-report-jun-2020/xcde_before3.png new file mode 100644 index 000000000..0768d9c11 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/xcde_before3.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2020/zla-mermaid.png b/site/content/entry/yuzu-progress-report-jun-2020/zla-mermaid.png new file mode 100644 index 000000000..7254a196d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2020/zla-mermaid.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/audiobug.mp3 b/site/content/entry/yuzu-progress-report-jun-2021/audiobug.mp3 new file mode 100644 index 000000000..3b238ad8a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/audiobug.mp3 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/audiofix.mp3 b/site/content/entry/yuzu-progress-report-jun-2021/audiofix.mp3 new file mode 100644 index 000000000..3067c29d0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/audiofix.mp3 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/banner.png b/site/content/entry/yuzu-progress-report-jun-2021/banner.png new file mode 100644 index 000000000..e4941b5ee Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/blitbug.png b/site/content/entry/yuzu-progress-report-jun-2021/blitbug.png new file mode 100644 index 000000000..b85c8ea41 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/blitbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/blitfix.png b/site/content/entry/yuzu-progress-report-jun-2021/blitfix.png new file mode 100644 index 000000000..76dc19b8c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/blitfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/dktf.png b/site/content/entry/yuzu-progress-report-jun-2021/dktf.png new file mode 100644 index 000000000..d3f71a162 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/dktf.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/fastmem1.png b/site/content/entry/yuzu-progress-report-jun-2021/fastmem1.png new file mode 100644 index 000000000..bf16f7fd1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/fastmem1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/fastmem2.png b/site/content/entry/yuzu-progress-report-jun-2021/fastmem2.png new file mode 100644 index 000000000..8c1647379 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/fastmem2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/index.md b/site/content/entry/yuzu-progress-report-jun-2021/index.md new file mode 100644 index 000000000..90b5b49af --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jun-2021/index.md @@ -0,0 +1,307 @@ ++++ +date = "2021-07-16T12:00:00-03:00" +title = "Progress Report June 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 431984 ++++ + +Heya yuz-ers! Welcome to June’s progress report. This past month, we've had impressive CPU performance gains, the release of Project Reaper v1, critical audio fixes, an "unlimited" FPS toggle, +tons of kernel changes, UI improvements, and more! + + + +## Project Texture Reaper + +An old debt we owed since the release of the [Texture Cache Rewrite](https://yuzu-emu.org/entry/yuzu-tcr/) was `Project Texture Reaper`, a `GPU Cache Garbage Collector`, +originally started by [Rodrigo](https://github.com/ReinUsesLisp) and finished by [Blinkhawk](https://github.com/FernandoS27) with new and very important optimizations. + +[This garbage collector](https://github.com/yuzu-emu/yuzu/pull/6465) has the task of freeing VRAM space by removing the least used resources (textures and buffers), +targeting a range of 2 to 4GB of total used VRAM. This range has been decided by Blinkhawk after extensive testing. + +It’s worth mentioning that GPUs with 2GB of VRAM or less will be handled by either the driver (in OpenGL) or yuzu (in Vulkan), diverting resources to shared VRAM +(a portion of system RAM) as needed. +For performance reasons, we strongly recommend a GPU with 4GB of VRAM or more. + +While this is a critical feature for our Windows AMD Radeon and Intel GPU users that suffer from bad OpenGL performance and rendering, all GPU vendors benefit from it. +This makes it a safe option to use in most games going forward, with the exception of a few outliers: most notably `Super Mario Odyssey` running in OpenGL. + +The end results speak for themselves. Games like `Xenoblade Chronicles 2` can now be played perfectly fine in either OpenGL or Vulkan. +In the following graphs, you can see the effects of Reaper in action. Our test system is running an Nvidia GeForce GTX 1650 SUPER with 4GB of VRAM, and the API in use is Vulkan (in order to avoid +any possible driver-level garbage collector). + +{{< imgs + "./reaper1.png| Before" + >}} + +The above (Before) result has Reaper disabled just after starting the game. VRAM utilization quickly rises to the maximum 4GB available on the testing graphics card. +Once the available VRAM is consumed, the GPU driver will start to use system RAM as a fallback, continuing to pile up resources until the application crashes. + +{{< imgs + "./reaper2.png| After" + >}} + +The above (After) result has Reaper enabled. You can see how the GPU keeps a steady 2.5-2.6GB of VRAM utilization after several minutes of gameplay, until a sudden spike in use happens. +Reaper intervenes and VRAM utilization quickly returns to the average idle of 2.5GB. + +Reaper is available to all users in `Emulation > Configure… > Graphics > Advanced > Enable GPU Cache Garbage Collector`. +Due to some issues found in `Super Mario Odyssey`, the option is disabled by default. We plan to introduce a more robust version in the future. +It is expected to be enabled by default then. + +While previous `Disable Dynamic Resolution` mods can now be disabled, we recommend keeping them, not only for picture quality purposes, but also to reduce unnecessary +resource use by avoiding creating new textures after each resolution change. + +## One does not simply fastmem into Windows + +This was a very exciting month as we were able to [implement `fastmem`](https://github.com/yuzu-emu/yuzu/pull/6422), a technique that provides a considerable performance boost by reducing the CPU load when accessing memory within yuzu. +Instead of emulating the Nintendo Switch's Memory Management Unit (`MMU`) through software, yuzu is now able to use the host PC `MMU` to decode memory addresses. This reduces the latency and size of the code of this operation, allowing for a more efficient use of the instruction cache (used to store instructions within the CPU and speed up the fetching stage). + +Originally, implementing `fastmem` in yuzu wasn't considered an option as there was a technical limitation in the Windows OS, but thanks to some changes in the API introduced in Windows 10 version 1803, it finally became viable. +However, due to a lack of documentation of this feature (thanks Microsoft), our devs didn't know they could use it. +We'd like to thank [BreadFish64](https://github.com/BreadFish64/) for informing our devs about this change, and [bylaws](https://github.com/bylaws) for [updating Microsoft's documentation regarding this behaviour](https://github.com/MicrosoftDocs/sdk-api/pull/799). +As previously mentioned, this feature is incompatible with Windows versions older than 1803. Using an older Windows version will cause yuzu to fallback to the old `MMU` implementation — although this requirement could change in the future. +If you are interested in a more detailed explanation of how it works and the limitations that prevented its implementation, feel free to read the [dedicated article for fastmem](https://yuzu-emu.org/entry/yuzu-fastmem/). + +{{< single-title-imgs + "Some of the measured performance gains, in FPS" + "./fastmem1.png" + "./fastmem2.png" + >}} + +Shortly afterwards, [toastunlimited](https://github.com/lat9nq) noticed there was a bug in our MinGW builds, resulting in `fastmem` not working. +This was because the defined constant `MEM_RESERVE_PLACEHOLDER`, a mask value used for reserving virtual memory as a placeholder, was manually imported for these builds, but incorrectly declared. +Thankfully, the fix was as simple as redeclaring it with the correct value, which Toast [did in this PR](https://github.com/yuzu-emu/yuzu/pull/6494). + +## Core changes + +Meanwhile, [Merry](https://github.com/MerryMage) tweaked dynarmic to add a [new unsafe CPU option](https://github.com/yuzu-emu/yuzu/pull/6499). This new option optimizes performance for the 32-bit [`ASIMD` instructions](https://en.wikipedia.org/wiki/ARM_architecture#Advanced_SIMD_(Neon)), improving the performance in titles such as `Mario Kart 8 Deluxe` and `Megadimension Neptunia VII`. + +[Floating-point numbers](https://en.wikipedia.org/wiki/Floating-point_arithmetic) are represented as an exponent in base 2, and a fixed number of significant bits. +But there's a limit to how small a number can be represented as a float, which depends on these significant bits, and the numbers that fall below this threshold are called [Denormal Numbers](https://en.wikipedia.org/wiki/Denormal_number). +Depending on the CPU architecture or the instruction performed, these numbers may be ignored and considered zero (called `FZ` mode, "flush to zero"), while others are capable of operating with these denormal values. +This is the case with these `ASIMD` instructions, whose logic for floating-point operations is different from other instructions in the `ARM` architecture. +To properly emulate the behaviour of these `ASIMD` operations, which ignore the `FZ` flag, it is necessary to modify the `MXCSR` register — which is a very expensive operation — not only once, but twice (to set and unset this flag before and after every instruction). +With this change, it’s now possible to toggle this option on and lose some precision in favour of performance. + +A few days later, Merry followed up with the affirmation that yes, [Apple is indeed a POSIX system.](https://github.com/yuzu-emu/yuzu/pull/6532) + +[bunnei](https://github.com/bunnei) continues to work on our kernel, and the highlights this month are related to fixes for a number of bugs in some Pokémon games. + +[By allocating `ServiceThreads` per service handler instead of per session](https://github.com/yuzu-emu/yuzu/pull/6414), a race condition that resulted in crashes and softlocks in `Pokken Tournament DX` was fixed. + +In the same vein, a crash affecting `Pokémon Sword/Shield` — also caused by a race condition — was fixed by [removing the service thread manager and refactoring the code to use weak pointers](https://github.com/yuzu-emu/yuzu/pull/6428). +But this wasn't the only kernel change solving a problem with this game. +bunnei investigated our session code and fixed another crash caused by [disconnected sessions trying to overwrite a cloned session's handler](https://github.com/yuzu-emu/yuzu/pull/6441). +The sessions were also being reserved more times than needed, causing yuzu to run out of available sessions. +For this reason, [he made sure to remove these redundant reservations](https://github.com/yuzu-emu/yuzu/pull/6444) to solve the problem. + +bunnei also noticed that the error check for `CancelSynchronization` — used to manage threads — was missing and [added it on this PR](https://github.com/yuzu-emu/yuzu/pull/6440). +This change allows yuzu to avoid a potential crash now, while also making the implementation more accurate. + +On top of these kernel changes, bunnei has also been implementing more of the changes introduced by version 12.X.X of the Switch’s firmware, allowing `DOOM Eternal` to boot with its update 1.5 installed — although the game still requires more work in order to start rendering correctly. + +## Audio changes + +[Maide](https://github.com/Kelebek1) investigated the cause of the crackling and popping in the audio of some titles, and came to the conclusion that not enough audio samples were being fed into the sink in order to be played out in your headset or speakers. + +All games call the `RequestUpdateImpl()` to send samples into the sink and also to pass other information, such as the `sampling rate` of the audio signal and the `sample count` (number of samples to be processed). +Some titles — particularly those running at fixed frame rate of 30 FPS — would call this function less frequently than their 60 FPS counterparts, which resulted in not enough audio samples being processed in time and sent into the sink, causing the aforementioned annoying popping. + +This is how `Hellblade: Senua's Sacrifice` sounded with the old implementation: + +{{< audio "./audiobug.mp3" >}} + +By [decoupling the processing and sending of audio samples from the update function](https://github.com/yuzu-emu/yuzu/pull/6498), the games now will be able to call the update function every time they need it (a process that yuzu can't control), while a separate audio thread will process the sample data and send it to the sink. With this new implementation, yuzu is now capable of scheduling the rate at which it will be sending this audio information based on the `sample rate` and the `sample count`. For example: if a game is using a 48 kHz `sample rate` with a `sample count` of 240, yuzu will now send the audio data to the sink at a rate of least 200 times per second — enough to keep the buffers full and prevent these problems with the audio. + +And this is `Hellblade: Senua's Sacrifice` again, now with the current implementation merged: + +{{< audio "./audiofix.mp3" >}} + +This change fixed the slow audio in titles such as `ARK`, `Bulletstorm`, and `Megademension Neptunia VII`, while also — on top of improving the quality — solving the audio softlocks in `Donkey Kong Country: Tropical Freeze` and `Xenoblade Chronicles 2`. + +{{< single-title-imgs + "Better audio and stable gameplay! (Xenoblade Chronicles 2 & Donkey Kong Country: Tropical Freeze)" + "./xc2.png" + "./dktf.png" + >}} + +## Graphical improvements + +Let’s start with something nice, `Unlimited FPS`! +[Epicboy](https://github.com/ameerj) implemented a toggle that +[allows the rendering service, nvflinger, to disable the buffer swap interval limit,](https://github.com/yuzu-emu/yuzu/pull/6475) allowing the GPU to process frames as soon +as they are available, resulting in no FPS limit on games that allow this behaviour. + +{{< imgs + "./unlimitedfps.png| Beat my framerate!" + >}} + +A default hotkey for toggling the FPS limit was also added, say hello to `Ctrl + U`! +For the best results, `Vertical Synchronization` (or vSync) should be disabled in the GPU driver control panel, otherwise games will be constrained by the refresh rate of the monitor. +Keep in mind, not all games like the setting, some will ignore it, some will not behave well (running faster for example), and some will outright break. +Case-by-case user testing applies. + +Some examples of games that have full dynamic FPS support are: + +- `Hollow Knight` +- `DRAGON QUEST BUILDERS 2` +- `Dragon Quest XI S: Echoes of an Elusive Age - Definitive Edition` +- `WORLD OF FINAL FANTASY MAXIMA` +- `FINAL FANTASY XV POCKET EDITION HD` +- `Hungry Shark® World` +- `MONSTER HUNTER STORIES 2: WINGS OF RUIN` +- `NEO: The World Ends with You` demo +- `MISTOVER` +- `Crash™ Team Racing Nitro-Fueled` +- `Crash Bandicoot™ N. Sane Trilogy` +- ...and many more + +ASTC texture decoding is a complex topic when it comes to emulation, as no desktop graphics card has the required hardware support needed to process these heavily compressed textures. +The only exception is Intel with their integrated HD Graphics and UHD Graphics series. + +[In the past,](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2021/) epicboy implemented a way to accelerate ASTC texture decoding via the use of `Compute Shaders`, +improving decoding performance considerably thanks to taking advantage of the great computing power of modern GPUs. + +The issue is that in some games, `Astral Chain` for example, a synchronization issue caused yuzu to try to access a texture before its decoding was finished, resulting in +driver panics and application crashes. +[Implementing various optimizations and enhancements to the GPU accelerated decoder](https://github.com/yuzu-emu/yuzu/pull/6496) solved those crashes, even on a simple GT +730, a card 41.5x times weaker than an RTX 2080 SUPER in compute performance. + +Now that [Project Hades](https://yuzu-emu.org/entry/yuzu-hades/) is finished, there are plans to implement performance optimizations on the ASTC GPU accelerated decoder. + +Prior to this work, [a toggle to disable the GPU accelerated decoder](https://github.com/yuzu-emu/yuzu/pull/6464) was added for debugging purposes. +It’s no longer needed, but if anyone is curious about how much of a difference decoding with the CPU makes, the option is in `Emulation > Configure… > Graphics > +Accelerate ASTC texture decoding`. + +By [avoiding creating image views for blits for different bytes per block, ](https://github.com/yuzu-emu/yuzu/pull/6469) Rodrigo solved crashes experienced with Unreal Engine 4 +games on Vulkan. + +Speaking of blits, [vonchenplus](https://github.com/vonchenplus) found that our previous way of handling out of bounds texture blits wasn’t accurate enough, causing +rendering glitches in games like `DRAGON QUEST III The Seeds of Salvation`. +[Adding an offset to the source texture address](https://github.com/yuzu-emu/yuzu/pull/6531) puts this bug to rest. + +{{< single-title-imgs + "No more acne! (DRAGON QUEST III: The Seeds of Salvation)" + "./blitbug.png" + "./blitfix.png" + >}} + +Some games running in Vulkan, like `Super Smash Bros. Ultimate` or `A Hat in Time`, can cause loops decoding textures, resulting in `Out of Bounds` access on an array, +potentially leading to a crash, and breaking our Flatpak support. +[As preemptive work](https://github.com/yuzu-emu/yuzu/pull/6410), [toastUnlimited](https://github.com/lat9nq) added a `break` safeguard, and now Flatpaks work as intended. +Having less crashes is always better, right? + +## General changes and bugfixes + +`discord-rpc`, the submodule in charge of handling Discord’s `Rich Presence` “Now Playing” feature, [was updated](https://github.com/yuzu-emu/yuzu/pull/6484) by +[Vortex](https://github.com/CaptV0rt3x) to the last version before it was deprecated in favour of a closed-source alternative named `GameSDK` which, of course, we can’t use. +Since `discord-rpc` still is compatible with `Rich Presence`, this update should provide more stable reporting in your Discord Status. + +Vortex also [updated `httplib`](https://github.com/yuzu-emu/yuzu/pull/6486), removing the need for previous fixes, solving issues with token verification and +Compatibility Report uploading. + +We previously mentioned Flatpak support. [liushuyu](https://github.com/liushuyu) requested that [Flathub](https://flathub.org/home) add yuzu to their repositories, +officially providing [another installation option](https://flathub.org/apps/details/org.yuzu_emu.yuzu) for our Linux users. + +Maide implemented the `GetAudioOutPlayedSampleCount` service, making `Ninja Gaiden` series games playable! + +{{< single-title-imgs + "Ninja Gaiden series" + "./ninja1.png" + "./ninja2.png" + "./ninja3.png" + >}} + +[german77](https://github.com/german77) has been having fun rewriting how analog input is handled by yuzu. +The old method handled each analog joystick in a separate thread, periodically updating the angle held by the user. This is not only imprecise, but also slower and was +found to cause data races, eventually leading to random crashes. + +[By removing the need for separate threads, and using timestamps the game can consult at its own request](https://github.com/yuzu-emu/yuzu/pull/6389), the data race is +avoided. This eliminates the crashes, results in considerably smoother movement, and lowers resource utilization, helping performance. +A victory in all scenarios! + +[Thanks to changes made upstream](https://github.com/yuzu-emu/yuzu/pull/6450), [toastUnlimited](https://github.com/lat9nq) was able to update the `SDL` version in use, resolving +crashes experienced by Linux users right when opening yuzu. + +[kilaye](https://github.com/clementgallet) has been giving us a hand in an often forgotten area of yuzu, the `yuzu-cmd` binary, which is intended as an SDL2 alternative to +the most commonly used `yuzu` Qt interface binary. +[OpenGL wasn’t rendering](https://github.com/yuzu-emu/yuzu/pull/6412) due to recent changes applied, and a bad initialization of +[touch_from_button](https://github.com/yuzu-emu/yuzu/pull/6411) was causing crashes. +All were fixed thanks to kilaye’s work. + +While on an SDL2 rush, kilaye also [implemented an SDL2 audio backend](https://github.com/yuzu-emu/yuzu/pull/6418) as an alternative to our default cubeb backend. +More work is needed to refine its performance and end-results, but having an easy-to-maintain, multi-platform backend is never a bad idea. + +## Filesystem changes + +toastUnlimited has been working along with [morph](https://github.com/Morph1984) to improve the experience of using the +[Ultimate Mod Manager](https://github.com/ultimate-research/UltimateModManager) application with yuzu — a tool that allows one to mod `Super Smash Bros. Ultimate`. +First, toast added an option in the context menu of a game to support [dumping the RomFS to the SDMC subdirectory](https://github.com/yuzu-emu/yuzu/pull/6471), while morph +[made the necessary changes](https://github.com/yuzu-emu/yuzu/pull/6472) for this setup to work. + +New users intending to use UMM only need to right click the game in yuzu’s game list and select `Dump RomFS > Dump RomFS to SDMC`. + +{{< imgs + "./umm.png| " + >}} + +While [working on new debug options for the filesystem emulation](https://github.com/yuzu-emu/yuzu/pull/6460), Morph also fixed certain DLCs that used to make +`Xenoblade Chronicles 2` fail to load at boot with the previous implementation. +You can now run the game without major issues, even when fully updated. + +When dumping RomFS to disk, there has to be enough free space. Morph +[added a check to avoid users trying to dump without enough room.](https://github.com/yuzu-emu/yuzu/pull/6451) + +Due to a bug in the Microsoft Visual C++ (or just MSVC) compiler, a crash could happen when trying to access folders recursively in order to load game dumps in yuzu’s game +list. +Morph fixed it by replacing the `recursive_directory_iterator` class [with the `directory_iterator` class](https://github.com/yuzu-emu/yuzu/pull/6448). + +## UI changes + +Some changes have been done to the title bar by epicboy. +To begin with, games will now [display if they are built for the 32-bit or 64-bit instruction set.](https://github.com/yuzu-emu/yuzu/pull/6535) +This will help determine when `Unsafe CPU` should be used to get the previously mentioned performance optimization. + +Additionally, [the GPU vendor will now be displayed too.](https://github.com/yuzu-emu/yuzu/pull/6502) +This is not only for debugging purposes or providing better support to users, it also clarifies which driver is in use on systems running multiple GPUs. +One would think there are only 3 vendors per API, but that’s far from reality. +[By checking the list](https://github.com/yuzu-emu/yuzu/pull/6502/files), you can see there are many different reported vendors for different needs, including CPU +software rendering drivers. + +For their first Pull Request with yuzu, [OZ](https://github.com/OZtistic) +[corrected the size of the Per-Game configuration window and removed the useless “help” button](https://github.com/yuzu-emu/yuzu/pull/6514) in the top right corner. + +{{< imgs + "./oz.png| Thanks OZ!" + >}} + +toastUnlimited added a new option to the right click context menu on any game in yuzu’s game list. +You can now [right click a game and launch it](https://github.com/yuzu-emu/yuzu/pull/6426) with any custom per-game configuration you may have, or with +the current global settings. + +{{< imgs + "./start.png| Quick way to test two different sets of settings" + >}} + +Column sizes in the game list used to constantly resize during updates or DLC installation to NAND, resulting in an extreme width that made the game list uncomfortable to use. +Maide [put a stop to this](https://github.com/yuzu-emu/yuzu/pull/6402), improving the quality of life of our UI. + +[Kewlan](https://github.com/yuzu-emu/yuzu/pull/6413) is back at it, this time +[preventing users from inputting invalid characters in text windows,](https://github.com/yuzu-emu/yuzu/pull/6413) for example when creating a new Input Profile. + +{{< imgs + "./text.png| No more 1337 talk" + >}} + +## Future projects + +With Project Hades [(our new shader decompiler)](https://yuzu-emu.org/entry/yuzu-hades/), Rodrigo continues with his crazy experiments, bunnei has yet more kernel changes in the oven, and german77 and Morph continue +to work on their top secret projects. + +More GPU related optimizations are underway, and users should keep a keen eye on the horizon. + +That’s all folks! As always, we hope you keep enjoying yuzu. +See you next month! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-jun-2021/ninja1.png b/site/content/entry/yuzu-progress-report-jun-2021/ninja1.png new file mode 100644 index 000000000..d1ed7b8a5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/ninja1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/ninja2.png b/site/content/entry/yuzu-progress-report-jun-2021/ninja2.png new file mode 100644 index 000000000..62e2e7379 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/ninja2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/ninja3.png b/site/content/entry/yuzu-progress-report-jun-2021/ninja3.png new file mode 100644 index 000000000..ec3035725 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/ninja3.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/oz.png b/site/content/entry/yuzu-progress-report-jun-2021/oz.png new file mode 100644 index 000000000..99d67d723 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/oz.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/reaper1.png b/site/content/entry/yuzu-progress-report-jun-2021/reaper1.png new file mode 100644 index 000000000..3ab635f4d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/reaper1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/reaper2.png b/site/content/entry/yuzu-progress-report-jun-2021/reaper2.png new file mode 100644 index 000000000..72bcf9de9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/reaper2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/start.png b/site/content/entry/yuzu-progress-report-jun-2021/start.png new file mode 100644 index 000000000..5b148083a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/start.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/summary.png b/site/content/entry/yuzu-progress-report-jun-2021/summary.png new file mode 100644 index 000000000..5d5735ed3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/text.png b/site/content/entry/yuzu-progress-report-jun-2021/text.png new file mode 100644 index 000000000..c9c840c88 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/text.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/umm.png b/site/content/entry/yuzu-progress-report-jun-2021/umm.png new file mode 100644 index 000000000..4477b5b3c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/umm.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/unlimitedfps.png b/site/content/entry/yuzu-progress-report-jun-2021/unlimitedfps.png new file mode 100644 index 000000000..97b3d08cc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/unlimitedfps.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2021/xc2.png b/site/content/entry/yuzu-progress-report-jun-2021/xc2.png new file mode 100644 index 000000000..f154e2cf2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2021/xc2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/addbug.png b/site/content/entry/yuzu-progress-report-jun-2022/addbug.png new file mode 100644 index 000000000..b342f8074 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/addbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/addfix.png b/site/content/entry/yuzu-progress-report-jun-2022/addfix.png new file mode 100644 index 000000000..41a06c630 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/addfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/banner.png b/site/content/entry/yuzu-progress-report-jun-2022/banner.png new file mode 100644 index 000000000..263501e18 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/deblob2.png b/site/content/entry/yuzu-progress-report-jun-2022/deblob2.png new file mode 100644 index 000000000..5eeebb902 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/deblob2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/dockbug.png b/site/content/entry/yuzu-progress-report-jun-2022/dockbug.png new file mode 100644 index 000000000..914a22cfc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/dockbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/dockfix.png b/site/content/entry/yuzu-progress-report-jun-2022/dockfix.png new file mode 100644 index 000000000..597e00de6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/dockfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/fastmem1.png b/site/content/entry/yuzu-progress-report-jun-2022/fastmem1.png new file mode 100644 index 000000000..6e1ec00da Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/fastmem1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/fastmem2.png b/site/content/entry/yuzu-progress-report-jun-2022/fastmem2.png new file mode 100644 index 000000000..48c785dfc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/fastmem2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/gdb1.png b/site/content/entry/yuzu-progress-report-jun-2022/gdb1.png new file mode 100644 index 000000000..c6286d698 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/gdb1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/gdb2.png b/site/content/entry/yuzu-progress-report-jun-2022/gdb2.png new file mode 100644 index 000000000..00a5595ca Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/gdb2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/index.md b/site/content/entry/yuzu-progress-report-jun-2022/index.md new file mode 100644 index 000000000..ad5bac4f0 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jun-2022/index.md @@ -0,0 +1,285 @@ ++++ +date = "2022-07-10T12:00:00-03:00" +title = "Progress Report June 2022" +author = "GoldenX86" +coauthor = "CaptV0rt3x" +forum = 597525 ++++ + +Dear yuz-ers, we had fantastic progress during June! Driver bugs are being squashed, there are kernel and CPU improvements, UI and input changes, and more! + + + +## PSA for AMD Radeon users (and NVIDIA tags along) + +Let’s begin with a driver bug we [mentioned last month](https://yuzu-emu.org/entry/yuzu-progress-report-may-2022/#graphical-changes-driver-issues-and-the-nostalgia-bliss-that-is-the-good-old-64). +The Vulkan extension `VK_KHR_push_descriptor` finally arrived for AMD hardware with driver version 22.5.2 for Windows, but it wasn’t stable. Radeon users would tell you that any game would crash in Vulkan after updating. +To mitigate this, [toastUnlimited](https://github.com/lat9nq) implemented an extension block for the specific Vulkan driver version AMD reports for 22.5.2 (and its equivalent Linux AMDVLK package), 2.0.226. + +Skip forward a month and the new 22.6.1 driver is released with `VK_KHR_push_descriptor` fixed! +But, and there is a but, the new driver reports the same Vulkan version, 2.0.226, which forces our devs into a dilemma. +Since the extension block can only work with what the GPU driver reports, the Vulkan driver version in this case, we can either keep the block and ensure compatibility with older broken drivers, or remove the block and force users to update to the current (at the time of writing) 22.6.1 driver. +{{< gh-hovercard "8518" "We opted to do the latter," >}} as it keeps the codebase cleaner, and there is some evidence that suggests this may fix input lag issues found when using FreeSync displays. + +To be specific, AMD Radeon users with cards still supported by AMD (Polaris and newer) must update to the latest video driver, 22.6.1 or newer, in order to get proper Vulkan support. +Users with older cards out of support (GCN 1 to GCN 3) don’t have to worry, that hardware already can’t update to newer drivers (custom drivers can’t update Vulkan to add new extensions either), and yuzu will use the slower code path that works without requiring support for `VK_KHR_push_descriptor`. + +Okay, that covers Radeon users. Let’s talk about the greener side. +With the release of the 516.XX NVIDIA driver series, there seems to be a performance boost for Turing and Ampere GPUs running under Vulkan (that’s 3000, 2000, and 1600 series cards). +Great, but it has a price. + +Maxwell and Pascal users (1000, 900, 750, and 745 series cards) will experience device loss crashes some minutes into running games in Vulkan. +A device loss basically means the driver pulling the plug for some reason. +Until we find the cause of this issue and either implement a fix or report it to NVIDIA, Maxwell and Pascal users should stick to 512.XX drivers. + +It’s always boring to start an article with a bunch of warnings, but this is one of the few tools we have available to reach as many affected users as possible. + +## Graphical changes + +We should be covering the release of the {{< gh-hovercard "8467" "first part of `Project Y.F.C.`" >}} here, but due to schedule issues it was moved to the next report. +We're sorry for the inconvenience and we'll make sure to cover it in the next article. +The good news is that besides yuzu Fried Chicken, there have been other fun GPU improvements to report. + +[Behunin](https://github.com/behunin) is back with a {{< gh-hovercard "8413" "very interesting optimization for our `gpu_thread`," >}} [“a bounded multi-producer multi-consumer concurrent queue”](https://github.com/rigtorp/MPMCQueue). +This delivers a small 1 or 2 FPS performance boost, but more importantly, better recovery times after load related stuttering spikes. + +The beloved `The Elder Scrolls V: Skyrim`, once considered the benchmark for open world gaming, until better games came out that is, can now boot! +[Skyline emulator](https://github.com/skyline-emu/skyline) developer [bylaws](https://github.com/bylaws) found the reason this classic refused to boot until now: {{< gh-hovercard "8414" "the assumed behaviour of the first value" >}} of the GPU related [semaphore](https://en.wikipedia.org/wiki/Semaphore_(programming)) was wrong, it should perform a release instead of returning a constant zero. +Now, thanks to this great find by bylaws, the Dovahkiin can finally wake up in that cart. + + +{{< imgs + "./skyrim.png| Yes, we're finally awake (The Elder Scrolls V: Skyrim)" + >}} + +You can see we have some rendering issues to solve. + +One of our recent important rendering changes was the [NVFlinger rewrite](https://yuzu-emu.org/entry/yuzu-progress-report-mar-2022/#graphical-changes-and-optimizations), who would have guessed that coding an implementation closer to the Switch would result in a smoother gaming experience? + +However, after its release, user reports mentioned timing and frame pacing issues in games like `Super Smash Bros. Ultimate`. +Match time would pass increasingly slower, around a second longer per minute on Ryzen systems, and exacerbated with Intel Alder Lake CPUs (12th gen). + +The solution [bunnei](https://github.com/bunnei) arrived to, contrary to what one would think, is to {{< gh-hovercard "8428" "implement a *less accurate* behaviour." >}} +yuzu is multithreaded, and very heavily so (even if it doesn’t show up in CPU % usage graphs), and a 100% accurate implementation of NVFlinger would not be sensitive enough for the emulator’s requirements. + +Weird CPU architectures aside, while the issue is solved, Intel Alder Lake users are recommended to run the latest BIOS and chipset driver versions. Check your motherboard/laptop support sites for these updates. + +While still on the topic of NVFlinger goodies, we present a highly requested feature! +Veteran users will remember that during its single threaded days, yuzu would allow control over game speed. +With the arrival of multicore, known at the time as [Project Prometheus](https://yuzu-emu.org/entry/yuzu-prometheus/), this feature was only available in single core mode, to the chagrin of many people. How time flies! + +{{< gh-hovercard "8508" "yuzu now has control over the frame time calculation," >}} allowing a new method to unlimit the framerate regardless of the CPU emulation mode! +You can find the option in `Emulation > Configure… > General > Limit Speed Percent`. +Needless to say, if you want to make a game run faster, the game should allow it, and you must have the hardware performance to reach the new target speed. + +{{< imgs + "./speed.png| No visual change compared to previous versions, but completely new functionality" + >}} + +## Debugger + +Now, we're going to dive into a bit of developer paradise here. + +A few months ago, yuzu developer [byte[]](https://github.com/liamwhite) found himself trying to debug some game issues in yuzu involving [a certain Welsh cat](https://www.youtube.com/watch?v=-z99PKe7kOA), among others. +Unfortunately, he soon ran into more trouble, as it was exceedingly difficult to view the internal states of games and watch or modify their behaviour without needing to extensively hack up yuzu. + +The source of the pain was not having any way to use a debugger with the emulated games. + +Originally, yuzu inherited a `GDB-compatible debugger interface` from [Citra](https://citra-emu.org), but it was lacking many important features. +And even that had to be deprecated during [Project Prometheus](https://yuzu-emu.org/entry/yuzu-prometheus/) (multicore emulation) because of its inherent shortcomings. + + * It only worked with single core mode + * It was _slow_ - it could sometimes take 30+ minutes to boot a game, particularly if you had any logging scripts + * It had some significant code quality issues + +After being removed during the Prometheus rewrite, yuzu did not have ***any*** debugger interface for a long time. + +### Wait, what is GDB again? + +>

The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, C, C++, Objective-C, Free Pascal, Fortran, Go, and partially others.

+> +> -- [*Wikipedia*](https://en.wikipedia.org/wiki/GNU_Debugger) + +With GDB, you can: + * Step through code on an instruction-by-instruction basis + * Modify memory and registers on-the-fly + * Even completely replace sections of running code dynamically + +Thus, you can see how extremely useful having a `GDB-compatible debugger interface` is, for developers and mod creators alike, as you can now debug games, homebrew, and game mods without having to fiddle with the console every single time. + +{{< imgs + "./gdb1.png| A 32-bit example, in this case Super Mario Galaxy" + >}} + +### Challenges + +After the old debugger interface had been deprecated, a few members of the community forked it and continued to patch and maintain it. +A few notable ones are [Hedges](https://github.com/Hedges/yuzu) and [astrelsky](https://github.com/astrelsky/yuzu). +It was thanks to these forks that byte[] was able to add [initial support for the Wii Hagi emulator](https://github.com/yuzu-emu/yuzu/pull/8000) in yuzu. + +However, he was soon faced with a much more annoying problem. +[Recent changes to yuzu's CPU emulation](https://github.com/yuzu-emu/yuzu/pull/8148) were causing Super Mario Galaxy to [deadlock](https://en.wikipedia.org/wiki/Deadlock). +This issue only happened in multicore mode, right after the end of the first video cutscene. He was out of ideas and needed a functional debugger to continue investigating the issue. + +Since the old debugger interface didn't support multicore mode, byte[] had to start from scratch. +Motivated by his drive to figure out the issue, byte[] began working towards a new GDB-compatible debugger interface for yuzu and he had very specific goals: + * It should work + * It should quickly get out of the way, so he could focus more on the root cause + +As the saying goes, "the first step is always the hardest". +And for byte[], indeed it was; his biggest challenge: "Not knowing where to start". + +byte[] had the networking code written and working, but did not initially understand how to tie it with the threading code. After some healthy brainstorming sessions with other devs, he eventually figured out solutions for the challenges he was facing. + +### Changes + +Since he was starting from scratch, byte[] took the opportunity to make some sorely needed improvements to the interface. + +The old debugger interface was based on "stepping" the emulated CPU core. `Stepping` here means executing one instruction of the emulated program at a time. + +This posed a number of problems because almost all games have multiple threads, and if you are stepping and a thread asks to wait, then another thread can start running in its place in the same CPU core, with all the state changed. This breaks continuity and can even crash the debugger. + +{{< gh-hovercard "8394" "The new debugger interface" >}} overcomes this by performing debug stepping on threads instead of stepping the emulated CPU core. In yuzu's context, when a thread is stepped, the debugger will ask the thread to step, then the Dynarmic interface will detect this condition and tell Dynarmic to step it, and when the thread has been scheduled again, it will mark that the thread stepped and notify the debugger again. + +{{< imgs + "./gdb2.png| Super Mario Odyssey, in gibberish form" + >}} + +### What are the benefits? + +Apart from this, we have a few more notable quality-of-life (QoL) additions. +The debugger interface is now thread-stable, edge cases in stepping and pausing are now handled, and it has tons of useful debugging features, like: + +- Support for both 32-bit and 64-bit code +- Ability to modify any memory and registers at any time +- Readout of guest thread names +- Support for unlimited numbers of instruction breakpoints +- Support for up to 4 memory watchpoints + +## UI changes + +When talking about user interface and experience, you can always count on [Docteh](https://github.com/Docteh). + +[In a repeat of what Morph fixed back in February](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2022/#general-bugfixes-and-ui-changes), Docteh found out that after a crash, the yuzu main window may reopen in some kind of borderless fullscreen… *thing*. +The culprit was {{< gh-hovercard "8400" "the `UILayout\geometry` value in yuzu’s qt-config.ini file." >}} +A slap in the face and the issue should be gone for good. Ouch. + +With the intention of helping new users adapt to yuzu, Docteh {{< gh-hovercard "8405" "renamed the status bar" >}} `DOCK` text (which used to only change colour to reflect its status) to `DOCKED/HANDHELD`. +Now the current emulated status is clearer, and users won’t confuse it when using dark or light themes. +Making things easier to understand must never be underestimated. Car makers should try it someday. + +{{< single-title-imgs + "The devil is in the details" + "./dockbug.png" + "./dockfix.png" + >}} + +Translation bugs always manage to slip by. +The first time yuzu is opened, it will display a big folder with a plus icon, asking the user to add the location of their game dumps. +The text of this message failed to re-translate if the user changed the interface language from `Emulation > Configure… > General > UI > Interface Language`. +Solving this {{< gh-hovercard "8449" "took a couple of changes in how the window handles re-translation." >}} + +{{< single-title-imgs + "Good way to learn another language!" + "./addbug.png" + "./addfix.png" + >}} + +Docteh is also sneaking {{< gh-hovercard "8427" "some preliminary work for migrating to Qt6" >}} in the future. +The `QDesktopWidget` class is [now officially deprecated](https://doc.qt.io/qt-5/qdesktopwidget.html), so `QScreen` takes its place. + +Additionally, some classes affecting the Web Applet were also deprecated, so {{< gh-hovercard "8477" "some tweaks were in order to ensure future compatibility." >}} +Hopefully Qt6 will mean the return of the Web Applet by default? + +Once we’re ready to migrate, this should provide better dynamic DPI scaling, allowing 4K display users to finally understand what is going on in the control settings window, for example. + +## Input improvements + +Input is [german77’s](https://github.com/german77) speciality, a “diamond in the rough” that is being polished one PR at a time, for eternity…. + +Continuing the work with `Ring Fit Adventure`, german77 {{< gh-hovercard "8487" "stubbed the `PerformSystemButtonPressingIfInFocus` service" >}}, solving an SVC (Supervisor Call) crash which occurred when pressing ZL or ZR. + +With the official Switch update for the firmware version 13.2.0, Nintendo implemented a new `GetVibrationDeviceInfo`. +While german77 worked on implementing those changes, one game in particular refused to work, `de Blob`. +When this game sends a controller disconnect signal, it uses a `-1` value, which is invalid as only unsigned values are accepted on the Switch. +Maybe it’s an emulation issue somewhere, or this game just loves to do this and the Switch just accepts invalid values. Regardless, our solution is to {{< gh-hovercard "8492" "replicate this peculiar behaviour." >}} +The end result is `de Blob` now gets in-game! + +{{< imgs + "./deblob2.png| de Blob 2" + >}} + +## Kernel and CPU changes + +Possibly the most silent part of yuzu’s code, but also the most critical. +Kernel emulation is the engine block that keeps all parts working together in harmony, so you can expect that changing even a small part of it can have ripple effects anywhere. +One must tread carefully, heh, thread carefully. +Sorry, not sorry. + +Anyway, byte[] has been particularly busy this month in this delicate area, screwdriver in hand and not fearing anything. +Several changes include getting up to date with the latest reverse engineering findings, but there’s more. + +To help with pause and resume functionality, he has {{< gh-hovercard "8457" "implemented KProcess suspension," >}} “the kernel mechanism intended for this” as the pull request explains. +Clean pause and resume is always a blessing when you have to leave the PC to do something else. + +While working on {{< gh-hovercard "8388" "simplifying guest pauses" >}} for single core and multicore emulation, byte[] discovered that if asynchronous GPU emulation and multicore CPU emulation were disabled (something we strongly recommend against, but it’s a valid option for CPU thread starved users, or FX users), a race condition would happen when initializing the CPU and GPU threads. +Several single threads still are multiple threads. +Hammer in hand, byte[] {{< gh-hovercard "8476" "implemented some barriers" >}} to fix this specific crash. + +Pause is the word of the week, and this time, it could make a specific game crash. +The old StallCPU behaviour would wait for all thread execution to stop. +It was slow, but safe. +`Fire Emblem: Three Houses` would get into a GPU thread race condition with the new method. +{{< gh-hovercard "8483" "Telling the kernel to wait for all threads to stop on pause" >}} avoids the crash. + +If, for some reason, yuzu would jump to an invalid address, emulation would hang and the log would get spammed with infinite amounts of `Unmapped Reads`. +Fixing this required work on both Dynarmic and yuzu, resulting in {{< gh-hovercard "8490" "stopping ReadCode callbacks to unmapped addresses." >}} + +[exlaunch](https://github.com/shadowninja108/exlaunch) is a framework for injecting C or C++ code into Switch applications and modules. +exlaunch can work on unpatched units, allowing developers to “go to town” with it. +yuzu didn’t support it, but [comex](https://github.com/comex) {{< gh-hovercard "8504" "implemented the required functionality" >}} to have it up and running. +Thank you! + +Newcomer [DCNick3](https://github.com/DCNick3) joins the fray! +For their first brawl, they {{< gh-hovercard "8473" "implemented the `ExitProcess` SVC," >}} which allows homebrew apps to gracefully exit on close. + +## Issues with third-party antiviruses + +Users have recently reported crashes starting with Mainline version 1075 and newer. +The cause seems to be third-party antiviruses, more specifically ESET/ NOD32. +A [HIPS](https://help.eset.com/ees/8/en-US/idh_hips_main.html) false positive is issued, sandboxing yuzu and blocking its access to the system page file. +Basically, if fastmem is unable to secure 4GB of page file to work (or 6GB if the extended memory option is enabled), the emulator will crash. + +Three options are available to solve this for now: + +- The user can disable fastmem from yuzu’s settings, the setting is in `Emulation > Configure… > General > Debug`, from there, enable the option labeled as `Enable CPU Debugging` at the bottom, and from the CPU tab, disable both `Enable Host MMU Emulation` options near the bottom. This will produce a performance loss that can reach up to 30% on some games. +- Add a HIPS exception to both yuzu folders, `%appdata%\yuzu` and `%localappdata%\yuzu`. User reports show mixed results with this approach. +- Outright uninstall ESET and use Windows Defender instead. + +{{< single-title-imgs + "Here are image examples on how to reach the required options" + "./fastmem1.png" + "./fastmem2.png" + >}} + +## Future changes + +toastUnlimited has been working on {{< gh-hovercard "8455" "making yuzu compatible to be compiled with" >}} [LLVM Clang](https://clang.llvm.org/) under [MinGW-w64](https://www.mingw-w64.org/). +There are multiple reasons to consider this approach: + +- The default compiler we use for Windows builds, MSVC, is currently unstable on its latest 2022 version, forcing us to revert to version 2019, and making yuzu lose some compiler optimizations in the process, losing a bit of performance. +- GCC 12, the default Linux compiler yuzu uses, has optimization errors and problems with some warnings, making it unviable at the moment. +- Clang allows for aggressive optimizations that should provide good performance boosts. One example is [Polly](https://polly.llvm.org/). +- Along with GCC, LLVM makes it much easier to produce code optimized for the SSE4.2 instruction set. That’s right Core 2 Duo users, you’re next in line for the chopping block. + +The main reason we haven’t switched to this new system by default is `Project Gaia`, or, well, the lack of Gaias currently. +Some of its changes are mandatory to get Clang builds up and running on Windows. +While this pull request is completed, its full implementation will be on hold until Gaia is out, which isn’t far away now. + +Get a kettle, boil some [wotah](https://www.youtube.com/watch?v=XE6DT9y7L-w), and make yourself a cuppa tea, because `Project London` has bloody began. + +That’s all folks! Thank you for staying until the end. See you next month! + +  +{{< article-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-jun-2022/skyrim.png b/site/content/entry/yuzu-progress-report-jun-2022/skyrim.png new file mode 100644 index 000000000..84d624744 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/skyrim.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/speed.png b/site/content/entry/yuzu-progress-report-jun-2022/speed.png new file mode 100644 index 000000000..21913b566 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/speed.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2022/summary.png b/site/content/entry/yuzu-progress-report-jun-2022/summary.png new file mode 100644 index 000000000..f26f71392 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/af.png b/site/content/entry/yuzu-progress-report-jun-2023/af.png new file mode 100644 index 000000000..57a412515 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/af.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/afbug.png b/site/content/entry/yuzu-progress-report-jun-2023/afbug.png new file mode 100644 index 000000000..8e295b62e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/afbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/affix.png b/site/content/entry/yuzu-progress-report-jun-2023/affix.png new file mode 100644 index 000000000..ea43313df Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/affix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/amdbug.png b/site/content/entry/yuzu-progress-report-jun-2023/amdbug.png new file mode 100644 index 000000000..9139b698c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/amdbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/amdfix.png b/site/content/entry/yuzu-progress-report-jun-2023/amdfix.png new file mode 100644 index 000000000..ff1135d4d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/amdfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/aobug.png b/site/content/entry/yuzu-progress-report-jun-2023/aobug.png new file mode 100644 index 000000000..026136e5f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/aobug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/aofix.png b/site/content/entry/yuzu-progress-report-jun-2023/aofix.png new file mode 100644 index 000000000..d7eb83604 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/aofix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/audio.png b/site/content/entry/yuzu-progress-report-jun-2023/audio.png new file mode 100644 index 000000000..8c7c4d270 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/audio.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/banner.png b/site/content/entry/yuzu-progress-report-jun-2023/banner.png new file mode 100644 index 000000000..5c601540b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/bunnei.png b/site/content/entry/yuzu-progress-report-jun-2023/bunnei.png new file mode 100644 index 000000000..be8d0eb8a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/bunnei.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/crybug.png b/site/content/entry/yuzu-progress-report-jun-2023/crybug.png new file mode 100644 index 000000000..df81f4bf4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/crybug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/cryfix.png b/site/content/entry/yuzu-progress-report-jun-2023/cryfix.png new file mode 100644 index 000000000..c5c957f16 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/cryfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/debug.png b/site/content/entry/yuzu-progress-report-jun-2023/debug.png new file mode 100644 index 000000000..da45821cf Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/debug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/dlc.png b/site/content/entry/yuzu-progress-report-jun-2023/dlc.png new file mode 100644 index 000000000..9f8dbe65a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/dlc.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/feebug.png b/site/content/entry/yuzu-progress-report-jun-2023/feebug.png new file mode 100644 index 000000000..679008148 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/feebug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/feefix.png b/site/content/entry/yuzu-progress-report-jun-2023/feefix.png new file mode 100644 index 000000000..a29e982e6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/feefix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/firmware.png b/site/content/entry/yuzu-progress-report-jun-2023/firmware.png new file mode 100644 index 000000000..2ce285c59 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/firmware.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/frame1.png b/site/content/entry/yuzu-progress-report-jun-2023/frame1.png new file mode 100644 index 000000000..da5838157 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/frame1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/frame2.png b/site/content/entry/yuzu-progress-report-jun-2023/frame2.png new file mode 100644 index 000000000..17a6c9575 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/frame2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/fxaabug.png b/site/content/entry/yuzu-progress-report-jun-2023/fxaabug.png new file mode 100644 index 000000000..fc2f66231 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/fxaabug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/fxaafix.png b/site/content/entry/yuzu-progress-report-jun-2023/fxaafix.png new file mode 100644 index 000000000..c324afb01 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/fxaafix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/gpu.png b/site/content/entry/yuzu-progress-report-jun-2023/gpu.png new file mode 100644 index 000000000..995d8e652 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/gpu.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/gpu1.png b/site/content/entry/yuzu-progress-report-jun-2023/gpu1.png new file mode 100644 index 000000000..f7eb9a3c0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/gpu1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/gpu2.png b/site/content/entry/yuzu-progress-report-jun-2023/gpu2.png new file mode 100644 index 000000000..7dfa3ed0e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/gpu2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/gpu3.png b/site/content/entry/yuzu-progress-report-jun-2023/gpu3.png new file mode 100644 index 000000000..a23e5c826 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/gpu3.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/gpu4.png b/site/content/entry/yuzu-progress-report-jun-2023/gpu4.png new file mode 100644 index 000000000..814783912 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/gpu4.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/gpu5.png b/site/content/entry/yuzu-progress-report-jun-2023/gpu5.png new file mode 100644 index 000000000..8a271a70d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/gpu5.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/gpu6.png b/site/content/entry/yuzu-progress-report-jun-2023/gpu6.png new file mode 100644 index 000000000..b1a396a5b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/gpu6.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/index.md b/site/content/entry/yuzu-progress-report-jun-2023/index.md new file mode 100644 index 000000000..c85560d89 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-jun-2023/index.md @@ -0,0 +1,748 @@ ++++ +date = "2023-07-10T12:00:00-03:00" +title = "Progress Report June 2023" +author = "GoldenX86" +forum = 852816 ++++ + +Hello again, yuz-ers! Our devs, old and new, show no signs of slowing down. This month we have general performance and stability improvements, many graphics bug fixes, Android gets its first wave of improvements, and much more! Helmets on, let’s ride. + + + +Before we dive into the report, we have some important news to share. +We've received reports that some users have been experiencing crashes when trying to use Vulkan or change settings. +The culprit is `Overwolf`, a mod manager/overlay that comes with a faulty and outdated Vulkan layer, messing up the GPU’s Vulkan driver. +We strongly advise users to uninstall Overwolf until they have fixed their Vulkan layer. + +Now that we’ve cleared that up, let’s get started. + +## Illusion of Time + +While we implement many features of the Switch operating system, and can boot most games without a firmware dump, some games still require one. This is necessary for things like Mii models or to properly render foreign scripts and button fonts. +The firmware files also include the resources needed for proper time zone support. + +Thanks to the amazing work of [toastUnlimited](https://github.com/lat9nq), yuzu {{< gh-hovercard "10603" "now ships with" >}} virtually all {{< gh-hovercard "10797" "time zone data" >}} that the Switch has by default! + +In the past, yuzu would pretend that the system was in GMT, and then adjust the universal time by the local offset on the guest. +While this usually worked, it’s not accurate to how the Switch reports times. + +The default “Auto” time zone setting will now send a location-accurate time zone to the guest (instead of following the old GMT rule) using the synthesised time zone archive. +The new system also sends a correct representation of the universal time, regardless of whether there is a firmware dump or not. + +Now, while Linux had few issues with the new system (aside from a frustrating issue with Flatpak), Windows has some specific requirements. There are two important things to keep in mind: + +- When the changes were released, users needed to run at minimum a 2019 version of Windows 10, with 1809 no longer compatible. For LTSC users, this meant only the newest 2021 release would work. We later {{< gh-hovercard "11030" "implemented a solution" >}} for this. If you're running Windows LTSC 1809, or for some reason blocked Windows Update on a regular Windows version, remember to update to the latest yuzu version. +- You need the latest Visual C++ 2022 redistributable. Download it from this link: https://aka.ms/vs/17/release/vc_redist.x64.exe + +Don’t forget to set your clock correctly! + +## Graphics changes + +This month has been full of GPU changes, so let’s start with a *simple* one. + +There’s never rest for the wicked, so [Blinkhawk](https://github.com/FernandoS27) makes good use of that extra time doing what he does best: pulling big changes out of thin air. +In this case, he investigated what happens if a memory page is being used by the GPU and written by the CPU at the same time. +Lovely little bugs that have been haunting us for half a decade, that’s what happens! + +What Blinkhawk adds here is {{< gh-hovercard "10942" "a mechanism to register small CPU writes" >}} that sneak through while the page is being accessed by the GPU, properly invalidating the page if needed. +The following bugs have now been fixed as a result: + +- Fixes the vertex explosions affecting `Pokemon Scarlet & Violet`. Use High GPU accuracy. + +{{< single-title-imgs + "No explosions near the Academy, Megumin! (Pokémon Scarlet)" + "./scarletbug.mp4" + "./scarletfix.mp4" + >}} + +- Fixes the slow rain and snow particles in `The Legend of Zelda: Breath of the Wild` & `The Legend of Zelda: Tears of the Kingdom`. + +{{< single-title-imgs + "It’s raining Chuchus out there (The Legend of Zelda: Tears of the Kingdom)" + "./rainbug.mp4" + "./rainfix.mp4" + >}} + +- Fixes some particle corruption exclusive to `Tears of the Kingdom` seen, for example, while teleporting. + +{{< single-title-imgs + "It’s not perfect yet, but it’s almost there (The Legend of Zelda: Tears of the Kingdom)" + "./telebug.mp4" + "./telefix.mp4" + >}} + +- Fixes the erratic movement of some particles in `SUPER MARIO ODYSSEY`. + +{{< single-title-imgs + "Even the particles dance in this game (SUPER MARIO ODYSSEY)" + "./smobug.mp4" + "./smofix.mp4" + >}} + +- Fixes the hilariously wrong eyebrows affecting some characters in `Xenoblade Chronicles 3`, like Noah and Sena. Writer’s note: I will miss this one, it was fabulous. + +{{< single-title-imgs + "Hey, Noah’s eyes are up here (Xenoblade Chronicles 3)" + "./xc3bug.mp4" + "./xc3fix.mp4" + >}} + +- Fixes the corrupted save thumbnails in `Xenoblade Chronicles: Definitive Edition`. + +{{< single-title-imgs-compare + "That’s Dunban over there! (Xenoblade Chronicles: Definitive Edition)" + "./picbug.png" + "./picfix.png" + >}} + +- And more! + +{{< gh-hovercard "10783" "Here’s some good news for the low-RAM folks!" >}} + +Since native Switch game shaders can’t be run directly on the user’s GPU, yuzu has to recompile them into an intermediate representation (IR) which is a middle format that can be optimized and then converted to a shader that users' GPU drivers can actually handle (SPIR-V/GLSL/GLASM). For performance reasons, a significant amount of memory is preallocated to store these blocks of IR, and the old implementation would use 34MB per thread, twice. + +68MB per thread may not seem like a lot, right? But this allocation is made as many times as the total thread count of the CPU, SMT included. +With some quick maffs, you can see that a Ryzen 3600 would gobble up 816 MB of system RAM, a Ryzen 7950X or an i9 13900 would need 2.2GB, and many phones with 8-threads SoCs would lose 544MB to these allocations. +This is, of course, not much of a problem for users with 32GB of system memory, but for 16GB or lower, particularly 8GB RAM users, this is a very steep price to pay. It is not uncommon to see a laptop with only 8GB of RAM and a 12 thread-equipped Ryzen 5500U for example, or 8GB phones and tablets. + +[byte[]](https://github.com/liamwhite) wasn’t happy with this behaviour, so he replaced it with a much more memory-friendly one. +The current use per-thread is about 134KB now. That’s a whopping 99.6% reduction! + +One of the ways to make games look better is by forcing higher values of anisotropic filtering, which makes textures at steep angles look much sharper. +The old implementation had to skip nearest-neighbour samplers on mipmapped images to avoid rendering issues in games like `Fire Emblem: Three Houses` and `ASTRAL CHAIN`. +This decision meant that many games like `Metroid Prime Remastered` would see no benefit from using higher values of anisotropic filtering, to the point that [Wollnashorn](https://github.com/Wollnashorn) would create mods to force the textures of `Breath of the Wild` and `Tears of the Kingdom` to trilinear filtering, allowing yuzu's anisotropic filtering setting to do its job. + +While that was a nice workaround, Wollnashorn wasn’t satisfied with this solution, so they improved the {{< gh-hovercard "10744" " heuristics" >}} used to allow anisotropic filtering on any texture format without rendering issues, improving image quality, and as a bonus, even fixing an old rendering bug affecting `Mario Kart 8 Deluxe` too! + +{{< single-title-imgs-compare + "More accurate and better looking! (Mario Kart 8 Deluxe)" + "./afbug.png" + "./affix.png" +>}} + +Now you can safely select 16x filtering and enjoy the results, which you can find in `Emulation > Configure… > Graphics > Advanced > Anisotropic Filtering`: + +{{< imgs + "./af.png| Anisotropic Filtering at 16x may affect performance on integrated GPUs, something to keep in mind" + >}} + +In another batch of old issues fixed by Blinkhawk, he managed to pinpoint the cause for Unreal Engine 4 games having broken textures and crashing when running with Vulkan, a problem that mostly affected NVIDIA cards. + +Unreal Engine 4 is a big fan of [sparse textures](https://docs.unity3d.com/Manual/SparseTextures.html) to the point of really pushing the limits of the texture cache code. +A bug affecting how NVN virtual images were being remapped after sparse memory gets converted to regular mapped memory caused games like `SHIN MEGAMI TENSEI V`, `Bravely Default`, the `Pikmin 4 Demo`, and many others to display corrupted textures at random. + +{{< single-title-imgs-compare + "Optical camouflage gone wrong, clearly Protag-kun here is not as good as major Motoko (SHIN MEGAMI TENSEI V)" + "./yvcbug1.png" + "./yfcfix1.png" + >}} + +{{< single-title-imgs-compare + "It's not a phase, mom! (BRAVELY DEFAULT II)" + "./yfcbug1.png" + "./yfcfix2.png" + >}} + +{{< gh-hovercard "10953" "Fixing this regression" >}} allows games to render properly once again. + +Speaking of the `Pikmin 4 Demo`, the game taught us that while you can do it, 3D textures really {{< gh-hovercard "10956" "don’t need to be accelerated" >}} by DMA operations. +In order to avoid crashes in Unreal Engine 4 games like this, the LLE slow code path will be used instead. + +{{< imgs + "./pm4.png| More proof that games don’t need high requirements to be fun (Pikmin 4 Demo)" + >}} + +This pull request introduced a regression that affected rendering in `Metroid Prime Remastered`. +Thankfully, [gidoly](https://github.com/gidoly) quickly solved it by {{< gh-hovercard "11012" "merging both approaches," >}} old and new. + +{{< single-title-imgs-compare + "Chozo Suite error 404: Texture not found (Metroid Prime Remastered)" + "./mprbug.png" + "./mprfix.png" +>}} + +While working on these crashes, byte[] changed the behaviour of the Vulkan memory manager to prefer (instead of require) {{< gh-hovercard "10994" "using device local memory" >}} (VRAM) for image memory, which ends up allowing up to 50% of shared memory (system RAM) to be used by the GPU. +This simple trick makes most Unreal Engine 4 games stable, but it is very likely it has the cost of making VRAM intensive games stutter more often once VRAM gets close to full, for example, when running `The Legend of Zelda: Tears of the Kingdom` on a GPU with 4GB of VRAM or less. + +It’s a high price to pay considering `Tears of the Kingdom` is by far the most played game on yuzu, but we think the huge number of games that benefit from stable gameplay outweighs the latest Zelda stuttering a bit more on low-end GPUs with dedicated VRAM. + +What better way to prove that statement than by continuing to write about `The Legend of Zelda: Tears of the Kingdom`! +Ever since its release, the modding community has been working tirelessly to improve the rendering quality of the game. +During their testing they discovered that any rendering resolution mod higher than 1008p would break ambient occlusion effects when scaled above 1x resolution. + +byte[], with some help from Wollnashorn's initial investigation, {{< gh-hovercard "10675" "adjusted the rescale size thresholds," >}} and now the game can be safely upscaled with mods to reach that glorious real 1080p rendering—and can then be scaled with yuzu’s internal resolution scaler to any desired resolution. + +{{< single-title-imgs-compare + "The ambient occlusion of this game may not be perfectly implemented, but it really helps with the ambiance of the scene (The Legend of Zelda: Tears of the Kingdom)" + "./aobug.png" + "./aofix.png" +>}} + +Now you can enjoy the game in all its splendour, without sacrificing any details. + +While profiling the GPU code, Maide found a way to squeeze more performance out of the game. +By {{< gh-hovercard "10668" "combining vertex and transform feedback buffer bindings" >}} instead of binding them individually, thousands of API calls per frame can be avoided. +This leads to a small 1-3% improvement in framerates in general, but it manages to boost `Tears of the Kingdom` by a whopping 17%. +The tests were performed with a Ryzen 5 5600X, so it’s very likely that newer CPUs will see even bigger gains. + +By adding some {{< gh-hovercard "10818" "additional samples checks" >}} when finding the correct render target, [vonchenplus](https://github.com/vonchenplus) fixed the device loss crashes that affected `Fire Emblem Engage` while playing in handheld mode, as well as the squished character portraits that affected some systems. +This change also fixes incorrect colour and shadows in `SpongeBob SquarePants: The Cosmic Shake`. + +{{< single-title-imgs-compare + "That portrait wasn’t very engaging, your excellency (Fire Emblem Engage)" + "./feebug.png" + "./feefix.png" +>}} + +vonchenplus also fixed {{< gh-hovercard "10798" "resolution scaling issues" >}} affecting `Titan Quest` and `Crysis Remastered`; glitchy picture-in-picture bug begone! + +{{< single-title-imgs-compare + "Yes, we can run Crysis, now at 4k (Crysis Remastered)" + "./crybug.png" + "./cryfix.png" +>}} + +OpenGL also got some love once again thanks to efforts made by [Epicboy](https://github.com/ameerj). + +In a surprising discovery (or as stated in the pull request description, “here’s a fun one”), Epicboy found out that NVIDIA’s OpenGL drivers get a significant performance boost in shaders using local memory if the previous shader that was executed uses a lot of local memory. +This seems to be an OpenGL-specific quirk in the NVIDIA driver, as Vulkan is not affected. + +This {{< gh-hovercard "10916" "beautiful driver trick" >}} gives a 2-10% performance increase depending on the size of the GPU. + +But the OpenGL gains didn’t stop there. +`Persistent Buffer Maps` were already in use by the texture cache, but {{< gh-hovercard "10476" "extending their use" >}} to the buffer cache more than doubles the performance of OpenGL on NVIDIA hardware! + +{{< imgs + "./ogl.png| Fermi and Kepler users rejoice (tested with an RTX 3070)" + >}} + +We expect a similar improvement when using Mesa drivers on Linux. + +While most NVIDIA users are advised to stick to Vulkan now, as it is still faster and with WAY less shader stuttering, these changes should greatly help Fermi and Kepler (GTX 400 to GTX 700 series) users that, due to driver support reasons, must still use OpenGL. +Or those who just like to live dangerously. + +With the introduction of the resolution scaler, we added FXAA as a possible anti-aliasing filter, a preferred option over SMAA for games that already look too crisp, or simply for users that can’t afford the performance loss of SMAA. +Its Vulkan implementation has had issues with colour banding since release. +Not satisfied with that, byte[] solved the problem by {{< gh-hovercard "10670" "using a higher colour bit depth." >}} +Sometimes, solutions don’t need to be complicated. + +{{< single-title-imgs-compare + "For those old enough to remember what it felt getting a GPU that could do 24-bit colour (SUPER MARIO ODYSSEY)" + "./fxaabug.png" + "./fxaafix.png" +>}} + +Many Switch games support dynamic framerates, or get mods that support dynamic framerates, meaning unlocking the framerate (by default by pressing Ctrl + U) is a great way to get a much better and smoother experience while emulating those games. +By the way, here’s a [list](https://github.com/Law022/Dynamic-Frame-Rate/wiki/Game--List) of such games for those curious. + +One unwanted side effect with this is that video playback won’t be able to keep up with the increased framerate, often desynchronizing audio while still having to wait for the video to end. +To mitigate this, byte[] {{< gh-hovercard "10666" "added a toggle" >}} in `Emulation > Configure… > Graphics > Advanced` called “Sync to framerate of video playback” that, when enabled, will dynamically re-enable the framerate limit while a video cutscene is playing. + +{{< imgs + "./af.png| Totally not the same pic from earlier" + >}} + +While digging into the AccelerateDMA code, Epicboy found an {{< gh-hovercard "10583" "incorrect check" >}} that affected buffer-to-texture copies. +Fixing it increased performance by a whopping 1%, but as any avid gamer knows, average framerates are only half of the story. +This change also improved frametime consistency, especially in sudden spikes, which are arguably the most noticeable during gameplay. + +{{< imgs + "./frame1.png| " + >}} + +{{< imgs + "./frame2.png| I have become frametime, the destroyer of gameplay" + >}} + +Users enjoy testing yuzu on a wide variety of devices; one particularly interesting example is the Tegra X1 product line from NVIDIA, the same architecture that powers the actual Nintendo Switch. +Since there are drivers available for those devices, yuzu can be run in a Linux environment, but for some reason, those drivers don’t include the `VK_EXT_robustness2` extension, which was mandatory up until now. +Newcomer [mrcmunir](https://github.com/mrcmunir) decided to change this and {{< gh-hovercard "10635" "mark the extension as optional," >}} making the most optimal ARM boards for Switch emulation able to enjoy gameplay with yuzu. + +To close the graphics section, we saved the best for last: +toastUnlimited removed the use of a Windows only external memory Vulkan extension. +Why? To make yuzu {{< gh-hovercard "10829" "compatible with Wine" >}} while using Vulkan! +Why would someone run yuzu on Wine when a native and faster Linux version is available? We don’t know! But you can definitely do it now, given you build Wine from source yourself with support for Vulkan child windows. +We only intend to use this for debugging MinGW releases—for end users, we won't provide any support for running releases in Wine. + +This is a fun case where all developers asked your writer to skip mentioning this change because it was considered redundant for this report. +To them I say: YOLO. + +## Android additions + +The new supported platform in town has a lot of improvements to boast of, but the most important one gets the honour of starting the section. + +Thanks to the joint work of byte[] and [GPUCode](https://github.com/GPUCode), and the help from [bylaws](https://github.com/bylaws) who allowed us to use Skyline’s BCn texture decoder, yuzu can now properly advertise {{< gh-hovercard "10837" "support for Mali GPUs!" >}} + +[Kept you waiting, huh.](https://www.youtube.com/watch?v=6EBuKP-uc94) + +This means users of Mediatek, old Samsung Exynos, and Google Tensor CPUs [(among others)](https://en.wikipedia.org/wiki/Mali_(processor)#Implementations) can run their games in yuzu as long as they have a [G-series Mali GPU](https://en.wikipedia.org/wiki/Mali_(processor)#Variants), for example the Mali-G710 on the Pixel 7 series. + +{{< single-title-imgs + "SUPER MARIO ODYSSEY and Pokémon Mystery Dungeon Rescue Team DX (Running on a Pixel 7 Pro)" + "./mali1.png" + "./mali2.png" + >}} + +This theoretically doubles the compatibility of yuzu’s Android builds, as Mali is the most common GPU family in the Android ecosystem. + +{{< single-title-imgs + "The Legend of Zelda: Skyward Sword HD, Advance Wars 1+2: Re-Boot Camp, and OCTOPATH TRAVELER (Running on a Pixel 7 Pro)" + "./mali3.png" + "./mali4.png" + "./mali5.png" + >}} + +Further testing with Mali revealed that while the driver implemented support for the `VK_EXT_extended_dynamic_state2` extension in older Mali drivers, the implementation for `VK_EXT_extended_dynamic_state` was not fully functional, and yuzu was not behaving correctly in this case. +This is most likely the reason both extensions were removed by Google from Pixel drivers. +To avoid users of affected drivers experiencing no rendering output at all, byte[] {{< gh-hovercard "10790" "disabled the use of the extension" >}} on Mali hardware. + +It should be noted that while the Mali drivers are much better at following the Vulkan specification than others, the physical hardware specifications are lacking. +Only high-end devices will reach playable framerates at the moment. +Lower-end Mali products will be too weak for Switch emulation, even if they meet the driver requirements to run the emulator. +But hey, you’re welcome to try it out and see how it goes! + +There’s also been a LOT of work put into the Android user interface. + +To begin with, [PabloG02](https://github.com/PabloG02) has given us a hand again, this time by {{< gh-hovercard "10551" "storing the position of overlay controls" >}} as a percentage, so if there is a change in the dimensions of the window, for example by using a foldable device, or rotating the screen on a tablet, the overlay controls stay in approximately the same location. + +{{< imgs + "./move.png| Place your input anywhere you want!" + >}} + +To help users with transferring the required files to yuzu and with debugging, PabloG02 also {{< gh-hovercard "10578" "added UI options" >}} to import firmware files, a requirement to run and properly display some games, and an option to quickly share the last log file, which can help our support members when trying to diagnose the reason for a crash. Thanks! + +{{< imgs + "./firmware.png| Select your firmware dump location" + >}} + +Users can be very particular about the configuration of overlay controls. Some may be fine with just using the Switch’s touch screen instead (depending on the game), and some have different preferences of opacity levels for buttons. +For cases like these, [t895](https://github.com/t895) added a dialog to {{< gh-hovercard "10557" "adjust the scale and opacity" >}} of the overlay controls. + +{{< imgs + "./overlay.png| Size and transparency" + >}} + +{{< single-title-imgs + "It’s also a great way to enjoy touch-only games (Witch on the Holy Night)" + "./ov1.png" + "./ov2.png" + >}} + +yuzu includes a notification to ensure the app isn’t closed by Android when switching apps. +We need to do this to ensure users don’t lose their progress, but it can also be used to include some cool features. + +One possibility is support for Picture-in-Picture when minimising the app. +t895 did the {{< gh-hovercard "10633" "preliminary work" >}} to allow changing the aspect ratio, and newcomer [AbandonedCart](https://github.com/AbandonedCart) {{< gh-hovercard "10639" "did the actual magic." >}} + +{{< single-title-imgs + "That’s a spicy music player (Super Smash Bros. Ultimate)" + "./pip1.png" + "./pip2.png" + >}} + +Later, a {{< gh-hovercard "10811" "button to mute/unmute" >}} was added to the Picture-in-Picture overlay. + +Android doesn’t only run on phones and tablets. You can find people crazy enough to play yuzu on TVs too! +For those madlads, newcomer [qurious-pixel](https://github.com/qurious-pixel) added support for an {{< gh-hovercard "10650" "Android TV" >}} banner. +Thank you! + +{{< imgs + "./tv.png| NVIDIA SHIELD anyone?" + >}} + +Since release, users have reported games looking strangely blurry, and issues with the aspect ratio of the rendering window and the orientation of the overlay controls when flipping the device. + +This is a bit of an embarrassing one: all those issues were caused by decoupling the rotation of the Vulkan surface with the frontend layer. +This explains why aspect ratios were distorted and the overlay was inverted when the device was rotated, but the explanation for the blurriness issue deserves special mention. +Games present to the screen in docked mode using a landscape form factor and resolution of 1920x1080, but phones typically have a portrait mode form factor. +What happens if the window starts rendering at 1920x1080, then gets modified to 1080x1920 by the device and is stretched to fit the screen? Well, this: + +{{< single-title-imgs-compare + "Did we mention we’re new at this?" + "./tv.png" + "./bunnei.png" +>}} + +{{< gh-hovercard "10703" "By keeping rotation in sync," >}} both intentionally by the user and unintentionally by the device, all mentioned issues are solved. Oops! + +Continuing the effort of reaching feature parity with the desktop builds, [german77](https://github.com/german77) added support for {{< gh-hovercard "10705" "installing updates and DLCs" >}} to NAND, just like on PC. + +{{< imgs + "./dlc.png| Remember to hold to select multiple files!" + >}} + +AbandonedCart once again comes to the rescue by adding support to allow this option to {{< gh-hovercard "10794" "install multiple files" >}} at once. +It’s not fun having to constantly repeat the process to install every single thicc `Atelier Ryza: Ever Darkness & the Secret Hideout` DLC, but it’s so worth it. + +Big Boss [bunnei](https://github.com/bunnei) made some changes to the {{< gh-hovercard "10746" "default graphics settings" >}} to improve the out-of-the-box experience, as well as add options required to solve rendering issues and/or improve performance. + +Joining yuzu on Android from the desktop release is `Reactive Flushing`, an option that can significantly reduce performance in the name of rendering accuracy. +To provide the best performance, the option is disabled by default, but if you want accurate shadows in Bayonetta games, or proper save thumbnails, remember to enable it. + +`Force maximum clocks` is now disabled by default, since it’s not very relevant while the main bottleneck is on the CPU side of the emulation process. +We’ll revisit this toggle once native code execution is implemented. + +{{< imgs + "./gpu.png| Feature parity with the PC releases, little by little" + >}} + +An often forgotten feature of the Nintendo Switch is touch support. +While in handheld mode, some games allow you to play without controls, just with the screen. +Support was present since release for the Android build, but it wasn’t accurate — the touch event would happen offset to the side of where the user would touch their finger. german77 fixed this {{< gh-hovercard "10751" "touchy behaviour," >}} making playing visual novels with no overlay buttons a joy. + +One of the nice additions of Android 13 is the option to set {{< gh-hovercard "10760" "per-app languages," >}} so properly declaring the available language translations allows users to take advantage of this feature. +Thanks [flTobi](https://github.com/FearlessTobi)! + +{{< imgs + "./lang.png| Your phone knows more languages than you" + >}} + +{{< gh-hovercard "10808" "Expanding the Debug section" >}} a bit, t895 added the option to disable `CPU Fastmem`. +This will reduce performance, but is useful for debugging purposes. + +{{< imgs + "./debug.png| Extremely recommended to leave at default values" + >}} + +Additionally, an option to select the audio backend was added too. + +{{< imgs + "./audio.png| Volume controls" + >}} + +Because it is only supported on Qualcomm devices, t895 {{< gh-hovercard "10864" "now hides" >}} the `Install GPU driver` option if the user is running a non-Qualcomm device. +Since we don’t offer the option to run different drivers on these devices, there’s no reason to show it. +Of course, if Mesa can deliver a good driver for Mali hardware in the future, we will support custom drivers for it then. + +As a way to warn users with devices that may not be capable of stable emulation, AbandonedCart {{< gh-hovercard "10869" "added a warning" >}} if it doesn’t have at least 8GB of RAM. +Android versions prior to the upcoming 14 don’t let apps know the exact RAM amount of the device, so available free RAM is used instead. + +Speaking of which, t895 added {{< gh-hovercard "10945" "support for Android 14." >}} +Better to be ready beforehand! +You never know when Google might surprise us. + +Before we end this section, let us clarify something. +The Android builds are not limited to the changes mentioned here, but also include any other core improvements mentioned in this article. +For instance, the previously discussed GPU changes, and to be discussed memory and ARM optimizations are also included in the Android builds. +These changes have boosted performance by 30-70% in the latest versions, for example, and none were Android specific. + +We have also completed our release backups on GitHub! +You can find them [here.](https://github.com/yuzu-emu/yuzu-android/releases/) +If you want to download a previous version, test experimental features, or avoid using the Google Play Store, feel free to grab the APK from there. + +## Making CPUs go the opposite of BRRR, AMD edition + +[Back in March](https://yuzu-emu.org/entry/yuzu-progress-report-mar-2023/#making-cpus-go-the-opposite-of-brrrr), we explained why Windows is not accurate enough when very high precision timers are required, so in order to improve performance, power consumption, and temperatures on x86_64 CPUs, specific CPU instructions are needed to reduce the time the CPU spends improperly idling. +We have a big mistake to correct here. We said only Intel offered such instructions starting with Alder Lake, and that AMD didn’t offer any. + +Fortunately, we were wrong! AMD does indeed have its own implementation, the `monitorx` and `mwaitx` instructions pair, which have been out since *2015*, predating Ryzen! + +By performing his usual black magic, [Morph](https://github.com/Morph1984) implemented support for these instructions, providing the same benefit only Intel users previously enjoyed, namely performance and battery life improvements for power-limited products (laptops, handhelds) or CPUs with fewer core counts. + +Since AMD CPUs running Windows can now {{< gh-hovercard "10935" "properly idle for longer" >}} while waiting, power consumption and/or performance numbers are improved, depending on which limit is hit first: the power budget of the CPU or a framerate cap. +Sadly, your writer (who got tasked with testing this change) doesn’t have access to an Asus Rog Ally handheld, or even a Ryzen laptop, to do proper benchmarks, so instead please accept the numbers collected with a desktop Ryzen 5 5600X. +The results should be better with a proper mobile platform, but alas, we can only show what we tested. + +Power consumption saw a 10-16% reduction, which translates with this particular CPU model to around a 10W reduction. +While simulating a power limited scenario (capping the PPT to 40W), performance improved up to 60%, but on average a 20% gain is more often expected. + +Now, we can guess what some of you may be thinking, “how much does this help the Steam Deck? That’s a power-limited system with only four cores!” +It makes no difference on the Deck. Let us explain. + +The Steam Deck by default runs a Linux distribution. +Linux doesn’t benefit from these changes as its kernel, unlike Windows’, is actually decent and can run high-precision timer events without any problem or undocumented SDK usage. If there’s no need to spin the CPU at all, it gets to idle properly. +So unless you installed Windows onto your Steam Deck, you already had the best performance it can offer. + +## ARM changes + +The Android release taught us something very important: Using [Dynarmic](https://github.com/merryhime/dynarmic) adds a lot of overhead on ARM CPUs. While this doesn't pose any major obstacles on Apple Silicon M1 and M2 Macs, it's a big problem for Android devices, which are constantly power-limited with virtually no room for waste. + +To reduce the overhead here, we are planning to implement a feature from Skyline, `native code execution`, or NCE, letting the game’s code run directly on the processor untranslated. +This will work for most 64-bit games, but 32-bit Switch games have some special requirements that complicate this. + +NCE is a project that will take some time, but for now, byte[] already implemented a way to {{< gh-hovercard "10747" "decouple Dynarmic" >}} from the ARM interface, allowing for a separate CPU backend in the future. +Let’s see what the future brings. + +We’re still calling it Project Nice, right? Right. + +Regarding 32-bit games, it’s worth mentioning that behind the scenes, [Merry](https://github.com/merryhime) constantly works on optimising and fixing bugs in Dynarmic. +Recently, Merry was able to {{< gh-hovercard "10933" "enable an optimization" >}} for ARM64 host hardware. +Block linking allows blocks of guest code that directly jump to each other to directly jump to each other when recompiled as well. +After enabling it, this resulted in a 60-70% performance boost for 32-bit games like `Mario Kart 8 Deluxe` on Android SoCs. +This serves as yet another reminder that emulation is very CPU-focused. + +## Linux specific fix + +Long gameplay sessions can sometimes feel like a gamble regarding stability. +That’s a very common problem for emulators due to how they have to handle memory in unique ways to match two completely different systems. +This was especially true for Linux users, who had to rely on increasing the size of the `vm.max_map_count` kernel parameter for certain games to avoid out-of-memory crashes. +Since the emulator needs to create placeholder memory mappings to keep up with the virtual memory requirements of the game, it wasn’t hard to saturate the default value, resulting in a crash once the placeholder mappings outnumbered the max mapping count. + +Enter newcomer [kkoniuszy](https://github.com/kkoniuszy), who had a simple yet very effective idea. +By {{< gh-hovercard "10550" "keeping track of the creation" >}} of such placeholder mappings and using that information to create fewer larger ones instead of several smaller ones, the stress on `vm.max_map_count` is reduced and generally no longer needs to be modified. +This results in stable game sessions when playing for hours. +Thank you! + +## Input improvements + +The work to make Amiibos and their Near-Field Communication (NFC) behave the same as on real Switch hardware continues. +With the proper implementation finished [last month](https://yuzu-emu.org/entry/yuzu-progress-report-may-2023/#input-and-amiibo-improvements), german77 has focused on the last items on the checklist. + +First of all, backup support. +On the Switch, Amiibo data is stored in the console every time data is loaded or saved. +This is intended to help games restore corrupted Amiibo tags in case of errors. +{{< gh-hovercard "10623" "With this implementation," >}} yuzu now can do the same with Joy-Cons and Pro Controllers. +The backups will be stored in `%appdata%\yuzu\amiibo\backup`. + +Our input dev added support for Foomiibos, blank but configurable Amiibo dumps with a signature included at the end, by {{< gh-hovercard "10795" "adding their size as a valid input." >}} + +Activision releases NFC equipped toys (aka not-Amiibos) for the `Skylanders` games saga, and they are compatible with the Nintendo Switch, so of course, they must work on yuzu too! +{{< gh-hovercard "10842" "The implementation" >}} should be transparent; just connect and map a controller, and it’s ready to scan the toys. + +And to finish up the NFC section, {{< gh-hovercard "10903" "bugfixes and support for third-party controllers" >}} in a single pull request to rule them all. + +Controllers sometimes fail to properly restore to a previous state when pairing. +This could make yuzu lose input when the controller fails to use the NFC sensor. +If the game stopped polling for Amiibos while one was in range, the Amiibo would be lost but not signaled. +This pull request addressed this particular scenario. + +Many third-party controllers don’t accept all commands. +Reducing the number of attempts to obtain valid data and disabling most commands if errors occur will minimise the stuttering caused by the configuration process when setting up the NFC interface. + +Lastly, if the controller properly reports support for NFC, but the user loads an amiibo from a binary dump, we would mistakenly show an error. +This is now fixed. + +Now, what about regular input changes? Well, we have a bit to talk about there too. + +SDL, the external library used here to handle input (it can do much more than that), does get updates, and it doesn’t hurt to keep up with those from time to time, after validating they are stable, of course. +{{< gh-hovercard "10873" "Updating to version 2.28.0" >}}improved the calibration profile used on official Switch controllers, added support for the new DualSense Edge controller from Sony, {{< gh-hovercard "10891" "fixed some issues with Pro Controllers," >}} and added other minor changes and fixes that benefit the emulator. + +{{< gh-hovercard "10950" "Mouse controls" >}} got more tuning love. +This time there are some minor tweaks to its calibration. +Returning to center will consider the assigned deadzones, and motion input has better sensitivity. + +For those not in the know, if you set input to Keyboard/Mouse, or manually map a stick to the mouse, you can use the mouse for controlling movement. +`Ctrl + F9` is the default hotkey to take and release control of the mouse while playing. + +Lastly, for the fitness enthusiasts, there are some improvements for the Ring-Con. + +german77 improved Ring detection by {{< gh-hovercard "10937" "adding timeouts" >}} to let the scanning process try again after a fixed time. + +And newcomer [kiri11](https://github.com/kiri11) {{< gh-hovercard "10908" "improved the wording" >}} of the help text to properly enable the Ring-Con, making it much less confusing. +Thanks! + +{{< imgs + "./ringcon.png| Fitness at 4K" + >}} + +## Yet more Gaia-lite + +Yes, there’s more progress by byte[] in fixing the current file system implementation while we wait for `Project Gaia`. + +The [previously reported](https://yuzu-emu.org/entry/yuzu-progress-report-may-2023/#project-gaia-lite) “algorithmic complexity issue” when loading mods was working like a charm on Linux, but Windows always has to be difficult. +A {{< gh-hovercard "10588" "memory cache" >}} was added to fully realise the load time benefits on Microsoft’s OS too. + +In another single-line-of-code revelation, byte[] discovered that {{< gh-hovercard "10718" "increasing the size of the buffer" >}} when copying files can more than triple the installation speed of updates and DLCs. +Hurray for simple fixes like this! + +A common problem modders and users had to deal with is a hard limit on the number of files that can be loaded per session. +Games like `Fire Emblem Engage` have so many files that it previously was not even possible to replace all of them with a mod. +Of course, byte[] wasn’t happy with this, so by adding a file [LRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)) cache to control the number of open files, he {{< gh-hovercard "10729" "removed the file limit." >}} +Users can now run as many mods as they want on their games, and they can have as many files as they need too! + +But the fun doesn’t stop there for byte[]. Yet again, Windows demands special attention… +{{< gh-hovercard "10806" "A couple of optimizations" >}} and Windows users can now properly benefit too. + +An oversight in the code responsible for caching RomFS mods prevented any caching from taking effect at all, making yuzu take typically twice as long as it needed to when loading a game with them enabled. +By {{< gh-hovercard "10594" "fixing" >}} this oversight, byte[] further reduced game load times with mods. + +## Audio fixes + +Linux users running the SDL audio backend reported having no audio out when using the JACK output. +The problem, as newcomer [zeltermann](https://github.com/zeltermann) found out after some investigation, is in how SDL identifies the CPU characteristics of the user’s hardware. + +SDL’s `CPUInfo` subsystem is called to report the specifications of the user’s CPU. SDL then uses that information to properly configure itself for the environment it will run on, setting optimizations and deciding which internal code paths to use. +We thought CPUInfo shouldn’t be necessary just for audio output, so it was disabled in yuzu. + +Well, under normal circumstances, it would have been fine, but SDL can’t decide if not having CPU information means there is or there isn’t a CPU present. +[SIMD](https://en.wikipedia.org/wiki/Single_instruction,_multiple_data) support is reported as disabled, but [SSE2](https://en.wikipedia.org/wiki/SSE2) is assumed as enabled. +This contradiction leads to the fallbacks intended to run in case SIMD support was disabled to fail, making some functions return null, completely destroying audio output. + +This chain reaction of events is solved by giving SDL what it wants: a proper {{< gh-hovercard "10739" "report by CPUInfo." >}} +Now Linux users can enjoy their games with audio when using the SDL output. +Thank you! + +Out-of-bounds, the silent killer of so many programs… yuzu is of course not immune to them, as Morph found out. +An {{< gh-hovercard "10966" "out-of-bounds write" >}} leads to corruption in an audio heap buffer, which leads to beeping noises, speaker rattling, and crashes in multiple games, including but not limited to `Xenoblade Chronicles: Definitive Edition`, `Xenoblade Chronicles 2`, `Super Smash Bros. Ultimate`, and more. + +A few tweaks here and there in the audio core code, and the issues are gone. + +## UI changes + +Switch games provide pretty game icons for the launcher. +Needless to say, yuzu makes good use of them while rendering the game list. +What wasn’t considered when using these icons for the user interface is that some games offer multiple alternatives for different languages. +yuzu would just pick the first one available. + +Enter newcomer [keve1227](https://github.com/keve1227) who coded in the {{< gh-hovercard "10591" "logic required" >}} to properly pick the right image depending on the console language the user picks in `Emulation > Configure… > System > Language`. +Thanks! + +{{< single-title-imgs + "Gotta find ’em all" + "./langbug.png" + "./langfix.png" + >}} + +The OpenGL API has three available shader backends in yuzu, and since the only way to know which one is selected is from checking the option in `Emulation > Configure… > Graphics`, newcomer [fastcall](https://github.com/xcfrg) decided it was due time to {{< gh-hovercard "10614" "add this info" >}} to the status bar. +Thanks! + +{{< imgs + "./oglui.png| You won’t forget you left GLASM enabled any more!" + >}} + +## Hardware section + +Before starting with the driver rants, we want to share a possible way to save up to 2 GB of VRAM by taking advantage of Windows 11’s per-app graphics selector, assuming you have multiple GPUs available in your system. +This has the potential of helping VRAM-intensive games like `The Legend of Zelda: Tears of the Kingdom`, and may also improve 1% lows on native PC games too. + +For some reason, Windows uses around 1-2 GB of VRAM only for rendering the desktop. +That’s a heavy blow for GPUs equipped with 8 GB or less, without even considering other programs running in the background. + +The requisites are a desktop PC running an up-to-date Windows 11, either a motherboard with two full length PCI-Express slots or a CPU with an integrated GPU, and all GPUs being new enough to still get driver updates (a GT 710 won’t work with an RTX 4070 as they run different driver versions, and an Intel HD 620 won’t receive new driver updates). In this example we will use an RTX 3060 Ti and an RX 6600, a combination you might be familiar with from previous articles and charts. +A lower-end GPU like a GTX 750 or the integrated GPU of an Intel 11th Gen. (and newer) or Ryzen CPU would also work perfectly fine for this purpose. + +It should be noted that most laptop users already do this with no user intervention, as most laptops don’t include hardware mux switches and just pass the finished frames over the PCIe bus. + +The main trick here is to connect the display or displays to the secondary card, in order to get Windows, your browser, Discord, etc., to spend VRAM exclusively on the secondary card, letting yuzu and other programs/games get full access to the entire VRAM of the main GPU. +To do this, we will take advantage of some relatively recent additions to Windows 11. + +The first step after setting up the GPUs (desktop PCs may need to enable integrated GPUs on the UEFI configuration/BIOS) is to select the high performance card in display settings: + +{{< single-title-imgs + "On desktop PCs, Windows 10 fails here by not letting you select which card is which" + "./gpu1.png" + "./gpu2.png" + "./gpu3.png" + >}} + +While this is enough for yuzu after a reboot, you will also need to manually set up each game or program that requires using the high performance GPU: + +{{< single-title-imgs + "Tech tip: Forza is faster if you run it with your main GPU" + "./gpu4.png" + "./gpu5.png" + "./gpu6.png" + >}} + +Like this, you get the benefits of more free VRAM on the high performance GPU, and if the secondary GPU is more efficient, a power consumption reduction overall when using the PC. More available VRAM results in improved minimum framerates (the 1% low for example). + +The cons for using this method is that frame data is transferred over the PCIe interface, which can be saturated. +This can result in slightly lower average framerates and more input lag. +But hey, a free way to get a 4GB GPU to run `The Legend of Zelda: Tears of the Kingdom` with better frame pacing is worth a try, right? + +### NVIDIA, no sign of progress + +The new (at the time of writing) 536.40 driver release that adds support for the RTX 4060 hasn’t introduced any regression for yuzu. +So it’s safe to update, just not “safe to upgrade” from older hardware yet. +Maybe the RTX 5000 series will be a more viable option. + +And from an interesting report that just came in, it seems using the NVIDIA Control Panel’s “Prefer maximum performance” option while playing `Xenoblade Chronicles 3` in conjunction with “Use asynchronous shader building” causes vertex explosions, most noticeably in cutscenes. +yuzu’s own “Force maximum clocks” toggle, while less efficient, doesn’t reproduce this interesting behaviour. +Something to keep in mind if you’re exploring Aionios with an NVIDIA GPU. + +### AMD + +Since driver release 23.7.1, a mysterious older “23.10.01.41 for Additional Vulkan Extensions” version, and the beta driver only available to Windows Insider testers, AMD official Vulkan drivers introduced a regression in how the `VK_EXT_extended_dynamic_state3` extension handles colour blending. +[Your writer](https://github.com/goldenx86) {{< gh-hovercard "10946" "blocked the affected bit" >}} while we monitor if future AMD driver releases manage to solve this problem. + +{{< single-title-imgs-compare + "Who gave Link the Batman’s Detective Mode? (The Legend of Zelda: Tears of the Kingdom)" + "./amdbug.png" + "./amdfix.png" +>}} + +The performance loss from this change is very small, so feel free to update to the latest drivers. + +[GPUCode](https://github.com/GPUCode) has found a way to emulate D24 support on AMD GPUs by using the `VK_EXT_depth_bias_control` extension, which is currently only available on the RADV Mesa driver on Linux. +In the near future, we’ll check if this method solves the remaining graphical issues specific to AMD hardware. +If it works, it would also solve the issue on the AMD official drivers, once/if the extension is supported there too. + +We know it’s not fun having to switch to OpenGL to be able to play some games, so we’re gearing up to combat even hardware limitations to defeat this foe. + +### Intel + +Intel had its fair share of fixes this month too. +First of all, as promised last month, byte[] added a translation for FP64 to FP32 when used in shaders. +This was required because Generation 12 Intel graphics (UHD 700/Iris Xe/Arc A series) removed support on a hardware level for double precision operations. +With this {{< gh-hovercard "10693" "shader translation" >}} in place, games will no longer suddenly crash when trying to use these shaders, for example during the opening cutscene of `Tears of the Kingdom` after starting a new game. + +The next issue is an interesting mix of unique behaviour by the Switch's own graphics drivers, yuzu’s code at fault, and another case of lack of hardware support. +Intel's GPUs allow the use of control barriers as specified by SPIR-V, which requires all threads in a dispatch to execute the same barriers at the same times, and don't allow any threads to exit early if another barrier will occur. +But all other GPU vendors besides Intel, including mobile GPUs, do allow threads to exit early, and will free up barriers on the remaining threads as needed. +This situation caused Intel GPUs to hit device losses, as guest compute shaders had barriers that ended up hitting this exact type of control flow. + +By {{< gh-hovercard "10699" "removing barriers" >}} after conditional control flow, Intel GPUs are free from their device loss crashes. + +And lastly, one loose end remained, our toggle to disable the compute pipeline on Intel GPUs. +This option was a stopgap solution until a driver update was released. But since Intel has finally published a driver update fixing the issues, it has now become irrelevant. toastUnlimited therefore modified the option to only show up in yuzu’s settings if an old driver known to be affected is still in use. +The disable compute pipeline toggle is now a {{< gh-hovercard "10835" "legendary drop option" >}} only available for the most unlucky Generation 12 users, as the option will also remain hidden for unaffected Generation 11 and older devices. +[Remember to update your drivers!](https://www.intel.com/content/www/us/en/download/729157/intel-arc-iris-xe-graphics-beta-windows.html) + +With all driver and yuzu stability-related issues fixed, we can finally recommend Intel hardware again, especially current-generation integrated GPUs like the Iris Xe. +While the lower-end 80EU-equipped Iris Xe can bottleneck performance at docked 1X mode in the most intensive games, it makes up for that by having zero texture related stuttering thanks to being the last breed of Intel GPUs with native ASTC texture support. +We don’t know if future iGPUs will keep supporting ASTC, but it’s a reality that Arc dedicated GPUs don’t offer it. + +Still, we can finally focus on working on the few remaining quirks for the Generation 12 architecture. +Right now, the Iris Xe can easily beat a Geforce MX450 in ASTC intensive games like `The Legend of Zelda: Tears of the Kingdom`, using less RAM and having no texture stuttering. +Here, the E-cores are a blessing for shader building. + +Hopefully future Intel products offer better FP16, higher performance, longer driver life support, don’t base their pricing on software gimmicks like their competition, and add a much-needed dedicated compute queue. + +### Android + +With the release of the Android builds, the whole team is learning about the platform’s ecosystem, its features and limitations, quirks and advantages. +There are fun times ahead for sure. +This means we also learned about the depressing state of its GPU drivers… + +#### Adreno, or just waiting for Mesa + +Adreno hardware has great specifications, but their proprietary official drivers are incredibly bad! +We’re starting to work on improving rendering on the official Adreno drivers used by default on Qualcomm equipped devices, but there’s only so much we can do. +The real solution comes from, you guessed it, the team that manages to make good drivers with no access to confidential information: Mesa. + +One has to wonder why Android vendors don’t just use Mesa to begin with. Nothing deemed “confidential” or “trade-secret” here is more important than providing good software support! + +While the Adreno 600 series is well-supported and has great rendering with Mesa Turnip drivers, the 700 series is too new to enjoy the same benefits. +There have been a few packaged releases by [K11MCH1](https://github.com/K11MCH1) using the currently-in-development a700 branch of Mesa Turnip, but it’s exactly what it says on the tin: currently in development. +We can’t work on fixing regressions on a driver that is a work in progress; the only thing to do is to wait for it to mature. + +#### Mali, good drivers, slow hardware, weird decisions + +Mali is the complete opposite of Adreno. While there is no current Mesa support for it, we found their proprietary Vulkan driver to be in great shape once its initial quirks were addressed. +The same can’t be said about their OpenGL ES driver as our friends at Citra will gladly tell you, but thankfully that’s not an issue here. +The main problem is that the most common hardware the driver gets to run on is pretty subpar, at least for Switch emulation. +Clearly, high-end devices won’t have much issue on the GPU front as they are not far behind Adreno in hardware specs, but the rest of the product stack will suffer from low framerates and GPU bottlenecks. + +Unfortunately, due to an unstable kernel API, and the lack of a maintained Mesa driver for these devices, there isn't currently any practical way to replace the running driver on a Mali device with a better one. +If a device ships with an outdated driver too old for yuzu and the vendor doesn’t update it, chances are nothing can be done about it. + +That’s either planned obsolescence at its finest, or sheer incompetence. We’ll let you be the judge of that. + +## Future projects + +Fun stuff is cooking, we can’t announce the several yet-unnamed projects at the moment, but know this ship isn’t slowing down any time soon. + +There’s work by Blinkhawk for faster GPU emulation, native code execution for ARM CPUs, MacOS gets a bit of much needed love, and more. +We’ll be reporting progress on these projects in the future, so keep your eyes peeled. + +toastUnlimited started a big UI rewrite for the [per-game configurations](https://github.com/yuzu-emu/yuzu/pull/10839). + +Some changes that didn’t make it in time for the cut-off date of this article include fixing crashes affecting Unreal engine games running on NVIDIA GPUs. +We’ll cover those next month. + +That’s all folks! Thank you for reading until the end. We hope to see you next month! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-jun-2023/lang.png b/site/content/entry/yuzu-progress-report-jun-2023/lang.png new file mode 100644 index 000000000..936f90162 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/lang.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/langbug.png b/site/content/entry/yuzu-progress-report-jun-2023/langbug.png new file mode 100644 index 000000000..5029bddbe Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/langbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/langfix.png b/site/content/entry/yuzu-progress-report-jun-2023/langfix.png new file mode 100644 index 000000000..0f6c03eef Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/langfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/mali1.png b/site/content/entry/yuzu-progress-report-jun-2023/mali1.png new file mode 100644 index 000000000..6306e5fc1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/mali1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/mali2.png b/site/content/entry/yuzu-progress-report-jun-2023/mali2.png new file mode 100644 index 000000000..a06f8ff0a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/mali2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/mali3.png b/site/content/entry/yuzu-progress-report-jun-2023/mali3.png new file mode 100644 index 000000000..d618cc681 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/mali3.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/mali4.png b/site/content/entry/yuzu-progress-report-jun-2023/mali4.png new file mode 100644 index 000000000..810e0cf2c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/mali4.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/mali5.png b/site/content/entry/yuzu-progress-report-jun-2023/mali5.png new file mode 100644 index 000000000..2e499c551 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/mali5.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/move.png b/site/content/entry/yuzu-progress-report-jun-2023/move.png new file mode 100644 index 000000000..8cffecf82 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/move.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/mprbug.png b/site/content/entry/yuzu-progress-report-jun-2023/mprbug.png new file mode 100644 index 000000000..f37ddfad6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/mprbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/mprfix.png b/site/content/entry/yuzu-progress-report-jun-2023/mprfix.png new file mode 100644 index 000000000..ecac0f72d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/mprfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/ogl.png b/site/content/entry/yuzu-progress-report-jun-2023/ogl.png new file mode 100644 index 000000000..2981772be Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/ogl.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/oglui.png b/site/content/entry/yuzu-progress-report-jun-2023/oglui.png new file mode 100644 index 000000000..3fddde464 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/oglui.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/opacity.png b/site/content/entry/yuzu-progress-report-jun-2023/opacity.png new file mode 100644 index 000000000..fe14b4c0d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/opacity.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/ov1.png b/site/content/entry/yuzu-progress-report-jun-2023/ov1.png new file mode 100644 index 000000000..a4f9fb835 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/ov1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/ov2.png b/site/content/entry/yuzu-progress-report-jun-2023/ov2.png new file mode 100644 index 000000000..89bba1202 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/ov2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/overlay.png b/site/content/entry/yuzu-progress-report-jun-2023/overlay.png new file mode 100644 index 000000000..bafc20c00 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/overlay.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/picbug.png b/site/content/entry/yuzu-progress-report-jun-2023/picbug.png new file mode 100644 index 000000000..2745ba3e7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/picbug.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/picfix.png b/site/content/entry/yuzu-progress-report-jun-2023/picfix.png new file mode 100644 index 000000000..239e396f9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/picfix.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/pip1.png b/site/content/entry/yuzu-progress-report-jun-2023/pip1.png new file mode 100644 index 000000000..ed75248c3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/pip1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/pip2.png b/site/content/entry/yuzu-progress-report-jun-2023/pip2.png new file mode 100644 index 000000000..8d87ec225 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/pip2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/pm4.png b/site/content/entry/yuzu-progress-report-jun-2023/pm4.png new file mode 100644 index 000000000..ce19749ed Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/pm4.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/rainbug.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/rainbug.mp4 new file mode 100644 index 000000000..bfc7bb705 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/rainbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/rainfix.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/rainfix.mp4 new file mode 100644 index 000000000..2fa414474 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/rainfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/ringcon.png b/site/content/entry/yuzu-progress-report-jun-2023/ringcon.png new file mode 100644 index 000000000..d87e719bf Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/ringcon.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/scarletbug.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/scarletbug.mp4 new file mode 100644 index 000000000..5f6eebe45 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/scarletbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/scarletfix.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/scarletfix.mp4 new file mode 100644 index 000000000..1a8051497 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/scarletfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/smobug.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/smobug.mp4 new file mode 100644 index 000000000..7ffe0779c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/smobug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/smofix.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/smofix.mp4 new file mode 100644 index 000000000..11f3fd324 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/smofix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/summary.png b/site/content/entry/yuzu-progress-report-jun-2023/summary.png new file mode 100644 index 000000000..f2e2e906c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/telebug.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/telebug.mp4 new file mode 100644 index 000000000..f4310169a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/telebug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/telefix.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/telefix.mp4 new file mode 100644 index 000000000..d6daad680 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/telefix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/tv.png b/site/content/entry/yuzu-progress-report-jun-2023/tv.png new file mode 100644 index 000000000..e80f63631 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/tv.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/xc3bug.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/xc3bug.mp4 new file mode 100644 index 000000000..6e02eb21d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/xc3bug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/xc3fix.mp4 b/site/content/entry/yuzu-progress-report-jun-2023/xc3fix.mp4 new file mode 100644 index 000000000..0e439cdd9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/xc3fix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/yfcbug1.png b/site/content/entry/yuzu-progress-report-jun-2023/yfcbug1.png new file mode 100644 index 000000000..ae00dffc9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/yfcbug1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/yfcfix1.png b/site/content/entry/yuzu-progress-report-jun-2023/yfcfix1.png new file mode 100644 index 000000000..9b965bd3b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/yfcfix1.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/yfcfix2.png b/site/content/entry/yuzu-progress-report-jun-2023/yfcfix2.png new file mode 100644 index 000000000..0e59c9232 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/yfcfix2.png differ diff --git a/site/content/entry/yuzu-progress-report-jun-2023/yvcbug1.png b/site/content/entry/yuzu-progress-report-jun-2023/yvcbug1.png new file mode 100644 index 000000000..44b28c83c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-jun-2023/yvcbug1.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/01.png b/site/content/entry/yuzu-progress-report-mar-2020/01.png new file mode 100644 index 000000000..18aa5cbe2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/01.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/02.png b/site/content/entry/yuzu-progress-report-mar-2020/02.png new file mode 100644 index 000000000..eaf6bead9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/02.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/03.png b/site/content/entry/yuzu-progress-report-mar-2020/03.png new file mode 100644 index 000000000..9c9408574 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/03.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/04.png b/site/content/entry/yuzu-progress-report-mar-2020/04.png new file mode 100644 index 000000000..29a6691d9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/04.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/05.png b/site/content/entry/yuzu-progress-report-mar-2020/05.png new file mode 100644 index 000000000..d4a8badb8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/05.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/06.png b/site/content/entry/yuzu-progress-report-mar-2020/06.png new file mode 100644 index 000000000..8116f7bf8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/06.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/07.png b/site/content/entry/yuzu-progress-report-mar-2020/07.png new file mode 100644 index 000000000..a7993396f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/07.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/08.png b/site/content/entry/yuzu-progress-report-mar-2020/08.png new file mode 100644 index 000000000..0b989fe22 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/08.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/09.png b/site/content/entry/yuzu-progress-report-mar-2020/09.png new file mode 100644 index 000000000..2833b54a3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/09.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/11.png b/site/content/entry/yuzu-progress-report-mar-2020/11.png new file mode 100644 index 000000000..bcffd7ec7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/11.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/12.png b/site/content/entry/yuzu-progress-report-mar-2020/12.png new file mode 100644 index 000000000..1f1a7a077 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/12.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/13.PNG b/site/content/entry/yuzu-progress-report-mar-2020/13.PNG new file mode 100644 index 000000000..743ec8fce Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/13.PNG differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/14.png b/site/content/entry/yuzu-progress-report-mar-2020/14.png new file mode 100644 index 000000000..d3f1f9f5e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/14.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/15.png b/site/content/entry/yuzu-progress-report-mar-2020/15.png new file mode 100644 index 000000000..df0014a16 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/15.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/banner.png b/site/content/entry/yuzu-progress-report-mar-2020/banner.png new file mode 100644 index 000000000..6f586c065 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2020/index.md b/site/content/entry/yuzu-progress-report-mar-2020/index.md new file mode 100644 index 000000000..b6d7a8eda --- /dev/null +++ b/site/content/entry/yuzu-progress-report-mar-2020/index.md @@ -0,0 +1,128 @@ ++++ +date = "2020-04-20T07:11:00-03:00" +title = "Progress Report March 2020" +author = "GoldenX86" +forum = 217502 ++++ + +How are you doing in this quarantine, yuzu fans? We hope you are all staying in your homes safe and sound. +Today, we are bringing you a report on a few changes from the past month for both the Early Access and regular Mainline versions of yuzu. + + +We have on our plate a couple of bug fixes, some graphical improvements, the first “performance win” for Intel GPUs, a really serious case of serendipity, and some groundwork for amazing improvements that will be coming to you in a “near-ish” future. + +## Bug fixes and improvements + +After some intensive debugging by [Rodrigo](https://github.com/ReinUsesLisp), an OpenGL rendering bug in *ARMS* (that was with us since the game started to boot), was solved by simply updating our buildbot virtual machine from Visual Studio 2017 to the latest 2019 version. +Thanks to [DarkLordZach](https://github.com/DarkLordZach) for the change! + +PSA - Please update to or install the latest [Visual C++ 2019 x64 redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads), or else you won’t be able to open yuzu, as it will complain that the library `VCRUNTIME140.dll` cannot be found. + +{{< single-title-imgs + "Better, right?" + "./03.png" + "./04.png" + >}} + +[perillamint](https://github.com/perillamint) and [bunnei](https://github.com/bunnei) stubbed (this means to send a fake `everything’s OK` signal so the game can continue) some VR related services. +These changes are needed for version 1.6.0 of *The Legend of Zelda: Breath of the Wild*, 1.3.0 of *Super Mario Odyssey*, and versions 3.1.0 and above of *Super Smash Bros. Ultimate*. + +Commercial games aren't everything. +[Rodrigo](https://github.com/ReinUsesLisp) decided to give homebrew lovers and old-school gamers something to play with by implementing some attributes from the old OpenGL 1.X and 2.X days. +It’s now possible to run `Xash3D`, so you can frag in Counter-Strike, or follow G-Man’s orders in Half-Life! +Currently, this needs to be manually built with newer dependencies, but that should be solved for good in the near future. + +[Margen67](https://github.com/Margen67) and [Morph](https://github.com/Morph1984) wanted to improve the graphics for games and so they added Anisotropic Filtering (AF) to yuzu. +With this feature in place, distant textures now look much sharper, improving game quality even over what the original Switch can produce! +Games like *Pokémon Sword*, *Pokémon Shield*, and *Fire Emblem: Three Houses* benefit a lot from this; however, some other games don’t respond well to this new feature, one example being *Astral Chain*. +Feel free to experiment with it! + +An example in *Pokémon Sword*: + +{{< imgs + "./15.png| AF Off" + "./14.png| AF 16x" + >}} + +And another example in *Fire Emblem: Three Houses*: + +{{< imgs + "./01.png| AF Off" + "./02.png| AF 8x" + >}} + +Shader cache invalidations are something our users don’t like at all. +We don't either, but it’s all part of the process of improving yuzu to achieve better performance and accuracy. +For example, one of our recent invalidations was needed to fix the reflections in *Luigi’s Mansion 3*, making certain parts of the game playable. + +Because the art of dancing is important, [namkazt](https://github.com/namkazt) and [Rodrigo](https://github.com/ReinUsesLisp) have been fighting with the code, allowing us to enjoy 3D graphics in *Hatsune Miku: Project DIVA MEGA39's*, and as collateral, fixed some rendering issues in *Bayonetta 1* and *Super Smash Bros. Ultimate*. + +{{< imgs + "./07.png| Miku Miku Dance!" + >}} + +{{< single-title-imgs + "Super Smash Bros. Ultimate's menu (Before & After)" + "./08.png" + "./09.png" + >}} + +[Kewlan](https://github.com/Kewlan), a regular in our Discord Server, submitted a small change to our input mapping GUI, changing the position of the shoulder buttons so they no longer make anyone angry. + +{{< imgs + "./11.png| Incorrect." + "./12.png| Much better." + >}} + +We also have a cool improvement by [Tobi](https://github.com/FearlessTobi). +The Switch is a surround sound compatible console and our implementation of downmixing removed any channel that wasn’t left or right. +By keeping the extra channels and mixing them in the left and right stereo outputs, the sound in tons of games, including *Luigi’s Mansion 3*, *Sonic Forces*, and *Bayonetta*, has been improved. + +## A peculiar case of "Even a broken clock is right twice a day!" + +The Nintendo Switch supports `ASTC`, a type of texture format generally used in mobile hardware, such as phones and tablets, in order to reduce bandwidth usage (a limited resource in those devices). +Since it's a heavily compressed format, decoding it via the CPU, like it is normally done on PC, is a time-consuming task. + +To give an example, Astral Chain is a game that uses `ASTC` very extensively and in bizarre ways, as previous fixes and optimizations have shown. +On NVIDIA and AMD graphics hardware, the first scene of a new game typically takes `17` seconds to load. The GPU has to wait for the CPU to decode all the `ASTC` textures, and thus slowing down the whole process. + +Thanks to [Rodrigo's](https://github.com/ReinUsesLisp) research, it was discovered that on any recent Intel GPU this same operation is immediate and occurs with no delay, due to it being the only vendor providing a native `ASTC` decoder in their hardware. +That’s right, the best way to experience Astral Chain in yuzu is with a small, and typically inferior, iGPU (like the ones that come in any desktop or notebook CPU from Intel). + +On the topic of formats, implementing the `RG32` and `RGB32` vertex formats fixed a room that refused to load in The Legend of Zelda: Link’s Awakening in Vulkan. +Great work, [Rodrigo](https://github.com/ReinUsesLisp)! + +{{< imgs + "./13.PNG| It works!" + >}} + +## Paving the road for even bigger changes + +[Rodrigo](https://github.com/ReinUsesLisp)'s initial work on `Transform Feedback` has concluded and is now partially working. +This has already helped games like POKKÉN Tournament DX, Donkey Kong Country: Tropical Freeze and Xenoblade Chronicles. + +An optimization by [Blinkhawk](https://github.com/FernandoS27) reduced the use of RAM by 1GB. +When talking about RAM usage, less is best! + +Now, for an important but also astonishing fix; one that nobody expected, not even our project leader [bunnei](https://github.com/bunnei). +While he was working on fixing what seemed to be a simple bug on Final Fantasy VIII, he also accidentally fixed Super Smash Bros. Ultimate fights! +This case of serendipity, is without a doubt, a surprise, but a welcome one. + +Now all users can brawl to their hearts' content thanks to a measly 5-line change in yuzu’s code! +However, keep in mind that any Super Smash Bros. Ultimate update newer than 3.1.0 will work, but will also make the characters T-pose, resulting in hilarious fights and victory screens. +We’re working on resolving this, but for now, stick to update 3.1.0 or older! + +[bunnei](https://github.com/bunnei) fixed audio crackling in various games like Crash Team Racing and Super Mario Odyssey. +We are slowly but surely improving our audio quality. +He also implemented initial support for `32-bit ARM` emulation. +Nothing tangible can be tested yet, but thanks to this, it will be possible in the future to run `32-bit` games like Mario Kart 8 Deluxe. + +And last but not least, [Blinkhawk](https://github.com/FernandoS27) has been making some serious changes to yuzu's GPU emulation, while also laying the foundation for the recent rework of yuzu's Virtual Memory Manager (codename: Project Epimetheus). + +These, in turn, will help further advance the development of Project Prometheus, one of the super-secret Projects our devs are currently working on to bring some considerable changes to yuzu’s performance and hardware requirements. +Stay tuned to hear more about them in the future! + +That’s all for now folks, see you in the April report. + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-mar-2020/summary.png b/site/content/entry/yuzu-progress-report-mar-2020/summary.png new file mode 100644 index 000000000..4673e9601 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2020/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/banner.png b/site/content/entry/yuzu-progress-report-mar-2021/banner.png new file mode 100644 index 000000000..5b9d7cdd1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/index.md b/site/content/entry/yuzu-progress-report-mar-2021/index.md new file mode 100644 index 000000000..2bb528371 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-mar-2021/index.md @@ -0,0 +1,153 @@ ++++ +date = "2021-04-10T12:00:00-03:00" +title = "Progress Report March 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 391903 ++++ + +Hi yuz-ers, we're here with the March progress report to offer you our latest news! We continue to update the Kernel, some considerations have been made for specific hardware, we have several changes and fixes to discuss, and we have a sneak peek at the progress on Project Hades. + + + +## General bug fixes and improvements + +[Morph](https://github.com/Morph1984) to the rescue! [Fixing CalculateSpanBetween](https://github.com/yuzu-emu/yuzu/pull/6053) allows `Super Smash Bros. Ultimate’s` Spirit Board to work! +A separate PR [improving ClockSnapshot](https://github.com/yuzu-emu/yuzu/pull/6054) fixes the timers. + +{{< imgs + "./spirit.png| More work is needed to make World of Light playable, we continue to fight for it! (Super Smash Bros. Ultimate)" + >}} + +Those who have paid attention to our previous progress reports will notice that we sometimes write about when a service is `stubbed` (ignored, basically) to allow a game to progress further. +This process requires manual intervention each and every time a game update or new game uses a new unimplemented service. +To mitigate user frustration, [epicboy](https://github.com/ameerj) implemented [Auto-Stubbing](https://github.com/yuzu-emu/yuzu/pull/6062), continuing [previous work](https://github.com/yuzu-emu/yuzu/pull/4237) from [ogniK.](https://github.com/ogniK5377) + +With this toggle, games will just ignore any unimplemented services and continue running, allowing developers to focus on the services that need urgent, proper implementations. +This is not a new invention by any means. Several emulators in the past have used this feature to great benefit, reducing the load on developers and providing a better experience for the end user. + +Keep in mind that auto-stub will be always disabled by default on each boot, so it has to be manually enabled for each session by going to `Emulation > Configure > General > Debug > Enable Auto-Stub`. + +{{< imgs + "./stub.png| You can find it here, at the bottom of the picture in the Advanced section" + >}} + +[Morph](https://github.com/Morph1984) took it upon himself to [update the emulated Switch firmware version to 11.0.1](https://github.com/yuzu-emu/yuzu/pull/6070), and [the NgWord version,](https://github.com/yuzu-emu/yuzu/pull/6069) improving compatibility with recent games, and solving some odd bugs. +For example, `Disgaea` games no longer require a firmware dump to be playable. + +We now have some new additions to our command line arguments thanks to [german77](https://github.com/german77). +Users can [select which user profile to load](https://github.com/yuzu-emu/yuzu/pull/6116) by adding the `-u #` argument to their command, with `#` being the profile number. +For example, by using `yuzu.exe -u 1 -g "path_to_game"`, the second profile will be selected. + +In an attempt to reduce file size when downloading yuzu and also reduce the download size when building it from source, [toastUnlimited](https://github.com/lat9nq) reworked [how FFmpeg is linked](https://github.com/yuzu-emu/yuzu/pull/5880). +This way, only what is needed for yuzu is built, reducing the size and build time required for this module, and as an added bonus Linux users will avoid problems with possible outdated versions included in their distributions. Data capped users rejoice! + +[ivan-boikov](https://github.com/ivan-boikov) fixed an [issue where pressing Cancel would result in the wrong destination folder](https://github.com/yuzu-emu/yuzu/pull/6092) in the file system configuration. Nothing beats quality of life fixes! + +`Microsoft Visual Studio`, by default, will compile applications with the character set corresponding to the region of the local developer’s PC. +This limitation can cause issues for certain regions like Asia when trying to build our source. +Morph bypassed this limitation [by forcing the UTF-8 character set.](https://github.com/yuzu-emu/yuzu/pull/6029) +As an added benefit, some UI elements like up and down arrows started rendering. Free bonus. + +{{< imgs + "./utf8.png| There's nothing like a good arrow icon." + >}} + +While a ton of work is needed to make `MONSTER HUNTER RISE` run, including finishing the shader decompiler rewrite and implementing the asynchronous software keyboard, that doesn’t mean [ogniK](https://github.com/ogniK5377) can’t start some preliminary work. +In this particular case, the focus is to improve [`Parental Control` emulation,](https://github.com/yuzu-emu/yuzu/pull/6112) bringing it closer to the Switch’s native hardware implementation. + +## Graphic improvements + +Since the introduction of `Asynchronous shaders`, we noticed that not all drivers like the feature. +In particular, Intel Windows OpenGL, and the proprietary AMD drivers (for both Windows with Adrenalin, and Linux with AMDGPU-PRO) despise the setting, with Intel ignoring it at a driver level, and AMD outright skipping frames, resulting in massive stuttering. + +[toastUnlimited](https://github.com/lat9nq) [added a blacklist](https://github.com/yuzu-emu/yuzu/pull/6095) for our red and blue GPU users, ensuring no performance or graphical regressions occur while attempting to use a feature that their drivers can’t support in OpenGL anyway. +It’s worth mentioning that Asynchronous shaders work as intended in Vulkan and all free Linux OpenGL drivers, be it for AMD or Intel. Nvidia works as expected on any combination of API or OS with their proprietary drivers. +Thanks to [theboy181](https://github.com/theboy181) for the suggestion! + +[bunnei](https://github.com/bunnei) implemented an optimization that affects all graphic caches (texture, buffer, shader). +By [using a flat array](https://github.com/yuzu-emu/yuzu/pull/6028), cache performance is improved slightly, with the bonus of some memory bandwidth saved due to better resource allocation. +A small but measurable 5% performance bump can be experienced, for example, in `Super Mario Odyssey`. + +## Technical fixes, continued + +The [dynarmic](https://github.com/MerryMage/dynarmic) submodule has been recently [updated in this PR](https://github.com/yuzu-emu/yuzu/pull/6047), merging the latest changes with yuzu. +Thanks to the efforts of [merry](https://github.com/MerryMage/) and [lioncash](https://github.com/lioncash), many `thumb32` instructions (a subset of ARM instructions) were implemented, increasing the amount of instructions supported for 32-bit games on yuzu. + +Additionally, all floating-point instructions received minor optimizations, and a couple of bugs in the implementation of [AVX-512 extensions](https://github.com/yuzu-emu/yuzu/pull/6118) were fixed too. +There was also a problem with `AMD` CPUs, where previously dynarmic disabled the use of the `BMI` instruction set (used for bit manipulation), due to being extremely slow in those processors. +However, on Zen 3 and newer, the performance of these instructions has increased considerably, so now dynarmic allows these `AMD` processors to use `BMI` instructions if the detected CPU is fast enough to perform them. + +All of these changes were possible thanks to the contribution of [Wunkolo](https://github.com/Wunkolo) to dynarmic (which eventually made it to yuzu), so shoutouts for the great work! + +Going back to kernel updates, [bunnei](https://github.com/bunnei/) [reworked and cleaned the kernel memory management code](https://github.com/yuzu-emu/yuzu/pull/6099). +As the name implies, this is the part of the OS that allocates memory resources for games when they request them. +With this change, the implementation matches more closely that of the Nintendo Switch. +As always, these changes make it easier to support any future hardware revisions, along with all other kernel changes that are currently ongoing. + +Bunnei also fixed [a memory leak](https://github.com/yuzu-emu/yuzu/pull/6036) caused by `dummy threads`. +These dummies are used by yuzu to interact with our emulated kernel. +Every "real" emulated thread has a dummy associated with it. +As explained in the [previous progress report](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2021/), yuzu utilizes fibers in order to emulate threads. +However, these dummy threads don't actually use fibers. +With this change, bunnei removed some unnecessary memory overhead by removing the creation of fibers (which would only be needed for "real" emulated threads), thus reducing the memory usage by a bit. + +Another bug that was also fixed by bunnei was related to how [JIT states are saved between page table changes](https://github.com/yuzu-emu/yuzu/pull/6100). +A [page table](https://en.wikipedia.org/wiki/Page_table) is a scheme used to map physical memory into virtual memory, used to give processes the impression they're working with a unique, contiguous section of memory, regardless of where and how this memory is actually stored. +Due to the way dynarmic is coded, whenever yuzu changes the page table that is currently in use, it needs to recreate the CPU JIT. +But, until now, yuzu wasn't saving and restoring the state of this JIT properly when this happened. +However, with this change, all the context needed by the JIT is now stored and retrieved correctly. + +## Input improvements + +Not all devices can do `N-key rollover`, meaning pressing many keys/buttons at the same time without some inputs being missed. +For this, [german77](https://github.com/german77) implemented a [toggle to hold a button for you.](https://github.com/yuzu-emu/yuzu/pull/6040) +This way you can ask yuzu to keep pressing a button, freeing your hand and devices from it, while you move to something else! +To access this feature, right click the Modifier button in control settings, and select `Toggle button`. + +{{< imgs + "./toggle.png| Right click any button or modifier" + >}} + +For those using [Cemuhook](https://cemuhook.sshnuke.net/) to provide motion via an Android device, [german77](https://github.com/german77) has a nice stability improvement for you! +[Each individual socket connection now needs its unique client ID.](https://github.com/yuzu-emu/yuzu/pull/6004) + +In a separate PR, german77 [tests using a single UDP connection per server](https://github.com/yuzu-emu/yuzu/pull/6127) instead of per controller, reducing the error rate thanks to simplified communications. +The end result of this work is more stable connections for motion devices. + +Xbox 360 and Xbox One controllers were incorrectly displayed as just `Xinput Controller` in our device list, causing confusion to our users. +Additionally, the default Pro Controller mapping had its face buttons swapped by mistake. +[german77](https://github.com/german77) [fixed both issues.](https://github.com/yuzu-emu/yuzu/pull/6119) Bad defaults are bad. + +## Future projects + +Project Hades, our rewrite of the shader decompiler, is taking shape. +On the games that can be booted now, we can already measure performance increases and countless bugs fixed. + +Here’s a sneak peak, fresh from the source. + +{{< imgs + "./wip.png| You can say it's one hell of a rewrite!" + >}} + +While our graphics devs continue to rewrite all shader instructions, we can inform everyone that the new pipeline cache for Vulkan is fully working, storing and loading just as well as OpenGL’s shader cache, while even being faster! + +{{< single-title-imgs + "No more hard crashes (Fire Emblem: Three Houses)" + "./wip1.png" + "./wip2.png" + "./wip3.png" + >}} + +On top of that, Rodrigo also implemented a new kind of asynchronous shader “secret technique” that scales better with the number of threads available, and produces zero graphical glitches! + +{{< imgs + "./wip4.png| The Bokoblin Slayer (Hyrule Warriors: Age of Calamity)" + >}} + +We will expand this information once Hades is out and has its own dedicated article. + +That’s all folks! Thank you so much for allowing us to take some of your time, and see you next month! + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-mar-2021/spirit.png b/site/content/entry/yuzu-progress-report-mar-2021/spirit.png new file mode 100644 index 000000000..716aa3c59 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/spirit.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/stub.png b/site/content/entry/yuzu-progress-report-mar-2021/stub.png new file mode 100644 index 000000000..d6536f848 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/stub.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/summary.png b/site/content/entry/yuzu-progress-report-mar-2021/summary.png new file mode 100644 index 000000000..edca6900c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/toggle.png b/site/content/entry/yuzu-progress-report-mar-2021/toggle.png new file mode 100644 index 000000000..c345d2973 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/toggle.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/utf8.png b/site/content/entry/yuzu-progress-report-mar-2021/utf8.png new file mode 100644 index 000000000..df2b6a348 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/utf8.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/wip.png b/site/content/entry/yuzu-progress-report-mar-2021/wip.png new file mode 100644 index 000000000..b78be61a8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/wip.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/wip1.png b/site/content/entry/yuzu-progress-report-mar-2021/wip1.png new file mode 100644 index 000000000..25306da86 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/wip1.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/wip2.png b/site/content/entry/yuzu-progress-report-mar-2021/wip2.png new file mode 100644 index 000000000..c04d96733 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/wip2.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/wip3.png b/site/content/entry/yuzu-progress-report-mar-2021/wip3.png new file mode 100644 index 000000000..c76737149 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/wip3.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2021/wip4.png b/site/content/entry/yuzu-progress-report-mar-2021/wip4.png new file mode 100644 index 000000000..45ae1cf7f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2021/wip4.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/abzubug.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/abzubug.mp4 new file mode 100644 index 000000000..d8f27ea64 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/abzubug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/abzufix.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/abzufix.mp4 new file mode 100644 index 000000000..568d2c8e4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/abzufix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/banner.png b/site/content/entry/yuzu-progress-report-mar-2022/banner.png new file mode 100644 index 000000000..781a110c3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/creditbug.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/creditbug.mp4 new file mode 100644 index 000000000..658aa06a3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/creditbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/creditfix.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/creditfix.mp4 new file mode 100644 index 000000000..3d3eebf91 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/creditfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/dbzbug.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/dbzbug.mp4 new file mode 100644 index 000000000..da0e92a17 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/dbzbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/dbzfix.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/dbzfix.mp4 new file mode 100644 index 000000000..5498e6f8b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/dbzfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/flip1.png b/site/content/entry/yuzu-progress-report-mar-2022/flip1.png new file mode 100644 index 000000000..c01c39bde Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/flip1.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/flip2.png b/site/content/entry/yuzu-progress-report-mar-2022/flip2.png new file mode 100644 index 000000000..1dd024779 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/flip2.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/hades.png b/site/content/entry/yuzu-progress-report-mar-2022/hades.png new file mode 100644 index 000000000..c8273c889 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/hades.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/index.md b/site/content/entry/yuzu-progress-report-mar-2022/index.md new file mode 100644 index 000000000..117c6529f --- /dev/null +++ b/site/content/entry/yuzu-progress-report-mar-2022/index.md @@ -0,0 +1,287 @@ ++++ +date = "2022-04-10T12:00:00-03:00" +title = "Progress Report March 2022" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 559758 ++++ + +Hi yuz-ers, glad to have you back. +This month, we discuss an emulator inside an emulator, parts of Project Y.F.C. being added, graphical fixes for old and new titles, and more! + + + +## PSA for NVIDIA users: Part 4 + +Yes, there is more. This time we have a blessing and a curse. + +While the latest 5XX.XX series drivers fixed tessellation issues affecting `Luigi’s Mansion 3` and improved performance in Vulkan, they also introduced a crash when blitting MSAA images, meaning that running games like `Monster Hunter Rise`, `Rune Factory 5`, `Sonic Colors Ultimate`, and several others at resolutions different than native would result in a crash. + +Thankfully, [epicboy](https://github.com/ameerj) {{< gh-hovercard "8076" "works around the issue by using 3D helpers" >}} like what's been done for AMD and Intel drivers. + +Now, to be fair, blitting MSAA images is against the Vulkan specification, so NVIDIA is in the right to no longer allow it. +It’s just a bummer to have that sudden change in behaviour with something that was previously allowed and working. +Proper documentation would help a lot here. + +Tagging along, a PSA for AMD users too: the latest drivers, 22.3.2 and later, which add support for the `VK_KHR_workgroup_memory_explicit_layout` extension, break fishing in `Animal Crossing: New Horizons` and can possibly make other games crash. +Revert to 22.3.1 if you find such a regression. + +## The Vulkan emulator + +[byte[]](https://github.com/liamwhite), a newcomer to yuzu but in no way a novice at the art, arrived with a very interesting `Pull Request`, {{< gh-hovercard "8000" "implementing `Wii Hagi` emulator support" >}} into yuzu. + +This *official Nintendo emulator* (totally not outside their own ToS, they swear) is what allows the titles contained inside `Super Mario 3D All-Stars` to work. +This means getting `Super Mario Galaxy` and `Super Mario Sunshine` playable, with `Super Mario 64` support coming at a later date, as this game needs a complete JIT service implementation. + +byte[] didn’t stop there, several other changes were also implemented. + +{{< gh-hovercard "8024" "Implementing SPIR-V shader support for register-addressed const buffer accesses" >}}, which also includes the `LDC.IS` access mode (the variant of an instruction), allows Mario to retain his body in this dimension in `Super Mario Sunshine` and `Super Mario Galaxy`. + +{{< single-title-imgs-compare + "Super Mario Sunshine" + "./invisbug.png" + "./invisfix.png" +>}} + +  + +{{< single-title-imgs-compare + "Super Mario Galaxy" + "./smgbug.png" + "./smgfix.png" +>}} + +`Super Mario Galaxy` uses a combination of the depth buffer and stencil buffer to “see” the objects behind the star pointer used to shoot star bits. +That’s right, a texture determines game physics. + +{{< gh-hovercard "8030" "Properly handling that S8D24 < > ABGR8 texture conversion" >}} solves incorrect collisions with the poor star bits. +{{< gh-hovercard "8036" "A later fix solves issues with NVIDIA drivers" >}}. + +{{< single-title-imgs + "No star bits for you until you finish your homework (Super Mario Galaxy)" + "./texturebug.mp4" + "./texturefix.mp4" +>}} + +A shader miscompilation (a bad assumption on yuzu’s part, oops) caused interesting black holes in Sunshine. +{{< gh-hovercard "8038" "Fixing the oopsie" >}} provides Delfino Plaza with the intended “shading”, and most likely silently solves issues in other games too. + +{{< single-title-imgs-compare + "Super Mario Sunshine" + "./miscompbug.png" + "./miscompfix.png" +>}} + +And finally, {{< gh-hovercard "8074" "fixing a bottleneck in the buffer cache" >}} eliminates slowdowns and helps improve performance by up to approximately 4.5x in Galaxy. +Again, this could have a positive impact on other games, but don’t expect it to be similarly significant. + +[Merry](https://github.com/merryhime) updated [dynarmic](https://github.com/merryhime/dynarmic) to the latest version to provide better support for `Super Mario Galaxy`, {{< gh-hovercard "8054" "adding support for accelerated SHA256 CPU instructions" >}}, among other changes. +This avoids softlocking Galaxy at the final level. + +{{< single-title-imgs + "This toad sure likes to talk a lot (Super Mario Galaxy)" + "./creditbug.mp4" + "./creditfix.mp4" +>}} + +## POYO! + +`Kirby and the Forgotten Land` turned out to be one of the best platformers in recent times, and also quite a challenge for our devs. + +epicboy got the ball rolling by solving geometry pop-ins that were very noticeable throughout gameplay. + +{{< single-title-imgs + "That tree just pops! (Kirby and the Forgotten Land)" + "./popbug.mp4" + "./popfix.mp4" +>}} + +This was achieved by {{< gh-hovercard "8023" "improving the accuracy of the constant buffer uploads" >}}. This change also had the added benefit of fixing rendering issues in `Monster Hunter Rise`, making it playable. + +{{< single-title-imgs + "Such pretty locations (MONSTER HUNTER RISE)" + "./rise.png" + "./rise2.png" + "./rise3.png" +>}} + +{{< single-title-imgs-compare + "From Monster to Monster Hunter (MONSTER HUNTER RISE)" + "./risebug.png" + "./risefix.png" +>}} + +Another issue that we were quickly made aware of is that NVIDIA hardware would consume VRAM like crazy, to the point of filling up even high-end hardware in minutes. + +{{< imgs + "./kirbyvram.png| PC requirements: RTX 3090? Not on our watch!" + >}} + +{{< gh-hovercard "8093" "Unmapping pre-existing rasterizer memory before the memory range was mapped" >}} solves the issue and allows NVIDIA users to not need RTX 3090 levels of hardware to have a good experience. + +However, epicboy issues a PSA that this pull request may introduce regressions that are being investigated, and that VRAM consumption is further improved by using the Disable Dynamic Resolution mod [available on our site](https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods). + +epicboy also {{< gh-hovercard "8116" "fixed an svc break crash that would occur if the game was run with Asynchronous GPU Emulation enabled" >}}, an option that should always remain enabled. + +And finally, an off-by-one error in the stream buffer was responsible for causing vertex explosions. +The solution is to {{< gh-hovercard "8127" "simplify the implementation of stream buffers" >}}. +As the new implementation can only feed a single upload request at a time, this may provide a small performance loss in some cases, but it’s sure to fix several other games in the process. + +{{< single-title-imgs-compare + "A look inside Kirby's powers? (Kirby and the Forgotten Land)" + "./poyobug.png" + "./poyofix.png" +>}} + +AMD Radeon users may experience more stuttering than usual when running this game, depending on the specific GPU they have. +This is because the available Windows AMD drivers don't offer support for the `VK_EXT_vertex_input_dynamic_state` extension, which helps reduce the shader count by 3 times the original amount. +The Mesa RADV support for the extension is broken in RDNA2 hardware, as reported last month, so it remains blacklisted along with the Intel Windows support. +NVIDIA hardware and older AMD GPUs on Linux offer proper support and enjoy the significantly reduced shader count, and the associated reduced stuttering when building their cache. +CPU thread count will be critical here, at least until AMD adds official support for the extension. + +## Graphical changes and optimizations + +[bunnei](https://github.com/bunnei) has the highlight of this month with the {{< gh-hovercard "8050" "rewrite of the `NVFlinger` implementation" >}}, a part of `Project Y.F.C.`. + +`NVFlinger` is the service in charge of presenting to the display, so any improvement in this area will bring more stable frametimes, perceived as less stuttering even when the frame rate count stays at a solid 60 FPS. + +Our original implementation was basically guess work done back in 2018, and it was lacking in *several* areas. +For example, yuzu would block threads until the last frame was ready to be presented. +This obviously leads to undesired stuttering unrelated to system performance. + +The new implementation is on par with the Nintendo Switch, based on the [Android Open Source Project](https://source.android.com/). +This means yuzu changes its licence from GPLv2+ to GPLv3+ to accommodate the Apache 2.0 licence AOSP uses. + +{{< single-title-imgs + "ABZU" + "./abzubug.mp4" + "./abzufix.mp4" +>}} + +Games like `ABZU` and `DRAGON BALL FighterZ` improve considerably, but other games like `Xenoblade Chronicles 2` require fixes that are still in testing in `Project Y.F.C.`. + +{{< single-title-imgs + "DRAGON BALL FighterZ" + "./dbzbug.mp4" + "./dbzfix.mp4" +>}} + +Enjoy the smooth as butter gameplay! + +[asLody](https://github.com/asLody) has been working on optimizing the `LOP3-LUT` shader instruction with the objective of improving performance and helping with getting `Hades` to work. +Sadly, this first implementation caused some issues. + +[degasus](https://github.com/degasus), which you may know from *a certain* [Dolphin emulator](https://dolphin-emu.org/?nocr=true), {{< gh-hovercard "7989" "managed to implement a patch" >}}, which later turned into its own pull request, that solved the issues and achieved the same level of optimization. + +This is not enough to get `Hades` running. `Project Y.F.C.` will take care of that in the near future, but it’s a small global performance boost that mostly benefits low-end GPUs. +It also provides easier to read code when performing maintenance. + +We documented our problems with video decoding on Linux Flatpak builds in previous progress reports. +A check was added to avoid crashes, but in the process, Windows builds got stuck on CPU decoding! +Users with low thread CPUs could immediately tell the difference during video playback. + +By simply {{< gh-hovercard "8066" "disabling this check on Windows" >}}, Windows builds can again enjoy the extra performance gained from decoding via GPU. +If video playback feels smoother, you now know the reason! Thanks epicboy! + +[toastUnlimited](https://github.com/lat9nq) started work on improving yuzu’s Vulkan error handling. + +This is a very common issue caused mostly by very outdated GPU drivers installed by Windows Update, or custom slower drivers provided by laptop manufacturers that are used to lie on battery life metrics or keep up with cheapened cooling solutions. +This most commonly affects Intel GPUs, but Vega based Radeon GPUs can also suffer from it occasionally. + +Another popular reason for this issue, as mentioned in [previous reports](https://yuzu-emu.org/entry/yuzu-progress-report-dec-2021/#ui-changes), is outdated Vulkan injectors breaking support altogether. +Software like OBS Studio, OBS Streamlabs, Bandicam, Action!, Overwolf, GShade, iCUE, MSI Afterburner, or *anything* with an overlay that injects into Vulkan can completely break rendering if it is outdated, or the developers don’t keep up with recent Vulkan releases. + +{{< gh-hovercard "7986" "toast’s fixes solve 2 different scenarios" >}}. +Changing the behaviour of how yuzu handles both GPU instance creation and rendering instance creation helps avoid direct-to-desktop crashes caused by outdated drivers or broken Vulkan injectors. + +There’s more work to do, but this lets us get closer to offering Vulkan as the default graphics API in the future. + +epicboy found out that {{< gh-hovercard "8106" "avoiding a doubly locked mutex" >}} fixes a crash when using Extreme GPU accuracy on the OpenGL backend, making it a safe option for those aiming for the most possible accurate rendering. +This option is only accessible from `Emulation > Configure... > Graphics > Advanced`. + +He also includes an {{< gh-hovercard "8068" "optimization focused on eliminating `if(false) {…}` branches in the shader code" >}}. +This has the added benefit of reducing shader build times ever so slightly. Hey, less shader stuttering is less shader stuttering! + +## Not all changes benefit everybody + +In an effort to reduce RAM use in yuzu, Merry tested {{< gh-hovercard "8016" "reducing the size of the code caches" >}} in dynarmic. +During internal testing, the change proved to be perfectly fine, a small reduction of memory use with no side effects. + +Once the result went live, users started to complain, reports of sudden stuttering affecting `Super Smash Bros. Ultimate` were in all communication channels. + +Dynarmic has to emulate whatever instruction a CPU lacks, and that takes more cache space. +Older hardware, for example Skylake based CPUs (gen. 10 and older) or early first and second generation Ryzen CPUs, would not only have smaller caches, but would also lack support for some instructions more modern CPUs provide. + +Once the cache runs out, a recompilation happens. +This results in impressive lag spikes experienced during Smash battles a few seconds into the match. + +{{< gh-hovercard "8070" "Reverting the change" >}} was all that was needed to solve the issue. Happy Smashing! + +## General bugfixes + +Recent Nintendo Switch firmware updates changed the behaviour of the inline on-screen keyboard. +[Morph](https://github.com/Morph1984) {{< gh-hovercard "8041" "updated yuzu’s emulated equivalent" >}} to match the new versions, allowing games from the `Monster Hunter` series to be playable without having to transfer a save file after character creation was finished. + +{{< imgs + "./osk.png| The hardest part of starting any new game, character naming... (MONSTER HUNTER RISE)" + >}} + +Morph also worked on `MiiEdit`, the applet for Mii creation that [german77](https://github.com/german77) started working on last month. +Morph’s changes {{< gh-hovercard "8031" "add support for games requiring older firmware versions" >}}. + +Our holy war against crashes at shutdown continues to rage on. +Merry {{< gh-hovercard "7999" "fixed a deadlock on exit that was hidden in the logging thread" >}}. +It’s like the Hydra, you cut off one head and two new heads appear. + +toastUnlimited has been having fun working on improving yuzu-cmd. + +Adding the `-c` or `--config` argument will allow the user to {{< gh-hovercard "8025" "specify a custom location for a configuration file" >}}. +This can be useful for game specific settings. + +{{< gh-hovercard "8026" "Extended memory layout support was added" >}}. + +SDL2 has a limitation in that it doesn’t automatically resize the “rendering canvas” when you enter in fullscreen mode. +yuzu previously used the resolution of the native game, so either 1280x720 in undocked mode and 1920x1080 in docked mode. +With this change, {{< gh-hovercard "8027" "the resolution of the desktop will be used instead" >}}, allowing proper exclusive fullscreen support, and letting the scaling filters display as they should. + +[v1993](https://github.com/v1993) applied some changes to the sockets (LAN and LDN) service, {{< gh-hovercard "8028" "allowing inexact address length values" >}}. +This prevents crashes on `Minecraft` v1.12.1, as the game passes zero as the value for the address length. + +toastUnlimited gave us a simple, but really important, quality of life change, {{< gh-hovercard "8035" "disabling the `Web Applet` by default" >}}. +This was necessary due to many games having issues with it. The `Web Applet` is responsible for blocking controller input, and not many users are interested in the tutorials the service is mostly used for, so it’s a sacrifice worth the small loss. +For anyone interested, the Web Applet can be re-enabled from `Emulation > Configure… > General > Debug > Disable Web Applet`. + +And continuing on the topic of quality of life changes, yuzu will now {{< gh-hovercard "8107" "save the fullscreen status" >}} for future boots. +Close or stop a game while in fullscreen and the emulator will automatically maximize for you when you start the next one! + +german77 couldn’t let a month pass without contributing a pull request! +He’s fighting to make `Flip Wars` compatible. +{{< gh-hovercard "8120" "Correctly adding a Signal event on `AcquireNpadStyleSetUpdateEventHandle`" >}} makes the game playable. + +{{< single-title-imgs + "Flip Wars" + "./flip1.png" + "./flip2.png" +>}} + +## Future projects + +Merry is testing {{< gh-hovercard "8089" "adding a `Paranoid` CPU accuracy" >}}, an option not for the faint of heart! +It would disable most optimizations (but not fastmem) with the main purpose of aiding in CPU optimization debugging, but we all know it will be used for extra comfort if there is CPU performance to spare. + +`Project Gaia` is experiencing some minor delays caused by new additions Nintendo made in recent firmware updates. + +And regarding `Project Y.F.C.`, we’re measuring performance increases, as well as getting games to render for the first time: + +{{< imgs + "./hades.png| It's one hell of a game! (Hades)" + >}} + +[That’s all folks!](https://www.youtube.com/watch?v=b9434BoGkNQ) Thank you for staying with us, and see you next month! + +We will include relevant kernel changes in the next report. + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-mar-2022/invisbug.png b/site/content/entry/yuzu-progress-report-mar-2022/invisbug.png new file mode 100644 index 000000000..beb8cfe4a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/invisbug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/invisfix.png b/site/content/entry/yuzu-progress-report-mar-2022/invisfix.png new file mode 100644 index 000000000..83dce01f4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/invisfix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/kirbyvram.png b/site/content/entry/yuzu-progress-report-mar-2022/kirbyvram.png new file mode 100644 index 000000000..923774578 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/kirbyvram.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/miscompbug.png b/site/content/entry/yuzu-progress-report-mar-2022/miscompbug.png new file mode 100644 index 000000000..393b7ec88 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/miscompbug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/miscompfix.png b/site/content/entry/yuzu-progress-report-mar-2022/miscompfix.png new file mode 100644 index 000000000..1350548fa Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/miscompfix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/osk.png b/site/content/entry/yuzu-progress-report-mar-2022/osk.png new file mode 100644 index 000000000..dd26c6f8e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/osk.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/popbug.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/popbug.mp4 new file mode 100644 index 000000000..11aad525c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/popbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/popfix.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/popfix.mp4 new file mode 100644 index 000000000..bc2943f43 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/popfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/poyobug.png b/site/content/entry/yuzu-progress-report-mar-2022/poyobug.png new file mode 100644 index 000000000..f7ea5a8dc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/poyobug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/poyofix.png b/site/content/entry/yuzu-progress-report-mar-2022/poyofix.png new file mode 100644 index 000000000..4f9b5444b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/poyofix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/rise.png b/site/content/entry/yuzu-progress-report-mar-2022/rise.png new file mode 100644 index 000000000..fe386e3c7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/rise.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/rise2.png b/site/content/entry/yuzu-progress-report-mar-2022/rise2.png new file mode 100644 index 000000000..be772344b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/rise2.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/rise3.png b/site/content/entry/yuzu-progress-report-mar-2022/rise3.png new file mode 100644 index 000000000..f000e8e75 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/rise3.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/risebug.png b/site/content/entry/yuzu-progress-report-mar-2022/risebug.png new file mode 100644 index 000000000..f7d29abca Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/risebug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/risefix.png b/site/content/entry/yuzu-progress-report-mar-2022/risefix.png new file mode 100644 index 000000000..a61c02219 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/risefix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/smgbug.png b/site/content/entry/yuzu-progress-report-mar-2022/smgbug.png new file mode 100644 index 000000000..98058bd8b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/smgbug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/smgfix.png b/site/content/entry/yuzu-progress-report-mar-2022/smgfix.png new file mode 100644 index 000000000..c483ab86d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/smgfix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/summary.png b/site/content/entry/yuzu-progress-report-mar-2022/summary.png new file mode 100644 index 000000000..a859147d8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/texturebug.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/texturebug.mp4 new file mode 100644 index 000000000..af3acfddb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/texturebug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2022/texturefix.mp4 b/site/content/entry/yuzu-progress-report-mar-2022/texturefix.mp4 new file mode 100644 index 000000000..fb76fc314 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2022/texturefix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/amd.png b/site/content/entry/yuzu-progress-report-mar-2023/amd.png new file mode 100644 index 000000000..0a0a63b7e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/amd.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/applet.png b/site/content/entry/yuzu-progress-report-mar-2023/applet.png new file mode 100644 index 000000000..2b19d6b71 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/applet.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/audiobug.png b/site/content/entry/yuzu-progress-report-mar-2023/audiobug.png new file mode 100644 index 000000000..6d4c154f5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/audiobug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/audiofix.png b/site/content/entry/yuzu-progress-report-mar-2023/audiofix.png new file mode 100644 index 000000000..46be5e72a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/audiofix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/banner.png b/site/content/entry/yuzu-progress-report-mar-2023/banner.png new file mode 100644 index 000000000..0c985ff9b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/botw.png b/site/content/entry/yuzu-progress-report-mar-2023/botw.png new file mode 100644 index 000000000..c5af70e95 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/botw.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/eds1.png b/site/content/entry/yuzu-progress-report-mar-2023/eds1.png new file mode 100644 index 000000000..662f1ac44 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/eds1.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/eds2.png b/site/content/entry/yuzu-progress-report-mar-2023/eds2.png new file mode 100644 index 000000000..526da99cc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/eds2.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/eds3.png b/site/content/entry/yuzu-progress-report-mar-2023/eds3.png new file mode 100644 index 000000000..4dd75af56 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/eds3.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/flashbang.png b/site/content/entry/yuzu-progress-report-mar-2023/flashbang.png new file mode 100644 index 000000000..776c0530b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/flashbang.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/gaia.jpg b/site/content/entry/yuzu-progress-report-mar-2023/gaia.jpg new file mode 100644 index 000000000..f0e972914 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/gaia.jpg differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/index.md b/site/content/entry/yuzu-progress-report-mar-2023/index.md new file mode 100644 index 000000000..c75a988ca --- /dev/null +++ b/site/content/entry/yuzu-progress-report-mar-2023/index.md @@ -0,0 +1,381 @@ ++++ +date = "2023-04-10T12:00:00-03:00" +title = "Progress Report March 2023" +author = "GoldenX86" +forum = 756599 ++++ + +Hi yuz-ers! We've been working hard as usual, and this March saw improvements in performance, graphics, audio, CPU precision, input, and much more! + + + +## Making CPUs go the opposite of BRRRR + +One of the biggest changes this month is the set of improvements in CPU accuracy. +This requires some backtracking so let’s rewind a little bit. + +Back in [July,](https://yuzu-emu.org/entry/yuzu-progress-report-jul-2022/#core-timing-or-how-to-suffer-so-much-with-a-fix) we explained how `CoreTiming` operates in its current form, using a host timer. +A thread called `HostTiming` is used to process HLE events such as input and audio. +However, some of these events, like audio, require a high level of timer precision to behave the way games expect, more than Windows would usually allow. + +By default, Windows only allows a precision of 1ms since the OS event loop runs at 1000Hz. +This is not enough. +However, devices running Linux, BSD, and MacOS don't face this limitation and can achieve μs (microsecond) levels of precision. + +If a game wants to run at a frametime of 16.67ms (60 FPS), you could wait for 17ms two-thirds of the time and 16ms for the remaining one-third, but this has already proved in the past to be terrible for audio accuracy. +The alternative, and old method in use for Windows, is to wait for 16ms and do a busy wait for 0.67ms. +During that 0.67ms, the CPU thread isn't doing anything and consumes power without actually working. + +Here comes the benefit of removing support for Windows 7 and 8/8.1. +The Windows 10 SDK has new undocumented functions, `NtSetTimerResolution` and `NtDelayExecution`, which allow improving timer resolution down to 0.5ms. +This allows yuzu to wait for 16.5ms and only spin the remaining 0.17ms, which is four times shorter than the previous default method. + +By implementing these {{< gh-hovercard "9889" "new functions," >}} [Morph](https://github.com/Morph1984) reduced the time the CPU spends in a spinlock, resulting in reduced CPU usage for timing-heavy games like Kirby Forgor 💀… `Kirby and the Forgotten Land`, and `Super Smash Bros. Ultimate`. +The new free resources mean better performance for low core count CPUs such as quad cores, and for systems with limited power budgets such as laptops and handhelds. +With this change, we measured up to a 24% reduction in CPU use or power consumption, depending on the limiting factor. + +{{< single-title-imgs + "Left: old 1ms precision; Right: current 0.5ms precision. The result comes from your writer’s laptop which runs a Single Language Windows installation, so don’t mind the Spanish. Note that there is a difference in CPU use between the two results" + "./usebug.png" + "./usefix.png" + >}} + +If you can perform more tasks in the same power envelope, you can improve performance without sacrificing battery life. +Alternatively, a more common scenario for an emulator, if your ceiling is a fixed framerate, you can reduce temperatures. + +{{< single-title-imgs + "This is why the lap in laptop is a lie, mind the package temperature (Xenoblade Chronicles 3)" + "./tempbug.png" + "./tempfix.png" + >}} + +Users reported that games have less audio stuttering thanks to the improved timer precision. + +Another nice tool that the Windows 10 SDK adds is allowing us to set yuzu as a `HighQoS` process, hinting to the Windows scheduler that if there are higher performance cores available, they should take priority. +This further improves performance for current Ryzen CPUs by suggesting to use the best cores of a CCX, and for Intel 12th Gen and newer, by prioritizing P-cores ("performance cores", normal cores). + +It’s heavily recommended to keep chipset drivers up to date to take the best advantage of your hardware. + +If the CPU performs in a more efficient way, how do we go even further beyond? +Well, Morph figured the next step is to improve how the CPU counts time itself! + +On modern CPUs using the x86 architecture, the invariant timer is fetched with the the [RDTSC](https://en.wikipedia.org/wiki/Time_Stamp_Counter) instruction. +The thing with RDTSC is that… it isn’t accurate over longer periods. +It can’t be on multicore processors. + +The small differences between what RDTSC provides as a best estimate and actual reality causes time drift in games like `Super Smash Bros. Ultimate`. +You may notice this issue surfaces its ugly head as inaccurate match times. +Intel 12th Gen, the most affected CPU architecture we measured (also all the way back in July), was as bad as a second off per minute. + +Morph’s {{< gh-hovercard "9917" "solution" >}} to this issue is to spawn an extra thread whose task is to take two measurements of the TSC for 10 seconds, then take that difference and apply it to know how many actual ticks have passed in those first 10 seconds. +If you then divide the number of ticks by 10, you get the exact frequency the host RDTSC timer was running at. + +{{< single-title-imgs + "Good thing we don’t have to use old stopwatches for this (Super Smash Bros. Ultimate)" + "./timerbug.png" + "./timerfix.png" + >}} + +The result is practically perfect timing on Ryzen and Intel 11th Gen and older systems, and *almost* perfect timing on 12th Gen Alder Lake systems. +Having completely different cores counting time simultaneously inside the CPU is not pretty for this specific application. +We can’t defeat the hybrid asymmetric nature of Intel’s design, but we managed to reduce the drift from a second per minute, to a second every 5 minutes or so. + +"Okay, this is pretty good" said Morph, but how can you go even deeper? +The only option left is to {{< gh-hovercard "9982" "drop to assembly." >}} + +The optimization in question is currently only available for 12th Gen and newer Intel CPUs; AMD has not added support for it yet. +We’re talking about [TPAUSE](https://www.felixcloutier.com/x86/tpause) (CPUID name `WAITPKG`), a new instruction from Team Blue which allows the CPU to enter a lower power state and idle until a precise amount of time has passed. + +Some testing was required to specify the correct number of cycles for the wait period; a wrong value would reduce precision too much on one extreme, or not produce any benefit on the other. +100000 cycles was the magic number in Morph’s testing, which reduced CPU use/power consumption by up to 20%, on top of the previous benefits. + +If only Intel GPU drivers [worked](https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/159), their Xe equipped laptops/handhelds would now be very viable yuzu gaming machines… +Oh well, 12th/13th Gen users running actual working GPU drivers from NVIDIA or AMD will benefit greatly from all this work. + +## Graphical changes + +Enough with the CPU improvements. What about graphics? +Well, we have quite a bit to talk about. + +Users reported interesting colour banding on `STORY OF SEASONS: A Wonderful Life`. [Maide](https://github.com/Kelebek1) dug deep into the issue, and identified the culprit in `S8_UINT` colour formats, like `D32_FLOAT_S8_UINT` and `S8_UINT_D24_UNORM`. +With some trial and error, and some big help from the great [bylaws](https://github.com/bylaws) (from the [Skyline](https://github.com/skyline-emu/skyline) emulator), Maide managed to sort out the issues, providing {{< gh-hovercard "9896" "accurate colour rendering" >}} without breaking other games. + +{{< single-title-imgs-compare + "Now you can enjoy this farming simulator, with all its vibrant hues, without having to worry about colour banding. Isn’t that a-moo-sing? (STORY OF SEASONS: A Wonderful Life)" + "./sosbug.png" + "./sosfix.png" +>}} + +[epicboy](https://github.com/ameerj) strikes again with his ninja updates. This time he gives some love to the *still thriving* OpenGL gang, bringing all the goodies of {{< gh-hovercard "9913" "AccelerateDMA," >}} which we discussed in the [last report](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2023/#project-yfc-175). + +This means that OpenGL users, especially those with Fermi and Kepler GPUs, can enjoy the speed boost of this pseudo-Y.F.C. 2 change, making games such as `Metroid Prime Remastered` run much faster. +No more waiting for Samus to load her arm cannon. + +We strongly advise users of older hardware without good Vulkan support to upgrade to something newer, as support for OpenGL is soon nearing its End of Life. That being said, thanks to epicboy, those who can’t upgrade won’t suffer from terrible performance using the old but gold OpenGL API. + +But that’s not all, epicboy also added an {{< gh-hovercard "9925" "optimization" >}} for `GL_SYNC_STATUS`, boosting performance slightly. +Your writer observes a 3-5% performance increase in `The Legend of Zelda: Breath of the Wild`, one of the few games that runs faster on OpenGL with NVIDIA hardware, if you ignore the shader stuttering. + +{{< imgs + "./botw.png| From 54 to 57 FPS in one of the heaviest spots in the game, OpenGL still has life in it! For now… (The Legend of Zelda: Breath of the Wild)" + >}} + +bylaws came to the rescue again, pointing out that our old Vulkan scheduler implementation had some regressions [back in October](https://yuzu-emu.org/entry/yuzu-progress-report-oct-2022/#graphics-and-general-bug-fixes) of last year, when [byte[]](https://github.com/liamwhite) worked on making homebrew apps work with Vulkan. + +This meant that games and homebrew would have to wait for a frame to show up on screen before starting to render, which in some cases is a bad example of feedback looping at its worst. + +By {{< gh-hovercard "9931" "waiting in the background" >}} for the queue to be emptied without having to wait for the frame to be presented, byte[] fixed the regression. +Thanks bylaws! + +Remember that lovely game we talked about [last month?](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2023/#other-gpu-and-video-changes) +The one for all ages! Totally safe to play with your family. + +[vonchenplus](https://github.com/vonchenplus) decided to make it playable, so ~~weebs~~ players around the world could enjoy the amazing gameplay of `Moero Crystal H`, by {{< gh-hovercard "9943" "fixing" >}} some errors in how yuzu processed the inline index and draw texture commands. + +{{< imgs + "./mch.png| Cultured gaming (Moero Crystal H)" + >}} + +A recent system update for the Steam Deck messed up the graphics in many games. The culprit? Some issue with `VK_EXT_extended_dynamic_state3`, one of the Vulkan extensions that helps reduce shader building stutter. + +A combination of yuzu expecting NVIDIA driver behaviour, and a difference in the latest Mesa implementation on the Deck caused what you see next: + +{{< single-title-imgs + "Looks like someone spilled some paint on the screen (The Legend of Zelda: Breath of the Wild)" + "./eds1.png" + "./eds2.png" + "./eds3.png" + >}} + +byte[] {{< gh-hovercard "9955" "disabled" >}} the feature that caused the problem for now, but we’ll reconsider turning it on again in the future as it’s very likely Mesa [has already fixed the issues](https://gitlab.freedesktop.org/mesa/mesa/-/issues/8325) on their end. + +Here’s a couple of important fixes for the Xenoblade fans, which Maide spent a lot of time working on. + +Shaders were broken in-game due to issues with sRGB border colour conversions in the samplers. +This is a process that converts colours from one colour space to another. +This would cause inaccuracies that made some checks fail on affected shaders, resulting in discarding the wrong pixels as shadows. + +We need more information to fully understand the issue, but for now, {{< gh-hovercard "9962" "ignoring" >}} colourspace transformations on sRGB samplers allows for hardware-accurate rendering. + +{{< single-title-imgs-compare + "Rex knew what the future held for him, wink wink (Xenoblade Chronicles 2)" + "./xcbug.png" + "./xcfix.png" +>}} + +The other long-standing issue affecting the Xenoblade trilogy (well, Definitive Edition and 2 at least) has been plaguing yuzu since the legendary [Texture Cache Rewrite](https://yuzu-emu.org/entry/yuzu-tcr/). +It was the random "rainbow mode" that could happen anytime during gameplay, or in a specific late-game cutscene in `Xenoblade Chronicles 2` that I won’t spoil for new players. +If you played it in yuzu, you know which one. +It makes you wonder if you’re in [Rapture](https://tvtropes.org/pmwiki/pmwiki.php/VideoGame/Bioshock). + +{{< imgs + "./sea.png| Somewhere, beyond the (cloud) sea! (Xenoblade Chronicles 2)" + >}} + +Another observed problem was excessive lighting making the whole scene unreadable (especially at night with an HDR display, not a pleasant sudden flashbang). + +{{< imgs + "./flashbang.png| My eyes! (Xenoblade Chronicles 2)" + >}} + +Maide found that the issue was caused by {{< gh-hovercard "10004" "replacing" >}} fresh guest data with stale host data in the environment lighting cubemaps. +The solution is to only copy data that has been marked as GPU-modified, following the behaviour of the [Buffer Cache Rewrite](https://yuzu-emu.org/entry/yuzu-bcr/). + +{{< single-title-imgs-compare + "This isn’t 2009, we don’t need this much bloom, thank you very much (Xenoblade Chronicles: Definitive Edition)" + "./xcdebug.png" + "./xcdefix.png" +>}} + +With these changes, few graphical issues remain affecting the Xenoblade Chronicles saga, making it a great choice to enjoy on yuzu from start to finish. +Then you can join your writer in debating over which Queen is the best. + +{{< single-title-imgs-compare + "Since this issue only happens the first time the cutscene renders, I’ll cheat using bug report pics, bite me (Xenoblade Chronicles 2)" + "./xc2bug.png" + "./xc2fix.png" +>}} + +Newcomer [rschlaikjer](https://github.com/rschlaikjer), I hope I pronounced that right, has been digging deep into the texture cache, trying to figure out why a simple visual novel like `Tsukihime -A Piece of Blue Glass Moon-` would stutter when changing scenes. +Maybe it’s because the game is too emotional for the emulator to handle. + +The culprit was a missing reference operator when capturing the GPU page table, which caused the table to be copied over and over again thousands of times per second. That would make anyone stutter, let alone an emulator. {{< gh-hovercard "9988" "Converting" >}} the capture to a reference solved the issue, and it might also fix similar problems in other games. + +We’re glad rschlaikjer caught this bug before it got out of hand. We don’t want to end up like [that chair](https://youtu.be/NPVRBa-VSMg). + +## UI changes + +Some issues are so elusive that they go unnoticed for years. Some issues are so complex that they require a deep understanding of all the layers involved to find the right solution. They frustrate many developers who give up, hoping someone else will have better luck. + +And some issues are just plain silly. Like when a game crashes because the default user profile is damaged. + +[german77](https://github.com/german77) found a simple fix for crashes in dozens of games: {{< gh-hovercard "9908" "setting the default profile picture" >}} to a real 32x32 resolution instead of 0x0. +That’s it. + +Continuing to work on UI improvements, german77 also {{< gh-hovercard "9941" "moved the last audio" >}} setting `Mute audio when in background` to the Audio section, where it belongs. No more wandering around in General for this option. + +{{< single-title-imgs-compare + "Good, proper order" + "./audiobug.png" + "./audiofix.png" +>}} + +This next one is a great improvement for UX (user experience), and a huge relief for me personally. +Before, when using per-game controller profiles, if you forgot to change your input settings before starting a game, you would lose them when the game closes and have to set them up again next time. + +epicboy {{< gh-hovercard "9965" "fixed this annoying issue" >}} and german77 merged the changes. +Thank you so much for this fix. + +german77 is also working on making the profile selection applet better. +The {{< gh-hovercard "10006" "current changes" >}} are just the beginning, we will keep you updated on any progress in the future. + +## Input improvements + +Let’s talk about input, where german77 continues to shine. + +Not satisfied with the mouse and keyboard experience when {{< gh-hovercard "9906" "playing" >}} `Metroid Prime Remastered`, german77 set the default mouse sensitivity to 50% and removed the smoothing filter, improving the performance on high DPI gaming mice after getting valuable feedback from Metroid fans. +He also lowered the motion threshold, clamped the rotation speed, and accumulated all input until delivery, which fixed the delay and choppiness of the previous implementation. + +{{< imgs + "./prime.png| Have you noticed how Samus lacks a lead indicator? Her suit couldn’t spare a tiny bit more processing power for that? (Metroid Prime Remastered)" + >}} + +Thanks to those changes, `Metroid Prime Remastered` showed that it could be a great PC game. If only Nintendo would let it out of its dungeon. + +A common question we get is "will this third party Switch controller work?" +The short answer is maybe, but the long answer is a bit more complicated. + +According to Nintendo’s API, Joy-Cons have two modes: active and passive. +Official Joy-Cons use active mode, but some third party controllers use passive mode, usually because they don’t follow the API properly and don’t support any configuration commands. +They just run with the default settings, for better or worse. + +That doesn’t mean passive controllers are useless. They still work on the Switch. But it does mean that they work differently. Active controllers update their status every 15 ms, while passive controllers only do it when something happens, such as a button press or release. + +Well, it turns out yuzu didn’t support passive mode until now! So german77’s {{< gh-hovercard "9907" "changes" >}} made a lot of third party controller users happy. +That’s quite handy, considering how many unofficial controllers are out there. + +The battle with vibration goes on! +While doing his usual research, german77 found out that if you have more than one player using the same type of controller, or if you use a dual Joy-Con setup with a single controller, you can end up sending two vibration commands to the same controller in a row. +This can be annoying, and it also takes up the limited bandwidth of Bluetooth connections. + +The {{< gh-hovercard "9939" "solution is simple:" >}} only take the latest element in the [cool vibrations](https://www.youtube.com/watch?v=gzY8VH7eb8Y) queue for each controller, check if the controller can handle the requested vibration, and ignore the rest. + +We all love Quality of Life changes, right? Even if they are not very flashy. + +Let’s talk about the `Controller Applet`, which is responsible for asking players to choose their input settings when the game requests it. +Until now, the applet was unskippable; you had to give a valid answer to continue with your game. +While this was passable, it’s bothersome and inaccurate. +Some games go back to a previous menu instead of getting stuck in an endless loop if the players can’t or won’t confirm their input style. + +{{< imgs + "./applet.png| You shall pass!" + >}} + +german77 solved this {{< gh-hovercard "9997" "behaviour," >}} and while at it also solved a bug where the player count wasn’t correct. + +german77 implemented the… hold on, let me catch my breath first, `SetNpadJoyAssignmentModeSingleWithDestination` service call. +He {{< gh-hovercard "9999" "implemented" >}} it hoping to make `Let’s Get Fit` playable, but unfortunately there are more issues in the way. + +Changing topics to Amiibo support, a lot has happened this month. + +First of all, german77 managed to {{< gh-hovercard "9953" "write" >}} the correct [CRC](https://en.wikipedia.org/wiki/Cyclic_redundancy_check), making Amiibo data written by yuzu compatible with the Switch; no more invalid info. + +Next, if you tried to connect a controller while scanning an Amiibo, it would not be recognized. By {{< gh-hovercard "9981" "accounting" >}} for this and initializing or finalizing the controller, he fixed the issue. + +And last but not least, to wrap up the Amiibo saga, Herman the German Sherman {{< gh-hovercard "9995" "added support" >}} for plain Amiibo files. +Some Amiibos, like the ones themed after `Super Smash Bros. Ultimate`, can be edited without the need of keys. Now yuzu can read non-encrypted game data from your Amiibos correctly! + +## Audio fixes + +Maide managed to spot a bug in how the reverb pre-delay line was being read, causing problems in the output. +Solving it by {{< gh-hovercard "9890" "correctly reading" >}} via input instead of output gives games like `New Super Mario Bros. U Deluxe` proper audio. +Now you can enjoy Mario’s voice without any echo. Mama mia! + +bylaws has been digging deep into {{< gh-hovercard "9969" "audio synchronization," >}} improving the codebase here and there, and managing to avoid stalls by linking the guest sample tracking to the host. + +This change caused some regressions, as some games are *very sensitive* to audio scheduling requirements. +Users reported popping sounds after the merge, so bylaws improved the situation by adding a constant 15 ms of {{< gh-hovercard "10027" "latency" >}} to the sample count reporting. + +## Other code changes + +Fire Emblem fans have been experiencing freezes in-game, and after some investigation, Morph found out that the culprit was the bounded threadsafe queue, introduced with a pull request from [behunin](https://github.com/behunin). + +The queue’s job is to pass events from an event producer (like the CPU cores) to an event consumer (like the GPU thread). +The previous implementation, which behunin replaced, kept allocating and freeing memory, causing periodic latency spikes. + +The way to solve this issue is to turn the queue into a {{< gh-hovercard "9778" "bounded queue," >}} meaning no memory allocation is needed as there is a fixed amount of resources available. +And that’s what behunin did, but the new queue implementation seemed to be buggy. +Morph added a {{< gh-hovercard "9971" "simplified implementation," >}} fixing the new gameplay freezes affecting `Fire Emblem: Three Houses` and `Fire Emblem Engage`. + +[Your writer](https://github.com/goldenx86) re-enabled LTO for GCC builds, following the changes made for Windows last time, but only applying the {{< gh-hovercard "10014" "optimizations to the core and video_core subprojects," >}} providing Linux users a nice, free performance boost. + +## Hardware section + +### AMD 23.3.2 and newer drivers + +One bad and two good pieces of news. + +On the positive side, AMD has finally added support for the missing dynamic state extensions in their latest Windows driver release, which improves the shader build times and reduces the stuttering on Radeon GPUs, making them perform on par with NVIDIA. + +However, on the negative side, this driver update also introduces a serious regression: + +{{< imgs + "./amd.png| This can affect your entire desktop (Metroid Prime Remastered)" + >}} + +Some games, such as `Metroid Prime Remastered` and `Pokémon Legends: Arceus`, trigger what seems to be an out-of-bounds crash that causes desktop corruption and a driver crash. +We advise users to stay on driver version 23.3.1 or older for now. Some older Radeon cards may also benefit from using 23.2.2. + +We reported this issue to AMD and they promptly confirmed it, reproduced it, and informed us that they are working on a fix. + +Now *that’s* how you do customer support. + +Speaking of which… + +### Doing Intel’s job + +While testing a crucial rendering fix for `The Legend of Zelda: Breath of the Wild` that we will discuss next month, Morph did some feature testing to investigate what makes Intel Windows drivers run so horribly. + +His findings are both expected and disappointing. +The main culprit for about 95% of the crashes is a faulty compute shader stage in the drivers. +Disabling compute shaders like we used to do for older Intel hardware makes most games run, but not all. +We still don’t know the cause of the crashes when opening the menu in `Xenoblade Chronicles 3`. + +We’re now trying to figure out what triggers the compute shaders to crash the driver like this, but this also raises a dilemma. +Should we patch the issue ourselves, making game rendering worse and letting Intel off the hook, or should we leave it broken so they have to fix it properly? + +The solution while the investigation continues is to use ol’ reliable Linux, or avoid buying hardware that relies only on Intel GPUs. Sigh. + +## Future projects + +We’re not even halfway through April and I’m already thrilled about what’s coming up in the next progress report. +The devs are on fire and they’re not stopping anytime soon. + +Maide is working on more improvements for the Xenoblade series, such as fixing the cloud flickering in `Xenoblade Chronicles 2`, the particle effects in `Xenoblade Chronicles 3`, and the texture flickering that affects the whole saga and some other games. +However, these fixes come at a performance cost, so he needs some help from another GPU developer to optimize them. +Maybe [Blinkhawk](https://github.com/FernandoS27) could lend a hand? + +Nintendo contributed in releasing the holy grail of Vulkan extensions, [VK_EXT_shader_object](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_shader_object.html). +This extension promises to cut down the amount of work needed to build shaders significantly, as its dependencies suggest, requiring support for all previous dynamic state extensions. + +Most likely Nintendo intends to use it for their internal emulators, maybe for "backwards compatibility." +Regardless of any of that, we have a lot of work ahead of us to add support for this extension. + +But enough about that. Let’s talk about some exciting projects in the works. +{{< imgs + "./gaia.jpg| Flute intensifies" + >}} + +Regarding Project Gaia: +it is still in development. + +Oh, and Project Lime is in release candidate status, under intense internal testing. + +That’s all folks! Thank you for sticking around until the end of this progress report. + +Thanks to Bing Chat for the terrible jokes. + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-mar-2023/mch.png b/site/content/entry/yuzu-progress-report-mar-2023/mch.png new file mode 100644 index 000000000..55817ad1d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/mch.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/pfp.png b/site/content/entry/yuzu-progress-report-mar-2023/pfp.png new file mode 100644 index 000000000..6fd53eaa8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/pfp.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/prime.png b/site/content/entry/yuzu-progress-report-mar-2023/prime.png new file mode 100644 index 000000000..3d218e5c2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/prime.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/sea.png b/site/content/entry/yuzu-progress-report-mar-2023/sea.png new file mode 100644 index 000000000..04c759138 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/sea.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/sosbug.png b/site/content/entry/yuzu-progress-report-mar-2023/sosbug.png new file mode 100644 index 000000000..3d42c2d62 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/sosbug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/sosfix.png b/site/content/entry/yuzu-progress-report-mar-2023/sosfix.png new file mode 100644 index 000000000..4d8e506b9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/sosfix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/summary.png b/site/content/entry/yuzu-progress-report-mar-2023/summary.png new file mode 100644 index 000000000..9a7502a1d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/tempbug.png b/site/content/entry/yuzu-progress-report-mar-2023/tempbug.png new file mode 100644 index 000000000..8e4e51dc1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/tempbug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/tempfix.png b/site/content/entry/yuzu-progress-report-mar-2023/tempfix.png new file mode 100644 index 000000000..4d7a7b27c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/tempfix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/timerbug.png b/site/content/entry/yuzu-progress-report-mar-2023/timerbug.png new file mode 100644 index 000000000..6d4d711d3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/timerbug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/timerfix.png b/site/content/entry/yuzu-progress-report-mar-2023/timerfix.png new file mode 100644 index 000000000..9f1f13958 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/timerfix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/usebug.png b/site/content/entry/yuzu-progress-report-mar-2023/usebug.png new file mode 100644 index 000000000..df368e212 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/usebug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/usefix.png b/site/content/entry/yuzu-progress-report-mar-2023/usefix.png new file mode 100644 index 000000000..2cdfa7d42 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/usefix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/xc2bug.png b/site/content/entry/yuzu-progress-report-mar-2023/xc2bug.png new file mode 100644 index 000000000..04c759138 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/xc2bug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/xc2fix.png b/site/content/entry/yuzu-progress-report-mar-2023/xc2fix.png new file mode 100644 index 000000000..f684e9c0c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/xc2fix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/xcbug.png b/site/content/entry/yuzu-progress-report-mar-2023/xcbug.png new file mode 100644 index 000000000..fb72fb888 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/xcbug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/xcdebug.png b/site/content/entry/yuzu-progress-report-mar-2023/xcdebug.png new file mode 100644 index 000000000..670af4ee8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/xcdebug.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/xcdefix.png b/site/content/entry/yuzu-progress-report-mar-2023/xcdefix.png new file mode 100644 index 000000000..2bfb289a3 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/xcdefix.png differ diff --git a/site/content/entry/yuzu-progress-report-mar-2023/xcfix.png b/site/content/entry/yuzu-progress-report-mar-2023/xcfix.png new file mode 100644 index 000000000..4f69d2cd5 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-mar-2023/xcfix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/01.png b/site/content/entry/yuzu-progress-report-may-2020/01.png new file mode 100644 index 000000000..e8fea83e4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/01.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/02.png b/site/content/entry/yuzu-progress-report-may-2020/02.png new file mode 100644 index 000000000..9054b4aca Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/02.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/04.png b/site/content/entry/yuzu-progress-report-may-2020/04.png new file mode 100644 index 000000000..d433c52cb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/04.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/05.png b/site/content/entry/yuzu-progress-report-may-2020/05.png new file mode 100644 index 000000000..729acd01a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/05.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/06.png b/site/content/entry/yuzu-progress-report-may-2020/06.png new file mode 100644 index 000000000..635f980b0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/06.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/07.png b/site/content/entry/yuzu-progress-report-may-2020/07.png new file mode 100644 index 000000000..2dc744ab2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/07.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/08.png b/site/content/entry/yuzu-progress-report-may-2020/08.png new file mode 100644 index 000000000..f02886069 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/08.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/10.png b/site/content/entry/yuzu-progress-report-may-2020/10.png new file mode 100644 index 000000000..3a01a774a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/10.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/11.png b/site/content/entry/yuzu-progress-report-may-2020/11.png new file mode 100644 index 000000000..61a5b33f4 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/11.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/12.png b/site/content/entry/yuzu-progress-report-may-2020/12.png new file mode 100644 index 000000000..8d633e595 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/12.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/13.png b/site/content/entry/yuzu-progress-report-may-2020/13.png new file mode 100644 index 000000000..be451e55b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/13.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/14.png b/site/content/entry/yuzu-progress-report-may-2020/14.png new file mode 100644 index 000000000..08fad792b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/14.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/banner.png b/site/content/entry/yuzu-progress-report-may-2020/banner.png new file mode 100644 index 000000000..fa5559282 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2020/index.md b/site/content/entry/yuzu-progress-report-may-2020/index.md new file mode 100644 index 000000000..d482f0a21 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-may-2020/index.md @@ -0,0 +1,168 @@ ++++ +date = "2020-06-07T03:15:00-03:00" +title = "Progress Report May 2020" +author = "GoldenX86" +forum = 264713 ++++ + +Hello yuz-ers! How are you all doing? + +In this monthly episode of "yuzu — Trials and Tribulations," we offer you: major rewrites, massive performance gains, +stability improvements, bug fixes and graphical corrections. +*More after the commercial break.* + + +## The worst kept secret + +It has its own [article](https://yuzu-emu.org/entry/yuzu-prometheus/), and it had been guessed to hell and back before the official announcement. +`Project Prometheus` is a proper multithreaded emulation of the 4 CPU cores the Nintendo Switch offers. +This brings a massive performance boost to users with CPUs with 4 physical cores or more, but for this to happen, a lot of groundwork was needed. +Besides changes previously discussed in past reports, old external libraries (which yuzu needs to operate) needed to be updated, +and with that, some changes were needed for our Linux users. + +Thanks to [jroweboy’s](https://github.com/jroweboy) work, yuzu now uses [Conan](https://conan.io/), +helping the project [manage dependencies](https://github.com/yuzu-emu/yuzu/pull/3735), and letting Linux distributions use their native ones when possible. + +With the previous VMM rewrite reducing memory use, the dependencies updated, and all the groundwork done, [Blinkhawk](https://github.com/FernandoS27) +pressed the metaphorical nuclear launch button and [released Project Prometheus](https://github.com/yuzu-emu/yuzu/pull/3955). +yuzu can now use up to 6 or 7 CPU threads (in ideal conditions) +compared to the previous 2 or 3. You should expect a performance boost in a lot of games, but still see some titles perform mostly the same due to being coded to only use a single thread. + +Now, some clarifications are needed for this change. Multicore support can’t be merged into our [Mainline](https://github.com/yuzu-emu/yuzu-mainline) release for now due to incompatibilities between Multicore and the [Master](https://github.com/yuzu-emu/yuzu) branch of yuzu. Work is being done to resolve the conflicts, but please have patience. +Additionally, users with 2 cores, and either 2 or 4 threads, should not enable multicore as it will most likely result in a performance +loss for them due to the lack of physical cores on their CPUs. Our [hardware recommendations](https://yuzu-emu.org/help/quickstart/#hardware) +have been updated accordingly. + +## Unreal Engine fixes + +[Rodrigo](https://github.com/ReinUsesLisp) implemented [rendering more than one slice of 3D textures](https://github.com/yuzu-emu/yuzu/pull/4027), fixing the most glaring +issue in Unreal Engine 4 games, known as “the Rainbow”. This also improves the previous implementation that was used in +Xenoblade games. + +{{< single-title-imgs + "Your Excellency (OCTOPATH TRAVELER)" + "./01.png" + "./02.png" + >}} + +## Animal Crossing: New Horizons changes + +[Rodrigo](https://github.com/ReinUsesLisp) fixed `Animal Crossing: New Horizons` terrain borders in Vulkan by implementing +[constant attributes](https://github.com/yuzu-emu/yuzu/pull/3930). This is not a native extension, constant attributes have to be emulated in Vulkan as there is currently no official support for it. + +{{< single-title-imgs + "Beautiful beaches, now in Vulkan too (Animal Crossing: New Horizons)" + "./04.png" + "./05.png" + >}} + +[bunnei](https://github.com/bunnei) implemented [time zone support](https://github.com/yuzu-emu/yuzu/pull/3909), and Windows users will find that yuzu automatically detects their time zone. For those not on Windows (or want to spice up their life), you can manually change your system time via the "Custom RTC" option in the System settings. Previously, yuzu always assumed the user was located in the GMT+0 time zone. + +[bunnei](https://github.com/bunnei) also improved the [saving mechanism](https://github.com/yuzu-emu/yuzu/pull/3665). Most games save their data in each user profile, but `Animal Crossing: New Horizons` does it via a “device” profile, so yuzu had to accommodate for that. + +## Xenoblade specific fixes + +Rendering bugs are abundant in Xenoblade games due to the complexity of their engine, and they are not trivial to solve. +However, with the help of [gdkchan](https://github.com/gdkchan) and using this [Pull Request](https://github.com/Ryujinx/Ryujinx/pull/1277) from [Ryujinx](https://github.com/Ryujinx/Ryujinx), [Rodrigo](https://github.com/ReinUsesLisp) fixed one of the major rendering issues in `Xenoblade Chronicles 2` related to [front face flipping](https://github.com/yuzu-emu/yuzu/pull/3996). Additional [improvements to texture depth samplings](https://github.com/yuzu-emu/yuzu/pull/3991) resolved some rendering glitches, such as the clouds and start menu. Additionally, a better handling of [mipmap overlaps](https://github.com/yuzu-emu/yuzu/pull/4012) solved the constantly moving textures the games previously had. You can see the results below. + +{{< single-title-imgs + "Who said yuzu can’t run JRPGs? (Xenoblade Chronicles 2)" + "./06.png" + "./07.png" + >}} + +[Rodrigo](https://github.com/ReinUsesLisp) also optimized the performance in Xenoblade games, one method of which was [profiling the texture cache](https://github.com/yuzu-emu/yuzu/pull/3999) line by line and finding where it bottlenecks. By improving the code, you get a faster frametime, which translates +to better performance. + +Another way, and not an expected one, was to [log less information](https://github.com/yuzu-emu/yuzu/pull/4007). This avoids saturating the GPU thread, giving more room to +actual processing and rendering. + +## General performance improvements + +[ogniK](https://github.com/ogniK5377) wrote a new [Macro JIT](https://github.com/yuzu-emu/yuzu/pull/4009) (Just-in-Time) to improve the performance of games that spend too +much time in the macro interpreter. This should be a global performance boost independent of GPU vendor or API. + +When [Rodrigo](https://github.com/ReinUsesLisp) improved yuzu’s ASTC decoding, he also added a rule to use native +hardware decoding whenever possible. The Nvidia driver tells yuzu it supports ASTC decoding, but as it turns out, they actually use an internal software decoder that is much slower than our own implementation. [Ignoring the Nvidia driver-level software decoder](https://github.com/yuzu-emu/yuzu/pull/4014) produced a massive +performance improvement when facing the dreaded ASTC texture format in games. It will still be immediate with Intel GPUs, +as no software optimizations will beat a dedicated hardware decoder. + +## Bug fixes and improvements + +Vulkan development is an ongoing process in yuzu, and it has stability problems as expected of a relatively new and complex feature. +[Blinkhawk](https://github.com/FernandoS27) made a couple of [critical changes to Vulkan and Asynchronous GPU](https://github.com/yuzu-emu/yuzu/pull/3905), improving stability +considerably. + +Speaking of Vulkan, many 2D games had their sprites flipped or completely wrong, and once again, we currently lack the +extension required to fix this. Therefore, [Rodrigo](https://github.com/ReinUsesLisp) implemented [support for `NV_viewport_swizzle`](https://github.com/yuzu-emu/yuzu/pull/3885). +This Nvidia-exclusive extension is the only way to solve this problem in a clean manner for now, but a universal method is being +developed. + +{{< single-title-imgs + "Quack (Duck Game)" + "./10.png" + "./11.png" + >}} + +The updated libraries (that the migration to Conan brought us) also gave us a new version of the [cubeb](https://github.com/kinetiknz/cubeb) audio engine which adds +support for 6 channel audio, allowing [ogniK](https://github.com/ogniK5377) to add [support for surround sound](https://github.com/yuzu-emu/yuzu/pull/3827). + +Our good shark, [ogniK](https://github.com/ogniK5377), also fixed [keyboard emulation support](https://github.com/yuzu-emu/yuzu/pull/3926), so expect compatible games to have proper direct input from your keyboards now. + +[Morph](https://github.com/Morph1984) implemented the missing support for [`R8G8UI` textures](https://github.com/yuzu-emu/yuzu/pull/3839), fixing both the performance problems and saving crashes that `The Walking Dead` games experienced. + +{{< single-title-imgs + "Thank you Toxa for the screenshot (The Walking Dead: The Final Season)" + "./08.png" + >}} + +Although objectively a small issue, the mouse cursor didn't hide when running yuzu in full screen, causing a subjectively significant annoyance. Thankfully, [Tobi](https://github.com/FearlessTobi) implemented an [option to automatically hide the mouse](https://github.com/yuzu-emu/yuzu/pull/3892) once it has been inactive after some time. + +## An elegant feature of a more civilized age + +Recently released in the Early Access build, and coming soon to Mainline, is support for `assembly shaders` (`GLASM`), usually +referred to as `ARB shaders`. +  + +A couple decades ago, there was no common language for the then newly added programmable shading units in GPUs, so the `OpenGL Architecture Review Board` decided to create a proper standardised shading language they called `GLASM`. In broader terms, this is an assembly language used to communicate with the GPU. This makes it very difficult to work with, and the difficulty is only exacerbated by the limited set of debugging tools available. Furthermore, the language was developed with the hardware limitations of the time in mind. +In the present, `GLASM` has been mostly deprecated in favour of easier-to-work-with, high-level shader representations like `GLSL` or `SPIR-V`. +While this means faster results for game developers due to less time spent looking at the code, it also has the disadvantage of being far slower for emulators that have to constantly intercept, decode, and recompile shaders on the fly. +  + +In the beginning, support for `GLASM` started as just an experiment. Armed with [apitrace](https://apitrace.github.io/) as his only debug tool, [Rodrigo](https://github.com/ReinUsesLisp) set to his task. +Luckily, and for no apparent sane reason, Nvidia still maintains support for such an old feature, even on the latest OpenGL versions. As such, support for `GLASM` soon became a reality and with this initial [assembly shading](https://github.com/yuzu-emu/yuzu/pull/3964) support in place, Nvidia OpenGL users can enjoy extremely fast shader compilation times. +  + +Due to being closer to the native hardware of the Nintendo Switch, we can also expect some precision fixes, with more coming in the future. +  + +Unfortunately, `GLASM` has some limitations. To list some of them: + +- This is an Nvidia and OpenGL only feature — other vendors (AMD and Intel) only offer support for the specific assembly shaders that old games require and this is highly unlikely to change in the future. + +- Currently, some games experience bugs that will need to be ironed out, such as: `Luigi’s Mansion 3`, `Astral Chain`, and `The Legend of Zelda: Link’s Awakening`. + +- There are architecture specific bugs; a Pascal GPU may face different issues than a Turing or Kepler GPU. + +{{< single-title-imgs + "You can see the progress from simple things… (Cave Story)" + "./12.png" + "./13.png" + >}} + +{{< single-title-imgs + "To more complex tests (Fire Emblem Warriors)" + "./14.png" + >}} + +{{< youtube Oj5ntdszfyQ >}} + +## Future projects + +I can’t say much here, but there is something going on with both `Project Viper` and `Project Hearn`. + +That’s all for now, folks! See you in the June article! +Special thanks to BSoD Gaming for the comparative `GLASM` video, and Toxa for providing some screenshots. + +  +{{< article-end >}} diff --git a/site/content/entry/yuzu-progress-report-may-2020/summary.png b/site/content/entry/yuzu-progress-report-may-2020/summary.png new file mode 100644 index 000000000..793e2aeca Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2020/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/1.png b/site/content/entry/yuzu-progress-report-may-2021/1.png new file mode 100644 index 000000000..4b4a50fff Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/1.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/2.png b/site/content/entry/yuzu-progress-report-may-2021/2.png new file mode 100644 index 000000000..e3153559a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/2.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/3.png b/site/content/entry/yuzu-progress-report-may-2021/3.png new file mode 100644 index 000000000..4425d988d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/3.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/add-ons.png b/site/content/entry/yuzu-progress-report-may-2021/add-ons.png new file mode 100644 index 000000000..4d116cd8c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/add-ons.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/apply.png b/site/content/entry/yuzu-progress-report-may-2021/apply.png new file mode 100644 index 000000000..2d8454f87 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/apply.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/banner.png b/site/content/entry/yuzu-progress-report-may-2021/banner.png new file mode 100644 index 000000000..d4369ea51 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/blits.png b/site/content/entry/yuzu-progress-report-may-2021/blits.png new file mode 100644 index 000000000..cbfd410fc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/blits.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/cpu.png b/site/content/entry/yuzu-progress-report-may-2021/cpu.png new file mode 100644 index 000000000..097ee7d0d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/cpu.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/dot.png b/site/content/entry/yuzu-progress-report-may-2021/dot.png new file mode 100644 index 000000000..520e41f7b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/dot.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/hades1.png b/site/content/entry/yuzu-progress-report-may-2021/hades1.png new file mode 100644 index 000000000..50f53d20c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/hades1.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/hades2.png b/site/content/entry/yuzu-progress-report-may-2021/hades2.png new file mode 100644 index 000000000..1c91182dd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/hades2.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/hades3.png b/site/content/entry/yuzu-progress-report-may-2021/hades3.png new file mode 100644 index 000000000..00a5972dc Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/hades3.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/index.md b/site/content/entry/yuzu-progress-report-may-2021/index.md new file mode 100644 index 000000000..15ab0a639 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-may-2021/index.md @@ -0,0 +1,346 @@ ++++ +date = "2021-06-10T12:00:00-03:00" +title = "Progress Report May 2021" +author = "GoldenX86" +coauthor = "Honghoa" +forum = 417037 ++++ + +Hola yuz-ers! It's time yet again for another progress report! +We have dozens of changes to discuss: Kernel fixes, input and UI improvements, graphical updates, the saga of the legendary dot, and even a method to procure extra VRAM! + + + +## Pokémon Snap, but it’s New + +`New Pokémon Snap`’s release resulted in tons of work needed to make the game playable. For starters, Snap experienced crashes during gameplay, +an issue [epicboy](https://github.com/ameerj) was not happy about. +The [buffer cache rewrite](https://yuzu-emu.org/entry/yuzu-bcr/) introduced an optimized fast path for `uniform bindings`, but the conditions to take advantage of it are that buffers must be both small and *non-null*. Turns out, +null buffers were not being explicitly checked for, causing instabilities along the way. +[Properly checking for those zero sized buffers](https://github.com/yuzu-emu/yuzu/pull/6322) fixed the stability issues the new Snap was facing. + +{{< single-title-imgs + "New Pokémon Snap" + "./1.png" + "./2.png" + "./3.png" + >}} + +[Morph](https://github.com/Morph1984) has been working hard on implementing much needed fixes in yuzu's file system emulation. +In this particular case, [improving the accuracy of CreateFile](https://github.com/yuzu-emu/yuzu/pull/6265) fixes the saving and loading issues Snap was experiencing. +Unexpectedly, the error codes of conditions like “parent directory doesn’t exist” or “path already exists” were incorrect, causing havoc in the file system emulation. + +Snap also revealed flaws in our touch screen gesture emulation. +Thanks to work done by [german77](https://github.com/yuzu-emu/yuzu/pull/6275), yuzu [now properly supports multiple fingers](https://github.com/yuzu-emu/yuzu/pull/6267). + +GPU emulation related issues stop this game from being perfectly playable. In its current status, photos are not recognized when they are evaluated at the end of a stage. [Like mother, like daughter](https://bugs.dolphin-emu.org/issues/4460). +This can be partially solved by using High GPU accuracy in OpenGL with Assembly Shaders enabled, or for non-Nvidia users, using Extreme GPU accuracy on Vulkan. + +## Graphical fixes + +Texture blits (bit block transfers, a combination of bitmaps) can sometimes work out of bounds by interleaving copy regions, by design. +yuzu has to be able to [properly emulate this behaviour](https://github.com/yuzu-emu/yuzu/pull/6289) and return the correct portion, +something epicboy had no problem properly implementing for us. + +{{< imgs + "./blits.png| Here’s a beautifully detailed example of the old out-of-bounds incorrect behaviour in red, and the correct result in blue, with the affected area moving to the next row, as it should" + >}} + +The result is quite noticeable in games that use this blit technique, such as `Shantae` and `Pixel Game Maker Series Werewolf Princess Kaguya`, which we mentioned in the [previous progress report](https://yuzu-emu.org/entry/yuzu-progress-report-apr-2021/). + +{{< single-title-imgs + "Textures and text rendering correctly, notice the stairstepping on the right side of the left image" + "./shantae-bug.png" + "./shantae-fix.png" + >}} + +Thanks to user reports, it was brought to our attention that our FPS counter in the lower right corner of yuzu’s window was not accurate. +The readings were previously accurate when the GPU thread was synchronous with the other services. +Now that asynchronous GPU emulation is implemented, this is no longer the case. + +The solution epicboy came up with is, instead of letting the nvflinger service handle the counter, [let the graphics API inform the counter after it finishes drawing the frame](https://github.com/yuzu-emu/yuzu/pull/6317). +This way, the value is far more accurate and stable on performance oscillations. +Additionally, the update frequency of the counter was changed from 2000 ms to 500 ms to allow for more frequent and up-to-date information to be displayed. + +And now for a big update for Vulkan users waiting for `Project Reaper` to leave the development board. +The previous Vulkan `memory allocator` used local memory as top priority (that’s the physical VRAM on your dedicated GPU), +and only used host memory in certain applicable cases. These cases varied depending on how the GPU driver informed the different memory heaps available to yuzu, +primarily in keeping critical required information closer to the CPU. + +[Rodrigo](https://github.com/ReinUsesLisp) implemented a new method (solving some issues with the old one) that +[allows yuzu to access all the available host memory](https://github.com/yuzu-emu/yuzu/pull/6367). +Up to 50% of the total system RAM is available to the GPU as host memory, or as Windows calls it in the Task Manager, GPU shared memory. +This change means that the GPU effectively has more RAM available to use with Vulkan, helping delay our sadly infamous out-of-memory issues with this API. + +For those that can’t wait, want to test an in-development partial solution, and have experience with git, +[Maide](https://github.com/Kelebek1) has been working on what can be called a [“light Reaper”](https://github.com/yuzu-emu/yuzu/pull/6378). +This is a simpler version of what Rodrigo plans to release in the future, working as a garbage collector on a configurable fixed timer. +For anyone interested and with the time to spare in building yuzu manually, the PR is open to be tested. +We don’t plan to merge it for now as it needs as much refinement as the regular Reaper to provide a pleasant user experience. + +[bunnei](https://github.com/bunnei) removed [the risk of an overflow in the rasterizer cache](https://github.com/yuzu-emu/yuzu/pull/6372) +by doubling the size of the responsible array. + +The Nintendo Switch shares its RAM with both the CPU and GPU, so games are free to assume any information in VRAM will be the same in RAM (since it physically is). +As PCs don’t allow this (even on integrated GPU systems), yuzu has to keep track of any memory pages in use by the GPU +to ensure that all information is also reflected in system RAM. +The previous limit of 255 references was observed to be surpassed in some rare instances during testing, resulting in utter chaos, so this PR increases it to a maximum of 65535. + +All of this costs the user 2*MB* of RAM instead of the previous 1*MB*. Such a heavy price to pay for the additional peace of mind, Google Chrome would be proud of us. + +## Core changes and improvements + +[bunnei](https://github.com/bunnei) migrated our old implementation of kernel objects to [KAutoObjects](https://github.com/yuzu-emu/yuzu/pull/6266), which is part of the newly written implementations that have been added in the past months to match more closely to that of how the kernel of the Nintendo Switch works. + +Previously, our kernel objects, such as condition variables, events, threads, processes, etc., used the C++ `std::shared_ptr` (a type of smart pointer) in their implementation. +Whenever a new instance of a shared pointer reference is made using one of these pointers, a counter is automatically increased to keep track of them. +Similarly, whenever one of the references isn't needed anymore, the counter decreases its value and the reference is discarded. +However, the implementation doesn't necessarily reflect the way the Nintendo Switch's kernel deals these objects and their reference counters. +Thus, the advantage of implementing these `KAutoObjects` is that it allows yuzu to manage when these objects are created and destroyed, accurately. + +This was a big change that involved refactoring the codebase for consistency and fleshing out the implementation of various existing kernel objects and their definitions to match the new behaviour correctly. + +Part of the work also involved improving some system calls (the so-called `SVCs`) by implementing missing calls such as `UnmapSharedMemory`, and making the implementation of other calls more robust (e.g. better error checking, etc.). +These `SVCs` are functions used by games to communicate with the rest of their system, in order to create events, manage them, or send information to other services such as audio and graphics. +They are essential for the communication between processes and the OS, so their correct functioning is imperative, as they are the programs that run whenever a game needs the kernel to perform operations that require elevated permissions. + +With the introduction of the firmware version `12.0.0`, the protocol of [Inter-Process Communication](https://en.wikipedia.org/wiki/Inter-process_communication) (`IPC`) +has also been updated. +bunnei worked on [various improvements to the IPC and session management](https://github.com/yuzu-emu/yuzu/pull/6299) with the aim to support `TIPC` — the new protocol. + +`IPC` is a mechanism provided by the OS and used by processes to communicate between themselves, usually to manage or cooperate in the processing of some shared resource — such +as a memory region, a file, etc. +A `session` in this context refers to an object that is created to manage the information exchange between a client (i.e. games) and a server (services that the game uses to +render graphics, play audio, get user input, etc.). +With these changes, the code in charge of `session management` has been updated to support the new `IPC` protocol, additionally fixing a number of inaccuracies in some of the +error-checking functions. +bunnei has also greatly simplified the original `IPC` code, which should improve the memory usage and performance of these operations. + +As a consequence of the changes introduced in the previous `KAutoObject` PR, the maximum values for many of the kernel objects have started to be enforced. This resulted in +crashes in games that open and close sessions often, such as `Nintendo Labo`, `Pokémon Sword`, and `Pokémon Shield`, due to yuzu not managing sessions correctly. +The root problem was also the cause of small memory leaks that hadn't been noticed until now, since the sessions weren't being properly closed and remained in memory. +For this reason, bunnei implemented mechanisms for moving and closing objects in a [follow-up PR](https://github.com/yuzu-emu/yuzu/pull/6347), which corrected the way the +session counter and its opening and closing operations worked. + +There are still many other kernel objects to migrate and, for this reason, bunnei introduced a PR to make the +[KSlabHeap use both guest and host allocations](https://github.com/yuzu-emu/yuzu/pull/6373), +as this will facilitate the process while missing functions and other structures are being implemented. + +Simply put, the [slab heap](https://en.wikipedia.org/wiki/Slab_allocation) is a structure used to store kernel elements more efficiently in memory in a [linked list](https://en.wikipedia.org/wiki/Linked_list), based on their size. All the slots in a slab of memory have the same size, and there can be lists of different sizes to store different objects too. +Instead of allocating and deallocating memory, the kernel marks the nodes on the list as "used" or "free," so when it needs to store a new object, it looks for a free slot and overwrites the data there. +On the other hand, if an object is not needed anymore, the node where it's stored is marked as "free" so that it can be used to store a new object. +This way, the kernel will find frequently-requested memory sizes available more quickly, providing a small optimization to the whole process. + +As of yet, yuzu doesn't emulate the complete memory structure of the Nintendo Switch. +The emulated memory space only provides enough functionality to run a single process (i.e. a game), while every other service, such as the kernel, is allocated outside of the virtual memory. +This implementation works because the games aren't allowed to access kernel memory, and so, when yuzu switches from executing a game to running some kernel procedure, it just handles this internally through the High Level Emulation (`HLE`) implementations, with the games completely oblivious to where any of said procedures are stored. +However, there are certain elements that the games actually need to access, and so, they must be inside the emulated memory. +One such case is the [Thread Local Storage](https://en.wikipedia.org/wiki/Thread-local_storage) (`TLS`), +a memory region used by the emulated threads to store variables that only they see, but none of their peers have access to — because a thread can access only its own `TLS` region. +Since these entities can be allocated in the `KSlabHeap`, along with other entities that don't need to be inside the emulated memory accessible for the games, +bunnei introduced this hybrid method so yuzu is able to manage the slab list for all kernel objects, regardless of whether they need to be `HLE`'d, +or stored in the virtual memory. + +Of course, there are still many other things to flesh out and implement. +The kernel is an essential part of the system that makes it possible for everything else to work. +Any improvements and additions to this component make the emulation experience more robust and solidify the accuracy of how the emulator works. + +Morph has also been paying attention to the kernel, refactoring part of the IPC code and adding a function to +[pop the ID of a process](https://github.com/yuzu-emu/yuzu/pull/6320), fixing a small bug where a [wrong value was being returned](https://github.com/yuzu-emu/yuzu/pull/6337), +and stubbing a [function for the memory manager](https://github.com/yuzu-emu/yuzu/pull/6358). + +However, the real poyo-pearl of this month has been his [rework of yuzu's Common File System Interface](https://github.com/yuzu-emu/yuzu/pull/6270) to make use of the +`std::filesystem` library introduced in C++17, as a continuation of the work done by the maintainer [lioncash](https://github.com/lioncash). + +The file system interface is the code that controls how yuzu accesses files (e.g. the creation of save files, or how yuzu loads DLC and update files for a game, etc.). +Since yuzu originally started as a fork of [Citra](https://citra-emu.org/), there were many functions inherited from that project that weren't as new as the ones included in +this newly added library, or weren't compatible with the new Virtual File System that yuzu uses, or simply weren't used at all. + +With this huge PR, after Morph reversed-engineered the file system in order to bring yuzu's behaviour closer to how it works on the Nintendo Switch, he removed the clutter in +favour of simpler code and rewrote the whole implementation, fixing some problems that the old code had in Windows builds in the process. +As a bonus, he also documented all of yuzu's file system functions. + +While these changes don't necessarily result in a performance increase for end-users, they have certainly tackled some long-standing problems with how yuzu handled files, +besides simplifying the codebase notably, making it much easier to read and maintain for our developers. + +## On-Screen Keyboard changes + +Morph has been working hard on fixes for the software keyboard. + +Games received the text string of the inline keyboard instead of the regular one, resulting in empty fields being sent which could cause games to panic, +as it would mean an invalid entry was sent. +Fixing this only required [sending the correct information from the right keyboard type.](https://github.com/yuzu-emu/yuzu/pull/6333) + +Users reported crashes when pressing Enter after naming a ruleset or controller layout in `Super Smash Bros. Ultimate`. +As it turns out, the `QLineEdit::returnPressed` signal generated a [race condition](https://en.wikipedia.org/wiki/Race_condition), resulting in the crashes. +[Switching to `Qt::QueuedConnection`](https://github.com/yuzu-emu/yuzu/pull/6339) solved the issue. + +Additionally, testing confirmed that games can leave regions of memory uninitialized if a text check is performed and doesn’t result in either `Failure` or `Confirm`, +causing, once again, crashes. +This is fixed by [reading only the text check message.](https://github.com/yuzu-emu/yuzu/pull/6374). Thanks to gidoly and OZ for all the help in finding this! + +Lastly, there was an issue where the mouse input is captured by the software keyboard until the user moves to the next event. +german77 fixed this [by releasing the mouse input when yuzu is out of focus.](https://github.com/yuzu-emu/yuzu/pull/6275) + +## General bugfixes + +Let’s begin this section with an obituary. +Keen-eyed users may have noticed that old builds used to have a single . *dot* at the end of the title bar. A suspicious *dot* whose purpose was unknown. + +{{< imgs + "./dot.png| The Legend" + >}} + +When resuming an old quest that was previously left unfinished, epicboy, +[while working on displaying the game version on the title bar](https://github.com/yuzu-emu/yuzu/pull/6316), found the code related to the existence of the *dot*, +and decided to slay it. + +Of course, the *dot* wouldn’t be gone without a fight, and removing it caused the yuzu version info to disappear from logs and even the “about us” window! +Morph was the next hero of light selected by the king to slay the monster, [and so he did](https://github.com/yuzu-emu/yuzu/pull/6326). + +And thus, the saga of the mysterious *dot* ends, for now. + +Speaking of sagas, [ogniK](https://github.com/ogniK5377) works in ways beyond our comprehension. +An open PR about [allowing yuzu to set a nickname for the emulated switch](https://github.com/yuzu-emu/yuzu/pull/6354) and +[implementing the `DisableAutoSaveDataCreation` service](https://github.com/yuzu-emu/yuzu/pull/6355) are some of the surprises The Shark left us. +By the way, that last service? It’s used by `Mii Edit`. + +Morph [stubbed the ´ImportClientPki´ and ´ImportServerPki´ services](https://github.com/yuzu-emu/yuzu/pull/6301), making `JUMP FORCE Deluxe Edition` boot. +`Project Hades` will help make this game playable. + +{{< single-title-imgs + "Thanks, Ghost, for the pics! (JUMP FORCE Deluxe Edition)" + "./jfmenu.png" + "./jfingame.png" + >}} + +bunnei [fixed a hang on shutdown in the NVFlinger thread](https://github.com/yuzu-emu/yuzu/pull/6386) (used for compositing), +fixing hangs when stopping emulation while playing `Super Mario Odyssey`. +You not only have to let’s-a go, Mario, but also let’s-a stop sometimes. + +While yuzu allows users to install anything to NAND, be it updates, DLC, or even the base game, we recommend that only updates and DLC be installed, +leaving yuzu to find the base game with the user provided locations of the game dumps. +Morph [properly blocked this,](https://github.com/yuzu-emu/yuzu/pull/6319) and added a warning that accompanies it. + +Besides what was mentioned earlier in the article, `Shantae` took a bit of extra work to become playable. Another case of an emulator inside an emulator. +epicboy [solved a softlock at boot](https://github.com/yuzu-emu/yuzu/pull/6284) by creating layers when queried but not found in the compositting service NVFlinger +and ogniK [fixed the crashes](https://github.com/yuzu-emu/yuzu/pull/6279) by stubbing the emulation of `nvhost-prof-gpu`. + +{{< imgs + "./shantae.mp4| Atta girl! Thank you OZ for the gameplay! (Shantae)" + >}} + +Linux deserves some love too, and [toastUnlimited](https://github.com/lat9nq) shall give it. +[linuxdeploy](https://github.com/linuxdeploy/linuxdeploy) introduced a regression that caused any file open dialog to crash yuzu if you ran one of our official AppImages. +toast solved it [by downloading our own version hosted as one of our externals](https://github.com/yuzu-emu/yuzu/pull/6324), allowing us to have better control on changes to +linuxdeploy, as well as fixing the crashes. +Users can enjoy the ease of use of AppImage releases again. + +An old limitation we faced with Linux Distributions that decide to “stay on their old and trusted packages” is outdated versions of the Qt binaries. +[By setting up version 5.12 as the minimum requirement and adding 5.15 to our externals,](https://github.com/yuzu-emu/yuzu/pull/6366) we can ensure that no problems are faced +when building yuzu with any of the valid compilers, be it MSVC, GCC, Clang, or even MinGW. +## UI and other Quality of Life improvements + +Users have the option to customize the game list via `Emulation > Configure… > General > UI`, and the Add-Ons column can be disabled there. +Previously, if the user disabled it, the game list was not being refreshed, forcing the user to find inventive ways to manually do it. +Thanks to [Kewlan](https://github.com/Kewlan)’s work, +[the game list now properly refreshes itself with no need for manual intervention!](https://github.com/yuzu-emu/yuzu/pull/6298) + +{{< imgs + "./add-ons.png| Add-Ons shows which update, DLCs and mods are installed and enabled" + >}} + +toastUnlimited reluctantly [added the CPU tab to per-game settings.](https://github.com/yuzu-emu/yuzu/pull/6321) At the same time, Custom RTC (Real-Time-Clock) was removed to force it as a global value. + +{{< imgs + "./cpu.png| Totally not a hint of anything" + >}} + +While we’re on this subject, some things need to be clarified about the CPU settings tab. +Unsafe was originally only intended for CPUs that lacked the FMA instruction set, which causes games to run at very low framerates. +Later on, a fix was discovered that could boost the performance of `Luigi’s Mansion 3` by reducing precision. This was described in +[January’s progress report.](https://yuzu-emu.org/entry/yuzu-progress-report-jan-2021/) + +As a result, we recommend users of CPUs that do have FMA to stick to `Accurate` and only force `Unsafe` for `Luigi’s Mansion 3`. +Using `Unsafe` is known to cause precision issues, for example, exaggerating the hitboxes of characters in `Super Smash Bros. Ultimate`. +Users with old or low-end Intel CPUs that lack FMA, feel free to keep `Unsafe` enabled all the time. + +We provide some examples in the following gorgeous and totally perfect table: + +| CPU series | FMA support | Recommended setting | +| :-----------: | :--------------: | ------------ | +| Intel Core 4000 to 11000 series | Yes | Use Accurate, Unsafe for LM3 | +| Intel Core 500 to 3000 series and older | No | Use Unsafe | +| Intel Atom, Celeron and Pentium series | No | Use Unsafe | +| AMD Ryzen series | Yes | Use Accurate, Unsafe for LM3 | +| AMD FX and A 4000 to 9000 APU series | Yes | Use Accurate, Unsafe for LM3 | +| AMD Phenom, A 3000 APU series and older | No | Use Unsafe | + +*LM3 = Luigi’s Mansion 3 + +toastUnlimited also gave us the option to [apply settings while games are running](https://github.com/yuzu-emu/yuzu/pull/6346). +This can allow users to more efficiently test settings while playing. +Keep in mind that settings that require a reboot to take effect won't be affected by the apply button. + +{{< imgs + "./apply.png| " + >}} + +Continuing with the per-game setting improvements, toast also added an exception for homebrew. +Since most homebrew use a game-ID of 0000000000000000, using the ID to save the per-game settings would have been useless, so instead, +[yuzu will use the name of the homebrew file.](https://github.com/yuzu-emu/yuzu/pull/6361) + +And finally, toast, continuing work from german77 and [Tobi](https://github.com/FearlessTobi), [added a button to reset yuzu settings to default](https://github.com/yuzu-emu/yuzu/pull/6362). + +{{< imgs + "./reset.png| Simple as that" + >}} + +This is sometimes needed in very rare cases, for example, when being unable to boot `Super Smash Bros. Ultimate`. + +## [Shake it, baby](https://youtu.be/Iac0T6dnuzM) + +german77 has been working on [implementing SDL motion](https://github.com/yuzu-emu/yuzu/pull/6244), with the purpose of removing our dependency on third party programs to get +motion input from valid controllers like Dual Sense, Joy-Cons, or Pro Controllers. +With this PR, users can simply pair their controllers via Bluetooth and yuzu will pick them up as a valid input device, auto-mapping and enabling motion support, effectively +removing the need to use betterjoy, ds4windows, or other third party software in yuzu. + +A separate PR adds [detection of two separate Joy-Cons as a single input device](https://github.com/yuzu-emu/yuzu/pull/6318). + +And to provide motion support on the Linux side, [v1993](https://github.com/v1993) [enables the use of HIDAPI within SDL2](https://github.com/yuzu-emu/yuzu/pull/6293). + +Work continues to fine tune how the sensor data is interpreted, specially from non-Nintendo devices. +For example, PS3 controllers operate motion on a single Z axis, but report the remaining 2 axes to the operating system with useless NaN values, +making any motion calculations useless. +[By replacing the X and Y axis values with zeros](https://github.com/yuzu-emu/yuzu/pull/6310), german77 solved the issue. + +Games don’t always check for obvious physical limitations. +For example, in the past, it was possible to use handheld controller emulation while the game was in a docked status. +Doing this can break games like `Xenoblade Chronicles 2`, as the game expects the console to disable input when the Joy-Cons are connected to a docked Switch’s rails. +german77 solves this by [forcing an emulated Pro Controller instead](https://github.com/yuzu-emu/yuzu/pull/6353). +No more weird Frankenstein input monstrosities, please. + +Finally, it could sometimes be difficult to map analog sticks in yuzu due to a bug in how the event was handled. While fixing this, german77 also +[fixed a crash caused by controllers not listed in the controller list disconnecting](https://github.com/yuzu-emu/yuzu/pull/6312). + +## Future projects + +Now, I know we keep teasing `Project Hades`, but we have good news! +SPIR-V is finalized, GLASM is in its final testing, and GLSL is not far behind. Few regressions remain to be squashed. +Once the shading languages are done, previous features like the old asynchronous shaders are reimplemented, and the fine tuning is finished, it will finally be released. +We're trying to release it alongside Reaper, but time will tell. + +{{< single-title-imgs + "MARVEL ULTIMATE ALLIANCE 3: The Black Order, WORLD OF FINAL FANTASY MAXIMA, Yoshi's Crafted World" + "./hades1.png" + "./hades2.png" + "./hades3.png" + >}} + +That’s all folks! Thank you so much for staying with us until the end of this month’s progress report. +See you in the next one! + +  +{{< article-end >}} + +***.*** diff --git a/site/content/entry/yuzu-progress-report-may-2021/jfingame.png b/site/content/entry/yuzu-progress-report-may-2021/jfingame.png new file mode 100644 index 000000000..60f685db2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/jfingame.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/jfmenu.png b/site/content/entry/yuzu-progress-report-may-2021/jfmenu.png new file mode 100644 index 000000000..8de52e950 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/jfmenu.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/reset.png b/site/content/entry/yuzu-progress-report-may-2021/reset.png new file mode 100644 index 000000000..6c45ea0de Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/reset.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/shantae-bug.png b/site/content/entry/yuzu-progress-report-may-2021/shantae-bug.png new file mode 100644 index 000000000..180a4bf7a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/shantae-bug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/shantae-fix.png b/site/content/entry/yuzu-progress-report-may-2021/shantae-fix.png new file mode 100644 index 000000000..84354b092 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/shantae-fix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/shantae.mp4 b/site/content/entry/yuzu-progress-report-may-2021/shantae.mp4 new file mode 100644 index 000000000..94d68607f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/shantae.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-may-2021/summary.png b/site/content/entry/yuzu-progress-report-may-2021/summary.png new file mode 100644 index 000000000..aed94802a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2021/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/arcaea.png b/site/content/entry/yuzu-progress-report-may-2022/arcaea.png new file mode 100644 index 000000000..089599e7a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/arcaea.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/banner.png b/site/content/entry/yuzu-progress-report-may-2022/banner.png new file mode 100644 index 000000000..7825d1ad8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/button.png b/site/content/entry/yuzu-progress-report-may-2022/button.png new file mode 100644 index 000000000..25718c1a6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/button.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/chart.png b/site/content/entry/yuzu-progress-report-may-2022/chart.png new file mode 100644 index 000000000..55460d3c6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/chart.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/dmabug.png b/site/content/entry/yuzu-progress-report-may-2022/dmabug.png new file mode 100644 index 000000000..93b6203f2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/dmabug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/dmafix.png b/site/content/entry/yuzu-progress-report-may-2022/dmafix.png new file mode 100644 index 000000000..92aed947b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/dmafix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/error.png b/site/content/entry/yuzu-progress-report-may-2022/error.png new file mode 100644 index 000000000..935aefb82 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/error.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/index.md b/site/content/entry/yuzu-progress-report-may-2022/index.md new file mode 100644 index 000000000..bc6ee4cc9 --- /dev/null +++ b/site/content/entry/yuzu-progress-report-may-2022/index.md @@ -0,0 +1,273 @@ ++++ +date = "2022-06-12T17:50:00-03:00" +title = "Progress Report May 2022" +author = "GoldenX86" +coauthor = "CaptV0rt3x" +forum = 585658 ++++ + +Greetings yuz-ers. This time around, we're covering small and incremental improvements to yuzu. Rest assured, we also have some major rewrites and improvements in the works, and we'll touch on those near the end. Roll the tape! + + + +## End of support for EOL Windows versions + +Let’s first address the elephant in the room, shall we? + +While working on dynarmic and kernel emulation, including improving the compatibility of 4 thread CPU systems, we made changes to [dynarmic](https://github.com/merryhime/dynarmic) and [fastmem](https://yuzu-emu.org/entry/yuzu-fastmem/) that broke support for Windows 10 revision 1803 and older, including Windows 7 and Windows 8/8.1. + +While fastmem was only ever designed to work with newer operating systems, the changes to dynarmic breaking support for older Windows versions was purely accidental. +That being said, it is yet another sign of the times, and that a pre-Windows 10 experience in yuzu will continue to become more subpar. +Due to our focus on improving accuracy, stability and performance, it doesn't make much sense to divert time and resources onto maintaining old and out of support operating systems. +From Mainline version 991 and onward, only Windows 10 revision 1809 and newer, Windows 11, and Linux, will be the officially supported operating systems. + +This decision is reinforced by the lack of GPU driver support on EOL systems (which affects Vulkan support going forward), inconsistencies in the maximum path length (critical for file system emulation improvements), as well as worse memory handling on a kernel level, which is required to properly emulate the Switch and its subsystems. + +Not forcing the developers to divert their time into supporting dated platforms (which they no longer use), means that they can instead focus on improving the core emulation components. + +Finally, projects like [Dolphin](https://www.reddit.com/r/emulation/comments/utbpmm/dolphin_has_dropped_support_for_windows_7_and_8/) have already followed the same path, and for the same exact reasons. + +A 13 years old Windows is old enough to drive in some places. + +For those that still prefer to not upgrade, [Mainline 990](https://github.com/yuzu-emu/yuzu-mainline/releases/download/mainline-0-990/yuzu-windows-msvc-20220419-a5e7c5330.zip) and older will work just fine. + +## Vulkan by default + +[As previously discussed](https://yuzu-emu.org/entry/yuzu-progress-report-feb-2022/#vulkan-is-the-future), we have to circumvent issues like OEM-locked drivers (so common on Intel hardware, [it has its own official procedure](https://www.intel.com/content/www/us/en/support/articles/000056629/graphics.html)) and broken third party software limitations (outdated screen recorders are a common cause of broken rendering) in order to provide a smooth experience with Vulkan as the default API. + +The two main causes for Vulkan related crashes when trying to boot a game or opening yuzu’s configuration are: + +- Broken Vulkan layers on HUD and screen recording software could cause issues when yuzu and drivers add support for new Vulkan extensions. Keeping software up to date is the only way to prevent this issue from happening. +- Outdated GPU drivers that lack the required features to run Vulkan. This is usually caused by relying on Windows Update to provide the drivers instead of manually installing the latest version, or Intel laptop vendors providing locked custom (meaning nerfed) drivers that are never updated. If possible, always install the latest GPU driver manually, don't rely on Windows Update. + +Thankfully, we have a new system that can workaround those issues that are outside of our control. +yuzu will now perform a Vulkan check at boot. + +If the check passes, yay!, you can use Vulkan or OpenGL and select which API to use, or in Vulkan’s case, which device to run yuzu with, as always from the Graphics section in configuration. + +{{< imgs + "./ok.png| Check passes, Vulkan works!" + >}} + +If this check fails, a warning will be displayed the next time you launch yuzu. If this happens, you will only be able to use OpenGL as the graphics API. You will still have the option to pick the shader backend (GLSL, GLASM, SPIR-V) that best suits your needs. + +{{< imgs + "./error.png| Oh oh.." + >}} + +For those that happen to land in this situation, a button labeled "Check for Working Vulkan" at the bottom of the Graphics settings window will show up, allowing to retest Vulkan support. + +{{< imgs + "./button.png| Once you manage to solve the issue, click on the button at the bottom!" + >}} + +Thanks to [toastUnlimited](https://github.com/lat9nq), gone is OpenGL as the default graphics API. +Out with the old, in with the new. {{< gh-hovercard "8393" "Long live King Vulkan." >}} + +Going forward, Vulkan will be the top priority for our developers, but they will still continue to support OpenGL. +OpenGL users are recommended to use the GLSL shader backend, as GLASM and SPIR-V will receive limited support from now on. + +## Graphical changes, driver issues, and the nostalgia bliss that is the good old 64 + +This past month, [byte[]](https://github.com/liamwhite) continued the wave of improvements for `Super Mario 3D All-Stars`. +This time, he noticed a bug in the DMAcopy ([direct memory access](https://en.wikipedia.org/wiki/Direct_memory_access)) of the Nintendo Switch’s GPU. + +`DMACopy` is a mechanism that many games use to send texture data to the GPU, it handles the format conversion from "pitch" (pixels on a line by line basis) to "tiled" (gridded) images. +This process works by writing the pitch image data into GPU memory accessible by the DMA engine. Next, a DMAcopy is requested through the DMA engine driver, converting the image data into a separate buffer accessible by the GPU. This buffer will then be used as the texture on the final draw. + +{{< gh-hovercard "8313" "After fixing `bytes_per_pixel`," >}} `Super Mario Galaxy` now has proper lens flare. + +{{< single-title-imgs-compare + "RTX On? (Super Mario Galaxy)" + "./dmabug.png" + "./dmafix.png" +>}} + +byte[] also improved the way OpenGL interprets face flips depth, [replacing the previously reported fix](https://yuzu-emu.org/entry/yuzu-progress-report-apr-2022/#saving-princess-peach-yet-again). +The face flips used by Super Mario 3D All-Stars and the Nintendo 64 emulation are an uncommon configuration on the GPU. +The previous implementation had bad rendering in OpenGL, a complete black screen. + +While this wasn't an issue while using Vulkan (performance aside), now `Super Mario 64` and `Super Mario Galaxy` {{< gh-hovercard "8314" "are playable in both graphics APIs." >}} +Fermi GPU users rejoyce. + +{{< imgs + "./sm64.png| It's-a Mario, now running fast in OpenGL! (Super Mario 64)" + >}} + +One of the important parts of yuzu's graphical emulation is the need to translate small sets of GPU instructions, called `macros`. +yuzu uses a Just-in-Time (JIT) compiler to execute these macros in a performant way. It provides a performance boost of about 10% over interpretation in most cases. + +byte[] found that due to emulation inaccuracies, sometimes a macro could try to access a parameter that was too far outside the bounds of what it was supposed to be accessing. This could crash the emulator without a single trace as to why in some cases. +{{< gh-hovercard "8319" "One less reason for annoying crashes." >}} + +Additionally, byte[] added the option to {{< gh-hovercard "8320" "dump all macros" >}} used by a game for debugging purposes. + +But why are macros important enough to merit their own dump mechanism? + +Turns out, the `Nintendo 64` emulator (*totally not outside Nintendo's Terms of Service*), included with the `Nintendo Switch Online` (NSO) subscription, reassigns the same macros multiple times, each time with different code. yuzu incorrectly appended the new code to the end of the macro in this case, instead of replacing the existing code. +{{< gh-hovercard "8328" "Properly clearing that code" >}} on upload address assignments allows the NSO Nintendo 64 emulator to be playable. +Time to re-enjoy those classics! + +{{< imgs + "./n64.png| We need more games with the atmosphere of The Legend of Zelda: Majora's Mask" + >}} + +Future graphical fixes for the NSO Nintendo 64 emulator will be part of `Project Y.F.C.`. +AMD and Intel users are free to run Vulkan without concerns, but NVIDIA users are recommended to use OpenGL. + +Polaris AMD Radeon users (RX 400 and RX 500 series) reported that drivers 22.3.2 and newer caused crashes on multiple games, most notably `The Legend of Zelda: Breath of the Wild` and `Animal Crossing: New Horizons`. + +[Driver patch notes mentioned](https://www.amd.com/en/support/kb/release-notes/rn-rad-win-vulkan) implementing the `VK_KHR_workgroup_memory_explicit_layout` Vulkan extension. +The quick conclusion would be that AMD released a broken extension on the new drivers, which wouldn't be the first time, but that wasn’t the case. +The issue only affects Polaris GPUs, and the extension is available to newer architectures too, like Vega or RDNA2 (we don’t talk about ~~Bruno~~ RDNA1). + +After a few debugging sessions we found out that yuzu’s implementation of VK_KHR_workgroup_memory_explicit_layout assumes that all compatible GPUs support 16-bit integer operations. +While this was the case for all compatible GPUs previous to AMDs implementation of the extension, the Polaris architecture is notorious for its lack of the more recently popular 16-bit precision support (shows its age, you could say, Polaris is 6 years old by now), and as expected, forcing a GPU to do something it doesn’t support will result in a crash, hurray. + +toastUnlimited {{< gh-hovercard "8369" "disabled the extension" >}} on Polaris GPUs while we wait for our dedicated GPU devs to have the time to implement a proper fix. +We plan to allow the extension to work with old-school 32-bit precision in the future. + +While still on the subject of AMD Windows Vulkan drivers, we have to talk about another extension issue. +Since driver version 22.5.2, support was added for `VK_KHR_push_descriptor`, an old extension that has been working in every other driver for the past 5 years, be it Intel, NVIDIA or Mesa. + +While we don't yet know the root cause of the issue, only AMD's Windows drivers crash when calling VK_KHR_push_descriptor. +As this extension is critical to the entire rendering process, any AMD GPU would crash on any game. + +It seems that this time around, AMD may have simply released a broken implementation of the extension. +This extension previously worked with yuzu's Vulkan implementation without issue. +If that’s the case, it’s AMD’s turn to solve the issue. +In the meantime, toastUnlimited {{< gh-hovercard "8379" "blocked the extension" >}} on the affected AMD Vulkan driver versions. + +Elsewhere on the GPU emulation front, [asLody](https://github.com/asLody) {{< gh-hovercard "8311" "implemented stencil fixes when two faces are disabled." >}} +This should improve rendering for some games that natively use OpenGL. + +## HLE Improvements + +Moving onto the subject of HLE emulation, a *very dear* section for [bunnei](https://github.com/bunnei). +The dev team has been working hard at improving the accuracy and performance of yuzu's kernel emulation. + +This time around, a big change was made with how games and the emulated OS can "lock resources". +This improves emulation performance with literally every game, and to a varying degree, on any CPU. +Let's dive in. + +In software engineering, a [spinlock](https://en.wikipedia.org/wiki/Spinlock) is a lock that causes a thread trying to acquire it to simply wait in a loop + ("spin") while repeatedly checking whether the lock is available. + +{{< imgs + "./spinlock.png| Example of a spinlock, simple but gets the job done" + >}} + +There exists another synchronization primitive with a similar function, [the mutex](https://en.wikipedia.org/wiki/Mutual_exclusion). + +The word "mutex" stands for an object providing `MUTual EXclusion` between threads. +A mutex ensures that only one thread has access to a critical section or data by using operations like a lock and unlock. +A critical section is a shared resource that many threads want to access. +While there is no issue if multiple threads want to read the same critical section, no new thread can modify the section until the previous thread finishes its own writing. +Under this scenario, the first thread locks the section, and will remain that way until the lock is released. + +{{< imgs + "./mutex.png| Example of a mutex" + >}} + +In theory, when a thread tries to lock a mutex and it does not succeed (for example because the mutex is already locked), it will be paused. +The operating system will then take the opportunity to schedule an available and ready thread to run in its place. +The paused thread will continue to sleep until it is able to acquire the mutex. +This may happen once the current thread holding the mutex lock releases it. + +Consequently, threads "spinning" to acquire the lock will waste (perhaps precious) system resources. +While the Switch's own operating system uses spinlocks, this drain on resources can be problematic when emulating on lower-end hardware. +Using the host operating system (Windows or Linux) mutex allows yuzu to continue emulation tasks on other available threads. + +Helpfully, most modern operating systems use hybrid mutexes and hybrid spinlocks. +The spinlock approach would work fine on systems with threads to spare. +However, for emulation, we need many threads (for UI, audio, GPU emulation, logging, etc.), so this approach is not quite ideal, especially on CPUs with low core/thread counts. + +Thus {{< gh-hovercard "8172" "by moving from spinlocks to mutexes," >}} we were able to improve how yuzu runs on systems with low core counts. +Our testing results showed that yuzu is now much more usable on 4 thread systems, solving stability issues on 4 cores/4 threads CPUs (most notably in `Pokémon Sword/Shield`), and substantially improving performance on (previously completely non-viable) 2 cores/4 threads CPUs. + +The best news for the low-end gang! + +## UI changes + +Pivoting towards user interface improvements, [Docteh](https://github.com/Docteh), who is becoming a regular here, has been very helpful with some translation holes we had for a while. + +For example, the Custom RTC setting had several issues if the Windows system locale was set in certain languages, making it either display incorrectly (for example lacking the AM/PM indicator), or completely unusable. +{{< gh-hovercard "8291" "Fixing the display format" >}} allows Custom RTC to show up correctly in any language now. + +The Network tab in `Emulation > Configure… > System` could remain untranslated after changing languages. This was a simple case of forgetting to include the tab in the translations, so Docteh {{< gh-hovercard "8293" "fixed the oopsie" >}} and the lone Network tab now displays as it should. + +{{< single-title-imgs-compare + "Netto-kun. Now I want a Battle Network Legacy Collection, c'mon CAPCOM!" + "./netbug.png" + "./netfix.png" +>}} + +For a while now, the layout of yuzu's About dialog, particularly on Linux, has had some issues. +While we've attempted to fix it in the past, these attempts would have an adverse effect on the Windows builds, and vice versa. +Via qtcreator, Docteh {{< gh-hovercard "8339" "fixed the About dialog UI file," >}} and removed an old warning caused by the original .png image. +Thanks Docteh for taking the time to properly address the issue once and for all! + +## Controller changes + +[german77](https://github.com/german77) is the undisputed king of this section again. He continues the endless quest of providing the best user input experience possible. + +german77 noticed that motion continued reporting data even when disabled, causing `Pokémon Let’s Go, Eevee/Pikachu!` to spam `StopSixAxisSensor` errors in the logs. +While working on this, he also noticed a missing parameter, `delta_time`. +Its proper implementation allows yuzu to have an {{< gh-hovercard "8308" "accurate motion refresh rate," >}} equal to the Switch. + +In an all-in-one pull request, german77 made {{< gh-hovercard "8368" "several input changes," >}} including: + +- Add proper error handling for several [HID](https://en.wikipedia.org/wiki/Human_interface_device) functions +- Improve previous implementations to match more closely to native hardware. +- Implement functions needed by `Nintendo Switch Sports`, `EnableSixAxisSensorUnalteredPassthrough`, `IsSixAxisSensorUnalteredPassthroughEnabled`, `LoadSixAxisSensorCalibrationParameter`, `GetSixAxisSensorIcInformation`, `ResetIsSixAxisSensorDeviceNewlyAssigned`. + +While we've made some great progress here, `Nintendo Switch Sports` will be unplayable on yuzu until we rework our audio and make some much needed GPU fixes too. +While audio and perfect rendering may not seem critical to playability, games often are quite unstable if these are not accurate. +Rest assured, we're working on these and will have more to share soon! + +Changing game genres, `Arcaea` was reported as having issues with touch-release emulation. +Turns out this game checks for the reported touch position on release, and some input drivers lose their position data after release. +Additionally, multi-touch was found to not work properly on touch screens. + +After performing basically {{< gh-hovercard "8372" "a mini-rewrite of the touch emulation," >}} german77 fixed both issues. + +{{< imgs + "./arcaea.png| Osu! but better? (Arcaea)" + >}} + +One of the hurdles when working with a near endless amount of different controllers is the different quality of implementations they have. +Since yuzu used to wait for the controller to respond after sending a vibration signal, slow controllers could stall the whole emulator, causing severe stuttering. +To counter this, german77 {{< gh-hovercard "8374" "moved vibration to a queue in a separate thread," >}} allowing yuzu to move along with emulation, letting your controller make its best effort. +This is just another example of how emulation can often be improved by moving blocking operations to asynchronous background threads to improve overall usability. +In fact, yuzu uses dozens of threads for emulation, which is all the more reason why eliminating spinlocks really helps things to run as smooth as butter! + +## Future projects + +While `Project Y.F.C.` was slightly stalled due to some NVFlinger regressions, these have since been resolved and will be covered in the next progress report! +Under [blinkhawk](https://github.com/FernandoS27)'s lead, `Project Y.F.C.` is making great progress and is on track to release soon. +As a reminder, `Project Y.F.C.` is an overhaul of various parts of our GPU emulation, fixing many inaccuracies and improving both performance and compatibility. + +[Maide](https://github.com/Kelebek1) is up to something. (Hint: if you check the previous progress reports, you'll notice a common theme with their pull requests) + +And toastUnlimited is working on getting MinGW Clang builds for Windows, which could potentially be faster than the MSVC builds we’re using now. This work is tied with the release of `Project Gaia`, so it will take a bit. + +## Bonus track + +As an extra bonus, gidoly, one of our team members recently got his hands on a Ryzen 5800X3D, giving us the chance to compare it to a regular 5800X fixed at 4.5GHz so only the extra cache should be relevant. + +Here are the results! + +{{< imgs + "./chart.png| Still the best upgrade path for a Zen1 user" + >}} + +While the 5800X is manually forced to a 4.5GHz frequency, the 5800X3D naturally tops out at a 4.45GHz clock speed, the results are respectable, but nothing amazing. +Pokémon Brilliant Diamond certainly loves the extra cache, while Metroid Dread is punished by its extra latency. + +That’s all folks! As always, thank you for your support, and we hope that you enjoyed this summary of our recent progress. +See you next month! Until then, keep on emulating, and let us know what we can do to make yuzu the best possible emulation experience! + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-may-2022/mutex.png b/site/content/entry/yuzu-progress-report-may-2022/mutex.png new file mode 100644 index 000000000..af94300e7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/mutex.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/n64.png b/site/content/entry/yuzu-progress-report-may-2022/n64.png new file mode 100644 index 000000000..0397ef328 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/n64.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/netbug.png b/site/content/entry/yuzu-progress-report-may-2022/netbug.png new file mode 100644 index 000000000..14e8b079a Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/netbug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/netfix.png b/site/content/entry/yuzu-progress-report-may-2022/netfix.png new file mode 100644 index 000000000..bc5cffcca Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/netfix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/ok.png b/site/content/entry/yuzu-progress-report-may-2022/ok.png new file mode 100644 index 000000000..3ace10cec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/ok.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/sm64.png b/site/content/entry/yuzu-progress-report-may-2022/sm64.png new file mode 100644 index 000000000..396af0343 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/sm64.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/spinlock.png b/site/content/entry/yuzu-progress-report-may-2022/spinlock.png new file mode 100644 index 000000000..68f1db5ad Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/spinlock.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2022/summary.png b/site/content/entry/yuzu-progress-report-may-2022/summary.png new file mode 100644 index 000000000..e96617bfb Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2022/summary.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/2x.png b/site/content/entry/yuzu-progress-report-may-2023/2x.png new file mode 100644 index 000000000..8b8c32fa0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/2x.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/amd.png b/site/content/entry/yuzu-progress-report-may-2023/amd.png new file mode 100644 index 000000000..40bce014f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/amd.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/astc1.png b/site/content/entry/yuzu-progress-report-may-2023/astc1.png new file mode 100644 index 000000000..92651bbf7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/astc1.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/astc2.png b/site/content/entry/yuzu-progress-report-may-2023/astc2.png new file mode 100644 index 000000000..58e23ecff Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/astc2.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/astcbug.mp4 b/site/content/entry/yuzu-progress-report-may-2023/astcbug.mp4 new file mode 100644 index 000000000..91f58e641 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/astcbug.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/astcfix.mp4 b/site/content/entry/yuzu-progress-report-may-2023/astcfix.mp4 new file mode 100644 index 000000000..9cbe6b241 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/astcfix.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/astcrecomp.png b/site/content/entry/yuzu-progress-report-may-2023/astcrecomp.png new file mode 100644 index 000000000..16ce32bab Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/astcrecomp.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/autohdr.jxr b/site/content/entry/yuzu-progress-report-may-2023/autohdr.jxr new file mode 100644 index 000000000..64f35f947 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/autohdr.jxr differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/aw.png b/site/content/entry/yuzu-progress-report-may-2023/aw.png new file mode 100644 index 000000000..adaca99d0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/aw.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/banner.png b/site/content/entry/yuzu-progress-report-may-2023/banner.png new file mode 100644 index 000000000..d2cc68cb1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/banner.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/bc11.png b/site/content/entry/yuzu-progress-report-may-2023/bc11.png new file mode 100644 index 000000000..b2e9b814e Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/bc11.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/bc12.png b/site/content/entry/yuzu-progress-report-may-2023/bc12.png new file mode 100644 index 000000000..10977cb59 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/bc12.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/bc31.png b/site/content/entry/yuzu-progress-report-may-2023/bc31.png new file mode 100644 index 000000000..2abab1e9c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/bc31.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/bc32.png b/site/content/entry/yuzu-progress-report-may-2023/bc32.png new file mode 100644 index 000000000..e46594d7f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/bc32.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/bow.mp4 b/site/content/entry/yuzu-progress-report-may-2023/bow.mp4 new file mode 100644 index 000000000..6299faf00 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/bow.mp4 differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/cachebug.png b/site/content/entry/yuzu-progress-report-may-2023/cachebug.png new file mode 100644 index 000000000..67551f031 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/cachebug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/cachefix.png b/site/content/entry/yuzu-progress-report-may-2023/cachefix.png new file mode 100644 index 000000000..f85c86919 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/cachefix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/cloud.jpeg b/site/content/entry/yuzu-progress-report-may-2023/cloud.jpeg new file mode 100644 index 000000000..4bf15fcc9 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/cloud.jpeg differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/compute.png b/site/content/entry/yuzu-progress-report-may-2023/compute.png new file mode 100644 index 000000000..79dfa0985 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/compute.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/context.png b/site/content/entry/yuzu-progress-report-may-2023/context.png new file mode 100644 index 000000000..2b722ec0c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/context.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/deer.png b/site/content/entry/yuzu-progress-report-may-2023/deer.png new file mode 100644 index 000000000..0b6b2f303 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/deer.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/depths.jpeg b/site/content/entry/yuzu-progress-report-may-2023/depths.jpeg new file mode 100644 index 000000000..2f5619d56 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/depths.jpeg differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/dk.png b/site/content/entry/yuzu-progress-report-may-2023/dk.png new file mode 100644 index 000000000..9024e1b24 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/dk.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/dokapon.png b/site/content/entry/yuzu-progress-report-may-2023/dokapon.png new file mode 100644 index 000000000..da8152f44 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/dokapon.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/driver.png b/site/content/entry/yuzu-progress-report-may-2023/driver.png new file mode 100644 index 000000000..b3cde883d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/driver.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/driver2.png b/site/content/entry/yuzu-progress-report-may-2023/driver2.png new file mode 100644 index 000000000..e12c9dc76 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/driver2.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/gapbug.png b/site/content/entry/yuzu-progress-report-may-2023/gapbug.png new file mode 100644 index 000000000..e59d3d63f Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/gapbug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/gapfix.png b/site/content/entry/yuzu-progress-report-may-2023/gapfix.png new file mode 100644 index 000000000..1eb3dc1ec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/gapfix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/gloombug.png b/site/content/entry/yuzu-progress-report-may-2023/gloombug.png new file mode 100644 index 000000000..5a3459a48 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/gloombug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/gloomfix.png b/site/content/entry/yuzu-progress-report-may-2023/gloomfix.png new file mode 100644 index 000000000..46fec2788 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/gloomfix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/gpu.jpg b/site/content/entry/yuzu-progress-report-may-2023/gpu.jpg new file mode 100644 index 000000000..29705acb1 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/gpu.jpg differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/gyro.png b/site/content/entry/yuzu-progress-report-may-2023/gyro.png new file mode 100644 index 000000000..a38cefffd Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/gyro.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/id.png b/site/content/entry/yuzu-progress-report-may-2023/id.png new file mode 100644 index 000000000..652e90d45 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/id.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/index.md b/site/content/entry/yuzu-progress-report-may-2023/index.md new file mode 100644 index 000000000..abd7bd61d --- /dev/null +++ b/site/content/entry/yuzu-progress-report-may-2023/index.md @@ -0,0 +1,831 @@ ++++ +date = "2023-06-17T12:00:00-03:00" +title = "Progress Report May 2023" +author = "GoldenX86" +forum = 835148 ++++ + +*What a month!* GOAT releases, yuzu ventures onto new platforms, we get a taste of Project Gaia, full Amiibo support, further Project Y.F.C., and a lot more! +Put on your safety belt and start playing some [eurobeat](https://youtu.be/8B4guKLlbVU), this will be a long ride. + + + +## The Legend of Zelda: Tears of the VRAM + +Six years and the wait was worth it. +No pay to win mechanics, no soul-draining microtransactions, no apology letter published after release. [Just game, just good game](https://youtu.be/i1qnIBLNOG0?t=16). + +{{< imgs + "./totk1.png| Runs on a 2015 tablet. (The Legend of Zelda: Tears of the Kingdom)" + >}} + +Zelda is back, and once again teaches the gaming industry how to make a video game, while also making it fit inside a 15-year-old USB stick and run on an 8-year-old mobile SoC. + +{{< imgs + "./totk2.png| And it’s only 16GB! (The Legend of Zelda: Tears of the Kingdom)" + >}} + +`The Legend of Zelda: Tears of the Kingdom` not only made its predecessor (a game which already reinvented how open-world gameplay should be done) look like a tech demo, but it also turned out to be one massive heavyweight, punching way above its class in hardware requirements when emulated. +The combination of a heavier physics engine, massive amounts of shaders, and the ludicrous use of enormous ASTC textures has brought emulators to their knees. + +Let’s begin with the most complex problem the Princess introduced the project to. The old Switch-emulation-on-PC nemesis, now elevated to new heights: ASTC. + +{{< imgs + "./deer.png| Deer. (The Legend of Zelda: Tears of the Kingdom)" + >}} + +As there isn't a single dedicated desktop or laptop graphics card that supports the native decoding of [ASTC textures](https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression) (with the exception of Intel iGPUs), yuzu is forced to transcode them on the fly into a safe and lossless format that all GPUs support; in this case, the `RGBA8` format. + +This was perfectly fine until now (even on 2GB GPUs), since `ASTRAL CHAIN` was the only game that made "extensive" use of ASTC textures, shipping with 4K textures on a mobile device intended for 1080p and 720p screen resolutions. +Our garbage collector, introduced two years ago with [Project Hades](https://yuzu-emu.org/entry/yuzu-hades/), which our veteran users know as “the memory Reaper”, was tuned for this worst case scenario at the time. + +But what happens if a game with many more textures and a teletransportation system that allows the player to reach different regions in-game (and, in turn, load a truckload of new, different textures) releases? +What if this hypothetical game made use of dozens and dozens of huge ASTC textures? + +{{< imgs + "./totk3.png| The VRAM is on fire! (The Legend of Zelda: Tears of the Kingdom)" + >}} + +Well, suddenly the old and trusted garbage collector we developed is no longer capable of keeping even 8GB GPUs working. +That’s right, the VRAM starvation affecting the PC gaming industry hurts yuzu too. +Serious changes had to be made, and they had to allow 2GB GPUs to still be compatible somehow. + +{{< imgs + "./gpu.jpg| Your writer’s Tower of VRAM Testing. GTX 750 2GB, RX 550 2GB, and RX 6600 8GB. Not pictured, GTX 1650 4GB, GTX 1660 SUPER 6GB, and RTX 3060 Ti 8GB" + >}} + +The solution, which took many attempts, was split into several parts to ensure that no other games were negatively affected by the changes, and required the combined efforts of [Maide](https://github.com/Kelebek1), [byte[]](https://github.com/liamwhite) and [Blinkhawk](https://github.com/FernandoS27). + +While investigating very low VRAM devices, byte[] found that yuzu used {{< gh-hovercard "10286" "incompatible memory property flags" >}} when the Vulkan memory allocator was under pressure, causing low VRAM GPUs to crash when trying to actually use a recycled allocation. + +Having more VRAM available certainly helps, but that’s not enough to avoid the game from biting off more than the GPU’s memory can chew under stressful conditions — for example, teleporting between different regions. + +Previously, if VRAM was almost full, the memory manager would try to use shared memory, which is just a portion of system RAM, for new allocations. +This caused massive slowdowns during gameplay, as the transfer operation of going over system RAM, CPU, PCIe, GPU, and finally VRAM is a slow process that introduces a high latency. + +Collecting memory in VRAM is much faster than transferring data over to system RAM. +So, instead of relying on the slow shared memory, the memory manager (Reaper) now {{< gh-hovercard "10288" "keeps everything in dedicated memory" >}} (VRAM), leaving some free space to accommodate sudden spikes in VRAM usage when new assets are loaded. +If you see 2GB or more of always-free VRAM in your system, know that its purpose is to keep gameplay smooth, even on 4GB GPUs. +Don’t worry, we’re not wasting your precious VRAM. We’re just keeping it warm and cozy for when you need it. +This also has the added benefit of saving on system RAM consumption, allowing 8GB RAM users to have more stable gameplay. + +All of this is not enough to allow 4GB VRAM users or less to achieve stable gameplay, so it’s time to reveal the ace up yuzu’s sleeve. +What if, instead of relying on the pixel-accurate but bigger `RGBA8` texture format, the emulator recompressed to some other smaller formats? + +Ladies and gentlemen, we present you `ASTC recompression`, a {{< gh-hovercard "10398" "new option" >}} available in `Emulation > Configure > Graphics > Advanced` that intends to reduce VRAM consumption by turning those Ganon-cursed unsupported ASTC textures into something more suitable for low-VRAM GPUs. + +{{< imgs + "./astcrecomp.png| We recommend avoiding BC1 if possible." + >}} + +The principle is pretty simple, we just add one more step to the recompression process, from ASTC > RGBA8, to ASTC > RGBA8 > [BC1 or BC3](https://en.wikipedia.org/wiki/S3_Texture_Compression). + +The default `Uncompressed` setting uses the old `RGBA8` method, which preserves the original image quality, but also consumes the most VRAM. +For users that wish to emulate `Tears of the Kingdom`, we recommend setting this option if their GPU has at least 10-12GB of VRAM. +For other, more **reasonable** games, this option is suitable for users with cards with at least 4GB of VRAM. + +The `BC3 (medium quality)` setting reduces the VRAM usage of ASTC textures by a factor of four, with a very minimal loss in quality, typically showing as marginally softer textures. +This setting is recommended for emulating `Tears of the Kingdom` on 6GB and 8GB GPUs. +For other games, this setting is good for GPUs with 3GB of VRAM. + +Finally, the `BC1 (low quality)` setting cuts down the VRAM consumption by a factor of eight, but will also have a significant impact on texture quality, to the point where some assets will look completely different. +We don’t recommend using this setting unless you really have to. +It allows users with 4GB of VRAM to play `Tears of the Kingdom` without significant issues, and will make 2GB users have a smoother and more reliable experience in other games. + +{{< single-title-imgs + "From first to last, BC1 vs BC3 vs ASTC (Fire Emblem Engage)" + "./bc11.png" + "./bc31.png" + "./astc1.png" + >}} + +As you can see, BC1 destroys image quality in some games. + +{{< single-title-imgs + "From first to last, BC1 vs BC3 vs ASTC (The Legend of Zelda: Tears of the Kingdom)" + "./bc12.png" + "./bc32.png" + "./astc2.png" + >}} + +But in others, the difference is less noticeable. +If you only have 2GB of VRAM and 8GB of RAM, the sacrifice may be worth it. + +This is currently done using the CPU, but GPU acceleration is planned for the future. +We also hope to add an option to use BC7 in the future to provide a higher quality experience. + +Keep in mind that {{< gh-hovercard "10398" "ASTC recompression" >}} only works on ASTC textures, so the actual VRAM usage reduction will depend on the game. Not every resource held in VRAM is ASTC. +If your hardware can handle ASTC natively, this setting won’t do anything for you, as there's no need for any recompression. + +In addition, byte[] has also {{< gh-hovercard "10422" "tuned the memory manager" >}} to be more ruthless. +This change should help improve gameplay stability during long sessions on systems with less RAM. +yuzu always aims to support a minimum of 8GB of RAM on systems with dedicated GPUs. + +He also made sure that {{< gh-hovercard "10452" "memory collection doesn’t happen during the configuration step," >}} so that it doesn't cause a device loss (i.e. the GPU driver shutting down). + +By fixing the {{< gh-hovercard "10433" "block depth adjustment on slices," >}} Blinkhawk solved the rendering issues affecting the gloom textures on the terrain in `Tears of the Kingdom`, a bug that was especially frustrating on low VRAM hardware. + +{{< single-title-imgs-compare + "Let’s not make the gloom feel depressed… (The Legend of Zelda: Tears of the Kingdom)" + "./gloombug.png" + "./gloomfix.png" + >}} + +And for integrated GPU users with 16GB of system RAM or less, such as the Steam Deck, newcomer [scorpion81](https://github.com/scorpion81) has a treat for you. +{{< gh-hovercard "10411" "Setting a hard cap at 4GB" >}} allows `Tears of the Kingdom` to be playable without hitting the page file/swap too hard. + +{{< single-title-imgs + "The difference made on a 2GB equipped GTX 750 (The Legend of Zelda: Tears of the Kingdom)" + "./astcbug.mp4" + "./astcfix.mp4" + >}} + +That wraps up the list of changes made to memory management to allow `Tears of the Kingdom` to be playable in at least the components listed in our [hardware requirements](https://yuzu-emu.org/help/quickstart/#hardware-requirements). + +These changes would not be necessary if GPUs just supported ASTC textures. +Wouldn't you like your games to be no bigger than 100GB instead of having software features that ruin image quality, such as frame generation? +Native ASTC decoding support would make this possible. + +An Intel Iris Xe iGPU can run the game at 30 FPS in handheld mode while using less memory than any other hardware combination, all thanks to being their last GPU capable of decoding ASTC. +More on Intel's driver support later. + +{{< imgs + "./totkception.png| We need to go deeper! (The Legend of Zelda: Tears of the Kingdom)" + >}} + +This was the worst part... up to this point. More work was needed to get the game to boot and render properly. Let’s dive into that. + +One thing that both the Switch and Android devices have in common is the way they present to the screen. +Google's OS uses `SurfaceFlinger` (the only good Linux presentation method), and the Switch uses `nvnflinger`, which is a custom adaptation of `SurfaceFlinger` designed for the Switch's firmware and operating system. +While this gives us a good frame of reference for how `nvnflinger` should be emulated, sometimes bugs can still sneak in. +These bugs are not always easy to spot, especially if no game had rendering problems until now. + +byte[] realised that yuzu was {{< gh-hovercard "10236" "serialising binder responses incorrectly" >}} (in a different way to how Android does it). +Fixing this simple bug allowed for `Tears of the Kingdom` to boot. + +Meanwhile, Maide implemented {{< gh-hovercard "10234" "shader fixes," >}} suggested by [Kristijan1001](https://github.com/Kristijan1001), solving issues with cloud flickering and missing geometry in The Depths. + +{{< imgs + "./depths.jpeg| Your GPU is fine, it’s just software. (The Legend of Zelda: Tears of the Kingdom)" + >}} + +Next is a bug that only affected the base game. Following updates were unaffected, as they rendered in a different order. + +{{< imgs + "./red.png| Ganon likes to record Link… (The Legend of Zelda: Tears of the Kingdom)" + >}} + +This mysterious red dot on the right was caused by {{< gh-hovercard "10243" "incorrectly tracking" >}} render target indexes when clearing. +Thanks to some behaviour changes made by Maide, Link is no longer being spied on. + +After the game was released, several users reported that the date in the game's save files was always set to January 1st, 1970. +After checking the behaviour of the Switch, byte[] implemented {{< gh-hovercard "10244" "a few changes" >}} that solved the issue with an updated service implementation that allows for computing the time in nanoseconds, automatically adjusting for clock skew, and using the same clock source as the system’s steady clock. + +There were also reports of graphical glitches when using the 2X resolution scaling factor: Link and terrain textures would become corrupted after switching weapons. + +{{< imgs + "./2x.png| Scrambled textures. (The Legend of Zelda: Tears of the Kingdom)" + >}} + +Blinkhawk quickly found the cause of this problem: wrong clears were performed in the code responsible for synchronization in the buffer cache. +{{< gh-hovercard "10249" "Some tweaks," >}} and the game can be safely played while scaled. + +For the Linux AMD users, especially those not using the latest Mesa RADV Vulkan driver releases, byte[] found that one of the features of `VK_EXT_extended_dynamic_state3`, dynamic depth clamp, was implemented incorrectly in the driver, leading to vertex explosions in some expository moments in the game. + +{{< single-title-imgs-compare + "Oh, there goes the vertex… (The Legend of Zelda: Tears of the Kingdom)" + "./radvbug.png" + "./radvfix.png" + >}} + +{{< gh-hovercard "10262" "Disabling the feature" >}} for the affected driver version and older solves this issue. + +Another identified issue affected the light projection made by the Ultrahand ability, intended to help the player position objects. +The green glow had a pixelated look, caused by {{< gh-hovercard "10402" "missing barriers on attachment feedback loops." >}} + +{{< single-title-imgs-compare + "Green Lantern hand. (The Legend of Zelda: Tears of the Kingdom)" + "./ultrabug.jpg" + "./ultrafix.jpg" + >}} + +Several keyboard strokes later, and byte[] went green with envy. + +Next on the list of weird rendering issues is one that affected camera changes — for example, when talking to an NPC or aiming with the bow/throwing a weapon. +Large areas in front of the player would turn black for a frame and then return to normal. +Needless to say, it was very distracting. + +{{< imgs + "./bow.mp4| A bow so cursed, it tries to take you to the Shadow Realm! (The Legend of Zelda: Tears of the Kingdom)" + >}} + +This bug was caused by the way the {{< gh-hovercard "10418" "texture cache" >}} processed aliases and overlaps, which were in the wrong order and caused sync problems. +After a few tries by Blinkhawk and byte[], the issue was finally fixed. + +While investigating bugs related to `Tears of the Kingdom`, a copy-paste error hidden in the code for 3 years was also found. +In the shader recompilation code, [Rodrigo](https://github.com/ReinUsesLisp) copied over the wrong value from one line to the next. +This is another interesting case of the problem not being an issue until now, as no one noticed this bug until Zelda needed rescuing again... +By {{< gh-hovercard "10459" "changing a single character," >}} byte[] solved the terrain gaps that could be spotted from a distance all over the map, but most noticeably in The Depths. + +{{< single-title-imgs-compare + "What’s deeper than The Depths? (The Legend of Zelda: Tears of the Kingdom)" + "./gapbug.png" + "./gapfix.png" + >}} + +In an interesting case where a UI setting is needed to improve a game’s rendering, byte[] added an option to {{< gh-hovercard "10464" "clean the cache storage for a game," >}} which can be accessed from the `Remove` menu when right clicking a game in yuzu’s game list. + +{{< imgs + "./remove.png| It’s fun to watch the game reconstruct the images in real time." + >}} + +This option is needed because using Asynchronous shader building in `Emulation > Configure… > Graphics > Advanced` will mess up fused weapon icons in the weapon selection menu, as well as autobuild history. + +{{< single-title-imgs-compare + "Not even close, baby! (The Legend of Zelda: Tears of the Kingdom)" + "./cachebug.png" + "./cachefix.png" + >}} + +Disabling Asynchronous shader building and clearing the cache storage lets the game properly rebuild the images of all your weaponized abominations. + +That’s the progress so far with `The Legend of Zelda: Tears of the Kingdom`! +You may have noticed there are no performance improvements mentioned here. +We’re following one of the most important rules of coding, “Make it work. Make it right. Make it fast.” + +As this is a particularly popular game (and for good reason), here are some recommendations that user reports and fixes have taught us. + +- This game is very demanding on hardware. What we list in yuzu’s `recommended` [hardware requirements](https://yuzu-emu.org/help/quickstart/#hardware-requirements) is the minimum needed to sustain 30 FPS in most areas. A 6-core desktop Zen 2/11th gen Core, 16GB of RAM, and a GPU with at least 6GB of VRAM are the baseline for now. +- The latest CPUs (Zen 4/13th gen Core, always speaking of desktop products) provide massive improvements in IPC, RAM bandwidth, and cache sizes. Where a Ryzen 7 5800X3D barely manages 55 FPS, a Ryzen 5 7600 reaches 90 FPS. +- Normal GPU accuracy can be used to improve performance safely. +- Unsafe CPU accuracy can improve performance at the cost of small inaccuracies. +- Enabling asynchronous presentation degrades performance a bit. +- Don't use `Decode ASTC textures asynchronously` for this game, it will cause crashes. +- In some rare cases audio events can cause crashes, so be careful when using multi-arrow bows and bombs. +- The Depths are particularly hungry for VRAM. Remember to use ASTC recompression if you are VRAM starved. We recommend at least 8GB of VRAM for 2X resolution scaling using BC3 compression. +- The modding community has been providing amazing mods. Dynamic framerate, improved resolution and details, and much more are only a few clicks away. Here’s a [collection with recommendations](https://github.com/HolographicWings/TOTK-Mods-collection). +- Old FPS mods compatible with the base version of the game (1.0.0) are unstable and will cause softlocks and crashes during certain actions like the Game Over screen. Update your game and use newer mods. +- Remember to test the game without mods before reporting issues, as mods are still altering memory regions to work. +- If you disabled `Use Fast GPU Time` due to recommendations from modders, do it only for `Tears of the Kingdom`, as you will be seriously affecting performance in other games. Right clicking a game in yuzu’s game list and selecting properties shows the per-game configuration. We strongly recommend keeping `Use Fast GPU Time` enabled in all scenarios. + +[Now go. Let the Legend come back to life.](https://www.youtube.com/watch?v=1pN8TvupNn4) + +## Project Lime + +{{< gh-hovercard "10508" "Bet you didn’t expect this." >}} + +That’s right, with the blessing from Skyline’s [bylaws](https://github.com/bylaws), help from Dolphin’s [t895](https://github.com/t895) and Citra’s [GPUCode](https://github.com/GPUCode), work from yuzu’s and Citra’s [flTobi](https://github.com/FearlessTobi), [bunnei](https://github.com/bunnei), [Merry](https://github.com/merryhime), [Flamboyant Ham](https://github.com/Schplee), [german77](https://github.com/german77), and more, yuzu is now [available for Android devices](https://yuzu-emu.org/downloads/#android)! + +We recommend that you read the dedicated yuzu on Android article [here](https://yuzu-emu.org/entry/yuzu-android/). +In this section, we will give you an overview of our future plans, some tips on settings and hardware requirements, and a realistic outlook on what you can expect from yuzu on Android right now. + +The Android version of yuzu was not an easy feat. It took us almost eight months of hard work to make it happen. +Right now, the core is essentially the same as the desktop version, with an Android UI and *very few* platform-specific tweaks. +This means you can enjoy features like 32-bit game support, NVDEC video decoding support, motion, controller automapping, resolution scaling, and filters. +On the other hand, features like mod and cheat management, LDN, and the controller configuration applet are still under development. +Our goal is to gradually have the Android builds reach parity with the PC version. + +In addition to the Google Play Store, we will soon be posting releases on our GitHub, and F-Droid is also on the horizon. + +{{< imgs + "./lime1.png| Don’t judge, it’s a light game and loads quickly, it was great for testing. (Sakura Neko Calculator)" + >}} + +One of the biggest lessons we learned from Project Lime is that, even after 8 years since the launch of the NVIDIA Tegra X1 (the SoC that powers the Nintendo Switch), Android SoC vendors still don’t know how to make GPU drivers. + +They all started working on Vulkan drivers around the same time in 2016. And yet, none of them have managed to deliver a compliant and stable Vulkan Android driver, except for the rare few NVIDIA devices. + +It is obvious that only 4 vendors have the expertise and the commitment to make Vulkan drivers work: NVIDIA, AMD, and Mesa, with a special mention for Intel, who recently stepped up their game. + +Although not one of these 4, we decided that limiting support to Qualcomm SoCs was our only option for now if we didn't want to spend several months further modifying our GPU code to accommodate all the quirks and broken extensions of Android phones and tablets. +Not because their driver is decent — it’s bad. +But it was just good enough to get some games to render, albeit incorrectly most of the time. + +Qualcomm is the best option (and for now, the only one) because bylaws created [AdrenoTools](https://github.com/bylaws/libadrenotools), which lets users load the ***vastly*** superior [Mesa Turnip](https://docs.mesa3d.org/drivers/freedreno.html) drivers on their Adreno 600 series GPUs, providing more accurate rendering, comparable to the quality expected of PC products. +Any Qualcomm SoC with a name like “Snapdragon ###” from the 460 to the 888+ equipped with an Adreno 600 series GPU can choose to use either the proprietary Qualcomm driver or Mesa Turnip. + +The performance gain you can expect from a device with a Snapdragon Gen 1 or Gen 2 is quite significant. +But the problem is that, while the Adreno 700 series GPU that comes with it is very powerful hardware-wise, the proprietary Qualcomm driver for it is subpar at best, and Mesa has only just begun to work on adding support for Turnip. +There's an early driver release to test, but results are not great for now. +It will take weeks, if not months, before we see proper support emerge. In the meantime, we intend to work on improving the rendering on the official Adreno drivers. + +{{< single-title-imgs + "Try several, don’t marry the first one that works. Divorcing a shader cache isn’t fun." + "./driver.png" + "./driver2.png" + >}} + +The Adreno 500 series is too outdated for yuzu. Its proprietary Vulkan driver is missing many of the essential features required, and Turnip has no plans to support it either. + +Mali is an example of good but weak hardware being limited by the quirks of its available drivers. +Unlike Adreno, Mali has no viable Mesa alternative to rescue it, and the current proprietary Mali drivers are in bad shape for Switch emulation. +Its current status is that it won’t boot any game on yuzu, but: + +{{< single-title-imgs + "Internal dev build, work-in-progress in getting G series Mali running." + "./mali.jpg" + "./mali2.jpg" + >}} + +We’re working on solving all the quirks needed to get Mali rendering on yuzu as soon as possible. +This is the most common GPU vendor on the platform after all. +Mali support will happen, we just need some time. +Expect news very soon! + +The last case of hardware that should work, but doesn’t, is the AMD RDNA2-based Xclipse 920 from Samsung, used only in the latest Exynos 2200 SoC, and somehow completely skipped from the S23 series phones. +Available information suggests that it may just be an old AMD Windows driver ported to Android, but for some reason the devices refuse to start rendering on yuzu. +This is a GPU we want to get working, as there is no clear reason why it doesn't work, while desktop AMD products work almost flawlessly. +Unfortunately, we haven't yet been able to get our hands on one, but we'll update with more info once we do. + +For all other vendors like PowerVR, Vivante, etc: don't bother. +These vendors offer such low quality drivers that support is impossible. + +We’re working hard on improving GPU compatibility, adding the necessary changes needed to boot within the limitations set by the vendors. + +CPU emulation still relies on the Dynarmic JIT, instead of native code execution. +This allows us to run 32-bit games like `Mario Kart 8 Deluxe`, but is slow for 64-bit games. +Expect “good” compatibility, similar to the desktop version thanks to this, but also low performance and high temperatures. +Native code execution, or NCE (do I smell `Project Nice`?) is on our list of goals for the Android builds. + +The CPU itself, while very crucial for performance and the main bottleneck for now, is less important than the GPU, for the reasons previously mentioned (the drivers). +The same rules as on PC apply here: 6 cores or more is preferred, and the highest possible IPC is strongly recommended. A Snapdragon 8 Gen 2 can be twice as fast as a Snapdragon 865. + +RAM use is both a blessing and a curse. +A blessing because Android devices natively support ASTC textures — the format is designed for such devices. +This allows the GPU to use very little RAM, just like on the Switch. + +The curse is that, because Android is such a heavy OS, there is no guarantee that complex games will run on devices with 6GB of RAM. 8GB is the strong recommendation, which puts compatibility on the pricey side of the spectrum. +A certain Zelda game we wrote a lot about currently requires at least 12GB of RAM to run. + +There are ongoing efforts to reduce memory requirements, such as native code execution and [UMA](https://en.wikipedia.org/wiki/Unified_Memory_Architecture) optimizations for the GPU code, but the reality is that emulation adds overhead and Android will only get fatter over time. +We may be able to get light 2D games running on 4GB devices, but we don't expect complex 3D games to run on less than 8GB any time soon, if ever. + +We have set the minimum required operating system to Android 11. +This decision was made to prevent installation on completely unsuitable hardware (like Adreno 500 series devices or older T series Mali GPUs), and to reduce installation on low-memory devices as much as possible. +This is final, as there are no plans to support older Android versions. + +Of course, it must be a 64-bit Android 11 or newer; just like on desktop, 32-bit devices will never be supported. + +Users with capable hardware stuck on older Android versions can either build yuzu themselves and remove the code responsible for performing this check, or install custom ROMs such as [LineageOS](https://lineageos.org/) to get unofficial Android updates on their device. + +{{< imgs + "./lime2.png| Your writer will enjoy playing visual novels and simple platformers. (The Liar Princess and the Blind Prince)" + >}} + +Now that we have covered the harsh reality of Android software and hardware, let’s focus on the current experience. + +We included a customisable input overlay with haptics, which can be disabled if you prefer to play with a Bluetooth Xbox controller, Sony Dualshock 4 or Dual Sense, or a Nintendo Pro Controller, and a framerate counter. +You can access these settings in-game by dragging from the left side of the screen. + +If you updated from a previous version, the overlay may be invisible. Just select `Overlay Options > Reset Overlay` to make it visible again. + +{{< imgs + "./settings1.png| Set as you see fit. (Cooking Mama: Cookstar)" + >}} + +While playing a game you can select Settings from the left menu, or select it from the main menu. + +{{< single-title-imgs + "Expect this tab to expand in the coming months." + "./settings2.png" + "./settings3.png" + >}} + +Here you will find setting and customization options. Most are self-explanatory, but if you want explanations for the options in Advanced settings, check our settings glossary [here](https://community.citra-emu.org/t/settings-glossary/768483). + +After the initial configuration is done, just tap a game and play. +A search option is available for your convenience, along with a few search filters. + +{{< single-title-imgs + "Choose your destiny." + "./list.png" + "./search.png" + >}} + +One of the first improvements added by [PabloG02](https://github.com/PabloG02) is a {{< gh-hovercard "10534" "save manager" >}} that can be accessed from the Settings. +This makes importing and exporting saves very simple. Thank you! + +{{< imgs + "./saves.png| It’s dangerous to go alone, take this!" + >}} + +One important thing to remember: Android has the most… unusual file system permissions. +We recommend creating a yuzu folder on your storage root to store your keys, as to avoid any permissions issues. + +You can get different Adreno and Turnip driver versions to test from [here](https://github.com/K11MCH1/AdrenoToolsDrivers/releases). +Keep in mind, this option will only change the driver for yuzu. It won’t (and can’t) replace anything on a system level. + +At the time of writing, we recommend [Turnip 23.2.0](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/v23.2.0-dev) (or [23.1.0](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/v23.1.0-dev) if you have Android 11) for Adreno 600, while Adreno 700 users can run the [Qualcomm 676.22](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/v676.22FIX) driver to improve performance and compatibility somewhat. + +There’s an early alpha Turnip release supporting Adreno 730 and 740 products (but not 725) [here](https://github.com/K11MCH1/AdrenoToolsDrivers/releases/tag/v23.2.0_A7XX). +It is also compatible with Adreno 600 series hardware, so it’s a simple global driver to test. + +There have been reports of users not being able to load custom drivers — we are still investigating this, but there's still a lot of work to do. + +For those interested in playing with the source, we have a work-in-progress build guide [here](https://yuzu-emu.org/wiki/building-for-android/). + +That’s all fo… What do you mean there’s still a whole article to write? +Oh right, we have more to talk about! + +## Other graphical changes + +Because this isn’t just a Zelda emulator after all. + +Who wants more `Project Y.F.C.` goodies? +Blinkhawk serves us {{< gh-hovercard "10155" "Reactive Flushing," >}} with fries. + +In the early days of yuzu, if the CPU were to read an area modified by the GPU, full sync flushing between the host and guest GPU (emulated and system’s GPU) would trigger (let’s call it “old reactive flushing”). +This was safe and rendered things properly, but was also slow. +Blinkhawk replaced this system with predictive flushing some years ago, improving performance significantly but introducing several graphical regressions, such as broken shadows and lighting, wrong thumbnails on saves and photos, and even vertex explosions. + +With this release of the yuzu fried chicken, Blinkhawk introduces the new Reactive Flushing, which has the following fixes: + +- Fixes old regressions such as `Bayonetta 2`'s shadows. +- Fixes lighting in `Xenoblade Chronicles` games. +- Improves performance in buffer-heavy games like `Monster Hunter Rise`. +- Thumbnails and in-game photos in a bunch of games such as: saves in `Xenoblade Chronicles Definitive Edition` and `Xenoblade Chronicles 3`, camera photos in `ASTRAL CHAIN`, and partially fixes thumbnails in `Luigi's Mansion 3`. +- Vertex explosions in `Pokemon Violet/Scarlet` and `Yoshi’s Crafted World`. +- Make High GPU Accuracy fully use asynchronous buffers in Vulkan, improving performance. + +{{< single-title-imgs + "From first to last: Bayonetta 2, ASTRAL CHAIN, Xenoblade Chronicles Definitive Edition, and Luigi’s Mansion 3" + "./rf1.png" + "./rf2.png" + "./rf3.png" + "./rf4.png" + >}} + +{{< single-title-imgs + "From first to last: Mario + Rabbids Kingdom Battle, Pokémon Scarlet, and Yoshi's Crafted World" + "./rf6.png" + "./rf7.png" + "./rf8.png" + >}} + +The option still carries a performance cost, sometimes a considerable one. +It’s enabled by default, but users can disable it from `Emulation > Configure… > Graphics > Advanced > Enable Reactive Flushing`. +If you need the performance, and can tolerate the graphical regressions introduced by disabling it, the option is there. + +{{< imgs + "./reactive.png| If you have performance to spare, keep it enabled." + >}} + +Users with AMD and Intel GPUs complained that high-framerate mods couldn't push the framerate past the display's refresh rate when using Vulkan. +This was because the VSync toggle was assuming the best option for each hardware driver based on compatibility. + +What used to be just VSync on, off, or triple buffer in the good old OpenGL days is now more complex with Vulkan, even if current games insist on mistakenly calling the setting “VSync on” for legacy reasons. +In fact, nowadays there are 4 VSync options commonly supported by GPU drivers: + +- Immediate: No VSync. Tearing will happen, but no framerate restrictions will apply. +- FIFO: Double buffering. This is equivalent to yuzu’s old VSync on. Tearing won’t happen, but input will have one frame of latency, and the refresh rate can’t exceed the display’s capabilities. +- Relaxed FIFO: Identical to regular FIFO, but allows for tearing to happen if a desynchronisation happens. Can be considered similar to adaptive VSync. Useful for games with dynamic framerates. +- Mailbox: Triple buffering, avoids tearing while allowing for framerates higher than the refresh rate of the display. Similar to what AMD calls Enhanced sync, and what NVIDIA calls Fast sync. + +Mailbox is the obvious recommendation for most games, so of course only NVIDIA on Windows, Mesa on Linux, and Android drivers offer support for it. + +{{< imgs + "./vsync.png| Android has no tolerance for tearing." + >}} + +Per your writer’s ~~begging~~ request, [toastUnlimited](https://github.com/lat9nq) updated the old VSync toggle in the Graphics menu to a {{< gh-hovercard "10125" "proper drop list" >}} mentioning all available Vulkan options. + +{{< imgs + "./mailbox.png| If it is an option, pick Mailbox." + >}} + +If, for example, someone with an AMD or Intel GPU on Windows wants to play `Super Smash Bros. Ultimate` with a 120 FPS mod on a 60 Hz display, they now have the option to use Immediate mode, which is what the emulator switches to when the player unlocks the framerate with Ctrl + U. +The rest can just enjoy Mailbox. + +We recommend setting the driver’s control panel to Enhanced/Fast sync for the best results. + +{{< single-title-imgs + "Press F to sync" + "./amd.png" + "./nvidia.png" + "./intel.png" + >}} + +Maide found an issue related to the size of the pipeline cache. +yuzu used to return the size of the shader code in bytes, which was later used to resize the unsigned 64 bit integer array in charge of storing the cache, making the array 8 times larger than it was supposed to be. +This is fixed by {{< gh-hovercard "10145" "using the length of the array" >}} instead of the size in bytes. + +A common complaint from users with 8GB of RAM is that games become unstable over time. This isn't necessarily a memory leak — it's likely just the system running out of RAM as new shaders are added to the pipeline cache. +This change greatly benefits them. +~~But it’s 2023, you should seriously consider getting 16GB by now. Tears of the Kingdom is not Super Mario Odyssey.~~ + +ASTC continues to be in the news here — this time a problem with {{< gh-hovercard "10206" "3D ASTC" >}} textures, because it isn’t enough to deal with flat 2D ones. +A bug in their implementation caused the level Frantic Fields in `Donkey Kong Country: Tropical Freeze` to render incorrectly. +Some tweaks by the ‘hawk, and the Kong army is back in action. + +{{< imgs + "./dk.png| No more quicksand! (Donkey Kong Country: Tropical Freeze)" + >}} + +yuzu's buffer cache is responsible for storing most forms of arbitrary data for the GPU to process. +Buffers can be modified by either the GPU or the CPU, so yuzu would track the buffer to one type of modification, then wait for the other type of modification to synchronize the data. But in reality, {{< gh-hovercard "10216" "performing the synchronization" >}} before tracking the modification would make much more sense. +Maide noticed this discrepancy and set out to correct it, streamlining the code. + +Since the old code would track buffers globally, some draws would end up ignoring channel swaps, leading to leftover values from the wrong channel getting bound in uniform buffers. +If instead we {{< gh-hovercard "10469" "move buffer bindings" >}} to be channel specific, the issue is solved. +This fix should affect more games using multiple 3D channels too. + +Continuing with code optimisations, Maide found some incorrect behaviour in how render targets are selected. + +The `Render Target` (The OG RT for rendering devs before RTX came to town) is a texture containing the image to be rendered during a draw or clear operation. + +The emulator has to look at the format of the available render targets to determine which one to clear. +For example, suppose there are 5 images bound as render targets, indexed from `0` to `4`, and the game requests to clear the render target with index `2`. +The next step is to look at the format of render `target[2]` in the array. +This is where the old code would work incorrectly and inefficiently, as it would iterate through all the render targets and pick the first one that returned a valid format corresponding to `target[2]`. +This could very well be `target[2]` as expected, or an earlier render target such as `target[0]` or `target[1]`, in which case the code would completely ignore the actual render target we wanted to clear. + +In short, this process was both slower and potentially unsafe due to the risk of clearing the wrong render target. +Not happy with this, Maide worked to sort it out, getting {{< gh-hovercard "10217" "the correct render target" >}} cleared. + +Time to introduce another term! `Descriptor Sets` are a feature of the Vulkan API. Their purpose is to allow the CPU to update input bindings, the list of resources used by a shader, in an efficient way. + +Previously, yuzu would share the same descriptor set update queues between guest operations (operations directly translated from a game) and host operations (operations yuzu performs to emulate specific Switch GPU features which don't exist in Vulkan). +This could mistakenly end up with host operations overwriting the descriptor set updates of a guest pipeline during processing. +At best, this would break the state of the guest pipeline, and at worst, it would take down the entire GPU driver. +If you experienced random crashes in `Xenoblade Chronicles` games, `Luigi’s Mansion 3`, `Bayonetta 3`, among others, you might now know why. + +So, how can this be solved? “Simple!” Let’s just give the host and guest compute pipelines their own {{< gh-hovercard "10222" "queues." >}} +Having this information in separate queues fixes the data integrity issues, greatly improving stability. + +Newcomer [danilaml](https://github.com/danilaml) identified a {{< gh-hovercard "10254" "missing bitflag" >}} in the header responsible for decoding H.264 videos. +This fixes video rendering for `Layton's Mystery Journey: Katrielle and the Millionaires' Conspiracy`. + +{{< imgs + "./layton.png| Games are boring without their cutscenes, right? (Layton's Mysterious Journey: Katrielle and the Millionaires)" + >}} + +Not stopping there, danilaml also added support for deinterlaced video playback by using the {{< gh-hovercard "10283" "yadif filter" >}} included with [FFmpeg](https://ffmpeg.org/), fixing the game's video rendering. +Thank you! + +Intel’s Linux Mesa Vulkan driver, ANV, broke the `VK_KHR_push_descriptor` extension with version 22.3.0 and later, causing several games to fail to boot. +toastUnlimited {{< gh-hovercard "10365" "disabled the extension" >}} to ensure proper game compatibility, and then, after a quick response from the ANV developers fixing the issue, byte[] {{< gh-hovercard "10414" "allowed the use" >}} of the extension on current Mesa versions. +Mesa is an example of how GPU driver development should be done. + +GPUCode improved overall performance when using Vulkan in a few percentage points by {{< gh-hovercard "10474" "removing a wait semaphore." >}} +Every bit helps. + +[Epicboy](https://github.com/ameerj) continues his crusade to improve OpenGL. +This time, he {{< gh-hovercard "10483" "fixed" >}} the use of `Accelerate ASTC texture decoding` when ASTC recompression was set to Uncompressed. + +And finally, to close this section, Maide fixed homebrew console apps crashing by {{< gh-hovercard "10506" "skipping a section of the buffer cache" >}} that isn’t needed when an app doesn’t use graphics. + +## Project Gaia-lite + +byte[] implemented some file system changes on his own, giving us a taste of what’s to come. + +Here’s a fun one. Why does it take minutes to boot `Fire Emblem Engage` or `Animal Crossing: New Horizons` with mods? +Because the old implementation became quadratically slower as the number of the files in the game increased! + +{{< gh-hovercard "10183" "Fixing" >}} the terrible time complexity reduces patch times during boot in `Fire Emblem Engage` from one and a half minutes to _three seconds_, and in `Animal Crossing: New Horizons` from about a minute to _one and a half seconds_. Wow! + +That function wasn't the only source of unnecessarily quadratic behavior. Reads also grew quadratically in time with file count, which has now been {{< gh-hovercard "10463" "optimized," >}} improving in-game load times as well as boot times. + +Another source of slowdown we've identified comes from unnecessary copying and freeing of strings, and we plan to address this in Project Gaia in the future. + +Finally, a savedata reader for `cache storage` needed to be {{< gh-hovercard "10237" "stubbed" >}} to get `Tears of the Kingdom` to boot. + +## Input and Amiibo improvements + +HD Rumble is one of the marketed features of the Switch, which is a cool way of saying the official Switch controllers have `Linear Resonant Actuators` in charge of rumble, instead of the good old rumble motors we were used to in the past. + +Well, Sony’s DualSense controller also has linear resonant actuators, so in theory, it should be able to emulate HD Rumble. +The problem is that SDL, the API we use to support non-Nintendo controllers on yuzu, currently doesn’t expose a way to take advantage of these fancy actuators. + +Well, newcomer [marius851000](https://github.com/marius851000) improved this situation for DualSense owners, so they came up with the idea to {{< gh-hovercard "10119" "change the rumble amplitude" >}} based on the frequency requested by the game, with 140-400 Hz operating as the low frequency, and 200-700 Hz as the high frequency. +This way, some sense of “rumble audio”, and an overall better shaky-shaky experience, is achieved. +Thank you! + +To help you see if the motion controls are working, german77 has added a {{< gh-hovercard "10167" "cute little cube" >}} to the controller preview. +Feel free to play with it! + +{{< imgs + "./motion.png| Warning, it’s addictive." + >}} + +Stick drift is not the only fear for gamers using controllers, there’s also the rarer *motion drift!* +This could happen naturally, or after some *serious gaming* moments, so an option for {{< gh-hovercard "10203" "recalibration" >}} was needed. +Thankfully german77 took care of it, adding the option if you right click the Motion # mapping in `Emulation > Configure… > Controls`. +If you use it, remember to leave the controller/device on a flat surface for at least 5 seconds so the process can take place. + +{{< imgs + "./gyro.png| Stop shaking!" + >}} + +Now something for the ~~dirty cheaters~~ open-minded players out there. +Games will block trying to use the same Amiibo more than once, so german77 added a way to {{< gh-hovercard "10207" "randomly generate a new ID" >}} each time the Amiibo is used. The option can be enabled from `Emulation > Configure.. > Controls > Advanced > Use random Amiibo ID`. + +{{< imgs + "./id.png| Bottom right corner, can’t miss it." + >}} + +Keep in mind games like `Super Smash Bros. Ultimate` will complain if the ID changes. + +Scanning for Amiibos seems to be a very demanding task for the available Bluetooth bandwidth when using Joy-Cons. +To mitigate this, german77 {{< gh-hovercard "10265" "reduced the scan rate" >}} from once per frame (30 or 60 Hz) to 5 Hz, and reduced the number of attempts to get valid data to 1 down from 7. +This should alleviate the right Joy-Con’s oversaturation of the available Bluetooth bandwidth, reducing stutters considerably. + +But what if you want to enjoy some Amiibo scanning on your Pro Controller? +Previously, support was only available for Joy-Cons. +But now, {{< gh-hovercard "10344" "Pro Controllers are also supported!" >}} As long as the controller is connected over Bluetooth and the custom Pro Controller driver is enabled in `Emulation > Configure.. > Controls > Advanced > Enable direct Pro Controller driver [EXPERIMENTAL]`. +That EXPERIMENTAL label is in its last days now. + +Not stopping there with the Amiibo changes, german77 also implemented {{< gh-hovercard "10396" "full support for Amiibo writing" >}} when using a Joy-Con or Pro Controller! +This enables the last missing piece for full Amiibo emulation, just as you would use them on the Switch itself. + +Feel free to scan to your heart's content! As long as you managed to grab one of the plastic things while they were in stock. + +It's worth mentioning that writing Amiibo data will require dumping the relevant keys. +However, if all you want to do is load decrypted Amiibo dumps, german77 {{< gh-hovercard "10415" "added support" >}} for using them without needing to dump the Amiibo keys. + +At this point, the only thing left to complete Amiibo support is to add a manager! + +## Audio and miscellaneous changes + +The war against properly shutting down yuzu rages on. +This time Maide implements a {{< gh-hovercard "10128" "fix in the DSP engine" >}} so it closes before a required system instance is terminated. +This way a deadlock is avoided during shutdown, improving the situation slightly. +Another battle won, but how many remain? + +This next one left us wondering... +[ronikirla](https://github.com/ronikirla) reported that `Pokémon Mystery Dungeon Rescue Team DX` would consistently crash due to a read access violation after two hours of gameplay. + +That’s not a simple bug to track down and fix, yet someone in ronikirla's Twitch chat identified the issue as a {{< gh-hovercard "10178" "bad block check" >}} in the address space code and passed along a fix. + +{{< imgs + "./pmd.png| Love the art style! (Pokémon Mystery Dungeon Rescue Team DX)" + >}} + +The change seems to also fix `Advance Wars 1+2: Re-Boot Camp`. + +{{< imgs + "./aw.png| Bond, yuzu Bond. (Advance Wars 1+2: Re-Boot Camp)" + >}} + +Recent changes made to audio emulation improved performance and solved crashes, but also had an interesting regression. +Some sound effects played at a slower speed. + +After doing some extensive reverse engineering, Maide reached the conclusion that due to how the DSP works, a {{< gh-hovercard "10221" "5 ms timeout" >}} is needed in the processing wait. +With the timeout implemented, `SUPER MARIO ODYSSEY` and `Kirby Star Allies`, among others can now play back their audio at full speed. + +[danilaml](https://github.com/danilaml) continues to deliver the good stuff. +This time, simply {{< gh-hovercard "10362" "updating cubeb" >}} (one of our audio backends, and most of the time the default one) fixed a bug that muted the emulator after waking the PC from sleep. +Feel free to close your lids and continue later! + +Users noticed that after recent changes to fix the wire audio in `SUPER MARIO ODYSSEY`, audio in many games could desync and sound crackled or distorted. +bylaws suggested allowing the audio buffer to {{< gh-hovercard "10471" "wait indefinitely" >}} if a queue is too big, so Maide implemented this idea and et voilà, the problem is gone! +(Pardon my French; Spanish is cooler). + +## UI improvements + +If your yuzu is configured with multiple user profiles, and the `Prompt for user on game boot` option in `Emulation > Configure > General` option is enabled, you will have to click the profile you want to boot and then click OK. +Well, for the newcomer [Qigo42](https://github.com/Qigo42), this was unsatisfactory, so they allowed the {{< gh-hovercard "10189" "profile selection pop-up" >}} to work with just a double click! +Nothing beats quality-of-life changes. Thank you! + +[jbeich](https://github.com/jbeich) is back, fixing {{< gh-hovercard "10205" "BSD support" >}} again! +It’s always good to have more OS alternatives working. + +Continuing the trend in quality-of-life changes, newcomer [grimkor](https://github.com/grimkor) has a nice gift for us. + +{{< imgs + "./context.png| And now, for your convenience…" + >}} + +A {{< gh-hovercard "10352" "context menu" >}} for the filter and antialiasing options! You no longer have to go through the entire list of options if you want to try a different one, simply right click and choose. +Thank you! + +If you double clicked a game in the game list, you could end up double clicking it again or pressing enter before the game list got unloaded, which would cause yuzu to try to load the game twice, and usually just crash. +german77 fixed this up by {{< gh-hovercard "10482" "immediately disabling the game list" >}} after a game has been launched. + +## Hardware section + +We no longer only support the PC! In future articles, we will include any news for Android GPU vendors. + +### NVIDIA + +We have some good news and a little disappointment for the Green Team. +But first, we have some progress with the Maxwell and Pascal situation. + +In the past, we used to recommend users to stick to older driver releases for the GTX 750/900/1000 series, as anything newer than the 470 driver series was unstable. +Thanks to the work done with the garbage collector for `Tears of the Kingdom`, we now know that the problem with these cards is how the driver handles out-of-memory situations. +We were even able to observe it on Turing cards with 4GB, so it wasn't unique to older cards, we just didn't have a game that used VRAM as much as Zelda. + +We reported our findings to NVIDIA with a test case, so it’s in their hands now. + +As the VRAM fills up, an AMD card will get slower and slower until it stops working and crashes yuzu, while an NVIDIA GPU would corrupt the entire desktop, taking all the displays with it, sometimes even forcibly rebooting the system. + +Using the ASTC recompression option helps a lot to avoid this problem. +But if it does happen, it can still cause a system lock or reboot, so we need a way to mitigate this while NVIDIA investigates the issue. + +{{< single-title-imgs-compare + "Now playable with only 2GB of VRAM! (The Legend of Zelda: Tears of the Kingdom)" + "./nvidiabug.png" + "./nvidiafix.png" + >}} + +Fortunately, we stumbled upon a stopgap measure that solves the problem, and we updated our [recommended settings](https://community.citra-emu.org/t/recommended-settings/319349) guide to include it. +Just change `Vulkan/OpenGL presentation method` in the NVIDIA Control Panel to `Prefer layered on DXGI Swapchain`. +The same setting used to get AutoHDR working helps contain the out-of-VRAM crashes. +Using this in combination with BC1 ASTC recompression will make old 2GB cards run without crashes. + +{{< imgs + "./nvcp.png| This interface is so old…" + >}} + +Switching to the the good side of news, [HolographicWings](https://github.com/HolographicWings/) made an amazing tutorial on how to use `DLDSR` in yuzu [here](https://github.com/HolographicWings/TOTK-Mods-collection/blob/main/Guide/Guide.pdf). +DLDSR is a way to use the Tensor cores available in RTX cards to upscale the image. You can consider it a mix of DLSS and FSR 1.0, as it works for any game, but uses deep learning instead of traditional filters. +Needless to say, it’s a great way to improve image quality if you have the hardware to test it. + +And in other good news, [Special K](https://special-k.info/) now supports HDR in Vulkan and it works with yuzu! +NVIDIA is still the only supported vendor, as this is only possible thanks to the magic `Prefer layered on DXGI Swapchain` option, but the quality and customization offered by Special K over AutoHDR is outstanding. That expensive OLED never looked so tempting. + +Note that we have confirmed in testing that `Prefer layered on DXGI Swapchain` needs to be manually enabled for Special K to work properly. +This also includes other NVIDIA-exclusive goodies such as input lag reduction thanks to NVIDIA Reflex. +Feel free to experiment with the app, it's amazing. + +Here are some comparison pics in .jxr format, they can be opened with the default Photo app included with Windows 11, and an SDR control capture in .png format: + +- First the scene in [SDR](https://github.com/yuzu-emu/yuzu-emu.github.io/blob/hugo/site/content/entry/yuzu-progress-report-may-2023/sdr.png), the default experience. +- Windows 11’s [AutoHDR](https://github.com/yuzu-emu/yuzu-emu.github.io/blob/hugo/site/content/entry/yuzu-progress-report-may-2023/autohdr.jxr) with the Cemu renaming trick. +- SpecialK’s HDR with [Perceptual Boost disabled](https://github.com/yuzu-emu/yuzu-emu.github.io/blob/hugo/site/content/entry/yuzu-progress-report-may-2023/specialk.jxr). +- SpecialK’s HDR with [Perceptual Boost enabled](https://github.com/yuzu-emu/yuzu-emu.github.io/blob/hugo/site/content/entry/yuzu-progress-report-may-2023/specialkpb.jxr). + +Keep in mind, Special K needs to be tuned to the capabilities of the display, and my humble 350 nit Gigabyte G27Q is a disservice to what this change can do on actually good HDR displays. +Expect better results if you have an OLED, or a display with dimming zones and a higher peak brightness. + +Now, on to the disappointing news: the RTX 4060 Ti. + +We don’t understand what kind of decisions NVIDIA took when deciding the Ada Lovelace GeForce product stack, but it has been nothing but mistakes. +The RTX 4060 Ti 8GB with only a 128-bit wide memory bus and GDDR6 VRAM is a serious downgrade for emulation when compared to its predecessor, the 256-bit wide equipped RTX 3060 Ti. +You will be getting slower performance in Switch emulation if you get the newer product. +We have no choice but to advise users to stick to Ampere products if possible, or aim higher in the product stack if you have to get a 4000 series card for some reason (DLSS3 or AV1 encoding), which is clearly what NVIDIA is aiming for. + +The argument in favour of Ada is the increased cache size, which RDNA2 confirmed in the past helps with performance substantially, but it also has a silent warning no review mentions: if you saturate the cache, you’re left with the performance of a 128-bit wide card, and it’s very easy to saturate the cache when using the resolution scaler — just 2X is enough to tank performance. + +Spending 400 USD on a card that has terrible performance outside of 1X scaling is, in our opinion, a terrible investment, and should be avoided entirely. +We hope the 16GB version at least comes equipped with GDDR6X VRAM, which would increase the available bandwidth and provide an actual improvement in performance for this kind of workload. + +### AMD + +AMD has shown steady progress with each new driver release and, thanks to this, the experience on yuzu is in very good shape for Radeon owners, besides some documented hardware limitations causing graphical issues we've mentioned [in the past](https://yuzu-emu.org/entry/yuzu-progress-report-apr-2023/#amd-delivering-on-their-promises). + +The main exception is a rendering issue affecting `Tears of the Kingdom`, which only happens with RDNA3 hardware, the RX 7000 series. + +{{< single-title-imgs + "Both the RX 7900 and RX 7600 series are affected. (The Legend of Zelda: Tears of the Kingdom)" + "./rdna1.png" + "./rdna2.png" + "./rdna3.png" + >}} + +As you can see, the textures get mangled in an interesting way. +We couldn’t find any issue in the code, and older hardware is not affected, so we submitted a simple test case to AMD to demonstrate the extent of the problem. +Affected users will have to wait to see if future driver updates solve this. + +### Intel + +After the… peculiar [discussion](https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/159) we had with Intel regarding their drivers and how they handle bug reports, we are happy to announce the [latest public beta driver](https://www.intel.com/content/www/us/en/download/729157/intel-arc-iris-xe-graphics-beta-windows.html) solves the SPIR-V issues we reported seven months ago! +We strongly recommend Intel Windows users to update to this driver to improve stability with most games. + +Sadly, fixing this issue showed us two areas where yuzu is at fault. +But luckily both issues have fixes in testing in the latest Early Access release (at the time of writing). If everything goes according to plan, they should hit Mainline in a few days. Stay tuned. + +The first problem is in yuzu's code. +Some compute shaders have barriers in places that result in generating invalid SPIR-V code, and while NVIDIA and AMD have no problem with it, Intel is following the Vulkan specification much more closely and doesn’t like the result, leading to crashes. +While we test the solution, for now we recommend Mainline Intel users to keep the {{< gh-hovercard "10181" "freshly added" >}} `Enable Compute Pipelines (Intel Vulkan only)` disabled in `Emulation > Configure… > Graphics > Advanced`. + +{{< imgs + "./compute.png| This is just temporary (famous last words…)" + >}} + +The other issue is a hardware limitation. +Intel decided to remove support for Float64 operations on their Generation 12 graphics products (UHD 700/Xe/Arc) without providing a driver fallback. +Well, it turns out that, for unknown reasons, `Tears of the Kingdom` requires over the top precision in its cutscenes — precision that current Intel hardware physically lacks, causing us to crash when building the shader. +We’re testing a Float64 to Float32 shader conversion to solve the problem. +For now, Mainline Intel users will want to use a save that's past the intro cutscene, or use OpenGL, as the OpenGL spec dictates that Float64 must be supported one way or another, even if it is via software emulation. + +Currently, the game is playable at a mostly-consistent 30 FPS with an i5 1240P running an Iris Xe iGPU (if you stick to handheld rendering), and exhibits better performance than AMD's Vega iGPUs. + +For those interested in the experience with desktop products, here is footage captured with an Arc A770 16GB: + +{{< imgs + "./totk.mp4| Arc is viable! (The Legend of Zelda: Tears of the Kingdom)" + >}} + +## Future projects + +We don’t have much to announce for now regarding ongoing projects — we were very busy with `Tears of the Kingdom` and the Android release! + +GPUCode is working on a couple of cool things. One of them is implementing a way to have an equivalent to {{< gh-hovercard "10545" "DXGI presentation" >}} working on Intel and AMD hardware; that way, AutoHDR can be used with any GPU vendor, not just NVIDIA. + +That’s all folks! For real this time. If you've reached this point, thank you for your patience and for reading to the end. We hope you've enjoyed this mega-report! See you next month! +~~We all need some sleep…~~ + +  +{{< article-end >}} +{{< imgs-compare-include-end >}} +{{< gh-hovercard-include-end >}} diff --git a/site/content/entry/yuzu-progress-report-may-2023/intel.png b/site/content/entry/yuzu-progress-report-may-2023/intel.png new file mode 100644 index 000000000..e8293aacf Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/intel.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/layton.png b/site/content/entry/yuzu-progress-report-may-2023/layton.png new file mode 100644 index 000000000..05af133ec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/layton.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/lime1.png b/site/content/entry/yuzu-progress-report-may-2023/lime1.png new file mode 100644 index 000000000..61863a44c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/lime1.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/lime2.png b/site/content/entry/yuzu-progress-report-may-2023/lime2.png new file mode 100644 index 000000000..7fcbb7f56 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/lime2.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/list.png b/site/content/entry/yuzu-progress-report-may-2023/list.png new file mode 100644 index 000000000..4e5ef17da Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/list.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/mailbox.png b/site/content/entry/yuzu-progress-report-may-2023/mailbox.png new file mode 100644 index 000000000..967981988 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/mailbox.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/mali.jpg b/site/content/entry/yuzu-progress-report-may-2023/mali.jpg new file mode 100644 index 000000000..eba9c0359 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/mali.jpg differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/mali2.jpg b/site/content/entry/yuzu-progress-report-may-2023/mali2.jpg new file mode 100644 index 000000000..14a5984e6 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/mali2.jpg differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/motion.png b/site/content/entry/yuzu-progress-report-may-2023/motion.png new file mode 100644 index 000000000..5325b3a79 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/motion.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/nvcp.png b/site/content/entry/yuzu-progress-report-may-2023/nvcp.png new file mode 100644 index 000000000..5f81dd872 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/nvcp.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/nvidia.png b/site/content/entry/yuzu-progress-report-may-2023/nvidia.png new file mode 100644 index 000000000..8eefe9b45 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/nvidia.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/nvidiabug.png b/site/content/entry/yuzu-progress-report-may-2023/nvidiabug.png new file mode 100644 index 000000000..825dd90ec Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/nvidiabug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/nvidiafix.png b/site/content/entry/yuzu-progress-report-may-2023/nvidiafix.png new file mode 100644 index 000000000..38cfe06c2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/nvidiafix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/pmd.png b/site/content/entry/yuzu-progress-report-may-2023/pmd.png new file mode 100644 index 000000000..72bda2f50 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/pmd.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/radvbug.png b/site/content/entry/yuzu-progress-report-may-2023/radvbug.png new file mode 100644 index 000000000..8b6f75ed2 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/radvbug.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/radvfix.png b/site/content/entry/yuzu-progress-report-may-2023/radvfix.png new file mode 100644 index 000000000..0e56d1d2b Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/radvfix.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/rdna1.png b/site/content/entry/yuzu-progress-report-may-2023/rdna1.png new file mode 100644 index 000000000..189e63bb0 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/rdna1.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/rdna2.png b/site/content/entry/yuzu-progress-report-may-2023/rdna2.png new file mode 100644 index 000000000..18ec26ed8 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/rdna2.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/rdna3.png b/site/content/entry/yuzu-progress-report-may-2023/rdna3.png new file mode 100644 index 000000000..6a4152a7c Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/rdna3.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/reactive.png b/site/content/entry/yuzu-progress-report-may-2023/reactive.png new file mode 100644 index 000000000..850a7f063 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/reactive.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/red.png b/site/content/entry/yuzu-progress-report-may-2023/red.png new file mode 100644 index 000000000..729f8dc60 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/red.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/remove.png b/site/content/entry/yuzu-progress-report-may-2023/remove.png new file mode 100644 index 000000000..7d29e9d9d Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/remove.png differ diff --git a/site/content/entry/yuzu-progress-report-may-2023/rf1.png b/site/content/entry/yuzu-progress-report-may-2023/rf1.png new file mode 100644 index 000000000..42fea07c7 Binary files /dev/null and b/site/content/entry/yuzu-progress-report-may-2023/rf1.png differ