From 397bf5192a44ea95a82a9792cb7a8a23b112bb3e Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Sun, 3 Feb 2013 15:29:05 -0500 Subject: Add some forgotten DMA files. --- source/nds/dma_adj.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 source/nds/dma_adj.h (limited to 'source/nds/dma_adj.h') diff --git a/source/nds/dma_adj.h b/source/nds/dma_adj.h new file mode 100644 index 0000000..62b0098 --- /dev/null +++ b/source/nds/dma_adj.h @@ -0,0 +1,25 @@ +#ifndef _DMA_ADJ_H_ +#define _DMA_ADJ_H_ + +#ifdef DS2_DMA + +#ifdef __cplusplus +extern "C" { +#endif + +struct SPointerAdjustments { + unsigned int GFXScreen; +}; + +extern struct SPointerAdjustments PtrAdj; + +extern void* AlignedMalloc (unsigned int Size, unsigned int Alignment, unsigned int* Adjustment); +extern void AlignedFree (void* Memory, unsigned int Adjustment); + +#ifdef __cplusplus +} +#endif + +#endif // DS2_DMA + +#endif // !_DMA_ADJ_H_ -- cgit v1.2.3 From 5e3426d0d26bb25810aca6593416ac0125ea6e8f Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Wed, 6 Feb 2013 19:07:39 -0500 Subject: Remove 320 KiB of memory allocations in APU emulation that were completely unused but constantly re-zeroed. Frees up 320 KiB for other uses, and saves ~4 milliseconds at emulator startup, when resetting the APU and when loading a new game. --- source/nds/dma_adj.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/nds/dma_adj.h') diff --git a/source/nds/dma_adj.h b/source/nds/dma_adj.h index 62b0098..dd4a6e4 100644 --- a/source/nds/dma_adj.h +++ b/source/nds/dma_adj.h @@ -8,7 +8,10 @@ extern "C" { #endif struct SPointerAdjustments { + /* These are used by the DSTWO-NDS side code. */ unsigned int GFXScreen; + + /* These are used by Snes9x. */ }; extern struct SPointerAdjustments PtrAdj; -- cgit v1.2.3 From 55895f01f73ba1b4fab7095fa5cb8cf7884846ed Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Thu, 7 Feb 2013 02:38:45 -0500 Subject: De-interleave the ROM using DMA. This helps the more esoteric jumbo memory maps load faster. --- source/nds/dma_adj.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/nds/dma_adj.h') diff --git a/source/nds/dma_adj.h b/source/nds/dma_adj.h index dd4a6e4..3852f09 100644 --- a/source/nds/dma_adj.h +++ b/source/nds/dma_adj.h @@ -12,6 +12,7 @@ struct SPointerAdjustments { unsigned int GFXScreen; /* These are used by Snes9x. */ + unsigned int ROM; }; extern struct SPointerAdjustments PtrAdj; -- cgit v1.2.3