Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish decompiling ereader.s #37

Merged
merged 16 commits into from
Jan 7, 2024
Merged
15 changes: 14 additions & 1 deletion .github/calcrom/calcrom.pl
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@
if ($verbose != 0)
{
my $nonmatching_cmd = "git grep -E '#if[n]?def NONMATCHING' ':/' ':(exclude)*.pl'";

my $todo_cmd = "git grep 'TODO' ':/' ':(exclude)*.pl'";
my $functions_remaining_cmd = "git grep 'thumb_func_start' ':/asm/**.s'";

my $nonmatching_as_string;
(run (
Expand All @@ -284,6 +284,14 @@
))
or die "ERROR: Error while calculating TODO totals: $?";

my $functions_remaining_as_string;
(run (
command => "$functions_remaining_cmd | $count_cmd",
buffer => \$functions_remaining_as_string,
timeout => 60
))
or die "ERROR: Error while calculating TODO totals: $?";

my $nonmatching_count = $nonmatching_as_string + 0;
(($nonmatching_count != 0) and ($nonmatching_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$nonmatching_as_string'";
Expand All @@ -292,7 +300,12 @@
(($todo_count != 0) and ($todo_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$todo_as_string'";

my $functions_remaining_count = $functions_remaining_as_string + 0;
(($functions_remaining_count != 0) and ($functions_remaining_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$functions_remaining_as_string'";

print "\n";
printf "%8d functions are NONMATCHING\n", $nonmatching_count;
printf "%8d functions remain\n", $functions_remaining_count;
printf "%8d comments are labeled TODO\n", $todo_count;
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
dd if=/dev/zero of=zero.gba bs=16777216 count=1
xdelta3 -d -s zero.gba baserom.xdelta baserom.gba

- name: Build pokepinball
- name: Build pokepinballrs
run: make -j$(nproc)\

- name: Webhook
Expand Down
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif
endif

COMPARE ?= 0

ifeq (compare,$(MAKECMDGOALS))
COMPARE := 1
endif

PREFIX := arm-none-eabi-
OBJCOPY := $(PREFIX)objcopy
AS := $(PREFIX)as
Expand Down Expand Up @@ -108,10 +114,12 @@ OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
MAKEFLAGS += --no-print-directory

rom: $(ROM)
ifeq ($(COMPARE),1)
@$(SHA1) pokepinballrs.sha1
endif

# For contributors to make sure a change didn't affect the contents of the ROM.
compare: $(ROM)
@$(SHA1) pokepinballrs.sha1
compare: rom

clean: tidy clean-tools
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
Expand Down Expand Up @@ -143,7 +151,6 @@ include graphics_rules.mk
%.lz: % ; $(GFX) $< $@
%.rl: % ; $(GFX) $< $@

# TODO: these "match" under old_agbcc, but the true compiler is agbcc -fprologue-bugfix
$(C_BUILDDIR)/m4a.o: CFLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm
$(C_BUILDDIR)/m4a.o: CC1 := tools/agbcc/bin/old_agbcc

Expand Down
Loading