{"id":26052525,"url":"https://github.com/qalle2/cdl-summary","last_synced_at":"2025-07-05T01:41:07.217Z","repository":{"id":171908761,"uuid":"151026564","full_name":"qalle2/cdl-summary","owner":"qalle2","description":"Print an FCEUX Code/Data Logger file in human-readable format.","archived":false,"fork":false,"pushed_at":"2024-12-18T01:13:42.000Z","size":144,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T20:12:35.734Z","etag":null,"topics":["command-line","fceux","nes","python3","reverse-engineering","rom-hacking"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qalle2.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":"2018-10-01T02:15:15.000Z","updated_at":"2024-12-18T01:13:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"6578ce48-c386-48e2-88cd-0362b78fd6f2","html_url":"https://github.com/qalle2/cdl-summary","commit_stats":null,"previous_names":["qalle2/cdl-summary"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qalle2%2Fcdl-summary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qalle2%2Fcdl-summary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qalle2%2Fcdl-summary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qalle2%2Fcdl-summary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qalle2","download_url":"https://codeload.github.com/qalle2/cdl-summary/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248313665,"owners_count":21082895,"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":["command-line","fceux","nes","python3","reverse-engineering","rom-hacking"],"created_at":"2025-03-08T06:40:51.268Z","updated_at":"2025-07-05T01:41:07.196Z","avatar_url":"https://github.com/qalle2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cdl-summary\n*Note: This project has been moved to [Codeberg](https://codeberg.org/qalle/nes-cdl-summary). This version will no longer be updated.*\n\nTable of contents:\n* [cdl_summary.py](#cdl_summarypy)\n* [cdl2png.py](#cdl2pngpy)\n* [Sample CDL files](#sample-cdl-files)\n\n## cdl_summary.py\nPrint an FCEUX Code/Data Logger file (.cdl) in human-readable format.\n\nCommand line arguments: *Options* *InputFile*\n\n*Options*:\n* `-r N` or `--prg-size N`: The PRG ROM size of the input file:\n  * `N` is the size in kilobytes. It must be 16 to 4096 and a multiple of 16. It is usually a power of two (16, 32, 64, \u0026hellip;).\n  * This option is required.\n* `-p PART` or `--part PART`: Which part to read from the input file. `PART` must be one of:\n  * `p` = PRG ROM. This is the default.\n  * `c` = CHR ROM.\n* `-b N` or `--bank-size N`: The size of the PRG/CHR ROM banks in kilobytes:\n  * For PRG ROM, `N` must be 8, 16 or 32. Default: 16 for 16-KiB PRG ROM, otherwise 32.\n  * For CHR ROM, `N` must be 1, 2, 4 or 8. Default: 8.\n* `-o N` or `--origin N`: The CPU/PPU address each PRG/CHR ROM bank starts from, in kilobytes:\n  * For PRG ROM, `N` must be 32, 40, 48 or 56 (for addresses 0x8000, 0xa000, 0xc000 or 0xe000, respectively) but not greater than 64 minus `--bank-size`. The default is the greatest value possible.\n  * For CHR ROM, `N` must be 0 to 7 but not greater than 8 minus `--bank-size`. The default is 0.\n* `--ignore-access-method`: Ignore how PRG ROM bytes are accessed (directly, indirectly or as PCM audio).\n* `-f FORMAT` or `--output-format FORMAT`: How to print the results. `FORMAT` must be one of:\n  * `c` = CSV (fields separated by commas, all numbers in decimal, strings quoted). This is the default.\n  * `t` = tabular (constant-width fields, all numbers in hexadecimal).\n* `-h` or `--help`: Print a shorter version of this help and exit.\n\n*InputFile*: The `.cdl` file to read. The size must be 16 to 6136 kilobytes and a multiple of 8 kilobytes.\n\n### Examples\n\nPRG ROM \u0026ndash; CSV output:\n```\n$ python3 cdl_summary.py --prg-size 16 --bank-size 16 cdl/gamegenie.cdl\n\"ROM address\",\"bank\",\"offset in bank\",\"NES address\",\"CDL byte repeat count\",\n\"CDL byte\",\"CDL byte description\"\n0,0,0,49152,13,2,\"data\"\n13,0,13,49165,12275,0,\"unaccessed\"\n12288,0,12288,61440,41,9,\"code\"\n12329,0,12329,61481,1,11,\"code, data\"\n12330,0,12330,61482,228,9,\"code\"\n12558,0,12558,61710,1,11,\"code, data\"\n12559,0,12559,61711,107,9,\"code\"\n12666,0,12666,61818,1,11,\"code, data\"\n12667,0,12667,61819,62,9,\"code\"\n12729,0,12729,61881,1,11,\"code, data\"\n12730,0,12730,61882,140,9,\"code\"\n12870,0,12870,62022,2,0,\"unaccessed\"\n12872,0,12872,62024,19,9,\"code\"\n12891,0,12891,62043,1,11,\"code, data\"\n(snip)\n```\n\nPRG ROM \u0026ndash; tabular output:\n```\n$ python3 cdl_summary.py --prg-size 16 --bank-size 16 --output-format t\ncdl/gamegenie.cdl\nROM address, bank, offset in bank, NES address, CDL byte repeat count, CDL\nbyte, CDL byte description (all numbers in hexadecimal):\n000000 00 0000 c000 000d 02 data\n00000d 00 000d c00d 2ff3 00 unaccessed\n003000 00 3000 f000 0029 09 code\n003029 00 3029 f029 0001 0b code, data\n00302a 00 302a f02a 00e4 09 code\n00310e 00 310e f10e 0001 0b code, data\n00310f 00 310f f10f 006b 09 code\n00317a 00 317a f17a 0001 0b code, data\n00317b 00 317b f17b 003e 09 code\n0031b9 00 31b9 f1b9 0001 0b code, data\n0031ba 00 31ba f1ba 008c 09 code\n003246 00 3246 f246 0002 00 unaccessed\n003248 00 3248 f248 0013 09 code\n00325b 00 325b f25b 0001 0b code, data\n(snip)\n```\n\n## cdl2png.py\nConvert an FCEUX Code/Data Logger file (.cdl) into an image file. Requires [Pillow](https://python-pillow.org).\n\nCommand line arguments: *InputFile* *OutputFile*:\n* *InputFile*: The `.cdl` file to read.\n* *OutputFile*: The PNG image file to write.\n\nEach pixel in the output file corresponds to a byte in the CDL data. Colors:\n* black = unaccessed\n* orange = code (for PRG ROM) or rendered (for CHR ROM)\n* blue = data (for PRG ROM) or read programmatically (for CHR ROM)\n* white = both orange and blue.\n\nAn example from *Super Mario Bros.* by Nintendo:\n\n![a CDL file as a PNG file](cdl2png-example.png)\n\nThere are more examples under `cdl/`.\n\n## Sample CDL files\nThere are some CDL files under `cdl/`.\n\nPercentage of unlogged bytes (lower is better):\n* `blastermaster-u.cdl`: 19%\n* `daysofthunder-u.cdl`: 9%\n* `drmario-ju-prg0.cdl`: 14%\n* `drmario-ju-prg1.cdl`: 18%\n* `excitebike-ju.cdl`: 6%\n* `gamegenie.cdl`: 82%\n* `golf-u.cdl`: 3%\n* `lunarpool-u.cdl`: 14%\n* `smb1-w.cdl`: 1%\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqalle2%2Fcdl-summary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqalle2%2Fcdl-summary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqalle2%2Fcdl-summary/lists"}