mirror of
https://github.com/projectPiki/pikmin2.git
synced 2025-02-17 04:17:52 +00:00
ci: Generate map & run calcprogress
This commit is contained in:
parent
301149a97e
commit
bdc9d59596
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -24,4 +24,4 @@ jobs:
|
||||
| bsdtar -xvf- -C tools --exclude Wii
|
||||
mv tools/GC tools/mwcc_compiler
|
||||
- name: make
|
||||
run: UPDATE_README=0 make -j
|
||||
run: MAPGENFLAG=1 UPDATE_README=0 make -j$(nproc)
|
||||
|
6
Makefile
6
Makefile
@ -88,6 +88,10 @@ ifeq ($(WINDOWS),1)
|
||||
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp.exe -P
|
||||
else
|
||||
WINE ?= wine
|
||||
# Disable wine debug output for cleanliness
|
||||
export WINEDEBUG ?= -all
|
||||
# Default devkitPPC path
|
||||
DEVKITPPC ?= /opt/devkitpro/devkitPPC
|
||||
AS := $(DEVKITPPC)/bin/powerpc-eabi-as
|
||||
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp -P
|
||||
endif
|
||||
@ -176,7 +180,7 @@ $(DOL): $(ELF) | tools
|
||||
$(QUIET) $(ELF2DOL) $< $@
|
||||
$(QUIET) $(SHA1SUM) -c sha1/$(NAME).$(VERSION).sha1
|
||||
ifneq ($(findstring -map,$(LDFLAGS)),)
|
||||
$(QUIET) $(PYTHON) tools/calcprogress.py $@
|
||||
$(QUIET) $(PYTHON) tools/calcprogress.py $(DOL) $(MAP)
|
||||
endif
|
||||
ifeq ($(UPDATE_README),1)
|
||||
$(WINE) $(READMEGEN)
|
||||
|
@ -31,9 +31,6 @@ import math
|
||||
# #
|
||||
###############################################
|
||||
|
||||
DOL_PATH = "baserom.dol"
|
||||
MAP_PATH = "build/pikmin2.usa/pikmin2UP.MAP"
|
||||
|
||||
MEM1_HI = 0x81200000
|
||||
MEM1_LO = 0x80004000
|
||||
|
||||
@ -84,7 +81,7 @@ dataItem = "treasures" # data flavor item
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Sum up DOL section sizes
|
||||
dol_handle = open(DOL_PATH, "rb")
|
||||
dol_handle = open(sys.argv[1], "rb")
|
||||
|
||||
# Seek to virtual addresses
|
||||
dol_handle.seek(0x48)
|
||||
@ -126,7 +123,7 @@ if __name__ == "__main__":
|
||||
dol_code_size += i
|
||||
|
||||
# Open map file
|
||||
mapfile = open(MAP_PATH, "r")
|
||||
mapfile = open(sys.argv[2], "r")
|
||||
symbols = mapfile.readlines()
|
||||
|
||||
decomp_code_size = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user