void map_overlay (int chip) { int i = allocated_chipmem > 0x200000 ? (allocated_chipmem >> 16) : 32; addrbank *cb; cb = &chipmem_bank; if (chip) map_banks (cb, 0, i, allocated_chipmem); else map_banks (&kickmem_bank, 0, i, 0x80000); if (savestate_state != STATE_RESTORE) m68k_setpc (m68k_getpc ()); }
static void uae_ppc_cpu_reset(void) { TRACE(_T("uae_ppc_cpu_reset\n")); initialize(); static bool ppc_cpu_init_done; if (!ppc_cpu_init_done) { write_log(_T("PPC: Hard reset\n")); cpu_init(); ppc_cpu_init_done = true; } /* Map memory and I/O banks (for QEmu PPC implementation) */ map_banks(); if (using_qemu()) { impl.reset(); } else if (using_pearpc()) { write_log(_T("PPC: Init\n")); impl.set_pc(0, 0xfff00100); ppc_cycle_count = 2000; } ppc_cpu_lock_state = 0; ppc_state = PPC_STATE_ACTIVE; }
void expamem_next (void) { expamem_init_clear (); map_banks (&expamem_bank, 0xE8, 1, 0); ++ecard; if (ecard < cardno) { expamem_bank.name = card_name[ecard] ? card_name[ecard] : (TCHAR*) _T("None"); (*card_init[ecard]) (); } else { expamem_init_clear2 (); } }
void memory_reset (void) { int i, custom_start; if (mainMenu_useOneMegaChip) prefs_chipmem_size=0x00100000; else prefs_chipmem_size=0x00100000>>1; #ifdef DEBUG_MEMORY dbg("memory_reset!"); #endif #ifdef NATMEM_OFFSET delete_shmmaps (0, 0xFFFF0000); #endif init_mem_banks (); memset(chipmemory,0,allocated_chipmem); #ifdef USE_FAME_CORE clear_fame_mem_dummy(); #endif rtarea_cleanup(); allocate_memory (); /* Map the chipmem into all of the lower 8MB */ i = allocated_chipmem > 0x200000 ? (allocated_chipmem >> 16) : 32; #ifdef DEBUG_MEMORY dbg("map_banks : chipmem_bank"); #endif map_banks (&chipmem_bank, 0x00, i, allocated_chipmem); custom_start = 0xC0; #ifdef DEBUG_MEMORY dbg("map_banks : custom_bank"); #endif map_banks (&custom_bank, custom_start, 0xE0 - custom_start, 0); #ifdef DEBUG_MEMORY dbg("map_banks : cia_bank"); #endif map_banks (&cia_bank, 0xA0, 32, 0); #ifdef DEBUG_MEMORY dbg("map_banks : clock_bank"); #endif map_banks (&clock_bank, 0xDC, 1, 0); /* @@@ Does anyone have a clue what should be in the 0x200000 - 0xA00000 * range on an Amiga without expansion memory? */ custom_start = allocated_chipmem >> 16; if (custom_start < 0x20) custom_start = 0x20; #ifdef DEBUG_MEMORY dbg("map_banks : dummy_bank"); #endif map_banks (&dummy_bank, custom_start, 0xA0 - custom_start, 0); /*map_banks (&mbres_bank, 0xDE, 1); */ if (bogomemory != 0) { int t = allocated_bogomem >> 16; if (t > 0x1C) t = 0x1C; #ifdef DEBUG_MEMORY dbg("map_banks : bogomem_bank"); #endif map_banks (&bogomem_bank, 0xC0, t, allocated_bogomem); }
void memory_reset (void) { int bnk, bnk_end; #ifdef NATMEM_OFFSET delete_shmmaps (0, 0xFFFF0000); #endif init_mem_banks (); currprefs.chipmem_size = changed_prefs.chipmem_size; currprefs.bogomem_size = changed_prefs.bogomem_size; currprefs.mbresmem_low_size = changed_prefs.mbresmem_low_size; currprefs.mbresmem_high_size = changed_prefs.mbresmem_high_size; currprefs.chipset_mask = changed_prefs.chipset_mask; currprefs.cs_a1000ram = changed_prefs.cs_a1000ram; currprefs.cs_fatgaryrev = changed_prefs.cs_fatgaryrev; currprefs.cs_ramseyrev = changed_prefs.cs_ramseyrev; currprefs.cs_ide = changed_prefs.cs_ide; currprefs.bootrom = changed_prefs.bootrom; need_hardreset = 0; /* Use changed_prefs, as m68k_reset is called later. */ if (last_address_space_24 != changed_prefs.address_space_24) need_hardreset = 1; last_address_space_24 = changed_prefs.address_space_24; allocate_memory (); if (currprefs.rom_crc32 != changed_prefs.rom_crc32 || strcmp (currprefs.romfile, changed_prefs.romfile) != 0 || strcmp (currprefs.keyfile, changed_prefs.keyfile) != 0) { ersatzkickfile = 0; a1000_handle_kickstart (0); free (a1000_bootrom); a1000_bootrom = 0; a1000_kickstart_mode = 0; currprefs.rom_crc32 = changed_prefs.rom_crc32; memcpy (currprefs.romfile, changed_prefs.romfile, sizeof currprefs.romfile); memcpy (currprefs.keyfile, changed_prefs.keyfile, sizeof currprefs.keyfile); need_hardreset = 1; if (!load_kickstart ()) { init_ersatz_rom (kickmemory); ersatzkickfile = 1; } patch_kick (); } map_banks (&custom_bank, 0xC0, 0xE0 - 0xC0, 0); map_banks (&cia_bank, 0xA0, 32, 0); if (!currprefs.cs_a1000ram) /* D80000 - DDFFFF not mapped (A1000 = custom chips) */ map_banks (&dummy_bank, 0xD8, 6, 0); /* map "nothing" to 0x200000 - 0x9FFFFF (0xBEFFFF if PCMCIA or AGA) */ bnk = allocated_chipmem >> 16; if (bnk < 0x20) bnk = 0x20; bnk_end = (currprefs.chipset_mask & CSMASK_AGA) ? 0xBF : 0xA0; map_banks (&dummy_bank, bnk, bnk_end - bnk, 0); if (currprefs.chipset_mask & CSMASK_AGA) map_banks (&dummy_bank, 0xc0, 0xd8 - 0xc0, 0); if (bogomemory != 0) { int t = allocated_bogomem >> 16; if (t > 0x1C) t = 0x1C; if (t > 0x10 && ((currprefs.chipset_mask & CSMASK_AGA) || currprefs.cpu_model >= 68020)) t = 0x10; map_banks (&bogomem_bank, 0xC0, t, allocated_bogomem); }
/* autoconfig area is "non-existing" after last device */ static void expamem_init_clear_zero (void) { map_banks (&dummy_bank, 0xe8, 1, 0); }