Decompiled startup_logo.inc.c (#24)

This commit is contained in:
CoderStig 2021-07-23 03:53:25 -06:00 committed by GitHub
parent 5c23113592
commit 830f1f3d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 2864 additions and 9 deletions

View File

@ -39,7 +39,7 @@ COURSE_DIRS := \
TEXTURES_DIR = textures
ALL_DIRS = $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(COURSE_DIRS) $(INCLUDE_DIRS) $(ASM_DIRS) $(ALL_KARTS_DIRS) $(TEXTURES_DIR)/raw $(TEXTURES_DIR)/standalone)
ALL_DIRS = $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(COURSE_DIRS) $(INCLUDE_DIRS) $(ASM_DIRS) $(ALL_KARTS_DIRS) $(TEXTURES_DIR)/raw $(TEXTURES_DIR)/standalone $(TEXTURES_DIR)/startup_logo)
################### Universal Dependencies ###################
@ -173,6 +173,7 @@ LOADER_FLAGS = -vwf
SHA1SUM = sha1sum
######################## Targets #############################
default: all
@ -206,6 +207,9 @@ $(BUILD_DIR)/%: %.png
$(BUILD_DIR)/textures/%.mio0: $(BUILD_DIR)/textures/%
$(MIO0TOOL) -c $< $@
$(BUILD_DIR)/textures/startup_logo/startup_logo.rgba16.inc.c: textures/startup_logo/startup_logo.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/startup_logo/startup_logo.rgba16.inc.c -g textures/startup_logo/startup_logo.rgba16.png -f rgba16 -s u8
#################### Compressed Segments #####################
$(BUILD_DIR)/%.mio0: %.bin
@ -411,8 +415,18 @@ $(battle)/skyscraper/%.inc.mio0.o: courses/battle/skyscraper/%.inc.c
#################### #####################
# startup_logo.c
$(BUILD_DIR)/$(TARGET).elf: $(O_FILES) $(COURSE_MIO0_OBJ_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(LD_COURSE_VERTEX_DEPENDENCIES) undefined_syms.txt
$(BUILD_DIR)/src/startup_logo.inc.mio0.o: src/startup_logo.inc.c $(BUILD_DIR)/textures/startup_logo/startup_logo.rgba16.inc.c
$(LD) -t -e 0 -Ttext=06000000 -Map $(BUILD_DIR)/src/startup_logo.inc.elf.map -o $(BUILD_DIR)/src/startup_logo.inc.elf $(BUILD_DIR)/src/startup_logo.inc.o --no-check-sections
$(V)$(EXTRACT_DATA_FOR_MIO) $(BUILD_DIR)/src/startup_logo.inc.elf $(BUILD_DIR)/src/startup_logo.inc.bin
$(MIO0TOOL) -c $(BUILD_DIR)/src/startup_logo.inc.bin $(BUILD_DIR)/src/startup_logo.inc.mio0
printf ".include \"macros.inc\"\n\n.data\n\n.align 2, 0x00\n\n.balign 4\n\nglabel startup_logo\n\n.incbin \"build/us/src/startup_logo.inc.mio0\"\n" > build/us/src/startup_logo.inc.mio0.s
$(AS) $(ASFLAGS) -o $(BUILD_DIR)/src/startup_logo.inc.mio0.o $(BUILD_DIR)/src/startup_logo.inc.mio0.s
$(BUILD_DIR)/$(TARGET).elf: $(O_FILES) $(COURSE_MIO0_OBJ_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/src/startup_logo.inc.mio0.o $(LD_COURSE_VERTEX_DEPENDENCIES) undefined_syms.txt
$(LD) $(LDFLAGS) -o $@
# -R $(mushroom_cup)/luigi_raceway/model.inc.elf -R $(mushroom_cup)/moo_moo_farm/model.inc.elf -R $(mushroom_cup)/koopa_beach/model.inc.elf -R $(mushroom_cup)/kalimari_desert/model.inc.elf \

View File

@ -159,3 +159,8 @@ $(MUSIC_DIR)/seq_1E.m64 \
$(MUSIC_DIR)/seq_1F.m64 \
$(MUSIC_DIR)/seq_20.m64 \
$(MUSIC_DIR)/seq_21.m64
# SEGMENTED ADDRESSES
$(BUILD_DIR)/src/startup_logo.elf: SEGMENT_ADDRESS := 0x06000000

View File

@ -1,4 +0,0 @@
.include "macros.inc"
.section .bss

View File

@ -63,7 +63,7 @@
"bin/mk64.u.6A0ABC.bin": {"meta":{"size": "0x72304"}, "offsets":{"us":["0x6A0ABC","0x0"]}},
"bin/mk64.u.724220.bin": {"meta":{"size": "0x5810"}, "offsets":{"us":["0x724220","0x0"]}},
"bin/data_821D10.bin": {"meta":{"size": "0x8D88"}, "offsets":{"us":["0x821D10","0x0"]}},
"bin/data_825800.bin": {"meta":{"size": "0x9480"}, "offsets":{"us":["0x825800","0x0"]}},
"textures/startup_logo/startup_logo.rgba16.png": {"meta":{"dims":[32,32]}, "offsets":{"us":["0x825800", "0x8A48"]}},
"bin/course_mario_raceway_dl.bin": {"meta":{"size": "0x3150"}, "offsets":{"us":["0x8284D0","0x0"]}},
"bin/course_choco_mountain_dl.bin": {"meta":{"size": "0x2920"}, "offsets":{"us":["0x82B620","0x0"]}},
"bin/course_bowsers_castle_dl.bin": {"meta":{"size": "0x3E80"}, "offsets":{"us":["0x82DF40","0x0"]}},

11
include/mk_gbi.h Normal file
View File

@ -0,0 +1,11 @@
#include <PR/gbi.h>
#define __mk_gsSPLine3D_w1f(v0, v1, v2, v3) \
(_SHIFTR((v3), 0,8)|_SHIFTL((v2), 8, 8)| \
_SHIFTL((v1), 16, 8)|_SHIFTL((v0), 24, 8))
#define mk_Line3D(v0, v1, v2, v3) \
{{ \
_SHIFTL(G_LINE3D, 24, 8)|0, \
__mk_gsSPLine3D_w1f(v0, v1, v2, v3) \
}}

View File

@ -61,6 +61,14 @@ typedef struct {
} mk64_Vtx;
typedef struct {
s16 ob[3]; /* x, y, z */
s16 tc[2]; /* texture coord */
s8 flag[2]; /* unk flag */
u8 ca[4]; /* color & alpha */
} mk_Vtx_Logo;
struct courseTable {
u32 *dlRomStart; // 0x00 ROM start for segment 6 DL data
u32 *dlRomEnd; // 0x04 ROM end for segment 6 DL data

View File

@ -374,9 +374,9 @@ SECTIONS
BUILD_DIR/data/data_821D10.o(.data);
}
END_SEG(data_821D10)
BEGIN_SEG(data_825800, 0x0C008D80)
BEGIN_SEG(data_825800, 0x06000000)
{
BUILD_DIR/data/data_825800.o(.data);
BUILD_DIR/src/startup_logo.inc.mio0.o(.data);
. = ALIGN(0x10);
}
END_SEG(data_825800)

2821
src/startup_logo.inc.c Normal file

File diff suppressed because it is too large Load Diff