BASIC Tile File Statements - fvdhoef/aquarius-plus GitHub Wiki

LOAD TILEMAP

FORMAT: LOAD TILEMAP filespec

Action: Loads tilemap file into Video RAM.

  • The tilemap format is automatically detected.
    • See Tile File Formats.
  • Bad file error results if the file is not a valid tilemap file.
  • File not found error results if the file does not exist.

LOAD TILESET

Note: Tile definitions can also be loaded from a string array file (See SET TILE)

FORMAT: LOAD TILESET filespec

Action: Loads tile definitions from a file into Video RAM.

  • The tile definitions are loaded into video RAM starting at tile index 0.
  • _Bad file error_ results if the file length is not a multiple of 32 or the tile data overruns the end of Video RAM.

FORMAT: LOAD TILESET INDEX tileno filespec

Action: As above but loads starting at the specified tile index.

  • tileno is the first tile index to be written.
  • Illegal quantity error results if tileno is greater than 512.

FORMAT: LOAD TILESET OFFSET tileofs filespec

Action: As above but loads relative to the end of the graphics screen data.

  • The starting tile index is calculated by adding tileofs to one of the following:
    • Graphics off: 0
    • Tilemap mode: 128
    • _1bpp bitmap mode: 288
    • _4bpp bitmap mode: 500

SAVE TILEMAP

FORMAT: SAVE TILEMAP filespec

Action: Saves tilemap from Video RAM to file.

  • The entire tilemap is saved into a standard format tilemap file.

SAVE TILESET

FORMAT: SAVE TILESET filespec , index , count

Action: Saves contiguous set of tile definitions from Video RAM to file.

  • index is the tile index to start saving from.
  • count is the number of tile definitions to save.