Homebrew [Release] (A newer) Sonic CD (2011) 3DS Port

legaiaflame

Well-Known Member
Newcomer
Joined
Nov 21, 2008
Messages
87
Trophies
1
XP
1,047
Country
United States
How to compress the Sonic CD video files with ffmpeg:


For New 3DS:
(See bottom of page on how to convert Old 3DS)

For FMV playback, copy the videos/ folder from the original Steam release to sdmc:/3ds/SonicCD/.
To ensure the best playback performance, scale down the OGV files to 400x240 using ffmpeg:

But, you might notice that when you try to open ffmpeg it won't open as a software program but flashes for a second on the screen. This is normal and it's not Windows Defender or your computer blocking the program. This is because ffmpeg is command line program and does not have a graphical UI. But, don't worry there is a very simple process you can set up to convert the videos easily using notepad. Follow these directions as follows:



1. Create a new folder on your desktop.

2. Drop FFMPEG.exe into that folder.

3. Drop the first Sonic CD movie file into the folder you want to compress first.

4. Open Notepad and type CMD

5. Save the file as Open_commandline.bat in the folder.

6. Now, double-clicking that batch file will open a windows command prompt for you.

7. Now, in that command prompt, you can try invoking FFMPEG to do something to the file, such as using a special command line to convert the videos. For instance:


So now we copy and paste the first Sonic CD video file name and replace the input.ogv and output.ovg of the command line below with the first Sonic CD video file name:


For Example, this is the original command line:

ffmpeg -i input.ogv -s 400x240 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv


So again, put the first video file name (example: Bad_Ending.ogv) into the command line for "input.ovg" and "output.ogv". But for the output.ogv change the name to something like newBad_Ending.ogv. Or the file won't compress.


Example (With the video file name inserted properly):

ffmpeg -i Bad_Ending.ogv -s 400x240 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 newBad_Ending.ogv


Then hit enter and it will compress the video. Your new compressed video will be inside the folder. So, then just delete the old video file and take the "new" off of the new compressed video name, to return the file back to its original name. Do this for the rest of the video files and you're all set!

NOTE: It helps to open up a new Notepad screen and paste the command line into there as you make your changes for each video file. Then, once the changes for each video are made to the command line, copy the command line, open up Open_commandline.bat and right click it in and hit enter to compress each video.

For Original 3DS:

Use this code line to convert the videos even further to 200x120 so they play properly on Old 3DS and repeat the steps above:

ffmpeg -i input.ogv -s 200x120 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv
 
Last edited by legaiaflame,
  • Like
Reactions: raxadian

legaiaflame

Well-Known Member
Newcomer
Joined
Nov 21, 2008
Messages
87
Trophies
1
XP
1,047
Country
United States
Got lyrics back in the videos, using the mod below. But only the Japanese lyrics work. You have to take the videos and convert them again though using the ffmpeg/the tutorial I posted above and then replace the videos in the videos folder again. The U.S. Sonic Boom lyrics do play at the title screen though. Can anyone get both lyrics U.S. and Japanese working? Or is there another mod I don't know about?

https://gamebanana.com/mods/463942
 
Last edited by legaiaflame,

EnergyFocus

New Member
Newbie
Joined
Feb 7, 2025
Messages
2
Trophies
0
XP
30
Country
United States
Thought you may want to know that using the decompiled scripts and setting TxtScripts=true as recommended on the github page will cause your port's unique menu elements to disappear and breaks functionality for the settings menu entirely.

Also, disabling vsync will prevent launching. I would report these as bugs on github, but there's no issues page set up there so I'll share here instead. The binds are a little awkward; B pauses (which is to be expected), but only A and Y jump, X does nothing as far as I can tell, and start doesn't pause. I'm always afraid I will accidentally press select during gameplay and open the dev menu, which boots to the main menu. Maybe this could be moved to L+R like virtual console games?

As far as the newly added mod support goes, so far I have tried both Classic CD Tweaks and CD-Restored (with and without its existing 3ds compatibility version), with no success. I suspect this is in part due to the issues with the decompiled scripts.

I can hardly complain though, it feels like a minor miracle that projects like this exist at all, and this port runs far better than the previous one did :)
 
  • Like
Reactions: raxadian

Voxel

Well-Known Member
OP
Newcomer
Joined
Aug 9, 2015
Messages
56
Trophies
0
Location
E1M1
XP
1,098
Country
Antarctica
It seems like the decompiled scripts causing the settings menu to break also happens on the original decomp as well, so you'll have to take that up with them on their repo.

