X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fz80if.c;h=f48da99a63ead801cdc16a70a15c9f2d11fc78e7;hb=4ea707e1e38b7ca204a5012f617018d0ea5eced2;hp=1b35e50cccc41d75bd8f401d47974534967c7849;hpb=67e50ff8d93a40397833d595d4d48b7ee472ab8a;p=picodrive.git diff --git a/pico/z80if.c b/pico/z80if.c index 1b35e50..f48da99 100644 --- a/pico/z80if.c +++ b/pico/z80if.c @@ -6,32 +6,6 @@ unsigned long z80_read_map [0x10000 >> Z80_MEM_SHIFT]; unsigned long z80_write_map[0x10000 >> Z80_MEM_SHIFT]; -void MEMH_FUNC z80_map_set(unsigned long *map, int start_addr, int end_addr, - void *func_or_mh, int is_func) -{ - unsigned long addr = (unsigned long)func_or_mh; - int mask = (1 << Z80_MEM_SHIFT) - 1; - int i; - - if ((start_addr & mask) != 0 || (end_addr & mask) != mask) - elprintf(EL_STATUS|EL_ANOMALY, "z80_map_set: tried to map bad range: %04x-%04x", - start_addr, end_addr); - - if (addr & 1) { - elprintf(EL_STATUS|EL_ANOMALY, "z80_map_set: ptr is not aligned: %08lx", addr); - return; - } - - if (!is_func) - addr -= (start_addr >> Z80_MEM_SHIFT) << Z80_MEM_SHIFT; - - for (i = start_addr >> Z80_MEM_SHIFT; i <= end_addr >> Z80_MEM_SHIFT; i++) { - map[i] = addr >> 1; - if (is_func) - map[i] |= 1 << (sizeof(addr) * 8 - 1); - } -} - #ifdef _USE_MZ80 // memhandlers for mz80 core @@ -132,7 +106,6 @@ PICO_INTERNAL void z80_reset(void) Cz80_Set_Reg(&CZ80, CZ80_IY, 0xffff); Cz80_Set_Reg(&CZ80, CZ80_SP, 0x2000); #endif - Pico.m.z80_fakeval = 0; // for faking when Z80 is disabled } // XXX TODO: should better use universal z80 save format