gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > real time compression

#1152 - MrMr[iCE] - Wed Jan 15, 2003 5:31 am

Does anyone here have code to compress and decompress data on the GBA?
Im working on a project that has a tight deadline, and Im wondering if some
one out there has a working codec that can run on a GBA. I need something
comparable to LZ77, but with faster compression speed. When I say fast, I
need it to be able to compress 6k of data in about a quarter of a second or
less. Decompressing doesnt need to be as fast. I need working code that will
build with gcc to run in a GBA rom. Any help would be appreciated, perhaps
with some compensation if the code works out in my project.
_________________
Does the corpse have a familiar face?

#1155 - AnthC - Wed Jan 15, 2003 6:25 am

What kind of data?

#1156 - MrMr[iCE] - Wed Jan 15, 2003 6:44 am

character code/color pairs, like video ram for a dos text mode.
character code can be 0-255, color is 2 colors, upper 4 bits for a
background color, lower 4 for foreground.
Im trying seperating the character/color pairs to 2 buffers, one for chars,
the other for colors, Ill post results on that
_________________
Does the corpse have a familiar face?

#1157 - tepples - Wed Jan 15, 2003 8:30 am

MrMr[iCE] wrote:
character code/color pairs, like video ram for a dos text mode.
character code can be 0-255, color is 2 colors, upper 4 bits for a
background color, lower 4 for foreground.
Im trying seperating the character/color pairs to 2 buffers, one for chars,
the other for colors, Ill post results on that

All lossless compression is variable bit rate. Thus, you may not always succeed in compressing the file to fit in your save RAM/flash/EEPROM. Imagine the case of completely random colors.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#1230 - DSims - Wed Jan 15, 2003 8:56 pm

Hi,
This might help http://tomstdenis.home.dhs.org/ look under the menu for embedded BWT. Might do the trick.
_________________
Dave

#1283 - AnthC - Thu Jan 16, 2003 9:50 am

Hi
I can only gues what you are doing here and might be miles off?
Ok you have maps on one GBA and these maps have been modified in some way, thus you need to send these new maps to another GBA using a MB cable?
If this is the case - why not store a highly compressed original of the map,
maybe using a format similar to zip (lzw?)
The MB GBA can then decompress this map.
Then send along the differences - which shouldnt be that much overhead.
if you are pre computing maps, then why not just send across the seed to make the new map?
Anth