As for vsync, I haven't tried disabling it before because there's no point. There's no way to disable vsync in Citro3D (the graphics API used), thus vsync is always left on by default in the ini file. Are you getting slowdowns? The main game should maintain 60fps, unless there's some resource-heavy mods out there?

I believe the awkward binds are just the original behaviour of the mobile version of the game. The decompiled scripts should remedy this by binding pause back to the START button, and jumping/spindashing back to A/B/Y. You also have the option to rebind controls in the ini file using bit values taken from libctru. Are these not working at all?
 

legaiaflame

Well-Known Member
Newcomer
Joined
Nov 21, 2008
Messages
87
Trophies
1
XP
1,047
Country
United States
It seems like the decompiled scripts causing the settings menu to break also happens on the original decomp as well, so you'll have to take that up with them on their repo.

As for vsync, I haven't tried disabling it before because there's no point. There's no way to disable vsync in Citro3D (the graphics API used), thus vsync is always left on by default in the ini file. Are you getting slowdowns? The main game should maintain 60fps, unless there's some resource-heavy mods out there?

I believe the awkward binds are just the original behaviour of the mobile version of the game. The decompiled scripts should remedy this by binding pause back to the START button, and jumping/spindashing back to A/B/Y. You also have the option to rebind controls in the ini file using bit values taken from libctru. Are these not working at all?

I can confirm using both Old3DS and New3DS, Mobile version of sonic cd data.rsdk, with the unaltered base version of V.1.2.0 and no mods (only video alterations) using the Scripts, START button pauses the game (not B) and jumping/spindashing work with A/B/Y. And I have TxtScripts=true.

But, like Voxel and EnergyFocus said, the only thing I noticed is the "Help and Options" menu doesn't work though. As if you select any of those options it doesn't load anything up. But, I'd assume if you don't use the Scripts like EnergyFocus is doing with not putting TxtScripts=true the controls are going to revert back to B pauses and A and Y jumping.

But with how fantasic the mod already is, I think I can live without the "Help and Options" menu.

 
Last edited by legaiaflame,

EnergyFocus

New Member
Newbie
Joined
Feb 7, 2025
Messages
2
Trophies
0
XP
30
Country
United States
What unique menu elements disappear? And what do you mean by functionality breaking?
Off the top of my head, the intro movie option in the main menu is gone, the help & options menu is broken (as you mentioned) and reverts to its normal options without the option to open the dev menu (which is present without the decompiled scripts), and the in-game pause menu is reverted to its original form (again missing the dev menu option that the base port contains). There may be more that I missed, though.

These are minor issues at worst, the gameplay runs with very little issue in gameplay as far as I can tell. The only thing that may elevate the help & options issue is the inability to switch between genesis and original spindash modes, as this is also tied to the speed cap (crucial for some zones but especially air control in Collision Chaos) and extended camera. Genesis spindash is enabled by default so if someone doesn't change these settings in-game before installing the decompiled scripts they will be locked out of the intended physics behavior of the game.

But, I'd assume if you don't use the Scripts like EnergyFocus is doing with not putting TxtScripts=true the controls are going to revert back to B pauses and A and Y jumping.
Yes, without using the decompiled scripts this is all true. I didn't take note of the rest of the controls until after I had removed the decompiled scripts and set TxtScripts=false, so whatever I'm saying doesn't apply to the port + decompiled scripts. The port runs just fine for me without the decompiled scripts and maintains more functionality so I'm content with that for now.

As for vsync, I haven't tried disabling it before because there's no point. There's no way to disable vsync in Citro3D (the graphics API used), thus vsync is always left on by default in the ini file. Are you getting slowdowns? The main game should maintain 60fps, unless there's some resource-heavy mods out there?
I had no reason for disabling vsync, just did so out of habit. I didn't notice any slowdown, only minor hitching when power-ups begin and end which i didn't find disruptive.

You also have the option to rebind controls in the ini file using bit values taken from libctru. Are these not working at all?
I didn't try to mess with the controls in the ini file since I didn't recognize any of the values. But this is very useful information. I'll give this a try sometime soon and report back.
 

tailssegau

New Member
Newbie
Joined
Feb 12, 2025
Messages
1
Trophies
0
Age
13
XP
7
Country
United States
  • Hi, I need help, I installed this though the qr code and I have a data.rsdk but it's just showing me a glitchy screen, Please help me as I'm dumb (using O3ds)
 
Last edited by tailssegau,

Peppe3

Member
Newcomer
Joined
Apr 17, 2018
Messages
23
Trophies
0
Age
26
XP
140
Country
Italy
How to compress the Sonic CD video files with ffmpeg:


For New 3DS:
(See bottom of page on how to convert Old 3DS)

