Skip to content

Commit 3bd2cc7

Browse files
authored
Merge pull request #10 from fenhl/rebase-bronze-scale
Merge Dev
2 parents 2c1257e + 4779014 commit 3bd2cc7

208 files changed

Lines changed: 56485 additions & 43242 deletions

File tree

Some content is hidden

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

.github/workflows/python.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
python-version: ["3.8"]
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Run checks
@@ -31,9 +31,9 @@ jobs:
3131
python-version: ["3.x"]
3232

3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939
- name: Run checks
@@ -47,9 +47,9 @@ jobs:
4747
python-version: ["3.x"]
4848

4949
steps:
50-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
5151
- name: Set up Python ${{ matrix.python-version }}
52-
uses: actions/setup-python@v4
52+
uses: actions/setup-python@v5
5353
with:
5454
python-version: ${{ matrix.python-version }}
5555
- name: Run checks

.github/workflows/release.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

ASM/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,17 @@ $(OBJDIR):
3434
mkdir -p $@
3535

3636
$(OBJDIR)/%_bin.o: $(RESOURCEDIR)/%.bin
37-
$(OBJCOPY) -I binary -O elf32-bigmips --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
37+
$(OBJCOPY) -I binary -O elf32-bigmips --set-section-alignment .data=8 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
3838
$(OBJCOPY) --redefine-sym _binary_resources_$*_bin_start=$(call UC,$*)_RESOURCE $@
3939
$(OBJCOPY) --redefine-sym _binary_resources_$*_bin_end=$(call UC,$*)_RESOURCE_END $@
4040
$(OBJCOPY) --redefine-sym _binary_resources_$*_bin_size=$(call UC,$*)_RESOURCE_SIZE $@
4141

42-
4342
$(RESOURCEDIR):
4443
mkdir -p $@
4544

4645
$(OBJECTS): | $(OBJDIR)
4746

48-
$(RESOURCES): | $(RESOURCEDIR)
47+
$(RESOURCES): | $(OBJDIR) $(RESOURCEDIR)
4948

5049
bundle: $(RESOURCES) $(OBJECTS)
5150
$(LD) -T linker_script.ld -T ootSymbols.ld -o $(OUTDIR)/bundle.o -i -L. $(patsubst %.o,-l:%.o,$(OBJECTS) $(RESOURCES))

ASM/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@ You'll need to disable `Unique Game Save Directory` in Project64 for these to wo
5858

5959
How to use the Debug mode:
6060
- First put the DEBUG_MODE variable at 1 in debug.h.
61-
- You will then have access to a hidden menu with the following options:
61+
- Now the N64 logo sequence at the start of the game will be skipped, the L button will allow you to levitate and you will then have access to a hidden menu with the following options:
6262
- Instant warps to Dungeons, Bosses or Overworld locations
6363
- Item inventory edits
6464
- Instant age switch with the current location kept
65-
- Bunny Hood applied on
66-
The menu will appear if you press either L+R or Dpad-Up according to what you set for the menu_not_on_dup variable in debug.c.
65+
- Bunny Hood
66+
- In-game clock
67+
- Actor and overlay list
68+
- Scene flags setters
69+
The menu will appear if you press R + either L or Dpad Up.
6770
Use Dpad-Left/Dpad-Right and A/B to navigate it.
68-
The L Button will also allow you to levitate.
6971
The warps and items are easily customizable with the code at the top of debug.c.
7072
- Additionally, you can call functions to print numbers on screen, to help you debug new features.
7173
Call either draw_debug_int or draw_debug_float in your code, with the first argument being the number wanted to be displayed, and the

ASM/build.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,21 @@
102102
'address': address,
103103
}
104104

105+
# Loop through a second time, add lengths to each data symbol
106+
# This could probably be optimized to run in a single pass :)
107+
with open('build/asm_symbols.txt', 'r') as f:
108+
for line in f:
109+
parts = line.strip().split(' ')
110+
if len(parts) < 2:
111+
continue
112+
address, sym_name = parts
113+
if sym_name.startswith('.'):
114+
# split on the ':' to get the length, in hex
115+
type, hex_length = sym_name.split(':')
116+
for symbol, sym_data in symbols.items():
117+
if sym_data['address'] == address and sym_data['type'] == 'data':
118+
sym_data['length'] = int(hex_length, 16)
119+
105120
# Output symbols
106121

107122
os.chdir(run_dir)
@@ -116,7 +131,10 @@
116131
addr = addr - 0x80400000 + 0x03480000
117132
else:
118133
continue
119-
data_symbols[name] = '{0:08X}'.format(addr)
134+
data_symbols[name] = {
135+
'address': f'{addr:08X}',
136+
'length': sym.get('length', 0),
137+
}
120138
with open('../data/generated/symbols.json', 'w') as f:
121139
json.dump(data_symbols, f, indent=4, sort_keys=True)
122140

0 commit comments

Comments
 (0)