|
| 1 | +From 09cb8867423725a9aaa0b947aa98db2dc1ee1887 Mon Sep 17 00:00:00 2001 |
| 2 | + |
| 3 | +Date: Sat, 2 Apr 2022 15:11:45 -0400 |
| 4 | +Subject: [PATCH 1/3] Update task_database.c |
| 5 | + |
| 6 | +--- |
| 7 | + tasks/task_database.c | 4 ++++ |
| 8 | + 1 file changed, 4 insertions(+) |
| 9 | + |
| 10 | +diff --git a/tasks/task_database.c b/tasks/task_database.c |
| 11 | +index 29ddf9f55f4..b6bddfe77a6 100644 |
| 12 | +--- a/tasks/task_database.c |
| 13 | ++++ b/tasks/task_database.c |
| 14 | +@@ -616,6 +616,10 @@ static int task_database_iterate_playlist( |
| 15 | + break; |
| 16 | + /* Consider Wii WBFS files similar to ISO files. */ |
| 17 | + case FILE_TYPE_WBFS: |
| 18 | ++ db_state->serial[0] = '\0'; |
| 19 | ++ intfstream_file_get_serial(name, 0, SIZE_MAX, db_state->serial); |
| 20 | ++ db->type = DATABASE_TYPE_SERIAL_LOOKUP; |
| 21 | ++ break; |
| 22 | + case FILE_TYPE_ISO: |
| 23 | + db_state->serial[0] = '\0'; |
| 24 | + intfstream_file_get_serial(name, 0, SIZE_MAX, db_state->serial); |
| 25 | + |
| 26 | +From 644016e40368d5e32f70b61b64f27aaadd43a91e Mon Sep 17 00:00:00 2001 |
| 27 | + |
| 28 | +Date: Sat, 2 Apr 2022 15:37:33 -0400 |
| 29 | +Subject: [PATCH 2/3] Update task_database_cue.c |
| 30 | + |
| 31 | +--- |
| 32 | + tasks/task_database_cue.c | 12 ++++++++++-- |
| 33 | + 1 file changed, 10 insertions(+), 2 deletions(-) |
| 34 | + |
| 35 | +diff --git a/tasks/task_database_cue.c b/tasks/task_database_cue.c |
| 36 | +index 4134a058be7..5b1dc199fa6 100644 |
| 37 | +--- a/tasks/task_database_cue.c |
| 38 | ++++ b/tasks/task_database_cue.c |
| 39 | +@@ -66,6 +66,7 @@ static struct magic_entry MAGIC_NUMBERS[] = { |
| 40 | + { 0x000010, "Sega - Saturn", "\x53\x45\x47\x41\x20\x53\x45\x47\x41\x53\x41\x54\x55\x52\x4e", 15}, |
| 41 | + { 0x000010, "Sega - Dreamcast", "\x53\x45\x47\x41\x20\x53\x45\x47\x41\x4b\x41\x54\x41\x4e\x41", 15}, |
| 42 | + { 0x000018, "Nintendo - Wii", "\x5d\x1c\x9e\xa3", 4}, |
| 43 | ++ { 0x000218, "Nintendo - Wii", "\x5d\x1c\x9e\xa3", 4}, |
| 44 | + { 0x00001c, "Nintendo - GameCube", "\xc2\x33\x9f\x3d", 4}, |
| 45 | + { 0x008008, "Sony - PlayStation Portable", "\x50\x53\x50\x20\x47\x41\x4d\x45", 8}, |
| 46 | + { 0x008008, "Sony - PlayStation", "\x50\x4c\x41\x59\x53\x54\x41\x54\x49\x4f\x4e", 11}, |
| 47 | +@@ -865,10 +866,17 @@ int detect_wii_game(intfstream_t *fd, char *game_id, const char *filename) |
| 48 | + /* Load raw serial or quit */ |
| 49 | + if (intfstream_seek(fd, 0x0000, SEEK_SET) < 0) |
| 50 | + return false; |
| 51 | +- |
| 52 | ++ |
| 53 | + if (intfstream_read(fd, raw_game_id, 6) <= 0) |
| 54 | + return false; |
| 55 | +- |
| 56 | ++ |
| 57 | ++ if (string_is_equal_fast(raw_game_id, "WBFS", 4)) |
| 58 | ++ { |
| 59 | ++ if (intfstream_seek(fd, 0x0200, SEEK_SET) < 0) |
| 60 | ++ return false; |
| 61 | ++ if (intfstream_read(fd, raw_game_id, 6) <= 0) |
| 62 | ++ return false; |
| 63 | ++ } |
| 64 | + raw_game_id[6] = '\0'; |
| 65 | + |
| 66 | + /** Scrub files with bad data and log **/ |
| 67 | + |
| 68 | +From d3416699ccfbe42e2bb340a318e39cfe9001eff3 Mon Sep 17 00:00:00 2001 |
| 69 | + |
| 70 | +Date: Sat, 2 Apr 2022 15:42:39 -0400 |
| 71 | +Subject: [PATCH 3/3] Update task_database_cue.c |
| 72 | + |
| 73 | +--- |
| 74 | + tasks/task_database_cue.c | 2 +- |
| 75 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
| 76 | + |
| 77 | +diff --git a/tasks/task_database_cue.c b/tasks/task_database_cue.c |
| 78 | +index 5b1dc199fa6..b86df9e2d2b 100644 |
| 79 | +--- a/tasks/task_database_cue.c |
| 80 | ++++ b/tasks/task_database_cue.c |
| 81 | +@@ -866,7 +866,7 @@ int detect_wii_game(intfstream_t *fd, char *game_id, const char *filename) |
| 82 | + /* Load raw serial or quit */ |
| 83 | + if (intfstream_seek(fd, 0x0000, SEEK_SET) < 0) |
| 84 | + return false; |
| 85 | +- |
| 86 | ++ |
| 87 | + if (intfstream_read(fd, raw_game_id, 6) <= 0) |
| 88 | + return false; |
| 89 | + |
0 commit comments