all repos — mgba @ 69244f053af7f9f79c0cb9af3e2ab8e0aa3ecee4

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