+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Multi-Tile Encoding vs Dictionary Compression?
Pages: [1]
Author Topic: Multi-Tile Encoding vs Dictionary Compression?  (Read 2 times)
The Drunken Hacker
Guest
« on: August 29, 2009, 07:53:21 am »

What is the difference between multi-tile encoding and dictionary compression? I've tried finding the answer to this question in several documents but the only thing I can seem to fathom is that MTE refers to a system where one byte correlates to a few characters whereas with dictionary compression, a byte correlates to a full word. That would indicate that it's purely a matter of semantics. (I'm just about positive that DTE vs MTE is purely a matter of how many tiles a byte references.)

However, there is a document on this site that explains how to implement a "combined DTE and dictionary compression scheme" which obviously suggests that they are two separate entities.

To avert anyone from going too in depth with their answer, let me state that I am not terribly interested in the coding side of the issue. I am simply hacking a game that uses one of these and I'd like to know exactly which one it is so I don't sound stupid when talking about it.
KaioShin
Guest
« Reply #1 on: August 29, 2009, 08:01:37 am »

Quote from: The Drunken Hacker on August 29, 2009, 07:53:21 am
That would indicate that it's purely a matter of semantics.

It really is. DTE usually refers to just one byte standing for two letters, while Dictionary/MTE refers to one (or more) byte(s) standing for x letters. When implementing it it all boils down to the same code really.

The romhacking scene is full of crudely-made-up terms from people who were self-learned and thus had no idea what they were really talking about Grin For example the correct term for the ever popular VWF is actually "proportional font" if you look it up in technical literature. If you can see that MTE and dictionary are basically the same, then you should have no problems implementing either easily.
« Last Edit: August 29, 2009, 08:08:00 am by KaioShin »
Tauwasser
Guest
« Reply #2 on: August 29, 2009, 08:05:01 am »

Hi and welcome to RHDN Cheesy

These two terms are usually loosely used interchangably. Originally, it really meant a tile encoding. That is, one hex value equals two tiles on a tile-based system. So for instance, 0x0A prints Tiles 「1」「0」 (two tiles). Now, multi tile encoding would stretch that even further. You can say DTE ⊂ MTE.
However, nowadays, MTE is also used to mean that one value can in fact represent a whole word. This is obviously dictionary encoding. These two are somewhat related, because there could be a lookup table in place that says 0x0A = 0x01 0x00 for instance (and these would represent, to keep the example from above, the tiles 「1」「0」 resp.). So the MTE and DTE effect can be achieved by having a dictionary in place.
Also, there is sometimes also references to a DTE that works the other way around. It will take two regular bytes and print their values into one Tile. For instance 0x01 0x00 would represent "10" in the Rom (as plain text, just as an example). However, in the game, to save screen space, these would be rendered as 「10」, inside one tile. This is however, usually referred to as half-width font, however, there is some confusion about this out there and some people use DTE to mean this system.

I hope this cleared stuff up a bit... Or maybe enhanced the trauma :O

cYa,

Tauwasser
RedComet
Guest
« Reply #3 on: August 29, 2009, 11:50:46 am »

Quote from: Tauwasser on August 29, 2009, 08:05:01 am
I hope this cleared stuff up a bit... Or maybe enhanced the trauma :O

I know what you were talking about and it still confused me. Tongue
The Drunken Hacker
Guest
« Reply #4 on: August 30, 2009, 09:04:12 am »

Quote from: Tauwasser on August 29, 2009, 08:05:01 am
These two are somewhat related, because there could be a lookup table in place that says 0x0A = 0x01 0x00 for instance (and these would represent, to keep the example from above, the tiles 「1」「0」 resp.). So the MTE and DTE effect can be achieved by having a dictionary in place.

So MTE doesn't necessarily have a lookup table in place? Would this mean that the values would be hard coded and require assembly to change? Or did I misunderstand something?
Gideon Zhi
Guest
« Reply #5 on: August 30, 2009, 09:49:04 am »

I always thought that "MTE" was just a fancy term for squishytext.
RedComet
Guest
« Reply #6 on: August 30, 2009, 12:27:51 pm »

Quote from: The Drunken Hacker on August 30, 2009, 09:04:12 am
Quote from: Tauwasser on August 29, 2009, 08:05:01 am
These two are somewhat related, because there could be a lookup table in place that says 0x0A = 0x01 0x00 for instance (and these would represent, to keep the example from above, the tiles 「1」「0」 resp.). So the MTE and DTE effect can be achieved by having a dictionary in place.

So MTE doesn't necessarily have a lookup table in place? Would this mean that the values would be hard coded and require assembly to change? Or did I misunderstand something?

They all have a look up table. Unless for some asinine reason you hardcode everything:

Code:
lda TextByte
cmp DTE_value1
bcs +

lda DTE_value1char1

+
cmp DTE_value2
bcs ++

lda DTE_value1char1
++

blah, blah, blah

That's just a waste of space and time.
Tauwasser
Guest
« Reply #7 on: August 30, 2009, 04:10:13 pm »

Quote from: RedComet on August 30, 2009, 12:27:51 pm
They all have a look up table. Unless for some asinine reason you hardcode everything:
[...]code[/...]
That's just a waste of space and time.

That is exactly what I have been seeing in some titles -- thought, none were NES or SNES, talking gameboy (color) here. For some reasons, programmers or compilers will chose some literal comparisons over a lookup table with pointers and the like. It happens.

Also, for me "squishy text" is a proportional font, or in our slang, a VWF, a variable width font. It depends entirely on the implementation, but for me, everything with a * tile encoding should be tile-based and that's my whole approach to it. Some other people also use this approach, but once you get accustomed to how things work out, you will get the meaning regardless of the lingo.

cYa,

Tauwasser
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC