Check the renderer-server-prototype branch if you want to run a service that renders Miis.
Sample using the FFL decomp and RIO framework, all originally written by AboodXD, to render Miis on PC and Wii U via WUT.
Screen.Recording.2024-10-16.at.8.34.31.PM.mp4
-
Clone the repo, recursively.
git clone --recursive https://github.com/ariankordi/FFL-Testing
-
Install requirements.
This project needs GLFW3, zlib, and OpenGL dev libraries. The commands below will install them.
- Ubuntu/Debian:
sudo apt install libglfw3-dev zlib1g-dev libgl1-mesa-dev
- Fedora/RHEL:
sudo dnf install glfw-devel zlib-devel mesa-libGL-devel
- Arch/Manjaro:
sudo pacman -S glew glfw zlib
(⚠️ UNTESTED) - MSYS2 MINGW64 (Windows):
pacman -S mingw-w64-x86_64-glfw mingw-w64-x86_64-zlib
- Make sure to also install the basics:
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config
- Use
mingw32-make
instead ofmake
- As of 2024-06-02, this doesn't copy DLLs from MinGW64's environment to yours so you can launch the program in the command line, you can't click on the exe to run it.
- Also note that it should build with MSVC, but I don't have a cxxproj for you to use / this should be ported to CMake at some point...
- Make sure to also install the basics:
If you are building with WUT, you need to install
ppc-zlib
. - Ubuntu/Debian:
-
Build using the makefile.
If you don't already have them, you will also need: git, g++, make, pkg-config.
make -j4
-
To build with WUT, use:
make wut -j4
. -
This also supports OpenGL ES 3.0, for mobile devices or using ANGLE. To build targeting that, define this as an environment variable:
DEFS="-DRIO_GLES"
-
To build for Emscripten, use
make -f Makefile.emscripten -j4
- Make sure FFLResHigh.dat is in the current working directory. After this builds, the html file may not work if you click on it so you may need to run a mini web server and access it there.
-
-
Obtain the resource file, FFLResHigh.dat.
- You can get it from many sources:
- It can be extracted from a Wii U:
sys/title/0005001b/10056000/content/FFLResHigh.dat
- You can extract it from a Miitomo install (it's not in the APK/IPA), or download it from archive.org:
- https://web.archive.org/web/20180502054513/http://download-cdn.miitomo.com/native/20180125111639/android/v2/asset_model_character_mii_AFLResHigh_2_3_dat.zip
- Extract the above and rename AFLResHigh_2_3.dat to FFLResHigh.dat.
- (As well as AFLResHigh_2_3.dat, AFLResHigh.dat will work too)
- It can be extracted from a Wii U:
- Place that file in the root of this repo.
- This file contains models and textures needed to render Miis and this program will not work without it.
- You can get it from many sources:
-
Run
ffl_testing_2_debug64
, and pray that it works.- If it crashes with a segfault or shows you a blank screen, make sure you have
FFLResHigh.dat
and it can open it.
- If it crashes with a segfault or shows you a blank screen, make sure you have
As of 2024-06-14, I added a change that would let you change which Miis this program renders, by reading files in the place_ffsd_files_here
folder.
As the name implies, you should be able to take any Mii in a 96 byte FFSD/FFLStoreData file, and place it in that folder.
-
Only the length of the file is checked, not the extension or name. It needs to be 96 bytes.
-
Then, it will just read each file sequentially, looping through all of them.
-
You can also just put one file there and that one Mii will spin continuously.
-
You can search for any *.ffsd or *.cfsd (CFLStoreData = FFLStoreData) file in this repo:
-
Grab the Mii from your Nintendo Network ID using the mii-unsecure.ariankordi.net API, if it is still up by the time you are reading this.
curl --verbose --header "Accept: application/octet-stream" https://mii-unsecure.ariankordi.net/mii_data/JasmineChlora --output JasmineChlora.ffsd
- Replace
JasmineChlora
with your own NNID, of course.
- Replace
-
I believe this script decrypts Mii QR Code data directly to FFSD/CFSD format: https://gist.github.com/jaames/96ce8daa11b61b758b6b0227b55f9f78
- I use it with ZBar like so:
zbarimg --quiet --raw --oneshot -Sbinary image.jpg | python3 mii-qr.py /dev/stdin ./mii.ffsd
- Replace:
image.jpg
,mii.ffsd
- Replace:
- I also made a scanner in JS, though it gives you Base64 that you have to decode: https://jsfiddle.net/arian_/h31tdg7r/1/
- I use it with ZBar like so:
GLFW3 is needed to run any RIO application on PC, which this is.
If you can't install it (not on Linux or MSYS2), or need the latest version, let's build it.
(You probably don't need to follow these)
git clone https://github.com/glfw/glfw && cd glfw
cmake -S . -B build
- If you are cross compiling, append:
-D CMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake -D CMAKE_INSTALL_PREFIX=/usr/local/x86_64-w64-mingw32/
- If you are cross compiling, append:
cmake --build build -j8
- (sudo)
cmake --install build
Try: pkg-config --libs zlib glfw3
(Unless it complains about needing glu
)
NOTE from 2024-06-02: To cross compile this from Linux to Windows, I used the following command:
TOOLCHAIN_PREFIX=x86_64-w64-mingw32- make LDFLAGS="-L/dev/shm/glfw/build/src/ -lz -L/dev/shm/glew/lib/ -lglew32 -lglfw3 -lopengl32 -lgdi32 -lws2_32
Where I have glew and glfw built at /dev/shm.
While pkg-config worked, letting me need only the TOOLCHAIN_PREFIX set, for whatever reason it wasn't building and threw lots of linking errors saying it couldn't link tons of symbols from glew32 even though it literally finds it and opens the library, so... IDK.