From: kub Date: Sun, 14 Nov 2021 08:51:51 +0000 (+0100) Subject: core, some type issues X-Git-Tag: v2.00~414 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ed05f8463cb210affb46492b0ceade78a77d648;p=picodrive.git core, some type issues --- diff --git a/pico/memory.c b/pico/memory.c index 9c35a181..6bdbec39 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -20,7 +20,7 @@ uptr m68k_read16_map [0x1000000 >> M68K_MEM_SHIFT]; uptr m68k_write8_map [0x1000000 >> M68K_MEM_SHIFT]; uptr m68k_write16_map[0x1000000 >> M68K_MEM_SHIFT]; -static void xmap_set(uptr *map, int shift, int start_addr, int end_addr, +static void xmap_set(uptr *map, int shift, u32 start_addr, u32 end_addr, const void *func_or_mh, int is_func) { #ifdef __clang__ @@ -53,7 +53,7 @@ static void xmap_set(uptr *map, int shift, int start_addr, int end_addr, } } -void z80_map_set(uptr *map, int start_addr, int end_addr, +void z80_map_set(uptr *map, u16 start_addr, u16 end_addr, const void *func_or_mh, int is_func) { xmap_set(map, Z80_MEM_SHIFT, start_addr, end_addr, func_or_mh, is_func); @@ -63,7 +63,7 @@ void z80_map_set(uptr *map, int start_addr, int end_addr, #endif } -void cpu68k_map_set(uptr *map, int start_addr, int end_addr, +void cpu68k_map_set(uptr *map, u32 start_addr, u32 end_addr, const void *func_or_mh, int is_func) { xmap_set(map, M68K_MEM_SHIFT, start_addr, end_addr, func_or_mh, is_func); @@ -81,7 +81,7 @@ void cpu68k_map_set(uptr *map, int start_addr, int end_addr, } // more specialized/optimized function (does same as above) -void cpu68k_map_all_ram(int start_addr, int end_addr, void *ptr, int is_sub) +void cpu68k_map_all_ram(u32 start_addr, u32 end_addr, void *ptr, int is_sub) { uptr *r8map, *r16map, *w8map, *w16map; uptr addr = (uptr)ptr; @@ -139,7 +139,7 @@ static void m68k_unmapped_write16(u32 a, u32 d) elprintf(EL_UIO, "m68k unmapped w16 [%06x] %04x @%06x", a, d & 0xffff, SekPc); } -void m68k_map_unmap(int start_addr, int end_addr) +void m68k_map_unmap(u32 start_addr, u32 end_addr) { #ifdef __clang__ // workaround bug (segfault) in diff --git a/pico/memory.h b/pico/memory.h index 7fef8d2e..e3da68d7 100644 --- a/pico/memory.h +++ b/pico/memory.h @@ -44,12 +44,12 @@ extern uptr z80_write_map[0x10000 >> Z80_MEM_SHIFT]; typedef unsigned char (z80_read_f)(unsigned short a); typedef void (z80_write_f)(unsigned int a, unsigned char data); -void z80_map_set(uptr *map, int start_addr, int end_addr, +void z80_map_set(uptr *map, u16 start_addr, u16 end_addr, const void *func_or_mh, int is_func); -void cpu68k_map_set(uptr *map, int start_addr, int end_addr, +void cpu68k_map_set(uptr *map, u32 start_addr, u32 end_addr, const void *func_or_mh, int is_func); -void cpu68k_map_all_ram(int start_addr, int end_addr, void *ptr, int is_sub); -void m68k_map_unmap(int start_addr, int end_addr); +void cpu68k_map_all_ram(u32 start_addr, u32 end_addr, void *ptr, int is_sub); +void m68k_map_unmap(u32 start_addr, u32 end_addr); #define MAP_FLAG ((uptr)1 << (sizeof(uptr) * 8 - 1)) #define map_flag_set(x) ((x) & MAP_FLAG)