Skip to content

Commit e1d4d37

Browse files
committed
Updating to latest n64splat
1 parent 5ba7090 commit e1d4d37

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1061
-711
lines changed

.bash_aliases

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# bash aliases for ease of use, copy/append to ~/.bash_aliases
2+
3+
alias m2c='python3 tools/mips_to_c/mips_to_c.py '
4+
alias di='python3 tools/decomp-permuter/import.py '
5+
alias dp='python3 tools/decomp-permuter/permuter.py --best-only -j3 '
6+
alias ad='python3 tools/asm-differ/diff.py -mwo3 '

.github/workflows/docker.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Create and push Docker build image
2+
on:
3+
push:
4+
branches: [ master ]
5+
jobs:
6+
push_to_dockerhub:
7+
name: Publish Docker build image to Docker Hub + Github Registry
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
steps:
12+
- name: Check out the repo
13+
uses: actions/checkout@v2
14+
- name: Log in to Docker Hub
15+
uses: docker/login-action@v1
16+
with:
17+
username: ${{ secrets.DOCKERHUB_USERNAME }}
18+
password: ${{ secrets.DOCKERHUB_TOKEN }}
19+
- name: Log in to GitHub Docker Registry
20+
uses: docker/login-action@v1
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.repository_owner }}
24+
password: ${{ secrets.GHCR_PAT }}
25+
- name: Build and push to Docker Hub
26+
uses: docker/build-push-action@v2
27+
with:
28+
push: true
29+
tags: markstreet/conker:latest
30+
- name: Build and push to Github registry
31+
uses: docker/build-push-action@v2
32+
with:
33+
push: true
34+
tags: ghcr.io/${{ github.repository_owner }}/conker:latest

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
__pycache__/
44
asm/
5+
assets/
56
bin/
67
build/
78
expected/
@@ -35,4 +36,3 @@ conker/ctx.c
3536

3637
tools/decomp-permuter
3738
tools/gfxdis
38-
tools/mips_to_c

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
[submodule "tools/asm-processor"]
88
path = tools/asm-processor
99
url = https://github.com/simonlindholm/asm-processor.git
10+
[submodule "tools/mips_to_c"]
11+
path = tools/mips_to_c
12+
url = git@github.com:matt-kempster/mips_to_c.git

Dockerfile

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@ FROM ubuntu:20.04 as build
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update && \
6-
apt-get install -y \
7-
binutils-mips-linux-gnu \
8-
build-essential \
9-
less \
10-
libglib2.0 \
11-
python3 \
12-
python3-pip \
13-
unzip \
14-
wget
5+
COPY /packages.txt /
156

16-
RUN python3 -m pip install \
17-
capstone pyyaml pycparser \
18-
colorama ansiwrap watchdog python-Levenshtein cxxfilt \
19-
python-ranges \
20-
pypng
7+
RUN apt-get update && apt-get install -y $(cat /packages.txt)
8+
9+
COPY requirements.txt /
10+
11+
RUN python3 -m pip install -r /requirements.txt --no-cache-dir
12+
13+
COPY .bash_aliases /root/.bash_aliases
2114

2215
RUN mkdir /conker
2316
WORKDIR /conker

Makefile

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BUILD_DIR = build
55
TARGET = $(BUILD_DIR)/$(BASENAME).$(VERSION)
66
GAME_DIR = $(BASENAME)
77

8-
BIN_DIR = bin
8+
BIN_DIR = assets
99

1010
ifeq ($(VERSION),ects)
1111
BIN_FILES = $(wildcard $(BIN_DIR)/*.bin)
@@ -16,11 +16,10 @@ endif
1616

1717
EXTRACT_DIR = extracted
1818

19-
RZIP_DIRS = $(wildcard rzip/assets*)
20-
RZIP_FILES = $(wildcard rzip/assets*/assets*.bin)
21-
22-
O_FILES = $(foreach file,$(BIN_FILES) $(RZIP_FILES),$(BUILD_DIR)/$(file:.bin=.o))
19+
RZIP_DIRS = $(wildcard $(BIN_DIR)/rzip/assets*)
20+
RZIP_FILES = $(wildcard $(BIN_DIR)/rzip/assets*/assets*.bin)
2321

22+
O_FILES = $(foreach file,$(BIN_FILES) $(RZIP_FILES),$(BUILD_DIR)/$(file:.bin=.bin.o))
2423

2524
CROSS = mips-linux-gnu-
2625
CPP = cpp
@@ -50,7 +49,7 @@ clean:
5049
rm -rf build
5150

5251
really-clean: clean
53-
rm -rf bin
52+
rm -rf assets
5453
rm -rf rzip
5554
make -C $(GAME_DIR) really-clean
5655

@@ -71,7 +70,7 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
7170
$(TARGET).elf: $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT)
7271
@$(LD) $(LDFLAGS) -o $@
7372

74-
$(BUILD_DIR)/%.o: %.bin
73+
$(BUILD_DIR)/%.bin.o: %.bin
7574
$(LD) -r -b binary -o $@ $<
7675