For FMV playback, copy the videos/ folder from the original Steam release to sdmc:/3ds/SonicCD/.
To ensure the best playback performance, scale down the OGV files to 400x240 using ffmpeg:

But, you might notice that when you try to open ffmpeg it won't open as a software program but flashes for a second on the screen. This is normal and it's not Windows Defender or your computer blocking the program. This is because ffmpeg is command line program and does not have a graphical UI. But, don't worry there is a very simple process you can set up to convert the videos easily using notepad. Follow these directions as follows:



1. Create a new folder on your desktop.

2. Drop FFMPEG.exe into that folder.

3. Drop the first Sonic CD movie file into the folder you want to compress first.

4. Open Notepad and type CMD

5. Save the file as Open_commandline.bat in the folder.

6. Now, double-clicking that batch file will open a windows command prompt for you.

7. Now, in that command prompt, you can try invoking FFMPEG to do something to the file, such as using a special command line to convert the videos. For instance:


So now we copy and paste the first Sonic CD video file name and replace the input.ogv and output.ovg of the command line below with the first Sonic CD video file name:


For Example, this is the original command line:

ffmpeg -i input.ogv -s 400x240 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv


So again, put the first video file name (example: Bad_Ending.ogv) into the command line for "input.ovg" and "output.ogv". But for the output.ogv change the name to something like newBad_Ending.ogv. Or the file won't compress.


Example (With the video file name inserted properly):

ffmpeg -i Bad_Ending.ogv -s 400x240 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 newBad_Ending.ogv


Then hit enter and it will compress the video. Your new compressed video will be inside the folder. So, then just delete the old video file and take the "new" off of the new compressed video name, to return the file back to its original name. Do this for the rest of the video files and you're all set!

NOTE: It helps to open up a new Notepad screen and paste the command line into there as you make your changes for each video file. Then, once the changes for each video are made to the command line, copy the command line, open up Open_commandline.bat and right click it in and hit enter to compress each video.

For Original 3DS:

Use this code line to convert the videos even further to 200x120 so they play properly on Old 3DS and repeat the steps above:

ffmpeg -i input.ogv -s 200x120 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv
unfortunately this doesn't solve the problem but i think it could be a useful thing to make development easier for it?
The videos in the mod have two audio tracks but the command makes ffmpeg only pick one, if you use this command instead:
ffmpeg -i input.ogv -map 0 -s 400x240 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv
then it will pick both audio tracks. I assume there needs to be some more work done since pressing any button to skip the cutscene in intro movie option shuts down the music and you have to select the soundtrack again to restore it, other than the whole jp audio only playing thing
 
  • Like
Reactions: raxadian

legaiaflame

Well-Known Member
Newcomer
Joined
Nov 21, 2008
Messages
87
Trophies
1
XP
1,047
Country
United States
unfortunately this doesn't solve the problem but i think it could be a useful thing to make development easier for it?
The videos in the mod have two audio tracks but the command makes ffmpeg only pick one, if you use this command instead:
ffmpeg -i input.ogv -map 0 -s 400x240 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv
then it will pick both audio tracks. I assume there needs to be some more work done since pressing any button to skip the cutscene in intro movie option shuts down the music and you have to select the soundtrack again to restore it, other than the whole jp audio only playing thing
Are you saying this command line will make it so both Japanese and U.S. lyrics play in the intro and ending movies? I reconverted the movies and only the Japanese Lyrics still play in the Intro no matter what music track I select. Or did you mean it's a step in the right direction with no fix yet?

I'm still using the scripts and it's set to true.
 
Last edited by legaiaflame,

Peppe3

Member
Newcomer
Joined
Apr 17, 2018
Messages
23
Trophies
0
Age
26
XP
140
Country
Italy
Are you saying this command line will make it so both Japanese and U.S. lyrics play in the intro and ending movies? I reconverted the movies and only the Japanese Lyrics still play in the Intro no matter what music track I select. Or did you mean it's a step in the right direction with no fix yet?

I'm still using the scripts and it's set to true.
i'd take it more as a step in the right direction. The way you made the command before made it so you'd only get one of the audio tracks no matter what. With this you have both the audios and it's only a matter of finding out why the game doesn't play them
 

Majro

Member
Newcomer
Joined
Sep 14, 2009
Messages
7
Trophies
1
XP
60
Country
Czech Republic
Is there a way to contact the creator of this port?
Using files from the mobile version makes the menus work but you can't pause the game, while using files from the PC version makes the pause work but the menu options fade to black and back.

I'd really like to report that but I don't see any way to do so.
 
  • Like
Reactions: raxadian

Voxel

