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.
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: Success0x42: Already exists0x43: 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.
[↓]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: Success0xF0: Dir is null0x40: Dir doesn't exist0x45: Dir not empty0x46: Undeletable system dir0x47: Certain flags are set
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.
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:
@APLWORKmain@LOCAL1..@LOCAL40@REV3..@REV1librarysystem
Additionally it shows the total number of items and the amount of free MCS space in bytes.
Opens a secret menu that is usually accessed like this:
- Power off the calculator.
- Hold down
[OPTN]+[x10^]+[AC/ON]together. - On the popup enter the sequence
5, 9, 6, 3 - Press
[1]to enter Valiable Manager. You can now browse through the directories and their items.
MCS Docs + Syscall Addresses:
- MCS Syscalls: https://bible.planet-casio.com/simlo/chm/v20/fx_legacy_MCS.htm
- MCS Structure: https://bible.planet-casio.com/simlo/chm/v20/fx_legacy_MCSstructure.HTM
- Syscall addresses for CG20+: https://bible.planet-casio.com/simlo/chm/v20/fx_fxCG20_syscalls.htm
Syscalls:
- MCS_CreateDirectory (wrong one): https://prizm.cemetech.net/Syscalls/MCS/MCS_CreateDirectory/
- MCS_DeleteDirectory: https://prizm.cemetech.net/Syscalls/MCS/MCS_DeleteDirectory/
- MCSDelVar2: https://prizm.cemetech.net/Syscalls/MCS/MCSDelVar2/
General Programming:
- Printing Text: https://prizm.cemetech.net/Tutorials/Printing_Text/
- Reading Input: https://prizm.cemetech.net/Tutorials/Reading_Input/
- Useful Routines: https://prizm.cemetech.net/Useful_Routines/
- Image Converter: https://www.cemetech.net/sc/
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.
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);



