Changed `character.c` to `character.h`

Identified more overlays
This commit is contained in:
Ogre 2023-09-05 01:02:08 +02:00
parent ee3c3ce77f
commit 12c9bd1e51
5 changed files with 158 additions and 47 deletions

View File

@ -5,7 +5,7 @@ TARGET := ogrebattle64
COMPARE ?= 1 COMPARE ?= 1
NON_MATCHING ?= 0 NON_MATCHING ?= 0
CHECK ?= 1 CHECK ?= 1
VERBOSE ?= 1 VERBOSE ?= 0
PRETTY_PRINTING ?= 1 PRETTY_PRINTING ?= 1
# Fail early if baserom does not exist # Fail early if baserom does not exist

View File

@ -1,7 +1,7 @@
#ifndef __CHARACTER_H__ #ifndef __CHARACTER_H__
#define __CHARACTER_H__ #define __CHARACTER_H__
#include <PR/os.h> #include <ultra64.h>
typedef struct { typedef struct {
// Possible data still undiscovered: // Possible data still undiscovered:
@ -11,7 +11,8 @@ typedef struct {
// - Held items (four u16's) // - Held items (four u16's)
/* 0x00 */ s8 name[0x10]; /* 0x00 */ s8 name[0x10];
/* 0x10 */ u16 portrait; /* 0x10 */ u8 field_0x10;
/* 0x11 */ u8 portrait;
/* 0x12 */ u8 class; /* 0x12 */ u8 class;
/* 0x13 */ u8 level; /* 0x13 */ u8 level;
/* 0x14 */ u8 field_0x14[0x2]; /* 0x14 */ u8 field_0x14[0x2];
@ -25,8 +26,8 @@ typedef struct {
/* 0x24 */ u16 agility; /* 0x24 */ u16 agility;
/* 0x26 */ u16 dexterity; /* 0x26 */ u16 dexterity;
/* 0x28 */ u8 field_0x28[0x10]; /* 0x28 */ u8 field_0x28[0x10];
} CharacterSlot; } CharacterSlot; // size:0x38
// const int __size = sizeof(CharacterSlot); // const int __size = sizeof(CharacterSlot);
#endif __CHARACTER_H__ #endif // __CHARACTER_H__

View File

@ -14,6 +14,8 @@ typedef u8 bool;
#define ARRAY_LENGTH(x) ((sizeof(x)) / (sizeof(x[0]))) #define ARRAY_LENGTH(x) ((sizeof(x)) / (sizeof(x[0])))
#include "character.h"
typedef struct { typedef struct {
/* 0x00 */ s32 field_0x0; /* 0x00 */ s32 field_0x0;
/* 0x04 */ s32 field_0x4; /* 0x04 */ s32 field_0x4;
@ -289,4 +291,6 @@ extern void func_801C8864(void);
extern u8 D_800A872C; extern u8 D_800A872C;
extern CharacterSlot CHARACTER_SLOT_MAGNUS[];
#endif #endif

View File

@ -395,6 +395,7 @@ segments:
- [0x5CF00, rodata] - [0x5CF00, rodata]
- [0x5CF20, rodata] - [0x5CF20, rodata]
- [0x5CF30, rodata] - [0x5CF30, rodata]
- [0x647F0, rodata]
- [0x650A0, rodata] - [0x650A0, rodata]
- [0x650B0, rodata] - [0x650B0, rodata]
- [0x65220, rodata] - [0x65220, rodata]
@ -473,7 +474,97 @@ segments:
- { start: 0x71280, type: bss, vram: 0x8019A790 } - { start: 0x71280, type: bss, vram: 0x8019A790 }
- [0x71280, bin] - type: code
dir: overlays/overlay3
start: 0x71280
vram: 0x8019A7A0
bss_size: 0x40
symbol_name_format: overlay3_$VRAM_$ROM
exclusive_ram_id: test_overlapping
subsegments:
- [0x71280, asm]
- [0x783A0, rodata]
- [0x78410, rodata]
- [0x785D0, rodata]
- [0x790F0, rodata]
- [0x79160, rodata]
- [0x793F0, rodata]
- { start: 0x79730, type: bss, vram: 0x8019A790 }
- type: code
dir: overlays/overlay5
start: 0x79730
vram: 0x8019A7A0
bss_size: 0x0
symbol_name_format: overlay5_$VRAM_$ROM
exclusive_ram_id: test_overlapping
subsegments:
- [0x79730, asm]
- [0x7E4F0, asm]
- [0x83080, asm]
- [0x83610, asm]
- [0x85820, rodata]
- [0x86000, rodata]
- [0x864A0, rodata]
- [0x867B0, rodata]
- [0x86890, rodata]
- [0x869F0, rodata]
- [0x86A70, rodata]
# - { start: 0x87200, type: bss, vram: 0x801A8270 }
- [0x87200, bin]
- type: code
dir: overlays/overlay6
start: 0x87200
vram: 0x8019A7A0
bss_size: 0x0
symbol_name_format: overlay6_$VRAM_$ROM
exclusive_ram_id: test_overlapping
subsegments:
- [0x87200, asm]
- [0xAE2A0, asm]
- [0xB48F0, asm]
- [0xB8DE0, asm]
- [0xBA2C0, asm]
- [0xC15F0, asm]
- [0xC2330, asm]
- [0xC3F50, asm]
- [0xC4A40, asm]
- [0xC54C0, asm]
- [0xC71E0, asm]
- [0xC7D00, asm]
- [0xCC460, asm]
- [0xD0380, asm]
- [0xD21C0, asm]
- [0xDAB20, rodata]
- [0xDB980, rodata]
- [0xDB9B0, rodata]
- [0xDBA40, rodata]
- [0xDBBC0, rodata]
- [0xDBC40, rodata]
- [0xDBCD0, rodata]
- [0xDBE10, rodata]
- [0xDC210, rodata]
- [0xDC220, rodata]
- [0xDC260, rodata]
- [0xDC2F0, rodata]
- [0xDC490, rodata]
- [0xDC5D0, rodata]
- [0xDC660, rodata]
- [0xDC690, rodata]
- [0xDC6D0, rodata]
- [0xDCF90, rodata]
- [0xDCFC0, rodata]
# - { start: 0xDDF60, type: bss, vram: 0x801F1500 }
- [0xDDF60, bin]
# __SOME_OVERLAY_TABLE_2 # __SOME_OVERLAY_TABLE_2
- type: code - type: code
@ -504,6 +595,7 @@ segments:
subsegments: subsegments:
- [0xEBBB0, asm] - [0xEBBB0, asm]
- [0xED530, asm] - [0xED530, asm]
- [0xF6340, asm] - [0xF6340, asm]
- [0xF8550, rodata] - [0xF8550, rodata]
@ -561,7 +653,7 @@ segments:
# - [0x101390, rodata] # - [0x101390, rodata]
# - [0x1018D0, rodata] # - [0x1018D0, rodata]
# - [0x101A10, rodata] # - [0x101A10, rodata]
# - [0x101A40, rodata] - [0x101A40, rodata]
- { start: 0x101CE0, type: bss, vram: 0x801B4CA0 } - { start: 0x101CE0, type: bss, vram: 0x801B4CA0 }
@ -700,7 +792,31 @@ segments:
- { start: 0x165FC0, type: bss, vram: 0x80214E50 } - { start: 0x165FC0, type: bss, vram: 0x80214E50 }
- [0x165FC0, bin] - type: code
dir: overlays/overlay4
start: 0x165FC0
vram: 0x80214F80
bss_size: 0xD0
symbol_name_format: overlay4_$VRAM_$ROM
exclusive_ram_id: test_overlapping
subsegments:
- [0x165FC0, bin]
# - [0x167DE0, asm]
# - [0x16ECA0, asm]
# - [0x16F990, asm]
# - [0x16FB90, data]
# - [0x16FDA0, rodata]
# - [0x16FF40, rodata]
# - [0x170100, rodata]
# - [0x1701F0, rodata]
# - [0x171C60, rodata]
# - [0x171E00, rodata]
# - [0x171E30, rodata]
- { start: 0x171EA0, type: bss, vram: 0x80220E60 }
- [0x171EA0, bin]
# __SOME_OVERLAY_TABLE_18 # __SOME_OVERLAY_TABLE_18
- type: code - type: code
@ -822,52 +938,26 @@ segments:
- [0x213B10, bin] - [0x213B10, bin]
# - type: code # - type: code
# dir: overlays/overlay2 # dir: overlays/overlay7
# start: 0x213B10 # start: 0x213B10
# vram: 0x801D0840 # vram: 0x801D0840
# bss_size: 0x0
# symbol_name_format: overlay7_$VRAM_$ROM
# exclusive_ram_id: test_overlapping
# subsegments: # subsegments:
# - [0x213B10, asm] # - [0x213B10, asm]
# - [0x213B50, asm] # - [0x213B50, asm]
# - [0x21C970, asm] # - [0x21C970, asm]
# - [0x21D7F0, asm] # - [0x21D7F0, asm]
# - [0x222190, asm] # - [0x222190, asm]
# - [0x224F30, asm] # - [0x224F30, asm]
# - [0x228D70, asm]
# - type: code # - [0x228D70, rodata]
# dir: overlays/overlay5
# start: 0x22A280
# vram: 0x801E6FB0
# subsegments:
# - [0x22A280, asm]
# - [0x233210, asm]
# - [0x239BA0, asm]
# - type: code # - { start: 0x22A280, type: bss, vram: 0x801E6FB0 }
# dir: overlays/overlay4
# start: 0x23A3A0
# vram: 0x801D0840
# bss_size: 0x0
# subsegments:
# - [0x23A3A0, asm]
# - [0x23B210, data]
# - { start: 0x23B220, type: bss, vram: 0x801D16C0 }
# - type: code
# dir: overlays/overlay3
# start: 0x23B220
# vram: 0x801E6FB0
# subsegments:
# - [0x23B220, asm]
# - [0x23B3E0, asm]
# - [0x23B680, asm]
# - [0x23D090, asm]
# - [0x241610, asm]
# - [0x243F20, asm]
- [0x228D70, bin]
- [0x2447A0, bin] - [0x2447A0, bin]
# __SOME_OVERLAY_TABLE_11 # __SOME_OVERLAY_TABLE_11

View File

@ -1,3 +1,19 @@
__setup_overlay5 = 0x8017B5EC;
__setup_overlay3 = 0x8017B774;
__setup_overlay6 = 0x8017B6B0;
NAME_MAGNUS = 0x8018E8F0; // type:asciz
NAME_DIO = 0x8018E8F8; // type:asciz
NAME_LEIA = 0x8018E8FC; // type:asciz
NAME_DESTIN = 0x8018E904; // type:asciz
NAME_DEBONAIR = 0x8018E90C; // type:asciz
NAME_GILBERT = 0x8018E918; // type:asciz
NAME_AISHA = 0x8018E920; // type:asciz
NAME_SHEEN = 0x8018E9FC; // type:asciz size:0x6
CLASS_NAME_DRAGON_MASTER = 0x80190230; // type:asciz
__SOME_OVERLAY_TABLE = 0x800A83C0; // size:0x28 __SOME_OVERLAY_TABLE = 0x800A83C0; // size:0x28
__SOME_OVERLAY_TABLE_1 = 0x800A83E8; // size:0x28 __SOME_OVERLAY_TABLE_1 = 0x800A83E8; // size:0x28