Mercurial > repos > blastem
diff system.c @ 2604:c768bbd912f1
Give sega 8-bit consoles separate system_type enum values and allow selecting them from the command line
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 13 Feb 2025 23:07:31 -0800 |
parents | 6404643aca38 |
children | c4256ce2c45a |
line wrap: on
line diff
--- a/system.c Thu Feb 13 21:04:28 2025 -0800 +++ b/system.c Thu Feb 13 23:07:31 2025 -0800 @@ -286,7 +286,7 @@ || safe_cmp("TMR SEGA", 0x3FF0, media->buffer, media->size) || safe_cmp("TMR SEGA", 0x7FF0, media->buffer, media->size) ) { - return SYSTEM_SMS; + return strcmp("gg", media->extension) ? SYSTEM_SMS : SYSTEM_GAME_GEAR; } if (media->size > 400) { uint8_t *buffer = media->buffer; @@ -333,10 +333,20 @@ if (!strcmp("md", media->extension) || !strcmp("gen", media->extension)) { return SYSTEM_GENESIS; } - if (!strcmp("sms", media->extension) || !strcmp("sg", media->extension) || !strcmp("gg", media->extension) - || !strcmp("sc", media->extension) || !strcmp("sf7", media->extension)) { + if (!strcmp("sms", media->extension)) { return SYSTEM_SMS; } + if (!strcmp("gg", media->extension)) { + return SYSTEM_GAME_GEAR; + } + if (!strcmp("sg", media->extension) || !strcmp("sg1", media->extension)) { + return SYSTEM_SG1000; + } + if (!strcmp("sc", media->extension) || !strcmp("sf7", media->extension) || + !strcmp("sc3", media->extension) + ) { + return SYSTEM_SC3000; + } if (!strcmp("j64", media->extension)) { return SYSTEM_JAGUAR; } @@ -375,7 +385,10 @@ return &(alloc_config_genesis_cdboot(media, opts, force_region))->header; #ifndef NO_Z80 case SYSTEM_SMS: - return &(alloc_configure_sms(media, opts, force_region))->header; + case SYSTEM_GAME_GEAR: + case SYSTEM_SG1000: + case SYSTEM_SC3000: + return &(alloc_configure_sms(media, stype, opts, force_region))->header; case SYSTEM_COLECOVISION: return &(alloc_configure_coleco(media))->header; #endif