示例#1
0
MACHINE_RESET_MEMBER(namcos2_shared_state,namcos2)
{
//  address_space &space = m_maincpu->space(AS_PROGRAM);
	address_space &audio_space = m_audiocpu->space(AS_PROGRAM);

	mFinalLapProtCount = 0;
	namcos2_mcu_analog_ctrl = 0;
	namcos2_mcu_analog_data = 0xaa;
	namcos2_mcu_analog_complete = 0;
	sendval = 0;

	/* Initialise the bank select in the sound CPU */
	namcos2_sound_bankselect_w(audio_space, 0, 0); /* Page in bank 0 */

	m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE );

	/* Place CPU2 & CPU3 into the reset condition */
	ResetAllSubCPUs( machine(), ASSERT_LINE );

	/* Initialise interrupt handlers */
	InitC148();

	/* reset POSIRQ timer */
	namcos2_posirq_timer->adjust(attotime::never);

	m_player_mux = 0;
}
示例#2
0
void namcos2_init_machine(void)
{
    int loop;

	if(namcos2_dpram==NULL) namcos2_dpram = malloc(0x800);
	memset( namcos2_dpram, 0, 0x800 );

	if(namcos2_sprite_ram==NULL) namcos2_sprite_ram = malloc(0x4000);
	memset( namcos2_sprite_ram, 0, 0x4000 );
	namcos2_sprite_bank=0;

    if(namcos2_68k_serial_comms_ram==NULL) namcos2_68k_serial_comms_ram = malloc(0x4000);
	memset( namcos2_68k_serial_comms_ram, 0, 0x4000 );

    if(namcos2_68k_roz_dirty_buffer==NULL) namcos2_68k_roz_dirty_buffer = malloc(0x10000);
	memset( namcos2_68k_roz_dirty_buffer, ROZ_DIRTY_TILE, 0x10000 );

	/* Initialise the bank select in the sound CPU */
	namcos2_sound_bankselect_w(0,0);		/* Page in bank 0 */

	/* Place CPU2 & CPU3 into the reset condition */
	namcos2_68k_master_C148_w(0x1e2000-0x1c0000,0);
	namcos2_68k_master_C148_w(0x1e4000-0x1c0000,0);

	/* Initialise interrupt handlers */
	for(loop=0;loop<20;loop++)
	{
        namcos2_68k_master_C148[loop]=0;
        namcos2_68k_slave_C148[loop]=0;
	}

	/* Disable ROZ by default */
	namcos2_68k_roz_ctrl_w(0x0e,0);
}