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

Fix startflags crash #61

Merged
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
4 changes: 2 additions & 2 deletions asm/additions/diffs/rust-additions-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
0x20, 0x00, 0x80, 0x52, 0xFE, 0x4F, 0xC1, 0xA8, 0xC0, 0x03, 0x5F, 0xD6, 0xFE, 0x6F,
0xBB, 0xA9, 0xF4, 0x4F, 0x04, 0xA9, 0xB3, 0x5A, 0xEA, 0xF0, 0xFA, 0x67, 0x01, 0xA9,
0xC9, 0xA0, 0x99, 0x52, 0xF8, 0x5F, 0x02, 0xA9, 0x48, 0x1A, 0x00, 0xB0, 0x08, 0x01,
0x00, 0x91, 0xF6, 0x57, 0x03, 0xA9, 0xF5, 0x03, 0x1F, 0x2A, 0xF6, 0xFF, 0x9F, 0x52,
0x08, 0x91, 0xF6, 0x57, 0x03, 0xA9, 0xF5, 0x03, 0x1F, 0x2A, 0xF6, 0xFF, 0x9F, 0x52,
0x77, 0xBC, 0xE9, 0x90, 0x74, 0xBC, 0xE9, 0x90, 0x18, 0x01, 0x80, 0x52, 0x59, 0x1A,
0x00, 0xB0, 0x39, 0x43, 0x1F, 0x91, 0x1A, 0x00, 0x00, 0xD0, 0x5A, 0x03, 0x00, 0x91,
0x00, 0xB0, 0x39, 0x43, 0x27, 0x91, 0x1A, 0x00, 0x00, 0xD0, 0x5A, 0x03, 0x00, 0x91,
0x2A, 0x00, 0x80, 0x52, 0x6B, 0x62, 0x46, 0xF9, 0x6A, 0x69, 0x29, 0x38, 0xFB, 0x03,
0x08, 0xAA, 0x61, 0x27, 0x40, 0x78, 0x3F, 0x00, 0x16, 0x6B, 0xE0, 0x08, 0x00, 0x54,
0xBF, 0x0E, 0x00, 0x71, 0x28, 0x09, 0x00, 0x54, 0xE8, 0x03, 0x15, 0x2A, 0x89, 0x00,
Expand Down
2 changes: 1 addition & 1 deletion asm/symbols.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ main:
GameReloader__triggerExit: 0x08df9478

# Custom Symbols
STARTFLAGS: 0x363EF000 # start of subsdk8 data section
STARTFLAGS: 0x363EF200 # start of subsdk8 data section + 0x200
1 change: 1 addition & 0 deletions constants/asmconstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
SUBSDK8_DATA_START = SUBSDK8_TEXT_START + 0x55A000

SUBSDK_SIZE = SUBSDK8_TEXT_START - SUBSDK1_START
SUBSDK_STARTFLAG_OFFSET = SUBSDK8_RODATA_START + 0x200


# Offsets defined as the equivalent subsdk1 offset plus its size.
Expand Down
2 changes: 1 addition & 1 deletion patches/asmpatchhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def patch_startflags(
# Convert startflags_data into a list of bytes.
startflags_data_bytes = startflags_data.getvalue()
startflags_data_dict = {
SUBSDK8_RODATA_START: list(
SUBSDK_STARTFLAG_OFFSET: list(
struct.unpack("B" * len(startflags_data_bytes), startflags_data_bytes)
)
}
Expand Down