Core/burn/drv/capcom/cps_mem.cpp
// This routine is called first to determine how much memory is needed
// and then to set up all the pointers.
This routine is called first to determine how much memory is needed
and then to set up all the pointers.
This routine is called first to determine how much memory is needed and then to set up all the pointers .
static INT32 CpsMemIndex()
{
	UINT8*  Next; Next =  CpsMem;
	CpsRam90	  = Next; Next += 0x030000;							
	CpsRamFF	  = Next; Next += 0x010000;							
	CpsReg		  = Next; Next += 0x000100;							
	CpsSavePal    = Next; Next += 0x002000;							
	if (((Cps == 2) && !Cps2DisableQSnd) || Cps1Qs == 1) {
		CpsZRamC0 = Next; Next += 0x001000;							
		CpsZRamF0 = Next; Next += 0x001000;							
	}
	if (Cps == 2) {
		CpsRam660 = Next; Next += 0x004000;							
		CpsRam708 = Next; Next += 0x010000;							
		CpsFrg    = Next; Next += 0x000010;							
		ZBuf      = (UINT16*)Next; Next += 384 * 224 * 2;	
		CpsSaveRegData = Next; Next += 0x0100 * (MAX_RASTER + 1);	
		CpsSaveFrgData = Next; Next += 0x0010 * (MAX_RASTER + 1);	
		for (INT32 i = 0; i < MAX_RASTER + 1; i++) {
			CpsSaveReg[i] = CpsSaveRegData + i * 0x0100;
			CpsSaveFrg[i] = CpsSaveFrgData + i * 0x0010;
		}
	} else {
		CpsSaveRegData = Next; Next += 0x0100;						
		CpsSaveFrgData = Next; Next += 0x0010;						
		CpsSaveReg[0] = CpsSaveRegData;
		CpsSaveFrg[0] = CpsSaveFrgData;
	}
	CpsMemEnd = Next;
	return 0;
}
static INT32 CpsMemIndex ( ) { UINT8 * Next ; Next = CpsMem ; CpsRam90 = Next ; Next += 0x030000 ; CpsRamFF = Next ; Next += 0x010000 ; CpsReg = Next ; Next += 0x000100 ; CpsSavePal = Next ; Next += 0x002000 ; if ( ( ( Cps == 2 ) && ! Cps2DisableQSnd ) || Cps1Qs == 1 ) { CpsZRamC0 = Next ; Next += 0x001000 ; CpsZRamF0 = Next ; Next += 0x001000 ; } if ( Cps == 2 ) { CpsRam660 = Next ; Next += 0x004000 ; CpsRam708 = Next ; Next += 0x010000 ; CpsFrg = Next ; Next += 0x000010 ; ZBuf = ( UINT16 * ) Next ; Next += 384 * 224 * 2 ; CpsSaveRegData = Next ; Next += 0x0100 * ( MAX_RASTER + 1 ) ; CpsSaveFrgData = Next ; Next += 0x0010 * ( MAX_RASTER + 1 ) ; for ( INT32 i = 0 ; i < MAX_RASTER + 1 ; i ++ ) { CpsSaveReg [ i ] = CpsSaveRegData + i * 0x0100 ; CpsSaveFrg [ i ] = CpsSaveFrgData + i * 0x0010 ; } } else { CpsSaveRegData = Next ; Next += 0x0100 ; CpsSaveFrgData = Next ; Next += 0x0010 ; CpsSaveReg [ 0 ] = CpsSaveRegData ; CpsSaveFrg [ 0 ] = CpsSaveFrgData ; } CpsMemEnd = Next ; return 0 ; }
This routine is called first to determine how much memory is needed
and then to set up all the pointers.
This routine is called first to determine how much memory is needed and then to set up all the pointers .
// Video Ram // Work Ram // Registers // Draw Copy of Correct Palette // Z80 c000-cfff // Z80 f000-ffff // Extra Memory // Obj Ram // 'Four' Registers (Registers at 0x400000) // Sprite Masking Z buffer // Draw Copy of registers // Draw Copy of 'Four' Registers // Draw Copy of registers // Draw Copy of 'Four' Registers