7776
$(TARGET).bin: $(TARGET).elf
@@ -81,22 +80,22 @@ $(TARGET).z64: $(TARGET).bin
8180
@cp $< $@
8281

8382
# combine
84-
$(GAME_DIR)/$(BASENAME).$(VERSION).bin: bin/game.$(VERSION).bin
85-
cat bin/header.$(VERSION).bin bin/boot.$(VERSION).bin bin/init.$(VERSION).bin bin/game.$(VERSION).bin bin/debugger.$(VERSION).bin > $@
83+
$(GAME_DIR)/$(BASENAME).$(VERSION).bin: $(BIN_DIR)/game.$(VERSION).bin
84+
cat $(BIN_DIR)/header.$(VERSION).bin $(BIN_DIR)/boot.$(VERSION).bin $(BIN_DIR)/init.$(VERSION).bin $(BIN_DIR)/game.$(VERSION).bin $(BIN_DIR)/debugger.$(VERSION).bin > $@
8685

8786
# game code is not compressed in ECTS ROM
8887
ifeq ($(VERSION),ects)
89-
bin/game.$(VERSION).bin: $(BASENAME).$(VERSION).yaml
90-
$(PYTHON) tools/n64splat/split.py baserom.$(VERSION).z64 $< .
88+
$(BIN_DIR)/game.$(VERSION).bin: $(BASENAME).$(VERSION).yaml
89+
$(PYTHON) tools/n64splat/split.py $<
9190
else
92-
bin/game.$(VERSION).bin: bin/game/rzip/data/0000.bin
93-
cat bin/game/rzip/code/0*.bin bin/game/rzip/data/0000.bin > $@
91+
$(BIN_DIR)/game.$(VERSION).bin: $(BIN_DIR)/game/rzip/data/0000.bin
92+
cat $(BIN_DIR)/game/rzip/code/0*.bin $(BIN_DIR)/game/rzip/data/0000.bin > $@
9493

95-
bin/game/rzip/data/0000.bin: bin/game.$(VERSION).rzip.bin
96-
$(PYTHON) tools/n64splat/split.py $< game.$(VERSION).rzip.yaml bin/game --modes bin rzip
94+
$(BIN_DIR)/game/rzip/data/0000.bin: $(BIN_DIR)/game.$(VERSION).rzip.bin
95+
$(PYTHON) tools/n64splat/split.py game.$(VERSION).rzip.yaml --modes bin rzip
9796

98-
bin/game.$(VERSION).rzip.bin: $(BASENAME).$(VERSION).yaml
99-
$(PYTHON) tools/n64splat/split.py baserom.$(VERSION).z64 $< .
97+
$(BIN_DIR)/game.$(VERSION).rzip.bin: $(BASENAME).$(VERSION).yaml
98+
$(PYTHON) tools/n64splat/split.py $<
10099
endif
101100

102101
.baserom.$(VERSION).ok: baserom.$(VERSION).z64
@@ -105,7 +104,7 @@ endif
105104

106105
$(EXTRACT_DIR)/00000000.bin:
107106
@mkdir -p $(EXTRACT_DIR)
108-
$(PYTHON) tools/extract_compressed.py config/compressed.$(VERSION).yaml bin/compressed.bin $(EXTRACT_DIR)
107+
$(PYTHON) tools/extract_compressed.py config/compressed.$(VERSION).yaml $(BIN_DIR)/compressed.bin $(EXTRACT_DIR)
109108

110109
# settings
111110
.PHONY: all clean default

conker.debug.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
basename: conker
21
options:
2+
basename: conker
3+
target_path: baserom.debug.z64
4+
base_path: .
35
compiler: IDO
4-
extensions: "custom/n64splat"
6+
extensions_path: tools/splat_ext
57
segments:
68
- name: header.debug
79
type: bin

conker.ects.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
basename: conker
21
options:
2+
basename: conker
3+
target_path: baserom.ects.z64
4+
base_path: .
35
compiler: IDO
4-
extensions: "custom/n64splat"
6+
extensions_path: tools/splat_ext
57
segments:
68
- name: header.ects
79
type: bin

conker.eu.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
basename: conker
21
options:
2+
basename: conker
3+
target_path: baserom.eu.z64
4+
base_path: .
35
compiler: IDO
4-
extensions: "custom/n64splat"
6+
extensions_path: tools/splat_ext
7+
sha1: ee7bc6656fd1e1d9ffb3d19add759f28b88df710
58
segments:
69
- name: header.eu
710
type: bin

conker.us.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
basename: conker
21
options:
2+
basename: conker
3+
target_path: baserom.us.z64
4+
base_path: .
35
compiler: IDO
4-
extensions: "custom/n64splat"
6+
extensions_path: tools/splat_ext
7+
sha1: 4cbadd3c4e0729dec46af64ad018050eada4f47a
58
segments:
69
- name: header.us
710
type: bin

0 commit comments

Comments
 (0)