Homebrew Unofficial 3DS ScummVM builds

lincruste

Well-Known Member
Member
Joined
Jan 13, 2008
Messages
375
Trophies
1
Location
france
XP
1,187
Country
Antarctica
The official ScummVM codebase was updated with what was necessary to make builds for the 3DS. The port was broken/uncompile-able for a number of years, at least since DevkitPro's upgrade to pacman, but should be back on track since November 2018.

ScummVM has one frontend as far as I'm aware, however it has backend ports for every platform it supports (3DS, Android, SDL, PSP, WII...).
This usually means that the code must be cross-compiled (using a compiler and libraries for the system you want to compile for).
As a quick and dirty explanation, ScummVM has certain core calls that need to be translated to the system-specific equivalents in order for all of it to come together, and that's roughly what the ports are.

This means you can clone the master branch from the official Github, and you could follow the instructions in the backends/platform/3ds/README in order to make your own build.
There aren't official ScummVM daily builds for the 3DS likely because they don't have an active maintainer for the system (a person who could look at port-specific bugs on a regular basis), or more importantly because it isn't possible (or wasn't when I last looked at it) to create a 3DS build that includes all the engines, because of space restrictions.
If the port supported dynamic plugins this would have been possible, but as far as I know it never did.
---
In any case, if you took the most recent ScummVM code and follow the instructions, you should be able to compile it as-is.
No further "hacking" would be required unless an update to the core code or configure script has somehow broken the 3DS backend. I don't think that's the case today, albeit I haven't compiled it in a while.

