Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 11, 2011 10:38:38 GMT -5
So, of course SMPS and Nemesis algorithms are Sega owned. I DID notice other compression/decompression code in Kramlib.
A. Are the other routines free to use? B. Anyone have examples of their use?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 12, 2011 7:20:09 GMT -5
Just an update. I found more information on the other compression format in Kramlib. Apparently even the Kosinski method is ripped from Sega code. segaretro.org/Kosinski_compressionIf anyone has a public domain method of compression/decompression for tiles and other data we should make it easily available. I was really hoping Kramlib would be the answer.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 12, 2011 7:39:53 GMT -5
Most compression techniques on 8/16-bit systems are based on RLE. You can always write your own ( compression tool + decompression routine )
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 12, 2011 7:58:10 GMT -5
Most compression techniques on 8/16-bit systems are based on RLE. You can always write your own ( compression tool + decompression routine ) Interesting.. So, RLE encode DATA statements -> decode to an array -> use FAKE data label -> copy FAKE label via FASTTILECOPY?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 12, 2011 8:08:42 GMT -5
Personally I'd decode straight to the VRAM ( when you're talking tiles ).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 13, 2011 19:58:03 GMT -5
I've found a better - although with no integration for BEX - solution: Sik made two things: SLZ (general purpose compression) UFTC (fast graphics compression) Both can be downloaded from: github.com/sikthehedgehog/mdtoolsAccording to the README SLZ and UFTC have a permissive license for Mega Drive dev. All we (the BEX community) need to do in order to make this usable is make an example of how to hook the assembly routines into a BEX progam. Anyone care to give it a shot?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 14, 2011 9:51:23 GMT -5
you could include the ASM function either through the ASM code block, or in an external library file, and BEX has a routine to call ASM functions. Shouldn't be too difficult to give a whirl.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 14, 2011 10:39:13 GMT -5
Copy-paste ( pretty much at least )?
declare asm sub decompress(a6 as long, a5 as long, d7 as word, d6 as word) move.l a2, -(sp) move.l a3, -(sp) move.w (a6)+, d5 lea (a6,d5.w), a4 and.l #$FFFF, d7 lsl.l #3, d7 adda.l d7, a4 bra.s @LoopEnd
@LoopBegin: move.w (a4)+, d5 lea (a6,d5.w), a3 move.w (a4)+, d5 lea (a6,d5.w), a2 move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ move.w (a4)+, d5 lea (a6,d5.w), a3 move.w (a4)+, d5 lea (a6,d5.w), a2 move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ move.w (a3)+, (a5)+ move.w (a2)+, (a5)+ @LoopEnd: dbf d6, @LoopBegin move.l (sp)+, a3 move.l (sp)+, a2 rts end sub
|
|
|
Post by sega16 on Aug 14, 2011 19:40:02 GMT -5
moon what kind of compression is that?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 14, 2011 22:23:05 GMT -5
moon what kind of compression is that? While you're waiting for an answer from moon I dug this out of the README.txt: en.wikipedia.org/wiki/LZ77_and_LZ78Sik also states that you don't have to decompress ALL the tiles to access just one in a set. I've haven't verified myself that the code above works. Still busy rewriting my engine to draw less tiles when it comes time to scroll.
|
|
|
Post by jlf65 on Aug 15, 2011 23:52:35 GMT -5
UFTC is a codebook lookup of 4x4 pixel blocks (at least, that's what it looks like to me). UFTC allows you to decompress on the fly one or more tiles from anywhere out of the whole block of tiles that were compressed.
|
|
|
Post by sega16 on Aug 16, 2011 21:42:05 GMT -5
Oh, so moon ported uftc to basic? I was a thread about uftc over @ sega-16 (not my name).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 20, 2011 3:19:46 GMT -5
Oh, so moon ported uftc to basic? I was a thread about uftc over @ sega-16 (not my name). The code moon graciously provided above hasn't been tested. If anyone can whip up a quick example the whole BEX community would have a legal tile compression solution.
|
|