{"id":17059519,"url":"https://github.com/trapexit/3it","last_synced_at":"2025-03-22T17:31:26.269Z","repository":{"id":54476241,"uuid":"458883019","full_name":"trapexit/3it","owner":"trapexit","description":"An all in one 3DO image conversion tool","archived":false,"fork":false,"pushed_at":"2025-02-17T20:58:09.000Z","size":1209,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T13:51:18.286Z","etag":null,"topics":["3do","retrodev","retrogaming"],"latest_commit_sha":null,"homepage":"","language":"C++","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/trapexit.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":"2022-02-13T17:38:00.000Z","updated_at":"2025-02-17T20:41:24.000Z","dependencies_parsed_at":"2023-10-01T22:34:07.410Z","dependency_job_id":"4e019390-29f5-4a30-bc57-7788b0f6b8ba","html_url":"https://github.com/trapexit/3it","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapexit%2F3it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapexit%2F3it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapexit%2F3it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapexit%2F3it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapexit","download_url":"https://codeload.github.com/trapexit/3it/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244995187,"owners_count":20544301,"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","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":["3do","retrodev","retrogaming"],"created_at":"2024-10-14T10:34:37.843Z","updated_at":"2025-03-22T17:31:26.252Z","avatar_url":"https://github.com/trapexit.png","language":"C++","readme":"# 3it: 3DO Image Tool\n\nAn all purpose 3DO image conversion tool. Can convert to and from JPEG, PNG,\nBMP, 3DO CEL, 3DO Banner, 3DO ANIM, 3DO IMAG, NFS 3SH, and NFS wwww formats.\nSupports coded and uncoded, packed and unpacked, linear and lrform CELs.\n\n\n## Usage\n\n```\n$ 3it --help\n3it: 3DO Image Tool\nUsage: 3it [OPTIONS] SUBCOMMAND\n\nOptions:\n  -h,--help                   Print this help message and exit\n    --help-all\n\nSubcommands:\n  info                        prints info about the file\n  to-cel                      convert image to CEL\n  to-banner                   convert image to banner\n  to-imag                     convert image to IMAG\n  to-lrform                   convert image to raw LRFORM\n  to-nfs-shpm                 convert image to NFS SHPM\n  to-bmp                      convert image to BMP\n  to-png                      convert image to PNG\n  to-jpg                      convert image to JPG\n  list-chunks                 list 3DO file chunks\n  dump-packed-instructions, dpi\n                              print out a packed CEL's instruction list\n  version                     print 3it version\n  docs                        print links to relevant documentation\n\n$ 3it to-cel --help\n...\n```\n\nAll subcommands have their own help and arguments. Use `--help` or\n`--help-all` to see all available options.\n\n\n## Notes\n\n* All images are first converted to RGBA8888 before converting to the\n  target format.\n* No dithering is done by 3it when reducing bit depth.\n* VDLP is not considered at all. The assumption is that the fixed,\n  default CLUT is used. IE a linear dark to light gradiant.\n* When converting to coded (paletted) formats the number of colors\n  will be checked. The transparent color is not included.\n* The 3DO CEL renderer has many features. A good number of them are\n  rarely used. As such 3it does not support all permutations of\n  options when converting to or from supported formats. If an image\n  looks wrong please file a\n  [ticket](https://github.com/trapexit/3it/issues) and include as much\n  information as you can including program arguments and the original\n  source file.\n\n\n## File Types\n\n### LRFORM\n\nIt is common to use IMAG files as a background that is used to clear\nthe screen between screen updates by leveraging SPORT VRAM -\u003e VRAM\ncopying. However, due to alignment requirements and needing to read\ndata off of a CDROM the `LoadImage()` function utilizes more resources\nthan needed. Especially given LoadImage were never expanded to support\nanything but 320x240 @ 16bpp LRFORM images.\n\nHaving a raw LRFORM file allows the user to load it using\nLoadFile and saves on resources. See [LoadImage's\ncode](https://github.com/trapexit/portfolio_os/blob/master/src/libs/lib3DO/DisplayUtils/LoadImage.c)\nfor more details.\n\n\n```C\nint memflags;\nint filesize;\nchar *image;\nchar *filename = \"image.lrform\";\n\nmemflags = (MEMTYPE_TRACKSIZE|MEMTYPE_STARTPAGE|MEMTYPE_VRAM);\nimage    = LoadFile(filename,\u0026filesize,memflags);\n```\n\n## Output Filename Templates\n\nAny command with an `--output-path` option supports templating to make\nscripting easier. It uses a currly brace notation such as\n`{foo}`. Below is a list of supported values per subcommand.\n\nAll support:\n\n* {filepath}: Full original input filepath.\n* {dirpath}: Parent path of {filepath} if it has one. \".\" otherwise.\n* {filename}: Just the filename without dirpath or extension.\n* {origext}: The original filepath's extension. Includes prefixed '.'.\n* {ext}: The standard extension for the target file.\n* {_name}: If supported by the input the internal name for the\n  image. Prefixed with \"_\". Otherwise \"\".\n* {index}: The index of the image if the input had multiple images.\n* {_index}: The index prefixed with \"_\" if input had multiple\n  images. Otherwise \"\".\n* {w}: Width of the output image.\n* {h}: Height of the output image.\n\n### to-cel\n\n* {coded}: \"coded\" if coded else \"uncoded\".\n* {packed}: \"packed\" if packed else \"unpacked\".\n* {lrform}: \"lrform\" if lrform else \"linear\".\n* {_lrform}: \"_lrform\" if lrform otherwise \"\".\n* {bpp}: The CEL bits per pixel.\n* {flags}: CCB flags in hex.\n* {pixc}: CCB PIXC/PPMPC in hex.\n* {rotation}: \"0\", \"90\", \"180\", or \"270\"\n\n\n### to-banner\n\n* {bpp}: Always 16.\n\n\n### Others\n\nNo extras.\n\n\n## TODO\n\n* dump APPSCRN from ISO\n* dump-chunks\n* concat-chunks\n* to ANIM\n* ability to write text chunks\n* figure out NFS HSPT chunk\n* ability to write NFS wwww files\n* Other game formats\n\n\n## Documentation\n\n* https://3dodev.com\n* https://3dodev.com/documentation/file_formats\n* https://3dodev.com/documentation/development/opera/pf25/ppgfldr/ggsfldr/gpgfldr/3gpg\n* https://3dodev.com/documentation/development/opera/pf25/ppgfldr/ggsfldr/gpgfldr/5gpg\n* https://3dodev.com/documentation/development/opera/pf25/ppgfldr/ggsfldr/gpgfldr/00gpg1\n\n\n## Other Links\n\n* 3DO Dev Repo: https://3dodev.com\n* 3DO Disc Tool: https://github.com/trapexit/3dt\n* 'Modern' 3DO DevKit: https://github.com/trapexit/3do-devkit\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapexit%2F3it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapexit%2F3it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapexit%2F3it/lists"}