From 470b2577dd94ea399bb775a3c254c8f4d64fccd2 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Wed, 26 Jun 2024 20:17:18 +1000 Subject: [PATCH] nes: don't crash if unknown unif encountered. Updated nes list. --- hash/more/famicom.xml | 22 +++- hash/more/nes.xml | 182 ++++++++++++++++++++++++++++++- src/devices/bus/nes/nes_unif.hxx | 7 +- 3 files changed, 207 insertions(+), 4 deletions(-) diff --git a/hash/more/famicom.xml b/hash/more/famicom.xml index deaffcbbae8..56ae52897bc 100644 --- a/hash/more/famicom.xml +++ b/hash/more/famicom.xml @@ -1,6 +1,6 @@ - + (demo)Doremikko (1987)(Konami) @@ -512,6 +512,16 @@ + + All Night Nippon Super Mario Bros + ???? + unknown + + + + + + Almana no Kiseki (1987)(Konami) ???? @@ -4692,6 +4702,16 @@ + + Wardner_no_Mori_(1988)(Taito_Corp + ???? + unknown + + + + + + Winter Games (19xx)(Epyx - Pony Canyon) ???? diff --git a/hash/more/nes.xml b/hash/more/nes.xml index 2bae2925575..9284bda7fd8 100644 --- a/hash/more/nes.xml +++ b/hash/more/nes.xml @@ -1,6 +1,6 @@ - + !Clik! (2008 Sly Dog Studios) @@ -1042,6 +1042,16 @@ + + 12-in-1 Console TV Game Cartridge (Unl)[!] + ???? + unknown + + + + + + 12-in-1 Hwang Shinwei (Unl) [p1][!] ???? @@ -1462,6 +1472,16 @@ + + 2-in-1 1996 Super HIK Gold Card (NT-803)[p1][!] + ???? + unknown + + + + + + 2-in-1 Cosmo Cop (Light gun) (Sachen) [U][!] ???? @@ -1472,6 +1492,26 @@ + + 2-in-1 J-M2 (Unl)[!] + ???? + unknown + + + + + + + + 2-in-1 King005 (Unl)[!] + ???? + unknown + + + + + + 2-in-1 Tough Cop (Light gun) (Sachen) [U][!] ???? @@ -1712,6 +1752,46 @@ + + 3-in-1 (BN096)[p1][!] + ???? + unknown + + + + + + + + 3-in-1 (K3011)[p1][!] + ???? + unknown + + + + + + + + 3-in-1 (MR028)[p1][!] + ???? + unknown + + + + + + + + 3-in-1 (MR029)[p1][!] + ???? + unknown + + + + + + 3-in-1 (N068) [p1][U][!] ???? @@ -1792,6 +1872,16 @@ + + 4-in-1 (ET40, 821243c)[p1][U](!) + ???? + unknown + + + + + + 4-in-1 (FK23C8244) [p1][U][!] ???? @@ -1802,6 +1892,16 @@ + + 4-in-1 (GG1, 820916c, 3967, CK-001, Alt_Dump)[p1][U][!] + ???? + unknown + + + + + + 4-in-1 (JY-066) [p1][U][!] ???? @@ -1822,6 +1922,36 @@ + + 4-in-1 (SO1)[p1][!] + ???? + unknown + + + + + + + + 4-in-1 (YH441)[p1][!] + ???? + unknown + + + + + + + + 4-in-1 1993 (CK-001)[U][!] + ???? + unknown + + + + + + 4-in-1 Benshieng (BS-7083)[U][!] ???? @@ -1942,6 +2072,26 @@ + + 5-in-1 (SPC005)[p1][!] + ???? + unknown + + + + + + + + 5-star Restaurant (2023)(Wendel Scardua) + ???? + unknown + + + + + + 54-in-1 (NT886) [p1][U][!] ???? @@ -1952,6 +2102,16 @@ + + 6-in-1 (ET40, 840726c, 43-203)[p1][U][!] + ???? + unknown + + + + + + 6-in-1 (KY-6006) [p1] ???? @@ -2022,6 +2182,16 @@ + + 7-in-1 (K7603)[p1][!] + ???? + unknown + + + + + + 7-in-1 (M-022) [p1][U][!] ???? @@ -2222,6 +2392,16 @@ + + 8-in-1 (ET40, 821242c)[p1][U][!] + ???? + unknown + + + + + + 8-in-1 Little Mermaid, The (U) [p1][!] ???? diff --git a/src/devices/bus/nes/nes_unif.hxx b/src/devices/bus/nes/nes_unif.hxx index b4955cd9b8d..78436fc2122 100644 --- a/src/devices/bus/nes/nes_unif.hxx +++ b/src/devices/bus/nes/nes_unif.hxx @@ -180,8 +180,11 @@ const unif *nes_unif_lookup( const char *board ) void unif_mapr_setup( const char *board, int *pcb_id, int *battery, int *prgram, int *vram_chunks ) { const unif *unif_board = nes_unif_lookup(board); - if (unif_board == nullptr) - fatalerror("Unknown UNIF board %s.\n", board); + if (unif_board == nullptr) // MESSUI - do not kill emulator + { + printf("Unknown UNIF board %s.\n", board); + return; + } *pcb_id = unif_board->board_idx; *battery = unif_board->nvwram; // we should implement battery banks based on the size of this...