Coverted a wav to bcstm, and imported using the theme tool. It plays, but does this...
(m4a file)
It's nice that it plays, but it shouldn't have all the weird sounds. For the record, I converted from a mono wav file.
edit:
And rebooting the 3ds fixed it. Odd.
If you could figure out how to set the bcstm's to loop, that would be very nice! I also don't know much about audio compression, but a way to lower the file size would also be amazing. I don't know how any of this works, so if what I ask is impossible, I apologize.
How do you unblock the zip from external sources? I honestly don't know how to.
private static string MakeValidFileName(string name)
{
string invalidChars = System.Text.RegularExpressions.Regex.Escape(new string(System.IO.Path.GetInvalidFileNameChars()));
string invalidRegStr = string.Format(@"([{0}]*\.+$)|([{0}]+)", invalidChars);
return System.Text.RegularExpressions.Regex.Replace(name, invalidRegStr, "_");
}
public void Export(String Path)
{
foreach (var v in Files)
{
System.IO.File.Create(Path + "\\" + MakeValidFileName(v.FileName)).Close();
System.IO.File.WriteAllBytes(Path + "\\" + MakeValidFileName(v.FileName), v.Data);
}
foreach (var v in SubDirectories)
{
System.IO.Directory.CreateDirectory(Path + "\\" + v.DirectoryName);
v.Export(Path + "\\" + v.DirectoryName);
}
}
Would you possibly be able to take a look into these files?
They're from Final Fantasy Explorers and are used in a few square Enix games, if memory serves, back on the original DS.
These are 2 different files, both have blz headers and no extensions, but one is a CGFX file and the other is a BCH file (within what I assume is blz compression?).
https://dl.dropboxusercontent.com/u/7797280/1169173603
https://dl.dropboxusercontent.com/u/7797280/1893811619
I can decompress them using a blz tool (I've supplied to the source and exe too), they're a lot cleaner but I still can't make most of it out, I can see that its models, textures and various other files (including bclim) but this is where my knowledge ends really).
blz.exe
blz.c
Hi,
A bug in the CreateNew NDS function.
With Ninokuni Japanese rom, some filenames haven't good chars and raise a error when create the project.
System.ArgumentException: illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.Create(String path)
at LibEveryFileExplorer.Files.SimpleFileSystem.SFSDirectory.Export(String Path)
at LibEveryFileExplorer.Files.SimpleFileSystem.SFSDirectory.Export(String Path)
at LibEveryFileExplorer.Files.SimpleFileSystem.SFSDirectory.Export(String Path)
at LibEveryFileExplorer.Files.SimpleFileSystem.SFSDirectory.Export(String Path)
at LibEveryFileExplorer.Files.SimpleFileSystem.SFSDirectory.Export(String Path)
at NDS.NDSProject.CreateNew()
at EveryFileExplorer.Form1.CreateNewProject_Click(Object sender, EventArgs e)
I have modified the Export function in SFSDirectory.cs, to replace all illlegalCharacters in the filename, and the project is correctly exported.
But now, this project cannot use the build function because the names are not correct, and generate a OutofMemory Error.
Maybe you could store in the project function all the illegal filenames, and use them intead of those found on the disk.
Have you got another solution ?
Code:private static string MakeValidFileName(string name) { string invalidChars = System.Text.RegularExpressions.Regex.Escape(new string(System.IO.Path.GetInvalidFileNameChars())); string invalidRegStr = string.Format(@"([{0}]*\.+$)|([{0}]+)", invalidChars); return System.Text.RegularExpressions.Regex.Replace(name, invalidRegStr, "_"); } public void Export(String Path) { foreach (var v in Files) { System.IO.File.Create(Path + "\\" + MakeValidFileName(v.FileName)).Close(); System.IO.File.WriteAllBytes(Path + "\\" + MakeValidFileName(v.FileName), v.Data); } foreach (var v in SubDirectories) { System.IO.Directory.CreateDirectory(Path + "\\" + v.DirectoryName); v.Export(Path + "\\" + v.DirectoryName); } }
These are archives? It sounds interesting. I will have a look at them.
Are the names read correctly from the rom (aka if you open the rom, do you see the names correctly)? If yes, how did they ever pack the rom with invalid characters?
Ccould you post an exe file of your updated program, that would be very nice
[cut]
the same thing happened to me and what solved the problem was opening the wav with audacity, delete all the metadata and save the changes (everyfileexplorer still gave the second error when closing, but it wasn't a problem, since the creation of the bcstm was successful).
the same thing happened to me and what solved the problem was opening the wav with audacity, delete all the metadata and save the changes (everyfileexplorer still gave the second error when closing, but it wasn't a problem, since the creation of the bcstm was successful).
These are archives? It sounds interesting. I will have a look at them.
Are the names read correctly from the rom (aka if you open the rom, do you see the names correctly)? If yes, how did they ever pack the rom with invalid characters?
The rom is correctly open with other tools like nitroexplorer or tinke, and i don't know the way these tools handle this trouble.
I suspect that the rom use one japanese char in some filenames. Your tool use the system, and mine is from europe that don't have that kind of chars intalled. In debug mode, the first incorrect Filename show two question-marks in the name, and that hang the export process.
With my custom export function, all ? are replaced with _ and export is sucessful, but no way to rebuild after.
Maybe I should read the names with UTF8 instead of ASCII. I never tested japanese roms.
How big is that rom? (it might also be that something goes wrong due to the names)For the Outofmemory Error with the build function, i have solve it. I just compile EFE in 64b mode instead of x86.
the rom is simply too big with x86, and the buffer is too large. So WriteBuffer(count, 1) in function Write in EndianBinaryWriter.cs hang.
I will try to change the way you handle the buffer, to see if that change something.
For the export function, i have try UTF8 and it's not the correct solution. The export process work, but the filename isn't the same on the filesystem and in the rom built after. So i suspect the game could hang with that.
I had a look at it, and it seems to contain some names with invalid characters indeed. I have no idea how these names have ended up in the rom. I think it is a problem of the rom and not a problem of EFE. Regarding the OutOfMemory Exception, this is because the rom is very big. The one I downloaded was 512 MB! I have never seen such a big NDS Rom to be honest. I was quite surprised that EFE did not even crash when opening it.For the Outofmemory Error with the build function, i have solve it. I just compile EFE in 64b mode instead of x86.
the rom is simply too big with x86, and the buffer is too large. So WriteBuffer(count, 1) in function Write in EndianBinaryWriter.cs hang.
I will try to change the way you handle the buffer, to see if that change something.
For the export function, i have try UTF8 and it's not the correct solution. The export process work, but the filename isn't the same on the filesystem and in the rom built after. So i suspect the game could hang with that.
BCTEX support is on the planning already, but I need to change the GUI like the NSBMD viewer to support different sections. I will do that soon.Would it be possible to request support for bctex files at all?
Currently the editor is fantastic for viewing anything 3D but it only tries to accept this as a 3d file eventhough its not, I can share a bctex or 2 if you don't have any to test with.
Thankyou.