CASIOWIN

From WikiPrizm
Revision as of 19:33, 4 August 2014 by Gbl08ma (talk | contribs) (Created page with "{{Incomplete}} CASIOWIN is the name of the Operating System used on the Prizm and other Casio calculators. Note that despite the name being the same across devices, CASIOWIN...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page has not been completed. Parts may be missing or reorganized before completed. Information is provided as-is and may have errors.

CASIOWIN is the name of the Operating System used on the Prizm and other Casio calculators. Note that despite the name being the same across devices, CASIOWIN is actually quite different from system to system, even though the editions on newer models are usually the result of the evolution of the previous model edition. In the case of the Prizm, its CASIOWIN is the result of the port of fx-9860G's edition of the OS to a SH7305 CPU, high-resolution color screen and big flash (with a new filesystem for the storage memory).

On the Prizm, the OS is located in flash from address 0x80020000 to 0x80B5FFFF (a bit over 11 MB) - that is, from after the bootloader to before flash regions that are used to store data that varies from device to device, like currently selected add-in language, user information (that is shown on power off), Main Memory backups, and of course, the Storage Memory.

Features unique to the Prizm

Here are some features of CASIOWIN which were introduced with the Prizm, some of which have not yet found their way to updates for older models:

  • Full-color, high-resolution screen support;
    • Color picture displaying in proprietary format (g3p);
    • Colored graphs;
    • Color-link on Statistics and Spreadsheet;
    • Brackets coloring on certain expression inputs;
    • Addition of a color option to lots of things.
  • Status area (current angle unit, display mode, complex mode...);
    • Battery meter on the status area, along with "battery type" setting;
  • USB mass-storage function (previously, link software was necessary);
  • "Proper" flash file system, with support for sub-folders (3 levels on the native OS file browsers, theoretically unlimited in custom add-ins);
  • Support for Chinese language (the OS includes Hanzi/kanji, Hiragana and Katakana characters);
  • Dual screen (Graph+Graph or Graph to Table);
  • Inclusion of more fonts...

Start-up process

Note: this is very incomplete, things may be in the wrong order, etc. More investigation is needed.

After execution jumps to the OS entry point, thanks to the bootloader, it proceeds to initialize various memory areas, mounts the storage memory file system using the Fugue API, loads MCS and setup backups from flash (at this point the brightness is set to the user-chosen level) and shows a set-up wizard where users can choose for example language, display brightness and battery type. This wizard is shown even if the users have already set these settings and the OS still remembers them; it is skipped on the "fx-CG10/20 Manager" emulator. Finally, the Main Menu is shown.

Add-in software and language

The OS supports add-in software in the form of g3a files and add-in language in the form of g3l files. (It also supports BASIC scripts that are stored in Main Memory, but they are much less powerful than add-in software.)

To date, Casio released five official software add-ins (usually simply mentioned as "add-ins"): Geometry, Picture Plot, Conversion, Physium and ProbSim. The first three add-ins were released on launch, with Conversion being just a placeholder that the OS checks to enable the conversion function on the built-in apps. Physium was released with OS 1.03 and that is the lowest version it will run in. ProbSim was released with OS 2.00 but can work on earlier OS versions.

With OS 2.00, Casio also released the Russian language add-in, which seems to work with problems in earlier OS versions. More information on add-in versions can be found on Versions and versioning.

For a long time (since at least April 2011) the community has been able to run custom machine code in the form of unofficial add-ins. Since then, dozens of unofficial add-ins have been developed (possibly over a hundred), with varying degrees of stability, user experience and OS integration.

Add-ins use OS functions as syscalls. Most OS functions, even insignificant ones, appear to be exposed as syscalls, but apparently certain libraries (such as zlib, included for decoding and encoding of g3p pictures) are not exposed. Most system settings and flags can (and should) also be read and set using syscalls, but there are some omissions (see for instance SetGetkeyToMainFunctionReturnFlag).

Syscalls are called by jumping to address 0x80020070 with a syscall number in r0, and after the syscall is executed, execution jumps back to the calling function. A list of known syscalls can be found here.

Process and task model

The OS does not present any multitasking or multithreading mechanisms, other than Timers, which at a stretch can be considered a very basic multithreading mechanism. A predefined number of "processes" is supported. For more information, see the article Processes.

OS versions

See the article Versions and versioning.

Secret key combinations

See the article Secret Key Combinations.

Behavior on program error

See the article Error handling.