LoginLogin
Might make SBS readonly: thread

Petit Converter ver. 0.7.7 β (SB4)

Root / Submissions / [.]

utrmagureCreated:
Download:4NJA5X3WD
Version:0.7.7 βSize:

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)
Options DescriptionRotate 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.

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.

Replying to: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.
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... )

Replying to: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.
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!

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!

Replying to:HTV04
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!
Thank you for using! There may still be bugs, so please let me know anytime if you have any problems!

The first PTC3 emulator on Nintendo Switch

Replying to:HTV04
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!
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!

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
It seems so!

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
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)

Definitely one of the reasons to get sb4. (sad that is isn't out in the EU yet.)

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
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.

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
@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.

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
@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

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
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.

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
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

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
You can use RESIZE:
DIM A[1,0]
RESIZE A,0,0

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
According to the reference, only the first dimension of an array can be resized by RESIZE instruction.

It seems that multiplayer commands aren't dummied out yet, so they cause errors.

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
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]

Replying to:the_squat1115
The first PTC3 emulator on Nintendo Switch
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.