Homebrew NDS Music Player

  • Thread starter Thread starter KazoWAR
  • Start date Start date
  • Views Views 48,712
  • Replies Replies 197
  • Likes Likes 2
caitsith2 said:
avenir: How exactly do I fix the "Reading frontend (SPS)... failed." error? I am just trying to launch it from my flash card, after having generated SPS files.
please put sps.NitroMusicPlayer.nds in /moonshl2/extlink then execute .sps in moonshell2

[edit] updated xenobox.7z
http://sourceforge.net/projects/lactlib/files/nds/xenobox.7z
now sdatexpand is working on Windows because it converts nds name into UTF8 encoding.
 
For sdatexpand, I found one game so far, that crashes the current implementation, because it has more than 64 SDATs. In fact, it has almost 200 of them.

The fix, is to increase the number of SDATs it can handle.

from
Code:
static u32 sdat_offset[64];
static u32 sdat_size[64];
static u32 sdat_head_size[64];

to
Code:
static u32 sdat_offset[256];
static u32 sdat_size[256];
static u32 sdat_head_size[256];
.

(I would even be inclined to increase it to 512 or even 1024, as a just in case measure.
 
aww yes... sdatexpand v1's implementation was to choose "the largest sdat which has at least 1 sseq".

perhaps I should have chosen C++'s vector...

[edit] re-uploaded.
 
Scratch previous post. Turns out that every SSEQ has at least one track. In fact, until the remaining tracks are defined, it really is only a single track sequence.

If the first track begins with 0xFE, then it defines what 16 tracks are in use, and is immediately followed by a number of 0x93 events, that specifically define where in the SSEQ data the remaining tracks are.

----

Avenir: Your sps maker seems to totally and completely miss the sseq that are in FF4.nds. You may wish to debug exactly why that is happening.
 
thanks caitsith2. Now Pokemon BW's Accumula Town Spring/Autumn/Winter music is played correctly.

[edit] sdatexpand s ff4.nds ff4.sps success here. tell me rom number. or make sure you are using latest xenobox.
 
This utility is excellent, I love being able to play all the music files right off my DS, and as audio goes it seems to be flawless compared to how VGMtrans is prone to errors.

My only beef aside from the instability (which is unavoidable), is that the file browser is stuck with the file selection at the top of the menu, if that could be fixed for easier navigation, it helps to see what files are both above and below the current selection.

I also can't help but recognise caitsith2's contributions here, thanks a lot for the GSF format support too.
Looking at the methods employed here, it looks doubtful, but what is the possibility regarding SPS support through a winamp plugin?

Edit: There seems to be a fault with either the SPS maker.exe or NDS_Music_player.nds with some filenames.
I have Pokémon Black.nds, Pokémon Platinum.nds and Pokémon Soul Silver.nds in my DS roms folder, none of their SPS files are found when I run the music player.
It's the é letter, for some reason that just voids everything.
 
RupeeClock said:
Edit: There seems to be a fault with either the SPS maker.exe or NDS_Music_player.nds with some filenames.
I have Pokémon Black.nds, Pokémon Platinum.nds and Pokémon Soul Silver.nds in my DS roms folder, none of their SPS files are found when I run the music player.
It's the é letter, for some reason that just voids everything.

QUOTE(caitsith2 @ Sep 11 2011, 12:03 PM) This error is absolutely impossible to fix. LibFat absolutely does not recognize anything past the standard 0x20-0x7E ascii characters at all, and rejects loading anything else. Your only recourse, is to remove the é in Pokémon, and replace it with e, as in Pokemon, and rerun SpsMaker on that instead. Any of the special german characters also have to be replaced with the standard ascii equivalent characters, (ä,Ä,ö,Ö,ü,Ü,ß. with a,A,o,O,u,U,B). (Tried hard-coding it myself, and that still failed.)
 
RupeeClock said:
Edit: There seems to be a fault with either the SPS maker.exe or NDS_Music_player.nds with some filenames.
I have Pokémon Black.nds, Pokémon Platinum.nds and Pokémon Soul Silver.nds in my DS roms folder, none of their SPS files are found when I run the music player.
It's the é letter, for some reason that just voids everything.
My alternative sps maker can handle é

caitsith, that ff4.nds's
NitroFS's /SOUND/BGM/sound_data.sdat size=15064032
/SOUND/BGM/sound_data.sdat file.nFileSize=14906048

so the dump is kinda broken... I'm going to think what I should I do (seems NitroFS's size is correct).
 
