From 63331c272794a6e4790ee2957ff85b442f673d83 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 10 Nov 2007 20:07:52 +0200 Subject: [PATCH] imported winuaesrc1450b10.zip --- memory.c | 2 +- od-win32/mman.c | 15 +++++++++++---- od-win32/win32.c | 2 +- od-win32/win32.h | 2 +- od-win32/winuaechangelog.txt | 7 +++++++ 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/memory.c b/memory.c index 478d6dfa..b6b6fb7b 100644 --- a/memory.c +++ b/memory.c @@ -2318,7 +2318,7 @@ uae_u8 *mapped_malloc (size_t s, char *file) if (!canbang) { nocanbang(); - return xmalloc (s); + return xmalloc (s + 4); } id = shmget (IPC_PRIVATE, s, 0x1ff, file); diff --git a/od-win32/mman.c b/od-win32/mman.c index 9fe2cd6c..77ed2bbc 100644 --- a/od-win32/mman.c +++ b/od-win32/mman.c @@ -14,6 +14,8 @@ #if defined(NATMEM_OFFSET) +#define BARRIER 32 + static struct shmid_ds shmids[MAX_SHMID]; extern int p96mode; @@ -253,12 +255,12 @@ void *shmat(int shmid, void *shmaddr, int shmflg) shmaddr=natmem_offset; got = TRUE; if (currprefs.fastmem_size == 0 || currprefs.chipmem_size < 2 * 1024 * 1024) - size += 32; + size += BARRIER; } if(!strcmp(shmids[shmid].name,"kick")) { shmaddr=natmem_offset + 0xf80000; got = TRUE; - size += 32; + size += BARRIER; } if(!strcmp(shmids[shmid].name,"rom_a8")) { shmaddr=natmem_offset + 0xa80000; @@ -280,18 +282,22 @@ void *shmat(int shmid, void *shmaddr, int shmflg) if(!strcmp(shmids[shmid].name,"fast")) { shmaddr=natmem_offset + 0x200000; got = TRUE; - size += 32; + size += BARRIER; } if(!strcmp(shmids[shmid].name,"ramsey_low")) { shmaddr=natmem_offset + a3000lmem_start; got = TRUE; + if (!currprefs.mbresmem_high_size) + size += BARRIER; } if(!strcmp(shmids[shmid].name,"ramsey_high")) { shmaddr=natmem_offset + a3000hmem_start; got = TRUE; + size += BARRIER; } if(!strcmp(shmids[shmid].name,"z3")) { shmaddr=natmem_offset + currprefs.z3fastmem_start; + size += BARRIER; got = TRUE; } if(!strcmp(shmids[shmid].name,"gfx")) { @@ -300,6 +306,7 @@ void *shmat(int shmid, void *shmaddr, int shmflg) p96special = TRUE; p96ram_start = p96mem_offset - natmem_offset; shmaddr = natmem_offset + p96ram_start; + size += BARRIER; } else { extern void p96memstart(void); p96memstart(); @@ -315,7 +322,7 @@ void *shmat(int shmid, void *shmaddr, int shmflg) shmaddr=natmem_offset+0x00C00000; got = TRUE; if (currprefs.bogomem_size <= 0x100000) - size+=32; + size += BARRIER; } if(!strcmp(shmids[shmid].name,"filesys")) { result = xmalloc (size); diff --git a/od-win32/win32.c b/od-win32/win32.c index e6aea388..610a1b75 100644 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -2250,7 +2250,7 @@ void set_path (char *name, char *path) static void initpath (char *name, char *path) { - if (regexists (NULL, name) == 0) + if (regexists (NULL, name)) return; set_path (name, NULL); } diff --git a/od-win32/win32.h b/od-win32/win32.h index 7ae5151e..3f1a0741 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,7 +15,7 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEBETA 9 +#define WINUAEBETA 10 #define WINUAEPUBLICBETA 1 #define WINUAEDATE MAKEBD(2007, 11, 10) #define WINUAEEXTRA "" diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index d60bad8e..aef3193a 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,11 @@ +Beta 10: + +- added missing "barrier" bytes at end of Z3 fast. Crashed in + non-direct JIT-mode if read/write crossed memory boundaries. + (for example long read from END_OF_Z3 - 2) +- paths reseting to default fix (b9) + Beta 9: - default GUI and main window position is centered, not top/left corner -- 2.47.3