? How to use SmileBASIC File Manager to edit files on a PC. ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

How to use SmileBASIC File Manager to edit files on a PC.

If you haven't seen already, I made a homebrew application that can copy files to and from SmileBASIC without the need for Petit Modem's annoying sounds. You can find that here: http://www.smilebasicsource.com/forum?ftid=468 Some people have reported that it isn't exactly the most self-explanatory program. So here is a tutorial on how to transfer files properly, along with some general advice. I will be referring to SmileBASIC File Manager with the acronym SBFM. I also made some web tools that are intended for use with SBFM: https://trinitro21.github.io/

GENERAL ADVICE

The first letter of filenames You may notice that each of your files starts with a T or a B. This is to quickly distinguish between TXT (T) and DAT (B) files. Without these, SmileBASIC might not behave correctly, and so SBFM automatically inserts a T or B if one isn't present. If it can't determine which to insert, it will ask the user. Methods of copying There are three options when transferring files: you can copy with either X, Y, or A. Pressing Y copies the entire file, while X ignores the 80-byte header and 20-byte footer, and A ignores the 80-byte header, the 28-byte DAT header, and 20-byte footer. Pressing X to copy a file back into SmileBASIC will inject a "default" header and footer that I made, and pressing A will inject a custom DAT header that is created from user input in addition to the default header and footer. The option to copy with X was made so that you can edit the code without worrying about doing something bad with the header or footer, and also so that you might be able to make your own programs without editing a program that you made. File formats Some file formats may have SmileBASIC equivalents, like WAV files; however this does not mean that they are compatible with the PC formats. Don't attempt to just copy over any file from a PC to SmileBASIC. It most likely won't work. Line breaks Instead of the CHR$(13)+CHR$(10) that most programs use for line breaks, SmileBASIC just uses CHR$(10). This causes problems, because some text editors don't support the line breaks. For example, Notepad (the text editor that comes with Windows) won't actually go to another line when it incounters a line break from SmileBASIC. The ones I know of that work are Programmer's Notepad, SynWrite, and Notepad++. When creating files, this isn't much of a problem unless you don't want double line breaks, as SmileBASIC reads two-character line breaks as two separate line breaks. If using Notepad++, you can avoid this problem with Edit > EOL Conversion > UNIX/OSX Format. Syntax highlighting If you would like to have syntax highlighting for SmileBASIC in your text editor, you can use this user-defined language that I made for Notepad++ (https://drive.google.com/file/d/0B4kbPEFlGXXIRUdCcE1xc0dTMTQ/view?usp=sharing) or this SynWrite build (http://www.smilebasicsource.com/page?pid=54). To use my syntax highlighting, open Notepad++, then go to Language > Define your language..., hit Import, then browse to the file you downloaded. Something that may improve the experience is using the Black board style (Settings > Style Configurator...) and the fonts from SmileBASIC's website: http://smilebasic.com/en/download/. You can set a style's fonts from the style configurator. GRP editor There exists an aseprite mod that can edit GRP files: http://www.smilebasicsource.com/page?pid=69 However you should not use this to create GRP files, only to edit them. When it creates GRP files, it doesn't put in the correct headers for SBFM to recognize it as a GRP file, even when you try the headerless copy method, and it will show up improperly in SmileBASIC because of this. For creating GRP files, you should convert the image from another image format.

PRG FILES

The recommended usage for editing PRG files is:
  1. Dump your program with SBFM using Y or X to copy the file.
  2. Put your SD/microSD into your computer or connect it using FTP or MicroSD Management.
  3. Edit the file with a text editor such as Notepad++. Keep in mind that if you copied it with the header, there will not be a line break before the first line, so you might have to scroll to edit that.
  4. Put the file back onto your SD/microSD if you moved it off of it. Make sure that the file retains the T at the front of the filename. That indicates a TXT file, and without it, SmileBASIC will not correctly display the file or filename.
  5. Open SBFM and restore your file using the same button you used to copy it.
  6. Open and save your file within SmileBASIC to make sure everything can be uploaded without any potential errors.
The recommended usage for creating PRG files is:
  1. Create your file in a text editor such as Notepad++.
  2. If you can, use UNIX/OSX format line breaks.
  3. Save your file with a name that starts with T and only includes uppercase characters, periods, underscores, dashes, and @. Other characters won't be displayed by SmileBASIC.
  4. Put the file on your SD/microSD card and open SBFM.
  5. Transfer the program using X.
  6. Open and save your file within SmileBASIC to make sure everything can be uploaded without any potential errors.