Auto-play now implemented. Disabled by default, enable/disable by pushing Select.

When enabled, Autoplay will fade out a sequence after 2 loops, and also, will auto-advance after a One-Shot sequence.

The player will tell you if Auto-play is on or not, when you play the sequence of choice.
 
Updated my sps maker again:
http://sourceforge.net/projects/lactlib/files/nds/xenobox.7z

Now removed sdat filesize check. FF4(E) compatible.
Again: until original spsmaker is fixed, you need to use my sps maker (sdatexpand) if your file contain non-ascii chars.

caitsith2, can you commit this?
Form1.cs line 111
Code:
- bw.BaseStream.WriteByte(Convert.ToByte(TempString.Length - 2));
- bw.BaseStream.Write(Encoding.ASCII.GetBytes(TempString), 2, filePaths[i].Length - 2);
+ byte []name = Encoding.UTF8.GetBytes(TempString);
+ bw.BaseStream.WriteByte(Convert.ToByte(name.Length - 2));
+ bw.BaseStream.Write(name, 2, name[i].Length - 2);
 
Seems your code for SPS Maker had a compile time bug in it.

Code:
- bw.BaseStream.WriteByte(Convert.ToByte(TempString.Length - 2));
- bw.BaseStream.Write(Encoding.ASCII.GetBytes(TempString), 2, filePaths[i].Length - 2);
+ byte []name = Encoding.UTF8.GetBytes(TempString);
+ bw.BaseStream.WriteByte(Convert.ToByte(name.Length - 2));
+ bw.BaseStream.Write(name, 2, name[i].Length - 2);

should have been

Code:
- bw.BaseStream.WriteByte(Convert.ToByte(TempString.Length - 2));
- bw.BaseStream.Write(Encoding.ASCII.GetBytes(TempString), 2, filePaths[i].Length - 2);
+ byte []name = Encoding.UTF8.GetBytes(TempString);
+ bw.BaseStream.WriteByte(Convert.ToByte(name.Length - 2));
+ bw.BaseStream.Write(name, 2, name.Length - 2);

Also, while we are on the subject, yours also has a major bug, that is only present, if the executable is run directly on the command line, for the purpose of creating just one SPS, or from a win32 batch script for the purpose of creating more than one SPS. Yours does not check for a [Drive Letter]:\, and correctly strip off the first 2 characters, and replace \ with /.

Changes to SPS Maker commited, and SPS Maker rebuilt. Also added in original filename option as well.
 
caitsith2 said:
Also, while we are on the subject, yours also has a major bug, that is only present, if the executable is run directly on the command line, for the purpose of creating just one SPS, or from a win32 batch script for the purpose of creating more than one SPS. Yours does not check for a [Drive Letter]:\, and correctly strip off the first 2 characters, and replace \ with /.
0. your drive is X:
1. copy spsgen_minimal.sh to X:/
2. in cmd:
CODEX:
sh spsgen_minimal.sh #sorry you need gnuwin32 bash here...

WinNT recognizes / as path separater, so please use / instead of \
 
I'm just popping into this thread here to say thanks, catsith2, for all you've done for the videogame music scene. I first heard of you when you practically created the GSF sound format, and from what I can tell here, you seem to be doing the same thing for the DS.

Thanks again man. Your skills are highly appreciated.
 
avenir: Got one more case for you, where xenobox does NOT find any SDAT, where SPSMaker does. This time, the game is Nanostray, and the reason this time, is because the SDAT files do NOT end with a .sdat file extension.

I am sure I have seen other games, that don't even have a file extension at ALL, that contain SDAT data.

Really, just best to check the header of every file, that is at least 512 bytes in size.
 

Site & Scene News

Popular threads in this forum