You know, I read quite a bit of tutorials/doc about LZ/SS and didn't quite follow along. Note with a solid understanding. I figured it out on my own because I was RE'ing a compression scheme I hadn't seen before (I was documenting it and wrote a decompressor). At some point in time (within a coupe of months), I realized that it was LZSS. Sometimes, when you don't have some sort of relative experience with a specific system or such - it's hard figure out/ get things to click. Once I understood how LZSS worked, it was easier going from there to learn others (huffman, gamma, etc).I can see how LZ77/LZSS compression could help, but I barely understand the offset principle in the first place.
The best analogy I can give you is this: The file is a book. The 'window' is a cache of pages. Pages you just read. But only recent ones. This 'window' lets you look back at these previous pages. But *only* up to say.. 5 pages back. As you progressive further in the book, so does the 'window' of pages you can look back upon. This is called a sliding window mechanism.
Now for LZ, you apply that same window, but with writing a book. Same concept, you can look back at 5 pages. So say you've written up to 29 pages, the furthest your 'sliding window' will allow you to look back on, is page 24. Now for the second part of LZ. There are control codes. In standard LZ there are two. One is for you to write unique/new words and sentences into your book. The other control code lets you copy any words (and whole strings of words <- that's important) from the previous pages you've already written (but remember, only up to 5 pages back from the current position). Obviously in English, there's going to be quite a bit of words you can copy (due to redundancy of words and strings of words). Lots of repetitive phrases or words (including spaces and periods. All of it). That's the basic principle of LZ/SS.
This next part is going to sound a little strange, but this is in relation to planar VS packed pixel. Think of packed pixels as whole letters. And think of planar as a letter broken up into 4 parts. Now, say you had a page with lots of text. On a Planar version of that page, there would be 4 pages. One page with each 1/4 part. Sounds kind of convoluted and complex, right? To your human mind, what do you think would be easier for you to compress into the smallest amount/space (via reference - sentences/words/etc)? A page with full letters or four pages with divided parts of letters? I think the obvious answer would be the whole letters >_>
Now, don't look too deep into that last analog because it's kind of flawed. But it gets the point across, I hope.
Correct. The planar system of the tiles/sprites (no sprites in that demo though), is basically a hardware assist for that effect.Tom that demo you linked to is pretty neat, I don't think I've seen transparency on the TG16 before. This is all possible just because of planar then?
No, the snes does color match after it fetches the planes bits and assembles them into a single pixel.Is this something similar to what the SNES does, or is that more normal alpha channel stuff?
Yeah, that's a problem with this discussion (because it covers both and sometimes at the same time). One doesn't necessarily have to do with the other. Cell (tile/sprite) based display can be planar or packed pixel (linear). And line based display (linear display) can be planar or packed pixel (linear) as well. I think part of the discussion is whether planar or packed pixel on a cell based display, has any advantages of one over the other - if one is trying to do a make shift line based display out of this cell based display. And then how does each one relate to compression ratios. Follow?Also, I am a bit worried that I am confusing linear packed pixels with linear pixel displays.
That's the idea. But Amiga and ST were also brought into the conversation (at least I think, without looking back). They have line based displays (although software tile enginesMy prior understanding was that all of these systems displayed in 8x8 tiles, though some had different tile sizes available, and they "packed" the tiles as efficiently as possible on the ROM.). One would assume the pixel format the tile or cell was in, would be optimal for whatever compression for the time/era. But that's not necessarily true. Planar is more of a carry over from older tech. It had hardware advantages since pixels weren't even byte sized just yet (among some other advantages). I don't think it's any coincidence that Sega moved away from planar to packed pixel for the Genesis. It also lends it self better to certain types of manipulation - like scaling, rotation, distortion, etc. This is also why one of the SNES tile pixel format is not like the other modes. Mode 7 *is* packed pixel, not planar like mode 0-6. Sega arcade systems around the time of the Genesis, were also packed pixel. It's possible that they had additional features in mind for the Genesis VDP, that never made it into the design. One if the things with packed pixels sprites that Sega did, was give a terminator value for one of the colors. You lose one color, but you can both compression in vram as well as more sprite pixel bandwidth. If you have a 4x4 pixel bullet sprite, you still need 8x8 pixels in vram to define it (it wastes vram). It also wastes sprite pixel scanline limit, because the 4 invisible/transparent pixels on the horizontal row of pixels, still contributes to this limit. So a packed pixel display has the advantage off optimizing against this limit, in the context of these console type hardware systems.
Before I get too far off point here, packed pixel (linear) compresses better with LZ based compression than planar does. But you can convert between both formats. This means you can take your graphic data for the PCE/SNES, convert those to packed pixel (which doesn't take any more space, it's still 4 bit) and then send it through the compressor, and plop it in rom. On the game side though, you'll have to convert that packed pixel format back to planar before you can write it to the display. This process is too slow for realtime, thus why ram is important. The more ram you have, the more you can do this process in between areas (aka cart loading) and cache/buffer these converted tiles for later use. Thus, the Genesis/PCE/SNES now all have the same compression size capability, but with the PCE and SNES having additional over head in the cart loading sections/parts. And on the PCE hucard side, almost non existent because of the tiny ram. PCE CD games are like a PC, all ram mode - so it's not a problem (and in fact optimized games do just this).
Beside viewing them out of order, part of the mechanism of a cell and map based display, is to compress graphics by removing redundant graphic data and replace it with a reference. The down side is, you have artifacts of an 8x8 segmented system. To get around this, you create more unique cell data. But then your also decrease the benefits of the built in compression mechanism of a cell/map based display. Early on in the 16bit generation, this wasn't really an issue. But near the end, you really see games starting give the appearance as if on non tiled based display. Both Genesis and SNES (especially top tier SNES RPGs).The result always looked to me like a tile puzzle with Genesis games, and I assumed that basically everything would look as complicated.

Reply With Quote
Death To MP3, 
