Linux games on switch

На Nintendo Switch удалось запустить GNU/Linux

Хакерской группировке fail0verflow удалось запустить на игровой консоли Nintendo Switch дистрибутив Debian. Они же считают, что Nintendo не сможет устранить уязвимость последующими обновлениями прошивки. По данным fail0verflow уязвимость находится в загрузочном ПЗУ системы Nvidia Tegra X1. Скорее всего, для новой партии Nintendo Switch будут выпущены новые чипы.

Теперь на Nintendo Switch можно будет играть в игры.

Теперь Nintendo Switch можно купить.

учитывая то,что в nvidia tegra x1 полноценный opengl 4.5 — это лютый вин!

удалось запустить на Linux на Nintendo Switch

Кто на ком стоял, простите?

А кто в курсе что там за ОС родная ? ( Я понимаю что скорее всего своя но на чем основана ? )

Нет, на 34c3 они опровергали сию инфуормацию. Там что-то свое микроядерное под названием Horizon, которое они разрабатывают со времен 3DS.

Завезли, Doom(не уверен) и Wolfenstein 2 на нём работают

А вы что-то еще можете предложить?

Накатить qemu user mode и стим поставить. Правда не знаю как там сейчас с поддержкой amd64 на aarch64, но всякое старье на 32-х битах можно попробовать и запустить.

удалось запустить на игровой консоли Nintendo Switch дистрибутив Debian

Скорее всего, для новой партии Nintendo Switch будут выпущены новые чипы.

Скорее всего, Nintendo просто проигнорирует это. Ну какой ей вред от того, что некоторые покупатели будут играть на её консоли в Linux? Даже если предположить, что некоторые из них сломают её в процессе, это просто можно рассматривать как нарушение гарантии. Не стоит потерь от смены чипа.

Вот если придумают способ использовать эту уязвимость для пиратства лицензионных игр для Switch. тогда да, сменят чип.

А хакерам удалось там запустить еще и игры?

что некоторые покупатели будут играть на её консоли в Linux?

А что, драйвера на джойконы и остальное железо уже есть?

Так сложные квесты ещё интереснее! В игре «Запусти Linux на Switch» будут отдельные уровни для опытных: напиши дрова сам!

А ещё объяснить деткам, что такое линукс, как он работает, и сможет ли он поиграть в доточку на портативке.

Я слышал, что дотовское сообщество в немалой степени состоит из крайне невоспитанных подростков, что имеют обыкновение материть друг друга в игровом чате. Собственно, именно поэтому меня не тянет в неё играть — сама игра может и ничего, но заведение делает публика. хотя я могу ошибаться насчет последней.

Vsevolod-linuxoid ★★★★★ ( 12.02.18 06:21:48 MSK )
Последнее исправление: Vsevolod-linuxoid 12.02.18 06:24:11 MSK (всего исправлений: 2)

Теперь на свитче будет только одна игра — установка генты.

Источник

What?

Over the past while, I’ve worked on-and-off in my free time patching the arm64 Linux kernel to run Nintendo Switch games natively, i.e. by taking many of the Switch’s “Horizon” OS system calls and implementing their behavior using Linux’s existing facilities for memory management, scheduling, synchronization, etc.

Well my original thought was merely that I wanted to run Switch games on my MacBook—given that they’re powered by the same arm64 architecture, you should be able to run a Switch game’s machine code right on the CPU, no x86 translation layer needed. I was hoping to be able to achieve this entirely in user-space by attaching (via ptrace) to a process executing the Switch game’s code, and trapping any system calls to the tracer process. But if I recall, this quickly proved infeasible without OS support for various reasons to do with a Switch program’s use of system registers. If I’d have to poke around the OS anyway, I figured I might as well just handle everything within the kernel—then I’d just virtualize said OS under macOS.

Читайте также:  Iso образ arch linux

Patching arm64 Linux means that you get Linux’s vast hardware driver support for free, so not only can it be virtualized on Apple silicon Macs, but it can run bare-metal on any arm64 hardware which supports Linux—even on lower-end hardware, given that there’s no need to emulate the CPU. This should offer a good deal of flexibility in the future for running Switch games, and hopefully will prove a useful option for game preservation.

