Pressing the windows/command key while in the command line will enter VGA mode. There is no way to return back to the command line without rebooting.
When entering VGA mode, a task named "osakaOS GUI" will be added to the task manager. This task manages everything from input, display, kernel programs and more.
the main difference between text-mode and VGA mode is that they are singletasking and multitasking only respectively. For now, other tasks are only created by user scripts and programs.
The osakaOS GUI is a tradition dekstop where you can create, delete, minimize, maximize, and change the size of graphical windows used to interact with programs.
It works in VGA mode 13h with a resolution of 320x200 pixels and a palette of 256 colors (though only 64 are loaded by default as the EGA palette).
There are certain programs built into the kernel for users to utilize in the absence of actual compiled userspace programs (more on this later lol).
These 3 programs are the terminal, kasugapaint
, and the previously mentioned journal
. You can launch these programs by just typing their names in the terminal as commands.
These programs aren't detailed enough yet to warrant their own pages, so I'll explain their functionality at the end of this section.
When windows are minimized they can be reopened by clicking on their name on the bottom panel. You can toggle this panel on and off with F2.
Likewise you can maximize windows by using the GUI buttons, and make them fullscreen with F3.
As mentioned previously, F4 and F5 will save and read files respectively. But this behaviour changes slightly depending on what program handling the files.
Saving files does nothing in the terminal, but reading files will execute them as a multitasking script.
Saving files in Kasugapaint will save them as an image with the img
tag. Reading files will read them as image files regardless of their structure.
Saving and reading files in Journal work exactly how you think they work.
You can also take screenshots using the F7 key, but this is kinda buggy so yeah.
Of course you don't want to have to launch every program or script from the terminal, which is where the shortcut
command comes in.
You can use shortcuts as a way to easily launch a program and read in a file with a single click of the mouse.
shortcut (file) (int)
output: Creates a graphical shortcut for the give file.The given file is what the shortcut will try to open on launch, the (int) determines what program its opened in (1 = terminal [default], 2 = kasugapaint, 3 = journal).
vga (int1) (int2) (int3) (int4)
output: Sets new value to VGA palette.The default graphical mode is VGA 13h with 256 colors, the index of the palette (int1) will be given a new color with the given RGB values (int2), (int3), (int4).
AyumuScript has the ability to create graphical windows for you to interface with. This is done through the window
command.
These window's are tied to the terminal (AyumuScript interpreter) object and has access to all the data in that object.
window (str)
output: Creates a new window with the given name.This window will appear blank by default and can be drawn on by using other commands discussed later. These windows are still a bit buggy just fyi.
There are a number of commands that are exclusive to VGA mode and can be used to change the look and functionality of the desktop.
To begin, you can use the drawpic
command to load image files to window buffers, including the graphical buffer of the desktop itself.
drawpic (image file)
output: Draws image to currently targeted buffer.If there is an active scripting window, this buffer will be filled with image data, else the desktop will be targeted by default.
This property of the drawing target being any active scripting window or the desktop applies to other drawing commands as well.
This includes the following commands which be used to draw certain shapes and colors to the screen.
putpixel (int1) (int2) (int3)
output: Draws pixel using given coordinates and color.The pixel at x position (int1) and y position (int2) will have the value of VGA palette index (int3) written to it.
drawrect (int1) (int2) (int3) (int4) (int5)
output: Draws filled rectangle using given coordinates and color.Will draw a rectangle where the top left corner starts at x_y position (int1)_(int2), with a width and height of (int3) and (int4), and color of (int5).
drawline (int1) (int2) (int3) (int4) (int5)
output: Draws line using given coordinates and color.Will draw a line from x_y position (int1)_(int2) to x_y position (int3)_(int4) with a color of (int5).
These commands can be used to set a desktop background, initialize shortcuts, set a custom palette, and more. This can easily be done on boot with a wakeup
script.
KasugaPaint is a basic free drawing program for you to create and import images to edit. You can pick from the default palette to draw with different brushes, sizes, and change dimensions.
You can do shift-f to draw to the entire screen with the current selected color, tab will toggle the program menu on and off, any saved images will be given the img
tag by default.
Journal is a basic text editor that you can navigate with the arrow keys. It's very basic and I already covered it in a previous section so that's it for now.
If you press the windows/command key again, you can enter the simulation mode of the OS. This doesn't provide any actualy technical functionality, but is just for people to play around in and explore.
The next page will cover binary executables in osakaOS.