{"id":21328449,"url":"https://github.com/mrcook/smstilemap","last_synced_at":"2026-03-01T20:34:30.623Z","repository":{"id":67278613,"uuid":"407244829","full_name":"mrcook/smstilemap","owner":"mrcook","description":"Sega Master System (SMS) tilemap generator and conversion tools. A library written in Golang.","archived":false,"fork":false,"pushed_at":"2024-04-12T13:35:38.000Z","size":230,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-12T07:32:24.463Z","etag":null,"topics":["golang","golang-library","sega","sega-master-system","sprites","tilemap","tiles"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrcook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-16T16:51:40.000Z","updated_at":"2025-06-05T06:52:30.000Z","dependencies_parsed_at":"2024-06-19T12:11:03.981Z","dependency_job_id":"632285ab-21e2-450b-b2b2-f19c40c74e36","html_url":"https://github.com/mrcook/smstilemap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrcook/smstilemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcook%2Fsmstilemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcook%2Fsmstilemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcook%2Fsmstilemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcook%2Fsmstilemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrcook","download_url":"https://codeload.github.com/mrcook/smstilemap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrcook%2Fsmstilemap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29983212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","golang-library","sega","sega-master-system","sprites","tilemap","tiles"],"created_at":"2024-11-21T21:29:00.638Z","updated_at":"2026-03-01T20:34:30.595Z","avatar_url":"https://github.com/mrcook.png","language":"Go","readme":"# smstilemap - a Sega Master System tile library\n\nMany tools for creating background tiles and sprites for the Sega Master System\n(SMS) are only available on the Windows operating system, making it challenging\nfor macOS and Linux users.\n\nThis small Go language library was created to aid developers converting raster\nimages (e.g. PNG) to the SMS tile, palette, and tilemap (name table) data.\n\nThe source image is converted into 8x8 pixel tiles, duplicate tiles are removed\n(using both vertical and horizontal flipping comparison). SMS colour palette\ndata is generated from the image, and a tilemap is generated.\n\nNote: if the colours in the source image do not match exactly those on the SMS,\na nearest match conversion will be attempted. This can have an undesirable\neffect, so it's recommend to follow the image generation guide below.\n\n\n## Install from Source\n\nIf you have Go installed on your system you can use the following command to\ninstall `smstilemap`:\n\n    go install github.com/mrcook/smstilemap/cmd/smstilemap@latest\n\n\n## Usage\n\n```\nUsage of smstilemap:\n  -in string\n    \tInput PNG filename\n  -out string\n    \tOutput directory for generated files (default: input filename directory)\n  -fmt string\n    \tOutput format: asm, tiles (default \"asm\")\n  -v\tDisplay version number\n```\n\nTo convert an image to Sega Master System assembly code:\n\n    smstilemap -in=/path/to/image.png\n\nThis will generate a Z80 assembly source code file (`.asm`) comprising of the SMS tile,\ntilemap, and palette data, in the same directory as the image: `/path/to/image.asm`.\n\nTo specify a different output directory, use the `-out` flag. For example:\n\n    smstilemap -in=/path/to/image.png -out=/output/dir\n\nwhich will write the data as: `/output/dir/image.asm`.\n\nAlong with ASM code, it's also possible to output a PNG image containing all\nthe unique tiles from the source image (tile data), by using the `-fmt=tiles`\nCLI option.\n\n    smstilemap -in=/path/to/image.png -fmt=tiles\n\nThe 1983 ZX Spectrum JETPAC game loading screen (without colour clash!):\n\n![](example/jetpac.png)\n\nAs a set of unique tiles:\n\n![](example/jetpac-tiles.png)\n\n\n## Guide to generating Sega Master System compatible images\n\nAny graphics or sprite editor that can control the colour palette and export to\nPNG can be used.\n\nMaster System specs:\n\n* 256x192 pixels screen size (viewport)\n* 64 predefined colours\n* 32 palette colours: 16 for background tiles and 16 for sprites or background tiles\n* tile size: 8x8 pixels\n* maximum of 448 unique tiles\n\nWhen creating the source image, the above dimensions, colours, and palette size\nshould be used.\n\nThe Master System screen viewport would require 768 unique tiles to fill it.\nAs the SMS can only hold a maximum of 448 tiles, images need to be crafted for\ntile re-use. Careful alignment along 8 pixel boundaries and utilising flipped\ntiles (vertical and horizontal) can help to achieve this maximum tile usage.\n\n### SMS Colours Utility\n\nA small utility called `smscolours` is provide that will generate PNG files for\nall the colours generated by the Sega Master System and Game Gear consoles.\nThese files can then be used as palette files for your favourite sprite editor\n(Krita, LibreSprite, etc.).\n\nInstall `smscolours` by running the following command:\n\n    go install github.com/mrcook/smstilemap/cmd/smscolours@latest\n\nOnce installed run the program while specifying an output directory:\n\n    smscolours /path/to/output/dir/\n\nExample output: [sms-colours.png](./example/sms-colours.png)\n\n\n## LICENSE\n\nCopyright (c) 2021-2023 Michael R. Cook. All rights reserved.\n\nThis work is licensed under the terms of the MIT license.\nFor a copy, see \u003chttps://opensource.org/licenses/MIT\u003e.\n\nVarious snippets of information from the [SMS Power](https://www.smspower.org)\nwebsite have been reproduced in the source code comments.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrcook%2Fsmstilemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrcook%2Fsmstilemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrcook%2Fsmstilemap/lists"}