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

Exporting as binary does not match the original .Dol #68

Open
Venomalia opened this issue Feb 4, 2023 · 2 comments
Open

Exporting as binary does not match the original .Dol #68

Venomalia opened this issue Feb 4, 2023 · 2 comments

Comments

@Venomalia
Copy link

The header and an area in the middle does not match the original file when exported.
if i fix these bits manually everything works as intended.

Reproduction:

  1. Import a Gamecube dol file
  2. Export a Gamecube dol file as binary
@Tenchi2xh
Copy link

@Venomalia I am encountering the same issue, how did you go about solving it?

I manually fixed it like this:

# Copy header from original
dd if=main.dol of=header.bin bs=1 count=256
cat header.bin "$1" > tmp.bin
mv tmp.bin "$1"
rm header.bin

# Remove block from 0x2620 to 0x15ba0
dd if="$1" bs=16 skip=$((0x262)) count=$((0x15ba - 0x262)) of=block.bin
dd if="$1" bs=16 count=$((0x262)) of=tmp.bin
dd if="$1" bs=16 skip=$((0x15ba)) >> tmp.bin
mv tmp.bin "$1"

# Add block back to 0x219e60
dd if="$1" bs=16 count=$((0x219e6)) of=tmp.bin
cat block.bin >> tmp.bin
dd if="$1" bs=16 skip=$((0x219e6)) >> tmp.bin
mv tmp.bin "$1"

But I am worried that if I now start editing the data and making strings longer, these offsets might break

@Venomalia
Copy link
Author

I only used a hex editor, but I think the offset remains the same.

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

2 participants