Note that this is not an attempt to accurately recreate the Horizon OS, nor is it particularly intended to run on an actual Switch, as (I believe) is the case is for the Mesosphere project (though you probably could, I’m aware that the Switch can run Android at least). Rather, Horizon Linux is my attempt to enable Switch games to run on any arm64 hardware.

In addition to OS support in handling Horizon system calls, a Switch program needs to be able to communicate with a number of system services that handle things like input, audio, graphics, etc. Rather than reinvent the wheel, I figured the easiest approach would be to take the open-source yuzu emulator and gut out the things I didn’t need (namely, kernel / CPU emulation), essentially keeping only the system services, GPU emulation, and app loader. This necessitated a custom system call interface to interface with kernel, and a custom Linux binary format for the loader to work with. I also decided (perhaps unnecessarily) to deviate from yuzu’s model and have each system service run persistently in it’s own thread, which made my reorganization considerably more involved.

The custom Linux kernel is called “Horizon Linux”, and the yuzu hack-job is called “mizu”. Mizu is intended to run as a systemd service under Horizon Linux.

Where?

My work to date is now publicly available at the following repos:

When?

This project is far from complete.

But I’ve finally gotten to the point where, in addition to a few homebrew demos / games I’ve been testing with, Horizon Linux + mizu is able to run its first commercial game: Puyo Puyo Tetris.

Below is a demo of Fedora Rawhide virtualized on my M1 Max MacBook Pro, running a few Switch applications under the Horizon-patched Linux 5.19.0 kernel (the first two are homebrew “2048” and “InvadersNX” games):

Horizon apps running under virtualized Fedora Rawhide

The video shows how Puyo Puyo Tetris appears to glitch out. This is not a bug, but rather due to the fact that running the game requires OpenGL 4.6.

Unfortunately I did not know anything about graphics when I set out to complete this project, and figured that I should be good to go given the vague notion that Parallels (and QEMU, if I recall) already supported GPU acceleration. It wasn’t until many, many hours into the project, when I was ready to test graphical Switch homebrew demos, that I realized yuzu’s GPU emulation (which I’m stealing) requires OpenGL 4.6, and that exposing such a modern graphics API to virtual machines on macOS is no trivial matter. Even the macOS host only supports up to OpenGL 4.1. Very recently we got OpenGL 4.3 on the latest tech preview of VMware Fusion , which offers some hope—but it still isn’t good enough, as you can tell from the above demo.

Читайте также:  Linux what is pae

So until we get to OpenGL 4.6 (or less likely, full Vulkan 1.1) on arm64 macOS virtual machines, there is no way to take advantage of GPU acceleration for our Switch games. To show that the operating system functions, we can run Puyo Puyo Tetris with llvmpipe software rendering like below:

Puyo Puyo Tetris running under virtualized Fedora Rawhide w/ software rendering

But this clearly isn’t playable, even for a 2D game like Puyo Puyo Tetris. It’s so slow because, with software rendering, all the rendering work is being handled by the CPU—the GPU literally does nothing.

I still wanted to see what’s possible with GPU acceleration though, so I bought myself a Jetson Nano dev kit; it’s basically the only cheap arm64 hardware which fully supports OpenGL 4.6. Here is how Puyo Puyo Tetris runs on the $100 Jetson Nano:

Puyo Puyo Tetris running on the Jetson Nano

That’s running natively on the CPU, but still going through the same GPU emulation layer that yuzu uses, so we’re not actually exploiting the fact that the Nano has the same Tegra X1 GPU as the Nintendo Switch (that’s just a coincidence); this could run on any arm64 hardware with a GPU that exposes OpenGL 4.6 (or Vulkan 1.1 with the necessary extensions theoretically, as I’m hoping the Raspberry Pi 4 will soon).

Given the significance of the commercial game milestone, and that I’m starting my first job on Monday, it seemed like a good point to make things public and get feedback. If there’s any real community support for this project, I will continue working to implement Horizon system calls and mizu services to get more games running under Horizon Linux in the future, with the hope that GPU virtualization on macOS continues to progress, and/or that more cheap arm64 devices with beefy GPUs become available (something like the Nano could make an awesome emulation box with this OS!).

Or maybe someone points out to me some reason why this whole thing was unnecessary. In any case, I learned a lot in the process 🙂

TL;DR

Modified ARM Linux to run Switch games; so far Puyo Puyo Tetris is the first commercial game. Might continue work if people like the idea.

Edit: Pleasantly surprised by the level of enthusiasm, thanks to everyone who’s engaged! Here’s some YouTube links for the above demos since Reddit hosting seems to be hit-or-miss:

Horizon apps running under virtualized Fedora Rawhide

Puyo Puyo Tetris running under virtualized Fedora Rawhide w/ software rendering

Puyo Puyo Tetris running on the Jetson Nano

I’ve decided to continue work on this for the time being. I’ve gotten a couple requests to put together a Discord server for progress updates, I’ll make another post if I go that route.

Источник

New Linux Build Runs Nintendo Switch Games on Arm64 Devices

Switch games on Linux

A Linux OS and Nintendo Switch enthusiast has mind-melded the two disparate systems to create Horizon Linux. In brief, a Redditor by the name of Kent J Hall has patched the Arm64 Linux kernel to run Nintendo Switch games natively. Hall stresses this isn’t an attempt to recreate Nintendo’s Horizon OS, and it isn’t meant to run on Switch hardware – rather the project simply hopes to make Switch games on any Arm64 hardware platform.

Читайте также:  Linux узнать модель сетевой карты

After a false start or two, Hall decided to spend a chunk of his free time on the Horizon Linux project summarized above. Patching Arm64 Linux seemed the sensible route to reach his goal as it meant “you get Linux’s vast hardware driver support for free, so not only can it be virtualized on Apple silicon Macs, but it can run bare-metal on any arm64 hardware which supports Linux,” explained Hall. The project should work fine “even on lower-end hardware, given that there’s no need to emulate the CPU,” he added. Moreover the project is flexible, and holds promise for game preservation.

Horizon Linux’s development was greatly helped by taking an existing open source Switch emulator, called Yuzu, and taking the scissors to unneeded parts of the code such as kernel and CPU emulation — while retaining things like the system services, GPU emulation and app loader. The developer also notes that he spent some considerable time getting each system service to run persistently in its own thread.

The Redditor behind this project decided to go public with it at this time, as it has reached a significant milestone. Admitting the work was “far from complete,” Hall says that the first commercial game, Puyo Puyo Tetris, is playable on Horizon Linux.

Hall has published some videos showing Puyo Puyo Tetris running on an M1 Max MacBook Pro, and an Nvidia Jetson Nano. The videos are sadly not available at the time of writing, and we don’t know why. Please note, as mentioned above, the game is running natively on the Arm CPUs of these systems. However, it is still going through the same GPU emulation layer that Yuzu uses, despite the Jetson Nano (for example) featuring the same Tegra X1 GPU as the Switch.

It’s worth noting that several Raspberry Pi computers, including the Raspberry Pi 3 and 4, have Arm64 CPUs However, it looks like no one has yet tested Horizon Linux on a Pi.

Hall has recently started a new job, so it looks like some encouragement will be required for him to stick to the project. If you have an Arm64 system you want to test Horizon Linux on, you can comment on the Reddit post from the developer, linked top, and/or visit the Horizon Linux GitHub repository.

Interestingly, Hall was apparently unaware of the Skyline Nintendo Switch emulator for Arm / Android. Since the Reddit post started getting noticed, there looks like a chance for some cross-pollination to occur, as one of the major Skyline developers has asked the Horizon Linux developer to join their Discord.

Stay on the Cutting Edge

Join the experts who read Tom’s Hardware for the inside track on enthusiast PC tech news — and have for over 25 years. We’ll send breaking news and in-depth reviews of CPUs, GPUs, AI, maker hardware and more straight to your inbox.

By submitting your information you agree to the Terms & Conditions and Privacy Policy and are aged 16 or over.

Источник

Оцените статью
Adblock
detector