Skip to content

Debug simulator non embedded#16

Draft
pcbeard wants to merge 5 commits into
swiftlang:mainfrom
pcbeard:DebugSimulatorNonEmbedded
Draft

Debug simulator non embedded#16
pcbeard wants to merge 5 commits into
swiftlang:mainfrom
pcbeard:DebugSimulatorNonEmbedded

Conversation

@pcbeard

@pcbeard pcbeard commented Mar 29, 2024

Copy link
Copy Markdown

This is an experiment using non-embedded Swift to be able to fully debug. I've repurposed the SPM packages to build exclusively for the simulator, which now creates a dylib called libSwiftBreak.dylib. The companion script file, simbuild builds this, and then copies this to Source/pdex.dylib which is used to create the final SwiftBreak.pdx product.

pcbeard added 5 commits March 29, 2024 13:17
Can't call Sprite.updateAndDrawSprites() from within .updateGame()
because Sprite.ball() installs a callback that accesses game.state.

Discovered while debugging the simulator code using non-embedded
Swift.
This ensures that the memory is always freed by the Playdate System
memory allocator.
@pcbeard pcbeard requested a review from rauhul as a code owner March 29, 2024 22:00
@pcbeard pcbeard marked this pull request as draft March 29, 2024 22:00
@pcbeard

pcbeard commented Mar 30, 2024

Copy link
Copy Markdown
Author

One questionable thing this does is add a copy of "setup.c" from the SDK. Maybe we could have a Make rule that does this instead of adding to the tree.

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.

1 participant