Upgrade DTK and Extract more assets

Fixes alignment of extracted assets. Extracted assets are currently unused except for font.c.  logoNintendoData not extracted from bootdll.rel but its loader is decompiled.
This commit is contained in:
gamemasterplc 2023-11-26 07:59:54 -06:00
parent c339a272f6
commit 7e38ff60b0
7 changed files with 93 additions and 10 deletions

View file

@ -505,6 +505,41 @@ modules:
extract:
- symbol: ank8x8_4b
binary: game/ank8x8_4b.bin
header: game/ank8x8_4b.inc
binary: ank8x8_4b.bin
header: ank8x8_4b.inc
- symbol: refMapData0
binary: refMapData0.anm
header: refMapData0.inc
- symbol: refMapData1
binary: refMapData1.anm
header: refMapData1.inc
- symbol: refMapData2
binary: refMapData2.anm
header: refMapData2.inc
- symbol: refMapData3
binary: refMapData3.anm
header: refMapData3.inc
- symbol: refMapData4
binary: refMapData4.anm
header: refMapData4.inc
- symbol: toonMapData
binary: toonMapData.anm
header: toonMapData.inc
- symbol: toonMapData2
binary: toonMapData2.anm
header: toonMapData2.inc
- symbol: hiliteData
binary: hiliteData.anm
header: hiliteData.inc
- symbol: hiliteData2
binary: hiliteData2.anm
header: hiliteData2.inc
- symbol: hiliteData3
binary: hiliteData3.anm
header: hiliteData3.inc
- symbol: hiliteData4
binary: hiliteData4.anm
header: hiliteData4.inc
- symbol: Ascii8x8_1bpp
binary: Ascii8x8_1bpp.bin
header: Ascii8x8_1bpp.inc

View file

@ -5,3 +5,15 @@ Sections:
.rodata type:rodata align:8
.data type:data align:32
.bss type:bss align:8
REL/executor.c:
.text start:0x00000000 end:0x000000A0
REL/bootDll/bootDll.c:
.text start:0x000000A0 end:0x00002944
.rodata start:0x00000000 end:0x000000DC
.data start:0x00000000 end:0x0000311D
.bss start:0x00000000 end:0x0000005C
REL/bootDll/nintendo_data.c:
.text start:0x00002944 end:0x000029C8

View file

@ -1,6 +1,6 @@
_prolog = .text:0x00000000; // type:function size:0x54 scope:global
_epilog = .text:0x00000054; // type:function size:0x4C scope:global
fn_1_A0 = .text:0x000000A0; // type:function size:0x1CC
ModuleProlog = .text:0x000000A0; // type:function size:0x1CC
fn_1_26C = .text:0x0000026C; // type:function size:0x78C
fn_1_9F8 = .text:0x000009F8; // type:function size:0xC8
fn_1_AC0 = .text:0x00000AC0; // type:function size:0x6B8
@ -8,7 +8,7 @@ fn_1_1178 = .text:0x00001178; // type:function size:0x3B4
fn_1_152C = .text:0x0000152C; // type:function size:0xBD4
fn_1_2100 = .text:0x00002100; // type:function size:0x374
fn_1_2474 = .text:0x00002474; // type:function size:0x4D0
fn_1_2944 = .text:0x00002944; // type:function size:0x84
logoReadNintendo = .text:0x00002944; // type:function size:0x84
_ctors = .ctors:0x00000000; // type:label scope:global data:4byte
_dtors = .dtors:0x00000000; // type:label scope:global data:4byte
lbl_1_rodata_10 = .rodata:0x00000010; // type:object size:0x4 data:float
@ -56,7 +56,7 @@ lbl_1_data_58 = .data:0x00000058; // type:object size:0x4
lbl_1_data_5C = .data:0x0000005C; // type:object size:0x1A data:string
lbl_1_data_76 = .data:0x00000076; // type:object size:0x13 data:string
lbl_1_data_89 = .data:0x00000089; // type:object size:0x17
lbl_1_data_A0 = .data:0x000000A0; // type:object size:0x307D
logoNintendoData = .data:0x000000A0; // type:object size:0x307D align:32
lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x6
lbl_1_bss_6 = .bss:0x00000006; // type:object size:0x2 data:2byte
lbl_1_bss_8 = .bss:0x00000008; // type:object size:0x6 data:2byte

