#78168 - zzo38computer - Wed Apr 05, 2006 7:06 pm
I know there are function such as "swiDecompressLZSSVram" and other stuff, but how exactly do the functions work (and how are they used), and what is the best kinds of compression? I want to make compressed data on computer and transfer to Nintendo DS so the software will fit
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.
#78172 - Mighty Max - Wed Apr 05, 2006 7:39 pm
I recomment to start at the Huffman method.
http://en.wikipedia.org/wiki/Huffman_coding
_________________
GBAMP Multiboot
#78264 - knight0fdragon - Thu Apr 06, 2006 7:12 am
Huffman is mostly good for text though, but its a good start
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#78295 - zzo38computer - Thu Apr 06, 2006 4:15 pm
I want to compress maps though, not text
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.
#78307 - Mighty Max - Thu Apr 06, 2006 5:16 pm
Huffman is the base of every compression algorithm i know.
There are some additions, like wordtables, for repeated patterns for lossless compression or discrete fourier transformations & data dropping for loosing compressions (like JPEG)
I don't know why knight thinks its mostrly for text. It's correct that it works best on text or genrerally better the lesser the amount of symbols are.
_________________
GBAMP Multiboot
#78314 - omaremad - Thu Apr 06, 2006 6:14 pm
i think he is asking about hardware techniques of decompression
#78325 - knight0fdragon - Thu Apr 06, 2006 9:28 pm
well theres RLE for things with repeated data, i wonder if the LZS is hardware decompressed because of the networking, but i was researching that a couple of weeks ago, forgot the sites it was on
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#78339 - thundrestrike - Thu Apr 06, 2006 11:40 pm
are you putting graphics in the fwnitro? :D
_________________
popcorn
#78342 - swimgod - Thu Apr 06, 2006 11:58 pm
i think he said a while back,
(or someone said...)
Graphics are not needed for FW-Nitro,
they are just a waste of space...
_________________
1x WII 2x remotes
2x NDS/L(FMv7-ORG:v4,FMv7-org:DSL)
1x GBAMP
2x 1gb (MicroDrive{typeII}&SanDisk{typeI})
1x SuperPass2
1x Supercard-CF
MoonShell skins
#78345 - knight0fdragon - Fri Apr 07, 2006 12:12 am
hey if u can get good graphics under 1K i say go with it, its only 1/256th of ur space
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#78349 - tepples - Fri Apr 07, 2006 12:21 am
swimgod wrote: |
Graphics are not needed for FW-Nitro,
they are just a waste of space... |
All the graphics of the game Super Mario Bros. (1985) fit into 8 KB.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#78354 - dualscreenman - Fri Apr 07, 2006 12:28 am
swimgod wrote: |
i think he said a while back,
(or someone said...)
Graphics are not needed for FW-Nitro,
they are just a waste of space... |
He laso said that graphics could come after all the features were working/bugless. Y'know. Later on sort thing.
_________________
dualscreenman wrote: |
What about Gaim DS? Gaim pretty much has support for all IM programs. |
tepples wrote: |
"Goshdammit, the DS is not a Gaim-boy! It's a third pillar!" |
#78486 - zzo38computer - Fri Apr 07, 2006 5:30 pm
thundrestrike wrote: |
are you putting graphics in the fwnitro? :D |
No, this is a different project called NitroZeux (like ZZT and MZX maybe... I want to make a program on computer in Visual Basic which will draw map and compress them, then they will be decompressed by a software on the Nintendo DS)
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.
#79392 - LiraNuna - Thu Apr 13, 2006 11:48 am
You can also use LZ77 compression done by HW.
If you want to extract to VRAM, it will take some damn tricking...
Code :
Code: |
int getSize(uint8 * source, uint16 * dest, uint32 r2)
{
u32 size = *((u32*)source) >> 8;
return (size<<8) | 0x10;
}
uint8 readByte(uint8 * source)
{
return *source++;
}
void decompressToVRAM(const void* source, void* dest)
{
TDecompressionStream decStream;
decStream.getSize = getSize;
decStream.getResult = NULL;
decStream.readByte = readByte;
swiDecompressLZSSVram((void*)source, dest, 0, &decStream);
}
|
All you call s decompressToVRAM, the others are "Helper functions" needed by the decompression stream.
Be sure to compress with GBACrusher with the option LZ77 (VRAM safe)
Last edited by LiraNuna on Fri Apr 14, 2006 11:08 am; edited 1 time in total
#79477 - omaremad - Thu Apr 13, 2006 10:52 pm
so is dest is just any rambank?
thanks for the code im might use this for my bgs
#79479 - omaremad - Thu Apr 13, 2006 11:21 pm
sorry for being a noob but if i copy my tiles to the vram how do i allocate that to the bg layer i want?
would i have to use a rambank for each layer?
#79569 - LiraNuna - Fri Apr 14, 2006 11:10 am
The destinations is an address in the VRAM, doesn't have to be a RAM bank/
For example, you can extract to BG_GFX (0x6000000) or BG_PALETTE(0x5000000) or even to the main RAM (not tested).
The main difference is, That the function extracts 16bits at a time, and is more customizable.