How and why does YSMenu work with everything?

Flame

Me > You
OP
Global Moderator
Joined
Jul 15, 2008
Messages
6,461
Trophies
2
XP
13,289
After all this years, it still blows my mind that YSMenu works with almost every flashcart. you would think a flashcart which has its own parts would need own special made software. but some how YSMenu.nds works on every thing. its really is the Guile Theme song of flashcarts.

When people say what souce code you want leaked. i dont want Windows, iOS or Horizon OS I wish we had the source of YSMenu, so we could imrpove as a community.

How and why does YSMenu works with everything?



thank you @retrogamefan for keeping it alive in a way.
thank you @RocketRobz for the next best thing
 
Wow

lifehackerhansol

i write working(?) code
Member
Joined
Oct 2, 2021
Messages
366
Trophies
0
XP
793
Country
Canada
Simple answer: because everything is a clone of something YSMenu officially supports.

Long answer:

YSMenu works on an external database: infolib.dat extinfo.dat savlib.dat
This makes compatibility updates very easy, since you can just update those three, and any flashcart that is already supported by YSMenu is updated just like that. Porting to another flashcart is a different story, however. @retrogamefan's updates are just that: database updates to existing YSMenu ports.

YSMenu initially supported the original DSTT(i) and the original R4. @Xenon++ and Toro patched YSMenu for the M3 DS Real.

Thus, we have three distinct flashcarts that are officially compatible with YSMenu. Now, if a flashcart is a direct clone of any of these three (identical SD read/write code, identical cartridge commands, etc.), it only makes sense that YSMenu would also work identically to those three.

All the carts listed under the R4-Clone YSMenu section are clones of the original R4 with a very hacky patch to allow SDHC. This is why RetroGameFan specifies that only up to 2GB is supported, as it only truly supports the original R4, which doesn't support SDHC (you can still use it, and it appears to run games. It doesn't run homebrew though)

The R4SDHC is a weird story of a kernel named Pandora, which is actually just a funny version of the R4-Clone YSMenu. So YSMenu support for it is to just replace Pandora with R4-Clone YSMenu.

All the timebomb carts (i.e. the carts under the R4i-SDHC YSMenu section)? They're clones of the DSTTi, the only difference being that it has some funny security mechanism to make the kernel non-replaceable (which eventually got exploited by fincs.)

All the carts listed under the DSTTi-Clone YSMenu section? They're also clones of the DSTTi, the only difference being that the boot file name is different (i.e. TTMenu.dat vs iLL.iL, but the files are the same at the end of the day). In fact, those clones actually used YSMenu themselves (violating the YSMenu redistribution license in the process.)

The DSTT itself is actually a descendant of the DSONE SDHC, created by the members who initially created the DSONE SDHC itself. It was meant to be a cheaper alternative to the DSONE SDHC itself. The DSTT only has minimum features compared to the DSONE SDHC which had extra hardware. Hence, what works on the DSONE won't work on the DSTT, but what works on the DSTT will work on the DSONE. Thus YSMenu is compatible there with virtually no changes. (obviously if you have a fully working DSONE then please just use the DSONE kernel instead, get the full feature set lol)

The DSTWO is just a plugin that emulates the DSTT entirely. Not sure why people want to do this, but eh it's an option.

I think the best part of the story is the M3 DS Real. YSMenu was patched to make it work on the M3 DS Real. @Xenon++, who was a major reverse engineer of the M3 line in general, has worked out the list of M3 based clones, and I took that work and created https://gbatemp.net/threads/607421/ which allowed all M3 based clones to be able to directly boot into a certain homebrew app (YSmenu included.)

The consensus: everything is a clone, and because everything is a clone, YSMenu works.

Now, this doesn't mean one should go out and try YSMenu on any cart. There has been history of YSMenu permanently bricking some flashcarts, and I've deduced that it's because those carts were a heavily modified version of the DSTT, but the DSTT's SD read/write commands, are actually those cart's FLASHCHIP read/write commands. Thus, what you'd write to the SD, you'd actually be writing into the internal flash instead. Think of it like you're trying to format your USB and you accidentally delete your PC's BIOS chip instead, byte by byte.
 

Flame

