src/mess/climess.c
| r7716 | r7717 | |
| 194 | 194 | fprintf(out, " %s=\"%s\"", hash_function_name(1 << hashtype), checksum); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | | fprintf( out, " offset=\"%x\" />\n", ROM_GETOFFSET(rom) ); |
| 197 | fprintf( out, " offset=\"%x\"", ROM_GETOFFSET(rom) ); |
| 198 | |
| 199 | if ( hash_data_has_info(ROM_GETHASHDATA(rom), HASH_INFO_BAD_DUMP) ) |
| 200 | fprintf( out, " status=\"baddump\"" ); |
| 201 | if ( hash_data_has_info(ROM_GETHASHDATA(rom), HASH_INFO_NO_DUMP) ) |
| 202 | fprintf( out, " status=\"nodump\"" ); |
| 203 | |
| 204 | fprintf( out, "/>\n" ); |
| 198 | 205 | } |
| 199 | 206 | } |
| 200 | 207 | |
src/mess/softlist.c
| r7716 | r7717 | |
| 505 | 505 | const char *str_crc = NULL; |
| 506 | 506 | const char *str_sha1 = NULL; |
| 507 | 507 | const char *str_offset = NULL; |
| 508 | const char *str_status = NULL; |
| 508 | 509 | const char *str_loadflag = NULL; |
| 509 | 510 | |
| 510 | 511 | for ( ; attributes[0]; attributes += 2 ) |
| r7716 | r7717 | |
| 519 | 520 | str_sha1 = attributes[1]; |
| 520 | 521 | if ( !strcmp( attributes[0], "offset" ) ) |
| 521 | 522 | str_offset = attributes[1]; |
| 523 | if ( !strcmp( attributes[0], "status" ) ) |
| 524 | str_status = attributes[1]; |
| 522 | 525 | if ( !strcmp( attributes[0], "loadflag" ) ) |
| 523 | 526 | str_loadflag = attributes[1]; |
| 524 | 527 | } |
| r7716 | r7717 | |
| 530 | 533 | UINT32 offset = strtol( str_offset, NULL, 16 ); |
| 531 | 534 | char *s_name = (char *)pool_malloc_lib(swlist->pool, ( strlen( str_name ) + 1 ) * sizeof(char) ); |
| 532 | 535 | char *hashdata = (char *)pool_malloc_lib( swlist->pool, sizeof(char) * ( strlen(str_crc) + strlen(str_sha1) + 7 ) ); |
| 536 | int baddump = ( !strcmp(str_status,"baddump") ) ? 1 : 0; |
| 537 | int nodump = ( !strcmp(str_status,"nodump" ) ) ? 1 : 0; |
| 533 | 538 | |
| 534 | 539 | if ( !s_name || !hashdata ) |
| 535 | 540 | return; |
| 536 | 541 | |
| 537 | 542 | strcpy( s_name, str_name ); |
| 538 | | sprintf( hashdata, "c:%s#s:%s#", str_crc, str_sha1 ); |
| 543 | sprintf( hashdata, "c:%s#s:%s#%s", str_crc, str_sha1, ( nodump ? NO_DUMP : ( baddump ? BAD_DUMP : 0 ) ) ); |
| 539 | 544 | |
| 540 | 545 | /* ROM_LOAD( name, offset, length, hash ) */ |
| 541 | 546 | add_rom_entry( swlist, s_name, hashdata, offset, length, ROMENTRYTYPE_ROM ); |