Skip to content

Fix shapeshifer - #161

Open
Kamelitoloveless wants to merge 5 commits into
ApolloTeam-dev:masterfrom
Kamelitoloveless:fix-shapeshifer
Open

Kamelitoloveless wants to merge 5 commits into
ApolloTeam-dev:masterfrom
Kamelitoloveless:fix-shapeshifer

Conversation

@Kamelitoloveless

Copy link
Copy Markdown
Contributor

ShapeShifter patch using two undocumted Exec functions.
One is not implemented in Aros / ApolloOS which is :
ExitIntr found in rom/exec/exitintr.c
This PR has been created to include the changes done by Aros dev Kalamatee which I reported in the issue below.

aros-development-team/AROS#1460

KamelitoLoveless added 5 commits October 10, 2026 16:55
…ooks

Programs that SetFunction() ExitIntr() and Schedule(), or replace
ex_LaunchPoint, were never called on m68k (issue #1460).

- SFF_SoftInt, SFF_QuantumOver and the pending-switch flag (now
  SFF_AttnSwitch, replacing ARF_AttnSwitch in AttnResched) are SysFlags
  bits 13, 14 and 15 on every target, as on Kickstart. Cause() updates
  SysFlags atomically unless AROS_NO_ATOMIC_OPERATIONS is set.
- m68k interrupt handlers leave through the ExitIntr() vector with
  SysBase pushed, as Kickstart's level handlers do, and ExitIntr() pops
  it.
- m68k Schedule() decides with interrupts masked, as on Kickstart, so
  the scheduler's non-atomic flag updates cannot lose a bit.
- m68k Dispatch() enters the task through ex_LaunchPoint, publishing
  its own launch code there on first use.
@Bedroomcoders

Copy link
Copy Markdown

Thanks for the work on this! However, my take is that we shouldn't merge this PR.

The original ShapeShifter relied on undocumented Kickstart 3.x internals (private ExitIntr/Schedule stack layouts, ex_LaunchPoint, and scratch registers surviving OS calls). Reworking ApolloOS's exec.library task switching and interrupt handling to mimic those undocumented Kickstart quirks carries too much risk of breaking task switching, SuperState() tasks, and 68080/AMMX context handling for the rest of the OS.

Instead, we have updated ShapeShifter itself to handle interrupts, task switching, and OS calls cleanly, and it now runs natively on ApolloOS without needing any changes to exec.library.

@Kamelitoloveless

Kamelitoloveless commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

This fix was also merged into Aros repo. I have not seen so far any regression, I found ApolloOS quite solid with this code.
These code was missing in Aros/ApolloOS so it complete it IMO.
It should go first into beta stage as its quite sensible. Maybe @ronybeck could have a look.
It state ShapeShifter but it may after other software too.

This branch has not been deployed

No deployments
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