src/mess/softlist.c
| r8093 | r8094 | |
| 560 | 560 | char *hashdata = (char *)pool_malloc_lib( swlist->pool, sizeof(char) * ( strlen(str_crc) + strlen(str_sha1) + 7 + 4 ) ); |
| 561 | 561 | int baddump = ( str_status && !strcmp(str_status,"baddump") ) ? 1 : 0; |
| 562 | 562 | int nodump = ( str_status && !strcmp(str_status,"nodump" ) ) ? 1 : 0; |
| 563 | int romflags = 0; |
| 563 | 564 | |
| 564 | 565 | if ( !s_name || !hashdata ) |
| 565 | 566 | return; |
| r8093 | r8094 | |
| 567 | 568 | strcpy( s_name, str_name ); |
| 568 | 569 | sprintf( hashdata, "c:%s#s:%s#%s", str_crc, str_sha1, ( nodump ? NO_DUMP : ( baddump ? BAD_DUMP : "" ) ) ); |
| 569 | 570 | |
| 571 | /* Handle loadflag attribute */ |
| 572 | if ( str_loadflag && !strcmp(str_loadflag,"load16_word_swap") ) |
| 573 | romflags = ROM_GROUPWORD | ROM_REVERSE; |
| 574 | else if ( str_loadflag && !strcmp(str_loadflag,"load16_byte") ) |
| 575 | romflags = ROM_SKIP(1); |
| 576 | |
| 570 | 577 | /* ROM_LOAD( name, offset, length, hash ) */ |
| 571 | | add_rom_entry( swlist, s_name, hashdata, offset, length, ROMENTRYTYPE_ROM ); |
| 578 | add_rom_entry( swlist, s_name, hashdata, offset, length, ROMENTRYTYPE_ROM | romflags ); |
| 572 | 579 | } |
| 573 | 580 | } |
| 574 | 581 | } |