? Midori-OS ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Midori-OS

Submitted
Updated
Author
Autz64
Public Key
5Z7N33LJ
Min. Compat.
All
Version
1.0
Rating
12 votes
Description I came late to the OS meme party, but anyways. Midori-OS is a scalable mock-OS made with the idea of making app development more easy and accesible, instead of using the typical approach of editing the sourcecode directly. On Midori-OS, users can make apps that Midori imports automatically to the code, you don't have to touch the sourcecode! You can export and import apps as you please with no hassle. Making an app for a mock-OS has never been easier! Midori-OS (1.0) comes with the following:
  1. Terminal. App with diverse functionality, but most importantly, create shortcuts.
  2. File Explorer. App to rename and delete files from SmileBASIC.
  3. Wire3D. A small 3D demo, showing an hypercube.
  4. Input test. Another small demo, showing different functionalities of Midori API.
  5. SPaint. A useless paint app with tools and colors
  6. Help. An useful embed app that tells most details of Midori usage and app development.
  7. DEMO1 (as external .pkg). Small app that shows communication capabilities between apps
  8. DEMO2 (as external .pkg). Small app that abuses direct memory access to corrupt programs.
  9. Spaceship (as external .pkg). Small minigame where you shoot aliens.
  10. Calculator (as external .pkg). Simple Calculator.
Instructions Load "EXECUTE" file, and let it do some magic. All programs are acessible via Start Menu -> Programs.

Controls:

  1. L: Left-click.
  2. R: Right-click.
  3. A:Enter.
  4. Y: Backspace.
  5. Left-Stick /Touchscreen: Cursor movement.
  6. R while hovering a box on taskbar: Close that window.
For app development, refer to the following pages: API reference: https://smilebasicsource.com/page?pid=1211 Making your first app: https://smilebasicsource.com/page?pid=1212
Notes Why is "Midori" written in Katakana?
Categories
Keywords
  • mock-OS
  • OS
  • Midori
  • Autz
