User:Blaziken257/T1 Phone number format

From Wikifang, a definitive guide to Telefang, Dino Device and Bugsite
Revision as of 19:05, 30 January 2013 by Blaziken257 (talk | contribs) (Created page with "In Telefang, the format of a Denjuu's phone number is stored in 0:A41A-0:A41E for the first Denjuu. (Add 0x10 for any additional Denjuu.) *0:A41A-A41D: The numerical value, with...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In Telefang, the format of a Denjuu's phone number is stored in 0:A41A-0:A41E for the first Denjuu. (Add 0x10 for any additional Denjuu.)

  • 0:A41A-A41D: The numerical value, without taking into account the symbols. This is a 32-bit value, and is little endian. Only the first two bits of 0:A41D are taken into account for the initial value. However, if the highest bit of 0:A41D is 1, and the ten millions digit of the decimal value is 5, then it becomes 7.
  • 0:A41E: An index for the arrangement of # and * symbols. To find the ROM offset from this index, use this formula:
    0xA44D5 + 3*index
    • There is a 3-byte structure here. The format works like this:
      • A phone number always starts with a 0.
      • First byte:
        • Bit 0: Determines whether to use a # or a * symbol. If this is 0, then the symbol is #. If it is 1, the symbol is *.
        • Bit 4: Determines how many digits will appear before the symbol (the rest appear afterwards). There is 1 digit in this part, so a value of 0 means that no digits appear before the symbol, and 1 will appear afterwards. A value of 1 means that 1 digit will appear before the symbol, and 0 will appear afterwards.
      • A dash is added here.
      • Second byte:
        • Bit 0: Determines whether to use a # or a * symbol. If this is 0, then the symbol is #. If it is 1, the symbol is *.
        • Bits 4-5: Determines how many digits will appear before the symbol (the rest appear afterwards). There are 3 digits in this part, so a value of 0 means that no digits appear before the symbol, and 3 will appear afterwards. A value of 1 means that 1 digit will appear before the symbol, and 2 will appear afterwards, etc.
      • A second dash is added here.
      • Third byte:
        • Bit 0: Determines whether to use a # or a * symbol. If this is 0, then the symbol is #. If it is 1, the symbol is *.
        • Bits 4-6: Determines how many digits will appear before the symbol (the rest appear afterwards). There are 4 digits in this part, so a value of 0 means that no digits appear before the symbol, and 4 will appear afterwards. A value of 1 means that 1 digit will appear before the symbol, and 3 will appear afterwards, etc.