Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's really impressive how quickly new devices get emulated these days.


The Switch also benefits from a nearly complete open-source reimplementation of the full operating system and kernel.

https://github.com/Atmosphere-NX/Atmosphere


I am more annoyed than I should be that the accents faces in a different direction for fusée…


To be fair it's not the same sound


That's a patch set for an official OS, not a "nearly complete open-source reimplementation of the full operating system and kernel".


No, it's a nearly complete open-source reimplementation of the full operating system and kernel. I don't know where you're getting the idea that it's a patch set - you can take a look at the roadmap and design docs here (or just browse the source) if you'd like.

https://github.com/Atmosphere-NX/Atmosphere/blob/master/docs...


The readme literally lists a couple driver changes to make CFWs easier, breaks in the boot and crypto chain of trust, and "Application-level Horizon OS patches, used to implement desirable CFW features".

That's not a "nearly complete reimplementation".

A bunch of not started work in a planned features doc doesn't change that.


If you scroll down in the document you'll find the completed section, which includes the Kernel.


It's a very ascetic ukernel, which is a very tiny piece of a horizon derived OS. Like, single digit percentages from a LOC perspective.


The switch was actually a special case, most of the APIs (the nvidia ones) where already decently well understood and the OS was based on the 3DS OS. The yuzu dev team still did an amazing job.


Also, it has hardware specs that make it reasonable to emulate. You're very unlikely to see a PS5 or Xbox Series X emulator anytime soon.


Would you even need to emulate PS5/XSX games? AFAIK, they are already x86 - you would just need provide the library APIs and break the security.


This is a pretty common and old idea, dating back to the original xbox, which was basically "just" a normal pentium processor with an nvidia gpu.

For various reasons, though, this sort of emulation has a lot of pitfalls. Either you directly run a lot of the console's firmware and e.g. try to implement the hardware devices in QEMU, or you try to recreate the console OS/firmware at a higher level, mimicking the underlying APIs. Neither are easy tasks. Take a look at the original xbox -- the emulators available aren't really great, even after nearly 2 decades of hard work.

Of course, any complex emulator is hard -- just pointing out this isn't really as much of a shortcut as it may seem. The biggest upside is just (potentially) performance, as you don't need to interpret or translate CPU instructions.


I don't think your statement about 2 decades of hard work on OG Xbox emulators is totally correct - the real focus on emulation only began in the mid 2010s. It's lack of exclusives also results in a lack of emulator developers.


That's fair -- development has been off-and-on, and there's not much of a desire for xbox emulation.

Still, I think it's a good example of how just because the xbox is basically a regular Pentium III system with a modified GeForce 3 GPU, doesn't mean it's easy to make an emulator for. And the original xbox was more "PC-like" than the PS4/5 or current xbox lineup, I'd wager.


There's more to hardware architecture than just "x86". The PS4 memory bus is completely shared between CPU and GPU, meaning that addresses on one are valid on the other. Emulating that on a general-purpose system with PCIe would be astonishingly ridiculous.


>Emulating that on a general-purpose system with PCIe would be astonishingly ridiculous. Even official PC ports suffer from that. For example Horizon Zero Dawn looses up to 20% of performance if ran on 8x PCIe 3.0 lanes.


These consoles have A LOT of custom hardware(e.g. PS5 kraken hardware decoder, with which they can have ridiculously high SSD bandwidth, at peak levels much higher than anything on the consumer market right now). Brute-force approach won't work on modern PCs.


People said the Xbox one was just a Windows PC with a proprietary UI as well, but you really have to understand what went into making it before you determine if that’s true:

https://youtu.be/U7VwtOrwceo

But yes, if you could break the security and implement the (many) private APIs, you wouldn’t necessarily need to emulate (although it might be legally and technologically easier to emulate a ps5 than re-implement everything).


Nice talk, thanks for linking!


Do both Nintendo 3DS and Nintendo Switch use an ARM processor?


Yes, but different feature sets


Different instructions sets? Where can I read more about this?


They’re entirely different ISAs, for the most part. 3DS uses a 32-bit ARMv11 core (and an ARMv9 for compatibility) and Switch uses a 64-bit Tegra X1 based on ARMv8-A.


The "v" is confusing - the 3DS used ARM11 and ARM9E core designs, which implemented the ARMv6 and ARMv5 ISAs respectively.


Oops, I didn't mean to do that! Thanks for catching it.


Yes, and the Switch OS is based on the 3DS OS.


It's not that easy. I read somewhere the graphics pipeline of the Switch OS is a derivative work from Android's.

It's not clear HOW much of it comes from the 3DS OS, how much comes from FreeBSD and how much comes from Android.


Where was the Nvidia APIs documented from?


The Switch GPU is basically just an Nvidia Tegra, and the work on the open source Noveau driver for Nvidia cards made it easy to figure out the Switch's Tegra


Nintendo Switch used the Tegra X1 model T210 SoC, also used in the Nvidia Shield and Pixel C. There's plenty of public information as well as support code in the Linux kernel


Ahh, I guess the emulator is not emulating the switch "API" but the GPU itself right? Because AFAIK, the Switch NVidia API is not avaliable anywhere publicly.


Like most consoles, the switch graphics API (NVN) is a very thin veneer over the hardware. Understanding the hardware tells you a lot about the API.


The Nintendo Switch turns 4 next month.


Exactly. I remember UltraHLE was less than 4 years after the N64.... and it was a more alien architecture...


Was something like 2.5 years!

In this era where convenience is super important it's less of a deal but when a not especially powerful PC could emulate the key N64 games and the games were both downloadable via dialup (Mario 64 was like an hour long download iirc?) at a point when they were $70 in shops... Just absolutely mindblowing stuff for the time really, especially if you were from a place like me where you'd have to get a long train journey to the nearest city to get these games.

That being said, I was far too into SNES games at the time and found the analogue controls painful via keyboard to ever look into it that much.


I once chopped and moved an Ocarina of time rom via 24 3.5floppies to move it to a system with a beefier video card in the days before I had access to a CD burner.


Yes, but this would not have been something common for the era. Very late 90s I already had a 32MB flash card and PCs were starting to lose the floppy drive.


I had a diamond rio with 16mb internal with an 8mb expansion from an older digital camera. 32MB flash back then was $$$$.


Doubt I even seen a flash card until 2002 or so. Floppy disks were still being used in my school up into the middle of the decade.

CD burners only seriously ramped up in ubiquity in 2000 or so too; they very quickly became common place




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: