Beispiel #1
0
static void hash_hes_file( Hes_Emu::header_t const& h, byte const* data, int data_size, Music_Emu::Hash_Function& out )
{
	out.hash_( &h.vers, sizeof(h.vers) );
	out.hash_( &h.first_track, sizeof(h.first_track) );
	out.hash_( &h.init_addr[0], sizeof(h.init_addr) );
	out.hash_( &h.banks[0], sizeof(h.banks) );
	out.hash_( &h.data_size[0], sizeof(h.data_size) );
	out.hash_( &h.addr[0], sizeof(h.addr) );
	out.hash_( &h.unused[0], sizeof(h.unused) );
	out.hash_( data, Hes_Core::info_offset );

    track_info_t temp; // GCC whines about passing a pointer to a temporary here
    byte const* more_data = copy_hes_fields( data + Hes_Core::info_offset, &temp );
	out.hash_( more_data, data_size - ( more_data - data ) );
}
Beispiel #2
0
static void hash_sap_file( Sap_Emu::info_t const& i, byte const* data, int data_size, Music_Emu::Hash_Function& out )
{
	unsigned char temp[4];
	set_le32( &temp[0], i.init_addr ); out.hash_( &temp[0], sizeof(temp) );
	set_le32( &temp[0], i.play_addr ); out.hash_( &temp[0], sizeof(temp) );
	set_le32( &temp[0], i.music_addr ); out.hash_( &temp[0], sizeof(temp) );
	set_le32( &temp[0], i.type ); out.hash_( &temp[0], sizeof(temp) );
	set_le32( &temp[0], i.fastplay ); out.hash_( &temp[0], sizeof(temp) );
	set_le32( &temp[0], i.stereo ); out.hash_( &temp[0], sizeof(temp) );
	set_le32( &temp[0], i.track_count ); out.hash_( &temp[0], sizeof(temp) );
	out.hash_( data, data_size );
}
Beispiel #3
0
static void hash_gbs_file( Gbs_Emu::header_t const& h, byte const* data, int data_size, Music_Emu::Hash_Function& out )
{
	out.hash_( &h.vers, sizeof(h.vers) );
	out.hash_( &h.track_count, sizeof(h.track_count) );
	out.hash_( &h.first_track, sizeof(h.first_track) );
	out.hash_( &h.load_addr[0], sizeof(h.load_addr) );
	out.hash_( &h.init_addr[0], sizeof(h.init_addr) );
	out.hash_( &h.play_addr[0], sizeof(h.play_addr) );
	out.hash_( &h.stack_ptr[0], sizeof(h.stack_ptr) );
	out.hash_( &h.timer_modulo, sizeof(h.timer_modulo) );
	out.hash_( &h.timer_mode, sizeof(h.timer_mode) );
	out.hash_( data, data_size );
}
Beispiel #4
0
static void hash_kss_file( Kss_Core::header_t const& h, byte const* data, int data_size, Music_Emu::Hash_Function& out )
{
	out.hash_( &h.load_addr[0], sizeof(h.load_addr) );
	out.hash_( &h.load_size[0], sizeof(h.load_size) );
	out.hash_( &h.init_addr[0], sizeof(h.init_addr) );
	out.hash_( &h.play_addr[0], sizeof(h.play_addr) );
	out.hash_( &h.first_bank, sizeof(h.first_bank) );
	out.hash_( &h.bank_mode, sizeof(h.bank_mode) );
	out.hash_( &h.extra_header, sizeof(h.extra_header) );
	out.hash_( &h.device_flags, sizeof(h.device_flags) );

	out.hash_( data, data_size );
}
Beispiel #5
0
static void hash_vgm_file( Vgm_Emu::header_t const& h, byte const* data, int data_size, Music_Emu::Hash_Function& out )
{
	out.hash_( &h.data_size[0], sizeof(h.data_size) );
	out.hash_( &h.version[0], sizeof(h.version) );
	out.hash_( &h.psg_rate[0], sizeof(h.psg_rate) );
	out.hash_( &h.ym2413_rate[0], sizeof(h.ym2413_rate) );
	out.hash_( &h.track_duration[0], sizeof(h.track_duration) );
	out.hash_( &h.loop_offset[0], sizeof(h.loop_offset) );
	out.hash_( &h.loop_duration[0], sizeof(h.loop_duration) );
	out.hash_( &h.frame_rate[0], sizeof(h.frame_rate) );
	out.hash_( &h.noise_feedback[0], sizeof(h.noise_feedback) );
	out.hash_( &h.noise_width, sizeof(h.noise_width) );
	out.hash_( &h.sn76489_flags, sizeof(h.sn76489_flags) );
	out.hash_( &h.ym2612_rate[0], sizeof(h.ym2612_rate) );
	out.hash_( &h.ym2151_rate[0], sizeof(h.ym2151_rate) );
	out.hash_( &h.data_offset[0], sizeof(h.data_offset) );
	out.hash_( &h.segapcm_rate[0], sizeof(h.segapcm_rate) );
	out.hash_( &h.segapcm_reg[0], sizeof(h.segapcm_reg) );
	out.hash_( &h.rf5c68_rate[0], sizeof(h.rf5c68_rate) );
	out.hash_( &h.ym2203_rate[0], sizeof(h.ym2203_rate) );
	out.hash_( &h.ym2608_rate[0], sizeof(h.ym2608_rate) );
	out.hash_( &h.ym2610_rate[0], sizeof(h.ym2610_rate) );
	out.hash_( &h.ym3812_rate[0], sizeof(h.ym3812_rate) );
	out.hash_( &h.ym3526_rate[0], sizeof(h.ym3526_rate) );
	out.hash_( &h.y8950_rate[0], sizeof(h.y8950_rate) );
	out.hash_( &h.ymf262_rate[0], sizeof(h.ymf262_rate) );
	out.hash_( &h.ymf278b_rate[0], sizeof(h.ymf278b_rate) );
	out.hash_( &h.ymf271_rate[0], sizeof(h.ymf271_rate) );
	out.hash_( &h.ymz280b_rate[0], sizeof(h.ymz280b_rate) );
	out.hash_( &h.rf5c164_rate[0], sizeof(h.rf5c164_rate) );
	out.hash_( &h.pwm_rate[0], sizeof(h.pwm_rate) );
	out.hash_( &h.ay8910_rate[0], sizeof(h.ay8910_rate) );
	out.hash_( &h.ay8910_type, sizeof(h.ay8910_type) );
	out.hash_( &h.ay8910_flags, sizeof(h.ay8910_flags) );
	out.hash_( &h.ym2203_ay8910_flags, sizeof(h.ym2203_ay8910_flags) );
	out.hash_( &h.ym2608_ay8910_flags, sizeof(h.ym2608_ay8910_flags) );
	out.hash_( &h.reserved, sizeof(h.reserved) );
	out.hash_( &h.gbdmg_rate[0], sizeof(h.gbdmg_rate) );
	out.hash_( &h.nesapu_rate[0], sizeof(h.nesapu_rate) );
	out.hash_( &h.multipcm_rate[0], sizeof(h.multipcm_rate) );
	out.hash_( &h.upd7759_rate[0], sizeof(h.upd7759_rate) );
	out.hash_( &h.okim6258_rate[0], sizeof(h.okim6258_rate) );
	out.hash_( &h.okim6258_flags, sizeof(h.okim6258_flags) );
	out.hash_( &h.k054539_flags, sizeof(h.k054539_flags) );
	out.hash_( &h.c140_type, sizeof(h.c140_type) );
	out.hash_( &h.reserved_flags, sizeof(h.reserved_flags) );
	out.hash_( &h.okim6295_rate[0], sizeof(h.okim6295_rate) );
	out.hash_( &h.k051649_rate[0], sizeof(h.k051649_rate) );
	out.hash_( &h.k054539_rate[0], sizeof(h.k054539_rate) );
	out.hash_( &h.huc6280_rate[0], sizeof(h.huc6280_rate) );
	out.hash_( &h.c140_rate[0], sizeof(h.c140_rate) );
	out.hash_( &h.k053260_rate[0], sizeof(h.k053260_rate) );
	out.hash_( &h.pokey_rate[0], sizeof(h.pokey_rate) );
	out.hash_( &h.qsound_rate[0], sizeof(h.qsound_rate) );
	out.hash_( &h.reserved2[0], sizeof(h.reserved2) );
	out.hash_( &h.extra_offset[0], sizeof(h.extra_offset) );
	out.hash_( data, data_size );
}
Beispiel #6
0
static void hash_gym_file( Gym_Emu::header_t const& h, byte const* data, int data_size, Music_Emu::Hash_Function& out )
{
	out.hash_( &h.loop_start[0], sizeof(h.loop_start) );
	out.hash_( &h.packed[0], sizeof(h.packed) );
	out.hash_( data, data_size );
}
Beispiel #7
0
static void hash_sfm_file( byte const* data, int data_size, Music_Emu::Hash_Function& out )
{
    out.hash_( data, data_size );
}