Esempio n. 1
0
void S9xReset (void)
{
#ifdef SUPER_FX
    if (Settings.SuperFX)
        S9xResetSuperFX ();
#endif

    ZeroMemory (Memory.FillRAM, 0x8000);
    memset (Memory.VRAM, 0x00, 0x10000);
    memset (Memory.RAM, 0x55, 0x20000);

/*	if(Settings.SPC7110)
		S9xSpc7110Reset();*/
    S9xResetCPU ();
    S9xResetPPU ();
    S9xResetSRTC ();
    if (Settings.SDD1)
        S9xResetSDD1 ();

    S9xResetDMA ();
    S9xResetAPU ();
    S9xResetDSP1 ();
#ifdef USE_SA1
    S9xSA1Init ();
#endif

	if (Settings.C4)
		S9xInitC4 ();

	S9xResetSound(1);

    Settings.Paused = FALSE;
    
       //Init CPU Map & co
    CPU.Memory_Map=(uint8*)&(Memory.Map);
    CPU.Memory_WriteMap=(uint8*)&(Memory.WriteMap);
    CPU.Memory_MemorySpeed=Memory.MemorySpeed;
    CPU.Memory_BlockIsRAM=(uint8*)&(Memory.BlockIsRAM);
    CPU.Memory_SRAM=Memory.SRAM;
    CPU.Memory_BWRAM=Memory.BWRAM;
//    CPU.Memory_SRAMMask=Memory.SRAMMask;
	
}
Esempio n. 2
0
static 
int SnesRomLoad()
{
	char filename[SAL_MAX_PATH+1];
	int check;
	char text[256];
	FILE *stream=NULL;
  
    	MenuMessageBox("Loading Rom...",mRomName,"",MENU_MESSAGE_BOX_MODE_MSG);

	if (!Memory.LoadROM (mRomName))
	{
		MenuMessageBox("Loading Rom...",mRomName,"FAILED!!!!",MENU_MESSAGE_BOX_MODE_PAUSE);
		return SAL_ERROR;
	}
	
	MenuMessageBox("Loading Rom...OK!",mRomName,"",MENU_MESSAGE_BOX_MODE_MSG);

	S9xReset();
	S9xResetSound(1);
	S9xLoadSRAM();
	return SAL_OK;
}