View file

@ -4870,7 +4870,17 @@ jumptable_80122528 = .data:0x80122528; // type:object size:0x28 scope:local
lbl_80122550 = .data:0x80122550; // type:object size:0x19 data:string
lbl_80122569 = .data:0x80122569; // type:object size:0xA data:string
lbl_80122573 = .data:0x80122573; // type:object size:0x2D
refMapData0 = .data:0x801225A0; // type:object size:0xAFC0 align:32 noreloc
refMapData0 = .data:0x801225A0; // type:object size:0x1240 align:32 noreloc
refMapData1 = .data:0x801237E0; // type:object size:0x1100 align:32 noreloc
refMapData2 = .data:0x801248E0; // type:object size:0x2080 align:32 noreloc
refMapData3 = .data:0x80126960; // type:object size:0x2080 align:32 noreloc
refMapData4 = .data:0x801289E0; // type:object size:0x2080 align:32 noreloc
toonMapData = .data:0x8012AA60; // type:object size:0x880 align:32 noreloc
toonMapData2 = .data:0x8012B2E0; // type:object size:0x1080 align:32 noreloc
hiliteData = .data:0x8012C360; // type:object size:0x480 align:32 noreloc
hiliteData2 = .data:0x8012C7E0; // type:object size:0x480 align:32 noreloc
hiliteData3 = .data:0x8012CC60; // type:object size:0x480 align:32 noreloc
hiliteData4 = .data:0x8012D0E0; // type:object size:0x480 align:32 noreloc
lbl_8012D560 = .data:0x8012D560; // type:object size:0x1B data:string
lbl_8012D57B = .data:0x8012D57B; // type:object size:0x16 data:string
lbl_8012D591 = .data:0x8012D591; // type:object size:0x21 data:string

View file

@ -118,7 +118,7 @@ if not is_windows():
# Tool versions
config.compilers_tag = "20231018"
config.dtk_tag = "v0.6.2"
config.dtk_tag = "v0.6.3"
config.sjiswrap_tag = "v1.1.1"
config.wibo_tag = "0.6.3"
@ -173,7 +173,7 @@ cflags_runtime = [
# REL flags
cflags_rel = [
*cflags_base,
"-O0,s",
"-O0,p",
"-enum int",
"-char unsigned",
"-fp_contract off",
@ -287,6 +287,17 @@ config.libs = [
Object(Matching, "REL/_minigameDLL/_minigameDLL.c"),
],
},
{
"lib": "bootDll",
"mw_version": config.linker_version,
"cflags": cflags_rel,
"host": False,
"objects": [
Object(Matching, "REL/executor.c"),
Object(NonMatching, "REL/bootDll/bootDll.c"),
Object(Matching, "REL/bootDll/nintendo_data.c"), #Waiting for REL asset extraction to be fixed
],
},
{
"lib": "subchrselDll",
"mw_version": config.linker_version,

View file

@ -0,0 +1,15 @@
#include "common.h"
extern u8 logoNintendoData[];
void *logoReadNintendo(void)
{
u32 *src = (u32 *)logoNintendoData;
u32 size = *src++;
void *dst = HuMemDirectMalloc(HEAP_DATA, size);
int decode_type = *src++;
if(dst) {
HuDecodeData(src, dst, size, decode_type);
}
return dst;
}

View file

@ -1 +1 @@
#include "game/ank8x8_4b.inc"
#include "ank8x8_4b.inc"