This thread (that we're talking in) is about making your own game forwarders for individual games. That's not exactly part of ScummVM as it stands today.
So if you would want to run ScummVM through HBLauncher or as an app from the Home menu, you could just compile from the official ScummVM source.
However if you would like to have a nice icon, banner and potentially music on the Home menu for every individual game you have, you should use @MrHuu's method supplied in this thread, in addition to being able to compile the source code.
(from memory, I believe with MrHuu's fork here you might enjoy a slight performance boost for resource-intensive games)

Even if you updated your tree with the most recent code from the official ScummVM master, you should still be able to continue this method to create game forwarders.
Thank you so much for such an explanation, these are mysteries I have been wondering about for many years, since DS homebrew times.
 

AHB

Active Member
Newcomer
Joined
Mar 9, 2016
Messages
40
Trophies
0
Age
34
XP
436
Country
United States
I've been trying to get Riven to work for the last week, but it always crashes. In a standalone cia build, it crashes just after the ScummVM splash; in a regular cia or 3dsx build, it crashes right after clicking the "Start" button on the main menu. In both cases, only the riven engine is included. Is this the case for anyone else, and is there a potential fix for it?
 
  • Like
Reactions: MrHuu

MrHuu

Well-Known Member
OP
Member
Joined
Sep 19, 2015
Messages
562
Trophies
0
Age
37
XP
1,591
Country
Netherlands
I've been trying to get Riven to work for the last week, but it always crashes. In a standalone cia build, it crashes just after the ScummVM splash; in a regular cia or 3dsx build, it crashes right after clicking the "Start" button on the main menu. In both cases, only the riven engine is included. Is this the case for anyone else, and is there a potential fix for it?

Haven't tested that one properly myself.. thanks for letting me know.

When i get to it, i'll compile a build and see if i can find the cause.
 

BTheNoob

New Member
Newbie
Joined
Sep 25, 2019
Messages
3
Trophies
0
Age
44
XP
44
Country
United States
Help! Please give more detail on how to install this. I've been trying for a few days now. I downloaded the file and put it into the sd card under 3ds/scummvm/backends/platform/3ds/app/... What do I do from there? How do I -Run./build_custom_3ds.sh..?? On the computer or in Homebrew on my 2DS XL? If on the computer, how do I do that on Windows 7?
 

MrHuu

Well-Known Member
OP
Member
Joined
Sep 19, 2015
Messages
562
Trophies
0
Age
37
XP
1,591
Country
Netherlands
Help! Please give more detail on how to install this. I've been trying for a few days now. I downloaded the file and put it into the sd card under 3ds/scummvm/backends/platform/3ds/app/... What do I do from there? How do I -Run./build_custom_3ds.sh..?? On the computer or in Homebrew on my 2DS XL? If on the computer, how do I do that on Windows 7?

The code provided is not ready for use straight away. You have to compile (convert) the code to an executable (.cia) which you can install on your 3DS.

To do this you have to install DevkitPro and various software libraries or so called portlibs.

You then need to copy the game files, from the game's floppy or cd, to 'scummvm/backends/platform/3ds/app/*thegame' on your computer.

Now you can run the 'build_custom_3ds.sh' script on your computer using DevkitPro (MSYS), to create a single game (packed as a .cia file) which you can copy to and install on your 3DS.


It takes some time and research to understand how to do this. I personally don't use windows to do this, so i can't really help you there. But you could start here: https://devkitpro.org/wiki/Getting_Started#Windows


Or, if your want 'per' game shortcuts though the Homebrew launcher (much easier), you could do something like this:
https://gbatemp.net/threads/release-scummvm-3ds.422051/page-23#post-8431234

If you're completely unfamiliar with coding, i would suggest using the pre-build ScummVM build by @Nitrus:
https://github.com/Nitrus/scummvm/releases/tag/3DS/0.3.5
 
Last edited by MrHuu,

AHB

Active Member
Newcomer
Joined
Mar 9, 2016
Messages
40
Trophies
0
Age
34
XP
436
Country
United States
I've done a bit more experimenting with regards to Riven.
It definitely had worked to some degree in the past, as it plays fine in He-Who-Shall-Not-Be-Named's last build before he got v& (/F but really /S but that's neither here nor there) up until you attempt to save, upon which the system crashes. In Nitro's latest build, ScummVM detects Riven fine, but gives a "can't find the data files" message when you try to play it and boots you back to the Launcher screen. Something probably changed in the source code between April 2016 and November 2018 that broke Riven's functionality on the 3DS, but went undetected as it still worked on PC.
 
  • Like
Reactions: MrHuu

MrHuu

Well-Known Member
OP
Member
Joined
Sep 19, 2015
Messages
562
Trophies
0
Age
37
XP
1,591
Country
Netherlands
I've done a bit more experimenting with regards to Riven.
It definitely had worked to some degree in the past, as it plays fine in He-Who-Shall-Not-Be-Named's last build before he got v& (/F but really /S but that's neither here nor there) up until you attempt to save, upon which the system crashes. In Nitro's latest build, ScummVM detects Riven fine, but gives a "can't find the data files" message when you try to play it and boots you back to the Launcher screen. Something probably changed in the source code between April 2016 and November 2018 that broke Riven's functionality on the 3DS, but went undetected as it still worked on PC.

As far as i've looked into it, it crashes upon trying to load the cursor images from the executable. Didn't try an older build yet, but it's interesting to know it once worked. Gives me a point of reference, unfortunately there are a lot of changes in that period of time.
 
  • Like
Reactions: AHB

Nitrus

Active Member
Newcomer
Joined
Sep 27, 2018
Messages
28
Trophies
0
Age
44
XP
329
Country
United States
Reading this I remember I had to apply a fix for the cursor, as it broke ScummVM completely with an assertion issue:
https://github.com/scummvm/scummvm/...512b2f3#diff-3b6a311d87212f8955632fb1de8ade1f
If I recall correctly it was brought about because of a change in cursor code in core ScummVM (was it in Graphics::Surface ...? Can't remember).
I wonder if it might be related.
EDIT: Besides that though, looking at what fixes I've done at the time there's nothing really complicated and nothing regarding resource loading... I want to suggest trying out Rosalina/GDB, but it's a fickle process
 
Last edited by Nitrus,
  • Like
Reactions: MrHuu and AHB

BTheNoob

New Member
Newbie
Joined
Sep 25, 2019
Messages
3
Trophies
0
Age
44
XP
44
Country
United States
Thank you! I'll take a look at everything this weekend. Hopefully, I'll be able to get something up and running. Thank you!
 

AHB

Active Member
Newcomer
Joined
Mar 9, 2016
Messages
40
Trophies
0
Age
34
XP
436
Country
United States
As far as i've looked into it, it crashes upon trying to load the cursor images from the executable. Didn't try an older build yet, but it's interesting to know it once worked. Gives me a point of reference, unfortunately there are a lot of changes in that period of time.
I've been testing out commits which altered the Mohawk engine since my last post (had to copy in the current 3DS backend and make a few tweaks to it in order to make these older builds compilable with the current DevKitPro toolchain) and have managed to find the exact commit that breaks Riven on 3DS builds of ScummVM. As you suspected, it's indeed a problem with loading the cursor images from the executable. Before b9a72ff, the current cursor was being reloaded on each frame change. b9a72ff changed it so that all the cursor images are preloaded on startup. This causes ScummVM to crash in a 3DS build for some reason.

Interestingly, there's apparently something that happened between Cruel's last build and b9a72ff that has resulted in video lag. This causes any cutscenes's video and audio to become increasingly out of sync over the length of the cutscene.
 
  • Like
Reactions: MrHuu

Nitrus

Active Member
Newcomer
Joined
Sep 27, 2018
Messages
28
Trophies
0
Age
44
XP
329
Country
United States
I've been testing out commits which altered the Mohawk engine since my last post (had to copy in the current 3DS backend and make a few tweaks to it in order to make these older builds compilable with the current DevKitPro toolchain) and have managed to find the exact commit that breaks Riven on 3DS builds of ScummVM. As you suspected, it's indeed a problem with loading the cursor images from the executable. Before b9a72ff, the current cursor was being reloaded on each frame change. b9a72ff changed it so that all the cursor images are preloaded on startup. This causes ScummVM to crash in a 3DS build for some reason.

Interestingly, there's apparently something that happened between Cruel's last build and b9a72ff that has resulted in video lag. This causes any cutscenes's video and audio to become increasingly out of sync over the length of the cutscene.
That's some excellent investigation work.
Seems like a solid refactor had happened there with the cursor code.
We could likely fix it in the unofficial builds to get a pull request accepted... Doesn't mean we shouldn't try :)
I just noticed I actually own Riven on GOG so I might have a poke at it too, though might take me weeks as I've got some stuff on my plate now
 

MrHuu

Well-Known Member
OP
Member
Joined
Sep 19, 2015
Messages
562
Trophies
0
Age
37
XP
1,591
Country
Netherlands
I've been testing out commits which altered the Mohawk engine since my last post (had to copy in the current 3DS backend and make a few tweaks to it in order to make these older builds compilable with the current DevKitPro toolchain) and have managed to find the exact commit that breaks Riven on 3DS builds of ScummVM. As you suspected, it's indeed a problem with loading the cursor images from the executable. Before b9a72ff, the current cursor was being reloaded on each frame change. b9a72ff changed it so that all the cursor images are preloaded on startup. This causes ScummVM to crash in a 3DS build for some reason.

Interestingly, there's apparently something that happened between Cruel's last build and b9a72ff that has resulted in video lag. This causes any cutscenes's video and audio to become increasingly out of sync over the length of the cutscene.

Yes, that's exactly the part where it crashed. Nice find!

Have you tried building the latest source with these changes reverted?

When i get back home i'll check back on this.
 

AHB

Active Member
Newcomer
Joined
Mar 9, 2016
Messages
40
Trophies
0
Age
34
XP
436
Country
United States
Yes, that's exactly the part where it crashed. Nice find!

Have you tried building the latest source with these changes reverted?

When i get back home i'll check back on this.
Yeah, with the reverted changes everything works except for the video lag and the transparent cursor background glitching constantly. Even saving/loading works. I'm gonna see if I can figure out what's causing the video lag, though if it's what i think it is it won't be nearly as easy to fix.
 
Last edited by AHB,
  • Like
Reactions: MrHuu

BTheNoob

New Member
Newbie
Joined
Sep 25, 2019
Messages
3
Trophies
0
Age
44
XP
44
Country
United States
Thank you Sssssooooooo Much MrHuu! I was able to get ScummVM up and running on my 2DS XL... Thanks to you! I'm beyond over joyed to have my favorite old school computer games available on the go, the way (I think) they were ment to be. My childhood dream has finally come true! Thank you!
 

MrHuu

Well-Known Member
OP
Member
Joined
Sep 19, 2015
Messages
562
Trophies
0
Age
37
XP
1,591
Country
Netherlands
Yeah, with the reverted changes everything works except for the video lag and the transparent cursor background glitching constantly. Even saving/loading works. I'm gonna see if I can figure out what's causing the video lag, though if it's what i think it is it won't be nearly as easy to fix.

While checking back on ScummVM i noticed your PR's. Nice work there!
Havn't tested the latest source yet, but i assume you and bgK got it working the right way.

Huge thanks for your efforts! The same goes for bgK!
 
  • Like
Reactions: Zense

Nitrus

Active Member
Newcomer
Joined
Sep 27, 2018
Messages
28
Trophies
0
Age
44
XP
329
Country
United States
While checking back on ScummVM i noticed your PR's. Nice work there!
Havn't tested the latest source yet, but i assume you and bgK got it working the right way.

Huge thanks for your efforts! The same goes for bgK!
Nice, they also looked at the audio thread! I'll try to test some games soon, great job!
 
  • Like
Reactions: Zense

Julayla Beryl

Member
Newcomer
Joined
Oct 10, 2006
Messages
8
Trophies
1
XP
34
Country
United States
I'm sorry for bumping this topic after over a year. But I just recently got the cia app. However, when I tried to play Sam and Max Hit the Road on my N3DS the first time, I noticed that there were no voices heard. I mean the music and cutscenes are fine, but I'm just saying it's odd to play the game and not hear the iconic voices of the 90s.
 

MarioKartFan

Well-Known Member
Member
Joined
Aug 27, 2019
Messages
596
Trophies
0
XP
2,319
Country
Algeria
I'm sorry for bumping this topic after over a year. But I just recently got the cia app. However, when I tried to play Sam and Max Hit the Road on my N3DS the first time, I noticed that there were no voices heard. I mean the music and cutscenes are fine, but I'm just saying it's odd to play the game and not hear the iconic voices of the 90s.

Assuming you installed the talkie version of Sam and Max then you need to go into settings and enable speech.
 
  • Like
Reactions: Zense

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/WOppJ92RgGU?si=KE79L6A_3jESsGQM