summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-12-30 19:00:03 -0800
committerMichael Pavone <pavone@retrodev.com>2015-12-30 19:00:03 -0800
commit63f71342417637fa003923a0770f817a02366069 (patch)
treee35a61562127989d3044c1609d914b4f37627ad8
parente167782eb6cc3db6a68d9b5c1d51f4b467f6ae9d (diff)
Allow DMA from cartridge ROM above the 4MB mark. Should probably use get_native_pointer for everyting, but want to check the performance implications
-rw-r--r--blastem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/blastem.c b/blastem.c
index 3f1bffd..a24b8b6 100644
--- a/blastem.c
+++ b/blastem.c
@@ -134,6 +134,11 @@ uint16_t read_dma_value(uint32_t address)
return cart[address];
} else if(address >= 0x700000) {
return ram[address & 0x7FFF];
+ } else {
+ uint16_t *ptr = get_native_pointer(address*2, (void **)genesis->m68k->mem_pointers, &genesis->m68k->options->gen);
+ if (ptr) {
+ return *ptr;
+ }
}
//TODO: Figure out what happens when you try to DMA from weird adresses like IO or banked Z80 area
return 0;