Repository navigation
import
import [ binary | tiles | sprites | map | code | screen] <file> [bank=0 x=0 y=0 w=0 h=0 vbank=0 bpp=0]
Required:
-
<file>input file name.
Options (choose 1):
-
binaryimport binary segment into the cartridge, which is what WASM cartridges run. -
tiles | spritesto import a png image as tiles or sprites. Use thex, yarguments to choose the position at which it should be imported andw, hto choose to import only a rectangle of the input image of widthwand/or heighthstarting from the top left of the image. -
mapto import a .map file as map. A map file can be created from an other cart with the export command. The tiles and sprites used by the original cart map need to be present in the new cart. The whole map is replaced, sox,y,wandhdo not apply tomapimports. -
codeto import a text file as code. -
screento import a png image as cover image. The png should be 240Γ136 pixels.
Fully optional:
-
bankChoose the bank to which you want to import. -
x yposition where to import in tiles or sprites. -
w hwidth and height you want to import from the image for tiles or sprites. -
vbankChoose the VRAM bank to which you want to import. -
bppbit depth of the imported sprite sheet:1,2or4.
Import code/images from an external file (not a cart).
Use load to import code/sprites/music/β¦ from another cart.
Put your file to import in the TIC-80/ folder and not the folder where your exe file is. Find the TIC-80 folder by typing folder in the console.
While importing images, colors are merged to the closest color of the palette.
For example, with default palette, this image:

becomes:

Note that if the palette is all black (like default bank1) the imported image will be all black.
TIC-80 tiny computer https://tic80.com | Twitter | Telegram | Terms
Built-in Editors
Console
saveΒ | exportΒ | loadΒ | importΒ | menuΒ | configΒ | surfΒ | shelfΒ | demoΒ | evalΒ
Platform
RAMΒ | VRAMΒ | DisplayΒ | PaletteΒ | Bits per Pixel (BPP)Β |
.ticFormatΒ | Supported Languages
Other
TutorialsΒ | Code SnippetsΒ | LibrariesΒ | External ToolsΒ | FFT
API
Callbacks
Input
Drawing
circΒ | circbΒ | clipΒ | clsΒ | elliΒ | ellibΒ | fontΒ | lineΒ | mapΒ | paintΒ | pixΒ | printΒ | rectΒ | rectbΒ | rrectΒ | rrectbΒ | sprΒ | triΒ | tribΒ | ttriΒ | fill patterns
- textri (deprecated)
Sound
Memory
memcpyΒ | memsetΒ | mgetΒ | msetΒ | peekΒ | pokeΒ | pmemΒ | syncΒ | vbank
System