Top
Best
New

Posted by blkhp19 4 hours ago

I ported Mac OS X to the Nintendo Wii(bryankeller.github.io)
712 points | 145 comments
NetOpWibby 3 hours ago|

  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
glenstein 2 hours ago||
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.
inlined 1 hour ago|||
That used to be my thing: wherever our ops manager declared something was impossible, I’d put my mind to proving her wrong. Even though we both knew she might declare something impossible prematurely to motivate me.

My favorite was “it’s impossible to know which DB is failing from a stack trace”. I created STAIN (stack traces and instance names): a ruby library that would wrap an object in a viral proxy (all returns from all methods are themselves proxies) that would intercept all exceptions and annotate the call stack with the “stain”ed tag.

Groxx 1 hour ago|||
I've seen more than one half-joke-half-serious chunk of code that would "encode" arbitrary info into stack traces simply by recursively calling `fn_a`, then `fn_s`, `fn_d`, and `fn_f` before continuing with the actual intended call, giving you a stack trace with (effectively) "asdf" in it.

They've also been useful more than once, e.g. you can do that to know what iteration of a loop failed. There are of course other ways to do this, but it's hard to beat "stupid, simple, and works everywhere" when normal options (e.g. logs) stop working.

0x70dd 46 minutes ago||
Reminds me of https://github.com/jtolio/gls which implement a "thread local storage" in golang
glenstein 1 hour ago||||
Well you're doing gods work as far as I'm concerned. Conflating difficulty in practice with impossibility in principle is, to my mind, a source of so much unnecessary cognitive error.
xattt 53 minutes ago||
The declaration of an impossibility of a given task or goal is a reflection of the perceived barrier by the individual, rather than the task itself.
prpl 1 hour ago|||
Adversarial software development is also when I do my best work
mlaretallack 1 hour ago||||
100% agree, I find that sometimes I hit a dead end, but the things I build or learn on the way are usable at a later date.
Groxx 1 hour ago||||
They're kinda like high-effort shitposts. Which are my absolute favorite kind. The worse the effort/reward payoff, and the more it makes you ask "WHY??!!?", the better.
mikepurvis 1 hour ago||||
Love that it's actually linked as well; too bad that user isn't still active.
blkhp19 2 hours ago|||
I'd be lying if I said it wasn't a very tiny part of my motivation :)
bombcar 1 hour ago||
It's a variation of "because it's there" when asked why would you climb some giant mountain.

Impressive work! Now run Dolphin on it. ;)

bluedino 37 minutes ago|||
Wasn't the old Linux joke, don't ask "how do I do X with Linux" (because you'd get ridiculed for not reading the docs) but instead, just state "X isn't possible with Linux" and then someone would show you how it's done?
gbalduzzi 4 minutes ago||
Or eventually you could answer wrongly to a question without answers, triggering plenty of correct ones
wpm 45 minutes ago|||
I have a project on my desk that started as a response to a line in the Adafruit docs for their RP2040 based MacroPad

     It is not possible to add BLE or WiFi at this time to the MacroPad.
Oh yeah, really? There is a port hanging off the side that can be reconfigured for UART, are you sure Adafruit, what if I add an ESP32?
bsimpson 57 minutes ago|||
> Readers with a keen eye might notice some issues:

> - Everything is magenta.

was fun too

addybojangles 1 hour ago|||
So much has happened in the tech world because someone wrote at one point, "You can't do that"

My favorite part of our online world.

MomsAVoxell 1 hour ago|||
The missile knows at all times where it is, by knowing at all times where it isn’t.
krylon 49 minutes ago|||
I had the same reaction.
nancyminusone 2 hours ago||
Gotta love that particular Redditors follow up comment:

>Go ahead and downvote me. I am correct on every single thing I said

arcfour 1 hour ago|||
The best part is the comment ranting about how the Wii's CPU is so fundamentally different, and then:

> The Wii uses a PowerPC 750CL processor - an evolution of the PowerPC 750CXe that was used in G3 iBooks and some G3 iMacs.

Hilarious.

dpoloncsak 2 hours ago||||
Tempted to necro a 5 year old reddit post just to tell that guy he was wrong, honestly
zamadatix 11 minutes ago|||
This is why Reddit defaults to archiving posts (preventing new comments or votes) after 6 months.
Jeremy1026 2 hours ago||||
User hasn't posted in 4 years. Sadly, they'd probably never see it.
noman-land 2 hours ago||||
Make a new thread calling them out personally.
ErneX 2 hours ago||||
I wanted to, but no replies are allowed now :)
oceansky 2 hours ago|||
Comments are blocked there
dfxm12 2 hours ago|||
The comment score is 1. It doesn't even have a controversial flag. The gamification of social media is a mistake.
rayiner 2 hours ago||
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 abstraction layers seemed to actually do what they said. A little kudos to the NeXT developers for that.

blkhp19 2 hours ago||
I felt similarly. The learning curve was a tad steep, especially since I had never written a driver before, but once I figured out how to structure things and saw the system come alive, I grew to appreciate the approach IOKit takes.

With that said, I haven't developed drivers for any other platforms, so I really can't say if the abstraction is good compared to what's used by modern systems.

spijdar 2 hours ago|||
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 NetBSD! With NetBSD translating IOKit calls. :-)

twoodfin 1 hour ago|||
There’s a great video of a NeXT-era Steve Jobs keynote floating around—I think the one where he announces the x86 port as NeXT was transitioning to a software-only company—where he specifically calls out DriverKit and how great it is.

Steve was not a developer but he made it his business to care about what they cared about.

steve1977 1 hour ago||||
Funnily enough, there is a (different) DriverKit in macOS again now ;)
erichocean 2 hours ago|||
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.

