all repos — mgba @ 65fb61d7e2f5848aac38a12d4042419bb4e537c9

mGBA Game Boy Advance Emulator

include/mgba/internal/gba/matrix.h (view raw)

 1/* Copyright (c) 2013-2018 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_MATRIX_H
 7#define GBA_MATRIX_H
 8
 9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#define GBA_MATRIX_MAPPINGS_MAX 16
14
15struct GBAMatrix {
16	uint32_t cmd;
17	uint32_t paddr;
18	uint32_t vaddr;
19	uint32_t size;
20
21	uint32_t mappings[GBA_MATRIX_MAPPINGS_MAX];
22};
23
24struct GBA;
25void GBAMatrixReset(struct GBA*);
26void GBAMatrixWrite(struct GBA*, uint32_t address, uint32_t value);
27void GBAMatrixWrite16(struct GBA*, uint32_t address, uint16_t value);
28
29struct GBASerializedState;
30void GBAMatrixSerialize(const struct GBA* memory, struct GBASerializedState* state);
31void GBAMatrixDeserialize(struct GBA* memory, const struct GBASerializedState* state);
32
33CXX_GUARD_END
34
35#endif