LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

The "SB Download Station Project"

Root / Talk About Programs / [.]

the_squat1115Created:
I just added a painting application I created as an example. I'm a bit new to github and joined 2 weeks ago.
Nice! Maybe I should improve my wording in the readme but I'll update the project list prjlist.txt every Saturday (school eats away any other day) before 8PM CET. You will be able to see the download menu in action in ~3 days when I release the next 3DSX/CIA version. Please try the in-app updater first though, so I can improve it, when needed. EDIT: If my internet provider f's my plan, then I'm sorry!
I could update it everyday.

Nice! Maybe I should improve my wording in the readme but I'll update the project list prjlist.txt every Saturday (school eats away any other day) before 8PM CET. You will be able to see the download menu in action in ~3 days when I release the next 3DSX/CIA version. Please try the in-app updater first though, so I can improve it, when needed. EDIT: If my internet provider f's my plan, then I'm sorry!
Thanks for making this a reality, CY! Just one question. In case we get to release the final version of SB3 Download Station, is it possible to make the Download Station for SB4? Because im planning to make a download station for SB4 too, but not right now.
It would probably have to be rewritten, not only because we would have to adjust it to write to SB4's save data, but also because a lot of the code it uses is based off of other, bigger 3DS projects.

Nice! Maybe I should improve my wording in the readme but I'll update the project list prjlist.txt every Saturday (school eats away any other day) before 8PM CET. You will be able to see the download menu in action in ~3 days when I release the next 3DSX/CIA version. Please try the in-app updater first though, so I can improve it, when needed. EDIT: If my internet provider f's my plan, then I'm sorry!
Thanks for making this a reality, CY! Just one question. In case we get to release the final version of SB3 Download Station, is it possible to make the Download Station for SB4? Because im planning to make a download station for SB4 too, but not right now.
Actually, most code would not. Maybe controls etc. It would probably have to be rewritten, not only because we would have to adjust it to write to SB4's save data, but also because a lot of the code it uses is based off of other, bigger 3DS projects.

Thanks for making this a reality, CY! Just one question. In case we get to release the final version of SB3 Download Station, is it possible to make the Download Station for SB4? Because im planning to make a download station for SB4 too, but not right now.
Uh... unfortunately, I don't have a hacked Switch and won't be able to get one any time soon. Theoratically, it might be extremely similar to SB3 though.

@CY64 I want to add this project to the repo, it's basicaly a easter egg from homestar runners called clapping party and mystman made it on sb. But the key got removed and you can't get it anymore. That was until I discovered SBAPI cached it.

@CY64 I want to add this project to the repo, it's basicaly a easter egg from homestar runners called clapping party and mystman made it on sb. But the key got removed and you can't get it anymore. That was until I discovered SBAPI cached it.
I'm pretty sure it's still available, but I'd have to double check. SBAPI reports the key "BDDXVKKE" as available, though. Anyway, I think the repo is meant for original projects, iirc

@CY64 I want to add this project to the repo, it's basicaly a easter egg from homestar runners called clapping party and mystman made it on sb. But the key got removed and you can't get it anymore. That was until I discovered SBAPI cached it.
I'm pretty sure it's still available, but I'd have to double check. SBAPI reports the key "BDDXVKKE" as available, though. Anyway, I think the repo is meant for original projects, iirc
If its for secret demos, you can definitely do it. We just need a way to hide the game from anyone that wants to download it without entering a secret code... And button combinations.

Please don't abuse this to delete or corrupt projects that you haven't created yourself, unless there's a reason (takedown notice, etc.).
EDIT: Turns out he reuploaded with a nice notice at the beginning, so it's still there. But a alot of people think it's dead.

If its for secret demos, you can definitely do it. We just need a way to hide the game from anyone that wants to download it without entering a secret code... And button combinations.
I could add a special flag to the prjlist, so games show up differently or not at all. Maybe even that to include tags, like "Beta", "Cancelled", etc.
Anyway, I think the repo is meant for original projects, iirc
Well, yes. I'd only like original projects, such as games, tools, and demos of them. Note: Project MUST NOT be over 20MB big but they can, if resources taking up that much are necessary for the project. (I may compress GRPs and DATs if my local disk space is getting too low, since my repos (including the download repo) are mirrored on my hard disk too.)

