Giter Site home page Giter Site logo

bmp2tile's People

Contributors

maxim-zhao avatar sverx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

Forkers

sverx mguler

bmp2tile's Issues

swap the palettes in image

as the 'use sprite palette' checkbox is useless with images that use both palettes, why don't make it work as a 'palette swap' option so that it will map first palette to sprites on hardware (instead of standard second palette)?
Probably it's just a change from ORing the use sprite palette bit to XORing it...

"Blank" tile ignoring

If I have multiple tilesets to be used at the same time, I may want to have a "blank" tile that they all share, so I can use arbitrary layouts. Adding a blank row at the top of the images can ensure that it is the first one. An option to discard this tile would allow the tiles to avoid duplicating it; an option to substitute it with another index would allow the tilemap to be correct for any blank tiles encountered.

problem with a dual-palette image

I created two separate 16 colors images, latest BMP2Tile can process them correctly.

p1:
p1

p2:
p2

but once I create a single image joining the two parts:
p

BMP2Tile complains
Error: Image uses colors from both palettes
though the image is technically correct. ☚ī¸

Support for up to 32 simultaneous colors

The Sega Master System supports up to 32 simultaneous colors for the background, but bmp2tile currently artificially restricts it to only 16.

It would be nice to have support for 32 simultaneous colors.

export a tilemap from an image using an existing tileset (feature request)

Since I don't think this is currently possible I marked this as a 'feature request'.
I would love if BMP2Tile could accept an image and an uncompressed binary tileset and generate the tilemap for the image using the provided tileset. Using this, one would be able to generate more images from the same shared tileset.

Export to a binary file

To make it easier to implement support in PC viewers like the RECOIL library, it would be ideal to have a standardised binary format for the SMS images and export images on this format.

It can be very a simple VRAM dump, so support can be easily implemented on emulators too. And the format allows easy binary inclusion for game development. The INCBIN would only have to skip the header and the VDP registers tail.

Here goes a humble proposal:

  1. Header (6 bytes signature):
    1.1) Signature
  • "MSBMP" string for the SMS
  • "GGBMP" string for the GG
  • "TMBMP" string for the TMS9918 (SG-1000, ColecoVision, MSX1, TI-99A, etc)
    1.2) Version (1 byte): 0 = v1.0
    1.3) File offset to the metatada area (1 byte): 9
    1.4) File offset to the data area (16bit, little endian)
  1. Metadata area (if no metadata is present, must contain only the end marker)
    2.1) Author name: ASCII text, ends with 0Dh,0Ah
    2.2) Title: ASCII text, ends with 0Dh,0Ah
    2.3) Notes: ASCII text (might be empty)
    2.4) End of the metadata marker: 1Ah (mandatory)
  2. Data area
    3.1) VDP registers dump: 10h bytes (SG-1000 uses only the first 7. Fill the unused bytes with zeroes)
    3.2) CRAM dump: 64 bytes (SMS uses only the first 32, SG-1000 uses none. Fill the unused bytes with zeroes)
    3.3) VRAM dump: 16384 bytes with a raw VRAM dump

The file extension could be .SBM, meaning "Sega Bitmap".

Plugins not recognized

I don't know why, but since today I cannot build my project because bmp2tile.exe don't recognized compressors from dll.

I get the message below :

...\bmp2tile-0.61\gfxcomp_psgaiden.dll but found no compressors

The only things I have done since the last successful build is : Update Windows 10 x)

I don't understand what's going on it seems that the loading dll is not found

add -h for brief help

Command line utility does not display any help. Also the only way to find out what extension you need is looking into the compressors repo readme, that is not very handy. I suggest to add -h command line switch that displays help for the tool itself, and also query each plugin for the specific options/extension lists.

width and height swapped when calling the CompressTilemap plug-in function

I'm working on the plug-in for the updated STMcompr format (that would just be the same with a 1-byte header containing the width of the tilemap) and I spent a few minutes wondering why I couldn't get the correct width of the tilemap in my STM compressor plugin.
Here's why:

CompressTilemap(PByteArray(tilemap), tilemapheight, tilemapwidth, plugins[i].CompressTilemap, filename);

now I'm wondering if you're going to fix it or should I use height instead? (I bet the other compressors doesn't use this anyway so you won't break them, right?)

BMP2TileGUI.exe exports a SMS (6-bit RGB) palette even when GG (12-bit RGB) is selected

How to reproduce the issue:

  • Open a valid input image in BMP2TileGUI.exe
  • Go to the "Palette" tab
  • Select "GG (12-bit RGB)"
  • Notice that the text output is a 12-bit RGB palette
  • Click "Save" and save the palette as an inc file

Open the inc file and notice that the output is a 6-bit RGB palette.
This palette is sadly unusable for Game Gear homebrew.

Notes:

  • Also affects palettes saved as raw bin files.
  • This issue is not present in the command line version. Where adding the parameter -ggpalette successfully outputs a file that can be loaded as-is on Game Gear.

Palette image doesn't reflect what's in the saved data

Let's start saying I'm not really fond of this:
https://github.com/maxim-zhao/bmp2tile/blob/master/source/Unit1.pas#L785
but I understand why it's there.

The problem is that the colors in the palette tab are the original color from the image, not the colors that you're going to save in your data. As an example:

image

the 14th color (pink) turns white ($3f) but still appears pink up there. Probably updating the colors according to the generated data would help? I'm not really sure on how to workaround this tbh. :/

... a checkbox to keep 4bpp images palette untouched

As the title said, a checkbox that makes a 4bpp palette stay as it is, even if unused colors are present in the image, would be very handy.
I guess adding another 'if' after
if tilesColumn.PixelFormat=pf4bit then
which simply does
h=15
if the said checkbox is checked should be everything needed.
Thanks!

Can't load plugins (in Wine)

I'm checking how this works under Linux (with Wine).
The program starts, looks good, can load images, does convert them fine.
When you press 'save' though, on Tiles or Tilemap tab, you can only choose 'Include files (*.inc)' type, which I believe means that the program didn't load any of the plugins (DLLs) are present in his directory.

Any idea how to fix that?
Thanks!

Reading Color from Image Palette instead Of from Color Usage

I've create a 4bpp image with this Palette using Grpahic Gale FreeEdition:
graphicgale
Lasts 9 colors are unused, but i need them for share with other tiles...

When I use Bitmap2Tile the palette is reading from color usage instead of Internal Image Palette:
captura
So the generated Palette isn't the same as the image have.

BMP2Tile 0.5 "Unsupported bitmap format Format32bppArgb"...

... but source PNG image is 16 color indexed, using 3 colors only, and I can convert it with no problem using BMP2Tile 0.44 (well, palette is kind of weird there, it is .db $00 $00 $00 $00 $00 $3F $3F $3F $3F $3F $03)

here's the image (a single 8x8 tile)
sprite

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.