Core/cpu/z80_intf.cpp
// This function will make an area callback ZetRead/ZetWrite
This function will make an area callback ZetRead/ZetWrite
This function will make an area callback ZetRead / ZetWrite
INT32 ZetMemCallback(INT32 nStart, INT32 nEnd, INT32 nMode)
{
#if defined FBA_DEBUG
	if (!DebugCPU_ZetInitted) bprintf(PRINT_ERROR, _T("ZetMemCallback called without init\n"));
	if (nOpenedCPU == -1) bprintf(PRINT_ERROR, _T("ZetMemCallback called when no CPU open\n"));
#endif
	UINT8 cStart = (nStart >> 8);
	UINT8 **pMemMap = ZetCPUContext[nOpenedCPU]->pZetMemMap;
	for (UINT16 i = cStart; i <= (nEnd >> 8); i++) {
		switch (nMode) {
			case 0:
				pMemMap[0     + i] = NULL;
				break;
			case 1:
				pMemMap[0x100 + i] = NULL;
				break;
			case 2:
				pMemMap[0x200 + i] = NULL;
				pMemMap[0x300 + i] = NULL;
				break;
		}
	}
	return 0;
}
INT32 ZetMemCallback ( INT32 nStart , INT32 nEnd , INT32 nMode ) { #if defined FBA_DEBUG if ( ! DebugCPU_ZetInitted ) bprintf ( PRINT_ERROR , _T ( " \n " ) ) ; if ( nOpenedCPU == -1 ) bprintf ( PRINT_ERROR , _T ( " \n " ) ) ; #endif UINT8 cStart = ( nStart >> 8 ) ; UINT8 * * pMemMap = ZetCPUContext [ nOpenedCPU ] -> pZetMemMap ; for ( UINT16 i = cStart ; i <= ( nEnd >> 8 ) ; i ++ ) { switch ( nMode ) { case 0 : pMemMap [ 0 + i ] = NULL ; break ; case 1 : pMemMap [ 0x100 + i ] = NULL ; break ; case 2 : pMemMap [ 0x200 + i ] = NULL ; pMemMap [ 0x300 + i ] = NULL ; break ; } } return 0 ; }
This function will make an area callback ZetRead/ZetWrite
This function will make an area callback ZetRead / ZetWrite