coloX Developer Documentation Index
The complete coloX cartridge development documentation, grouped in learning order. Recommended path for beginners: Getting started → Platform specifications → Lua language → Graphics/input. Consult the remaining topics as needed.
Getting Started
| Document | Contents |
|---|
| getting_started.md | Application development: .clx file structure (specification declaration, Lua scripts, resource data), development and debugging workflow, and your first application |
| platforms.md | Platform specifications: resolution, color depth, sprite counts, and storage (correspondence with file header version numbers) |
| lua.md | Lua language: differences between coloX's customized Lua 5.4 and standard Lua, and available standard libraries |
Core API
| Document | Contents |
|---|
| graphics.md | Graphics: pixel operations, basic shapes, sprites, palettes, and image blocks |
| text.md | Text: print/drawTxt output and font management, including Chinese text and custom TTF fonts |
| map.md | Maps: assembling sprite tiles into large areas and textured line effects |
| input.md | Input: buttons and touch |
| pad.md | Gamepads: a gamepad/Bluetooth gamepad input channel independent of btn() |
| audio.md | Audio: sound effect synthesis, music playback, PCM waveform playback, and microphone recording |
| math.md | Math, bitwise operations, and random numbers (trigonometric functions use screen coordinates) |
| tables.md | Table utility functions |
| memory.md | Memory: byte, word, and double-word access to virtual machine memory |
| system.md | System: status queries, time and date, application management, data storage, service communication, and utilities |
Modules
Built-in modules (no usemod required; some capabilities depend on the firmware build):
| Document | Contents |
|---|
| img.md | Images: PNG/JPG/GIF/WebP loading and drawing, animation playback, and incoming image streams |
| airimg.md | Airimg host streaming guide (companion to img): USB device identification, the CXUS streaming protocol, a Python example, and automatic display on the animated home screen |
| anim.md | Easing functions: numerical interpolation using easing curves |
| cjson.md | JSON encoding and decoding (require("cjson")) |
Optional modules (enabled with usemod('name') in a cartridge; the corresponding feature must be compiled into the firmware):
| Document | Contents |
|---|
| vg.md | Vector graphics (ThorVG): shapes, gradients, text, pictures, and Lottie |
| rlottie.md | Lottie vector animation (compatible APIs provided by ThorVG in version≥13) |
| b2d.md | 2D physics engine (Box2D) |
| net.md | Networking: TCP/UDP/Multicast sockets, Copas asynchronous scheduling, HTTP client, WebSocket, URL parsing, and LTN12 streams |
| Document | Contents |
|---|
| coloplay_ext.md | ColoPLAY platform system services (svcget/svcset/svcreq) |
| naturemini_ext.md | NatureMiniPro device control and page display extensions |
Debugging and Tips
| Document | Contents |
|---|
| debug.md | Debugger: host-side Lua debugging and test automation channel (not a cartridge API) |
| tips.md | Development tips and optimization: memory savings, frame rate optimization, and audio/image/network usage |
Documentation and Resources
Documentation and resources provides complete bilingual documentation, development tools, and runnable example cartridges.