TILESMAP Editor is a standalone HTML/CSS/JavaScript web application designed to convert PNG images into Sega Master System and Game Gear compatible tile, palette, and tilemap data.
The tool runs entirely in the browser and does not require any server-side processing.
Online version https://tilesmap.2minds.fr/
Current version: v0.3 — see CHANGELOG.md for release notes.
- Import PNG images: indexed (up to 32 colors) or 24-bit RGB.
- Validate PNG dimensions, which must be multiples of 8 pixels.
- Automatically quantize 24-bit PNGs to RGB222 (SMS) or RGB444 (Game Gear) with automatic mode detection.
- Automatically split the source image into 8×8 tiles.
- Generate Sega Master System / Game Gear tile data, with each tile encoded as 32 bytes.
- Remove duplicate tiles.
- Detect and remove horizontally, vertically, and HV mirrored tiles.
- Reorganize tiles manually through a visual tile shelf.
- Highlight all source occurrences of a tile when hovering over it.
- Hover a tile in the source image to highlight it in the tile shelf with an ID/occurrences tooltip.
- Edit individual tiles directly in the browser with an 8×8 pixel editor.
- Rebuild the source image, tile shelf, exports, and tilemap after editing.
- Define a maximum tile budget and display warnings when the optimized tile count exceeds it.
- Dynamic tile shelf column count that adapts to the panel width.
- Display and edit 16-color palettes.
- Reorder palette colors for export.
- Support both Sega Master System and Game Gear palette modes.
- Use SMS RGB222 colors by default.
- Automatically switch to Game Gear mode when colors exceed the SMS RGB222 color space.
- Edit SMS colors through a 64-color RGB222 picker.
- Edit Game Gear colors through an RGB picker, with values exported as RGB444.
- Automatic hue-based sorting when quantizing 24-bit PNGs.
- Automatic padding with black entries for palettes with fewer than 16 colors on export.
- Import external palettes without changing tile pixel indices.
- Add multiple palette variants to quickly test different color sets on the same image.
- Switch between palette variants instantly.
- Delete inactive palette variants.
- Export palettes using the current palette order.
For 24-bit PNGs requiring more than 16 unique colors (up to 32), the editor automatically distributes tiles across two 16-color palettes using a greedy per-tile color-set assignment algorithm.
- Each tile is constrained to reference only one of the two palettes.
- Palette 1 and Palette 2 are exposed as two separate variants that can each be edited and reordered independently.
- A visual
[2]badge (rendered as SVG, crisp at any zoom level) marks tiles that use Palette 2 in both the source view and the tile shelf. - One-click swap button (
⇅ Échanger P1 ↔ P2) exchanges the two palettes and remaps every tile accordingly;[2]badges follow automatically. - Clicking a tile in the shelf toggles its palette assignment between P1 and P2.
- Importing a new palette variant while in dual mode prompts for slot assignment (P1 or P2).
- Palette color reordering is scoped to the active slot only, preserving the pal1/pal2 boundary.
- The Palette 2 bit (
0x0800) is automatically set per-tile in tilemap exports based on each tile's palette assignment.
Import:
- BIN
- ASM WLA-DX
- ACT Photoshop palette
- GPL GIMP palette
- Indexed PNG palette
Export:
- BIN
- ASM WLA-DX
- C (
.c+.hheader pair packaged as a ZIP archive) - ACT Photoshop palette
- GPL GIMP palette
- JASC Paint Shop Pro palette (
.pal)
SMS mode:
- BIN export uses 8-bit values.
- ASM export uses WLA-DX
.db $00values. - C export declares
extern const unsigned char {name}_palette[N];with0x00values in the header/implementation pair. - Colors are encoded as SMS RGB222 values.
Game Gear mode:
- BIN export uses 16-bit little-endian values.
- ASM export uses WLA-DX
.dw $0000values. - C export declares
extern const unsigned short {name}_palette[N];with0x0000values. - Colors are encoded as Game Gear RGB444 values.
- PNG tileset
- BIN raw tile data
- C (
.c+.hheader pair packaged as a ZIP archive, declaringextern const unsigned char {name}_tiles[N];) - PSG compressed data using PSGaiden compression
- ZX7 compressed tile data
- TSX Tiled tileset XML
For TSX export, the editor can generate either a standalone TSX file or a ZIP archive containing both the TSX file and its linked PNG tileset.
- BIN, using 16-bit little-endian Master System tilemap entries
- ASM WLA-DX
- C (
.c+.hheader pair packaged as a ZIP archive, declaringextern const unsigned short {name}_tilemap[N];) - RLE compressed tilemap
- STM ShrunkTileMap-style compressed tilemap
- TMX Tiled map XML
For TMX export, the editor can generate either a standalone TMX file or a ZIP archive containing the TMX file, the linked TSX tileset, and the PNG tileset.
A dedicated option (Custom tilemap area, in the sidebar under Remove H/V/HV mirrors) allows exporting only a rectangular sub-region of the source image as tilemap data.
- Click and drag on the source image to define the export area.
- The selection is snapped to 8×8 tile boundaries.
- A yellow dashed outline marks the selected area on the source view.
- Toggling the option off restores the full-image tilemap export.
- Only the tilemap data is affected: tile generation, tile shelf, palette export, and the resulting tile IDs remain based on the full source image. This means the same tile bank can be reused across multiple sub-tilemap exports of the same source.
- All tilemap export formats (BIN, ASM, C, RLE, STM, TMX) respect the custom area, and the statistics/HUD reflect the effective tilemap dimensions.
The editor includes browser-side compression support for:
- PSGaiden compression for tile graphics
- ZX7 compression for raw tile data
- RLE compression for tilemap data
- STM compression based on the ShrunkTileMap format
Tilemap entries are exported as 16-bit values using the Sega Master System format:
- Base value: tile index + start value
0x0200: horizontal flip0x0400: vertical flip0x0800: palette 2 (set automatically per-tile from the tile's palette assignment, OR globally forced via the tilemap option)0x1000: priority / foreground
The same tilemap flag structure is also useful for Game Gear projects using the same VDP tilemap format.
The editor can export data for use with Tiled:
- TSX tileset files linked to the exported PNG tileset.
- TMX map files using CSV tile data.
- Tile IDs are shifted by
+1, because0is reserved for empty tiles in Tiled. - Horizontal and vertical mirror flags are converted to Tiled 32-bit flip flags.
- SMS-specific palette and priority flags are exported as Tiled properties.
- Optional ZIP export including TMX, TSX, and PNG files together.
- Optional standalone TMX or TSX export.
The interface supports external language files:
lang.jslang-fr.jslang-en.js
Language selection is available through flag icons, and the default language is selected from the browser language when available.
TILESMAP Editor is designed as a self-contained web tool:
- No installation required.
- No backend required.
- No external processing.
- Works directly from static HTML, CSS, and JavaScript files.