News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: How can I edit sprites / tiles in a GBA rom?  (Read 1021 times)

Bridgeman

  • Newbie
  • *
  • Posts: 1
    • View Profile
How can I edit sprites / tiles in a GBA rom?
« on: January 26, 2020, 09:30:54 pm »
I'm kinda new to this but I wanna get into it. Possibly make my own rom hacks with different sprites and stuff. But how can I do this? I've tried some tools already but none of them worked

reyvgm

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: How can I edit sprites / tiles in a GBA rom?
« Reply #1 on: January 27, 2020, 11:04:52 am »
You need a title editor that can edit GBA games. If the graphics are not compressed, then you should see the graphics easily with the title editor. If the graphics are compressed, then you need to create a program to decompress them. There are no general tools to decompress stuff because every game developer usually uses their own custom made tools, so you need to create a custom decompressor too.

Gyroballer

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 46
    • View Profile
Re: How can I edit sprites / tiles in a GBA rom?
« Reply #2 on: January 27, 2020, 11:05:55 am »
I have the most luck with this tool:
http://www.romhacking.net/utilities/991/
(Or maybe one of its variants. Additionally, YY-CHR is another editor with multiple codecs)

You'll have to try different codecs from the menu settings.

If you try literally everything on the whole file and see nothing resembling graphics, they could be compressed.

Then you'll need to do something special to decompress them and then also compress your new graphics and place them in the correct location on the ROM.

FAST6191

  • Hero Member
  • *****
  • Posts: 3052
    • View Profile
Re: How can I edit sprites / tiles in a GBA rom?
« Reply #3 on: January 27, 2020, 04:05:45 pm »
There are no general tools to decompress stuff because every game developer usually uses their own custom made tools, so you need to create a custom decompressor too.
That changed for the GBA. Most games will use one of the decompression methods the BIOS supports http://members.iinet.net.au/~freeaxs/gbacomp/#Image%20Compression%20on%20GBA
This led to general purpose tools that either scan or take a list of SWI call logs from emulators to find what it wants. Various ones here that do all sorts of things, all on the utilities section here.
There are still some that use custom compression (usually a minor tweak on the SWI stuff) and some games will use a compatible compression but not use the BIOS (it can be faster to roll your own decompression algo in a game so some did).

If it comes down to it then tracing is not so bad for the GBA either (every ROM anybody will want to hack will be all in memory -- no banks, mappers or oddities to handle here).
https://www.romhacking.net/documents/361/ though I suggest no$gba debug instead these days.

You might also need to get a GBA capable tile editor -- quite a few ones people enjoy for the NES, SNES and such only support GBA 4bpp and not GBA 1bpp (seen often in fonts, even if it is technically a type of compression) and GBA 8bpp (not see as often as it was on the DS but very very far from unknown).

I personally go with crystaltile 2 ( http://www.romhacking.net/utilities/818/ ) and tiled 2002 ( http://www.romhacking.net/utilities/112/ ) as my main GBA ones, though I will flank it with tileggd ( http://www.romhacking.net/utilities/646/ ).
crystaltile2 tends to hand custom sizes better than tiled 2002 which usually just crashes when you try it. Not so many custom sizes on the GBA compared to the DS but still not unknown either.

Palettes for said tiles can be found from savestates but if you do need to edit them then they are not usually compressed so you can probably dump it from memory and search the ROM for it/a fragment of it and find what you need.

I do have a little guide to GBA hacking
http://www.romhacking.net/forum/index.php/topic,14708.0.html

Oh and if for some reason you decided pokemon was where it is at for your learning purposes then don't -- they usually represent some of the harder ROMs to hack, which is partially why you see so many tools dedicated to it.

m0sca

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: How can I edit sprites / tiles in a GBA rom?
« Reply #4 on: February 02, 2020, 12:57:51 am »
You can start with TilesPro fixed. It's good for simple editing