diff options
author | Nebuleon Fumika | 2013-02-03 06:25:12 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-03 06:25:12 -0500 |
commit | 9b75c09a7fd7c78d8c42077478e796672fae5c1b (patch) | |
tree | f8afc9f2d41e0971f2c4d7838952bfd4f49cf88f /source | |
parent | 461f2406555faaee7191871390192d06625f5a81 (diff) | |
download | snesemu-9b75c09a7fd7c78d8c42077478e796672fae5c1b.tar.gz snesemu-9b75c09a7fd7c78d8c42077478e796672fae5c1b.tar.bz2 snesemu-9b75c09a7fd7c78d8c42077478e796672fae5c1b.zip |
Force waiting for a screen to be transferred (update mode 1) because otherwise the next screen can go into DMA.
Use channel 1 instead of channel 5, which must be busy for some reason.
Diffstat (limited to 'source')
-rw-r--r-- | source/nds/entry.cpp | 24 | ||||
-rw-r--r-- | source/nds/gui.h | 4 |
2 files changed, 16 insertions, 12 deletions
diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index 4aa2977..3fa6517 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -144,9 +144,9 @@ bool8 S9xDeinitUpdate (int Width, int Height, bool8 /*sixteen_bit*/) //Up case 1: #ifdef DS2_DMA - dma_copy32Byte(5 /* channel: graphics */, up_screen_addr, GFX.Screen + 256 * 32 * 2, 256 * 192 * 2); - dma_wait_finish(5); - dma_stop(5); + dma_copy32Byte(1 /* channel: graphics */, up_screen_addr, GFX.Screen + 256 * 32 * 2, 256 * 192 * 2); + dma_wait_finish(1); + dma_stop(1); #else memcpy(up_screen_addr, GFX.Screen+256*32*2, 256*192*2); #endif @@ -155,9 +155,9 @@ bool8 S9xDeinitUpdate (int Width, int Height, bool8 /*sixteen_bit*/) //Down case 2: #ifdef DS2_DMA - dma_copy32Byte(5 /* channel: graphics */, up_screen_addr, GFX.Screen, 256 * 192 * 2); - dma_wait_finish(5); - dma_stop(5); + dma_copy32Byte(1 /* channel: graphics */, up_screen_addr, GFX.Screen, 256 * 192 * 2); + dma_wait_finish(1); + dma_stop(1); #else memcpy(up_screen_addr, GFX.Screen, 256*192*2); #endif @@ -166,9 +166,9 @@ bool8 S9xDeinitUpdate (int Width, int Height, bool8 /*sixteen_bit*/) //Both case 3: #ifdef DS2_DMA - dma_copy32Byte(5 /* channel: graphics */, up_screen_addr, GFX.Screen + 256 * 16 * 2, 256 * 192 * 2); - dma_wait_finish(5); - dma_stop(5); + dma_copy32Byte(1 /* channel: graphics */, up_screen_addr, GFX.Screen + 256 * 16 * 2, 256 * 192 * 2); + dma_wait_finish(1); + dma_stop(1); #else memcpy(up_screen_addr, GFX.Screen+256*16*2, 256*192*2); #endif @@ -189,9 +189,9 @@ bool8 S9xDeinitUpdate (int Width, int Height, bool8 /*sixteen_bit*/) for(m = 0; m < 32; m++) { #ifdef DS2_DMA - dma_copy32Byte(5 /* channel: graphics */, dst, src, 256 * 6 * 2); - dma_wait_finish(5); - dma_stop(5); + dma_copy32Byte(1 /* channel: graphics */, dst, src, 256 * 6 * 2); + dma_wait_finish(1); + dma_stop(1); #else memcpy(dst, src, 256*6*2); #endif diff --git a/source/nds/gui.h b/source/nds/gui.h index b2eae62..9df2ad2 100644 --- a/source/nds/gui.h +++ b/source/nds/gui.h @@ -24,7 +24,11 @@ #include "fs_api.h" #include "gcheat.h" +#ifdef DS2_DMA +#define UP_SCREEN_UPDATE_METHOD 1 +#else #define UP_SCREEN_UPDATE_METHOD 0 +#endif #define DOWN_SCREEN_UPDATE_METHOD 2 #define MAX_GAMEPAD_MAP 16 |