From: Toni Wilen Date: Sat, 2 Mar 2019 19:32:29 +0000 (+0200) Subject: set_direct_memory() available without JIT X-Git-Tag: 4200~29 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=20fbd263492d2bef2388745b54e91b0a55ef8f08;p=francis%2Fwinuae.git set_direct_memory() available without JIT --- diff --git a/memory.cpp b/memory.cpp index 7e75d23b..5314a2bd 100644 --- a/memory.cpp +++ b/memory.cpp @@ -1841,6 +1841,15 @@ err: return 0; } +static void set_direct_memory(addrbank *ab) +{ + if (!(ab->flags & ABFLAG_DIRECTACCESS)) + return; + ab->baseaddr_direct_r = ab->baseaddr; + if (!(ab->flags & ABFLAG_ROM)) + ab->baseaddr_direct_w = ab->baseaddr; +} + #ifndef NATMEM_OFFSET bool mapped_malloc (addrbank *ab) @@ -1849,6 +1858,7 @@ bool mapped_malloc (addrbank *ab) ab->baseaddr = xcalloc (uae_u8, ab->reserved_size + 4); ab->allocated_size = ab->baseaddr != NULL ? ab->reserved_size : 0; ab->flags &= ~ABFLAG_MAPPED; + set_direct_memory(ab); return ab->baseaddr != NULL; } @@ -1970,15 +1980,6 @@ static void add_shmmaps (uae_u32 start, addrbank *what) #define MAPPED_MALLOC_DEBUG 0 -static void set_direct_memory(addrbank *ab) -{ - if (!(ab->flags & ABFLAG_DIRECTACCESS)) - return; - ab->baseaddr_direct_r = ab->baseaddr; - if (!(ab->flags & ABFLAG_ROM)) - ab->baseaddr_direct_w = ab->baseaddr; -} - bool mapped_malloc (addrbank *ab) { int id;