GRP FILES

The recommended usage for editing GRP files is:
  1. Dump the GRP file with SBFM using Y to copy it.
  2. Download this aseprite mod that can edit GRP files: http://www.smilebasicsource.com/page?pid=69
  3. Put your SD/microSD into your computer or connect it using FTP or MicroSD Management.
  4. Add .GRP to the filename if it doesn't already have it; aseprite won't recognize your image as a GRP unless you do.
  5. Open up your file in aseprite.
  6. Enable transparency by going to Layer > Layer from Background.
  7. Edit away! You can also use an image editor of your choice and copy and paste into aseprite.
  8. Put the file back onto your SD/microSD if you moved it off of it. Make sure that the file retains the B at the front of the file name. That indicates a DAT/GRP file, and without it, SmileBASIC will not correctly display the file.
  9. Open SBFM and restore your file using Y to copy it.
  10. Open and save your file within SmileBASIC to make sure everything can be uploaded without any potential errors.
The recommended usage for creating GRP files is:
  1. Create your image and save it in a format of your choice.
  2. Use http://trotyl.tk/SBtools/imagetogrp.html or https://github.com/Perska/IMG2GRP/releases/ to convert your file to the GRP format.
  3. Transfer the file to your SD/microSD card.
  4. Open SBFM and restore your file using Y to copy it.
  5. Open and save your file within SmileBASIC to make sure everything can be uploaded without any potential errors.

WAV FILES

Instructions for using Perska's WAV2SBWAV tool can be found here: http://www.smilebasicsource.com/page?pid=339
Author
Trinitro21
Updated
Rating
8 votes
Categories
Keywords
  • tutorial
  • sbfm
