Exemple #1
0
//static DEVICE_RESET( ym2612 )
void device_reset_ym2612(UINT8 ChipID)
{
	//ym2612_state *info = get_safe_token(device);
	ym2612_state *info = &YM2612Data[ChipID];
	switch(EMU_CORE)
	{
	case EC_MAME:
		ym2612_reset_chip(info->chip);
		break;
#ifdef ENABLE_ALL_CORES
	case EC_GENS:
		YM2612_Reset(info->chip);
		break;
#endif
	}
}
Exemple #2
0
/**
 * Reset_Genesis(): Resets the Genesis.
 */
void Reset_Genesis(void)
{
	// Clear the sound buffer.
	audio_clear_sound_buffer();
	
	Controller_1_COM = Controller_2_COM = 0;
	Settings.Paused = 0;
	
	// If the ROM size is smaller than 2MB, enable SRAM.
	// Otherwise, disable SRAM.
	// TODO: Instead of hardcoding 2MB, use SRAM_Start.
	if (Rom_Size <= (2 * 1024 * 1024))
	{
		SRAM_ON = 1;
		SRAM_Write = 1;
	}
	else
	{
		SRAM_ON = 0;
		SRAM_Write = 0;
	}
	
	// Reset all CPUs and other components.
	M68K_Reset(0);
	Z80_Reset();
	VDP_Reset();
	YM2612_Reset();
	
	// Initialize the controller state.
	Init_Controllers();
	
	if (CPU_Mode)
		VDP_Status |= 1;
	else
		VDP_Status &= ~1;
	
	if (Auto_Fix_CS)
		ROM::fixChecksum();
}