Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
stenzek
GitHub Repository: stenzek/duckstation
Path: blob/master/dep/rcheevos/include/rc_consoles.h
4246 views
1
#ifndef RC_CONSOLES_H
2
#define RC_CONSOLES_H
3
4
#include "rc_export.h"
5
6
#include <stdint.h>
7
8
RC_BEGIN_C_DECLS
9
10
/*****************************************************************************\
11
| Console identifiers |
12
\*****************************************************************************/
13
14
enum {
15
RC_CONSOLE_UNKNOWN = 0,
16
RC_CONSOLE_MEGA_DRIVE = 1,
17
RC_CONSOLE_NINTENDO_64 = 2,
18
RC_CONSOLE_SUPER_NINTENDO = 3,
19
RC_CONSOLE_GAMEBOY = 4,
20
RC_CONSOLE_GAMEBOY_ADVANCE = 5,
21
RC_CONSOLE_GAMEBOY_COLOR = 6,
22
RC_CONSOLE_NINTENDO = 7,
23
RC_CONSOLE_PC_ENGINE = 8,
24
RC_CONSOLE_SEGA_CD = 9,
25
RC_CONSOLE_SEGA_32X = 10,
26
RC_CONSOLE_MASTER_SYSTEM = 11,
27
RC_CONSOLE_PLAYSTATION = 12,
28
RC_CONSOLE_ATARI_LYNX = 13,
29
RC_CONSOLE_NEOGEO_POCKET = 14,
30
RC_CONSOLE_GAME_GEAR = 15,
31
RC_CONSOLE_GAMECUBE = 16,
32
RC_CONSOLE_ATARI_JAGUAR = 17,
33
RC_CONSOLE_NINTENDO_DS = 18,
34
RC_CONSOLE_WII = 19,
35
RC_CONSOLE_WII_U = 20,
36
RC_CONSOLE_PLAYSTATION_2 = 21,
37
RC_CONSOLE_XBOX = 22,
38
RC_CONSOLE_MAGNAVOX_ODYSSEY2 = 23,
39
RC_CONSOLE_POKEMON_MINI = 24,
40
RC_CONSOLE_ATARI_2600 = 25,
41
RC_CONSOLE_MS_DOS = 26,
42
RC_CONSOLE_ARCADE = 27,
43
RC_CONSOLE_VIRTUAL_BOY = 28,
44
RC_CONSOLE_MSX = 29,
45
RC_CONSOLE_COMMODORE_64 = 30,
46
RC_CONSOLE_ZX81 = 31,
47
RC_CONSOLE_ORIC = 32,
48
RC_CONSOLE_SG1000 = 33,
49
RC_CONSOLE_VIC20 = 34,
50
RC_CONSOLE_AMIGA = 35,
51
RC_CONSOLE_ATARI_ST = 36,
52
RC_CONSOLE_AMSTRAD_PC = 37,
53
RC_CONSOLE_APPLE_II = 38,
54
RC_CONSOLE_SATURN = 39,
55
RC_CONSOLE_DREAMCAST = 40,
56
RC_CONSOLE_PSP = 41,
57
RC_CONSOLE_CDI = 42,
58
RC_CONSOLE_3DO = 43,
59
RC_CONSOLE_COLECOVISION = 44,
60
RC_CONSOLE_INTELLIVISION = 45,
61
RC_CONSOLE_VECTREX = 46,
62
RC_CONSOLE_PC8800 = 47,
63
RC_CONSOLE_PC9800 = 48,
64
RC_CONSOLE_PCFX = 49,
65
RC_CONSOLE_ATARI_5200 = 50,
66
RC_CONSOLE_ATARI_7800 = 51,
67
RC_CONSOLE_X68K = 52,
68
RC_CONSOLE_WONDERSWAN = 53,
69
RC_CONSOLE_CASSETTEVISION = 54,
70
RC_CONSOLE_SUPER_CASSETTEVISION = 55,
71
RC_CONSOLE_NEO_GEO_CD = 56,
72
RC_CONSOLE_FAIRCHILD_CHANNEL_F = 57,
73
RC_CONSOLE_FM_TOWNS = 58,
74
RC_CONSOLE_ZX_SPECTRUM = 59,
75
RC_CONSOLE_GAME_AND_WATCH = 60,
76
RC_CONSOLE_NOKIA_NGAGE = 61,
77
RC_CONSOLE_NINTENDO_3DS = 62,
78
RC_CONSOLE_SUPERVISION = 63,
79
RC_CONSOLE_SHARPX1 = 64,
80
RC_CONSOLE_TIC80 = 65,
81
RC_CONSOLE_THOMSONTO8 = 66,
82
RC_CONSOLE_PC6000 = 67,
83
RC_CONSOLE_PICO = 68,
84
RC_CONSOLE_MEGADUCK = 69,
85
RC_CONSOLE_ZEEBO = 70,
86
RC_CONSOLE_ARDUBOY = 71,
87
RC_CONSOLE_WASM4 = 72,
88
RC_CONSOLE_ARCADIA_2001 = 73,
89
RC_CONSOLE_INTERTON_VC_4000 = 74,
90
RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER = 75,
91
RC_CONSOLE_PC_ENGINE_CD = 76,
92
RC_CONSOLE_ATARI_JAGUAR_CD = 77,
93
RC_CONSOLE_NINTENDO_DSI = 78,
94
RC_CONSOLE_TI83 = 79,
95
RC_CONSOLE_UZEBOX = 80,
96
RC_CONSOLE_FAMICOM_DISK_SYSTEM = 81,
97
98
RC_CONSOLE_HUBS = 100,
99
RC_CONSOLE_EVENTS = 101,
100
RC_CONSOLE_STANDALONE = 102
101
};
102
103
RC_EXPORT const char* RC_CCONV rc_console_name(uint32_t console_id);
104
105
/*****************************************************************************\
106
| Memory mapping |
107
\*****************************************************************************/
108
109
enum {
110
RC_MEMORY_TYPE_SYSTEM_RAM, /* normal system memory */
111
RC_MEMORY_TYPE_SAVE_RAM, /* memory that persists between sessions */
112
RC_MEMORY_TYPE_VIDEO_RAM, /* memory reserved for graphical processing */
113
RC_MEMORY_TYPE_READONLY, /* memory that maps to read only data */
114
RC_MEMORY_TYPE_HARDWARE_CONTROLLER, /* memory for interacting with system components */
115
RC_MEMORY_TYPE_VIRTUAL_RAM, /* secondary address space that maps to real memory in system RAM */
116
RC_MEMORY_TYPE_UNUSED /* these addresses don't really exist */
117
};
118
119
typedef struct rc_memory_region_t {
120
uint32_t start_address; /* first address of block as queried by RetroAchievements */
121
uint32_t end_address; /* last address of block as queried by RetroAchievements */
122
uint32_t real_address; /* real address for first address of block */
123
uint8_t type; /* RC_MEMORY_TYPE_ for block */
124
const char* description; /* short description of block */
125
}
126
rc_memory_region_t;
127
128
typedef struct rc_memory_regions_t {
129
const rc_memory_region_t* region;
130
uint32_t num_regions;
131
}
132
rc_memory_regions_t;
133
134
RC_EXPORT const rc_memory_regions_t* RC_CCONV rc_console_memory_regions(uint32_t console_id);
135
136
RC_END_C_DECLS
137
138
#endif /* RC_CONSOLES_H */
139
140