all repos — mgba @ 6d898542c765f4efc4a094c5ebd3f3465c36f417

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
11CXX_GUARD_START
12
13#include "core/cheats.h"
14#include "util/vector.h"
15
16enum GBCheatType {
17	GB_CHEAT_AUTODETECT,
18	GB_CHEAT_GAMESHARK,
19	GB_CHEAT_GAME_GENIE,
20	GB_CHEAT_VBA
21};
22
23struct GBCheatPatch {
24	uint16_t address;
25	int8_t newValue;
26	int8_t oldValue;
27	int segment;
28	bool applied;
29	bool checkByte;
30};
31
32DECLARE_VECTOR(GBCheatPatchList, struct GBCheatPatch);
33
34struct GBCheatSet {
35	struct mCheatSet d;
36	struct GBCheatPatchList romPatches;
37};
38
39struct mCheatDevice* GBCheatDeviceCreate(void);
40
41CXX_GUARD_END
42
43#endif