So I've been playing around with zlib for a bit and finally managed to get it to output valid files with the DSTwo SDK. This got me thinking about creating a compressed rom type format. What I was thinking is that you'd have to just decompress the rom before playing. No on the fly decompression because that isn't really possible.
It would be fairly easy to incorporate such format into a menu like BAGplug (auto decompression and deletion of uncompressed files), if enough people were really into the idea.
Here are some (loosely accurate) tests of the format I have conducted on two opposite sides of the spectrum ( 16mb, 32mb, 64mb, 128mb, 256mb):
*R4DS Rom Trimmer 2.0 was used*
Tetris DS:
normal size - 16 mb
trimmed size - 13.1mb
compressed size - 6.4mb
compression time (on DS) - ~1 minute
decompression time - < 1 minute
Pokemon Soul Silver:
normal size - 128 mb
trimmed size - 120mb
compressed size - 58mb
compression time (on DS) - ~4minutes
decompression time - ~1 minute
Pokemon Black:
normal size - 256 mb
trimmed size - 256 mb
compressed size - 105 mb
compression time (on DS) - ~11 minutes
decompression time - ~1 and a half minutes
Dementium 2:
normal size - 64 mb
trimmed size - 54.2 mb
compressed size - 39.2 mb
compression time (on DS) - ~ 3 minutes
decompression time - ~1 minute
Brothers in Arms DS:
normal size - 32 mb
trimmed size - 30.9 mb
compressed size - 17.5 mb
compression time (on DS) - ~3 minutes
decompression time - < 1 minute
Club House Games:
normal size - 16 mb
trimmed size - 10 mb
compressed size - 8.3 mb
compression time (on DS) - < 1 minute
decompression time - < 30 seconds
Max compression level was used on the DSTwo, so faster compression times can be achieved using a lighter level, or if a pc application was made for compression.
The format itself is just a gzip file, with bits of the nds rom header appended to the end, so menus such as BAGplug or iMenu can still access rom information without having to unzip the rom itself.
So what my question is, is there really a need (or want) for this or are people just happy enough using trimmed roms? If there isn't much interest in this, then this idea won't go far.
Source code for the compression / decompression routines can be found here:
http://bag.nfnet.org/wp-content/uploads/2011/04/nzip-src.zip
Source was built using zlib 1.5.2
It would be fairly easy to incorporate such format into a menu like BAGplug (auto decompression and deletion of uncompressed files), if enough people were really into the idea.
Here are some (loosely accurate) tests of the format I have conducted on two opposite sides of the spectrum ( 16mb, 32mb, 64mb, 128mb, 256mb):
*R4DS Rom Trimmer 2.0 was used*
Tetris DS:
normal size - 16 mb
trimmed size - 13.1mb
compressed size - 6.4mb
compression time (on DS) - ~1 minute
decompression time - < 1 minute
Pokemon Soul Silver:
normal size - 128 mb
trimmed size - 120mb
compressed size - 58mb
compression time (on DS) - ~4minutes
decompression time - ~1 minute
Pokemon Black:
normal size - 256 mb
trimmed size - 256 mb
compressed size - 105 mb
compression time (on DS) - ~11 minutes
decompression time - ~1 and a half minutes
Dementium 2:
normal size - 64 mb
trimmed size - 54.2 mb
compressed size - 39.2 mb
compression time (on DS) - ~ 3 minutes
decompression time - ~1 minute
Brothers in Arms DS:
normal size - 32 mb
trimmed size - 30.9 mb
compressed size - 17.5 mb
compression time (on DS) - ~3 minutes
decompression time - < 1 minute
Club House Games:
normal size - 16 mb
trimmed size - 10 mb
compressed size - 8.3 mb
compression time (on DS) - < 1 minute
decompression time - < 30 seconds
Max compression level was used on the DSTwo, so faster compression times can be achieved using a lighter level, or if a pc application was made for compression.
The format itself is just a gzip file, with bits of the nds rom header appended to the end, so menus such as BAGplug or iMenu can still access rom information without having to unzip the rom itself.
So what my question is, is there really a need (or want) for this or are people just happy enough using trimmed roms? If there isn't much interest in this, then this idea won't go far.
Source code for the compression / decompression routines can be found here:
http://bag.nfnet.org/wp-content/uploads/2011/04/nzip-src.zip
Source was built using zlib 1.5.2