Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retroarch #97

Open
aerglass opened this issue Jul 28, 2021 · 22 comments
Open

retroarch #97

aerglass opened this issue Jul 28, 2021 · 22 comments

Comments

@aerglass
Copy link

when I tried to download retroarch it gave me arm9 error
now is saying that universal updater may crash

@NightScript370
Copy link
Member

That's due to Retroarch's large file size. This may be fixed in the future codebase rewrite StackZ wants to work on, but I wouldn't get my hopes too high.
Overall, it's probably better that you do this on PC and then copy to the 3DS only files which you want to use.

@Epicpkmn11
Copy link
Member

I'm fairly certain this is on RetroArch's end to fix, it's simply not possible to extract an LZMA compressed file with less RAM than the block size, and the block size of RetroArch's 7z is larger than the 3DS has RAM.

@aerglass
Copy link
Author

parts? it may be downloaded in parts

@Epicpkmn11
Copy link
Member

Epicpkmn11 commented Jul 29, 2021

That might work, but it'd still be on retroarch to offer a split download.

I think they had plans to have it so you could just download a small base thing then it would download all the cores, they don't seem to have done it though.

@MrHuu
Copy link

MrHuu commented Aug 22, 2021

Last time i've reached out about this, i got the idea the universal-team just didn't want retroarch to be offered.

But anyway, retroarch already offers separate downloads which are also used by retroarch's own online updater.

All cores, as a separate download ( both .cia and .3dsx ) :
https://buildbot.libretro.com/nightly/nintendo/3ds/latest/

Core info files ( *required )
https://buildbot.libretro.com/assets/frontend/info.zip

Assets ( *optional: XMB menu, gfx widgets )
https://buildbot.libretro.com/assets/frontend/assets.zip

Overlays ( *optional )
https://buildbot.libretro.com/assets/frontend/overlays.zip

Database files ( *optional, for detecting games )
https://buildbot.libretro.com/assets/frontend/database-rdb.zip

@Epicpkmn11
Copy link
Member

I don't have any problem with adding RetroArch, I just haven't been sure how to go about it. I saw the cores were added but only for nightly and haven't been sure if that was enough or the best way to go about it.

Is there some way to get the base RetroArch_3ds.cia/RetroArch.3dsx on their own? Would it even work for UU to just install that? I figured it'd be best to just install whatever the base RetroArch is then let that handle all the cores, but is that even how it works?

Should I just like add entries to download each of the cores individually to RetroArch in Universal-DB?

@MrHuu
Copy link

MrHuu commented Aug 22, 2021

For the 3ds port, I really recommend using the latest nightly builds over the stable builds. There's is no guarantee the 3ds stable builds are actually stable, it's just a tag.

The base retroarch_3ds.3dsx / retroarch_3ds.cia are currently not offered to be downloaded separately.
But they are fully optional and won't function without at least one core installed. They simply launch the first found core.
They just act like a shortcut.

It's fairly easy to have them added as a separate download from the libretro buildbot. But until they're added it perfectly fine to have a static download for those since they won't be updated anyway ( for now ), and they're not really version specific.
I can provide a download link from my git, if desired.

The absolute minimum which needs to be installed, is a single core.
Using this core allows users to download the required assets from within this core. However, there's currently no indication this is required. ( without the info files, retroarch doesn't know a core's capabilities )

I'm personally not a user of Universal-Updater, so i'm not aware of it's current options.

If it's possible, offering downloads for each core would be a good way to get started.
Maybe with a check if the base retroarch_3ds.*** is installed for easy access.

Currently, the option to install .cia's from within retroarch is still quite unstable, so it would be nice if Universal-Updater allows to update each .cia core individually.

Please, do feel free to ask any question. As I would love to offer any assistance if desired.

Edit:

https://buildbot.libretro.com/nightly/nintendo/3ds/latest/3dsx/.index-extended
https://buildbot.libretro.com/nightly/nintendo/3ds/latest/cia/.index-extended

The buildbot also offers a list of available core's with their build date and crc. This may help keeping track of any updated cores.

@Epicpkmn11
Copy link
Member

Epicpkmn11 commented Aug 22, 2021

Ah, I see. I just made it so that Universal-DB will generate a retroarch.unistore for the cores (the base files are now in the normal Universal-DB UniStore's entry†), since putting 172 download scripts in the one entry is rather impractical lol. You can get it in U-U with Settings tab -> Select UniStore... -> (+) -> RetroArch Cores.

(†will be a bit after 00:00 UTC, U-DB only does a full update every 6 hours)

Do you think it would be possible for Libretro/RetroArch (Libretro is the organization and RetroArch the program, right?) to generate that UniStore themselves and like put it on the buildbot site or some GitHub repo or so? The specific code generating the retroarch.unistore is Universal-DB's generate.py#239-291, though since the nightly downloads have static links it could probably just be a static UniStore file (which are really just JSON files) as it shouldn't really require much updating unless a new core is added or so.

Currently it's missing descriptions and icons and such since I'm not sure if there's a good place to get those from. I can help with making the UniStore if needed, I just think it might make more sense for that to be handled separately from Universal-DB, especially if it'll need hardcoding in the descriptions and icons and such. Alternatively if there is some simple way to get that info without needing to hardcode a bunch of RetroArch info into Universal-DB then we could just keep it like this with Universal-DB making that alternate UniStore.

@Scripter17
Copy link

Currently it's missing descriptions and icons and such since I'm not sure if there's a good place to get those from

Would https://github.com/libretro/RetroArch/tree/master/pkg/ctr/assets and https://github.com/libretro/libretro-core-info work?

@Epicpkmn11
Copy link
Member

Epicpkmn11 commented Sep 15, 2021

Would https://github.com/libretro/RetroArch/tree/master/pkg/ctr/assets and https://github.com/libretro/libretro-core-info work?

Ah, thanks! That should work, just added getting that info on every full update so it should be updated in about an hour (18:00 UTC)

Edit: Not everything has an icon at the moment (it seems some icons might be shared?) so I need to look into that, otherwise I think it's working right though

There's also no update dates since it seems everything always updates so there's not really a point and it would just make the UniStore need to be updated every day

@MrHuu
Copy link

MrHuu commented Sep 15, 2021

Please accept my deepest apologies as this truly slipped my mind.

This holds the actual info of the builds, with associated assets and description:
https://github.com/libretro/RetroArch/blob/master/pkg/ctr/Makefile.cores

I'll discuss having the retroarch_3ds.3dsx and retroarch_3ds.cia added to the libretro buildbot.

For the .cia installation it's required to install the .cia and also keep it available in the cores folder.
Does the current installation replaces the existing .cia on the sd and installs it without removing the .cia afterwards?

@Scripter17
Copy link

It seems the icons in the RA unistore don't load properly. The info works fine so I assume it's a format issue

@Epicpkmn11
Copy link
Member

For the .cia installation it's required to install the .cia and also keep it available in the cores folder.
Does the current installation replaces the existing .cia on the sd and installs it without removing the .cia afterwards?

Oh, does 3DSX need that too? At the moment yeah it's deleting the CIAs after installing and it's putting 3DSXs in (by default) sd:/3ds/.

It seems the icons in the RA unistore don't load properly

None of them or just some are missing icons? At the moment it's normal if like half of them are missing icons since not everything has an icon with a matching name in that assets folder, I'll try fix the rest soon™.

@MrHuu
Copy link

MrHuu commented Sep 15, 2021

Oh, does 3DSX need that too? At the moment yeah it's deleting the CIAs after installing and it's putting 3DSXs in (by default) sd:/3ds/.

Both .3dsx and .cia builds need to available at sdmc:/retroarch/cores/.

From the .3dsx builds only the retroarch_3ds.3dsx should be available in the sdmc:/3ds/ folder.

The .cia builds checks the existing .cia on the sd to match the version number. If it differs it 'should' install, else it launches the installed application.
Retroarch fails to launch the core if the .cia file isn't found.

@Dimensional
Copy link

It should also be worth noting that the Info file should not be extracted to sdmc:/retroarch/media as they currently are in the script. The info files are read from sdmc:/retroarch/cores/info, and so need to be extracted to there. If any of the retroarch cores does not see it's core info file in the correct location, it will assume the file you are trying to run isn't supported by any core.

This can be tested by deleting the media and info folders in their respective locations, then load up a core and try to run a rom. It will show that it doesn't have a compatible core. Then install the info repo using the universal-db store, and try again. It will still say there is no compatible core. Once you move the info files from media to the proper info folder, then the cores will start to know what they can and can't read.

@MrHuu
Copy link

MrHuu commented Sep 16, 2021

I like to add, the sdmc:/retroarch/media is not used at all anymore. It has been renamed to assets.
Also, updating the info files is one of the features from the retroarch included online updater which does work properly.

Although, it would be nice if this is prepared with a 'base install'.

The added bottom screen functionality also needs the texture to be available. Instead of fetching the assets.zip (>70mb), the image could be downloaded directly and placed here: sdmc:/retroarch/assets/ctr/bottom_menu.png
It's found here: https://github.com/libretro/retroarch-assets/blob/master/ctr/bottom_menu.png

This also only needs to be available if some sort of 'base install' is possible.

@msdos
Copy link

msdos commented Mar 8, 2022

On a New 3DS, it goes to the end of the extraction of assets file (at least 30 minutes IIRC) but then it shows "extraction failed". All other files from retroarch are downloaded and extracted. Is it possible for me to provide some kind of logs or debug? Is it related to comment on 28 Jul 2021, maybe?

@vpelletier
Copy link

On a New 3DS, it goes to the end of the extraction of assets file (at least 30 minutes IIRC) but then it shows "extraction failed".

I suspect this is rather because of this line in source.json, which should probably be:

"file": "/assets.zip"

I'm also guessing that this error causes Universal-Updater to delete everything it just extracted, and it leaves assets.zip behind.

@Epicpkmn11
Copy link
Member

That won't cause UU to delete what it extracted, but it might cause it to think it failed... Fixed it now 👍

@vpelletier
Copy link

That won't cause UU to delete what it extracted

Oh my bad, you are correct. I missed that the output directory is retroarch/media/ and not retroarch/assets/, and upon not seeing such directory assumed it was deleted...

Is this media vs. assets difference expected ?

On a loosely related note, I also could not find a retroarch.3dsx after install. I could not quickly figure out how it is exactly supposed to be fetched & installed, and gave up. I did noticed though the upstream RetroArch_3dsx.7z (container folder) tries to extract it in /3dsx/3ds/, whereas I suspect /3ds would be the expected top path. Maybe there is more magic happening in UU (...repository generator ?) to deal with this, I could just not find it.

@Epicpkmn11
Copy link
Member

I don't think you need a retroarch.3dsx, just install the cores from the separate "RetroArch Cores" UniStore and that should work.

iirc the retroarch.3dsx is only provided in the full massive 7z that's so big it crashes the 3DS, so there's no way for UU to download it.

@vpelletier
Copy link

vpelletier commented Aug 15, 2022

Mmh, I tried running the core (PSX core), and could not figure out how to get a menu (black screen for a while, I did not time how long I waited). The home button was unresponsive, and so was the power button. I ended up doing a hard-shutdown.

I then installed the retroarch 3dsx file manually. I could then use it, moved the core in /retroarch/core (as at least on PC these are shared libraries rather than stand-alone executabes, AFAIK anyway, I am not too used to retroarch), edited the config paths to point at the ones UU installed, and everything seems fine (...modulo that UU certainly does not track these versions properly now that I moved things around).

Edited to add:

  • I downloaded and extracted the 7z on a computer, which is why I could extract it.
  • I had to fetch files in ctr from repository and put them in assets, to make retroarch happy (allowing it to display stuff on the bottom screen).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants