Conversation
|
@orbea Are you volunteering to take sole responsibility for updating, testing and maintaining the 3DS port? Because that's what this PR entails. Not trying to stop you or anything - just want to make sure you know what you're getting into! This represents a colossal leap in the version of ctrulib. You'll have to go through all the CTR gfx and platform code with a fine tooth comb (and this is not just a matter of getting it to compile - you'll have to go through our custom stuff line-by-line, and check that it tallies with the new libraries). I have also seen reports that newer versions of ctrulib have issues using the enhanced features of n3DS, which would be a deal breaker. You'll have to verify that this has been fixed, or provide a workaround. Once everything is building correctly. you'll need to test every core on both a (real) o3DS and n3DS, performing a careful performance/stability analysis to ensure there are no regressions. With the recent 1.7.7 release this is incredibly important, since we finally (after several years) have a polished/performant 3DS port that we can all be proud of. Any back-steps would suck. I should also mention that this version of devkitarm is not compatible with the OS/toolchains I use, so I won't be able to help with any of this, nor will I be able to work on 3DS development in the future. Again, I'm not trying to stop you here, but it's maybe something you should be aware of. Anyway, you asked how to build cores - it's very easy: Everything will end up in |
|
@jdgleaver My goal is to make these console builds more reproducible and eventually try adding them to travis so that we can prevent build failures before they happen. The existing libretro documentation is lacking and doesn't even explain what toolchain version to use. Frankly there are too many issues in constantly backtracking to find regressions when there too many broken commits to bisect (I just happened to start with devkitarm and 3ds). Additionally it makes it hard fixing something things in the build process when I can't test these console builds. However it seems clear that fixing this will be a huge job and my motivation is entirely gone when having to deal with hacked up and outdated toolchains which will become only less practical in the future. And as I lack hardware to fully test this that is another barrier...
Can you elaborate? Making it hard for you to help is certainly not my goal. :)
I was asking how to do it manually without libretro-super, I suppose I may have to read the scripts to understand what they are doing. |
|
You may have gotten the wrong impression from my comment. I was in no way trying to discourage you - just pointing out the difficulties :)
This is a noble goal. I understand completely what you're saying. Imagine how hard is was for me - a complete outsider at the time - to find the correct version of the 3DS toolchain hidden away on the buildbot. Complete detective work, with no help whatsoever. This is not good for the project... However: Some 3DS builds are already on travis, and they work fine - maybe that part of the job just involves making sure that all the supported 3DS cores are on travis...?
That's something that can only be fixed by owning hardware... :( Could you maybe ask for some Patreon funds for this sort of thing? I mean, you're kinda important, and if you can't do your job then that's a problem for everyone...
Well... I don't know if it's any help, but AFAIK devkitPro has been discontinued (so there will be no more updates). It is therefore not unreasonable for us to choose/fork a version for our own use...
The 'official' devkitPro installation is pure arse. I remember I spent a whole week trying to get the build to work, but ultimately it's not compatible with my version of gcc. I use my computers for other (more important) things that have specific requirements, so updating gcc is not something I'm prepared to do. I am very good at hacking things and implementing workarounds, but the latest devkitPro was just too much crap to deal with...
Oh right - sorry, didn't realise that. In general, you can just use the environment setup you've already got, plus an extra Then just go to your repo directory and do: You may run into some oddities along the way, but that's mostly all there is to it. |
I understand and entirely appreciate you being frank with me. :)
Yes, I can imagine! I've procrastinated on starting this so long for a reason... I was thinking RetroArch in particular, the cores could probably come second and there are problems with using libretro-super with travis that are very tedious to debug and test. I have had issues with both the error codes (travis would pass with failed builds) and getting useful logs in the past.
With all due honesty their documentation is lacking to the point of being non-existent, but this is the first I have heard about this. Do you have a source? Fwiw when building this I saw no indication of this in their git repos. Here are the sources I used, most of these tarballs are rather recent. I worry that maintaining a hard-forked toolchain with our manpower and workload in is just not practical or maintainable in the long term.
I know what you mean, it took me a few days to get my package right, but at this point it should not be hard for me to update my build process in the future. I do have I missed the |
Apparently there was a lot of nastiness that left the lead dev suicidal: https://mobile.twitter.com/davejmurphy/status/1114955918549102593 I just checked, and maybe he's getting help, but I'm not sure that future development can be counted on... :( I would maybe advocate a more balanced approach: Certain newer devices (e.g, Switch) are under active development, and keeping an up-to-date toolchain is important. But other consoles are at end of life (or way past end of life), and nothing is ever going to change with them. So there is no maintenance load in these cases - it's not like a firmware update is going to break anything, and cores in general don't use anything device specific (i.e. I cannot think that any working core will ever receive upstream changes that require a newer version of e.g. the 3DS toolchain). I know it's not quite so simple as that, but there is something to be said for choosing your battles. Just airing some thoughts here - you're probably in a better place to know what's actually best, though.
I'm on You know, I guess I probably could get the damn thing to compile if it were life or death (heck, I had to reverse engineer decade-old proprietary kernel drivers and get them working on modern systems at my last job...) but it's a lot of work - and then there's that great wall of RetroArch CTR stuff to update/test at the end of it. I've already promised to implement a new thumbnail downloader and content scanner, and there just doesn't seem to be any time left these days... :( |
That is disconcerting, I hope he's getting whatever help needed. My main concern is that there may come a time when these when old toolchains no longer build or work on newer systems. I am not advocating we always use the latest, just that we use one compatible with upstream sources. Ideally it should have minimal or upstreamable changes which could be applied as a diff and then occasionally updated. It seems this might be a good time to investigate updating the toolchain, but of course if you can't reproduce it then this is a no go. Unfortunately gcc 4.8.5 could make this difficult...is it at all possible to install a newer gcc in /opt which would not interfere with other projects? |
Okay, this is a fair point. We currently rely on a bunch of old pre-compiled binaries, and that is quite dodgy (who knows when a future OS won't be able to run them any more...)
Well I tell you what - I'm going to have to look at some OS updates fairly soon anyway (super painful, but it's got to be done at some point). I guess I can bring this forward a bit, and then gcc won't be an issue (for RetroArch, at least...). Can you wait until, say, the end of next month-ish? It'll be a big job for me, but once my other things are sorted we can have a look at updating the 3DS toolchain. Does that sound okay...? |
Of course. I am more than happy to work with whatever schedule you can manage, its not something that needs to be finished asap, just it would be nice to do sometime in the future. Please ping me with whatever I can help with. I made this PR mostly for discussion and not merging. :) |
|
Looking forward to this commit |
|
Just don't expect anything too soon, this will be a big project which is only in the early planning and discussion phase. :) |
|
@orbea Okay, we'll go with that then. I'll try to get the whole thing working (and tested!) at my end, and ping you when it's done. Then you can look at updating the toolchain on the buildbot, and integrating travis etc. :) |
Description
I am making this as PR because it is easier to show what has been done with diffs. This should not be merged as is and needs further discussion first.
After a lot of effort I managed to build and install
devkitarm-r52using theirbuildscriptsrepo. It is complete with the toolchain, SDKs and tools. It seems that RetroArch has not been fully updated for the new release and upstream suggests only using new releases.For reference here are the list of files in my package.
devkitarm.txt
I am sourcing this script before building anything.
And before I built RetroArch I built without issue
gambatteand copiedgambatte_libretro_ctr.ato the RetroArch source directory aslibretro_ctr.a.Related Issues
When building RetroArch I encountered a few issues.
Makefile.ctr.salamanderI found thatmcuHwcGetBatteryLevelis nowMCUHWC_GetBatteryLevel.$(DEVKITARM)/binto${DEVKITPRO}/tools/bin. The upstreambuildscriptssuggests adding this directory to the$PATH. I think these probably should be not be absolute paths.gfxSetFramebufferInfois now static and I do not think we can use it. I just got undefined references during linking.devkitPro/libctru@4ceebb8
The minimal changes I made in the example commit allow the build to succeed, but I do not have an environment to test the builds and I do not expect them to be correct.
Reviewers
@jdgleaver Maybe you can help me understand what is going on here? Also can you explain the process for building multiple cores? The RetroArch docs do not explain that other than suggesting to use libretro-super scripts.