{"id":15661286,"url":"https://github.com/damieng/pixelworld","last_synced_at":"2025-10-14T07:42:39.197Z","repository":{"id":46502310,"uuid":"77297819","full_name":"damieng/pixelworld","owner":"damieng","description":"ZX Spectrum bitmap font tools.","archived":false,"fork":false,"pushed_at":"2025-10-05T07:01:39.000Z","size":295,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-13T01:41:23.530Z","etag":null,"topics":["atari-xl-computers","bbc-micro","bitmap-fonts","commodore-64","hacktoberfest","pixel-fonts","sinclair-zx-spectrum","vintage-computing"],"latest_commit_sha":null,"homepage":"","language":"C#","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/damieng.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":"2016-12-24T19:38:35.000Z","updated_at":"2025-10-06T13:08:56.000Z","dependencies_parsed_at":"2024-08-11T18:51:18.896Z","dependency_job_id":"1af648d9-7977-46e0-adbe-56f41ac78cdf","html_url":"https://github.com/damieng/pixelworld","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/damieng/pixelworld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fpixelworld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fpixelworld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fpixelworld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fpixelworld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damieng","download_url":"https://codeload.github.com/damieng/pixelworld/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damieng%2Fpixelworld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018217,"owners_count":26086308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["atari-xl-computers","bbc-micro","bitmap-fonts","commodore-64","hacktoberfest","pixel-fonts","sinclair-zx-spectrum","vintage-computing"],"created_at":"2024-10-03T13:26:50.297Z","updated_at":"2025-10-14T07:42:39.192Z","avatar_url":"https://github.com/damieng.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PixelWorld\n\nZX Spectrum font conversion, ripping and manipulation tool for 8x8 bitmap fonts.\n\nThis is a tool I have been using for a number of years to convert my own fonts into a variety of formats available from https://damieng.com/fonts/zx-origins/ \n\nIt also contains bulk-ripping `dump` and `hunt` commands for obtaining ZX Spectrum RAW 768 byte/.ch8 files from memory dumps and snapshots.\n\n## Commands\n\n### Ripping\n\n- `dump` to RAM-dump snapshot files (currently supports `.z80` and `.sna` and recurses through `.zip` archives)\n- `hunt` to look through RAM dumps for possible bitmap fonts (currently supports only ZX Spectrum fonts)\n- `screenshot` to create a screenshots from RAM-dumps or snapshot files (in PNG, SCR or animated GIF format)\n- `extracttiles` to create a files with unique 8x8 character tiles found on the screen in RAM-dumps or snapshot files\n\n### Conversions\n\nThe following commands work with ZX Spectrum RAW 768 byte/.ch8 files:\n\n- `preview` to create a `.png` preview file\n- `pngtozx` to convert a `.png` back to a ZX Spectrum `.ch8`\n- `c64tozx` to create a ZX Spectrum `.ch8` file from a C64 binary file\n\nAny of the following assembly generating commands can use the `--base hex|decimal` flags. The z80 one can also use `--base binary`.\n\n- `z80asm` to create Zilog Z80 assembler source with `defb` hex\n- `x86asm` to create Intel 8086 assembler source with `db` hex\n- `6502asm` to create MOS 6502 assembler source with `.byte` hex\n- `68000asm` to create Motorola 68000 assembler source with `DB.B` hex\n\nAnd the header-generating commands:\n\n- `chead` to generate C-compatible header files\n- `rusthead` to generate Rust-compatible header files\n\nYou can also generate directly-usable files (all binary except the CPC)\n\n- `zxtofzx` to create a fixed-width `.fzx` \n- `zxtofzx --proportional` to create a proportional `.fzx` by auto left aligning and measuring widths\n- `zxtocbm` to create `.c64` and `.bin` binary ROM versions for the Commodore 64\n- `zxtoa8` to create a `.fnt` binary version for the Atari 8-bit series\n- `zxtocpc` to create a `.bas` BASIC file for use with the Amstrad CPC range\n\n### Comparisons\n\n- `findmatches` to find glyphs from a source font in as many possible target .ch8 files\n\nAny command can be further detailed using the `--help` option which will detail the additional flags and options available.\n\n## Hunt strategies\n\nFinding bitmap fonts in a raw memory dump isn't trivial as there's no specific header however there are a few different strategies available in the code that can be combined and tweaked, they are:\n\n### [EnvironmentGuidedFinder](https://github.com/damieng/pixelworld/blob/main/Common/OffsetFinders/EnviromentGuidedFinder.cs)\n\nThis relies on programmers using the ROM routines to print text to the screen and is surprisingly successful. It basically looks for a font at whatever RAM location is specified at memory locations 23606 \u0026 23607. It can only find one font however so games like Millionaire that use several get missed.\n\n### [KnownCharPatternFinder](https://github.com/damieng/pixelworld/blob/main/Common/OffsetFinders/KnownCharPatternFinder.cs)\n\nThis looks for fonts based on well-known glyphs that designers rarely changed such as the copyright symbol and by using their known position in the font works out where the font is located.\n\n### [CandidatesInWindowFinder](https://github.com/damieng/pixelworld/blob/main/Common/OffsetFinders/CandidatesInWindowFinder.cs)\n\nThis provides an array of potential glyphs without any knowledge of what they actually are. It requires you pass a certain number of glyphs and looks to find a minimum amount of them in a sequence in RAM.\n\nThis works in conjunction with [SpectrumDisplay.GetCandidates](https://github.com/damieng/pixelworld/blob/main/Common/Display/SpectrumDisplay.cs#L69) to divide the current screen memory into as many unique 8x8 character blocks as it can. The principle here is that the font is probably used on-screen and is aligned to the usual (32x24) text grid.\n\n### [GeneralHeuristicFinder](https://github.com/damieng/pixelworld/blob/main/Common/OffsetFinders/GeneralHeuristicFinder.cs)\n\nThis finder looks for fonts by expecting certain pixel densities in relative to each other. For example ! should have less pixels than m. c should have less pixels than o etc.\n\n## Setup\n\nThe project should compile with VS 2019 or later.\n\nSome [template files are necessary for the conversions](https://github.com/damieng/pixelworld/discussions/14) and should have their location specified by the `--templatePath` parameter.\n\n- `atari8.fnt` - A dump of the Atari system font that includes all the symbols characters etc.\n- `c64-both.c64` - A dump of the Commodore 64 upper+lower case\n- `c64-upper.c64` - A dump of the Commodore 64 upper case + symbols\n\n## Example usage\n\nVarious different usages of this command can be fount in my [ZX Origins font-publishing script](https://gist.github.com/damieng/d2519cda1c674b4ede74f154f05f2431) - every reference there to `pw.exe` is this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamieng%2Fpixelworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamieng%2Fpixelworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamieng%2Fpixelworld/lists"}