mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-10-26 16:29:37 -04:00
sms, mapper for taiwanese sg-1000 ram extension
This commit is contained in:
parent
aaef4b945e
commit
171fb8cc14
5 changed files with 11 additions and 2 deletions
|
|
@ -351,6 +351,7 @@ struct PicoMisc
|
||||||
#define PMS_MAP_N16K 6
|
#define PMS_MAP_N16K 6
|
||||||
#define PMS_MAP_JANGGUN 7
|
#define PMS_MAP_JANGGUN 7
|
||||||
#define PMS_MAP_NEMESIS 8
|
#define PMS_MAP_NEMESIS 8
|
||||||
|
#define PMS_MAP_8KBRAM 9
|
||||||
|
|
||||||
struct PicoMS
|
struct PicoMS
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -456,7 +456,12 @@ static void write_bank_jang(unsigned short a, unsigned char d)
|
||||||
|
|
||||||
static void write_bank_x8k(unsigned short a, unsigned char d)
|
static void write_bank_x8k(unsigned short a, unsigned char d)
|
||||||
{
|
{
|
||||||
|
// 8KB address range @ 0x2000
|
||||||
if ((a&0xe000) != 0x2000) return;
|
if ((a&0xe000) != 0x2000) return;
|
||||||
|
// never autodetected, selectable only via config
|
||||||
|
if (Pico.ms.mapper != PMS_MAP_8KBRAM) return;
|
||||||
|
elprintf(EL_Z80BNK, "bank x8k %04x %02x @ %04x", a, d, z80_pc());
|
||||||
|
|
||||||
((unsigned char *)PicoMem.vram)[a+0x6000] = d;
|
((unsigned char *)PicoMem.vram)[a+0x6000] = d;
|
||||||
z80_map_set(z80_read_map, 0x2000, 0x3fff, PicoMem.vram+0x4000, 0);
|
z80_map_set(z80_read_map, 0x2000, 0x3fff, PicoMem.vram+0x4000, 0);
|
||||||
z80_map_set(z80_write_map, 0x2000, 0x3fff, PicoMem.vram+0x4000, 0);
|
z80_map_set(z80_write_map, 0x2000, 0x3fff, PicoMem.vram+0x4000, 0);
|
||||||
|
|
@ -479,6 +484,7 @@ static void xwrite(unsigned int a, unsigned char d)
|
||||||
case PMS_MAP_N16K: write_bank_n16k(a, d); break;
|
case PMS_MAP_N16K: write_bank_n16k(a, d); break;
|
||||||
case PMS_MAP_JANGGUN: write_bank_jang(a, d); break;
|
case PMS_MAP_JANGGUN: write_bank_jang(a, d); break;
|
||||||
case PMS_MAP_NEMESIS: write_bank_msxn(a, d); break;
|
case PMS_MAP_NEMESIS: write_bank_msxn(a, d); break;
|
||||||
|
case PMS_MAP_8KBRAM: write_bank_x8k(a, d); break;
|
||||||
|
|
||||||
case PMS_MAP_AUTO:
|
case PMS_MAP_AUTO:
|
||||||
// NB the sequence of mappers is crucial for the auto detection
|
// NB the sequence of mappers is crucial for the auto detection
|
||||||
|
|
@ -488,7 +494,6 @@ static void xwrite(unsigned int a, unsigned char d)
|
||||||
write_bank_codem(a, d);
|
write_bank_codem(a, d);
|
||||||
write_bank_korea(a, d);
|
write_bank_korea(a, d);
|
||||||
write_bank_n16k(a, d);
|
write_bank_n16k(a, d);
|
||||||
write_bank_x8k(a, d);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -537,7 +537,7 @@ static int menu_loop_32x_options(int id, int keys)
|
||||||
#ifndef NO_SMS
|
#ifndef NO_SMS
|
||||||
|
|
||||||
static const char *sms_hardwares[] = { "auto", "Game Gear", "Master System", NULL };
|
static const char *sms_hardwares[] = { "auto", "Game Gear", "Master System", NULL };
|
||||||
static const char *sms_mappers[] = { "auto", "Sega", "Codemasters", "Korea", "Korea MSX", "Korea X-in-1", "Korea 4-Pak", "Korea Janggun", "Korea Nemesis", NULL };
|
static const char *sms_mappers[] = { "auto", "Sega", "Codemasters", "Korea", "Korea MSX", "Korea X-in-1", "Korea 4-Pak", "Korea Janggun", "Korea Nemesis", "Taiwan 8K RAM", NULL };
|
||||||
static const char h_smsfm[] = "FM sound is only supported by few games\nOther games may crash with FM enabled";
|
static const char h_smsfm[] = "FM sound is only supported by few games\nOther games may crash with FM enabled";
|
||||||
|
|
||||||
static menu_entry e_menu_sms_options[] =
|
static menu_entry e_menu_sms_options[] =
|
||||||
|
|
|
||||||
|
|
@ -1526,6 +1526,8 @@ static void update_variables(bool first_run)
|
||||||
PicoIn.mapper = PMS_MAP_JANGGUN;
|
PicoIn.mapper = PMS_MAP_JANGGUN;
|
||||||
else if (strcmp(var.value, "Korea Nemesis") == 0)
|
else if (strcmp(var.value, "Korea Nemesis") == 0)
|
||||||
PicoIn.mapper = PMS_MAP_NEMESIS;
|
PicoIn.mapper = PMS_MAP_NEMESIS;
|
||||||
|
else if (strcmp(var.value, "Taiwan 8K RAM") == 0)
|
||||||
|
PicoIn.mapper = PMS_MAP_8KRAM;
|
||||||
else
|
else
|
||||||
PicoIn.mapper = PMS_MAP_SEGA;
|
PicoIn.mapper = PMS_MAP_SEGA;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
||||||
{ "Korea 4-Pak", NULL },
|
{ "Korea 4-Pak", NULL },
|
||||||
{ "Korea Janggun", NULL },
|
{ "Korea Janggun", NULL },
|
||||||
{ "Korea Nemesis", NULL },
|
{ "Korea Nemesis", NULL },
|
||||||
|
{ "Taiwan 8K RAM", NULL },
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
},
|
},
|
||||||
"Auto"
|
"Auto"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue