Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Emulation & ROM Hacking

Pokelib: javascript library to get contents of ROM and RAM of English R/B - Page 1

Pokelib: javascript library to get contents of ROM and RAM of English R/B

Posted by: Stackout
Date: 2014-06-26 08:34:35
I didn't make this, but I just found it, it uses a javascript emulator and it looks quite interesting:

https://github.com/arcanis/pokelib

It allows viewing of all 256 valid and invalid items and Pokémon, but only valid moves right now (probably because the PDS (Pokémon Data String, unofficial name of R/B strings) to UTF-8 converter chokes on Super Glitch).

What would be nice to implement, and what I might get around to doing sometime and either making my own fork or submitting pull requests for:

1) Other language support: Japanese R/G/B, Spanish/Italian/German/French R/B
2) Yellow support
3) Integrate that Javascript GBASM compiler, easy way to test 8F payloads!
4) Fixups to support Super Glitch?

Those are the four things that I'd deem higher priority than anything else… I wonder what features anyone else would like added.

Re: Pokelib: javascript library to get contents of ROM and RAM of English R/B

Posted by: Stackout
Date: 2014-06-27 17:36:37
Well, I finally had a chance to look at it more closely.

And I fixed a bunch of bugs and submitted a pull request.

1) Bug in example fixed where a 404 occurs if pokedexId is blank. Small bug but it annoyed me when I was debugging issues in the console.
2) Bag.indexOf() now searches the entire bag and not all but the last item.
3) Bag.add() now works.
4) All items, species and moves are now available to access through the various arrays. I don't know anything about growth rates, so I left that untouched.
5) Modified TeamPokemon.species(). It now checks 0xD163 (Number of Pokémon), rather than checking for species 0 and 0xff (and therefore breaking if those invalid Pokémon are in the party).
6) Added some characters to the PDS conversion process, and fixed an extra character between 0xEB and 0xEC that was causing off-by-one issues with conversions involving characters past 0xEB (like numbers).
7) Fixed issue with TM/HM item names not being shown properly. These items are hardcoded to show TMxx/HMxx in the ROM, and this has now been done in pokelib.