Skip to main content

Command-line tool for replacing the cover image of a TIC-80 .tic cartridge file

Project description

tic-set-screen

A command line tool for replacing the cover image of a TIC-80 .tic cartridge file

About

As of TIC-80 version 0.90, the cover image for a cartridge is saved as a dump of the screen data. This is displayed using the cartridge's built-in palette, which will be the default Sweetie16 (or DB16) palette if a custom palette has not been explicitly set up through the TIC-80 sprite editor. Notably, poking the palette memory from a running program does not write those palette changes back to the cartridge file.

This is problematic for many size-coded / byte battle / byte jam releases, as they consist only of code and no supporting data - a program that sets a custom palette will end up with a cover image displayed in false colours. Additionally, there's no way to capture scanline-level palette changes performed with SCN or OVR.

In the absence of a "proper" fix, tic-set-screen allows you to supply an arbitrary 16-colour image, and generates a new .tic cartridge file with the screen and palette chunks modified to use that as the cover image.

(Note that, since the cartridge's built-in palette is changed, a program that only pokes some of the palette memory and relies on default values for the rest could end up looking different. If this is a problem, you can still use tic-set-screen to prepare a metadata cart for uploading to tic80.com.)

Installation

With Python 3.7 or above installed, run:

pip install tic-set-screen

(Depending on your Python setup, the command may be pip3 rather than pip. You can also install it into a Python virtual environment, if that's your jam.)

Usage

tic-set-screen input_cart.tic cover_image.png output_cart.tic

The cover image must be 240x136 and use a maximum of 16 colours. It can be PNG, GIF, or any other format recognised by Pillow.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tic-set-screen-0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

tic_set_screen-0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file tic-set-screen-0.1.tar.gz.

File metadata

  • Download URL: tic-set-screen-0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for tic-set-screen-0.1.tar.gz
Algorithm Hash digest
SHA256 67a2c134952964b5f36c5de9df31d8a920ff31e28201db90e0a13132d2d60e9c
MD5 a4fd47e476408a2ad70911a9198a15e2
BLAKE2b-256 2f7809a763d81e1a853cd7ccc094baf666a1a6656691e579e7c4deff6e114148

See more details on using hashes here.

File details

Details for the file tic_set_screen-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tic_set_screen-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57cbd0cefdb2a05356bd423dff8ad56731649f363055db0446bc0edb02d92c9d
MD5 b169476b0e3c1a9e2e4cf577f2b44d84
BLAKE2b-256 82f4008d2c57711daeb86927dd62e70feb2675df6bf9c36e49f497d7f07fc49f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page