all repos — mgba @ 67905d281bfecbb06f51f2ca5ac939df378734a5

mGBA Game Boy Advance Emulator

src/gb/cheats.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 GB_CHEATS_H
 7#define GB_CHEATS_H
 8
 9#include "util/common.h"
10
11#include "core/cheats.h"
12#include "util/vector.h"
13
14enum GBACheatType {
15	GB_CHEAT_AUTODETECT,
16	GB_CHEAT_GAMESHARK,
17	GB_CHEAT_GAME_GENIE,
18	GB_CHEAT_VBA
19};
20
21struct GBCheatPatch {
22	uint16_t address;
23	int8_t newValue;
24	int8_t oldValue;
25	bool applied;
26};
27
28DECLARE_VECTOR(GBCheatPatchList, struct GBCheatPatch);
29
30struct GBCheatSet {
31	struct mCheatSet d;
32	struct GBCheatPatchList romPatches;
33};
34
35struct mCheatDevice* GBCheatDeviceCreate(void);
36
37#endif