include/mgba/internal/gba/dma.h (view raw)
1/* Copyright (c) 2013-2016 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef GBA_DMA_H
7#define GBA_DMA_H
8
9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13struct GBA;
14void GBADMAInit(struct GBA* gba);
15void GBADMAReset(struct GBA* gba);
16
17uint32_t GBADMAWriteSAD(struct GBA* gba, int dma, uint32_t address);
18uint32_t GBADMAWriteDAD(struct GBA* gba, int dma, uint32_t address);
19void GBADMAWriteCNT_LO(struct GBA* gba, int dma, uint16_t count);
20uint16_t GBADMAWriteCNT_HI(struct GBA* gba, int dma, uint16_t control);
21
22struct GBADMA;
23void GBADMASchedule(struct GBA* gba, int number, struct GBADMA* info);
24void GBADMARunHblank(struct GBA* gba, int32_t cycles);
25void GBADMARunVblank(struct GBA* gba, int32_t cycles);
26void GBADMAUpdate(struct GBA* gba);
27
28CXX_GUARD_END
29
30#endif