Skip to content

NanoSDK

Cryptid edited this page Jan 31, 2026 · 58 revisions

Introduction

NanoSDK is the software that allows you to create MicroOS applications locally using the NanoCode App built into every stock MicroOS installation. In this guide you'll learn about different commands, basic and advanced logic, compiling, different optimizations as well as see some example apps made with NanoSDK.

The commands and their parameters are listed with a highlighted background and [square brackets] around the short description of the parameter, with a full version of their name written in bold letters right next to them.

Whenever a number parameter is used the number has to be at least 3 characters long. If it does not meet that requirement, add 0's at the beginning of the number until it is 3 characters long.

Important

Currently due to the current design of the on-screen keyboard, each line is limited to 36 characters. Working around this limitation is explained in Advanced Logic.

Basic Commands

Basic commands are the bare bone features of NanoSDK, often required for the app to function.

DAN [name] Define Application Name - Defines the application name listed in the library and title bar, has to be put in the first line.

DAI [asset name] Define Application Icon - Defines the application icon displayed in the library, has to be put in the second line. In case of not having an icon asset the name can be set to default in order to use the default MicroOS application icon.

ASM [name] Application Submenu - Defines the application submenu, the uses of this command are explained in Advanced Logic. An app cannot function without the submenu being defined in the third line.

TXP [x position] Title X Position - Defined the application title x position. An app cannot function without the title x position being defined in the fourth line.

PRN [string] Print - Displays a pop up window with the inputted string.

END [error] End - Force closes the application. An optional error message can be added.

Basic Logic

Basic logic mostly revolves around a singular command, IFB [action] [type] [value] [additional] If Bracket. This command has many sub commands called actions, which will be described below.

IFB var [variable name] [comparison type] [comparison value] If Bracket Variable - This command triggers the code found inside the if bracket if the specified condition is met. There are different comparison types which all do different things. There is eql for equals, this will trigger the code if the variable is equal to the specified value, this is the only comparison type that works with strings. There is mor for more, this will trigger the code if the variable is higher than the specified value. There is les for less, this will trigger the code if the variable is less than the specified value. There is moe for more or equal, this will trigger the code if the variable is equal or higher than the specified value. And at last there is loe for less or equal, this will trigger the code if the variable is equal or less than the specified value.

IFB btn [button] [button state] If Bracket Button - This command will run the code inside the if bracket only if the set button condition is met. The button conditions include dwn for the button currently being held down and ndn for the button not currently being held down. The available buttons are btna for the A button, btnb for the B button, dpdl for DPAD Left, dpdr for DPAD Right, dpdu for DPAD Up and dpdd for DPAD Down.

IFB spr [variable] [comparison type] [comparison value] If Bracket Sprite - This command works just like the IFB var command except instead of variables it gets sprite data. The available data is psx for the X position, psy for the Y position, psz for the Z position, vsb for the sprite's visibility. The comparison type parameter also includes an exclusive type, tch for touch. When using it set the value to the name of the sprite you want to check if the first sprite is touching.

IFB end If bracket end - This command defines the end of the If Bracket, making any code after it be unaffected by the condition.

Another type of command which falls under Basic Logic is LOP [amount/parameter] Loop. This command will repeat all the code inside its bracket the specified amount of times. The different parameters are described below.

LOP [number] Loop - This command is the beginning of the loop, you can set the number to either a number of your choice or inf if you want the loop to never end unless specified.

LOP EXT Loop Exit - This command escapes the loop its in, this is useful when using the LOP inf loop.

LOP end Loop End - This command closes off the loop, making all the code written after it not be ran as part of the loop.

Advanced Logic

Advanced Logic will help you make more advanced apps as well as teach you how to work around the software limitations.

[string]:BLW Below - This command lets you write longer commands and strings in order to work around the 36 character per line limit, entering this command at the end of a line will extend it to the line below. This command also unlocks more advanced uses of previously introduced commands, which will are explained below.

LOP :BLW Loop Below - This modifier of the Loop command will let you add an IFB If Bracket parameter to the loop in order to keep the loop running until said parameter is met. Using this method does not require using the IFB End If Bracket End command after writing the if bracket.

WHN [action] [type] [value] [additional] When - This command will be ran whenever the requirement is met. Using this command is identical to using the IFB If Bracket command which was explained in Basic Logic. This command can also be surrounded with an IFB If Bracket in order to make the command not run when the condition of the If Bracket is not met.

WHN end When End - Just like the IFB end If Bracket End command, this is used to close off the When Bracket.

IFB els IF Bracket Else - This command can be inserted between the IFB If Bracket and IFB end If Bracket commands, in order to make all code below the IFB els only be ran when the condition of the original IFB is not met.

Sprite Commands

Work in progress

ListGUI Commands

CLG Create ListGUI - This command creates a blank ListGUI.

LGP [X] [Y] ListGUI Position - This command defines the position of a ListGUI with 0,0 being the top left edge of the screen and 160,120 being the bottom right edge of the screen.

LGD [X] [Y] ListGUI Dimensions - This command defines the dimensions of a ListGUI.

LGO str[Amount] ListGUI Options - This command sets the options of the defined ListGUI with Amount defining the amount of strings included in the ListGUI, with strings listed below the command.

LGS [Index] [Value] ListGUI Set - Sets the chosen index to the chosen value.

LGV [Index] [Variable] ListGUI Value - Sets the defined variable to the value at the chosen index.

LGR [Index] ListGUI Remove - Removes the value at the specified index.

DLG Destroy ListGUI - Deletes the ListGUI.

LGH [Mode] ListGUI Highlight - Sets the ListGUI item highlight mode, set it to off for no highlight, auto for the mouse to highlight items or to a number to highlight a specific item.

Radio Commands

Work in progress

Device Management Commands

Work in progress

Assets

Work in progress

Compiling

Work in progress

Optimizations

Work in progress

Examples

This is an example of a simple app featuring a List GUI. (very bad outdated example, i'll write a new one once im done with NanoSDK 2026.1)

DAN example
DAI default
ASM home
TXP 22
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str3 name
option1
option2
option3
LOP inf
IFB var ASM eql home
WHN sel 001 name
DLG name
ASM menu1
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str1 name
back
WHN sel 002 name
DLG name
ASM menu2
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str1 name
back
WHN sel 003 name
DLG name
ASM menu3
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str1 name
back
WHN end
IFB els
WHN sel 001 name
ASM home
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str3 name
option1
option2
option3
WHN end
IFB end
LOP end

Clone this wiki locally