include/mgba/internal/gba/overrides.h (view raw)
1/* Copyright (c) 2013-2015 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_OVERRIDES_H
7#define GBA_OVERRIDES_H
8
9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <mgba/internal/gba/savedata.h>
14
15#define IDLE_LOOP_NONE 0xFFFFFFFF
16
17struct GBACartridgeOverride {
18 char id[4];
19 enum SavedataType savetype;
20 int hardware;
21 uint32_t idleLoop;
22 bool mirroring;
23};
24
25struct Configuration;
26bool GBAOverrideFind(const struct Configuration*, struct GBACartridgeOverride* override);
27void GBAOverrideSave(struct Configuration*, const struct GBACartridgeOverride* override);
28
29struct GBA;
30void GBAOverrideApply(struct GBA*, const struct GBACartridgeOverride*);
31void GBAOverrideApplyDefaults(struct GBA*, const struct Configuration*);
32
33CXX_GUARD_END
34
35#endif