Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCS Utility

This add-in allows for simple management of MCS (Main Content System) directories. All add-ins have an internal name (@CBASIC for example) and a MCS directory with the same name (limited to to 8 chars) is created when the add-in starts.

There can only be 147 (0x93) directory entries. If the limit is reached, no new MCS directories can be created. Add-ins with new internal names don't have a corresponding directory yet. Its creation silently fails, causing the add-in not to start. This utility helps to fix that.

Functions

Create Directory Test

Create Dir Screenshot

You can enter a name to test if a new MCS directory can be created. The @ symbol gets automatically added to the front of your input.

After entering a name, the return code and its meaning are shown: of it:

  • 0: Success
  • 0x42: Already exists
  • 0x43: Dir space exhausted
  • anything else: Failure

If you see 0x43, there is no space left. Delete some directories to allow add-ins with new internal names to start again.

Delete single directory

Delete single directory

  • [↓] and [↑] go one entry up or down
  • [←] and [→] jump one page back or forward

Besides the directory name, you can see its item count, the starting address of its items in memory, and its flags. If the current directory contains items, you can view them with [F1]. The name, length in bytes, and flags of each item are shown. Press [EXE] to delete the current directory entirely. The following return codes are possible:

  • 0: Success
  • 0xF0: Dir is null
  • 0x40: Dir doesn't exist
  • 0x45: Dir not empty
  • 0x46: Undeletable system dir
  • 0x47: Certain flags are set

Delete all empty directories

Delete all empty dirs Screenshot

This deletes all empty directories. This is useful for quickly freeing space when the directory space is exhausted and new add-ins don't start.

Directory space usage

Dir Space usage Screenshot

Shows how many of the 147 directory entries are currently in use. It's impossible to reach 0% usage as there are system directories that can't be deleted:

  • @APLWORK
  • main
  • @LOCAL1..@LOCAL40
  • @REV3..@REV1
  • library
  • system

Additionally it shows the total number of items and the amount of free MCS space in bytes.

Test Mode

Opens a secret menu that is usually accessed like this:

  1. Power off the calculator.
  2. Hold down [OPTN] + [x10^] + [AC/ON] together.
  3. On the popup enter the sequence 5, 9, 6, 3
  4. Press [1] to enter Valiable Manager. You can now browse through the directories and their items.

Useful Docs

MCS Docs + Syscall Addresses:

Syscalls:

General Programming:

Build

This project requires PrizmSDK 0.6.

In the PrizmSDK folder, open /include/asm.h and replace:

/* template for generic functions with global name */
/*#define _C_LABEL(x)   _ ## x*/    /* prefix fn name with _ */
#define _C_LABEL(x) x

with

/* template for generic functions with global name */
#define _C_LABEL(x)   _ ## x    /* prefix fn name with _ */
/*#define _C_LABEL(x) x */

Then run make.

Manually added syscalls

Addresses only for fx-CG20/50 (probably won't work on fx-CG10):

  • 0x1533: int MCS_GetDirectoryEntryByNumber(int dirno, TMainMemoryDirectoryEntry** pdir);
  • 0x1515: int MCS_CreateDirectory2(unsigned char* dir, char* dirno);

About

MCS Utility for Casio fx-CG20/50

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages