Exemplo n.º 1
0
JNIEXPORT void JNICALL Java_uk_org_cardboardbox_wonderdroid_WonderSwan_reset(JNIEnv * env, jclass obj) {
	LOGD("v30mz_reset()");
	v30mz_reset();
	LOGD("WSwan_MemoryReset()");
	WSwan_MemoryReset();
	LOGD("WSwan_GfxReset()");
	WSwan_GfxReset();
	LOGD("WSwan_SoundReset()");
	wswan_soundreset();
	LOGD("WSwan_InterruptReset()");
	WSwan_InterruptReset();
	LOGD("WSwan_RTCReset()");
	WSwan_RTCReset();
	LOGD("WSwan_EEPROMReset()");
	WSwan_EEPROMReset();

	wsMakeTiles();
	wsSetVideo(wsVMode, TRUE);

	for (int u0 = 0; u0 < 0xc9; u0++)
		WSwan_writeport(u0, startio[u0]);

	v30mz_set_reg(NEC_SS, 0);
	v30mz_set_reg(NEC_SP, 0x2000);
}
Exemplo n.º 2
0
static void Reset(void)
{
	int		u0;

	v30mz_reset();				/* Reset CPU */
	WSwan_MemoryReset();
        WSwan_GfxReset();
        WSwan_SoundReset();
	WSwan_InterruptReset();
        WSwan_RTCReset();
	WSwan_EEPROMReset();

	for(u0=0;u0<0xc9;u0++)
	{
	 if(u0 != 0xC4 && u0 != 0xC5 && u0 != 0xBA && u0 != 0xBB)
	  WSwan_writeport(u0,startio[u0]);
	}

	v30mz_set_reg(NEC_SS,0);
	v30mz_set_reg(NEC_SP,0x2000);

	if(IsWSR)
	{
	 v30mz_set_reg(NEC_AW, WSRCurrentSong);
	}
}