Reduce Amiga handler size with scoped helpers and CDDA formatting - #19
Merged
Conversation
Limit host-only core utilities to non-Amiga builds and keep their public declarations consistent with those guards. Make the ISO directory stub private, retain external linkage for OS4 vector operations, and omit OS4-only wrappers from the classic handler. This lets release builds drop unused code without removing any operations used by the current OS3 or OS4 frontends.
Replace printf-based CDDB and CD-Text formatting with bounded string, decimal and hexadecimal append helpers. Share numeric key/value lines and CD-Text keys so the output structure remains readable without repeating block and track prefixes at each call site. Keep the generated metadata unchanged and check the complete CDDB and CD-Text output in the existing unit tests. Removing the CDDA formatter dependency reduces the size of release handlers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release handlers retain unused helpers and pull in the general formatter for generated CDDA metadata. Limit helper visibility by frontend and build CDDB/CD-Text output with bounded string and numeric helpers, preserving the generated contents. Shared field and CD-Text key helpers keep the formatting call sites readable.
The first commit makes the ISO directory helper private, limits unused core utilities to host builds with matching header declarations, and retains OS4 vector exports while omitting OS4-only wrappers from OS3. The second replaces CDDA printf formatting and checks the complete generated CDDB and CD-Text files in the existing tests.
Measured stripped artifact sizes against
441d765, using fresh source/build directories and identical version/date metadata:Validation: all 112 host unit tests passed; fresh OS3 68000, OS3 68020, OS4 executable/Kickstart, and ROM builds passed. Measurements used m68k GCC 13.4.0b (20260811114005) and PPC GCC 8.4.0 with release settings and debug logging disabled. The ROM remains byte-for-byte identical: it excludes CDDA and already removes unused code through LTO. Amiga runtime behavior was not tested.