X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fmemory.h;h=4260a35976bdc85bb51abcf6f009bf363e7ea22a;hb=7feeb8806243f9f0bc6c3d6e957b97d12cecb7df;hp=afca082690d1d1fd371bf339bb42b28d4ea1e8c1;hpb=add51c49ecdda53f59bd4c01d4b2e03817002a71;p=picodrive.git diff --git a/pico/memory.h b/pico/memory.h index afca082..4260a35 100644 --- a/pico/memory.h +++ b/pico/memory.h @@ -133,6 +133,17 @@ void name(u32 a, u32 d) \ } \ } +static __inline void *m68k_dma_source(u32 a) +{ + uptr v; + a &= 0x00fffffe; + v = m68k_read16_map[a >> M68K_MEM_SHIFT]; + if (map_flag_set(v)) + return NULL; + else + return (void *)((v << 1) + a); +} + // 32x typedef struct { uptr addr; // stores (membase >> 1) or ((handler >> 1) | (1<<31))