Hacking Can we port Nintendo Switch OS on Nvidia Shield TV?

Shadow LAG

Well-Known Member
Member
Joined
May 10, 2013
Messages
256
Trophies
1
Age
33
XP
568
Country
United States
No, porting implies the source code is available and can be modified to fit the target hardware. Emulating? Maybe, but not for a very long while and the overhead of the LLE or HLE will require more processing power than the original device meaning it is unlikely to run smoothly on the Shield
 

smf

Well-Known Member
Member
Joined
Feb 23, 2009
Messages
6,647
Trophies
2
XP
5,887
Country
United Kingdom
No, porting implies the source code is available and can be modified to fit the target hardware.

You can port without source code, the hardware is mostly the same so it wouldn't take much to get something running.

Shield has less ram, which might limit what games will run.
 
Last edited by smf,

lembi2001

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
433
Trophies
0
Age
39
XP
1,211
Country
You can port without source code, the hardware is mostly the same so it wouldn't take much to get something running.

Shield has less ram, which might limit what games will run.

A port can only be done with source code. If you do not have the source code you cannot port anything.

In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program (meant for such execution) was originally designed for (e.g. different CPU, operating system, or third party library). The term is also used when software/hardware is changed to make them usable in different environments.

Software is portable when the cost of porting it to a new platform is significantly less than the cost of writing it from scratch. The lower the cost of porting software, relative to its implementation cost, the more portable it is said to be.

What would be done here is emulation as is correctly stated above. The HorizonOS is closed Source meaning we have no way to port the code. RE and reimplementation of the OS may work but why bother?
 
Last edited by lembi2001,

smf

Well-Known Member
Member
Joined
Feb 23, 2009
Messages
6,647
Trophies
2
XP
5,887
Country
United Kingdom
A port can only be done with source code. If you do not have the source code you cannot port anything.

Porting using the original source is all most people have experience of. This guy ports games to the ST from other 68000 based games without the original source code.

http://www.atari-forum.com/viewtopic.php?t=31479

http://www.atari-forum.com/viewtopic.php?f=26&t=31479&start=325

It's much easier if the two systems use the same cpu etc, which of course the switch and shield do.

You can either disassemble the original code and make it possible to change and then assemble it, or you can patch the binary directly.

What would be done here is emulation as is correctly stated above.

You could emulate, but you'd be adding an overhead.

As I correctly pointed out, you could just port the binary.
 
  • Like
Reactions: MManatane

charlieb

Well-Known Member
Member
Joined
Jan 15, 2016
Messages
317
Trophies
0
Age
49
XP
685
Country
I like the idea that this failed console (Nvidia Shield) could get somewhat of a success after ~5 years thanks to Nintendos latest console and the OS beeing ported.
That's all I have to contribute here. I feel that was needed, sorry. Now please carry own with this thread normaly :rofl2:.
failed?. I now have 5 as I bought 2 more during recent Amazon sale
 

lembi2001

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
433
Trophies
0
Age
39
XP
1,211
Country
Porting using the original source is all most people have experience of. This guy ports games to the ST from other 68000 based games without the original source code.

http://www.atari-forum.com/viewtopic.php?t=31479

http://www.atari-forum.com/viewtopic.php?f=26&t=31479&start=325

It's much easier if the two systems use the same cpu etc, which of course the switch and shield do.

You can either disassemble the original code and make it possible to change and then assemble it, or you can patch the binary directly.

If you are doing as the guy you have quoted above is doing you are generating a source code through disassembly:

The game code has been ported using a special version of MAME in combination with a special disassembler which produce a source code which can be reassembled with vasm and reused by MAME. This was important to check if the code can be changed by adding/removing code parts. This method works for any MC68000 based games so theoretically almost anything running on that CPU can be ported "easily".

As I said nothing can be ported without the source code.

Software can be compiled and linked from source code for different operating systems and processors if written in a programming language supporting compilation for the platforms. This is usually a task for the program developers; typical users have neither access to the source code nor the required skills.
 
  • Like
Reactions: Shadow LAG

smf

Well-Known Member
Member
Joined
Feb 23, 2009
Messages
6,647
Trophies
2
XP
5,887
Country
United Kingdom
If you are doing as the guy you have quoted above is doing you are generating a source code through disassembly:

That is one way to achieve it, I would load the game up and start patching it.

In the former he didn't have the source code, but built if from the binary.

In the later you don't have source code at all.

In either case us "not having the source code" prevents it from being ported.

As I said nothing can be ported without the source code.

And again you're wrong, you can port software by loading a binary into a hex editor if you're good enough.

If you had two platforms with the same CPU and similar graphics and capabilities, but differences in the locations that they exist in memory. Then you could mostly port software between them by searching for hex sequences in the binary and replacing them.

To port the switch OS you're essentially writing device drivers, you'd probably have source code for stuff you write from scratch but you wouldn't need the source code for the rest of it.

Early on you'll have to decrypt and encrypt the mmc so that it can be read on a different device.

Software can be compiled and linked from source code for different operating systems and processors if written in a programming language supporting compilation for the platforms.

It's the easiest way, if the source code is available, but not the only way.

This is usually a task for the program developers; typical users have neither access to the source code nor the required skills.

