{"id":17196852,"url":"https://github.com/vulcandth/poke-cia","last_synced_at":"2026-01-06T00:07:04.260Z","repository":{"id":42056354,"uuid":"474525110","full_name":"vulcandth/poke-cia","owner":"vulcandth","description":"CIA building extension for pret Pokemon Gen I / II Repos","archived":false,"fork":false,"pushed_at":"2023-08-09T12:46:44.000Z","size":30,"stargazers_count":10,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T07:30:28.538Z","etag":null,"topics":["3ds","3ds-homebrew","gameboy","gameboy-color","pokemon","romhack"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vulcandth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-27T03:30:53.000Z","updated_at":"2024-12-03T17:56:04.000Z","dependencies_parsed_at":"2025-01-30T07:27:02.834Z","dependency_job_id":"12b10b2f-bbe0-4adb-b7db-d3ec5002d16f","html_url":"https://github.com/vulcandth/poke-cia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcandth%2Fpoke-cia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcandth%2Fpoke-cia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcandth%2Fpoke-cia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcandth%2Fpoke-cia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vulcandth","download_url":"https://codeload.github.com/vulcandth/poke-cia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245423253,"owners_count":20612749,"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":["3ds","3ds-homebrew","gameboy","gameboy-color","pokemon","romhack"],"created_at":"2024-10-15T01:54:41.675Z","updated_at":"2026-01-06T00:07:04.230Z","avatar_url":"https://github.com/vulcandth.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CIA building extension for pret Pokémon Gen I / II Repos\n\nThis repo provides a simple extension that repackages a Nintendo 3DS Virtual Console (VC) `.cia` file using the built `.gbc`(s) and `.patch`(s) generated from the pret Pokémon Gen I / II repos. This will simplify building the VC `.cia` for your ROM Hack down to something as simple as typing `make`.\n\n## Requirements\n\n* The hack's source repository. It must be based on a recent enough version of the original disassembly, so that it supports building Virtual Console patches:\n  \n  | **Disassembly**                                    | **This commit or later**                                                                       |\n  | -------------------------------------------------- | ---------------------------------------------------------------------------------------------- |\n  | [pokered](https://github.com/pret/pokered)         | [fe8d3c5](https://github.com/pret/pokered/commit/fe8d3c51a4056f0dd61dbef332ad9e714b82089a)     |\n  | [pokeyellow](https://github.com/pret/pokeyellow)   | [fbaa5c9](https://github.com/pret/pokeyellow/commit/fbaa5c9d4b48c000a52860a8392fc423c4e312f9)  |\n  | [pokegold](https://github.com/pret/pokegold)       | [3d58fb9](https://github.com/pret/pokegold/commit/3d58fb95569be74c6c229118a425fa22628f1dc3)    |\n  | [pokecrystal](https://github.com/pret/pokecrystal) | [31c3c94](https://github.com/pret/pokecrystal/commit/31c3c94d64e1ac1e40c95acfda7de8b99b4f302b) |\n\n* An original (encrypted or decrypted) `.cia` file for each version that you want to produce—see further below.\n\n* [ctrtool](https://github.com/3DSGuy/Project_CTR) ctrtool v1.1.0 or later.\n\n* [makerom](https://github.com/3DSGuy/Project_CTR) makerom v0.18 or later.\n\n* `seeddb.bin`. It can be obtained [from this link](https://github.com/ihaveamac/3DS-rom-tools/raw/master/seeddb/seeddb.bin).\n\nObtaining the **original** `.cia` file dump is outside of the scope of this document. It can be legally obtained by extracting it from your console through tools such as GodMode9 and/or FunkyCIA.\n\n## Installation\n\nFirst, [clone this repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository), and `cd` into it.\n\nNext, you will need to create your `config.mk` by copying from `config.mk.template`.\n\n```console\n$ cp config.mk.template config.mk\n```\n\nModify this new `config.mk` file using a text editor of your choice.\n\n- Define `rom_names` to match the name of the ROM you want to build the `.cia` from, without the file extension.\n  For example, for Pokémon Crystal, you can uncomment one of the example lines:\n  \n  ```makefile\n  rom_names := pokecrystal11\n  ```\n  \n  (There should not be more than one uncommented line at a given time.)\n  If you want to build multiple .cia files at once,\n  Simply write a space-separated list of names instead:\n  \n  ```makefile\n  rom_names := magenta turquoise\n  ```\n\n- In the same file, set the repo_path variable to point to the repository containing the ROMs. Note: The default repo_path assumes you're cloning into the ROM's repository.\n  \n  ```makefile\n  repo_path := ../\n  ```\n  \n  (Relative paths must be relative to the `poke-cia` directory. `../` means the directory above the poke-cia directory.)\n  \n- Finally, in that same file, set the rom_targets variable. Poke-cia uses this to run the appropriate make command build targets based on the repo_path variable.\n\n  ```makefile\n  repo_targets := red red_vc blue blue_vc\n  ```\n\nCopy and rename your original dumped .cia files to `\u003cbuild_name\u003e.orig.cia`, where `\u003cbuild_name\u003e` is one of the names you put in `rom_names`.\nFor example, for Pokémon Crystal, it should be `pokecrystal11.orig.cia`.\n\nFinally, place your obtained `seeddb.bin` file inside your `poke-cia` directory.\n\n## Usage\n\nNow, you can run `make` and be on your merry way!\nThe new `.cia` files will be generated in the same directory.\nBoth `makerom` and `ctrtool` must either be in your PATH, or you can pass the paths as arguments; for example:\n\n```console\n$ make MAKEROM=../ctrtool-v1.0.1/makerom/makerom CTRTOOL=../ctrtool-v1.0.1/ctrtool/bin/ctrtool\n```\n\nIt is also possible to specify these variables in `config.mk` instead, which saves the trouble of re-typing them every time.\n\nThe following is a list of notable poke-cia commands:\n\n`make extract`: Extracts the .orig.cia files without rebuilding them into a .cia. Useful for manual updates. Run make afterwards to complete the build.\n\n`make tidy`: Removes any built `.cia`, `.cxi`, or `cfa` files in the poke-cia repo.\n\n`make repotidy`: Performs the same function as `make tidy` above, but also instructs the rom's repo to run its version of `make tidy`.\n\n`make clean`: Performs the same function as `make tidy`, but also deletes the extracted rom directories in the poke-cia repo.\n\n`make repoclean`: Performs the same function as `make clean` above, but also instructs the rom's repo to run its own version of `make clean`. \n\n### MBC30 Patching\n\nFor ROM hacks that necessitate 4MB MBC30 ROM support:\n\n- **Configuration**: Utilize the `build_mbc30` option. \n  - **Default Setting**: `false`.\n  - **Action When Enabled**: Upon activation, the script `mbc30patch.py` is triggered post the extraction of `.orig.cia` files. This script modifies the `code.bin` to permit MBC30 ROMs to accommodate `$ff` banks, as opposed to the standard `$7f`. However, this change is conditional: the `code.bin` must correspond to the hash of an authentic `.cia` `code.bin`.\n  \n- **Supported Versions**: Currently, the supported `code.bin` files are based on specific original `.cia` versions. As we identify the correct addresses for patching, more versions will be incorporated.\n  - `Pokémon Crystal (CTR-N-QBRA) (UE) (v0.1.0)`:\n    - Hash: `d48acf4c062884c9ef6b546c573db2125f5f9253`\n\n## Special Credits\n\nI would like to give special credits to the following:\n\n* [@mid-kid](https://github.com/mid-kid) originally came up with the idea of this tool, and this extension is developed based on his original repo.\n* [@ISSOtm](https://github.com/ISSOtm) contributed significantly by restructuring the extension and preparing it for release.\n* [@jakcron](https://github.com/jakcron) went above and beyond by troubleshooting our repository to address a bug in the prerequisite tool, ctrtool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvulcandth%2Fpoke-cia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvulcandth%2Fpoke-cia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvulcandth%2Fpoke-cia/lists"}