Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Importing resources from PC + JPG Viewer

    Work In Progress
    9
    17
    1321
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sigixxx last edited by sigixxx

      Hi,

      currently i am working on one thing that i am really missing in FUZE and i fully understand why is that. It is importing some resources from PC. I needed this for one of my future project and because i am quite successfull with this import i am sharing this with you.
      Later, If you would be interested i can prepare a little tutorial with detail info.

      Where i am now:
      I can import any binary file from PC and store it in my project.
      I can import several files.
      I hvave checked the correct containt of the files by displaying the contain of one text file and one bitmap file.

      How it works:
      Instead of A-keyboard i am using my totaly new A-Con (that's how i call it). The hardware is absolutelly the same but the software in this tiny device emulates Joy Cons instead of keyboard. That has big big benefit in speed. Joy con can safely transmit 4Bytes (32 bits) per scan and i can safely transmit data in speed (120B per second) (A-keyboard can transfer only about 15Bytes per seconds (keyboard character can store only 6 bits and not 8)).
      PC transmit data via COM port to this ltiny A-Con device, that emulates pressing buttons and setting analog sticks according to this data. My Fuze application decodes this data from controller and store them into internal file.
      Because there is only one file per project in FUZE, data are organised as a records with name and filesize in order to be used seperately.

      On the second picture you can see how the Fuze application display stored data from the file Unit.h (text file) and test.bmp (image).
      The picture file was transmitted in 32 minutes. And i think that it is absolutelly perfect for 230kB of data because unitl now i had no way to do this.

      The cost of this device is less then 20Euros. And creating is very easy (just need to connect 2 wires and upload the software).

      income1.jpg income2.jpg

      1 Reply Last reply Reply Quote 10
      • monkeee
        monkeee F last edited by

        That's insane :0

        1 Reply Last reply Reply Quote 0
        • PickleCatStars
          PickleCatStars F last edited by

          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!

          1 Reply Last reply Reply Quote 0
          • spikey
            spikey F last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • S
              sigixxx last edited by

              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.

              1 Reply Last reply Reply Quote 5
              • S
                sigixxx last edited by sigixxx

                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.

                jpgviewer.jpg

                vinicity 1 Reply Last reply Reply Quote 8
                • vinicity
                  vinicity F @sigixxx last edited by

                  @sigixxx This is really amazing!
                  I would love to try transferring files too…

                  1 Reply Last reply Reply Quote 0
                  • purple
                    purple F last edited by

                    this is the most insane thing i've ever seen in my entire life

                    1 Reply Last reply Reply Quote 0
                    • purple
                      purple F last edited by

                      how do you even think how to make something like this

                      1 Reply Last reply Reply Quote 0
                      • PickleCatStars
                        PickleCatStars F last edited by

                        Omg is that the music from Amelie?

                        S 1 Reply Last reply Reply Quote 0
                        • PickleCatStars
                          PickleCatStars F last edited by

                          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..

                          1 Reply Last reply Reply Quote 2
                          • S
                            sigixxx @PickleCatStars last edited by sigixxx

                            @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 :)

                            1 Reply Last reply Reply Quote 2
                            • AlienDjinn
                              AlienDjinn last edited by

                              Wow! #speechless

                              1 Reply Last reply Reply Quote 1
                              • E
                                eclecticlly last edited by

                                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?

                                1 Reply Last reply Reply Quote 0
                                • S
                                  sigixxx last edited by

                                  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.

                                  1 Reply Last reply Reply Quote 0
                                  • E
                                    eclecticlly last edited by

                                    I'm interested in replicate it with the info you can give, or better, buy one already done.

                                    1 Reply Last reply Reply Quote 0
                                    • P
                                      PosingSaucer251 last edited by

                                      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.jpg

                                      It 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

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post