? Petit Converter ver. 0.7.7 β (SB4) ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Migrating to a new website for SmileBASIC 4

Petit Converter ver. 0.7.7 β (SB4)

Submitted
Updated
Author
utrmagure
Public Key
4NJA5X3WD
Min. Compat.
SB4 (Switch)
Version
0.7.7 β
Rating
8 votes
Description

Petit Converter ver. 0.7.7 β

Run SB3 programs on SB4! This tool converts programs for SB3 to run on SB4. Many display instructions, such as XSCREEN, DISPLAY, Gxxx, SPxxx, and BGxxx are replaced with custom DEFs. Of course XON, XOFF, OPTION TOOL etc are also supported. Dual screen is supported using SB4 layers. This tool is beta version and still being developed; some programs may not work. Additionally, all the messages in GUI tool are Japanese. Converted programs depend on PETITC/PETITC.LIB; they cannot be run without it. Users have to download Petit Converter to run them. Japanese wiki page: http://wiki.hosiken.jp/petc4/?Toukou%2FPetitConverter プチコン3号/BIGのプログラムをプチコン4で! このツールはプチコン3号/BIG用のプログラムをプチコン4で動作するように変換します。XSCREENDISPLAYGxxxSPxxxBGxxx のような多くの表示関係の命令などが変換されます。もちろん表示以外の命令 XONXOFFOPTION TOOL なども対応しています。プチコン4のレイヤーを利用して、2画面のエミュレートを実現しています。 このツールはベータ版であり、開発中です。一部のプログラムは動作しない可能性があります。また、GUIツール上のすべてのテキストは日本語です。 出力プログラムは PETITC/PETITC.LIB を参照しています。移植したプログラムはこれがなければ動作できません。公開されている移植プログラムを実行するには、プチコンバータをダウンロードする必要があります。 日本語 Wiki: http://wiki.hosiken.jp/petc4/?Toukou%2FPetitConverter
Instructions

Converting programs

1. First run PETITC/MAIN.PRG. 2. Click or tap プログラムを変換する (Convert Program), or select with D-pad and press A button. 3. Choose a project that the file to convert is in. 4. Choose a file to convert. 5. You will now asked "現在のプロジェクトでいますぐにテストしますか? (Would you like to test the converted program in the current project now?)". If you test whether the converted program works, select はい (Yes). If you save the converted program, select いいえ (No) and Go to step 9. Click left arrow button or press B button to return to the previous screen. 6. Choose converting options, and click OK. - 画面を左に90°回転 (Rotate the Screen 90° Left) - 画面を右に90°回転 (Rotate the Screen 90° Right) - アンチエイリアス効果なし (No Antialiasing) - アンチエイリアス効果を強める (High Antialiasing) - New 3DS - Wii U - 上画面のみ (Upper Screen Only) - 下画面のみ (Lower Screen Only) Rotate the Screen 90° Left/Right rotates all the visible elements using SB4 layers. Antialias options may not be applied if the SB4 XSCREEN resolution exceeds 1280x720. New 3DS and Wii U sets the HARDWARE system variable's value to 1 or 2. By default its value is 0. If the Upper/Lower Screen Only option is set, only the upper/lower screen is displayed and the other screen is not displayed. 7. The test starts. if an error occurs, please report the bug. 8. When the program terminates or + button is pressed, you'll return to the tool. The dialog will appear; press はい (Yes) and go to step 6 if you test again, or press いいえ (No) to go next. 9. Click はい (Yes) to save the converted program, or click いいえ (No) to discard the program and return to the main menu. 10. Choose converting option as in step 6. 11. Choose how to save the converted program: - ファイルに保存 (Save to file) - クリップボードに書き出し (Export to clipboard) - SLOT ?に書き出し (Export to SLOT ?) "?" is from 1 to 5 12. The converted program has been saved in the current project!

Sub Program

