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 GBCheatType {
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 int segment;
26 bool applied;
27 bool checkByte;
28};
29
30DECLARE_VECTOR(GBCheatPatchList, struct GBCheatPatch);
31
32struct GBCheatSet {
33 struct mCheatSet d;
34 struct GBCheatPatchList romPatches;
35};
36
37struct mCheatDevice* GBCheatDeviceCreate(void);
38
39#endif