Continue working on splat integration

This commit is contained in:
Zac 2024-06-27 19:37:50 +00:00 committed by GitHub
parent ae021a4a64
commit 1d783d368d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 28 additions and 9 deletions

View File

@ -4,7 +4,8 @@ TARGETTYPE := bin
ASM_PATH := asm/
ASSET_PATH := assets/
SPLAT_C_PATH := c/
SPLAT_C_PATH := src/
ASMS := $(shell find $(ASM_PATH) -name '*.s')
SDIR = src/P2
IDIR = include
@ -22,11 +23,12 @@ SPLAT_YAML ?= config/sly1.yaml
# Custom compiler flags
CCDEFINES := -D__BUILD_USER=\"$(USER)\"
CCINCLUDES = -I$(IDIR) -I$(SCE_COMMON)/include -I$(SCE_EE)/include
CCFLAGS = -Wall -Wno-unused $(BASEFLAGS) -fno-strict-aliasing $(CCINCLUDES) $(CCDEFINES)
CXXFLAGS = $(CCFLAGS)
LDLIBS = -L$(SCE_EE)/lib -lsn -lc -lm -lpad -lmpeg -ldma -lipu -lkernl
LDFLAGS = -nostartfiles -Wl,-Map,$(realpath $(OUTDIR)/$(NAME).map) -T$(SCE_EE)/lib/app.cmd $(LDLIBS)
LDFLAGS = -fuse-ld=mold -nostartfiles -T../../$(LD_SCRIPT) $(LDLIBS)
include build/core.mk

View File

@ -1,7 +1,7 @@
include build/ee-common.mk
OBJS := $(OBJDIR)/crt0.o $(OBJS)
OUTDIR := bin/$(CONFIG)
OUTDIR := out/$(CONFIG)
#CRT0_S = $(ASM_PATH)sce/crt0.s

View File

@ -4,10 +4,12 @@ ifeq ($(WINE),y)
CC := wine $(SCE_EE)/gcc/bin/ee-gcc.exe
CXX := wine $(SCE_EE)/gcc/bin/ee-gcc.exe
CRT0_S := $(SCE_WINE)/ee/lib/crt0.s
AS := wine $(SCE_WINE)/ee/bin/ee-as.exe
else
CC := $(SCE_EE_GCC)/bin/ee-gcc.exe
CXX := $(SCE_EE_GCC)/bin/ee-gcc.exe
CRT0_S := $(SCE_EE)/lib/crt0.s
AS := $(SCE_EE)/bin/ee-as.exe
endif
# Rewrite the object files to maintain directory structure

View File

@ -11,7 +11,7 @@ options:
asm_path: asm
src_path: src
build_path: bin
build_path: obj
find_file_boundaries: False
disasm_unknown: True
@ -23,7 +23,6 @@ options:
create_undefined_syms_auto: True
undefined_syms_auto_path: config/undefined_syms_auto.txt
# Symbol addrs file generated using a ghidra script
symbol_addrs_path: config/symbol_addrs.txt
extensions_path: tools/splat_ext
@ -32,7 +31,10 @@ options:
auto_all_sections: [".rodata", ".data", ".bss"]
subalign: 0x4
# Linker script options
subalign: null
ld_align_section_vram_end: False
ld_align_segment_vram_end: False
segments:
- [0, databin, elf_header]
@ -316,12 +318,12 @@ segments:
#----------------------------------------
# Rodata
#----------------------------------------
#- [0x118380, rodata]
- [0x118380, rodata]
#----------------------------------------
# Data
#----------------------------------------
#- [0x151580, data]
- [0x151580, data]
- [0x17C200, databin]
- [0x1A20D0]

13
include/include_rodata.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef INCLUDE_RODATA_H
#define INCLUDE_RODATA_H
#ifndef INCLUDE_RODATA
#define INCLUDE_RODATA(FOLDER, NAME) \
__asm__( \
".section .rodata\n" \
"\t.include" FOLDER "/" #NAME \
".s\"\n" \
".section .text");
#endif
#endif /* INCLUDE_RODATA_H */

View File

@ -1,6 +1,6 @@
spimdisasm>=1.18.0
rabbitizer>=1.8.0
splat64>=0.23.0
splat64>=0.24.4
tqdm
n64img
pygfxd