From: kub Date: Sat, 26 Feb 2022 10:19:07 +0000 (+0000) Subject: sms, add basic sg-1000 support X-Git-Tag: v2.00~335 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aaef4b945edd614a4825231c4b31a0e377f9d0f3;p=picodrive.git sms, add basic sg-1000 support --- diff --git a/pico/sms.c b/pico/sms.c index 39081363..dd301b08 100644 --- a/pico/sms.c +++ b/pico/sms.c @@ -454,6 +454,14 @@ static void write_bank_jang(unsigned short a, unsigned char d) } } +static void write_bank_x8k(unsigned short a, unsigned char d) +{ + if ((a&0xe000) != 0x2000) return; + ((unsigned char *)PicoMem.vram)[a+0x6000] = d; + z80_map_set(z80_read_map, 0x2000, 0x3fff, PicoMem.vram+0x4000, 0); + z80_map_set(z80_write_map, 0x2000, 0x3fff, PicoMem.vram+0x4000, 0); +} + // TODO auto-selecting is not really reliable. // Before adding more mappers this should be revised. static void xwrite(unsigned int a, unsigned char d) @@ -480,11 +488,12 @@ static void xwrite(unsigned int a, unsigned char d) write_bank_codem(a, d); write_bank_korea(a, d); write_bank_n16k(a, d); + write_bank_x8k(a, d); break; } } -// TMR product codes and hardware type for know 50Hz-only games */ +// TMR product codes and hardware type for know 50Hz-only games static u32 region_pal[] = { // cf. GX+, core/cart_hw/sms_cartc.c 0x40207067 /* Addams Family */, 0x40207020 /* Back.Future 3 */, 0x40207058 /* Battlemaniacs */, 0x40007105 /* Cal.Games 2 */, diff --git a/platform/common/menu_pico.c b/platform/common/menu_pico.c index 8ea84328..3ebaa4e3 100644 --- a/platform/common/menu_pico.c +++ b/platform/common/menu_pico.c @@ -42,7 +42,7 @@ static const char *rom_exts[] = { "bin", "smd", "gen", "md", "iso", "cso", "cue", "chd", "32x", - "sms", "gg", + "sms", "gg", "sg", NULL }; diff --git a/platform/libretro/libretro.c b/platform/libretro/libretro.c index 2399a3c8..b24028e8 100644 --- a/platform/libretro/libretro.c +++ b/platform/libretro/libretro.c @@ -733,7 +733,7 @@ void retro_get_system_info(struct retro_system_info *info) #define _GIT_VERSION "-" GIT_VERSION #endif info->library_version = VERSION _GIT_VERSION; - info->valid_extensions = "bin|gen|smd|md|32x|cue|iso|chd|sms|gg"; + info->valid_extensions = "bin|gen|smd|md|32x|cue|iso|chd|sms|gg|sg"; info->need_fullpath = true; } diff --git a/platform/opendingux/data/default.gcw0.desktop b/platform/opendingux/data/default.gcw0.desktop index 73094f03..49668c32 100644 --- a/platform/opendingux/data/default.gcw0.desktop +++ b/platform/opendingux/data/default.gcw0.desktop @@ -6,4 +6,4 @@ Exec=PicoDrive %f Icon=megadrive Terminal=false Categories=emulators; -MimeType=.md;.smd;.bin;.sms;.gg;.cue;.chd;.32x;.zip;.7z +MimeType=.md;.smd;.bin;.sms;.gg;.sg;.cue;.chd;.32x;.zip;.7z diff --git a/platform/opendingux/data/default.retrofw.desktop b/platform/opendingux/data/default.retrofw.desktop index 2ea9e044..7fcce634 100644 --- a/platform/opendingux/data/default.retrofw.desktop +++ b/platform/opendingux/data/default.retrofw.desktop @@ -6,7 +6,7 @@ Icon=megadrive Categories=emulators; X-OD-Manual= X-OD-Selector= -X-OD-Filter=.md,.smd,.bin,.sms,.gg,.cue,.chd,.32x,.zip,.7z +X-OD-Filter=.md,.smd,.bin,.sms,.gg,.sg,.cue,.chd,.32x,.zip,.7z Terminal=true Type=Application StartupNotify=true