Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 1970-01-01 00:33:30

tekcoR
Member
From: Celadon City
Registered: 2010-10-16
Post 8/165

Pokémon/Trainer Sprites (RBY)

After reading Cartmics Violet Update following question came to my mind:
how can you edit the compressed Pokemon/Trainer graphics in RBY? Like Coolboyman did...

I think the games use some RLE methods...?

CYa


Cya

Offline

#2 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 145/3,455

Re: Pokémon/Trainer Sprites (RBY)

to my knowledge, the way Coolboyman did this was by removing the compression routine and repointing all the graphics to noncompressed versions.

Offline

#3 1970-01-01 00:33:30

tekcoR
Member
From: Celadon City
Registered: 2010-10-16
Post 9/165

Re: Pokémon/Trainer Sprites (RBY)

Ah, okay, he applied his famous ASM knowledge.  ;D

Is there any other method? I found a decompression document and a C program. Shouldn't I be able to do it "reverse" and insert the compressed pictures?

CYa


Cya

Offline

#4 1970-01-01 00:33:30

17/700

Re: Pokémon/Trainer Sprites (RBY)

Compression is a much harder problem than decompression. There is only one way to decompress an image but there can be a million different ways to compress the same image.

#5 1970-01-01 00:33:30

tekcoR
Member
From: Celadon City
Registered: 2010-10-16
Post 10/165

Re: Pokémon/Trainer Sprites (RBY)

Okay, thx.

Looks like I have to be content with the current state of 1. Gen hacking. :/

*Can be closed*


Cya

Offline

#6 1970-01-01 00:33:30

Tauwasser
Member
Registered: 2010-10-16
Post 11/447

Re: Pokémon/Trainer Sprites (RBY)

IIMarckus wrote:

There is only one way to decompress an image but there can be a million different ways to compress the same image.

This does not hold for RGBY though, as there is no data reuse within a compressed picture.
Picture compression is actually straightforward. Each picture has two layers, one with white and black (may differ) colors and one with the two individual (may differ) colors per Pokémon --on SGB anyways, DMG obviously only has the same shades for all Pokémon.

The main compression is RLE and RLE only. It will group bits into two-bit chunks which are then either filled with a data chunk of two bits (that is 11, 01, or 10, but not 00). RLE will fill groups with zeros. The RLE codes themselves are saved using RLE. Basically, it will count set bits in the code for a static base number of groups to fill with zeros and then add an additional (positive) offset to that which follows the code.

The only hard part about this is that there are two different methods for obtaining the final image values employed in three different methods of constructing that meta-RAM.

So this step would have to be reversed to compute the compression with the most gain, so it's at most three tries  :D

Yet some of these methods are used exclusively on certain types of images. For instance, one interpretation algorithm will take XOR of both layers t various points, therefore encoding different sets of colors more efficiently because long runs of zeros can RLE'd with this method.

A friend of mine told me that this method is actually better than the GSC method, because many pictures were smaller compressed with this scheme.

EDIT: So yeah, there is a best possible compression, that can easily be obtained, because your algorithms will converge to the best in linear time. Something that cannot be said for GSC, where you will have to optimize the hell out of the algorithm and then can only say you're in the top optimized X % there is.

Documentation in German can be found here.

cYa,

Tauwasser

Offline

#7 1970-01-01 00:33:30

Masterge77
Member
From: Sandshore Town, Ameria Region
Registered: 2010-10-16
Post 38/93
Website

Re: Pokémon/Trainer Sprites (RBY)

Considering how I know NOTHING of hex editing, It would be nice if there was something like AGIXP that works for RBY


[img]http://p.gpxpl.us/qPTY.png[/img]
CLICK MY ROBOT POKEMON ARMY OR ELSE

Offline

#8 1970-01-01 00:33:30

Ben
Member
From: South Korea
Registered: 2010-10-16
Post 82/161

Re: Pokémon/Trainer Sprites (RBY)

I think AgiXP works with rby

Offline

#9 1970-01-01 00:33:30

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 185/3,455

Re: Pokémon/Trainer Sprites (RBY)

nope, AgiXP doesn't work with RB, they use different styles of compression. Be nice if it did though!

Offline

Board footer

Powered by FluxBB