{"id":16703468,"url":"https://github.com/mtardy/bytestones","last_synced_at":"2025-09-02T13:05:19.755Z","repository":{"id":115690659,"uuid":"354401666","full_name":"mtardy/bytesToNES","owner":"mtardy","description":"Converts bytes from the standard input to NES controller input string","archived":false,"fork":false,"pushed_at":"2021-04-03T21:52:44.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T08:22:49.242Z","etag":null,"topics":["bizhawk","fceux","nes"],"latest_commit_sha":null,"homepage":"https://mtardy.com/posts/mario-injection/","language":"Python","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/mtardy.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-04-03T21:52:06.000Z","updated_at":"2022-04-17T11:40:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"6488e810-64b7-4301-9abe-2889739cf51e","html_url":"https://github.com/mtardy/bytesToNES","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mtardy/bytesToNES","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2FbytesToNES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2FbytesToNES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2FbytesToNES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2FbytesToNES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtardy","download_url":"https://codeload.github.com/mtardy/bytesToNES/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2FbytesToNES/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273287681,"owners_count":25078575,"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-09-02T02:00:09.530Z","response_time":77,"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":["bizhawk","fceux","nes"],"created_at":"2024-10-12T19:08:26.045Z","updated_at":"2025-09-02T13:05:19.732Z","avatar_url":"https://github.com/mtardy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BytesToNES\n\nBytesToNES is a little python script that converts bytes from the standard input to NES controller input string. It supports [NES native coding](https://wiki.nesdev.com/w/index.php/Controller_reading_code) format and the input movie format for [BizHawk](https://github.com/TASVideos/BizHawk) and [FCEUX](http://fceux.com/).\n\n## Installation\n\nJust clone the github repository and have a working python 3 installation\n```bash\ngit clone https://github.com/mtardy/bytesToNES\n```\n\n## Usage\n\nFor usage information, please see `./bytesToNES.py -h`\n```\nusage: bytesToNES.py [-h] [-d] [-f {bk2,fm2}] [-v] [-b BYTE]\n\nConverts bytes to NES controller strings, see '-d' for information on the format.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d, --doc             display documentation on the NES controller string format and exit\n  -f {bk2,fm2}, --format {bk2,fm2}\n                        change the format of output\n  -v, --verbose         verbose human readable output, line is red if the controller combinaison is impossible a priori\n  -b BYTE, --byte BYTE  input one byte to convert\n```\n\n## About\n\nWe worked on arbitrary code injection in video games based on [Lord Tom's NES Super Mario Bros. 3 \"Total Control\" in 08:16.23](http://tasvideos.org/4961S.html) exploit.\nWe injected bytes in the game using the controller input so we needed a tool to convert our assembled binary code from regular bytes to controller input strings.\n\nIn our project, we injected stuff in Super Mario Bros 3 and we noticed that the controller driver filters \"illegal\" inputs such as pressing up and down or left and right simultaneously.\nUsing the `--verbose` (or just `-v`) option, you can spot \"illegal\" inputs displayed in red.\nTypically, you can write your assembly and pipe the output of the assembler to the converter then by trial and error, fix the illegal entries.\nA good idea, in that specific situation, is to begin by writing a new driver that accept any input to be more relaxed!\n\n## Contributing\n\nYou can extend the supported format by modifying the `formatter` function, you just have to provide a template, the buttons order to respect and the separator character.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtardy%2Fbytestones","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtardy%2Fbytestones","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtardy%2Fbytestones/lists"}