mslot_check - Check memory slot


uint8 mslot_check(uint8 slot_no);

Check if the memory slot of number slot_no can be loaded.


  • slot_no: The memory slot number to be checked, from 1 to 9.

Return Value

Returns 0 if the memory slot is empty, or an non-zero number indicating a bytecode and/or an input translator is stored in the memory slot.

Bitmask Hex Type
00000001 01 Bytecode (Gamepack or Script)
00000010 02 Input Translator


Example #1 mslot_check() example

init {
    uint8 i;
    for(i=0; i<=9; ++i) {
        uint8 c = mslot_check(i);
        printf("Memory Slot: %d - Bytecode: %d, Input Translator: %d", i, c & 0x01, (c & 0x02) >> 1);

See Also

t2/mslot_check.txt · Last modified: 2016/12/04 05:45 by J2Kbr