17 Comment(s) 12Me21 12Me21 Head Admin Third Year My account is over 3 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Here's a system for giving windows access to arrays (Based on OTYAX): Because SB doesn't let you create an array of arrays, the next best thing is to make a bunch of global arrays, and access them with VAR("name") When the window is created, you use VARS_ARRAY_ALLOC to request an array. The array ID number is stored in VARS_NUM, so you can access it later with VARS_ARRAY 'Put this code in __APMN, after DIM VARS_STR$ or something DIM A_USED[256] 'this keeps track of which window is using each array (-1 = unused) FILL A_USED,-1 DIM A_FREE[0] 'empty array IF FALSE THEN DIM _A_0[0],_A_1[0],_A_2[0],_A_3[0],_A_4[0],_A_5[0],_A_6[0],_A_7[0],...,_A_FF[0] 'Code to generate that really long DIM list: 'FOR I=0 TO 255 ' S$=S$+"_A_"+HEX$(I)+"[0]," 'NEXT 'CLIPBOARD S$ 'Request an array to use. 'WID: window ID 'VNUM: VARS_NUM index to use 'ARRAY: array 'Returns 1 if it succeeded, or 0 if it failed (ran out of arrays) DEF VARS_ARRAY_ALLOC(WID,VNUM,ARRAY) VAR I FOR I=0 TO LEN(_A_USED)-1 IF _A_USED[I]==-1 THEN _A_USED[I]=WID VARS_NUM[WID,VNUM]=I VARS_ARRAY_SET WID,VNUM,ARRAY RETURN TRUE ENDIF NEXT VARS_NUM[WID,VNUM]=-1 RETURN FALSE END DEF VARS_ARRAY_SET WID,VNUM,ARRAY VAR("_A_"+HEX$(VARS_NUM[WID,VNUM]))=ARRAY END DEF VARS_ARRAY(WID,VNUM) RETURN VAR("_A_"+HEX(VARS_NUM[WID,VNUM])) END 'put this at the end of DEF APP_WINDOW_DESTROY FOR J=0 TO LEN(_A_USED)-1 IF _A_USED[J]==I THEN VAR("_A_"+HEX$(J))=_A_FREE _A_USED[J]=-1 ENDIF NEXT 'examples: 'allocating an array (usually inside `IF ON_OPEN(WND) THEN...`) 'uses VARS_NUM[WID,45] DIM NEW$[10,23] IF !VARS_ARRAY_ALLOC(WID,45,NEW$) THEN APP_WINDOW_DESTROY WND:RETURN '(close the window if there weren't any arrays available) 'accessing the array IF FALSE THEN DIM ARRAY$[0] ARRAY$=VARS_ARRAY(WID,45) ARRAY$[0,7]="HELLO" PRINT ARRAY$[4,5] Note: IF FALSE THEN DIM... is used to create array variables without actaully creating the arrays (this is faster and uses less memory) Autz64 Autz64 End of 2017 Contest Participant I participated in the SmileBASIC Source End of 2017 Contest! Programming Contest Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website Thanks 12. I didn't knew about that VAR() trick to refer to variables. I implemented your code with some changes to avoid messing up with VARS_NUM and I was trying to simplify it, but is fine as it is. And off-topic, I toyed with that clipboard code to make 4095 variables, obviously it won't work, but the editor just slowed down when I pasted all of it. First time I see a slowdown on the editor jeje. 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 woah something that has caused me to upload you know! Autz64 Autz64 End of 2017 Contest Participant I participated in the SmileBASIC Source End of 2017 Contest! Programming Contest Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website Version 1.0 is OUT! Includes:
  1. Wallpaper Support
  2. More API DEFS
  3. Alternate mode for touchscreen
  4. Better design
  5. Glitch fixes
Check out the API DEF reference to see changes!
MochaProbably MochaProbably Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies woah something that has caused me to retrieve my 3ds from the 4th dimentional void and download a project again!
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 Yeah... this is not the place to rage quit... 12Me21 12Me21 Head Admin Third Year My account is over 3 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself You should definitely use GCLIP if you aren't already. CyberYoshi64 CyberYoshi64 Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself First Year My account is over 1 year old Website Yeah, if a graphic in an app would go beyond the window, it can so and dance around outside of the window This happened to me by doing this: - Open the DEMO1 app and spawn a child. - Close the dad and open the Spaceship game. - Mash the L button on the "Send message to dad" text on the child and the game starts for 1 frame and then returns to the title screen though it didn't reset the variables. - After 1 hour of mashing L I managed to get -100 lifes which doesn't fit in the window so it goes beyond it. Autz64 Autz64 End of 2017 Contest Participant I participated in the SmileBASIC Source End of 2017 Contest! Programming Contest Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website The way how DEMO1 works is with direct memory manipulation. That's expected, but I should do some checks to avoid it. LucasJG1994 LucasJG1994 I'm truly amazed at what people can do with SmileBasic. Great job in making this. I'd like to make a request to the website and to those who are very experienced in programming that if it would be possible to make an emulation which is focused around the Assembly Language. This means that you have the means to mess with memory that controls not only the hardware but also the buttons and touch screen, etc. I've been experimenting on the old commodore 64 and Ti-99/4a emulators to see how Assembly Language can be used to create programs that pus the limits of the machine. (Even though it's an emulator) bluekrill bluekrill Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Video Games I like to play video games! Hobbies I'd be happy to help with an emulator! I've designed two virtual 16-bit computers which run in SmileBASIC that are programmed in a unique assembly language. I love the low-level stuff! LucasJG1994 LucasJG1994 @bluekrill Thanks for the help. I also am fascinated by the old languages such as assembly. But i also find it important to learn this language as it opens you eyes to what you can really do with a machine without restrictions. bluekrill bluekrill Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Video Games I like to play video games! Hobbies I've written a few programs for my virtual computers. My favourites are probably my brainfuck interpreters because they are very easy to write in assembly! :) 12Me21 12Me21 Head Admin Third Year My account is over 3 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself (I'm using my old 3DS right now, so this might not actually be a problem...) I think it would be better to use the entire lower screen to control the mouse, maybe holding L or something would switch between keyboard and touchpad mode. Also there seems to be a problem with dragging windows around while using the touchscreen to control the cursor. Autz64 Autz64 End of 2017 Contest Participant I participated in the SmileBASIC Source End of 2017 Contest! Programming Contest Avatar Taboo I didn't change my avatar for 180 days Website Deep Sleep Hidden Website I have an old 3DS (small) and is not a problem for me because I got used to it. I could add that feature. And yes, the cursor goes "off" when dragging near the window borders (specially up and down). I have an idea on how to fix it but, uhm... it gives these errors. Good thing the stick movement is not THAT noticeable. snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! Night Person I like the quiet night and sleep late. Express Yourself If you held L to enable the keyboard, you couldn't have a shift shortcut (unless you mapped it to another button.) IAmRalsei IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength You could just have briefly pressing L be a quick shift button.