Well-Known Member
OP
Newcomer
Joined
Aug 9, 2015
Messages
56
Trophies
0
Location
E1M1
XP
1,098
Country
Antarctica
Is there a way to contact the creator of this port?
Using files from the mobile version makes the menus work but you can't pause the game, while using files from the PC version makes the pause work but the menu options fade to black and back.

I'd really like to report that but I don't see any way to do so.
Hi, I'm here. Sorry though, I'm not quite sure what you mean by the PC version menu options fading "to black and back". To be honest I barely test with the PC version because I always just recommend using the mobile rsdk and calling it a day due to the hardware renderer requirement. Have you also got the decompiled scripts folder set up? It does fix some of the mobile version's shortcomings, including pausing.

Edit: If by menu options you meant the "Help and options" tab, and the settings inside it fading out and back in, then that's also how the original decomp behaved :/
It seems like the decompiled scripts causing the settings menu to break also happens on the original decomp as well, so you'll have to take that up with them on their repo.
 
Last edited by Voxel,
  • Like
Reactions: raxadian

Majro

Member
Newcomer
Joined
Sep 14, 2009
Messages
7
Trophies
1
XP
60
Country
Czech Republic
Hi, I'm here. Sorry though, I'm not quite sure what you mean by the PC version menu options fading "to black and back". To be honest I barely test with the PC version because I always just recommend using the mobile rsdk and calling it a day due to the hardware renderer requirement. Have you also got the decompiled scripts folder set up? It does fix some of the mobile version's shortcomings, including pausing.

Edit: If by menu options you meant the "Help and options" tab, and the settings inside it fading out and back in, then that's also how the original decomp behaved :/

Oh, yeah, I meant the Help & Options. I didn't know it didn't work in the original, sorry. I guess that means the original decomp has to use the settings file to swap spindashes.


I still can't get pausing to work even when the "Txtscripts" are set to "true." The Start button clearly accepts inputs since it works on the title screen and in the menus but not in gameplay.
Any chance you could make some alternative solution to the problem? Even if it has to be some kind of a duct-tape solution, like making a button specifically tap the space where the mobile version has the pause button.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Maybe the Jurassic park people dug him up and cloned his DNA, then he escaped to avenge his death
  • K3Nv3 @ K3Nv3:
    Adoption of course can't have straight couples in Disney flicks no more
  • Kirbydogs @ Kirbydogs:
    this is odd my firefox is graphically dying
  • Kirbydogs @ Kirbydogs:
    for example blurs are becoming noisy as if it were terrain generation noise
  • Kirbydogs @ Kirbydogs:
    and there are random shadows behind selected tabs that are all glitchy
  • Kirbydogs @ Kirbydogs:
    ah well that's what I get for enabling experimental flags
  • K3Nv3 @ K3Nv3:
    Gpu possibly need reapplied
  • K3Nv3 @ K3Nv3:
    Needs thermal paste
  • Kirbydogs @ Kirbydogs:
    yup that'll be helpful for laptop users
  • Kirbydogs @ Kirbydogs:
    it's probably my localhost running in the background
  • Kirbydogs @ Kirbydogs:
    tinkering with javascript and needed it, guess I'll just restart firefox
  • K3Nv3 @ K3Nv3:
    As well as desktop they still have chipsets with thermal paste inside them
    +1
  • K3Nv3 @ K3Nv3:
    Such bs they slam warranty void stickers on screw holes with gpus don't know if they still do
  • False_Hope @ False_Hope:
    They still put them in laptops
  • K3Nv3 @ K3Nv3:
    Gpu chipsets and thermal paste? Yes
  • K3Nv3 @ K3Nv3:
    Some could be dedicated others built in with cpu
  • Kirbydogs @ Kirbydogs:
    I'm not too worried about warranties, mine expired
  • Kirbydogs @ Kirbydogs:
    although a lot of people at my school peeled off the information stickers with the barcodes and stuff, voided their warrenties
  • K3Nv3 @ K3Nv3:
    Check for any temp throttling with software before poking around inside it depending on age might be good practices to do it anyway
  • K3Nv3 @ K3Nv3:
    Someone should do a video what happens if you take a pc to geeksquad loaded with roms
  • Sicklyboy @ Sicklyboy:
    oh god my unnecessarily complex virtualized desktop PC setup broke and now I seemingly need to shrink my data partition, create an EFI partition, and convert the disk from MBR to GPT.
  • K3Nv3 @ K3Nv3:
    That brings back memories of trying to convert a sd card that just refused to convert over a burned img file
  • K3Nv3 @ K3Nv3:
    Actually think it was like trying to convert ext4 to fat32 without loosing everything
    K3Nv3 @ K3Nv3: Actually think it was like trying to convert ext4 to fat32 without loosing everything