Live data from Hacker News

I ported Mac OS X to the Nintendo Wii

bryankeller.github.io

281–290 of 337 posts

Re: I ported Mac OS X to the Nintendo Wii

#281
I hope OP is still reading comments. I noticed that the project was written in Xcode (the repo even has the xcodeproj folder) but in some screenshots I see CLion. Did you switch at some point or were you using both throughout the development simultaneously?

Amazing writeup, love this types of blog posts and hope the hawaii trip was enjoyable

Re: I ported Mac OS X to the Nintendo Wii

#282

Earlier quoted context omitted.

Another funny history fact with the Wii is Windows Vista released the same month in North America. 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. We truly had to get away with less back then. These days it feels like there is a bit more headroom where 8 GB is…

Recently I was ranting about this very thing, my work machine running win 11 has 16gb ram and Windows just sits at 8Gb on idle. My first laptop had 1 gig of ram... until I got my mac (16GB M1 Air) I used to manage with 4GB RAM while serving clients... Optimization seems to have been forgotten these days

The reason it sits at 8GB on idle is... optimization. The memory is there to be used, so the OS will use it to improve performance until it's needed for more important tasks.

Re: I ported Mac OS X to the Nintendo Wii

#283

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 thought the same thing about running macOS Ventura on pre-AVX2 Macs until this[1] showed up.

[1] https://github.com/acidanthera/CryptexFixup

Re: I ported Mac OS X to the Nintendo Wii

#284
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_.

That stood out to me as well. Specifically: how did he power the Wii?

Many planes have AC power outlets, the Wii uses <20W.

Re: I ported Mac OS X to the Nintendo Wii

#285
post #259

Earlier quoted context omitted.

IOKit was almost done in Java; C++ was the engineering plan to stop that from happening. Remember: there was a short window of time where everyone thought Java was the future and Java support was featured heavily in some of the early OS X announcements. Also DriverKit's Objective-C model was not the same as userspace. As I recall the compiler resolved all message sends at compile time. It was much less dynamic.

Mostly because they thought Objective-C wasn't going to land well with the Object Pascal / C++ communities, given those were the languages on Mac OS previously. To note that Android Things did indeed use Java for writing drivers, and on Android since Project Treble, and the new userspace driver model since Android 8, that drivers are a mix of C++, Rust and some Java, all talking via Android IPC with the kernel.

There was also the Java-like syntax for ObjC but I don’t think that ever shipped.

Re: I ported Mac OS X to the Nintendo Wii

#286
post #274

How do you get good like this?

Just keep doing stuff and gaining experience. Sometimes you'll find that you don't know how to do something, at that point don't just reach for an LLM, do your best to try and understand it, google around, and if all else fails, put it down and maybe come back to it later with fresh eyes

Re: I ported Mac OS X to the Nintendo Wii

#287

What stood out to me is how much of this worked because of strong abstraction boundaries. It’s interesting because we don’t often think about OS-level abstractions in the same way anymore — but projects like this really show how powerful they are when they’re done right. Makes me wonder how feasible something like this would be with modern systems, where things feel more tightly coupled and security constraints are m…

I feel that modern macOS might be even more abstracted, not less. But it is absolutely more complicated and will probably require a bunch more work.

Right, and I suspect as things get more complicated (and you have to ship), abstractions get leaky.

Re: I ported Mac OS X to the Nintendo Wii

#289
post #282

Earlier quoted context omitted.

Recently I was ranting about this very thing, my work machine running win 11 has 16gb ram and Windows just sits at 8Gb on idle. My first laptop had 1 gig of ram... until I got my mac (16GB M1 Air) I used to manage with 4GB RAM while serving clients... Optimization seems to have been forgotten these days

The reason it sits at 8GB on idle is... optimization. The memory is there to be used, so the OS will use it to improve performance until it's needed for more important tasks.

That's a blatant simplification, and does not match reality as far as I've seen.

The OS only only has one large source of memory it uses "optimistically" - the file/buffer cache. But that's tracked separately, so it doesn't show up in normal memory usage numbers (unless you don't know how to read them).

The other source of "extra" memory usage is memory mapped executable files, which can be unmapped and then read back on demand. That's quite small though.

Everything else (mostly) is actual memory usage caused by actual drivers and programs (though it can be swapped, but that's a major perf hit).

The major reason for Windows memory bloat is the hundreds of inefficient services from both Microsoft and hardware vendors that run at startup. The "optimization" pool (let's not call it that way) is way smaller than that.

eg. pre-loading an application is a pessimization if there's not enough memory - not only does it permanently eat away a portion of the total memory due to the intricacies of Windows working set memory management, it will need to be swapped out when actual demand for memory arises, competing with other disk access.

The only actual "optimization" in Windows is Superfetch, and that barely works these days.

Re: I ported Mac OS X to the Nintendo Wii

#290

Earlier quoted context omitted.

Recently I was ranting about this very thing, my work machine running win 11 has 16gb ram and Windows just sits at 8Gb on idle. My first laptop had 1 gig of ram... until I got my mac (16GB M1 Air) I used to manage with 4GB RAM while serving clients... Optimization seems to have been forgotten these days

I really wish this meme would die. Every modern operating system - macOS, Linux and Windows - use available memory for certain performance optimizations. It doesn’t mean when needed, that memory isn’t available for other applications and your computer just starts swapping.

I wish the "optimizations" meme would die as well, read my comment upthread on how that's generally inaccurate.
Post reply on HN