Me > You
OP
Global Moderator
Joined
Jul 15, 2008
Messages
6,461
Trophies
2
XP
13,289
Simple answer: because everything is a clone of something YSMenu officially supports.

Long answer:

YSMenu works on an external database: infolib.dat extinfo.dat savlib.dat
This makes compatibility updates very easy, since you can just update those three, and any flashcart that is already supported by YSMenu is updated just like that. Porting to another flashcart is a different story, however. @retrogamefan's updates are just that: database updates to existing YSMenu ports.

YSMenu initially supported the original DSTT(i) and the original R4. @Xenon++ and Toro patched YSMenu for the M3 DS Real.

Thus, we have three distinct flashcarts that are officially compatible with YSMenu. Now, if a flashcart is a direct clone of any of these three (identical SD read/write code, identical cartridge commands, etc.), it only makes sense that YSMenu would also work identically to those three.

All the carts listed under the R4-Clone YSMenu section are clones of the original R4 with a very hacky patch to allow SDHC. This is why RetroGameFan specifies that only up to 2GB is supported, as it only truly supports the original R4, which doesn't support SDHC (you can still use it, and it appears to run games. It doesn't run homebrew though)

The R4SDHC is a weird story of a kernel named Pandora, which is actually just a funny version of the R4-Clone YSMenu. So YSMenu support for it is to just replace Pandora with R4-Clone YSMenu.

All the timebomb carts (i.e. the carts under the R4i-SDHC YSMenu section)? They're clones of the DSTTi, the only difference being that it has some funny security mechanism to make the kernel non-replaceable (which eventually got exploited by fincs.)

All the carts listed under the DSTTi-Clone YSMenu section? They're also clones of the DSTTi, the only difference being that the boot file name is different (i.e. TTMenu.dat vs iLL.iL, but the files are the same at the end of the day). In fact, those clones actually used YSMenu themselves (violating the YSMenu redistribution license in the process.)

The DSTT itself is actually a descendant of the DSONE SDHC, created by the members who initially created the DSONE SDHC itself. It was meant to be a cheaper alternative to the DSONE SDHC itself. The DSTT only has minimum features compared to the DSONE SDHC which had extra hardware. Hence, what works on the DSONE won't work on the DSTT, but what works on the DSTT will work on the DSONE. Thus YSMenu is compatible there with virtually no changes. (obviously if you have a fully working DSONE then please just use the DSONE kernel instead, get the full feature set lol)

The DSTWO is just a plugin that emulates the DSTT entirely. Not sure why people want to do this, but eh it's an option.

I think the best part of the story is the M3 DS Real. YSMenu was patched to make it work on the M3 DS Real. @Xenon++, who was a major reverse engineer of the M3 line in general, has worked out the list of M3 based clones, and I took that work and created https://gbatemp.net/threads/607421/ which allowed all M3 based clones to be able to directly boot into a certain homebrew app (YSmenu included.)

The consensus: everything is a clone, and because everything is a clone, YSMenu works.

Now, this doesn't mean one should go out and try YSMenu on any cart. There has been history of YSMenu permanently bricking some flashcarts, and I've deduced that it's because those carts were a heavily modified version of the DSTT, but the DSTT's SD read/write commands, are actually those cart's FLASHCHIP read/write commands. Thus, what you'd write to the SD, you'd actually be writing into the internal flash instead. Think of it like you're trying to format your USB and you accidentally delete your PC's BIOS chip instead, byte by byte.

wow-amazed.gif



Amazing information @lifehackerhansol

so flashcart wars was in fact clone wars?
 
  • Like
Reactions: The Catboy

lifehackerhansol

i write working(?) code
Member
Joined
Oct 2, 2021
Messages
366
Trophies
0
XP
793
Country
Canada
View attachment 298155


Amazing information @lifehackerhansol

so flashcart wars was in fact clone wars?
Pretty much, yeah.

It was all for profit on the manufacturer side, steal code cash money. One of the reasons WoodRPG was closed source.

Which on one hand is a good thing since they're all the same so YSmenu just kinda works on most of them.
But also a bad thing because code becomes closed source and we're kind of stuck on the short end of the stick in terms of continued support.
 
General chit-chat
Help Users
    Dark_Phoras @ Dark_Phoras: https://en.wikipedia.org/wiki/Assumption_of_Mary