Add *Super Mario Bros.* overworld music

ALSO: DS(i) Downconvert Hz in some music tracks
This commit is contained in:
RocketRobz 2021-07-16 21:46:48 -06:00
parent 0c679c2c6a
commit 46cf74758a
29 changed files with 50 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -169,6 +169,10 @@ void loadMusic(int num) {
case 41: // Style Savvy - Dominic's Mansion
loopName = "romfs:/music/styleSavvy/mansion.wav";
break;
case 42: // Super Mario Bros. - Overworld
startName = "romfs:/music/superMarioBros/overworld_start.wav";
loopName = "romfs:/music/superMarioBros/overworld_loop.wav";
break;
}
if (access(startName, F_OK) == 0) {

View File

@ -0,0 +1,9 @@
const char* superMarioBrosBgmNames[] = {
"Overworld",
"",
"",
};
int superMarioBrosBgmNums[] = {
42,
};

View File

@ -37,8 +37,6 @@ class SoundControl {
bool stream_is_stereo;
bool loopingPoint;
bool looping;
//mm_sound_effect snd_loading;
mm_sound_effect mus_startup;
FILE* stream_start_source;
FILE* stream_source;
};

View File

@ -24,7 +24,7 @@ void loadMusic(int num) {
case 2: // Mario Golf: Advance Tour - Marion Club
startName = "nitro:/music/marioGolfAdvanceTour/marionClub_start.raw";
loopName = "nitro:/music/marioGolfAdvanceTour/marionClub_loop.raw";
sampleRate = 48000;
sampleRate = 32000;
break;
case 3: // Tetris Party - Title Screen
startName = "nitro:/music/tetrisParty/titleScreen_start.raw";
@ -127,7 +127,7 @@ void loadMusic(int num) {
break;
case 23: // Style Savvy: Trendsetters - Brad's Theme
loopName = "nitro:/music/styleSavvy2/musashi.raw";
sampleRate = 32728;
sampleRate = 22050;
break;
case 24: // Style Savvy: Trendsetters - Buyer's Center
startName = "nitro:/music/styleSavvy2/exhibition_start.raw";
@ -150,7 +150,7 @@ void loadMusic(int num) {
break;
case 28: // Style Savvy: Trendsetters - Fashion Contest Menu
loopName = "nitro:/music/styleSavvy2/contest.raw";
sampleRate = 32728;
sampleRate = 22050;
break;
case 29: // Style Savvy: Trendsetters - MC Mode's Theme
loopName = "nitro:/music/styleSavvy2/contestDJ.raw";
@ -182,15 +182,15 @@ void loadMusic(int num) {
case 35: // Style Savvy: Trendsetters - Rock Runway Theme
startName = "nitro:/music/styleSavvy2/runway05_start.raw";
loopName = "nitro:/music/styleSavvy2/runway05_loop.raw";
sampleRate = 32728;
sampleRate = 22050;
break;
case 36: // Style Savvy: Trendsetters - Wireless Shop
loopName = "nitro:/music/styleSavvy2/girlsMall.raw";
sampleRate = 32728;
sampleRate = 22050;
break;
case 37: // Style Savvy: Trendsetters - Main Shop Data
loopName = "nitro:/music/styleSavvy2/personalCheck.raw";
sampleRate = 32728;
sampleRate = 22050;
break;
case 38: // Style Savvy - Hair Salon
loopName = "nitro:/music/styleSavvy/hairSalon.raw";
@ -209,6 +209,12 @@ void loadMusic(int num) {
loopName = "nitro:/music/styleSavvy/mansion.raw";
sampleRate = 32000;
break;
case 42: // Super Mario Bros. - Overworld
startName = "nitro:/music/superMarioBros/overworld_start.raw";
loopName = "nitro:/music/superMarioBros/overworld_loop.raw";
sampleRate = 32000;
stereo = false;
break;
}
snd().loadStream(startName, loopName, sampleRate, stereo, true);
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
In the DS(i) version of Super Photo Studio, some work was done to keep the music file size down while retaining the high quality.
Any reused or duplicated parts of the music are deleted, and the part that would be reused is put into a single file.
The parts would then be played in a sequence, for example:
Super Mario Bros.: Overworld Theme
0, 1, 1, 2, 3, 2, 4, 2, 3, 2, 4, 5, 6, 5, 0, and so on...
Depending on if:
* The music is stereo or mono
* The Hz is high or low
* How many reused parts of the music there is
You could save a huge amount of ROM space for more content, rather than using a single music stream file to take a lot of space.
For example, the music above is normally around 4 MB, but after opimzation, it's 1.20 MB.

View File

@ -36,6 +36,7 @@
#include "pkmnStadiumBgmNames.h"
#include "savvyMgrBgmNames.h"
#include "sonicManiaBgmNames.h"
#include "superMarioBrosBgmNames.h"
#include "ss1BgmNames.h"
#include "ss2BgmNames.h"
#include "tetrisPartyBgmNames.h"
@ -127,6 +128,7 @@ static u8 bgmPageOrder[] = {
4, // Sonic Mania
5, // Style Savvy
8, // Style Savvy: Trendsetters
9, // Super Mario Bros.
3, // Tetris Party
};
@ -181,6 +183,9 @@ void PhotoStudio::getMaxChars() {
case 8:
import_totalCharacters = 17;
break;
case 9:
import_totalCharacters = 0;
break;
}
} else if (subScreenMode == 1) {
// Locations
@ -735,6 +740,8 @@ const char* PhotoStudio::bgmGameTitle(void) const {
return "Savvy Manager";
case 8:
return ss2Title();
case 9:
return "Super Mario Bros.";
}
return "???";
}
@ -823,6 +830,8 @@ const char* PhotoStudio::bgmName(int i) const {
return savvyMgrBgmNames[i];
case 8:
return ss2BgmNames[i];
case 9:
return superMarioBrosBgmNames[i];
}
return "???";
}
@ -867,6 +876,8 @@ int PhotoStudio::getBgmNum(void) const {
return savvyMgrBgmNums[bgmList_cursorPosition];
case 8:
return ss2BgmNums[bgmList_cursorPosition];
case 9:
return superMarioBrosBgmNums[bgmList_cursorPosition];
}
return 0;
}