Author Topic: How-To: Expanding Tech Data.  (Read 3307 times)

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
How-To: Expanding Tech Data.
« on: June 15, 2017, 12:53:01 am »
I'm going to run down some of the types of tech data and how to expand them, as well as how to make Hi-Tech aware of the new data. All addresses are for a US ROM.

Hi-Tech.ini

When you first load a ROM, Hi-Tech creates a file called Hi-Tech.ini in your romname.smc.proj folder. It handles all the settings on where data ends for anything that is expandable.

Effect Headers and MP Costs

The pointer to player data is at 0x01D5F0. Each Header is 12 bytes long. No formatting is required. MP Costs are pointed to at 0x01CB5D, and are 1 byte each. There should be a matching number of Effect Headers and MP Costs. The Hi-Tech.ini setting for this is PlayerEffectMax.

Performance Groups

Battle Performance Groups are pointed to at 0x01CBAE, and are three bytes each. The Hi-Tech.ini setting is TotalBattlePerformanceGroups. Each byte is the index of a PC used, or 0xFF for a non-participating party member. Crono single techs would be 00 FF FF.

Menu Performance groups are pointed to at 0x02BBF4, 0x02BCE9, and 0x3FF866, and are 1 byte each. Each PC has a bitflag, with Crono = 0x80, Marle = 0x40, Lucca = 0x20, Robo = 0x10, Frog = 0x08, Ayla = 0x04, and Magus = 0x02. There is a count of menu groups at 0x3FF864.

Both types of performance groups should match. The only differences are format, where they are loaded, and that battle groups may have multiple orders for dual techs.

Hi-Tech reads battle groups, and updates both battle and menu groups to match. As long as you have enough space to write your data, no modification is necessary prior to loading Hi-Tech.

Tech Groups

Tech groups are used to specify where each type of tech starts and ends.

The start tech of one group and first tech of the next group are listed at 0x02BD18, with the end byte being referenced as the next start byte. For example, Crono's data is 01 09, and Marle's data is 09 11, with the ROM listing 01 09 11. The total number of menu performance groups is stored at 0x3FF864. This data must be adjusted manually.

The types of menu performance groups are pointed to at 0x02BCE2, and are two bytes each. The first byte is the index of the first of the type, and the second is the count of groups in the type. This data must be adjusted manually.

More to come.

Edit: Updated performance groups and separated tech groups.
« Last Edit: August 19, 2017, 06:46:21 pm by Mauron »

neologix

  • Earthbound (+15)
  • *
  • Posts: 38
  • Gate Sealer
    • View Profile
    • ATOM - Apollolux Tabular Object Management system
Re: How-To: Expanding Tech Data.
« Reply #1 on: June 22, 2017, 09:19:49 pm »
Where can I get updates to the memory maps based on recent info such as this? MP costs being one byte each and starting at 0x01CB5D is useful info that is buried in the last version of the map as in the range 0x01C95C to 0x01CBF5 "CODE   N   Unknown routines   2008.02.13" and the audio stuff in CTSPCTool is also missing from the doc.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: How-To: Expanding Tech Data.
« Reply #2 on: June 23, 2017, 12:01:14 am »
The MP costs themselves start at 0C253B, as listed in the latest document - They actually end at 0C257F, not 0C2573.

0x01CB5D is the pointer for that data, necessary for expansion.

neologix

  • Earthbound (+15)
  • *
  • Posts: 38
  • Gate Sealer
    • View Profile
    • ATOM - Apollolux Tabular Object Management system
Re: How-To: Expanding Tech Data.
« Reply #3 on: June 23, 2017, 01:58:12 am »
This is exactly the kind of stuff I'm missing by using the old NA offsets list hosted here! We need a publicly available update for that doc soon please.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: How-To: Expanding Tech Data.
« Reply #4 on: June 23, 2017, 03:55:04 am »
The one here might not be the most recent - I'll check later.

I need to email Geiger with some of my notes.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1764
  • Nu-chan
    • View Profile
    • Maurtopia
Re: How-To: Expanding Tech Data.
« Reply #5 on: August 19, 2017, 06:46:44 pm »
Updated Performance group notes.