Completed HSD Object Padding

Punkline

Dr. Frankenstack
Premium
Joined
May 15, 2015
Messages
356
#1
This code simply changes the size definitions of a few HSD Objects in order to reflect their inevitable 32-byte alignments. Note that this is referring to instances in RAM; not to be confused with file definitions:

  • PObjs: +0x08 bytes
  • DObjs: +0x08 bytes
  • JObjs: +0x18 bytes
  • LObjs: +0x0C bytes
  • TObjs: +0x14 bytes
  • CObjs: +0x14 bytes

This applies to every object allocated in the game, and does not increase actual allocation size:



The bytes increased for each object type will eliminate the garbage in the padding in-between their respective allocations, allowing them to be used to store pointers that default to null. I had experimental research in mind for this code, but it could also be used to potentially extend the structures of existing HSD objects for practical purposes.

DOL Mod:
Code:
-==-

HSD Object Padding
This code simply changes the hardcoded HSD Object allocation sizes to reflect their 32-byte alignments.
- Matching alignment causes no actual changes to allocation sizes.
- Garbage data in padding region becomes zeroed by object initialization routine.

PObjs: +0x08 bytes
DObjs: +0x08 bytes
JObjs: +0x18 bytes
LObjs: +0x0C bytes
TObjs: +0x14 bytes
CObjs: +0x14 bytes
[Punkline]
1.02 ----- 8036eb98 --- 39000018 -> 39000020
1.02 ----- 800740fc --- 39000018 -> 39000020
1.02 ----- 8035e4f4 --- 39000018 -> 39000020
1.02 ----- 80373804 --- 39000088 -> 390000A0
1.02 ----- 800737e8 --- 39000088 -> 390000A0
1.02 ----- 80073718 --- 39000088 -> 390000A0
1.02 ----- 80367698 --- 390000D4 -> 390000E0
1.02 ----- 80361558 --- 390000AC -> 390000C0
1.02 ----- 8036a8cc --- 3900008C -> 390000A0
Gecko Code:
Code:
$HSD Object Padding [Punkline]
0436eb98 39000020
040740fc 39000020
0435e4f4 39000020
04373804 390000A0
040737e8 390000A0
04073718 390000A0
04367698 390000E0
04361558 390000C0
0436a8cc 390000A0
---

To change the size of an HSD Object that has an info table, modify the argument made for defining the object size in a corresponding infoInit callback function:

 
Last edited:
Top