Skip to content

Simplify PortaPack detection and init API#1781

Merged
martinling merged 1 commit into
greatscottgadgets:mainfrom
martinling:portapack-detection
Jun 17, 2026
Merged

Simplify PortaPack detection and init API#1781
martinling merged 1 commit into
greatscottgadgets:mainfrom
martinling:portapack-detection

Conversation

@martinling

Copy link
Copy Markdown
Member

Previously, we had a somewhat overcomplicated method for PortaPack detection and conditional usage.

The portapack weak symbol was used to detect both whether PortaPack support was compiled-in (i.e. not RAD1O or JAWBREAKER builds), and if not NULL, could be called to detect whether a PortaPack was present at runtime, returning either a pointer to a structure or NULL.

There was another weak symbol for portapack_reference_oscillator which could also be NULL.

Most of this logic has been obsoleted by our new platform logic in #1715, and at this point all we need is a simple boolean test for whether a PortaPack is present.

This PR provides that in the form of portapack_present(), and for convenience, also returns this from portapack_init().

@martinling martinling added this to the harmony milestone Jun 12, 2026
@martinling
martinling requested a review from antoinevg June 16, 2026 16:21
@mossmann
mossmann requested review from mndza and removed request for mndza June 16, 2026 16:21

@antoinevg antoinevg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@martinling
martinling merged commit 95a30a9 into greatscottgadgets:main Jun 17, 2026
98 checks passed
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

Successfully merging this pull request may close these issues.

2 participants