Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ["3.8"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run checks
Expand All @@ -31,9 +31,9 @@ jobs:
python-version: ["3.x"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run checks
Expand All @@ -47,9 +47,9 @@ jobs:
python-version: ["3.x"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run checks
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/release.yml

This file was deleted.

5 changes: 2 additions & 3 deletions ASM/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,17 @@ $(OBJDIR):
mkdir -p $@

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


$(RESOURCEDIR):
mkdir -p $@

$(OBJECTS): | $(OBJDIR)

$(RESOURCES): | $(RESOURCEDIR)
$(RESOURCES): | $(OBJDIR) $(RESOURCEDIR)

bundle: $(RESOURCES) $(OBJECTS)
$(LD) -T linker_script.ld -T ootSymbols.ld -o $(OUTDIR)/bundle.o -i -L. $(patsubst %.o,-l:%.o,$(OBJECTS) $(RESOURCES))
Expand Down
10 changes: 6 additions & 4 deletions ASM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,16 @@ You'll need to disable `Unique Game Save Directory` in Project64 for these to wo

How to use the Debug mode:
- First put the DEBUG_MODE variable at 1 in debug.h.
- You will then have access to a hidden menu with the following options:
- 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:
- Instant warps to Dungeons, Bosses or Overworld locations
- Item inventory edits
- Instant age switch with the current location kept
- Bunny Hood applied on
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.
- Bunny Hood
- In-game clock
- Actor and overlay list
- Scene flags setters
The menu will appear if you press R + either L or Dpad Up.
Use Dpad-Left/Dpad-Right and A/B to navigate it.
The L Button will also allow you to levitate.
The warps and items are easily customizable with the code at the top of debug.c.
- Additionally, you can call functions to print numbers on screen, to help you debug new features.
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
Expand Down
20 changes: 19 additions & 1 deletion ASM/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@
'address': address,
}

# Loop through a second time, add lengths to each data symbol
# This could probably be optimized to run in a single pass :)
with open('build/asm_symbols.txt', 'r') as f:
for line in f:
parts = line.strip().split(' ')
if len(parts) < 2:
continue
address, sym_name = parts
if sym_name.startswith('.'):
# split on the ':' to get the length, in hex
type, hex_length = sym_name.split(':')
for symbol, sym_data in symbols.items():
if sym_data['address'] == address and sym_data['type'] == 'data':
sym_data['length'] = int(hex_length, 16)

# Output symbols

os.chdir(run_dir)
Expand All @@ -116,7 +131,10 @@
addr = addr - 0x80400000 + 0x03480000
else:
continue
data_symbols[name] = '{0:08X}'.format(addr)
data_symbols[name] = {
'address': f'{addr:08X}',
'length': sym.get('length', 0),
}
with open('../data/generated/symbols.json', 'w') as f:
json.dump(data_symbols, f, indent=4, sort_keys=True)

Expand Down
Loading