src/emu/emuopts.c
| r9664 | r9665 | |
| 28 | 28 | /* config options */ |
| 29 | 29 | { NULL, NULL, OPTION_HEADER, "CORE CONFIGURATION OPTIONS" }, |
| 30 | 30 | { "readconfig;rc", "1", OPTION_BOOLEAN, "enable loading of configuration files" }, |
| 31 | | #ifdef MESS |
| 32 | | { "writeconfig;wc", "1", OPTION_BOOLEAN, "writes configuration to (driver).ini on exit" }, |
| 33 | | #else |
| 34 | 31 | { "writeconfig;wc", "0", OPTION_BOOLEAN, "writes configuration to (driver).ini on exit" }, |
| 35 | | #endif /* MESS */ |
| 36 | 32 | |
| 37 | 33 | /* seach path options */ |
| 38 | 34 | { NULL, NULL, OPTION_HEADER, "CORE SEARCH PATH OPTIONS" }, |
| 39 | 35 | { "rompath;rp;biospath;bp", "roms", 0, "path to ROMsets and hard disk images" }, |
| 40 | | #ifdef MESS |
| 41 | 36 | { "hashpath;hash_directory;hash","hash", 0, "path to hash files" }, |
| 42 | | #endif /* MESS */ |
| 43 | 37 | { "samplepath;sp", "samples", 0, "path to samplesets" }, |
| 44 | 38 | { "artpath;artwork_directory", "artwork", 0, "path to artwork files" }, |
| 45 | 39 | { "ctrlrpath;ctrlr_directory", "ctrlr", 0, "path to controller definitions" }, |
src/emu/mame.c
| r9664 | r9665 | |
| 566 | 566 | file_error filerr; |
| 567 | 567 | mame_file *file; |
| 568 | 568 | |
| 569 | /* update game name so depending callback options could be added */ |
| 570 | if (priority==OPTION_PRIORITY_DRIVER_INI) { |
| 571 | options_force_option_callback(options, OPTION_GAMENAME, name, priority); |
| 572 | } |
| 573 | |
| 569 | 574 | /* don't parse if it has been disabled */ |
| 570 | 575 | if (!options_get_bool(options, OPTION_READCONFIG)) |
| 571 | 576 | return FALSE; |
| r9664 | r9665 | |
| 576 | 581 | if (filerr != FILERR_NONE) |
| 577 | 582 | return FALSE; |
| 578 | 583 | |
| 579 | | /* update game name so depending callback options could be added */ |
| 580 | | if (priority==OPTION_PRIORITY_DRIVER_INI) { |
| 581 | | options_force_option_callback(options, OPTION_GAMENAME, name, priority); |
| 582 | | } |
| 583 | | |
| 584 | 584 | /* parse the file and close it */ |
| 585 | 585 | mame_printf_verbose("Parsing %s.ini\n", name); |
| 586 | 586 | options_parse_ini_file(options, mame_core_file(file), priority); |
src/emu/fileio.h
| r9664 | r9665 | |
| 28 | 28 | #define SEARCHPATH_DEBUGLOG NULL |
| 29 | 29 | |
| 30 | 30 | #define SEARCHPATH_ROM OPTION_ROMPATH |
| 31 | | #ifdef MESS |
| 32 | | #define SEARCHPATH_IMAGE NULL |
| 33 | | #define SEARCHPATH_HASH OPTION_HASHPATH |
| 34 | | #else |
| 35 | 31 | #define SEARCHPATH_IMAGE OPTION_ROMPATH |
| 36 | | #define SEARCHPATH_HASH NULL |
| 37 | | #endif |
| 32 | #define SEARCHPATH_HASH OPTION_HASHPATH |
| 38 | 33 | #define SEARCHPATH_SAMPLE OPTION_SAMPLEPATH |
| 39 | 34 | #define SEARCHPATH_ARTWORK OPTION_ARTPATH |
| 40 | 35 | #define SEARCHPATH_CTRLR OPTION_CTRLRPATH |
src/mess/formats/ti85_ser.c
| r9664 | r9665 | |
| 889 | 889 | ti85serial->variable_number = 0; |
| 890 | 890 | ti85serial->status = TI85_SEND_STOP; |
| 891 | 891 | sprintf (var_file_name, "%08d.85g", ti85serial->var_file_number); |
| 892 | | filerr = mame_fopen(SEARCHPATH_IMAGE, var_file_name, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &var_file); |
| 892 | filerr = mame_fopen(NULL, var_file_name, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &var_file); |
| 893 | 893 | if (filerr == FILERR_NONE) |
| 894 | 894 | { |
| 895 | 895 | mame_fwrite(var_file, ti85serial->var_file_data, ti85serial->var_file_size); |
| r9664 | r9665 | |
| 1031 | 1031 | ti85serial->backup_file_data[0x42+0x06+ti85serial->backup_data_size[0]+ti85serial->backup_data_size[1]+ti85serial->backup_data_size[2]] = ti85_calculate_checksum(ti85serial->backup_file_data+0x37, 0x42+ti85serial->backup_data_size[0]+ti85serial->backup_data_size[1]+ti85serial->backup_data_size[2]+0x06-0x37)&0x00ff; |
| 1032 | 1032 | ti85serial->backup_file_data[0x42+0x06+ti85serial->backup_data_size[0]+ti85serial->backup_data_size[1]+ti85serial->backup_data_size[2]+0x01] = (ti85_calculate_checksum(ti85serial->backup_file_data+0x37, 0x42+ti85serial->backup_data_size[0]+ti85serial->backup_data_size[1]+ti85serial->backup_data_size[2]+0x06-0x37)&0xff00)>>8; |
| 1033 | 1033 | sprintf (backup_file_name, "%08d.85b", ti85serial->backup_file_number); |
| 1034 | | filerr = mame_fopen(SEARCHPATH_IMAGE, backup_file_name, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &backup_file); |
| 1034 | filerr = mame_fopen(NULL, backup_file_name, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &backup_file); |
| 1035 | 1035 | if (filerr == FILERR_NONE) |
| 1036 | 1036 | { |
| 1037 | 1037 | mame_fwrite(backup_file, ti85serial->backup_file_data, 0x42+0x06+ti85serial->backup_data_size[0]+ti85serial->backup_data_size[1]+ti85serial->backup_data_size[2]+0x02); |
| r9664 | r9665 | |
| 1095 | 1095 | { |
| 1096 | 1096 | ti85_convert_stream_to_data (ti85serial->receive_buffer, 1030*8, ti85serial->receive_data); |
| 1097 | 1097 | sprintf (image_file_name, "%08d.85i", ti85serial->image_file_number); |
| 1098 | | filerr = mame_fopen(SEARCHPATH_IMAGE, image_file_name, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &image_file); |
| 1098 | filerr = mame_fopen(NULL, image_file_name, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &image_file); |
| 1099 | 1099 | if (filerr == FILERR_NONE) |
| 1100 | 1100 | { |
| 1101 | 1101 | image_file_data = (UINT8*)malloc (0x49+1008); |