md, fix carthw.cfg parsing
authorkub <derkub@gmail.com>
Mon, 5 Jun 2023 22:21:16 +0000 (22:21 +0000)
committerkub <derkub@gmail.com>
Mon, 5 Jun 2023 22:21:16 +0000 (22:21 +0000)
pico/carthw_cfg.c
tools/make_carthw_c.c

index 94b6d32..02f8c11 100644 (file)
@@ -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"
index 480a6fe..0ee59a2 100644 (file)
@@ -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 == '"') {