By default, exported files are saved in the current project. Sub programs can write to another project; when Petit Converter is launched as a sub program, exported files are saved automatically in the project that the original file is in, not the current project.
Categories
Keywords
31 Comment(s) HTV04 HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength I don't know if the TALK command is different in SB4 but running the EX8TECHDEMO through this and going into the TALK demo gives me nightmares RGamesOffical RGamesOffical Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies Now we need the impossible, SB4 to SB3. CyberYoshi64 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Night Person I like the quiet night and sleep late. Express Yourself Can this be used as a good start when porting SB3 titles? (Sure a lot has to be improved from there) I don't have a Switch but in 6 months when I want to start developing SKKBAUI for Switch. Learning the syntax changes is No1 priority of course utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies Yes, you can upload an SB3 title in SB3, and someone can download it through SB4 and play it with Petit Converter on Switch! CyberYoshi64 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Night Person I like the quiet night and sleep late. Express Yourself Sure but I was talking about the port as the base, which works on SB4 to then turn it into a SB4-exclusive program. HTV04 HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength That works too. You would have to convert it using the tool, then you can make additional changes manually if it doesn't work out-of-the-box. HTV04 HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength It seems that multiplayer commands aren't dummied out yet, so they cause errors. utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies OK. I will fix it. Tarudahat Tarudahat QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest! OSP Contest 3 Contest Participant I participated in the third SmileBASIC Source OSP Contest! Avatar Taboo I didn't change my avatar for 180 days Website Definitely one of the reasons to get sb4. (sad that is isn't out in the EU yet.) the_squat1115 the_squat1115 First Year My account is over 1 year old Website Forum Contributor Hidden Achievements Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength The first PTC3 emulator on Nintendo Switch utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies It seems so! Tarudahat Tarudahat QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest! OSP Contest 3 Contest Participant I participated in the third SmileBASIC Source OSP Contest! Avatar Taboo I didn't change my avatar for 180 days Website Yea it kinda is. This is kinda just reading the sb3 code (you could say op code) of sb3 games and running it. (the program isn't running it but sb4 sooo is sb4 a sb3 emulator? Lol I really don't know what I am talking about) snail_ snail_ Power User QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements It's a source translator/transpiler, it just happens to provide a bunch of extra compatibility options and wrappers. Still extremely impressive, wonder when the SB2 converter is gonna come out. utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies @Tarudahat Yes this is just a SB3 emulator on SB4. SB4 can do things more than SB3. And the mic and communication instructions cannot be used on SB4. ( Dummy MICxxx instructions are implemented in Petit Converter.) My 3DS was broken about a year ago. I still wanted to play SB3 games, so I started to make this. utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies @snail_ There is a SB2 emulator for SB3 by a Japanese user: http://wiki.hosiken.jp/petc3gou/?Toukou%2F%A5%D7%A5%C1%A5%B3%A5%F3mkII_at3%B9%E6 (Japanese Wiki) I tried to execute it with Petit Converter but failed. It looks like the error was caused by initializing a multidimensional array with zero element. SB4 cannot do that. DIM A[0] 'OK DIM B[0,0] 'Error snail_ snail_ Power User QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements I cant think of a reason they'd do that aside from creating a dummy array they overwrite with a different one later. Since SB4 is a lot more loose with typing and array creation, you can probably just detect and replace arrays like B with dummy DIM B statements. utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies I was going to replace like DIM B%[0,0] with DIM B%=A2%(0,0) DEF A2%(X,Y) RETURN ARRAY%(X+!X, Y+!Y) END If X or Y is zero, that'll be one. However, the value of LEN() etc will change so some programs won't work... Sorry for broken English 12Me21 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself You can use RESIZE: DIM A[1,0] RESIZE A,0,0 utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies According to the reference, only the first dimension of an array can be resized by RESIZE instruction. MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Third Year My account is over 3 years old Website Reading I like to read books! Hobbies Aren't n-dimensional arrays actually 1 dimensional (or rather, can't you access 1D arrays as though they were multidimensional). Ex.: DIM A[25] PRINT A[0,4] DIM B[5,5] PRINT B[4] snail_ snail_ Power User QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements You can access any array as if it were linear/1D, but you can't access any array as if it were multidimensional. That wouldn't make any sense because there is no information about the dimensions of a linear array so the pointer can't be calculated. DIM A[25] PRINT A[0,4] 'bad DIM B[5,5] PRINT B[4] 'good Every array is stored in the same linear arrangement, which is why B works, but multidim arrays also store dimensions so SB4 can calculate a linear address. 12Me21 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Oh I forgot you can't use 0 as ANY of the dimensions in sb4... Anyway can't you just replace DIM A[0,0] with DIM A[0]? LEN() will be the same I think the only difference is that PUSH/POP won't throw an error utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies OK I'll try. 12Me21 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Wait I just remembered, there is a reason to make an empty multidimensional array DIM A[10,10] SAVE "DAT:A",A DIM B[0,0] LOAD "DAT:A",B utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies And LOAD that loads a number array will be replaced with LOADV of SB4, but with LOADV, the dimensions of the array stored in the file and the destination array must match. If a multi-dimensional array declaration is replaced with a one-dimensional array declaration, that causes an error. DIM A[3,3] SAVEV "DAT:A.DAT",A DIM B[0] ' Assume replaced by DIM B[0,0] LOADV "DAT:A.DAT",B ' "Type mismatch"! HTV04 HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Holy. Shit. This is amazing. Since I'm more fluent in SB3, this is a godsend for me. Thank you so much, this is amazing! utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies Thank you for using! There may still be bugs, so please let me know anytime if you have any problems! HTV04 HTV04 Forum Leader Hidden Achievements Third Year My account is over 3 years old Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength I feel that this tool will mean A LOT for the future of SB4. Streamlining programs across devices will be a lot easier now, and more programs may be available for SB4 from SB3 veterans. I might actually start programming in SB more again. I can't thank you enough! kantackistan kantackistan Oh hey, I tried this out a week ago when I found it on SB4. Nice job! I tried it on Super Bearland but there were some problems. If you want I can send you the errors later. utrmagure utrmagure Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself Video Games I like to play video games! Hobbies Sorry for the late reply. I'm going to update this so that more SB3 program works. I downloaded Super Bearland right now, and tried to run it. It looks like the error was caused by BGMSTOP -1. And you saw the same error...? (0:8445) In the new version, the problem has been fixed. BGMSTOP will be replaced. I'll update Petit Converter. Thank you! ( I'm sorry if my English isn't good... ) kantackistan kantackistan No worries, your English is pretty good! That is one of the errors I saw. I was able to go through and fix all the errors eventually, but yes that was one of the first ones. BGMSTOP -1 stops all sounds in SB3, but is no longer supported in SB4. I will let you know if I run into any more problems. Thanks for the good work!