Hejsil / pokemon-randomizer

A Pokémon Rom randomizer tool written in Zig
The Unlicense
13 stars 0 forks source link

The grand library plan #19

Open Hejsil opened 6 years ago

Hejsil commented 6 years ago

One of the main reasons for making the Pokémon randomizer from scratch, is that I'm not satisfied with the current tools available for both Pokémon rom hacking, but also more general rom hacking. I think the real problem is that there is no proper sharing of resources between tool developers. Most Pokémon hacking tools are closed source, and abandoned.

The projects that are open source are all hard-coded applications that were never designed as libraries. Things such as ndstool which have excessive global state in the same file as main, makes it pretty hostile to try linking against its functionality.

To make it worse information, about the rom's structure are scattered across forums, making it hard for anyone, not deeply involved in those, to get into making tools. I spend 5-6 hours finding information about the layout of Pokémon trainers and their party in Black/White.

So here is the grand plan for the randomizer.

Here is a list of the libraries planned to be extracted from this repository:

Other potential, but less important, libraries that might be extracted as well:

andrewrk commented 6 years ago

All these libraries should expose C interfaces, so they can be used across "all" languages.

This is an important use case of Zig that you might be the first one really exploring in an in-depth way. I'll pay close attention and try to be on top of any issue reports that come up blocking this goal.

I'm planning on doing the same thing for libsoundio.

Hopefully I'll have a nice zig package manager working for you when you want to make all your libraries available :)

Hejsil commented 6 years ago

A thing to note. devkitPro has a few libraries for the nds, gba and others. I've skimmed over them, and there are a few interesting ones.

libfat seems to be a low-level library for reading the file allocation table of different consoles (nds included). As far as I understand, this is meant to run on the platforms themselves, so I don't think there is an overlap between that, and what I'm doing.

libnds and libgba seems to be for interfacing with the nds/gba hardware. I should probably pick another name that libnds and libgba. libndsrom maybe?

Also relevant is the Getting Started/devkitARM.

I'll look more into devkitPro's tools later.