44 Comment(s) mia mia Night Person I like the quiet night and sleep late. Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies DEUUEAUGH!! also Omiwa trinitro wherever you are try copying two different files with the same name in sbfm to your sd card and then try deleting it from sbfm from the sd card and see if it works maybe mia mia Night Person I like the quiet night and sleep late. Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Version 1.5 it gives you info or something about the file you're on pleaaaase make a thing that reprints the instructions so that they can be remembered after a file decides to shove its lame info in the way 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS
Save your file with a name that starts with T and only includes uppercase characters, periods, underscores, and dashes. Other characters won't be displayed by SmileBASIC.
@ is allowed allowed
12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS
The last character of a program
This section can be removed, since the bug was fixed.
mia mia Night Person I like the quiet night and sleep late. Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Works amazing!~ Wonderful job. mia mia Night Person I like the quiet night and sleep late. Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Worked fine after some time; good job. User1_ User1_ this guide made it to the front page The9thBit The9thBit Can someone help me out here? I'm kind of a noob to this, and I'm trying to figure out how to actually load the program once it's been copied over to smilebasic. I can't find it under any of the default folders, and for the life of me I can't figure out how to work the LOAD command. I made an account just to ask this, so any help would be appreciated. Thank you!! JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself The default folders may not be where it is. On the top menu (the first thing you see) click on "browse projects". Explore each folder until you find what appears to be your game. Hope this helps! AnswerXOX AnswerXOX Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Great Page Hidden Achievements Pokemon Is Awesome! I love Pokemon! Express Yourself What's with this saying I have an error with an FTP server Is there something I should know about this? AnswerXOX AnswerXOX Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Great Page Hidden Achievements Pokemon Is Awesome! I love Pokemon! Express Yourself Is there a way to convert WAV files into computer readable code and back(because I'm pretty sure one of my guys doesn't sound like a dog in a muffler) Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength There's no way that I know of currently to convert computer .wav files to SmileBASIC WAV files and back. That would require someone knowledgeable on both formats, neither of which I know. AnswerXOX AnswerXOX Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Great Page Hidden Achievements Pokemon Is Awesome! I love Pokemon! Express Yourself I'll try to use Audacity a billion times to see which raw settings I need to import to figure this out then... Once I figure out the appropriate settings, I'll share the appropriate settings Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength I'm not sure that'll work. AnswerXOX AnswerXOX Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Great Page Hidden Achievements Pokemon Is Awesome! I love Pokemon! Express Yourself You gotta believe(but you're probably right) snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Well, SB uses 8-bit PCM, with the bias being somewhere like 127? I dunno, try 8-bit PCM at 8180Hz. Apparently it's a max of 16384 samples. Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Perska already made a tool. http://www.smilebasicsource.com/page?pid=339 MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies Any possible way to run PRG's on a computer using the SmileBasic syntax/language? JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself I don't think any projects aiming to to this have been finished. If you're into emulating, the only thing stopping you is your computer's specs. Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself If I take a text file and transfer to SB with X, will it work...? I'm not sure if I understand this. EDIT tried to transfer a .txt file with X, it didn't work, what'd I mess up? Super_Defaultio Super_Defaultio First Month Joined in the very first month of SmileBASIC Source Website Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself I think you use Y. Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Was every letter of the filename uppercase? Did it begin with the letter T to indicate to SB that it's a TXT file? Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself Was called TJRB.txt, so es I began it with T. Every letter besides the .txt part was uppercase. It says 'could not copy.' EDIT: Also, all the good text editors are windows and I'm stuck on a mac :( so if I need a text editor I haven't found one yet... EDIT2: I turned it into .txt from a google doc, does that work or is that the problem? Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength It only says "Could not copy" if you aren't inside a project folder in the SmileBASIC browser and you try to copy something that isn't a folder. Go inside a folder in the SmileBASIC browser before trying to copy to it. I should probably add a troubleshooting section to cover problems like this. Your file and text editor is never the problem; all files can be read as .txt files, but their contents might be really weird because formats are meant to be read in a certain way. If a file isn't in the right format and you copy it to SmileBASIC, weird things might happen, but it will copy flawlessly. Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself Thank you! I wasn't in a folder... aargh I hate it when I make stupid mistakes like that. Thank you for the help troubleshooting, sorry to bother you so much with file stuff :P I think I might still be a nub at files Chemicalex Chemicalex Drawing I like to draw! Hobbies RNG Hidden Easter Eggs Video Games I like to play video games! Hobbies ...Or just use FTBrony to transfer the SD to the PC .-. snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! You can't. These files are locked away in extdata. Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength I think he was referring to the "put your SD/microSD into your PC" step. Super_Defaultio Super_Defaultio First Month Joined in the very first month of SmileBASIC Source Website Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself "10/10 better than Petit Modem, sorry." --GameExplorer "Replacement for Petit Modem, lel." --JFM "Super Cool Mega Amazing Miracle Worker!" --JG_SD JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself I don't know how the header and footer of SB files work, but they're at least partially understandable, right? A way to inject a custom header and footer (as in user defined information information) into files with no header upon import is probably all this program needs to be "complete" Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength I already understand at least most of the header, enough to have made a header injection routine. You can do this by pressing X to copy from the SD card to SmileBASIC. http://www.smilebasicsource.com/page?pid=308#copying Do you want your own information in there or is that good enough? JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself I was saying a simple menu to specify what gets injected by the routine would be all this program needs to be perfect. However, I understand if you can't because you don't know what everything does yet. Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Would this menu have any edit features? If so, it's doable but I haven't done that because lpp3ds's keyboard sucks. If not, I already have a feature that views the header information; just press A when your cursor is over a file. JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself I guess what I really wanted was a header modifier then. That sounds much simpler anyway. Keep the old header injection system, and add a new feature to edit headers in app. I will look forward to it if you can get a keyboard working nicely! SquareFingers SquareFingers Along with FTBrony, you don't even need to remove the SD card. Very useful. HylianHoundoom HylianHoundoom I'm gonna start using this. Thanks Trintro! JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself I thought I wouldn't need this, but this guide makes it sound super useful so I'll go ahead and install it. If it does miracles, thank you in advance Trinitro21 JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself Red Alert! It does miracles! Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Glad to hear that people are appreciating my application! Super_Defaultio Super_Defaultio First Month Joined in the very first month of SmileBASIC Source Website Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Thanks Trinitro21, you have done it again! I forgot to so the transparency stuff with aesperite. Super_Defaultio Super_Defaultio First Month Joined in the very first month of SmileBASIC Source Website Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Nvm, bg file still wouldn't work. Guess I'll keep trying. Super_Defaultio Super_Defaultio First Month Joined in the very first month of SmileBASIC Source Website Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Nvm, it worked with a non blank sprite sheet. Wonder why bg tiles won't work then. h267 h267 RNG Hidden Easter Eggs Pokemon Is Awesome! I love Pokemon! Express Yourself Good Page Hidden Achievements Thanks! This helps clear up a few things... although it would help to explain the difference from dumping using X and Y. Trinitro21 Trinitro21 First Week Joined in the very first week of SmileBASIC Source Website Query Denied Hidden Easter Eggs Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Done. Thanks for the suggestion!