mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
some dma improvements
no idea if anything needs this, shouldn't hurt either
This commit is contained in:
parent
7feeb88062
commit
0c7d1ba332
5 changed files with 156 additions and 148 deletions
|
@ -133,17 +133,25 @@ void name(u32 a, u32 d) \
|
|||
} \
|
||||
}
|
||||
|
||||
#ifdef NEED_DMA_SOURCE // meh
|
||||
|
||||
static __inline void *m68k_dma_source(u32 a)
|
||||
{
|
||||
u8 *base;
|
||||
uptr v;
|
||||
a &= 0x00fffffe;
|
||||
v = m68k_read16_map[a >> M68K_MEM_SHIFT];
|
||||
if (map_flag_set(v))
|
||||
return NULL;
|
||||
if (map_flag_set(v)) {
|
||||
if (a >= Pico.romsize) // Rom
|
||||
return NULL;
|
||||
base = Pico.rom;
|
||||
}
|
||||
else
|
||||
return (void *)((v << 1) + a);
|
||||
base = (void *)(v << 1);
|
||||
return base + (a & 0xfe0000);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// 32x
|
||||
typedef struct {
|
||||
uptr addr; // stores (membase >> 1) or ((handler >> 1) | (1<<31))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue