SmileBASIC Program Archiver
Root / Submissions / [.]
amihartCreated:
Version:Size:16.76 KB
[Edit] This program is officially dead due to Miiverse shutting down.
Transfer a SmileBASIC program from your 3DS to your PC through the internet to archive it on your PC.
Since the transfer is essentially done through the internet, no special devices are needed! No auxiliary cables or splitters or webcams or anything.
This is for archiving programs with 3DS->PC transfers. It does not support PC->3DS transfers.
Replying to:Komodo
can this work on a android tablet instead of a pc?this is realy a cool idea by the way.
If you navigate to the JSFiddle page using Firefox Nightly you can get it to work on Android.
Oh yeah. JPEG (the format the screenshots are saved in), does this thing called chroma subsampling, but first, the mage is converted into Y'CbCr. Y' being the grayscale brightness of each pixel, and Cb and Cr being the values that turn it into a color, if set. JPEG downscales the size of the Cb and Cr channels by a quarter, making each Cb and Cr "subpixel" influencing 4 actual pixels), while leaving the grayscale in actual 1:1 size.
Now it surprises me if the grayscales are perfect 0-255. I was sure the fact they are turned into DCT chunks, the values must be tend to be off by at least one or two, however, the limitations of SB's colors itself, it doesn't even change anything, at least to the point where it can't be rounded back. By the way, it seems we're lucky with quantization. Quantization is when DCT data is erased for space savings. With it, even the grayscale pixels will bleed, however, it seems to be off or very sparse in the screenshots.
Okay I may be a little too confident in explaining this, tbh.
Very old bump. I glanced at a grayscale noise image off Miiverse and it seems unaffected. Even if the colors are thrown slightly off balance, SB colors are still only 5 bits per channel. The results might not affect anything.
So anyway, 5 bits per pixel at 400x240 is 60000 bytes. That's 30000 SB characters, more if you encode them in a different scheme.
Replying to:12Me21
This is really cool!
I tried to make a better version that stored data 4x more efficiently, but it just barely couldn't survive JPEG compression.
Your program is very inefficient (the conversion function could be reduced to around 5-7 lines), but it works.
It's not super efficient because I just modified the source code of a previous program to make this so I wouldn't have to rewrite it from scratch, and it ran so fast I didn't see a point in making it more efficient.
I made a faster image decoder. Tested in Firefox, Chrome, and Safari (Should work in IE too)
https://12me21.github.io/archiver/
https://jsfiddle.net/7st1pLyd/1/
EDIT: It also works in the new 3DS browser, though I'm not sure why you'd want to.
Replying to:12Me21
I made a faster image decoder. Tested in Firefox, Chrome, and Safari (Should work in IE too)
https://12me21.github.io/archiver/
https://jsfiddle.net/7st1pLyd/1/
EDIT: It also works in the new 3DS browser, though I'm not sure why you'd want to.
This will be helpful for mobile users. Good job.
Replying to:MZ952
What about using black & white, as well as red and blue in the 1x1 pixel form? would the jpeg compression cause information loss with the 4 colors? You could double the amount of information to 24 kilobytes per image.
JPEG throws out a lot of color data, especially blue, so it probably wouldn't work.
Can you make a version where you can do PC to 3DS?
That wouldn't be possible, since there's no easy way to transfer images TO the 3DS.
You could use petit modem though.
To transfer data to the 3DS, you would inherently need data inputs on the 3DS. There is an output for images to Miiverse, but no input of images from Miiverse, so this cannot go in the reverse direction.
The only data inputs I know of that are somewhat accessible through SmileBASIC are (1) microphone port, (2) infrared sensor, (3) multiplayer WiFi, (4) buttons. Currently the best solution is the microphone port with Petit Modem for transferring data to the 3DS.
There is (or was?) a way to retrieve data from the IR sensor?
Does this still work now that Miiverse has shut down?