static void neogeo_set_cpu1_second_bank(UINT32 offset) { if (m68k_second_bank != offset) { m68k_second_bank = offset; neogeo_cpu1_second_bank = (UINT16 *)((UINT32)memory_region_cpu1 + offset - 0x200000); C68k_Set_Fetch(&C68K, 0x200000, 0x2fffff, (UINT32)&memory_region_cpu1[offset]); } }
inline void M68K_SetFetch(u32 low_adr, u32 high_adr, u32 fetch_adr) { // MUSASHI // C68K #ifdef CPU68K_USE_C68K C68k_Set_Fetch(&C68K, low_adr, high_adr, fetch_adr); #endif }
///////////////////////////////////////////////////////////////////////////// // // Check to see if this structure has moved, and if so, recompute // static void location_check(struct SATSOUND_STATE *state) { if(state->myself != state) { #if defined(USE_STARSCREAM) || defined(USE_M68K) recompute_and_set_memory_maps(SATSOUNDSTATE); #else C68k_Set_Fetch(SCPUSTATE, 0x00000, 0x7FFFF, RAMBYTEPTR); #endif yam_setram(YAMSTATE, (uint32*)(RAMBYTEPTR), 0x80000, EMU_ENDIAN_XOR(1) ^ 1, 0); state->myself = state; } }
inline void M68K_Init(void) { #ifdef CPU68K_USE_MUSASHI // MUSASHI m68k_set_cpu_type(M68K_CPU_TYPE_68000); m68k_pulse_reset(); #endif #ifdef CPU68K_USE_C68K // C68K C68k_Init(&C68K, NULL); C68k_Set_ReadB(&C68K, m68k_read_memory_8); C68k_Set_ReadW(&C68K, m68k_read_memory_16); C68k_Set_WriteB(&C68K, m68k_write_memory_8); C68k_Set_WriteW(&C68K, m68k_write_memory_16); C68k_Set_Fetch(&C68K, 0x000000, 0x1FFFFF, (u32) neogeo_prg_memory); C68k_Set_Fetch(&C68K, 0xC00000, 0xC7FFFF, (u32) neogeo_rom_memory); C68k_Reset(&C68K); #endif }
void m68000_init(void) { C68k_Init(&C68K); C68k_Set_ReadB(&C68K, Memory_ReadB); C68k_Set_ReadW(&C68K, Memory_ReadW); C68k_Set_WriteB(&C68K, Memory_WriteB); C68k_Set_WriteW(&C68K, Memory_WriteW); C68k_Set_Fetch(&C68K, 0x000000, 0xbfffff, (UINT32)MEM); C68k_Set_Fetch(&C68K, 0xc00000, 0xc7ffff, (UINT32)GVRAM); C68k_Set_Fetch(&C68K, 0xe00000, 0xe7ffff, (UINT32)TVRAM); C68k_Set_Fetch(&C68K, 0xea0000, 0xea1fff, (UINT32)SCSIIPL); C68k_Set_Fetch(&C68K, 0xed0000, 0xed3fff, (UINT32)SRAM); C68k_Set_Fetch(&C68K, 0xf00000, 0xfbffff, (UINT32)FONT); C68k_Set_Fetch(&C68K, 0xfc0000, 0xffffff, (UINT32)IPL); }
static void M68KC68KSetFetch(u32 low_adr, u32 high_adr, pointer fetch_adr) { C68k_Set_Fetch(&C68K, low_adr, high_adr, fetch_adr); }