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 ZetUnmapMemory(INT32 nStart, INT32 nEnd, INT32 nFlags)
{
#if defined FBA_DEBUG
	if (!DebugCPU_ZetInitted) bprintf(PRINT_ERROR, _T("ZetUnmapMemory called without init\n"));
	if (nOpenedCPU == -1) bprintf(PRINT_ERROR, _T("ZetUnmapMemory called when no CPU open\n"));
#endif
	UINT8 cStart = (nStart >> 8);
	UINT8 **pMemMap = ZetCPUContext[nOpenedCPU]->pZetMemMap;
	for (UINT16 i = cStart; i <= (nEnd >> 8); i++) {
		if (nFlags & (1 << 0)) pMemMap[0     + i] = NULL; 
		if (nFlags & (1 << 1)) pMemMap[0x100 + i] = NULL; 
		if (nFlags & (1 << 2)) pMemMap[0x200 + i] = NULL; 
		if (nFlags & (1 << 3)) pMemMap[0x300 + i] = NULL; 
	}
	return 0;
}
INT32 ZetUnmapMemory ( INT32 nStart , INT32 nEnd , INT32 nFlags ) { #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 ++ ) { if ( nFlags & ( 1 << 0 ) ) pMemMap [ 0 + i ] = NULL ; if ( nFlags & ( 1 << 1 ) ) pMemMap [ 0x100 + i ] = NULL ; if ( nFlags & ( 1 << 2 ) ) pMemMap [ 0x200 + i ] = NULL ; if ( nFlags & ( 1 << 3 ) ) pMemMap [ 0x300 + i ] = NULL ; } return 0 ; }
This function will make an area callback ZetRead/ZetWrite
This function will make an area callback ZetRead / ZetWrite
// READ // WRITE // OP // ARG