#41✎ 415MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!HobbiesI may be misunderstanding, but if the keyboard is a subprogram (and the editor as well?) I'd like to create my own keyboard for the editor. Maybe then it would be worth it to revive my Swype project.
Posted
#42✎ 256niconiiPower UserVideo GamesI like to play video games!HobbiesExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthDrawingI like to draw!HobbiesI don't think the editor itself is, but at the very least we know that subprograms can run in the editor (just look at the ENOCODE video), and we know from the reference that subprograms can create keyboard input. It seems very likely that a subprogram could be used to make a custom keyboard.
Posted
#43✎ 1134snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!Achievements
Soo... Is anyone going to talk about subprograms?
They seem to be a way of running two or more programs at once, kind of like Windows, as their drawing area can be specified and they run simultaneously with the main program.
Who knows, we might finally be able to make real-time program corruptors a reality.
Subprograms are the greatest mystery because it's unclear what they can and can't do and how they relate to the environment. It seems there's a master system subprogram that provides stuff like the popup help and the software keyboard, and then one user-loadable subprogram from DIRECT mode.
You definitely couldn't make a real-time corruptor beccause you aren't allowed to edit a program's source code as it's running -- or directly for that matter. Subprograms appear to have their own set of graphic pages and program slots.
Posted
ENVSTAT OUT status, error number, errored argument number, errored slot, errored line, errored character position
Get the status of the main interpreter
Return value
status
0 Waiting in direct mode
1 Execution is suspended
2 Stop execution due to an error
3 During program execution
Four During program editing
so clearly this function can be called (from a subprogram) while the main interpreter is in any of those states
meaning that a subprogram runs completely independently from the main program
This implies that the subprogram can be running while the main interpreter is in any of those states
So I think it's just meant to be like the smiletool, but you can open it in the editor or while a program is running(!)
Posted
#45✎ 1134snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!Achievementsniconii suggested to me that you could probably make a live graphics editor tool you can use from a subprogram while the main program is running. It seems like it should be possible, and you could probably take it further to allow you to edit the appearance of specific sprites.
Posted
Edited
by snail_
#46✎ 1134snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!AchievementsThere's actually two reference pages on the wiki that describes subprograms and their exclusive functions in detail. I didn't notice the first one until now so it must've been added.
About subprogramsReference: Subprogram
You'll have to use a translation service, but this definitely rounds out the details on subprograms and makes them seem pretty powerful.
Posted
#47✎ 256niconiiPower UserVideo GamesI like to play video games!HobbiesExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthDrawingI like to draw!HobbiesYeah, the first one is definitely new. This clears up quite a bit.
I think the one question I'm left with, though, is the issue of "focus". It seems from this that all input goes to either the main program or subprogram, depending on which has focus. Furthermore, only the subprogram can control which one has focus.
If you wanted to make an interactive tool that runs alongside the main program... presumably, you'd want to control each of the two at different points. You might want to control the subprogram for a bit, then the main program, then the subprogram again. So, the subprogram gives focus to the main program, and then... how does it know when to take it back? Switching from the subprogram to the main program is easy: just have it switch focus when you press a certain button. But switching from the main program to the subprogram... how does that work, if there's apparently no way to communicate with it?
You could just have it take back focus after a certain number of seconds, but that seems awfully clumsy... There's gotta be a better way, right?
Posted
Edited
by niconii
#48✎ 4kilijeloIntercept every keypress and listen for a certain key combination.
Posted
#49✎ 256niconiiPower UserVideo GamesI like to play video games!HobbiesExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthDrawingI like to draw!HobbiesIs that possible, though? At least from that first link, it sounds like all input would go straight to the main program, with no chance of interception by the subprogram... though it's possible there's more to it than this page says.
Posted
#50✎ 1134snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!AchievementsI think the point is that subprograms are primarily tools to be used with the editing environment, and they aren't to be taking input at the same time a main program is running. I would be surprised if there isn't a system-level way to give focus to the subprogram, and I wonder how focus works if you're in the editor.
It's possible there's an internal limitation so that main and sub cannot take input simultaneously, and they thought subprogram handoff from main programs was excessive because they're supposed to be editing tools and main programs aren't. It's a bit strange though and I hope there's a way for the user to intervene and give focus to the subprogram voluntarily.
If one thing is made clear, it's that subprograms are the definite replacement of the tool slot and smile key, and that rocks.
This pop-over version of the SMILETOOL is indication enough that this is a substantially better method of making multipurpose developer tools than the SB3 tool system. There were major roadblocks to making tools that you could just use, and from reading the manual I've come to the understanding that most of the issues have been solved. Plus you get three launcher keys, so you can have three tools at the ready whenever you need them. Nuts.
Posted
#51✎ 1134snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!Achievements
I may be misunderstanding, but if the keyboard is a subprogram (and the editor as well?) I'd like to create my own keyboard for the editor. Maybe then it would be worth it to revive my Swype project.
If you pay really close attention to certain screenshots it's clear that the soft keyboard isn't a normal subprogram (specifically because the editor window resizes when you open it, instead of just drawing over it.) You can just hide the soft keyboard though, by pressing -, and try making your own.
Posted
#52✎ 15tomrowIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthMaybe the editor has an API to resize it that is usable by subprograms? It will be worth it when it comes out to see if the source code is accessible to reverse-engineer it.
Posted
#53✎ 415MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!HobbiesAny potential for a data transfer tool via audio modem?
Posted
#54✎ 858IAmRalseiForum LeaderHiddenAchievementsThird YearMy account is over 3 years oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming Strength
Any potential for a data transfer tool via audio modem?
No because the switch doesn't have a microphone.
However, we could transfer something to SB3 using Petit modem then upload it and download it to SB4 as it has already been established that SB4 will share a server with SB3.
Posted
#55✎ 72GamerCymreigBeginner ProgrammerI'm just starting out! I'm still trying to grasp the basics.Programming StrengthVideo GamesI like to play video games!HobbiesPokemon Is Awesome!I love Pokemon!Express Yourself
Any potential for a data transfer tool via audio modem?
No because the switch doesn't have a microphone.
However, we could transfer something to SB3 using Petit modem then upload it and download it to SB4 as it has already been established that SB4 will share a server with SB3.
That's good, that could also make porting games from Smilebasic 3 to 4 or Smilebasic 4 to 3 easier.
Posted
#56✎ 415MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!Hobbies
Any potential for a data transfer tool via audio modem?
No because the switch doesn't have a microphone.
However, we could transfer something to SB3 using Petit modem then upload it and download it to SB4 as it has already been established that SB4 will share a server with SB3.
Well duh lol. I mean transferring from the Switch to some other platform, like PC, since there seem to only be ways to transfer to the Switch.
Posted
#57✎ 858IAmRalseiForum LeaderHiddenAchievementsThird YearMy account is over 3 years oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming Strength
Any potential for a data transfer tool via audio modem?
No because the switch doesn't have a microphone.
However, we could transfer something to SB3 using Petit modem then upload it and download it to SB4 as it has already been established that SB4 will share a server with SB3.
Well duh lol. I mean transferring from the Switch to some other platform, like PC, since there seem to only be ways to transfer to the Switch.
Switch to 3DS to Petit Modem to PC
Or Homebrew...
Posted
Edited
by IAmRalsei
#58✎ 1093YolkaiHead AdminWe have the USB keyboard interface as far as I/O
seems like it has a higher theoretical bitrate than petit modem, too.
I wasn't the one working on it, so that's all I know.
Posted
#59✎ 201PerskaSummer 2016 Contest WinnerI won the SmileBASICSource Summer 2016 Contest!Programming ContestExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthGreat PageHiddenAchievements
Any potential for a data transfer tool via audio modem?
No because the switch doesn't have a microphone.
However, we could transfer something to SB3 using Petit modem then upload it and download it to SB4 as it has already been established that SB4 will share a server with SB3.
The Switch does actually support audio input, through the headphone jack.
That said, SB4 does not contain support for audio input.
Posted
#60✎ 415MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!Hobbies
Switch to 3DS to Petit Modem to PC
Or Homebrew...
How do you take it from Switch to 3DS? Keys only work one way: from 3DS to Switch.
Posted