Skip to content

Commit

Permalink
RomBytes save: lower threshold for printing offsets in file
Browse files Browse the repository at this point in the history
- only increases filesize by about 200K but greatly improves chances you can merge things by hand, easy tradeoff
  • Loading branch information
binary1230 committed Dec 17, 2023
1 parent c1f7126 commit f103d5a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ public record RomBytesOutputFormatSettings
/// less search area when doing tricky merges.
/// Comments are ignore on load.
/// This is only used when saving, not loading.
/// Smaller numbers here make easier merges, but, increase the filesize.
/// 0x4000 is a nice tradeoff between negligible file increase and much better merge friendliness
/// </summary>
public int InsertCommentIntoOutputLinesEveryNBytes { get; init; } = 0x4000;
public int InsertCommentIntoOutputLinesEveryNBytes { get; init; } = 0x800;
}


Expand Down Expand Up @@ -328,7 +330,7 @@ public void Write(IFormatWriter writer, RomBytes instance)
{
// at this lower level we do have all the rom bytes but we don't have bank/mapping info.
// so, try to keep InsertCommentIntoOutputLinesEveryNBytes a multiple of something that lines up on every bank length on the SNES.
lines.Add($";offset={romOffset:X6}");
lines.Add($";pos={romOffset:X6}");
}

// debug check, optional:
Expand Down

0 comments on commit f103d5a

Please sign in to comment.