Hacker News new | ask | show | jobs
by kmeisthax 1921 days ago
I got a real kick out of "our ARM Mac bootloader is actually the thing you used to backup and restore your Wii NAND a decade ago".
1 comments

One of the things I did when porting it to the M1 was "rm nand.c"... :-)

This thing actually goes back further than the name "mini" and BootMii; in the beginning it was a never-released thing called "ios_stub" and actually served the very same purpose on the Wii, to experiment with the hardware over a USB Gecko (which was a USB serial-like interface that plugged into the memory card slot) using the very same Python approach. That code hasn't changed much in checks Git history 13 years... though it obviously flipped endianness on its way from the Wii to other ARM32 platform experiments, before making it to ARM64 and Apple Silicon [1].

The Python side is still mostly the same too, other than getting ported from Python 2 to Python 3 and growing a bunch of utility functions. The Python-side malloc implementation actually got written when I was using all this to experiment with a Chinese MP4 player. That version ended up being called "minimp" [2]. Another thing that happened on the way to the M1 was deleting the "P_RENDER_BUNNY" command [3].

So yeah, what I'm doing now on the M1 is literally, down to the code, shell.py, and proxy command names, the same damn thing I was doing 13 years ago on the Wii. AES engine [4] back then, IRQ controller [5] now... though evidently I put a bit more effort into the MediaWiki register documentation templates back then; the GitHub wiki is a bit more limited... :-)

[1] https://mrcn.st/t/ios_stub_vs_m1n1.png

[2] https://marcan.st/2009/06/sunplus-spmp305x-media-player-hack...

[3] https://www.youtube.com/watch?v=3tg7KSSUl8Q

[4] https://wiibrew.org/wiki/Hardware/AES_Engine

[5] https://github.com/AsahiLinux/docs/wiki/HW:AIC