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

Replace function on WEMs in BNKs not properly removing any extra sections of the file if new WEM is smaller than previous file #10

Open
DannyDan4 opened this issue May 12, 2024 · 2 comments

Comments

@DannyDan4
Copy link

In RE8 mode or MHRise mode, BNKs will not be properly shortened if you replace a WEM with a new, smaller file. All values are properly updated, but any remaining size is just left as junk data at the end of the file, causing malfunctions.

Solution to fix: Open .bnk in a hex editor, locate the last bits of the old file, and remove everything that comes after them, if you're messing with a sound that is not the last one on the file.

@DannyDan4
Copy link
Author

DannyDan4 commented May 13, 2024

So, bad news, after I had figured out how to correct the extra data at the end of the file using a hex editor, fixing this problem, of which I could not get to stop happening, I CAN NOW NO LONGER RECREATE THE ISSUE, REPLACING WEMS NOW WORKS FLAWLESSLY.

@DannyDan4
Copy link
Author

DannyDan4 commented May 15, 2024

Okay, I got the bug to occur again, however, all the same, I cannot determine what is causing the problem, just what is occurring.

Steps I used to reproduce: replace a sound in a .bnk, in RE8 mode, with a sound that is smaller in filesize than the original sound in the file, and hope the bug actually occurs, as it doesn't seem to be consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant