Coder Social home page Coder Social logo

marcrobledo / super-game-boy-border-converter Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 108 KB

A tool to easily convert an image and build Super Game Boy border data in SNES format.

Home Page: http://www.marcrobledo.com/super-game-boy-border-converter/

License: Other

JavaScript 68.54% CSS 16.16% HTML 15.30%

super-game-boy-border-converter's Introduction

Super Game Boy Border Converter

This tool can easily convert a 256×224 PNG image into SNES tile data for Super Game Boy.

It uses Tiled Palette Quantization by rilden to reduce and optimize palettes for SGB limitations. Can be used with:

  • Super Game Boy Border Injector
    Turn your favorite Game Boy game into a Super Game Boy compatible game, including your own border and palette!
  • MiSTer FPGA Game Boy Core
    MiSTer FPGA Game Boy Core allows you to load SGB borders (in .sgb format) at any time
  • Game Boy homebrew development
    Include SGB border data generated by this tool into your Game Boy homebrew game

Improving conversion results

Although you can attach any image (as long as its dimensions are 256×224), the Super Game Boy had some tile and color limitations so, in most cases, your image will probably suffer from a loss of quality in order to make it compatible with the original hardware.

Super Game Boy limitations:

  • 3 palettes of 15 colors (+1 transparent color which is needed for the GB game window)
  • a tile (8x8 pixels) can only use one of the three palettes
  • a maximum of 256 unique tiles (horizontal and/or vertical flipped do not count!)

If your image goes over the 256 tiles limit, you will need to manually edit it, cloning some tiles here and there and removing the most negligible ones until you reduce the number of unique tiles.

As of palettes and colors, you don't need to worry, since the SGB Converter will reduce them for you. However, the algorithm isn't perfect and the border might lose quality if it's too complex.

Advanced: attach your own palette

You can force the converter to use your own palettes and skip the palette reduction process, which will allow you to achieve a lossless result (no colors will be lost) if done correctly. This process is a little laborious. I recommend it only if you really understand how retro videogame consoles graphics work and want to get the best result.

Take a look at this image:

SGB converter advanced example SGB converter advanced example explanation

  • it's a 256×232 image
  • first row has three extra tiles
    • each extra tile includes the 16 colors that make up each palette
  • the rest of the image is the border itself

By attaching an image like this to the SGB Converter, you are providing information on how exactly the three palettes will be, so the Converter does not need to run the random algorithm. If all your border tiles match any of those three palettes, your border won't lose any color information.

super-game-boy-border-converter's People

Contributors

marcrobledo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

super-game-boy-border-converter's Issues

Confusing Asterisk

There's an asterisk next to 4 Palettes and there is only one other asterisk on the page, under Download SGB File. I don't believe these are connected. I'm not sure what the 4 Palette asterisk means

image

My suggestion to fix the issue: Put some text underneath the Palettes box to explain what happens if you choose 4 palettes. Remove the asterisk in front of (all data in a single file) because the parenthesis are good enough to explain. Another alternative would be put a (?) help button next to the Palettes popup and if the user clicks on it, an explanation comes up

Original SGB Border too big?

So, i recently was trying out the tool. Works nice and all. However, i re-converted Link's Awakening DX's SGB border, and it complained about too many tiles. Now, question is: how is there too many tiles on a border that was originally in LADX? Seems to be a bug if this happens

Black flash just before border fade in.

There is a black flash before border fade in on a North American SNES and SGB.

What seems to be happening is the tiles and tile map are not switching instantly so an opaque tile is replacing the transparent one. Other borders seem to always use tile 0 as the transparent tile to avoid this issue.

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.