RELEASE emuiibo - MitM'ing NFP services for Amiibo emulation

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by XorTroll, Apr 17, 2019.


    71,796

    442
    Front-page RELEASE
    Hi everyone!

    I noticed there was a project called switch-nfp-mitm, which had lots of forks, but none of them properly working (people reported it barely worked, and with some games), thus I decided to try to fix it, or to improve it as much as I could. Well, the results were that good, that I've just managed to get it working perfectly, even with a nice system of combos for Amiibo swapping, in just 2 days.

    So, well, here's the result:

    emuiibo

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

    Usage

    Download the latest release and place it on your CFW's titles folder (so it would be like <cfw>/titles/0100000000000352).

    According to tests, should work on any CFW which allows NSP sysmodules (Atmosphere, ReiNX).

    You also have to set the boot2 flag in the CFW's /titles directory: <cfw>/titles/0100000000000352/flags/boot2.flag.

    Combos

    All the input combos are performed with R-Stick pressing and pressing the D-pad in an specific direction (at the same time). Combos must (should) be done before or after the game starts looking for amiibos.

    • Activate amiibo emulation: Press R-Stick (like it was a button) and also pressing the D-pad up. Toggles/untoggles emulation.

    • Activate amiibo emulation once: Same as above, but pressing the D-pad right. Toggles emulation once, after emulating an amiibo then it will untoggle automatically.

    • Deactivate amiibo emulation: Same as above, but pressing the D-pad down. Untoggles amiibo emulation, and should be used as a way to fully ensure it is untoggled, in case you don't know whether it's toggled or not.

    • Move to next amiibo: Same as above, but pressing the D-pad left. Moves to the next amiibo in the amiibo directory, if last one starts again with the first one. Only has effect if amiibo emulation is toggled.
    SD layout
    • Emuiibo's directory is sd:/emuiibo.

    • Amiibos go inside sd:/emuiibo/amiibo. For instance, an amiibo named MyMario would be sd:/emuiibo/amiibo/MyMario/<json files>.

    • Every time the console is booted, emuiibo saves all the miis inside the console to the SD card. Format is sd:/emuiibo/miis/<index> - <name>/mii-charinfo.bin.
    Amiibo emulation

    Emuiibo no longer requires dumps to emulate amiibos. Instead, you can use emuGUIibo PC tool in order to generate virtual amiibos.

    [​IMG]

    How do virtual amiibos work?

    Virtual amiibos consist on a folder containing several JSON files.

    A virtual amiibo, in order to be recognised as valid, must contain valid tag.json, register.json, common.json and model.json files. This file names were chosen according to the way the console processes amiibos, which are splitted into 4 processed data blocks (TagInfo, ModelInfo, CommonInfo and RegisterInfo).

    The only relevant part of an amiibo, which identifies the type of amiibo, is the amiibo ID. Every other parameter can be emulated or isn't that relevant. The NFC UUID, present on amiibo NFC dumps, is randomly generated with virtual amiibos, since it isn't something important whatsoever.

    Miis

    Miis can be an issue when attempting to make emuiibo user-friendly. Since mii format is a 88-byte data block named "CharInfo" and we have no way to see char-infos rendered but in the console itself, there is no simple way to change the mii.

    Important notes

    If (with emuiibo activated!) the title responds with an error similar to "No controller which supports NFC was found" probably means that emuiibo failed to supply the amiibo (wrong amiibo, internal error...). That error is displayed due to limitations with real NFC error codes.

    For developers

    emuiibo also hosts a custom service, nfp:emu, which can be used to control amiibo emulation by IPC commands.

    You have an implementation for C/C++ and libnx in here.

    Credits
    • Everyone who contributed to the original nfp-mitm project (forks): Subv, ogniK, averne, spx01, SciresM

    • libstratosphere project and libraries

    • AmiiboAPI (JSON API), which is used by emuGUIibo to get a proper, full amiibo list, in order to generate virtual amiibos without the need of raw dumps.

    GitHub: https://github.com/XorTroll/emuiibo
    Releases: https://github.com/XorTroll/emuiibo/releases

    Hope you enjoy this useful tool!
     
    Discussion (442 replies)
  1. Stecker8

    Stecker8 Plug

    Member
    4
    Oct 9, 2015
    Here
    Nice. Well Done
     
  2. KiiWii

    KiiWii Contributor

    pip Contributor
    18
    Nov 17, 2008
    United Kingdom
    Wow that is amazing :)

    Thank you!
     
  3. XorTroll
    OP

    XorTroll Dev: Goldleaf, emuiibo, Brew.js...

    pip Developer
    12
    Dec 28, 2017
    Spain
    Nowhere
    Also, forgot to mention that if emulation is untoggled, normal amiibos work perfectly :)
     
    GameSystem, zfreeman, nachuz and 3 others like this.
  4. blawar

    blawar Developer

    pip Developer
    11
    Nov 21, 2016
    United States
    how can you license code that you didn’t even write? (you can’t). This project is mired in license violations and stolen code.
     
  5. Brayton

    Brayton GBAtemp Regular

    Member
    4
    Feb 6, 2016
    United States
    Great job!
     
  6. linuxares

    linuxares I'm not a generous god!

    Moderator
    17
    Aug 5, 2007
    Sweden
    @WerWolv Add to Kosmos Toolbox for hotswap? :)
     
    lordelan and XorTroll like this.
  7. XorTroll
    OP

    XorTroll Dev: Goldleaf, emuiibo, Brew.js...

    pip Developer
    12
    Dec 28, 2017
    Spain
    Nowhere
    Most if the project is rewritten, and I've talked with the base repo's dev about the license, so he is aware. Given credit to every contributor anyway
     
  8. linuxares

    linuxares I'm not a generous god!

    Moderator
    17
    Aug 5, 2007
    Sweden
    Any logo for it btw? Or do you hope someone can throw together one?
     
  9. XorTroll
    OP

    XorTroll Dev: Goldleaf, emuiibo, Brew.js...

    pip Developer
    12
    Dec 28, 2017
    Spain
    Nowhere
    Well, as it's a background process I haven't come up with any logo.
    Wouldn't be a bad idea tho...
     
    GameSystem and linuxares like this.
  10. 8BitWonder

    8BitWonder Small Homebrew Dev

    Member
    11
    Jan 23, 2016
    United States
    47 4F 54 20 45 45 4D
    Wow, nice work!

    I'll have to give this a try later. :)
     
  11. linuxares

    linuxares I'm not a generous god!

    Moderator
    17
    Aug 5, 2007
    Sweden
    Well we got some excellent theme makers. They can probably throw together a logo to your liking!

    (I was thinking mostly for the HB Store ;))
     
  12. x65943

    x65943 Dr. Rabbi Prince X, Sr., Ed. D.

    Moderator
    16
    GBAtemp Patron
    x65943 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jun 23, 2014
    United States
    Midwest
    Wow seriously impressive

    I am so excited to try this out
     
  13. linuxares

    linuxares I'm not a generous god!

    Moderator
    17
    Aug 5, 2007
    Sweden
    "Write date is hardcoded to 15th June 2019." - @XorTroll you troll :P
     
  14. blawar

    blawar Developer

    pip Developer
    11
    Nov 21, 2016
    United States
    Doesn't matter if you have his permission to use the code or not, you cannot copyright code that you did not write, the code is not yours. Did you speak with Dave's Devil about using his code?
     
  15. limpbiz411

    limpbiz411 GBAtemp Regular

    Member
    6
    Oct 12, 2007
    United States
    so no way to run this on SXOS?

    I was hoping for something like this on 3ds and wiiu as well. Awesome
     
    Last edited by limpbiz411, Apr 17, 2019
  16. Fan3k

    Fan3k Member

    Newcomer
    2
    Dec 17, 2018
    Germany
    Ssbu with latest update tottaly freezes console. Why
     
  17. linuxares

    linuxares I'm not a generous god!

    Moderator
    17
    Aug 5, 2007
    Sweden
    It's opensource so it could technically be ported. But I suspect those system are on the backburner.
     
    wicksand420 and limpbiz411 like this.
  18. Ericthegreat

    Ericthegreat Not New Member

    Member
    10
    Nov 8, 2008
    United States
    Vana'diel
    As long as he isn't charging and gives credit he should be fine....
     
    Tinnetju likes this.
  19. Minox

    Minox Thanks for the fish

    Former Staff
    14
    Aug 27, 2007
    Japan
    If he has permission to use the code then what is the problem?
     
Quick Reply
Draft saved Draft deleted
Loading...