Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Emuiibo Switch

From GameBrew
Revision as of 08:02, 11 February 2024 by HydeWing (talk | contribs) (not on the list..)
emuiibo
Emuiibonx.png
General
AuthorXorTroll
TypeOverlays
Version1.1.1
LicenseGPL-2.0
Last Updated2023/09/02
Links
Download
Website
Source
Support Author

emuiibo is a background process (and service) which Nintendo Switch's internal NFC (NFP) services to support virtual amiibo emulation.

Installation

You need to the following files:

  • emuiibo (grab the latest release here)
  • emuiigen (formerly emutool, see emuiibo download above)
  • Tesla (grab the latest Tesla-Menu and nx-ovlloader)

How to setup:

  • Make sure you downloaded all files mentioned above.
  • Create these folders on your SD (if not present):
    • sd:/emuiibo/amiibo
    • sd:/switch/.overlays
  • Extract all ZIP files and copy the folders on your SD card. It should look like this in the end:
    • emuiibo - sd:/atmosphere/contents/0100000000000352/exefs.nsp and /flags folder
    • emuiibo overlay - sd:/switch/.overlays/emuiibo.ovl
    • tesla-menu - sd:/switch/.overlays/ovlmenu.ovl
    • nx-ovlloader - sd:/atmosphere/contents/420000000007E51A/exefs.nsp and /flags folder

If you set up everything correctly, emuiibo is ready to load your amiibos you created via emutool (see below) or via raw .bin amiibo dump fules.

User guide

Virtual amiibos

Virtual amiibos are files stored in the sd:/emuiibo/amiibo directory with a specific structure. For instance, an amiibo named MyMario would be sd:/emuiibo/amiibo/MyMario/<amiibo content>.

Each virtual amiibo has a folder containing an amiibo.json and an amiibo.flag file.

The amiibo.json file contains properties such as the amiibo's name, UUID, random UUID generation option, Mii (owner), first and last write dates, write counter, and version.

The UUID is a unique identifier, and the random UUID option allows for generating new UUIDs each time the amiibo is accessed, potentially useful for certain games.

The Mii information is stored in a char-info file, and emuiibo can use the console's miis or generate random ones. The first and last write dates, write counter, and version provide details on the amiibo's modification history and version of Nintendo's amiibo library.

The amiibo.flag file can be removed to disable recognition by emuiibo, and creating it enables recognition again.

emuiigen - create virtual amiibo

emuiigen is a user-friendly PC utility for creating and editing virtual amiibos. This tool simplifies the process and generates the necessary amiibo folder in the desired format.

You can then copy the generated amiibo folder to their SD card, placing it in sd:/emuiibo/amiibo or any subdirectories within it.

emuiibo basic controls

How to run:

  • Make sure you have set up emuiibo as mentioned above.
  • Tip: Enable emuiibo (emulation status) before starting a game, as it may not work if enabled after launching the game. This depends on how the game internally handles amiibos.
  • Check if emuiibo is intercepting the game when it attempts to access amiibos. If not, try launching the game with emuiibo enabled first.
  • Open the Tesla overlay by holding down L1 + DPAD-down and then pressing R3 (right stick). The overlay will appear on the left side of the screen.

In the emuiibo overlay:

  • Choose "emuiibo" from the overlay.
  • In the top part of the overlay, control the following options:
    • Emulation status (on/off) - Toggle to globally disable or enable amiibo emulation.
    • Active virtual amiibo - The amiibo that will be sent to games attempting to scan amiibos.
    • Virtual amiibo status (connected/disconnected) - Indicates whether the active virtual amiibo is connected or disconnected.
    • Random UUID (on/off) - Toggle the random UUID option for the selected amiibo.
  • In the main menu of the bottom part, browse virtual amiibos through the (sub)directories in sd:/emuiibo/amiibo. Mark some of them as favorites for easy access.
  • After selecting an amiibo, it will be connected. Disconnect the amiibo (equivalent to removing a real amiibo from the NFC point) by selecting it again.
  • To go back in the menus, press the B button.

