dep/rcheevos: Update to 31f8788
This commit is contained in:
parent
7bbacd2392
commit
ccaad874a9
|
@ -82,6 +82,9 @@ enum {
|
|||
RC_CONSOLE_ZEEBO = 70,
|
||||
RC_CONSOLE_ARDUBOY = 71,
|
||||
RC_CONSOLE_WASM4 = 72,
|
||||
RC_CONSOLE_ARCADIA_2001 = 73,
|
||||
RC_CONSOLE_INTERTON_VC_4000 = 74,
|
||||
RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER = 75,
|
||||
|
||||
RC_CONSOLE_HUBS = 100,
|
||||
RC_CONSOLE_EVENTS = 101
|
||||
|
|
|
@ -21,6 +21,9 @@ const char* rc_console_name(int console_id)
|
|||
case RC_CONSOLE_ARCADE:
|
||||
return "Arcade";
|
||||
|
||||
case RC_CONSOLE_ARCADIA_2001:
|
||||
return "Arcadia 2001";
|
||||
|
||||
case RC_CONSOLE_ARDUBOY:
|
||||
return "Arduboy";
|
||||
|
||||
|
@ -57,6 +60,9 @@ const char* rc_console_name(int console_id)
|
|||
case RC_CONSOLE_DREAMCAST:
|
||||
return "Dreamcast";
|
||||
|
||||
case RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER:
|
||||
return "Elektor TV Games Computer";
|
||||
|
||||
case RC_CONSOLE_EVENTS:
|
||||
return "Events";
|
||||
|
||||
|
@ -90,6 +96,9 @@ const char* rc_console_name(int console_id)
|
|||
case RC_CONSOLE_INTELLIVISION:
|
||||
return "Intellivision";
|
||||
|
||||
case RC_CONSOLE_INTERTON_VC_4000:
|
||||
return "Interton VC 4000";
|
||||
|
||||
case RC_CONSOLE_MAGNAVOX_ODYSSEY2:
|
||||
return "Magnavox Odyssey 2";
|
||||
|
||||
|
@ -274,6 +283,16 @@ static const rc_memory_region_t _rc_memory_regions_appleii[] = {
|
|||
};
|
||||
static const rc_memory_regions_t rc_memory_regions_appleii = { _rc_memory_regions_appleii, 2 };
|
||||
|
||||
/* ===== Arcadia 2001 ===== */
|
||||
/* https://amigan.yatho.com/a-coding.txt */
|
||||
/* RAM banks 1 and 2 only exist on some variant models - no game actually uses them */
|
||||
static const rc_memory_region_t _rc_memory_regions_arcadia_2001[] = {
|
||||
{ 0x000000U, 0x0000FFU, 0x001800U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" }, /* RAM bank 3 */
|
||||
{ 0x000100U, 0x0001FFU, 0x001900U, RC_MEMORY_TYPE_HARDWARE_CONTROLLER, "I/O Area" },
|
||||
{ 0x000200U, 0x0002FFU, 0x001A00U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" }, /* RAM bank 4 */
|
||||
};
|
||||
static const rc_memory_regions_t rc_memory_regions_arcadia_2001 = { _rc_memory_regions_arcadia_2001, 3 };
|
||||
|
||||
/* ===== Arduboy ===== */
|
||||
/* https://scienceprog.com/avr-microcontroller-memory-map/ (Atmega32) */
|
||||
static const rc_memory_region_t _rc_memory_regions_arduboy[] = {
|
||||
|
@ -356,6 +375,16 @@ static const rc_memory_region_t _rc_memory_regions_dreamcast[] = {
|
|||
};
|
||||
static const rc_memory_regions_t rc_memory_regions_dreamcast = { _rc_memory_regions_dreamcast, 1 };
|
||||
|
||||
/* ===== Elektor TV Games Computer ===== */
|
||||
/* https://amigan.yatho.com/e-coding.txt */
|
||||
static const rc_memory_region_t _rc_memory_regions_elektor_tv_games[] = {
|
||||
{ 0x000000U, 0x0013FFU, 0x000800U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" },
|
||||
{ 0x001400U, 0x0014FFU, 0x001C00U, RC_MEMORY_TYPE_UNUSED, "Unused" }, /* mirror of $1D00-$1DFF */
|
||||
{ 0x001500U, 0x0016FFU, 0x001D00U, RC_MEMORY_TYPE_HARDWARE_CONTROLLER, "I/O Area" }, /* two 256-byte I/O areas */
|
||||
{ 0x001700U, 0x0017FFU, 0x001F00U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" },
|
||||
};
|
||||
static const rc_memory_regions_t rc_memory_regions_elektor_tv_games = { _rc_memory_regions_elektor_tv_games, 4 };
|
||||
|
||||
/* ===== Fairchild Channel F ===== */
|
||||
static const rc_memory_region_t _rc_memory_regions_fairchild_channel_f[] = {
|
||||
/* "System RAM" is actually just a bunch of registers internal to CPU so all carts have it.
|
||||
|
@ -454,6 +483,16 @@ static const rc_memory_region_t _rc_memory_regions_intellivision[] = {
|
|||
};
|
||||
static const rc_memory_regions_t rc_memory_regions_intellivision = { _rc_memory_regions_intellivision, 10 };
|
||||
|
||||
/* ===== Interton VC 4000 ===== */
|
||||
/* https://amigan.yatho.com/i-coding.txt */
|
||||
/* Cartridge RAM is not persisted, it's just expanded storage */
|
||||
static const rc_memory_region_t _rc_memory_regions_interton_vc_4000[] = {
|
||||
{ 0x000000U, 0x0003FFU, 0x001800U, RC_MEMORY_TYPE_SYSTEM_RAM, "Cartridge RAM" },
|
||||
{ 0x000400U, 0x0004FFU, 0x001E00U, RC_MEMORY_TYPE_HARDWARE_CONTROLLER, "I/O Area" },
|
||||
{ 0x000500U, 0x0005FFU, 0x001F00U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" },
|
||||
};
|
||||
static const rc_memory_regions_t rc_memory_regions_interton_vc_4000 = { _rc_memory_regions_interton_vc_4000, 3 };
|
||||
|
||||
/* ===== Magnavox Odyssey 2 ===== */
|
||||
/* https://sudonull.com/post/76885-Architecture-and-programming-Philips-Videopac-Magnavox-Odyssey-2 */
|
||||
static const rc_memory_region_t _rc_memory_regions_magnavox_odyssey_2[] = {
|
||||
|
@ -758,6 +797,9 @@ const rc_memory_regions_t* rc_console_memory_regions(int console_id)
|
|||
case RC_CONSOLE_APPLE_II:
|
||||
return &rc_memory_regions_appleii;
|
||||
|
||||
case RC_CONSOLE_ARCADIA_2001:
|
||||
return &rc_memory_regions_arcadia_2001;
|
||||
|
||||
case RC_CONSOLE_ARDUBOY:
|
||||
return &rc_memory_regions_arduboy;
|
||||
|
||||
|
@ -782,6 +824,9 @@ const rc_memory_regions_t* rc_console_memory_regions(int console_id)
|
|||
case RC_CONSOLE_DREAMCAST:
|
||||
return &rc_memory_regions_dreamcast;
|
||||
|
||||
case RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER:
|
||||
return &rc_memory_regions_elektor_tv_games;
|
||||
|
||||
case RC_CONSOLE_FAIRCHILD_CHANNEL_F:
|
||||
return &rc_memory_regions_fairchild_channel_f;
|
||||
|
||||
|
@ -801,6 +846,9 @@ const rc_memory_regions_t* rc_console_memory_regions(int console_id)
|
|||
case RC_CONSOLE_INTELLIVISION:
|
||||
return &rc_memory_regions_intellivision;
|
||||
|
||||
case RC_CONSOLE_INTERTON_VC_4000:
|
||||
return &rc_memory_regions_interton_vc_4000;
|
||||
|
||||
case RC_CONSOLE_MAGNAVOX_ODYSSEY2:
|
||||
return &rc_memory_regions_magnavox_odyssey_2;
|
||||
|
||||
|
|
|
@ -570,7 +570,7 @@ static void* cdreader_open_gdi_track(const char* path, uint32_t track)
|
|||
char file[256];
|
||||
int64_t track_size;
|
||||
int track_type;
|
||||
char* bin_path = "";
|
||||
char* bin_path = NULL;
|
||||
uint32_t current_track = 0;
|
||||
char* ptr, *ptr2, *end;
|
||||
int lba = 0;
|
||||
|
|
|
@ -1606,16 +1606,19 @@ int rc_hash_generate_from_buffer(char hash[33], int console_id, const uint8_t* b
|
|||
|
||||
case RC_CONSOLE_AMSTRAD_PC:
|
||||
case RC_CONSOLE_APPLE_II:
|
||||
case RC_CONSOLE_ARCADIA_2001:
|
||||
case RC_CONSOLE_ATARI_2600:
|
||||
case RC_CONSOLE_ATARI_JAGUAR:
|
||||
case RC_CONSOLE_COLECOVISION:
|
||||
case RC_CONSOLE_COMMODORE_64:
|
||||
case RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER:
|
||||
case RC_CONSOLE_FAIRCHILD_CHANNEL_F:
|
||||
case RC_CONSOLE_GAMEBOY:
|
||||
case RC_CONSOLE_GAMEBOY_ADVANCE:
|
||||
case RC_CONSOLE_GAMEBOY_COLOR:
|
||||
case RC_CONSOLE_GAME_GEAR:
|
||||
case RC_CONSOLE_INTELLIVISION:
|
||||
case RC_CONSOLE_INTERTON_VC_4000:
|
||||
case RC_CONSOLE_MAGNAVOX_ODYSSEY2:
|
||||
case RC_CONSOLE_MASTER_SYSTEM:
|
||||
case RC_CONSOLE_MEGA_DRIVE:
|
||||
|
@ -1898,15 +1901,18 @@ int rc_hash_generate_from_file(char hash[33], int console_id, const char* path)
|
|||
return rc_hash_error(buffer);
|
||||
}
|
||||
|
||||
case RC_CONSOLE_ARCADIA_2001:
|
||||
case RC_CONSOLE_ATARI_2600:
|
||||
case RC_CONSOLE_ATARI_JAGUAR:
|
||||
case RC_CONSOLE_COLECOVISION:
|
||||
case RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER:
|
||||
case RC_CONSOLE_FAIRCHILD_CHANNEL_F:
|
||||
case RC_CONSOLE_GAMEBOY:
|
||||
case RC_CONSOLE_GAMEBOY_ADVANCE:
|
||||
case RC_CONSOLE_GAMEBOY_COLOR:
|
||||
case RC_CONSOLE_GAME_GEAR:
|
||||
case RC_CONSOLE_INTELLIVISION:
|
||||
case RC_CONSOLE_INTERTON_VC_4000:
|
||||
case RC_CONSOLE_MAGNAVOX_ODYSSEY2:
|
||||
case RC_CONSOLE_MASTER_SYSTEM:
|
||||
case RC_CONSOLE_MEGADUCK:
|
||||
|
@ -2131,14 +2137,15 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
|
|||
iterator->consoles[2] = RC_CONSOLE_PLAYSTATION_2; /* PCSX2 supports directly opening the bin file*/
|
||||
iterator->consoles[3] = RC_CONSOLE_SEGA_CD; /* Genesis Plus GX supports directly opening the bin file*/
|
||||
|
||||
/* fallback to megadrive which just does a full hash */
|
||||
/* fallback to megadrive which just does a full hash. */
|
||||
iterator->consoles[4] = RC_CONSOLE_MEGA_DRIVE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* bin is associated with MegaDrive, Sega32X, Atari 2600, Watara Supervision, MegaDuck, and Fairchild Channel F.
|
||||
/* bin is associated with MegaDrive, Sega32X, Atari 2600, Watara Supervision, MegaDuck,
|
||||
* Fairchild Channel F, Arcadia 2001, and Interton VC 4000.
|
||||
* Since they all use the same hashing algorithm, only specify one of them */
|
||||
iterator->consoles[0] = RC_CONSOLE_MEGA_DRIVE;
|
||||
}
|
||||
|
@ -2346,6 +2353,10 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
|
|||
{
|
||||
iterator->consoles[0] = RC_CONSOLE_PC_ENGINE;
|
||||
}
|
||||
else if (rc_path_compare_extension(ext, "pgm"))
|
||||
{
|
||||
iterator->consoles[0] = RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
|
@ -2395,6 +2406,10 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
|
|||
{
|
||||
iterator->consoles[0] = RC_CONSOLE_TIC80;
|
||||
}
|
||||
else if (rc_path_compare_extension(ext, "tvc"))
|
||||
{
|
||||
iterator->consoles[0] = RC_CONSOLE_ELEKTOR_TV_GAMES_COMPUTER;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
|
|
|
@ -58,7 +58,7 @@ static int rc_url_encode(char* encoded, size_t len, const char* str) {
|
|||
|
||||
int rc_url_award_cheevo(char* buffer, size_t size, const char* user_name, const char* login_token,
|
||||
unsigned cheevo_id, int hardcore, const char* game_hash) {
|
||||
char urle_user_name[256];
|
||||
char urle_user_name[64];
|
||||
char urle_login_token[64];
|
||||
int written;
|
||||
|
||||
|
@ -88,7 +88,7 @@ int rc_url_award_cheevo(char* buffer, size_t size, const char* user_name, const
|
|||
}
|
||||
|
||||
int rc_url_submit_lboard(char* buffer, size_t size, const char* user_name, const char* login_token, unsigned lboard_id, int value) {
|
||||
char urle_user_name[256];
|
||||
char urle_user_name[64];
|
||||
char urle_login_token[64];
|
||||
char signature[64];
|
||||
unsigned char hash[16];
|
||||
|
@ -136,7 +136,7 @@ int rc_url_get_gameid(char* buffer, size_t size, const char* hash) {
|
|||
}
|
||||
|
||||
int rc_url_get_patch(char* buffer, size_t size, const char* user_name, const char* login_token, unsigned gameid) {
|
||||
char urle_user_name[256];
|
||||
char urle_user_name[64];
|
||||
char urle_login_token[64];
|
||||
int written;
|
||||
|
||||
|
@ -172,7 +172,7 @@ int rc_url_get_badge_image(char* buffer, size_t size, const char* badge_name) {
|
|||
}
|
||||
|
||||
int rc_url_login_with_password(char* buffer, size_t size, const char* user_name, const char* password) {
|
||||
char urle_user_name[256];
|
||||
char urle_user_name[64];
|
||||
char urle_password[256];
|
||||
int written;
|
||||
|
||||
|
@ -196,7 +196,7 @@ int rc_url_login_with_password(char* buffer, size_t size, const char* user_name,
|
|||
}
|
||||
|
||||
int rc_url_login_with_token(char* buffer, size_t size, const char* user_name, const char* login_token) {
|
||||
char urle_user_name[256];
|
||||
char urle_user_name[64];
|
||||
char urle_login_token[64];
|
||||
int written;
|
||||
|
||||
|
@ -220,7 +220,7 @@ int rc_url_login_with_token(char* buffer, size_t size, const char* user_name, co
|
|||
}
|
||||
|
||||
int rc_url_get_unlock_list(char* buffer, size_t size, const char* user_name, const char* login_token, unsigned gameid, int hardcore) {
|
||||
char urle_user_name[256];
|
||||
char urle_user_name[64];
|
||||
char urle_login_token[64];
|
||||
int written;
|
||||
|
||||
|
@ -246,7 +246,7 @@ int rc_url_get_unlock_list(char* buffer, size_t size, const char* user_name, con
|
|||
}
|
||||
|
||||
int rc_url_post_playing(char* buffer, size_t size, const char* user_name, const char* login_token, unsigned gameid) {
|
||||
char urle_user_name[256];
|
||||
char urle_user_name[64];
|
||||
char urle_login_token[64];
|
||||
int written;
|
||||
|
||||
|
|
Loading…
Reference in New Issue