Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-09-08 16:42:15

Sawakita
Administrator
Registered: 2010-10-16
Post 206/365

RBGY Compression Tool

WOOD PRESSION 1.1

I decided to release my compression tool for RBGY. Basically, you load a GB-format picture and save the result as a binary file. Then you import it into the ROM.
The program is written in VB6, but I might work on porting it to a multiplatform langauge, so it can be compiled in platforms other than Windows, like Linux.

Notes
- Make sure to read the README (it's short, really).
- At the moment it doesn't perform the best compression, since I've implemented only method 1 (I might improve it in the future, along with the porting).
- Supported picture sizes should be 40x40, 48x48, 56x56 (I've not tested it with other formats, although they should work, to an extent).

Link: download

Special thanks:
Tauwasser, for his documentation at RHWiki.


Have fun.

Last edited by Sawakita (2011-11-13 20:18:16)

Offline

#2 2011-09-08 20:43:01

Cartmic
Member
Registered: 2010-10-16
Post 75/156

Re: RBGY Compression Tool

Sawakita, I just want to thank you for your contributions in the past year and half to RBGY ROM hacking. Your desire to learn for yourself is something to aspire towards and most of all you are not big headed and rude, your humility is a big factor in this you are a pleasure to have around.

Thanks,
Cartmic.

Offline

#3 2011-09-09 12:00:54

Sawakita
Administrator
Registered: 2010-10-16
Post 207/365

Re: RBGY Compression Tool

Thank you, mate, It means a lot, coming from you. I have to admit, though, that my NIH syndrome has a negative influence on my attitude, sometimes!

Offline

#4 2011-11-13 11:59:57

swampert22
Member
From: Switzerland
Registered: 2010-10-16
Post 17/26
Website

Re: RBGY Compression Tool

This looks great, and I'd love to try it out! However, how do I obtain or convert an image into GB format to begin with?
Sorry if it's an obvious question, I just couldn't find it myself!!

Thanks :)


For Pokémon ROM hacking tools, please visit my site www.swamperttools.co.nr!

Check out my latest tool release, a trainer editor for Pokémon Red and Blue!

Offline

#5 2011-11-13 20:18:37

Sawakita
Administrator
Registered: 2010-10-16
Post 228/365

Re: RBGY Compression Tool

Personally, I use a program I wrote, but there are other ways: Agixp and TLP can do it, although they need some adjustments in order to produce a correct GB-format picture. Specifically: Agixp adds bytes at the beginning and the end of the converted image's file, that you need to remove (it's 2 byte at the beginning and a byte at the end of the file, IIRC), while TLP requires the two middle colors ("light shade" and "dark shade") to be very distinct, or it could convert them as wrong colors (when I used to use it I solved the issue recoloring my sprites with green, i.e. #00FF00, as light color, and red, i.e. #FF0000, as dark color).

I may also publish my tool, but for some unknown reason it seldom happens (very rarely, to be honest, in fact I've seen it happening only twice) that it converts some bits incorrectly.

About WoodPression: I've fixed some minor bugs (not related to the compression algorithm, but to the GUI), and uploaded version 1.1 (including the source code, that for some reason I forgot to post the first time). Notice that it still performs only method 1, so it's far from being perfectly efficient; that's why you might want to try the program stag019 wrote.

Offline

#6 2011-11-13 20:39:14

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 130/649

Re: RBGY Compression Tool

So I can rip tiles from Blue with this? lol


Pokemon Blue DX is reborn!

Offline

#7 2011-11-13 22:28:59

stag019
Idea Killer
Registered: 2011-01-05
Post 25/630

Re: RBGY Compression Tool

tysonrss wrote:

So I can rip tiles from Blue with this? lol

Yeah no. Not at all.

Also Sawatika, I personally used Tile Molester to convert a BMP (or PNG) to the right format. I understand it may not be the best option, but it is another one. Here's a quick tutorial on how to do it:

1. Open TM and go to File -> New.
2. Enter the size you need. The size is calculated like this:
  a. Find the amount of tiles you need (4x4 = 16 for back pictures, sizes for front pictures include 5x5 = 25, 6x6 = 36, and 7x7 = 49)
  b. Multiply that by 16 (A tile is 8x8 pixels = 64 pixels, then * 2 bits per pixel = 128 bits, then / 8 bits per byte = 16 bytes)
3. Go to View -> Codec -> 2bpp Planar
4. Go to View -> Block Size -> Custom. Set the Columns to 1 and Rows to the width (in tiles).
5. Draw, or go to Edit -> Paste From to select a BMP or PNG image to paste into it.
6. Save.
7. ???
8. Profit!


You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.

Offline

#8 2011-11-14 10:08:57

swampert22
Member
From: Switzerland
Registered: 2010-10-16
Post 18/26
Website

Re: RBGY Compression Tool

Thanks very much for the replies, and I must say, I'm very impressed with your tool, Sawakita.

I tried with AgipXP but didn't get the desired result, so I tried with TM, following stag019's advice and this is what I got:

MarillInRed.png

Fantastic!!


For Pokémon ROM hacking tools, please visit my site www.swamperttools.co.nr!

Check out my latest tool release, a trainer editor for Pokémon Red and Blue!

Offline

#9 2011-11-14 14:32:28

stag019
Idea Killer
Registered: 2011-01-05
Post 26/630

Re: RBGY Compression Tool

Just remember, my tool tries every implementation, so it's more likely to compress better than Sawatika's tool. It's an online tool too. It's right here for you.

And it has an IPS function too.

Also, I wish there were a Tile Molester clone type program. I really like what Tile Molester has to offer, but there's a few bugs (mainly in the N64 graphics). And it requires you to use Java, which itself is slow. But it has pretty much all the features I like, plus or minus a couple...


You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.

Offline

#10 2011-11-14 15:22:34

swampert22
Member
From: Switzerland
Registered: 2010-10-16
Post 19/26
Website

Re: RBGY Compression Tool

stag019 wrote:

Just remember, my tool tries every implementation, so it's more likely to compress better than Sawatika's tool. It's an online tool too. It's right here for you.

And it has an IPS function too.

Also, I wish there were a Tile Molester clone type program. I really like what Tile Molester has to offer, but there's a few bugs (mainly in the N64 graphics). And it requires you to use Java, which itself is slow. But it has pretty much all the features I like, plus or minus a couple...

I just got round to trying yours out, stag019. Very good aswell, It does compress better than Sawakita's tool, it appears that the larger the image you compress, the more difference you get at the end of using both compressors on the same image.

Eg, a 5x5 sprite was two bytes smaller upon using your compressor, but a 7x7 sprite was I believe 50 bytes smaller on one occation, which when you're dealing with the Gameboy's limited space makes one hell of a difference! I'd just like to take this opportunity to congratulate you both on your excellent work, this is a real turning point in RBY hacking :)


For Pokémon ROM hacking tools, please visit my site www.swamperttools.co.nr!

Check out my latest tool release, a trainer editor for Pokémon Red and Blue!

Offline

#11 2011-11-19 19:12:20

Sawakita
Administrator
Registered: 2010-10-16
Post 229/365

Re: RBGY Compression Tool

stag019 wrote:

Sawatika

stag019 wrote:

Sawatika

It's Sawakita, by the way, not Sawatika.

swampert22 wrote:

I just got round to trying yours out, stag019. Very good aswell, It does compress better than Sawakita's tool, it appears that the larger the image you compress, the more difference you get at the end of using both compressors on the same image.

I told you you should try stag019 program, because mine was far from being efficient.

Offline

#12 2011-12-04 00:27:26

Luigi-San
Member
Registered: 2010-10-16
Post 52/129

Re: RBGY Compression Tool

Finally managed to figure out how to do this, and I'm happy to say that it successfully inserted :D

Problem is, the colors are all messed up:

rIT0V.png

Any help with this?

Offline

#13 2011-12-04 01:57:23

371/703

Re: RBGY Compression Tool

Luigi-San wrote:

Finally managed to figure out how to do this, and I'm happy to say that it successfully inserted :D

Problem is, the colors are all messed up:

http://i.imgur.com/rIT0V.png

Any help with this?

You drew your picture with the wrong colors (i.e., you drew the white parts with black pixels, and vice versa).

#14 2011-12-04 20:10:57

Luigi-San
Member
Registered: 2010-10-16
Post 53/129

Re: RBGY Compression Tool

Thanks. Looks good now!

Bjtf5.png

Offline

#15 2013-01-27 00:43:22

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 480/649

Re: RBGY Compression Tool

Rhydon is fugly in that picture.


Pokemon Blue DX is reborn!

Offline

#16 2013-01-28 02:56:58

Danny-E 33
Administrator
Registered: 2012-06-09
Post 405/1,119

Re: RBGY Compression Tool

jwibagi wrote:

* I actually realized this wouldn't account for the fossils and ghost sprites. Huge thanks to Danny E-33 for posting up a modified code on some thread I forgot, which I altered to fit Yellow's locations.

Glad I could help! :)

Offline

#17 2013-08-08 14:07:29

80C
Banned
Registered: 2013-03-16
Post 1,038/1,257

Re: RBGY Compression Tool

Actually this tool worked only once (at least for me) and anyway the online tool had a better compression, please, someone must bring back a decent compression tool because the online tool was knocked off.


I left this forum.

Offline

#18 2013-08-08 15:12:32

AtecainCorp.
Member
Registered: 2013-04-14
Post 459/627

Re: RBGY Compression Tool

I've seen that you all use AgiXP for Pokemon Red. Someone can explain me why this program do not work with me in Pokemon Red.


http://hax.iimarck.us/topic/3435/ - Pokemon Ruby GEN V GRAPHIC hack Thread
http://hax.iimarck.us/topic/3476/ - Unused Music Midi Thread
http://hax.iimarck.us/topic/3579/ - Some info about region Thonsu

Offline

#19 2013-08-08 15:53:39

Danny-E 33
Administrator
Registered: 2012-06-09
Post 623/1,119

Re: RBGY Compression Tool

80C wrote:

Actually this tool worked only once (at least for me) and anyway the online tool had a better compression, please, someone must bring back a decent compression tool because the online tool was knocked off.

Seriously, just use stag's C program. It's just like the online version.

AtecainCorp. wrote:

I've seen that you all use AgiXP for Pokemon Red. Someone can explain me why this program do not work with me in Pokemon Red.

AgiXP does not work with RBY. It only works for GSC. You have never seen that we all use AgiXP for Pokemon Red.

Offline

Board footer

Powered by FluxBB