mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-29 19:37:30 +01:00
.rrds added (Ridge Racer DS)
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@581 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
aa32b6378d
commit
164b6ddfe0
@ -1102,7 +1102,6 @@ Begin VB.Form Form1
|
||||
Left = 9960
|
||||
TabIndex = 100
|
||||
Top = 7320
|
||||
Visible = 0 'False
|
||||
Width = 2655
|
||||
End
|
||||
Begin VB.Frame frmSpecialOptionsGameCube
|
||||
|
@ -7,7 +7,7 @@ IconForm="Form1"
|
||||
Startup="Form1"
|
||||
HelpFile=""
|
||||
ExeName32="GENeric Header Creator 3.exe"
|
||||
Path32="C:\Dokumente und Einstellungen\Administrator\Desktop\Generic Header Creator"
|
||||
Path32="C:\Dokumente und Einstellungen\manakoAT\Desktop\Neuer Ordner (2)"
|
||||
Command32=""
|
||||
Name="Projekt1"
|
||||
HelpContextID="0"
|
||||
|
Binary file not shown.
@ -48,6 +48,9 @@
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.txtLoopStartCreator = new System.Windows.Forms.TextBox();
|
||||
this.txtLoopEndCreator = new System.Windows.Forms.TextBox();
|
||||
this.cmdUseFileEnd = new System.Windows.Forms.Button();
|
||||
this.txtInputFileLen = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listBox1
|
||||
@ -73,7 +76,7 @@
|
||||
this.txtInputFileCreator.Enabled = false;
|
||||
this.txtInputFileCreator.Location = new System.Drawing.Point(12, 25);
|
||||
this.txtInputFileCreator.Name = "txtInputFileCreator";
|
||||
this.txtInputFileCreator.Size = new System.Drawing.Size(320, 20);
|
||||
this.txtInputFileCreator.Size = new System.Drawing.Size(228, 20);
|
||||
this.txtInputFileCreator.TabIndex = 2;
|
||||
//
|
||||
// label2
|
||||
@ -231,9 +234,38 @@
|
||||
this.txtLoopEndCreator.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtLoopEndCreator.TabIndex = 20;
|
||||
//
|
||||
// cmdUseFileEnd
|
||||
//
|
||||
this.cmdUseFileEnd.Location = new System.Drawing.Point(369, 200);
|
||||
this.cmdUseFileEnd.Name = "cmdUseFileEnd";
|
||||
this.cmdUseFileEnd.Size = new System.Drawing.Size(210, 23);
|
||||
this.cmdUseFileEnd.TabIndex = 21;
|
||||
this.cmdUseFileEnd.Text = "Use File End";
|
||||
this.cmdUseFileEnd.UseVisualStyleBackColor = true;
|
||||
this.cmdUseFileEnd.Click += new System.EventHandler(this.cmdUseFileEnd_Click);
|
||||
//
|
||||
// txtInputFileLen
|
||||
//
|
||||
this.txtInputFileLen.Location = new System.Drawing.Point(246, 24);
|
||||
this.txtInputFileLen.Name = "txtInputFileLen";
|
||||
this.txtInputFileLen.Size = new System.Drawing.Size(85, 20);
|
||||
this.txtInputFileLen.TabIndex = 22;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(243, 9);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(47, 13);
|
||||
this.label10.TabIndex = 23;
|
||||
this.label10.Text = "Fie Size:";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(652, 355);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.txtInputFileLen);
|
||||
this.Controls.Add(this.cmdUseFileEnd);
|
||||
this.Controls.Add(this.txtLoopEndCreator);
|
||||
this.Controls.Add(this.txtLoopStartCreator);
|
||||
this.Controls.Add(this.label9);
|
||||
@ -283,6 +315,9 @@
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.TextBox txtLoopStartCreator;
|
||||
private System.Windows.Forms.TextBox txtLoopEndCreator;
|
||||
private System.Windows.Forms.Button cmdUseFileEnd;
|
||||
private System.Windows.Forms.TextBox txtInputFileLen;
|
||||
private System.Windows.Forms.Label label10;
|
||||
|
||||
|
||||
|
||||
|
@ -34,12 +34,20 @@ namespace Generic_Header_Creator_4
|
||||
this.txtGENHOutputNameCreator.Text = (Path.GetFileNameWithoutExtension(this.txtInputFileCreator.Text) + ".GENH");
|
||||
// Open the Input File as "FileStream" from the previous first TextBox
|
||||
// FileStream strInputFileCreator = new FileStream(Path.GetFullPath(this.txtInputFileCreator.Text), FileMode.Open, FileAccess.Read);
|
||||
|
||||
FileInfo fi = new FileInfo(Path.GetFullPath(this.txtInputFileCreator.Text));
|
||||
string InputFileLen = fi.Length.ToString();
|
||||
this.txtInputFileLen.Text = InputFileLen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void cmdCreateGENH_Click(object sender, EventArgs e)
|
||||
{
|
||||
FileStream strInputFileCreator = new FileStream(Path.GetFullPath(this.txtInputFileCreator.Text), FileMode.Open, FileAccess.Read);
|
||||
|
||||
|
||||
|
||||
// Place checks for values and all needed stuff here
|
||||
int GENHToken = 0x484E4547; //HNEG (GENH)
|
||||
int GENHChannels = int.Parse(this.txtChannelsCreator.Text);
|
||||
@ -117,6 +125,32 @@ namespace Generic_Header_Creator_4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cmdUseFileEnd_Click(object sender, EventArgs e)
|
||||
{
|
||||
int GENHIdentiferByte = (this.comboFileFomat.SelectedIndex);
|
||||
int GENHChannels = int.Parse(this.txtChannelsCreator.Text);
|
||||
|
||||
|
||||
FileStream strInputFileCreator = new FileStream(Path.GetFullPath(this.txtInputFileCreator.Text), FileMode.Open, FileAccess.Read);
|
||||
|
||||
|
||||
|
||||
switch (GENHIdentiferByte) {
|
||||
case 0:
|
||||
|
||||
break;
|
||||
case 1:
|
||||
|
||||
break;
|
||||
default:
|
||||
// alles andere interessiert uns nicht
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -180,7 +180,8 @@ META_OBJS=meta/adx_header.o \
|
||||
meta/ngc_ffcc_str.o \
|
||||
meta/sat_baka.o \
|
||||
meta/nds_swav.o \
|
||||
meta/vsf.o
|
||||
meta/vsf.o \
|
||||
meta/nds_rrds.o
|
||||
|
||||
OBJECTS=vgmstream.o streamfile.o util.o $(CODING_OBJS) $(LAYOUT_OBJS) $(META_OBJS)
|
||||
|
||||
|
@ -362,6 +362,10 @@
|
||||
RelativePath=".\meta\naomi_spsd.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\meta\nds_rrds.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\meta\nds_sad.c"
|
||||
>
|
||||
|
@ -141,5 +141,6 @@ libmeta_la_SOURCES += ngc_ffcc_str.c
|
||||
libmeta_la_SOURCES += sat_baka.c
|
||||
libmeta_la_SOURCES += nds_swav.c
|
||||
libmeta_la_SOURCES += vsf.c
|
||||
libmeta_la_SOURCES += nds_rrds.c
|
||||
|
||||
EXTRA_DIST = meta.h
|
||||
|
@ -338,4 +338,6 @@ VGMSTREAM * init_vgmstream_nds_swav(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_vsf(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_nds_rrds(STREAMFILE *streamFile);
|
||||
|
||||
#endif
|
||||
|
67
src/meta/nds_rrds.c
Normal file
67
src/meta/nds_rrds.c
Normal file
@ -0,0 +1,67 @@
|
||||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
|
||||
/* bxaimc - 2009-03-05
|
||||
- RRDS - found in Ridge Racer DS */
|
||||
|
||||
VGMSTREAM * init_vgmstream_nds_rrds(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[260];
|
||||
int codec_number;
|
||||
int channel_count;
|
||||
int loop_flag;
|
||||
off_t start_offset;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("rrds",filename_extension(filename))) goto fail;
|
||||
|
||||
/* check size */
|
||||
if ((read_32bitLE(0x0,streamFile)+0x18) != get_streamfile_size(streamFile))
|
||||
goto fail;
|
||||
|
||||
/* check type details */
|
||||
loop_flag = (read_32bitLE(0x14,streamFile) != 0);
|
||||
channel_count = 1;
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* fill in the vital statistics */
|
||||
start_offset = 0x18;
|
||||
vgmstream->num_samples = (read_32bitLE(0x0,streamFile)-start_offset) / channel_count * 2;
|
||||
vgmstream->sample_rate = read_32bitLE(0x8,streamFile);
|
||||
|
||||
if (loop_flag) {
|
||||
vgmstream->loop_start_sample = (read_32bitLE(0x14,streamFile)-start_offset) / channel_count * 2;
|
||||
vgmstream->loop_end_sample = vgmstream->num_samples;
|
||||
}
|
||||
|
||||
vgmstream->coding_type = coding_IMA;
|
||||
vgmstream->meta_type = meta_NDS_RRDS;
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
||||
|
||||
/* open the file for reading */
|
||||
{
|
||||
int i;
|
||||
STREAMFILE * file;
|
||||
file = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
if (!file) goto fail;
|
||||
for (i=0;i<channel_count;i++) {
|
||||
vgmstream->ch[i].streamfile = file;
|
||||
|
||||
vgmstream->ch[i].channel_start_offset=
|
||||
vgmstream->ch[i].offset=start_offset+
|
||||
vgmstream->interleave_block_size*i;
|
||||
}
|
||||
}
|
||||
|
||||
return vgmstream;
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
@ -189,6 +189,7 @@ VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
|
||||
init_vgmstream_sat_baka,
|
||||
init_vgmstream_nds_swav,
|
||||
init_vgmstream_ps2_vsf,
|
||||
init_vgmstream_nds_rrds,
|
||||
};
|
||||
|
||||
#define INIT_VGMSTREAM_FCNS (sizeof(init_vgmstream_fcns)/sizeof(init_vgmstream_fcns[0]))
|
||||
@ -2060,6 +2061,9 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
||||
case meta_PS2_VSF:
|
||||
snprintf(temp,TEMPSIZE,"Musashi: Samurai Legend VSF Header");
|
||||
break;
|
||||
case meta_NDS_RRDS:
|
||||
snprintf(temp,TEMPSIZE,"Ridger Racer DS Header");
|
||||
break;
|
||||
default:
|
||||
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
||||
}
|
||||
|
@ -179,6 +179,7 @@ typedef enum {
|
||||
meta_THP,
|
||||
meta_RSTM_shrunken, /* Atlus' mutant shortened RSTM */
|
||||
meta_NDS_SWAV, /* Asphalt Urban GT 1 & 2 */
|
||||
meta_NDS_RRDS, /* Ridge Racer DS */
|
||||
|
||||
/* CRI ADX */
|
||||
meta_ADX_03, /* ADX "type 03" */
|
||||
|
@ -226,6 +226,7 @@ char * extension_list[] = {
|
||||
"baka\0BAKA Audio File (*.BAKA)\0",
|
||||
"swav\0SWAV Audio File (*.SWAV)\0",
|
||||
"vsf\0VSF Audio File (*.VSF)\0",
|
||||
"rrds\0RRDS Audio File (*.RRDS)\0",
|
||||
};
|
||||
|
||||
void about(HWND hwndParent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user