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.
Petit Converter ver. 0.7.7 β (SB4)
Root / Submissions / [.]
utrmagureCreated:
Download:4NJA5X3WDVersion:0.7.7 βSize:
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!
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!
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!
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)
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.
@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.
@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
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.
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) ENDIf 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
You can use RESIZE:
DIM A[1,0] RESIZE A,0,0
According to the reference, only the first dimension of an array can be resized by RESIZE instruction.
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]
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] 'goodEvery 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.