Nintendo DS Homebrew Examples with Embedded Swift

I've ported some Nintendo DS home-brew examples to Swift

GitHub - MillerTechnologyPeru/swift-embedded-nds: Embedded Swift for Nintendo DS · GitHub

Right now the main-snapshot toolchains only support armv4t, but I've opened a pull request to support armv5te to properly support the newer CPU on the DS. [Embedded] Add ARMv5TE to list of recognized architectures by colemancda · Pull Request #90023 · swiftlang/swift · GitHub

27 Likes

How cool, how performant is this compared to the original examples?

You are welcome to compare the output .nds and .elf files and compare with the original, but since a lot if this is non-idiomatic Swift (C-Style Swift), it should match the original code.

1 Like

Added Swift wrappers for libnds Add NDS Swift package wrapping libnds by colemancda · Pull Request #3 · MillerTechnologyPeru/swift-embedded-nds · GitHub

1 Like

Not to criticize, but out of curiosity- what would it look like to then port the code to more idiomatic Swift then? I guess we would also assume that the performance gets a bit worse or maybe just different behavior in that case...

Funny that you mention that, I just updated the examples and added a Swift package to make it more idiomatic. Add NDS Swift package wrapping libnds by colemancda · Pull Request #3 · MillerTechnologyPeru/swift-embedded-nds · GitHub