LoginLogin

SmileBASIC 4 Discussion「プチコン4」

Root / General / [.]

📌
MZ952Created:
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.

I 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.

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.

well, from the documentation: https://translate.google.com/translate?sl=ja&tl=en&u=https%3A%2F%2Fsup4.smilebasic.com%2Fdoku.php
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(!)

niconii 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.

There'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 subprograms Reference: Subprogram You'll have to use a translation service, but this definitely rounds out the details on subprograms and makes them seem pretty powerful.

Yeah, 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?

Intercept every keypress and listen for a certain key combination.

Is 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.

I 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.
screenshots
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.

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.

Maybe 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.

Any potential for a data transfer tool via audio modem?

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.

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.

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.

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...

We 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.

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.

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.