Example usage:

  • Open the overlay and choose emuiibo.
  • Enable emuiibo.
  • Start the game.
  • Navigate to the game's NFC feature to use the amiibo and activate it.
  • Open the overlay and choose your amiibo (the amiibo will then be connected).
  • The game should now register and make use of the virtual amiibo.
  • If the game instructs you to remove the amiibo, disconnect it.

Supported figures

Some games (like Skylanders) make use of their particular NFC technology, aside from amiibos.

This project only emulates amiibos; therefore, in Skylanders' case, only the two special figurines with amiibo support can be emulated here, where emuiibo will only emulate the "amiibo part" of them.

Amiibo format

Amiibos are, as stated above, directories with an amiibo.json and an amiibo.flag file. The flag is mainly there in case people would like to disable an amiibo and then re-enable it later.

The JSON file contains all the aspects and data an amiibo needs to provide to games, except a few aspects (per-game savedata, protocol and tag type...)

This are the properties an amiibo has:

Name The amiibo's name (max. 40 characters).
UUID It's a unique identifier for the amiibo, composed of 10 bytes. If the "uuid" field is not present in the JSON, emuiibo will randomize the UUID everytime amiibo data is sent to a game. This has potential benefits in certain games, like in BOTW, where amiibos can only be used once per day, but with randomized UUIDs this can be bypassed, and one can get infinite rewards scanning this amiibo infinite times.
Mii Every amiibo has a mii associated with it (it's "owner"). Internally, miis consist on a 88-byte structure known as "charinfo", so emuiibo stores this data in a file (typically mii-charinfo.bin). For new amiibos, emuiibo uses the console's services to generate a random mii, but for those who would like to use a mii from their console, emuiibo dumps in miis directory the console's miis, so it's just a matter of copying and pasting/replacing charinfo bin files. NOTE: emuiibo contains the charinfo file's name in the JSON (mii_charinfo_file), so if the file ever gets renamed, don't forget to rename it in the JSON too, or emuiibo will generate a random mii for the file name in the JSON.
First and last write dates These are (as if it wasn't obvious) the first and last time the amiibo was written/modified. When a virtual amiibo is created with emutool, the current date is assigned to both dates, and when the amiibo is modified in console, emuiibo updates the last write date.
Write counter This is a number which is increased everytime the amiibo is modified (and emuiibo does so, imitating Nintendo), but when the number reaches 65535, it is no longer increased (the number is technically a 16-bit number).
Version This value technically represents the version of Nintendo's amiibo library (NFP), so emuiibo just defaults it to 0.

Areas

Areas (application areas, technically) are per-game amiibo savedata. Technically, real amiibos can only save data for a single game, but emuiibo allows as many games as you want (since savedata is stored as files). This savedata is quite small, and tends to be 216 bytes or smaller.

emuiibo saves this data inside bin files at areas directory inside the amiibo's directory, and the bin file's name is the game's area access ID in hex format.

An access ID is a unique ID/number each game has for amiibo savedata, used to check if the game actually has savedata in an amiibo. Here's a list of games and their access IDs:

Per-game access IDs

A list is maintained at Switchbrew.

Screenshots

emuiibo
emuiibonx2.png

emuiibonx3.png

emutool
emuiibonx4.png

Media

How to use emuiibo with Tesla in switch - switch 10.2.0 Atmosphere 0.14.4 Animal crossing (TruganiniGamePlay)

Changelog

v1.1.1 2023/09/02

  • Dependencies were adjusted to properly support Java 8 as well.
    • A consequence of this is that combo boxes are no longer searchable (for now).

v1.1.0 2023/08/21

  • emuiibo:
    • Selected status option (on/off) is now saved via SD flags, so that after a reboot the selected option remains.
    • Fixed an input-related bug which would cause weird issues when trying to open hbmenu/album while emuiibo was intercepting a game.
    • Logging (if enabled) now logs to a log file inside the SD card (instead of official LogManager, which is less intuitive for regular users).
    • Now converted bin-files have a proper mii set (it's not their actual mii since it's still a technical problem to use it, but previously none was set thus showing an invalid/blank mii - now a random one is generated like in other places with nonexistent miis).
  • overlay:
    • Updated German, traditional/simplified Chinese and Korean translations.
    • Introduced Brazilian Portuguese translations.
  • emuiigen (<- emutool):
    • Say goodbye to emutool... and hello to the brand new emuiigen! emuiigen is its successor - a new, reworked desktop utility for creating/editing virtual amiibos!
    • All the features emutool originally had are (of course) here again.
    • New UI (better organized) in Java(FX), thus ensuring cross-compatibility better than emutool (which relied on C#).
      • Now batch generations (all amiibos or all of a certain series) have their own UI page/proper space.
    • New (basic) support for opening (thus checking validity) or editing virtual amiibos (name and random-uuid feature).
    • Default amiibo names now remove less important characters (spaces, dashes, etc.) so that most of the name is left after trimming them to the maximum 10 characters (for instance, previously Isabelle - Winter would be just trimmed to Isabelle -, whereas now it's converted to IsabelleWi which is at least better).

v1.0.0 2023/05/05

  • This update's major milestone (among others) is to finally intercept nfp:sys service, AKA intercepting system settings/applet amiibo support - hence, many changes here are because of this.
  • emuiibo is no longer a pre-release, by the way.
    • NOTE: don't forget to update to the latest nx-ovlloader/Tesla menu!
  • The virtual amiibo format went through some major changes system-settings support required:
    • Now area information is saved in <amiibo>/areas.json, which stores pairs of access_id and program_id values. System settings support also requires knowing the program ID of the title using the area, which is why now area information is saved here.
    • This JSON also contains a current_area_access_id field: system settings's option to delete an amiibo's save data conflicts with emuiibo's implementation of saving (real amiibos have a single game save data while emuiibo allows multiple), so this field contains the currently "selected" area, which consists on the area system settings will see and show info of/delete.
    • In order to convert old formats to this new changes, the areas.json file will be created automatically, but since there is no way for emuiibo to tell the program ID of plain amiibo areas, it will set a certain ID by default (to be distinguishable from the rest, I opted for "Retain Interactive Display Menu"'s one, which is a debug program), and for the correct ID to be set on the area info, the user must use the amiibo with the game in question. I know this can be a bit tedious, but it's the best way to handle it.
    • Now virtual amiibos with names longer than 10 characters are ignored and considered as invalid. Due to certain technical reasons (and Nintendo being too inconsistent with its formats) I originally thought the limit was at 40, but in certain contexts (like system settings) where the 10-char limit is imposed, existing virtual amiibos with longer names tend to cause weird/unexpected behavior.
    • The system settings formatting option will remove all virtual amiibo areas (won't unregister it like with real amiibos since virtual amiibos have no concept of being (un)registered).
    • The system-settings game-save-deleting option will remove the selected amiibo area, which can be changed from the overlay. This selected area will also be the one system-settings always shows.
    • Now the random-UUID option has its own field in the amiibo.json file (use_random_uuid), so that amiibos will have their own UUID which won't be cleared when random-UUID wants to be enabled (see related overlay changes).
  • Old formats supported in older emuiibo versions (raw bin dumps and older virtual amiibos) are fully supported now! Backwards-compatibility has been reimplemented so that these outdated formats are automatically converted to the modern format on boot (for bin dumps, the dump binary file gets moved but not deleted).
    • Criptography is now supported, so that if /switch/key_retail.bin is present, the encrypted sections of bin dumps will be accessible by emuiibo, so that the resulting converted amiibos will contain all the amiibo data present there (this includes game app-data areas, AKA amiibo game save-data).

emuiibo:

  • Compiled with latest libraries.
  • All the format changes above resulted in code changes to support it, of course.
  • The emuiibo IPC service (used by the overlay and other homebrew to control emuiibo) has some new commands reflecting the format changes. As always, the overlay is the best example of a homebrew using this service to control amiibo emulation.
  • Some amiibo ID internal bugs were fixed (again, huge shoutout to Nintendo for being unnecessarily and heavily inconsistent with their amiibo formats across platforms), which would've previously caused some isssues with certain games (like Monster Hunter Rise, Splatoon, etc.)

overlay:

  • Compiled with latest libtesla/libnx.
    • A long-standing libtesla UI cleanup bug was fixed which may have caused crashes sometimes.
  • The UI was extended (following the new format changes) to show/toggle the currently selected area of the active virtual amiibo, as well as to toggle amiibos' random UUID option.
  • Listed amiibo/plain directory entries are now alphabetically ordered.
  • If the title is installed, it's name will be shown; otherwise, it's plain program ID will be shown.
  • emuiibo's version is now checked, so that an overlay will refuse to work with older/newer emuiibo versions and thus only work with the exact same version.
  • French language support was added.

emutool:

  • .NET framework version was lowered to v4.5.2, hoping this may increase compatibility with certain systems.
  • Amiibos whose default name contains "/" are replaced with "_", and special characters are also replaced with their ASCII equivalents (like E from È) to avoid issues with system paths on virtual amiibo creation.

v0.6.3 2022/02/11

  • emuiibo:
    • Fixed some minor issues related to virtual amiibo area saving.
    • Fixed a weird internal issue where sometimes emuiibo would become unaccessible under certain circumstances.
  • overlay:
    • The overlay has almost entirely changed thanks to the huge work of AD2076 and AmonRaNet:
      • Really improved UI and design.
      • Now, aside from English, the following languages are supported: German, Spanish, Russian, Traditional and Simplified Chinese.
  • emutool:
    • No changes (not uploading a new release).

v0.6.3 2021/04/20

  • emuiibo:
    • Fixed support for latest Atmosphere versions (0.19.x) and for 12.x system updates. Note that this emuiibo version (and next ones) won't work on older Atmosphere versions.
  • emutool:
    • No changes, only the version value was updated.

v0.6.2 2021/02/04

  • (emutool didn't change for this new release, only the version number was updated.)
  • emuiibo:
    • Small nx library corrections/improvements.
    • Atmosphere 0.18.0 support (always use emuiibo with latest ams if it's supported!).

v0.6.1 2020/10/28

  • emuiibo:
    • Fixed controller support - some games couldn't be used with detached JoyCons / other controllers on v0.6, that has been fixed on this version.
    • When exporting system miis on startup, now emuiibo doesn't use the mii's name as the mii folder's name, the mii's name is written to a name.txt file instead to avoid potential FS issues with non-UTF8 names, and the mii folder's name will just be an index.
  • emutool:
    • Added support for creating all available virtual amiibos at once - they will be organized in folders according to their series.

v0.6 2020/09/26

  • emuiibo has been through a complete rewrite in Rust (except for the overlay), so everything has changed internally:
    • Support for latest Atmosphere (0.14.4), and next releases unless breaking changes are introduced.
    • emuiibo no longer handles conversion of raw amiibo dumps or old emuiibo formats - only the current format is supported (the one used since 0.5.x).
    • Heap size has been considerably reduced (last version used 0x40000, current one only uses 0x4000) - in addition, the exefs NSP's size has been reduced too, being now 5 times smaller than 0.5.x.
    • Regarding the known issues with time services and sysmodules, emuiibo no longer makes use of this service to avoid creating more issues, even though this implies that virtual amiibos' "last write date" won't be set when a virtual amiibo is modified - luckily, not emulating this anymore doesn't change anything relevant nor break anything.
    • emuiibo's IPC interface other processes may use to communicate with it has a minor change - thus, 0.5.x or older overlays WON'T WORK with this version's emuiibo.
  • emutool did not change at all.

v0.5.1 2020/06/21

  • Note: this is nothing more than a quick update in order to support latest CFW - emutool wasn't even updated, the only thing which changed is its version number, and emuiibo has no relevant changes other than small bugfixes.
  • Updated libnx, libstratosphere/Atmosphere-libs and JSON libraries. emuiibo requires C++20 now, as Atmosphere-libs do so.
  • Changed size from 0x20000 to 0x40000 to avoid some memory issues people experienced.
  • Fixed a small bug when dumping console miis to the SD card on startup.

v0.5 2020/04/17

  • Latest Atmosphere (0.11.1) and 10.0.0 support.
  • New virtual amiibo format, consisting on a single JSON file (emuiibo will automatically convert old formats to this new format on startup).
  • emuiibo:
    • emuiibo has been completely rewritten, and this has been incredibly helpful, since almost any issue present for previous versions is no longer a problem/
    • Key combos are no longer a thing, since they were a not very friendly way of controlling emuiibo, and having an overlay is 100 times more helpful.
    • The way emuiibo internally "mimics" Nintendo's amiibo services has been improved a lot. This was what caused many games to not work fine (Link's Awakening, Diablo 3, Fire Emblem...). In fact, emuiibo is introducing a new feature which makes amiibo emulation slightly more similar to real amiibos, which made those specific games work (see below).
    • Virtual amiibo connecting/disconnecting: these two are the equivalents of placing a real amiibo in the NFC point/R-stick (connecting it) and removing it from that spot (disconnecting it). Previously, emuiibo "tried" to take care of that manually (games like SSBU asked the user to remove the amiibo after saving progress), which resulted in many games freezing when they read amiibos. Now, simply disconnect the amiibo when you need to remove it, and connect it to use it again.
    • Support for raw bin amiibo dumps works now (it was broken for v0.4).
    • Old (v0.3.x and v0.4) amiibo formats are converted on startup, so no need to create new amiibos, old ones should work.
    • IPC API changed completely, check the overlay's source as an example of how it works.
    • Now logs are reset on each reboot, so make sure to not reboot or make a copy of emuiibo's log file if wou want to preserve them! (this was done since the log file would get excessively big if it wasn't cleaned).
  • [NEW] Tesla overlay:
    • This is a new addition to the project and, probably, the best and easiest way of controlling emuiibo (thanks to WerWolv for such an amazing project).
    • This are its current features:
      • Toggle on/off emulation.
      • Control virtual amiibo emulation with emuiibo, select a virtual amiibo as active, connect/disconnect it (see above).
      • Browse through categories, keep your virtual amiibos organized.
      • See in real time if the currently opened game is being intercepted by emuiibo (if you have the overlay open while the game runs, you might be able to spot the exact instant in which emuiibo intercepts the game's amiibo access).
  • emutool:
    • Saving virtual amiibos to FTP is now supported.
    • Fixed a bug where amiibos with the same name would make the program fail.
    • Added support to save amiibos using the last location selected to save the previous amiibo, instead of having to select it again (can be quite useful when making many virtual amiibos).
    • Virtual amiibo name and the virtual amiibo's directory name are now different settings (they used to be treated as the same field before).
    • An option has been added to save the amiibo's image as a PNG file (amiibo.png), overlay might add support to display it in next versions ;)
    • Added help option, which will point to emuiibo's repository's README.
    • [Silent update] fixed a bug in certain cases where emutool would fail to connect to AmiiboAPI (WebException).
  • FAQ:
    • Can I use 20 hearts link wolf amiibo bin dump with emuiibo?
      • Since BOTW detects the 20 hearts in the link wolf amiibo via amiibo savedata, which emuiibo can't access on bin dumps since it's encrypted and we don't yet support decryption, you will need to extract manually the savedata from your PC (using tools like amiitool) for now.
    • Games which needed emuiibo to be on before they were launched (BOTW) are or will ever be fixed?
      • No - sadly there's nothing to be fixed here. It's just how the game uses amiibo services - these games initialize amiibo services the moment they're launched, so emuiibo needs to be on at that moment to enable emulation in that game.

Credits

  • Everyone who contributed to the original nfp-mitm project (forks): Subv, ogniK, averne, spx01, SciresM.
  • libstratosphere project and libraries.
  • AmiiboAPI web API, which is used by emutool to get a proper, full amiibo list, in order to generate virtual amiibos.
  • 3DBrew for their detailed documentation of amiibos, even though some aspects are different on the Switch.
  • LoOkYe for writing emuiibo's wiki and helping with support.
  • AD2076 and AmonRaNet for helping with the tesla overlay.
  • AmonRaNet for all the work he put into the overlay.
  • AmonRaNet, Impeeza, amazingfate, qazrfv1234, shadow2560 and SimoCasa for providing/helping with translations.
  • Thog / Ryujinx devs for reversing mii services and various of its types.
  • Citra devs for several amiibo formats used in 3DS systems.
  • Manlibear for helping with improvements and development of emutool.
  • All the testers and supporters from my Discord server who were essential for making this project progress and become what it is now.

External links

Advertising: