duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

rc_consoles.h (4445B)


      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 
     97   RC_CONSOLE_HUBS = 100,
     98   RC_CONSOLE_EVENTS = 101,
     99   RC_CONSOLE_STANDALONE = 102
    100 };
    101 
    102 RC_EXPORT const char* RC_CCONV rc_console_name(uint32_t console_id);
    103 
    104 /*****************************************************************************\
    105 | Memory mapping                                                              |
    106 \*****************************************************************************/
    107 
    108 enum {
    109   RC_MEMORY_TYPE_SYSTEM_RAM,          /* normal system memory */
    110   RC_MEMORY_TYPE_SAVE_RAM,            /* memory that persists between sessions */
    111   RC_MEMORY_TYPE_VIDEO_RAM,           /* memory reserved for graphical processing */
    112   RC_MEMORY_TYPE_READONLY,            /* memory that maps to read only data */
    113   RC_MEMORY_TYPE_HARDWARE_CONTROLLER, /* memory for interacting with system components */
    114   RC_MEMORY_TYPE_VIRTUAL_RAM,         /* secondary address space that maps to real memory in system RAM */
    115   RC_MEMORY_TYPE_UNUSED               /* these addresses don't really exist */
    116 };
    117 
    118 typedef struct rc_memory_region_t {
    119   uint32_t start_address;             /* first address of block as queried by RetroAchievements */
    120   uint32_t end_address;               /* last address of block as queried by RetroAchievements */
    121   uint32_t real_address;              /* real address for first address of block */
    122   uint8_t type;                       /* RC_MEMORY_TYPE_ for block */
    123   const char* description;            /* short description of block */
    124 }
    125 rc_memory_region_t;
    126 
    127 typedef struct rc_memory_regions_t {
    128   const rc_memory_region_t* region;
    129   uint32_t num_regions;
    130 }
    131 rc_memory_regions_t;
    132 
    133 RC_EXPORT const rc_memory_regions_t* RC_CCONV rc_console_memory_regions(uint32_t console_id);
    134 
    135 RC_END_C_DECLS
    136 
    137 #endif /* RC_CONSOLES_H */