If its for secret demos, you can definitely do it. We just need a way to hide the game from anyone that wants to download it without entering a secret code... And button combinations.
I could add a special flag to the prjlist, so games show up differently or not at all. Maybe even that to include tags, like "Beta", "Cancelled", etc.
Yeah. We could do that to preserve demos from cancelled games so people can play it even if the final version was canned.

Which button are we supposed to press? all 3 buttons fail to do anything.
What button 1 doesIt try's to download a cia, but freezes on the latest fw.(11.13)
What button 2 doesLoads for 1 second, then crashes.
What button 3 doesSays to reboot your 3DS,Asks you why your still here and then says something in german.

Oh, looks like I hit a massive brick during the making of the download menu. Turns out, that C2D_SpriteSheets can only accommodate so many PNGs before crashing everything when releasing them during app exit. I only got to 20 icons before it started to crash. How am I supposed to load project icons now?
ideas- Maybe instead of a t3x, replace it with a list of the icons and use libPNG to draw instead (I have no clue, how to do it practically but I'd like this option) - Only allow projects to use specific icons (which may be boring to scroll through) - Limit selection to use 20 icons at once and load different t3xs, depending on page number (No sorting or filtering will be possible)

Which button are we supposed to press? all 3 buttons fail to do anything.
What button 1 doesIt try's to download a cia, but freezes on the latest fw.(11.13)
What button 2 doesLoads for 1 second, then crashes.
What button 3 doesSays to reboot your 3DS,Asks you why your still here and then says something in german.
That's weird. The first two buttons work fine on me though. The third button doing that is intended for now since I wanted to test a thread function that draws the wait icon and even pieces of text. EDIT: This works on my New2DS, my O2DS and my sisters' 2DSs.

Which button are we supposed to press? all 3 buttons fail to do anything.
What button 1 doesIt try's to download a cia, but freezes on the latest fw.(11.13)
What button 2 doesLoads for 1 second, then crashes.
What button 3 doesSays to reboot your 3DS,Asks you why your still here and then says something in german.
That's weird. The first two buttons work fine on me though. The third button doing that is intended for now since I wanted to test a thread function that draws the wait icon and even pieces of text. EDIT: This works on my New2DS, my O2DS and my sisters' 2DSs.
It doesn't work for me and I'm using a N3DS XL.

Oh, looks like I hit a massive brick during the making of the download menu. Turns out, that C2D_SpriteSheets can only accommodate so many PNGs before crashing everything when releasing them during app exit. I only got to 20 icons before it started to crash. How am I supposed to load project icons now?
ideas- Maybe instead of a t3x, replace it with a list of the icons and use libPNG to draw instead (I have no clue, how to do it practically but I'd like this option) - Only allow projects to use specific icons (which may be boring to scroll through) - Limit selection to use 20 icons at once and load different t3xs, depending on page number (No sorting or filtering will be possible)
I know how! Just use a single Sprite sheet containing all. Use this https://www.codeandweb.com/free-sprite-sheet-packer

I know how! Just use a single Sprite sheet containing all. Use this https://www.codeandweb.com/free-sprite-sheet-packer
Citro2D sheets don't really work like PNG sheets. They are encoded as Tex3DS, not PNG. I put all assets in a PNG as spritesheet, but Citro2D doesn't seem to support reading arbitrary positions in the sheet (or the sprite that contains everything). Having every PNG sprite (assets and project icons) in one sheet still crashes when exiting the app. Also, Citro2D will slow down the 3DS if the top-left of the texture is beyond the screenborders or cause the texture to vanish. No, something like GCOPY doesn't exist for Citro2D unless I code one on my own.
the problem with thatI cannot read the RGB values of the pixels. I cannot find any function that would do it easily.
I have to either code my own sprite and display manager routines (and ditch Citro2D from that)
Huh?I'd have to use SmileBASIC's or a custom font to draw instead. The graphics have to be rendered per-pixel as well. The issue will then be speed, since I'd use rectangles/lines to draw each pixel. Using threads may help but the app won't run as fast anymore, as it did before. Complexity of my code would also increase extremely.
How to even store the data?I'd have to use JS to generate the spritesheet and fonts byte-packed and store it in RomFS since I don't want my app to be gigantic in size. Graphics would be kept as RGB565 + A8, fonts only A8. I have thought about using SmileBASIC's font, since... y'know... it's a project downloader for SB3, right?
or try libPNG and see, if it won't crash. EDIT: I may have found a fix for an issue I faced:
What the issue isIf you managed to open the download menu, you'll see garbled mess in the description of the first project in the list. The garbled text should say "サカキバラUI". This is likely because of the UTF-8 encoding messing with non-ASCII characters.
What a fix may beEncode the prjlist.txt in UTF-16 and tell the 3DS to use 2 bytes to form a character instead of one.

I know how! Just use a single Sprite sheet containing all. Use this https://www.codeandweb.com/free-sprite-sheet-packer
Citro2D sheets don't really work like PNG sheets. They are encoded as Tex3DS, not PNG. I put all assets in a PNG as spritesheet, but Citro2D doesn't seem to support reading arbitrary positions in the sheet (or the sprite that contains everything). Having every PNG sprite (assets and project icons) in one sheet still crashes when exiting the app. Also, Citro2D will slow down the 3DS if the top-left of the texture is beyond the screenborders or cause the texture to vanish. No, something like GCOPY doesn't exist for Citro2D unless I code one on my own.
the problem with thatI cannot read the RGB values of the pixels. I cannot find any function that would do it easily.
I have to either code my own sprite and display manager routines (and ditch Citro2D from that)
Huh?I'd have to use SmileBASIC's or a custom font to draw instead. The graphics have to be rendered per-pixel as well. The issue will then be speed, since I'd use rectangles/lines to draw each pixel. Using threads may help but the app won't run as fast anymore, as it did before. Complexity of my code would also increase extremely.
How to even store the data?I'd have to use JS to generate the spritesheet and fonts byte-packed and store it in RomFS since I don't want my app to be gigantic in size. Graphics would be kept as RGB565 + A8, fonts only A8. I have thought about using SmileBASIC's font, since... y'know... it's a project downloader for SB3, right?
or try libPNG and see, if it won't crash. EDIT: I may have found a fix for an issue I faced:
What the issue isIf you managed to open the download menu, you'll see garbled mess in the description of the first project in the list. The garbled text should say "サカキバラUI". This is likely because of the UTF-8 encoding messing with non-ASCII characters.
What a fix may beEncode the prjlist.txt in UTF-16 and tell the 3DS to use 2 bytes to form a character instead of one.
for libbpng use this https://www.nongnu.org/pngpp/ EDIT: for 2 issue with japan chars, and https://stackoverflow.com/questions/49727145/japan-character-bytes-length

for libbpng use this https://www.nongnu.org/pngpp/ EDIT: for 2 issue with japan chars, and https://stackoverflow.com/questions/49727145/japan-character-bytes-length
Uuh... I just used UTF-16 encoding and use sprintf with %lc to manage to draw japanese chars. I have yet to figure out, how to load into memory and draw them afterwards. I think I'll experiment with using a byte-packed image list. I'm getting slight nightmares by looking at the header and source code of libPNG.

I think I'll experiment with using a byte-packed image list. I'm getting slight nightmares by looking at the header and source code of libPNG.
Last time i checked, you could also use C3D to do it instead

Last time i checked, you could also use C3D to do it instead
That would be more confortable but the problem: There is barely any documentation I can find for Citro3D. Citro2D is decently documented while Citro3D only has a few unofficial documentations that almost don't have any content that I could use. I have only managed to change the viewport, add anti-aliasing and improve the app by despawning menus that aren't in focus. BTW the garbage background was the main background but trashed due to a memory corruption that my new icon drawing function causes. (I'll remove it now and retry the t3x solution since it worked best so far.)
EDIT 1
About the T3XsIt turns out that my app only crashes when my app assets (button/background graphics) are taking too much space (not file size but image size if combined together). If I manage to get 100 icons in the downloadable t3x then I'd be good to go with the t3x design. To prevent further crashes, I'd just use pure DrawRectSolid commands to draw the assets instead, or simplify them (multi-color → pure rectangle, simpler shapes, etc.)
Adding sorting to the download menuEach project in the list has an ID (for simplicity sake, the index in the prjlist) and to sort, I'd make certain functions that mix around the IDs depending on, e.g. the metadata flags (is it a demo/full release?) or alphabetical (ASCII) order.
More things I'd want to makeI'd also consider adding more features, like a "Random project" button, support for other languuages and also change the style a bit.
How would the style of the app change?I'd change the buttons to more SmileBASIC-like versions, lack animations and, generally, make it feel like a companion app.