From: kub Date: Mon, 5 Jun 2023 22:21:16 +0000 (+0000) Subject: md, fix carthw.cfg parsing X-Git-Tag: v2.00~213 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a18d5e22b3c66e91ae5931bf9391a9a6012afc8c;p=picodrive.git md, fix carthw.cfg parsing --- diff --git a/pico/carthw_cfg.c b/pico/carthw_cfg.c index 94b6d32b..02f8c111 100644 --- a/pico/carthw_cfg.c +++ b/pico/carthw_cfg.c @@ -1,4 +1,4 @@ -/* generated by ./tools/make_carthw_c, do not modify */ +/* generated by tools/make_carthw_c, do not modify */ static const char builtin_carthw_cfg[] = "[]\n" "check_str=0x150,\"Virtua Racing\"\n" @@ -21,15 +21,15 @@ static const char builtin_carthw_cfg[] = "[]\n" "check_str=0x100,\"SEGA 32X\"\n" "check_str=0x150,\"WWF RAW\"\n" - "prop=wwfraw_hack#readsbackdatawrittentohighROMadressesfromcache\n" + "prop=wwfraw_hack\n" "[]\n" "check_str=0x100,\"SEGA 32X\"\n" "check_str=0x120,\"BLACKTHORNE\"\n" - "prop=blackthorne_hack#readsbackdataoverwrittenby2ndCPUfromcache\n" + "prop=blackthorne_hack\n" "[]\n" "check_str=0x100,\"SEGA\"\n" "check_str=0x150,\"MARS CHECK PROGRAM\"\n" - "prop=marscheck_hack#readsbackdataoverwrittenbyDMAfromcache\n" + "prop=marscheck_hack\n" "[]\n" "check_str=0x120,\"PUGGSY\"\n" "prop=no_sram\n" @@ -244,7 +244,7 @@ static const char builtin_carthw_cfg[] = "prot_ro_value16=0x480000,0xff0000,0xaa00\n" "prot_ro_value16=0x4a0000,0xff0000,0x0a00\n" "prot_ro_value16=0x4c0000,0xff0000,0xf000\n" - "prot_ro_value16=0x400000,0xc00000,0x0000#defaultfor400000-7f0000\n" + "prot_ro_value16=0x400000,0xc00000,0x0000\n" "[]\n" "check_str=0x104,\" MEGA DRIVE (C)\"\n" "check_str=0x118,\"CREATON.\"\n" @@ -319,9 +319,9 @@ static const char builtin_carthw_cfg[] = "check_str=0x172,\"GAME : ELF WOR\"\n" "hw=prot\n" "prot_ro_value16=0x400000,-2,0x5500\n" - "prot_ro_value16=0x400002,-2,0x0f00#checkisdoneiftheaboveonefails\n" + "prot_ro_value16=0x400002,-2,0x0f00\n" "prot_ro_value16=0x400004,-2,0xc900\n" - "prot_ro_value16=0x400006,-2,0x1800#similartoabove\n" + "prot_ro_value16=0x400006,-2,0x1800\n" "[]\n" "check_str=0x104,\" \"\n" "check_crc32=0x5fdeb37b\n" @@ -344,7 +344,7 @@ static const char builtin_carthw_cfg[] = "hw=prot\n" "prot_ro_value16=0x400000,-2,0x6300\n" "prot_ro_value16=0x400002,-2,0x9800\n" - "prot_ro_value16=0x400004,-2,0xaa00#or0xc900\n" + "prot_ro_value16=0x400004,-2,0xaa00\n" "prot_ro_value16=0x400006,-2,0xf000\n" "[]\n" "check_str=0x104,\" are Registered Trademarks\"\n" diff --git a/tools/make_carthw_c.c b/tools/make_carthw_c.c index 480a6fe1..0ee59a20 100644 --- a/tools/make_carthw_c.c +++ b/tools/make_carthw_c.c @@ -39,6 +39,8 @@ int main(int argc, char *argv[]) strcpy(p, "[]"); for (; *p != 0; p++) { + if (!quote && *p == '#') + break; if (!quote && isspace(*p)) continue; if (*p == '"') {