summaryrefslogtreecommitdiff
path: root/include/gba
diff options
context:
space:
mode:
Diffstat (limited to 'include/gba')
-rw-r--r--include/gba/m4a_internal.h4
-rw-r--r--include/gba/macro.h34
-rw-r--r--include/gba/types.h10
3 files changed, 39 insertions, 9 deletions
diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h
index 572b77711..ff92fcc40 100644
--- a/include/gba/m4a_internal.h
+++ b/include/gba/m4a_internal.h
@@ -404,10 +404,6 @@ void SampleFreqSet(u32 freq);
void m4aSoundVSyncOn(void);
void m4aSoundVSyncOff(void);
-void m4aMPlayTempoControl(struct MusicPlayerInfo *mplayInfo, u16 tempo);
-void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume);
-void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 pitch);
-void m4aMPlayPanpotControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s8 pan);
void ClearModM(struct MusicPlayerTrack *track);
void m4aMPlayModDepthSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 modDepth);
void m4aMPlayLFOSpeedSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 lfoSpeed);
diff --git a/include/gba/macro.h b/include/gba/macro.h
index 230fb4383..1e0254806 100644
--- a/include/gba/macro.h
+++ b/include/gba/macro.h
@@ -84,4 +84,38 @@
dmaRegs[5]; \
}
+#define DmaCopyLarge(dmaNum, src, dest, size, block, bit) \
+{ \
+ const void *_src = src; \
+ void *_dest = dest; \
+ u32 _size = size; \
+ while (1) \
+ { \
+ DmaCopy##bit(dmaNum, _src, _dest, (block)); \
+ _src += (block); \
+ _dest += (block); \
+ _size -= (block); \
+ if (_size <= (block)) \
+ { \
+ DmaCopy##bit(dmaNum, _src, _dest, _size); \
+ break; \
+ } \
+ } \
+}
+
+#define DmaCopyLarge16(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 16)
+
+#define DmaCopyLarge32(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 32)
+
+#define DmaCopyDefvars(dmaNum, src, dest, size, bit) \
+{ \
+ const void *_src = src; \
+ void *_dest = dest; \
+ u32 _size = size; \
+ DmaCopy##bit(dmaNum, _src, _dest, _size); \
+}
+
+#define DmaCopy16Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 16)
+#define DmaCopy32Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 32)
+
#endif // GUARD_GBA_MACRO_H
diff --git a/include/gba/types.h b/include/gba/types.h
index 96e057ab7..480619d21 100644
--- a/include/gba/types.h
+++ b/include/gba/types.h
@@ -39,11 +39,11 @@ struct PlttData
struct OamData
{
/*0x00*/ u32 y:8;
- /*0x01*/ u32 affineMode:2;
- u32 objMode:2;
- u32 mosaic:1;
- u32 bpp:1;
- u32 shape:2;
+ /*0x01*/ u32 affineMode:2; // 0x1, 0x2 = 0x3
+ u32 objMode:2; // 0x4, 0x8 = 0xC
+ u32 mosaic:1; // 0x10
+ u32 bpp:1; // 0x20
+ u32 shape:2; // 0x40, 0x80
/*0x02*/ u32 x:9;
u32 matrixNum:5; // bits 3/4 are h-flip/v-flip if not in affine mode