The key there is "usually". I'd agree that typical users and developers couldn't port software without source code, but that doesn't mean it's not possible for people with the skills to do it.

I wouldn't like to put an estimate on quite how many people have the skills, the biggest problem will be finding someone who does and cares. You'd need a really good development kit and debugger, because there aren't any decent emulators for shield & developing one would easily take longer than porting.

If there was enough money up front then I'd get it done, it's amazing how money can make people care.
 
Last edited by smf,

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,897
Trophies
2
XP
29,516
Country
United Kingdom
The word port is used in various contexts, sometimes you hear the phrase "source port" to differentiate a port done using the source code, from one done without. This happens with Android custom roms, and it can be done in other ways like the guy porting games to the ST, using reverse engineering. It's still a port. Now shh.
 

borngborn

Well-Known Member
Newcomer
Joined
Jun 6, 2018
Messages
72
Trophies
0
Age
34
XP
466
Country
United States
Your looking at this all wrong it shouldnt be can we port horizon but can we port atmosphere when its finished

Sent from my SM-N950U using Tapatalk
 

VitaType

Well-Known Member
Member
Joined
Jul 16, 2016
Messages
1,043
Trophies
0
XP
1,457
Country
Germany
failed?. I now have 5 as I bought 2 more during recent Amazon sale
Great. If you now continue to buy Nvidia Shields until you have a couple of thousands it will be a successful console ;)
Failed, doesn't has to mean it's a bad hardware or idea, but looking at the amount of sold units and the amount of original software it just wasn't a success. Doesn't means enthusiasts aren't allowed to love the console :)
 

smf

Well-Known Member
Member
Joined
Feb 23, 2009
Messages
6,647
Trophies
2
XP
5,887
Country
United Kingdom
Your looking at this all wrong it shouldnt be can we port horizon but can we port atmosphere when its finished

AFAICT Atmosphere isn't going to be a complete replacement for Horizon, it only replaces a few modules. Of course you might choose to use Atmosphere anyway, for the benefits that brings.

But I don't think it makes much difference, because the modules that Atmosphere replaces will probably not need modification anyway.

Anything Tegra should pretty much just run the same on both, with maybe some changes required for memory size & speed. The problem areas are going to be the eMMC driver, the Wifi, bluetooth, the controls & possibly the screen.

The Shield is still too expensive for me to take a punt on though.
 
Last edited by smf,

charlieb

Well-Known Member
Member
Joined
Jan 15, 2016
Messages
317
Trophies
0
Age
49
XP
685
Country
Great. If you now continue to buy Nvidia Shields until you have a couple of thousands it will be a successful console ;)
Failed, doesn't has to mean it's a bad hardware or idea, but looking at the amount of sold units and the amount of original software it just wasn't a success. Doesn't means enthusiasts aren't allowed to love the console :)

Well 5 in my homes the sales are doing great! ;)

I think people are too tight to buy it and it has an identity crisis, is it a console, a media hub or both?. I dont think its been pushed hard as either. I use it as both
 

Shadow LAG

Well-Known Member
Member
Joined
May 10, 2013
Messages
256
Trophies
1
Age
33
XP
568
Country
United States
You can port without source code, the hardware is mostly the same so it wouldn't take much to get something running.

Shield has less ram, which might limit what games will run.

Not true. You cannot port something you do not have the source code for. You can disassemble binaries via assembly (processor) code to resemble behavior similar to original source code and the behavior is "emulated" on separate hardware. This is what the definition of HLE and LLE are, keyword being emulation: http://emulation.gametechwiki.com/index.php/High/Low_level_emulation

Also, emulation causes "overhead" in the I/O processing steam, meaning: in most cases the processor or hardware has to be more advanced, even if slightly, to run the instructions at full speed. What you are mistaking is baremetal performance as opposed to emulation running on top of an existing OS / kernel.

Now before you say it doesn't need to be emulated, and I'm fairly sure that is what is coming next, I'm just going to stop you right there. You are then insinuating, by proxy of that notion, that you either have existing source code, or you can somehow reverse engineer the code, write your own switch OS and bootloader from the ground up, target compilation to the Nvidia Shield hardware specifications, and get it to run full speed BAREMETAL on hardware. To which I say, you would have just accomplished what has seemingly never have been done for a modern console and built your own game system.

In short, "It wouldn't take much to get it running" is not an accurate statement.
 
D

Deleted-19228

Guest
I like the idea that this failed console (Nvidia Shield) could get somewhat of a success after ~5 years thanks to Nintendos latest console and the OS beeing ported.
That's all I have to contribute here. I feel that was needed, sorry. Now please carry own with this thread normaly :rofl2:.

Failed console? Lulwut?
 

stewacide

Well-Known Member
Member
Joined
Jun 22, 2018
Messages
247
Trophies
0
Age
40
XP
672
Country
Canada
...Doom 3, Half-Life 2, The Witness, Borderlands 2...

I'd like to see these on Switch, especially The Witness (played it on PC, but ended up solving the puzzles mostly on my phone after taking pictures so I could mark them up, something the Switch with its touch screen could fix).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    NinStar @ NinStar: CRAZY HAMBURGER