I haven't been able to find the GRP format anywhere, so I decided to figure it out myself.
I've spent about half an hour trying to work out the format of GRP files with a hex editor. Here is what I've found:
- The first byte is the number of frames.
- The second byte is just a continuation of the first, I believe, for if there were ever more than 255 frames.
- The third byte is the X size of the frames.
- The fourth byte is like the second byte, for if there was a file with an X size of more than 255.
- The fifth byte is the Y size of the frames.
- The sixth byte is like the fourth and second.
Now here is where I'm not exactly sure. Does the GRP contain a mini palette of all the colors it uses in the image? I would think it follows a format of:
[Pixels of the following color][Index color]
But I'm not exactly sure where that would start. Will the number of pixels be kept to a single row or does it go on to include all the rows of that color? Is there a separation between frames or does it just do this based on the X/Y sizes?
Actually, I just made a two-frame all-black GRP and it doesn't seem to follow my idea for the colors. It repeats "AA 01" over and over again for some reason.