Importing resources from PC + JPG Viewer
-
That unit1.h file was really confusing me for a while there, lol.
I am definitely interested in this. The ’emulate a joycon and put the data in the save file’ idea is pretty cool. I have those pieces of hardware in my parts box right now!
-
Amazing. That must have been a lot of work, I am curious to understand, could you comment a bit:
a) you created a programm that runs on linux or PC that converts an image into data a joycon could send?
b) and a FUZE programm that saves the data
c) and a FUZE programm that reads the data again and converts it into an array, that you are loading with uploadImage?
I mean even, to setup the hardware... ok, I know some of you have a heavy background in electronics, but for me this is very amazing to see. -
Ok, i'll try to explain little bit more.
On PC side is my "Fuze Import" application developped in C++ Builder that you could see in my previous video. I'have added new functionality into this application that can send whatever file (not necessary image, but really any file you want) via USB/COM port to the tiny A-Con device. This PC application simply sends a lot of commands to the A-Con that request setting buttons and analog sticks to the position that corresponds to the 4Bytes that PC application wants to transmit. For example: If i want to transmit Byte 01011101 then PC application sends command to the A-Con to press 5 buttons: A, B, L, R, ZL. For other 3 bytes it sends commands to A-Con to emulate setting JoyCon analog sticks to some specific position that again correspond to these Bytes.
On Nintendo size is my Fuze program that is still checking controler status "c = controls(0)". When it detects that some specific combination of buttons are pressed it knows that it is communicating with PC and translate this combination of actually pressed buttons and position of analofg sticks into 4Bytes.
The rest is just the communication protocol. The header block that has 32 bytes where i transmit file size of the transmitted file and its name. And then follow directly binary data of the transmitted file.
When the Fuze program receives valid header block from PC it creates a new record in the internal file and starts to write every bytes it recieves after this new record.
The same Fuze program i used to check if the data are ok. It simply reads data back from the internal file and display them as a text (when i tested text file) or draw pixels on the screen when i tested validity of image file.
Well, maybe it sounds very complicated, but when it is working, it is super smooth, relatively quick and the most important thing is that it makes this possible.
Now, you can have your own image in your games, you can create your own sprites and animation on PC, text files or whatever and transmit it as your resource into your game project. -
I have added JPG Viewer support in this import program. JPG decoding is very complex algorithm and firstly i thought that it would not be possible to implement it in the FUZE. But it is. If you would like, you can download the testing application via ID: B3W73MND58. It is mainly for educational purposes. If you would figure out some optimisation that would speed up the process of decoding, i will be very gratfull for sharing it :)
Here are some screenshot of the current version and also the link to the related video.
-
@sigixxx This is really amazing!
I would love to try transferring files too… -
this is the most insane thing i've ever seen in my entire life
-
how do you even think how to make something like this
-
Omg is that the music from Amelie?
-
I downloaded this and had a try the other day. It is quite a mini miracle seeing those images appear. More so when you think that it’s actually decoding a .jpg..
-
@toxibunny Yes, the music is from Amelie movie :) I like to play this kind of melody on piano and it is actually used in the intro of my game Egg :)
-
Wow! #speechless
-
I need a way to import sprites. I see a video some times ago for something connected to the switch that do something similar of this tool from @sigixxx but for sprites?
Is something existing / possible to buy? -
A-Con is capable to transfer whatever binary file in Nintendo. In my games Damidar, a Gift from nowhere, Tapper (still in dev) and Poem (not actually a game) i am using only custom sprites. Normally, i prepare images in PC, export them as GIF files and transfer them in Nintendo. In my games i have function similar to standard function loadImage that is called viewGifFiIe. This function returns image object in the same way as standard "loadImage" function does, so i can use this object in my sprites.
A-Con device is my device that i have developped by myself. You can create something similar but it is not very easy.
I was planning to share all details about building A-Con (when you know how to do that then it is easy and cheap) but i am still considering if it is a good idea. -
I'm interested in replicate it with the info you can give, or better, buy one already done.
-
I have a question, does it require a home-brewed switch, if not, does it store the huge binary file in the Fuze code editor?
Also, are you able to release the information on how to make that/buy that? I am working on porting Pokémon emerald to Fuze, and spent weeks recreating the sprites, and my code looks like this lol
https://i.ibb.co/J7D3nWT/IMG-20230521-172724.jpgIt has been a year since I have started this project, and only managed to import the Pokémon's sprites. There are still a lot more images to go, and that device will make it so I can probably finish this project by 2024.
Thanks. --PosingSaucer251