Code Monkey home page Code Monkey logo

stc0's Introduction

Simple Tile Compression Zero

BMP2Tile plugin and Z80 decompression routine

The Simple Tile Compression Zero compression algorithm is a very simple tile compression algorithm that exploits the fact that SEGA Master System mode-4 tile data typically includes lots of bytes having either value 0x00 or 0xFF. It works on groups of 4 bytes (8 groups are needed for each tile) and in a best case scenario it compresses them up to 75%, that's when a whole group of 4 uncompressed bytes turns into a single compressed byte. Beside that, it compresses sequences of same bytes in the group too. (Average compression is around 30%, which is comparable to other known compression algorithms such as "Sonic 1", "Phantasy Star" and "LZ4", according to Maxim's compressor/decompressor benchmark https://github.com/maxim-zhao/bmp2tilecompressors#benchmark )

The provided Z80 decompression routine has the following features:

  • Master System VRAM write timing and IRQ safe
  • the fastest decompressor available (writes approximately 1000 bytes to VRAM each frame on average - see the abovementioned benchmark)
  • needs no RAM
  • it's very small (under 100 bytes)
  • permissive license

stc0's People

Contributors

sverx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.