19 ms·
New Linux port for the Nintendo 64
- MegaDeKay 6y agoI think something like this is so cool: the relative ease in which Linux can be ported to something combined with a new application for a retro console. His post sums it up. "But why... Most importantly, because I can."
- MegaDeKay 6y agoReplying to my own post but want to give credit where it is due. First saw this on Phoronix. https://www.phoronix.com/scan.php?page=news_item&px=Nintendo-64-Linux-2020-Port https://www.phoronix.com/scan.php?page=news_item&px=Nintendo...
- CyberRabbi 6y agoWaiting for the Vulkan backend and the dolphin port.
- xwdv 6y agoHow do these sort of ports for niche systems get made?
- protoman3000 6y agoManuals for the system and it’s processor exist. The Linux kernel is pretty agnostic towards what it’s running on, as long as it supports the C Language. The difficult part is filling in the system specific blanks in the kernels’ source code, which is big work. See here: https://www.linux-mips.org/wiki/Linux/MIPS_Porting_Guide https://www.linux-mips.org/wiki/Linux/MIPS_Porting_Guide
- marcan_42 6y agoSimple ports to small systems are actually very easy. To run Linux all that you strictly need is a timer driver and an interrupt controller driver, assuming the CPU architecture is already supported and there is a compatible MMU. On small systems, those drivers can be very simple. I was bored one evening and ported Linux to run on the Wii's IO/security processor (not the main CPU, that's Wii Linux). It only took a few hours to get the kernel booting to userspace.
- rvz 6y ago> "But why", I hear from the back. Having Linux available makes it easier to port emulators and fb or console games. > Most importantly, because I can. Good. All I can say is at least it is something different to what I keep seeing on HN. (React, Rust, Kubernetes, JAMstack, JavaScript, etc.) Probably present this somewhere in a conference (CCC, FOSDEM, etc). Who knows who could be looking at this.
- rubicon33 6y agoYes, I love seeing this stuff over the standard JavaScript lib of the month.
- fao_ 6y agoIt feels like most of the Founder-type people are taking a break from what they usually do at work -- which probably includes checking hacker news. So it's left room for the more interesting things to surface over the "What happened to <javascript framework>" or "How to raise your yearly gains by five dollars" or whatever. edit: Interesting is a personal taste, and while I have noticed articles on hacker news becoming more repetitive lately, it's probably not fair to put it entirely down to "Founder-type people".
- troynt 6y agoFormer founder checking in. Guess I'm still interested in tech, even on holidays.
- pvorb 6y agoDo former founders count? ;-)
- 411111111111111 6y agoWell, hn is basically made by a venture capitalist with the target audience of founders. A certain amount of bias should be expected.
- 6y ago
- atum47 6y agoI never had a relationship with the N64. After the Super Nintendo I was deep into computers and programming. The place I used to go to rent video games also started to rent CD ROMS. I went down there one time to rent a CD ROM and saw the N64. Back then video games stores also worked as an arcade, where you could play a system for 30 minutes paying a small fee. So I decided to try this new system, the N64. The game I choose was Mario 64, or course. I did not know where to go, how to play, what my goals were... I remember back then feeling that I outgrew video games. This was around the year 2000. Wasn't until 2009 that I decided to play with video games again, I bought a used xbox 360 from a friend. I had played Mario Paper 64, but on an emulator, and way after the game was released. Cool project thought, thanks for sharing.
- pizzabearman 6y agoThis response sounds like it is made from an AI
- unixhero 6y agoHad similar experiences with games and gaming. Until now however; La Noire Outer Wilds Command and Conquer Remastered Broken Sword And so on What a time to be alive
- muterad_murilax 6y agoIs it possible to use the texture memory/cache (including the Expansion Pak) as additional (albeit limited) system RAM? If so, is that the case here?
- monocasa 6y agoExpansion Pak is regular RAM both to this and the normal games. The texture memory would be difficult to use as RAM though since it's not directly addressable.
- rasz 6y agotexture memory would be difficult to use because n64 doesnt have any, its unified memory arch.
- monocasa 6y agoIt has 4k of TMEM on the GPU, and is in fact the only place textures can be used by the GPU. That's one of the major reasons the N64 has a reputation for being 'blurry'. 4k gives you a max of (with mip maps) one 32x32 16-bit texture at a time.
- flatiron 6y agoNot sure what you mean by “any” it certainly has texture ram but to a fault too little so n64 textures are notoriously crumby.
- corysama 6y agoThe expansion pak would double the effective memory from 4MB to 8. But, there is no separate memory for textures to take advantage of. Just a 4k cache that textures were loaded into from main RAM one at a time while rendering. There were some games that manually implemented their own virtual memory paging system to map the cartridge ROM to RAM address space. But, in general a feature that distinguished the N64 from the PS1 was that it had a single, unified block of RAM for all of the hardware to share however you like.
- j1elo 6y agoThis, plus the recently announced PlayStation 5 gamepad driver support for Linux. Dreaming is free.
- arwineap 6y agoDeja-vu I suppose https://www.theverge.com/2016/6/22/12008286/sony-ps3-linux-otheros-agreement-settlement https://www.theverge.com/2016/6/22/12008286/sony-ps3-linux-o...
- AntiImperialis2 6y agoIf you're building a hardware and have to ship it with an OS, Linux is the obvious choice for most... but the GPL licensing makes it very difficult for a lot others. There's a reason a lot of open source in recent years have avoided GPL as a plague and opted for BSD or MIT or Apache licenses.
- j1elo 6y ago> Linux is the obvious choice for most... but the GPL licensing makes it very difficult for a lot others Linux stayed on GPL2 instead of upgrading to GPL3 precisely to allow others freely using Linux in their commercial devices. In other words: they made the intentional choice of making it legally easy to embed Linux in proprietary hardware products (aka. Tivoization, which GPL2 allows but GPL3 forbids)
- AntiImperialis2 6y agoThat's true. GPL2 is better for commercialization than GPL3 is. However, BSD, MIT, Apache are much much better than any GPL version, including AGPL.
- pjmlp 6y agoYeah PS4 has done wonders to upstream FreeBSD.
- pram 6y agoThis completely blows my mind, but also seems a natural fit considering the SGI lineage of the N64. It's like a super budget IRIX workstation ;P
- weare138 6y agoBut the N64 only has 4MB of ram, I think a GUI would be beyond it's capabilities. Still a cool project though.
- userbinator 6y agoWin3.x would be fine with 4MB of RAM, and it's (just barely) enough for Win95 too. But those OSs were definitely optimised for low resource consumption far more heavily than Linux.
- Narishma 6y agoWindows 3.x ran OK with 1MB of RAM if you only used a couple of applications at the same time. It wasn't the fastest thing and swapped a lot but it was usable for Word, Excel and the like, as long as you stuck to contemporary versions, as later ones tended to be more memory-hungry.
- icedchai 6y agoLinux wasn’t always this bloated. My first Linux system had 3 megs of RAM. This was back in 1993. A 386SX laptop with 1 meg on the motherboard plus a 2 meg expansion. I could barely run X.
- ksaj 6y agoI would argue that it isn't Linux that is bloated. Linux is the kernel. It is the desktop environments and the things added to them to make each distro distinct (and fat). There are significantly less bloated desktop environments, but people like their bling, and bling by default includes an accompanying increase in resource consumption. Look at Raspbian. It looks pretty good, but uses a lot less resources than gnome and kde. You can add to it if you want it to be as bloated as the typical desktop environments. But it's a choice. Personally I'm in love with tiling desktops which use even less resources yet. And they're blazingly fast.
- toxypol 6y agohow do you even interact with the N64 ... ?? controller????
- ignoranceprior 6y agoThe ROM comes loaded with a terminal emulator that is operated via the N64 controller: https://github.com/clbr/joyterm/blob/master/main.c https://github.com/clbr/joyterm/blob/master/main.c
- city41 6y agoIt did have a keyboard released in Japan https://nintendo.fandom.com/wiki/Nintendo_64_Keyboard https://nintendo.fandom.com/wiki/Nintendo_64_Keyboard No idea how realistic it'd be to get it working with Linux.
- ajbonkoski 6y agoDid the N64 have an MMU? I guess so, COP0. I wouldn't have guessed that.
- monocasa 6y agoSome games used it as well. Goldeneye for instance mainly runs out of a region that dynamically mirrors the cartridge to RAM, just like any other virtual memory scheme.
- deleted 6y ago[deleted]
- basicneo 6y ago+1 to software/hardware necromancy. How does a Linux port make it easier to port emulators or console games? Is this a step towards getting an N64 on a modern (?) stack like qemu+linux?
- flatiron 6y agoLinux has debuggers and such and people (like me) are way more familiar with its stack than whatever they had back in the day. Software development would be way easier with all of that a support infrastructure.
- core-questions 6y ago> How does a Linux port make it easier to port emulators or console games? It helps emulator development by giving you something to work with inside of your emulator that actually has some tooling to let you look around and test out the system from the inside, unlike trying to get a game working. If Linux-N64 can boot, you can expect that a lot of your code is working properly.
- basicneo 6y agoAh, that makes sense. I can see why that would be useful.
- rasz 6y agoAuthor also wrote a book on Tiny Core Linux http://tinycorelinux.net/book.html http://tinycorelinux.net/book.html, seems fitting.
- cosmiccatnap 6y agoYou boy, what say is it? Why it's Christmas sir The spirits did it all in one night! Of course they did they can do anything. Take this commit key and go get me the silliest linux port you can find, someone on an old mips even perhaps.
- dietrichepp 6y agoThis is, of course, cool. No doubt. I have an EverDrive 64 and I’ll probably test this out later today or tomorrow. I am skeptical that this would be the preferred way to port emulators or graphical games. You’re not getting a budget SGI workstation out of this, because the OS kernel itself is only a small part. The N64 is built around a chip called the Reality Control Processor, or RCP. This contains the RSP, stripped-down MIPS CPU core with a fixed-point SIMD vector unit, and the RDP, a rasterization engine that does simple trilinear texture interpolation and color blending. This is the hard part of programming the N64, and it’s not something that’s addressed by swapping out the OS kernel. There are… a number of major challenges you will still have to face if you want to make homebrew software for the N64, unless you are okay with just having something on the CPU and writing to the framebuffer.
- naikrovek 6y agoI don't think anyone is claiming that the N64 is finally unleashed with this, or anything. It will knock down an entry barrier for some people, though, and there's no harm in that at all.
- dietrichepp 6y ago> I don't think anyone is claiming that the N64 is finally unleashed with this, or anything. Just trying to temper people’s expectations. > It will knock down an entry barrier for some people, though, and there's no harm in that at all. To be honest—I don’t think this is lowering the barrier of entry to N64 development much. Those are the expectations I’m trying to temper here. If you want to develop for N64, you’re going to go through a lot of fuss getting an EverDrive 64 or a similar alternative, setting up an accurate emulator like CEN64 (the popular emulators are not suitable for development), getting toolchains running on your development system, etc. I think some people have equated “Linux has been ported to system X” as “development for system X is now solved”, when Linux is only a small part of the solution, and for smaller systems (like the N64, which has only 4 MB RAM base), Linux is probably not your kernel of choice anyway. The Nintendo 64 development scene would definitely benefit from more people pitching in and doing tools development. This is a good time to do it, there are a lot of gaps ready to be filled, and the number of people doing N64 development has increased quite a bit over the past couple years.
- onigiri69 6y agoI would try this but my Everdrive 64 broke. Sad Christmas for me, I suppose.
- FartyMcFarter 6y agoSo... has anyone tried running a Nintendo 64 emulator on it? :)
- castratikron 6y agoTried with cen64, gets to "Booting kernel" then hangs. Maybe I'll get a flash cart and try it out.
- monocasa 6y agoThe author has a fork of cen64. Would be interesting to see if that works.
- loeg 6y agoHere's the patch series presented more nicely. Lacks the intro email, though: https://patchwork.kernel.org/project/linux-mips/list/?series=406393 https://patchwork.kernel.org/project/linux-mips/list/?series...
- marcan_42 6y agoTo be clear, this is a tech demo; we're long past the point where running anything useful on a system with graphics and 4MB (8MB with expansion) of RAM under Linux is reasonable. You can barely get the kernel itself that small. There's a reason why even cheapo consumer routers have at least 64MB of RAM. So it's for fun; you won't be able to run any existing "normal" Linux emulators and you'd be better off porting stuff to run on bare metal than trying to squeeze it in under Linux on an N64. Cool project, fun, great that it's getting upstreamed... just keep in mind it's not really useful for end users for anything (unlike, say, Wii Linux, where with ~80MB of RAM you can actually get somewhere, though still with many limitations). OTOH, as other people have mentioned, it makes a good test case for N64 emulators. If they can run this, that's good validation.
- tutfbhuf 6y agoA microkernel would be a good fit for such constrainted environments.
- marcan_42 6y agoOS design methodology doesn't really have anything to do with its suitability for constrained environments. There are plenty of small monolithic and microkernel designs around.
- tutfbhuf 6y agoI would argue that a microkernel would be a good fit because: "Traditional operating system functions, such as device drivers, protocol stacks and file systems, are typically removed from the microkernel itself and are instead run in user space." - https://en.wikipedia.org/wiki/Microkernel https://en.wikipedia.org/wiki/Microkernel You want to throw out as many functionality as possible to get your kernel down in size to fit into e.g. 1 MiB of memory.
- marcan_42 6y agoThose operating system functions still need to exist and still consume RAM. It doesn't matter whether they run in userspace or kernel space. If you don't need those functions, you can remove them from kernel space in a monolithic kernel. It's possible to build Linux without TCP/IP support and with no on-disk filesystems.
- ejflick 6y agoFinally! Been waiting for this for 24 years.
- hanniabu 6y agoWhat does this mean exactly? Linux capable of running on N64? A Linux distro that can do what N64 does? A combination? Something else?
- mrtweetyhack 6y agoGood, now port it to 8086, 286, 386, 486
- rodarmor 6y agoGod that's sweet. I hope it gets merged.
- imjustsaying 6y agoI'm confused. What is this and why is it significant? It's not an emulator, it's a port (what does that mean?) - but it doesn't necessarily run N64 games?
- ksdjhfjkdhfsk 6y ago> 'I'm confused.' Obviously. Reddit is that way ---------->
- primis 6y agoThe cartridge port on the N64 exposes a 32 bit address bus, Theoretically there's nothing stopping someone from cramming a gig of SRAM inside a cartridge to increase the memory from 8mb. It's directly addressable by the cpu, even if it's not the RDRAM bus. Everyone here saying 8mb too small, well just add more ram.
- FlyMoreRockets 6y agoSadly, the device is not powerful enough for a Debian port.
- tutfbhuf 6y agoNintendo has used microkernels for the Nintendo Switch, I think it would be interesting to see if microkernels would also fit for the N64 or similar constrained devices.