Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a separate repo for helper scripts? #1145

Closed
Rangi42 opened this issue Oct 7, 2024 · 11 comments
Closed

Make a separate repo for helper scripts? #1145

Rangi42 opened this issue Oct 7, 2024 · 11 comments
Labels

Comments

@Rangi42
Copy link
Member

Rangi42 commented Oct 7, 2024

The tools/ folder is partly for tools necessary to build pokecrystal, which are all written in C. But it also contains various Python scripts that do little potentially-useful things, like removing duplicate tiles from an image, identifying duplicate frames in a Pokemon animation, fixing indexed palettes, adding address comments to assembly labels, etc.

I see a few problems with this status quo. Scripts get copied across all four repos (crystal, gold, red, yellow), since they're generally applicable. Updates to one need to get made everywhere, and sometimes get out of sync. Some repos just don't even have all the scripts. And they sort of clutter the directory and make it harder to see how few tools are actually needed. Plus some scripts aren't even really applicable, e.g. toc.py is more for the wiki than the actual code.

I'd like to make a separate "pokeasmtools" repo for these scripts. That way, it could have more dedicated documentation/explanation for each one, including INSTALL.md instructions on how to set up Python (which is irrelevant to building the actual ROMs).

Thoughts? @dannye @mid-kid @vulcandth (if anyone likes this suggestion but wants to bikeshed the repo name, feel free.)

@Rangi42 Rangi42 added the tools label Oct 7, 2024
@aaaaaa123456789
Copy link
Contributor

Seems like a good idea to me!

@dannye
Copy link
Member

dannye commented Oct 7, 2024

Sounds fine to me. What about the non-essential non-python scripts? Like free_space.awk. And compare.sh has always bothered me (and compare2.sh??).

And is bpp2png.c actually necessary? Does it do anything that rgbgfx can't do? If it's not needed, then it maybe looks like lodepng isn't needed either.

I'd be in favor of removing anything that isn't strictly needed for building.

@Rangi42
Copy link
Member Author

Rangi42 commented Oct 7, 2024

Yes, the .awk and .sh scripts would also be moved/consolidated. None of them are necessary for makeing the repos, and they're generally applicable to all disassemblies.

bpp2png.c was created before rgbgfx could reverse-convert images. I'll move or get rid of it once rgbds 0.9.0 releases with a lot of rgbgfx bugfixes.

@mid-kid
Copy link
Member

mid-kid commented Oct 7, 2024

This sounds ok to me. The only advantage to the current setup is that the tools will be more easily backed up if the repos get struck, but it's not a huge advantage either.

@Rangi42
Copy link
Member Author

Rangi42 commented Oct 7, 2024

Sounds like it's time for pokemon-reverse-engineering-tools then! :3

@Rangi42
Copy link
Member Author

Rangi42 commented Oct 7, 2024

Alright, https://github.com/pret/pokemon-asm-tools exists! It could use more documentation; see pret/gb-asm-tools#1.

@Rangi42 Rangi42 closed this as completed Oct 7, 2024
@Rangi42
Copy link
Member Author

Rangi42 commented Oct 9, 2024

(I renamed this to gb-asm-tools since the scripts are useful for GB/GBC projects in general, and to reduce its ties to that trademark.)

@kanzure
Copy link
Member

kanzure commented Oct 9, 2024

This is how it was 10 years ago, but it was changed for reasons I don't remember. We used a git submodule to share tools. There was pokemon-reverse-engineering-tools.git etc.

@aaaaaa123456789
Copy link
Contributor

Basically because submodules suck and are confusing. People kept cloning the repo without submodules, etc.

@kanzure
Copy link
Member

kanzure commented Oct 9, 2024

@dannye
Copy link
Member

dannye commented Oct 9, 2024

The difference now is that the old submodule was primarily for rom-data-dumping tools, which are now pretty much entirely irrelevant, whereas the new gb-asm-tools is for useful optional utilities for (users of) the disassembly projects themselves.

The main goal/advantage of ditching the submodule is still valid -- tools required to build the project are still directly in the repo, not a separate repo/submodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants