{"id":38236377,"url":"https://github.com/hansbonini/tombatools","last_synced_at":"2026-01-17T01:06:06.450Z","repository":{"id":307817986,"uuid":"1030482912","full_name":"hansbonini/tombatools","owner":"hansbonini","description":"A collection of utilities for extracting and modifying game files from Tomba! (Ore! Tomba) for PlayStation.","archived":false,"fork":false,"pushed_at":"2025-08-10T01:32:00.000Z","size":337,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T03:21:10.395Z","etag":null,"topics":["psx","romhack","tomba","tools","translation"],"latest_commit_sha":null,"homepage":"http://hansbonini.com.br/tombatools/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hansbonini.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,"zenodo":null}},"created_at":"2025-08-01T18:05:14.000Z","updated_at":"2025-08-10T01:32:03.000Z","dependencies_parsed_at":"2025-08-02T12:45:19.016Z","dependency_job_id":null,"html_url":"https://github.com/hansbonini/tombatools","commit_stats":null,"previous_names":["hansbonini/tombatools"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hansbonini/tombatools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansbonini%2Ftombatools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansbonini%2Ftombatools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansbonini%2Ftombatools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansbonini%2Ftombatools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansbonini","download_url":"https://codeload.github.com/hansbonini/tombatools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansbonini%2Ftombatools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"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":["psx","romhack","tomba","tools","translation"],"created_at":"2026-01-17T01:06:04.114Z","updated_at":"2026-01-17T01:06:06.430Z","avatar_url":"https://github.com/hansbonini.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TombaTools\n\n[![CI/CD](https://github.com/hansbonini/tombatools/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/hansbonini/tombatools/actions/workflows/ci-cd.yml)\n[![Security](https://github.com/hansbonini/tombatools/actions/workflows/security.yml/badge.svg)](https://github.com/hansbonini/tombatools/actions/workflows/security.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hansbonini/tombatools)](https://goreportcard.com/report/github.com/hansbonini/tombatools)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA collection of utilities for extracting and modifying game files from **Tomba!** (Ore no Tomba) for PlayStation.\n\nCurrently supports WFM font files and GAM game data files with full extraction, modification, and recreation capabilities.\n\n## Features\n\n- **WFM Font File Processing**: Extract and modify font glyphs and dialogue text\n- **GAM File Processing**: Extract and compress game data using custom LZ algorithm\n- **4bpp PSX Graphics**: Native support for PlayStation 4bpp linear little endian format\n- **YAML Export/Import**: Human-readable dialogue editing\n- **PNG Glyph Export**: Individual character extraction as PNG images\n\n## Installation\n\n### Download Pre-built Binaries\n\nDownload the latest release for your platform from the [Releases page](https://github.com/hansbonini/tombatools/releases):\n\n- **Windows**: `tombatools_windows_amd64.zip`\n- **Linux**: `tombatools_linux_amd64.tar.gz` or `tombatools_linux_arm64.tar.gz`\n- **macOS**: `tombatools_darwin_amd64.tar.gz` (Intel) or `tombatools_darwin_arm64.tar.gz` (Apple Silicon)\n\n### Build from Source\n\n#### Prerequisites\n- Go 1.21 or later\n\n#### Clone and Build\n```bash\ngit clone https://github.com/hansbonini/tombatools.git\ncd tombatools\nmake build\n# or\ngo build -o tombatools\n```\n\n#### Development Tools\n```bash\n# Install development dependencies\nmake install\n\n# Install linting and security tools\nmake tools\n```\n\n## Usage\n\n### WFM Font Files\n\n#### Extract (Decode)\nExtract glyphs and dialogues from a WFM file:\n```bash\ntombatools wfm decode CFNT999H.WFM ./output/\n```\n\nThis creates:\n- `glyphs/` - Individual PNG files for each character\n- `dialogues.yaml` - Editable dialogue text in YAML format\n\n#### Create (Encode)\nCreate a new WFM file from edited dialogues:\n```bash\ntombatools wfm encode dialogues.yaml CFNT999H_modified.WFM\n```\n\n#### Verbose Output\nUse `-v` flag for detailed processing information:\n```bash\ntombatools wfm decode -v CFNT999H.WFM ./output/\ntombatools wfm encode -v dialogues.yaml output.WFM\n```\n\n### GAM Files\n\nGAM files contain compressed game data using a custom LZ compression algorithm.\n\n#### Extract (Unpack)\nExtract and decompress data from a GAM file:\n```bash\ntombatools gam unpack GAME.GAM data.UNGAM\n```\n\nThis creates a decompressed `.UNGAM` file containing the raw game data.\n\n#### Create (Pack)\nCompress data back into a GAM file:\n```bash\ntombatools gam pack data.UNGAM GAME_modified.GAM\n```\n\n#### Verbose Output\nUse `-v` flag for detailed compression/decompression information:\n```bash\ntombatools gam unpack -v GAME.GAM data.UNGAM\ntombatools gam pack -v data.UNGAM output.GAM\n```\n\n## Development\n\n### Available Make Targets\n\n```bash\nmake help      # Show available commands\nmake build     # Build for current platform\nmake test      # Run tests with coverage\nmake lint      # Run code linters\nmake release   # Build for all platforms\nmake security  # Run security scans\nmake clean     # Clean build artifacts\n```\n\n### Running Tests\n\n```bash\n# Run all tests\nmake test\n\n# Run specific package tests\ngo test ./pkg/...\n\n# Run with verbose output\ngo test -v ./...\n```\n\n### Code Quality\n\nThis project uses:\n- **golangci-lint** for code linting\n- **gosec** for security scanning  \n- **GitHub Actions** for CI/CD\n- **Dependabot** for dependency updates\n\n### Example Workflow\n\n#### WFM Files (Fonts and Dialogues)\n\n1. **Extract original WFM file:**\n   ```bash\n   tombatools wfm decode CFNT999H.WFM ./extracted/\n   ```\n\n2. **Edit dialogues:**\n   - Open `extracted/dialogues.yaml` in a text editor\n   - Modify the `text` fields under dialogue entries\n   - Save the file\n\n3. **Create modified WFM:**\n   ```bash\n   tombatools wfm encode extracted/dialogues.yaml CFNT999H_translated.WFM\n   ```\n\n#### GAM Files (Game Data)\n\n1. **Extract original GAM file:**\n   ```bash\n   tombatools gam unpack GAME.GAM extracted_data.UNGAM\n   ```\n\n2. **Modify data:**\n   - Edit the extracted `.UNGAM` file with a hex editor or custom tools\n   - Make your desired changes to the game data\n\n3. **Create modified GAM:**\n   ```bash\n   tombatools gam pack extracted_data.UNGAM GAME_modified.GAM\n   ```\n\n## File Formats\n\n### WFM Files\nWFM (WFM3) files contain:\n- **Font glyphs**: 4bpp PSX format character graphics\n- **Dialogue data**: Text with control codes for display\n- **Palettes**: Color lookup tables (CLUT) for rendering\n\n### GAM Files\nGAM files contain:\n- **8-byte header**: Magic \"GAM\" + padding + uncompressed size (little-endian)\n- **Compressed data**: Game data compressed using custom LZ algorithm\n- **LZ compression**: Bitmask-based algorithm with literal bytes and back-references\n\n### Supported Dialogue Control Codes\n- `[INIT TEXT BOX]` - Initialize dialogue box with dimensions\n- `[NEWLINE]` - Line break\n- `[WAIT FOR INPUT]` - Pause for user input\n- `[HALT]` - End dialogue\n- `[CHANGE COLOR TO]` - Change text color\n- And more...\n\n## Technical Details\n\n### PSX Graphics Support\n- Native 4bpp linear little endian processing\n- Automatic palette selection (Dialogue/Event CLUT)\n- PSX 15-bit color format conversion\n\n### Font Heights\n- **8px**: Menu and UI text (DialogueClut)\n- **16px**: Standard dialogue text (DialogueClut) \n- **24px**: Event and emphasis text (EventClut)\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Tomba! game by Whoopee Camp\n- PlayStation technical documentation community\n- Go image processing libraries\n\n---\n\n**Note**: This tool is for educational and preservation purposes. Respect copyright laws and game developer rights.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansbonini%2Ftombatools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansbonini%2Ftombatools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansbonini%2Ftombatools/lists"}