Core/burn/drv/capcom/cps_mem.cpp
// Scan the current state of the CPS1/2 machine
Scan the current state of the CPS1/2 machine
Scan the current state of the CPS1 / 2 machine
INT32 CpsAreaScan(INT32 nAction, INT32 *pnMin)
{
	struct BurnArea ba;
	if (CpsMem == NULL) {
		return 1;
	}
	if (pnMin) {										
		*pnMin = 0x029521;
	}
	if (nAction & ACB_MEMORY_ROM) {
		memset(&ba, 0, sizeof(ba));
		ba.Data   = CpsRom;
		ba.nLen   = nCpsRomLen;
		ba.szName = "CpsRom";
		BurnAcb(&ba);
		if (nCpsZRomLen) {
			ba.Data   = CpsZRom;
			ba.nLen   = nCpsZRomLen;
			ba.szName = "CpsZRom";
			BurnAcb(&ba);
		}
	}
	if (Cps == 2 || Cps1Qs == 1 || PangEEP == 1 || CpsBootlegEEPROM == 1) {		
		EEPROMScan(nAction, pnMin);
	}
	if (nAction & ACB_MEMORY_RAM) {
		ScanRam();
		if (Cps == 2) {
			memset(&ba, 0, sizeof(ba));
			ba.Data   = CpsRam660;
			ba.nLen   = 0x004000;
			ba.szName = "CpsRam660";
			BurnAcb(&ba);
		}
	}
	if (nAction & ACB_DRIVER_DATA) {					
		SekScan(nAction);								
		if (Cps1OverrideLayers) {
			SCAN_VAR(nCps1Layers);
			SCAN_VAR(nCps1LayerOffs);
		}
		if (nAction & ACB_WRITE) {						
			CpsRecalcPal = 1;
		}
	}
	if (((Cps == 2) && !Cps2DisableQSnd) || Cps1Qs == 1) {						
		QsndScan(nAction);
	} else {											
		if ((Cps & 1) && !Cps1DisablePSnd) PsndScan(nAction);
	}
	if (CpsMemScanCallbackFunction) {
		CpsMemScanCallbackFunction(nAction, pnMin);
	}
	return 0;
}
INT32 CpsAreaScan ( INT32 nAction , INT32 * pnMin ) { struct BurnArea ba ; if ( CpsMem == NULL ) { return 1 ; } if ( pnMin ) { * pnMin = 0x029521 ; } if ( nAction & ACB_MEMORY_ROM ) { memset ( & ba , 0 , sizeof ( ba ) ) ; ba . Data = CpsRom ; ba . nLen = nCpsRomLen ; ba . szName = " " ; BurnAcb ( & ba ) ; if ( nCpsZRomLen ) { ba . Data = CpsZRom ; ba . nLen = nCpsZRomLen ; ba . szName = " " ; BurnAcb ( & ba ) ; } } if ( Cps == 2 || Cps1Qs == 1 || PangEEP == 1 || CpsBootlegEEPROM == 1 ) { EEPROMScan ( nAction , pnMin ) ; } if ( nAction & ACB_MEMORY_RAM ) { ScanRam ( ) ; if ( Cps == 2 ) { memset ( & ba , 0 , sizeof ( ba ) ) ; ba . Data = CpsRam660 ; ba . nLen = 0x004000 ; ba . szName = " " ; BurnAcb ( & ba ) ; } } if ( nAction & ACB_DRIVER_DATA ) { SekScan ( nAction ) ; if ( Cps1OverrideLayers ) { SCAN_VAR ( nCps1Layers ) ; SCAN_VAR ( nCps1LayerOffs ) ; } if ( nAction & ACB_WRITE ) { CpsRecalcPal = 1 ; } } if ( ( ( Cps == 2 ) && ! Cps2DisableQSnd ) || Cps1Qs == 1 ) { QsndScan ( nAction ) ; } else { if ( ( Cps & 1 ) && ! Cps1DisablePSnd ) PsndScan ( nAction ) ; } if ( CpsMemScanCallbackFunction ) { CpsMemScanCallbackFunction ( nAction , pnMin ) ; } return 0 ; }
Scan the current state of the CPS1/2 machine
Scan the current state of the CPS1 / 2 machine
// Return minimum compatible version // Scan EEPROM // Scan volatile variables/registers/RAM // Scan 68000 state // Palette could have changed // Scan QSound chips // Scan PSound chips