steve1977 1 hour ago||
From here:

https://news.ycombinator.com/item?id=10006411

"At some stage in the future we may be able to move IOKit over to a good programming language"

geerlingguy 2 hours ago|||
And there are enough parallels to Linux's stack, I'm thinking about looking through the Linux on Wii project more and comparing how it handles fb issues in comparison. I loved reading this whole post, crazy how many OSes have now been run on the humble Wii!
phendrenad2 4 minutes ago|||
[delayed]
steve1977 1 hour ago||
I guess having targeted multiple architectures and in the case of OPENSTEP also operating systems early on certainly helped.
guyzero 3 hours ago||
In addition to the incredible engineering work here the OP casually flexes by showing the development happening _in an economy class airplane seat_.
nine_k 3 hours ago||
This is the most incredible part. I cannot even use a laptop adequately in an economy class seat, I cannot position the screen so that I could see it, and the keyboard so that I could type on it, at the same time. (To say nothing of connecting a Wii.)
jedberg 1 hour ago|||
And the guy next to him is just staring at his phone, probably thinking, "I'm not even gonna ask".

Although if it were me I'd probably annoy the heck out of him asking why he had a Wii on the airplane!

hbn 41 minutes ago||
Looks like a Switch 2 actually.
jedberg 37 minutes ago||
You're totally right, it's a Switch 2.
pa7ch 2 hours ago|||
I can't imagine concentrating on a complicated project like that on the go, but I went back to stare in awe at said picture and I think its a train or bus. Still a flex.
badc0ffee 2 hours ago|||
Still looks like a plane to me, with rows of 2-3-2 seats.

There are definitely no buses that wide.

blkhp19 2 hours ago||
My Wii has been on many planes and trains - and yes, there is a photo of each in my post.
jventura 46 minutes ago|||
It seems a bus to me, just look at the size of the windows. Airplanes don't have windows like that..
eastbound 2 hours ago|||
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’”.

slackfan 2 hours ago|||
What's flex-worthy about this? There's a lot of dev work that goes on in economy class airplane seats. Or are VC valley programmers so rich they fly business everywhere?
badc0ffee 2 hours ago||
It's uncomfortable and awkward (the Wii was on his leg in the first shot), and often you need to break concentration and pack things up to let someone out of or into their seat.
slackfan 37 minutes ago||
So what you're saying is if it's flexing, it's entirely performative. gotcha.

I don't think that's a healthy way to look at it - dude was just getting some work done, but maybe I'm a broken human being who's churned out more code than I would ever admit while sitting in 32C on a cross-country flight.

varispeed 2 hours ago||
Imagine if he was developing it on a laptop found at a refuse site that was still charged, just hiding in the hedge so that guards wouldn't see him.
frakt0x90 3 hours ago||
If all the AI stories on this site were replaced with amazing stuff like this, the world would be a better place.
jjice 1 hour ago||
I probably have rose colored glasses, but this is what I associate with Hacker News when I first started coming to this site. Truly absurd projects for no reason other than the love of the game and detailed write ups.

I'm not an LLM post hater, but it definitely has been a bit draining lately. This is exactly what I love to see here.

kstrauser 3 hours ago|||
Get to submitting! Be the change you want to see.
twoodfin 1 hour ago||
I’m SOO happy but also wistfully sad when I open a post like this that I am desperately excited to read and it’s not muddled-thinking- and LinkedInese-riddled slop.
raincole 22 minutes ago||
> As for RAM, the Wii has a unique configuration: 88 MB total

TIL Wii has only 88MB of RAM. Fortunately games weren't electron-based.

zamadatix 2 minutes ago|
The Wii and Windows Vista released the same month in North America, which reminds me of how people were so upset that the minimum requirement for Vista said 512 MB (which was already more than the average existing home PC of the time had without an upgrade) but it ran like crap unless you had more.
k38f 1 hour ago||
Debugging kernel panics on a Wii in an economy seat is a level of focus I can't even imagine. Most people can't read a book on a plane without losing their place every 5 minutes.
bsimpson 41 minutes ago||
This is excellent.

YUV appears to be a PAL-specific color space. I wonder how off an NTSC Wii would be. Presumably it would have the wrong color space until an equivalent conversion scheme was devised for NTSC.

I was surprised to see regional color spaces leak into the project, but I presume that Nintendo's iOS (the coincidentally-named system this is replacing) could handle that abstraction for game developers.

soci 3 hours ago||
Back in the day I was a hardcore Mac nerd and became a professional at it too. My best reverse-engineering trophy was building one of the first "iOS" apps when there was not an official appstore for the iPhone.

But man, this is way ahead of what I could do. What this dude accomplished blew my mind. Not only the output (running MacOS on a Wii), but the detailed post itself. A-MA-ZING.

blkhp19 53 minutes ago|
Thank you for the kind words :)
guerrilla 3 minutes ago||
> The Wii uses a PowerPC 750CL

Well, okay, that's almost cheating.

ynajjarine 1 hour ago|
The approach of using the LED as a debugging tool when serial and video output were both disabled is such a classic embedded development move. When you have no visibility into what's happening, you work with whatever output you have — even if it's a single bit.

The dual-framebuffer solution for the RGB-to-YUV conversion is clever too. 60 conversions per second on that hardware can't be cheap — curious what kind of CPU overhead that adds.

dmitrygr 1 hour ago|
This solution’s COU cost can be significantly improved by using memory protection. You protect the frame buffer from writes. The first time it is written, you take a fault, and start refreshing every 60 Hz and leave it writeable. After some number of refreshes, you protect it again, the idea being is that the UI may now be quiescent. I do this in my Palm OS port for the same reason.
More comments...