Live data from Hacker News

I ported Mac OS X to the Nintendo Wii

bryankeller.github.io

51–60 of 337 posts

Re: I ported Mac OS X to the Nintendo Wii

#51
post #17

In addition to the incredible engineering work here the OP casually flexes by showing the development happening _in an economy class airplane seat_.

Which means no access to Claude.

Can’t wait for his sequel “I received a Cease and Desist Letter from Apple; Feeling encouraged, I registered the trademark ‘Wii subsystem for macOS’”.

Re: I ported Mac OS X to the Nintendo Wii

#52

Before figuring out how to tackle this project, I needed to know whether it would even be possible. According to a 2021 Reddit comment: There is a zero percent chance of this ever happening. Feeling encouraged, I started with the basics: what hardware is in the Wii, and how does it compare to the hardware used in real Macs from the era. I LOL'd

I almost think such projects are worth it just to immortalize comments like these. There's a whole psychology of wrongness that centers on declaring that not-quite-impossible things will definitely never happen, because it feels like principled skepticism.

I'd be lying if I said it wasn't a very tiny part of my motivation :)

Re: I ported Mac OS X to the Nintendo Wii

#53
Given that the original Apple TV ran on a modified version of macos, what are the chances one could turn an old wii into an Apple TV..?

EDIT: also, I just noticed on a second pass the system is addressing 78mb of ram, potentially meaning the ram spans the gddr3 and sram, I'm amazed this works as well as it does with seemingly heterogeneous memory

Re: I ported Mac OS X to the Nintendo Wii

#54
post #47
post #36

Not only is this an insanely cool project, the writeup is great. I was hooked the whole way through. I particularly love this part: > At this point, the system was trying to find a framebuffer driver so that the Mac OS X GUI could be shown. As indicated in the logs, WindowServer was not happy - to fix this, I’d need to write my own framebuffer driver . I'm surprised by how well abstracted MacOS is (was). The I/O Kit…

IOKit was actually built from the ground up for OS X! NeXT had a different driver model called DriverKit. I've never coded against either, but my understanding was they're pretty different beasts. (I could be wrong) That said, indeed, the abstraction layer here is delightful! I know that some NetBSD devs managed to get PPC Darwin running under a Mach/IOKit compatibility layer back in the day, up to running Xquartz on…

As I remember it, they were basically the same—but IOKit is C++ (with restrictions) because 3rd party developers didn't want to learn Objective-C.

But that's a hazy, 20 year old memory.

Re: I ported Mac OS X to the Nintendo Wii

#55
post #38
post #19

This is excellent, though if you had chosen another OS, you could have called the project Wiindows. EDIT: Oh interesting, the final paragraph says NT has been ported, didn't know that. Sadly, no pun is mentioned in that project.

“entii-for-workcubes” is a pretty good pun!

I don't know man, "Wiindows" was right there and they chose "entii"? I weep for the missed opportunity more than anything.

Maybe it was a legal worry.

Re: I ported Mac OS X to the Nintendo Wii

#56
post #12
post #5

Exceptional work. While it may not mean much, I am truly impressed. I like to toy with reverse engineering here and there, but such a port like this would take me multiple lifetimes. Not to distract too much from the main topic, but what do you think about the Hopper disassembler? I have only used Radare2, IDA Pro, and Ghidra. Though, I haven't used the latter two on MacOS. What do you prefer about Hopper? I have bee…

Thank you for the kind words! I like using it for disassembling UIKit (for my day job working on iOS apps), and overall, I like the UI/UX and how it feels like a native Mac app. I've tried Ghidra, and while extremely impressive and capable, it might be the most Java-feeling app I've ever used. I'd love for someone to whip up an AppKit + SwiftUI shell for it.

> I like using it for disassembling UIKit (for my day job working on iOS apps), and overall, I like the UI/UX and how it feels like a native Mac app.

You are correct about the UI/UX. I do think Hopper is ahead of others in that regard. Though, Radare2 being a CLI tool is nice as well. Though, I haven't attempted to use Radare2 for MacOS/iOS disassembly. Though I must ask, why are you disassembling UIKit? Looking for private API behavior or working around bugs? I've been learning more about iOS in my spare time, because despite my love for Swift, I have never used it for iOS. I only have used Swift for MacOS automation, i.e., AppleScript replacement via the Accessibility, Core Foundation, AppKit, etc..

> Ghidra, and while extremely impressive and capable, it might be the most Java-feeling app

I chuckled while reading this because I had the exact same thought when I first used Ghidra. I haven't tried Ghidra on MacOS because I will not taint my machines with the impurities of Java. I also do not want to enable Rosetta, so that was another obstacle in trying Ghidra on MacOS. In Ghidra's defense, using Java was a pragmatic choice. The "write once, run anywhere" promise of Java is likely a near-necessity for a disassembler for government operations.

Re: I ported Mac OS X to the Nintendo Wii

#58

Given that the original Apple TV ran on a modified version of macos, what are the chances one could turn an old wii into an Apple TV..? EDIT: also, I just noticed on a second pass the system is addressing 78mb of ram, potentially meaning the ram spans the gddr3 and sram, I'm amazed this works as well as it does with seemingly heterogeneous memory

I'd say there is a zero percent chance of this ever happening :D The original Apple TV was an Intel Core Solo with 256 MB of RAM and an nVidia GPU, running a modified Mac OS X 10.4 that booted into something similar to Front Row instead of Finder.

Re: I ported Mac OS X to the Nintendo Wii

#59

Amazing work. If you like this story, you might also like the story of how Mac OS X was ported to Intel as well. https://news.ycombinator.com/item?id=4091216

Oof linkrot :(((((

I remember reading this back then. Amazing story. All the secrecy, and needing to be a very small team.

Re: I ported Mac OS X to the Nintendo Wii

#60
post #56
post #12

Earlier quoted context omitted.

Thank you for the kind words! I like using it for disassembling UIKit (for my day job working on iOS apps), and overall, I like the UI/UX and how it feels like a native Mac app. I've tried Ghidra, and while extremely impressive and capable, it might be the most Java-feeling app I've ever used. I'd love for someone to whip up an AppKit + SwiftUI shell for it.

> I like using it for disassembling UIKit (for my day job working on iOS apps), and overall, I like the UI/UX and how it feels like a native Mac app. You are correct about the UI/UX. I do think Hopper is ahead of others in that regard. Though, Radare2 being a CLI tool is nice as well. Though, I haven't attempted to use Radare2 for MacOS/iOS disassembly. Though I must ask, why are you disassembling UIKit? Looking for…

> Looking for private API behavior or working around bugs?

Exactly this!

Post reply on HN