GithubHelp home page GithubHelp logo

msx-pixel-tools's Introduction

MSX Pixel Tools

These are few simple tools I used to make Night Knight.

Convert PNG images into sprites and tilesets to be used by the MSX in screen 2 mode.

  • png2sprites.py
  • png2tileset.py
  • png2scr.py

Each tool has help in the CLI with -h.

The output is dumped to stdout, so you can redirect it to a file:

./png2sprites.py examples/sprites.png > sprites.h

The expected colours are those of the Thoshiba palette. See this file for further info about the RGB values.

When the output is a C include file, it is wrapped in an ifdef block with a LOCAL define to specify when the data is extern or not.

/* in the file including the data */
#define LOCAL
#include "sprites.h"
#undef LOCAL

...
/* in any other file */
#include "sprites.h"

The ASM output can be easily modified in case your assambler doesn't support the same syntax.

Requirements

  • Python 3
  • Pillow

png2sprites

Converts a RGB PNG image to MSX Screen 2 16x16 pixels sprite data.

RGB(28, 28, 28) is used for transparent and any other colour will be expanded to its own sprite. See the example: it has two frames with two colours and the end result is 4 frames (2 for each colour).

png2tiles

Converts a RGB PNG image to a MSX Screen 2 tileset.

The output is limited to 256 tiles.

png2scr

Converts a RGB 256x192 PNG image to a SCR file to be loaded on an MSX in Screen 2 mode.

The output is a binary file (to stdout) with the tile data followed by the colour information.

msx-pixel-tools's People

Contributors

reidrac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sahwar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.