25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: emul_parse.c,v 1.32 2005/06/24 09:33:34 debug Exp $ |
* $Id: emul_parse.c,v 1.33 2005/08/12 06:02:56 debug Exp $ |
29 |
* |
* |
30 |
* Set up an emulation by parsing a config file. |
* Set up an emulation by parsing a config file. |
31 |
* |
* |
228 |
static char cur_machine_serial_nr[10]; |
static char cur_machine_serial_nr[10]; |
229 |
static char cur_machine_emulated_hz[10]; |
static char cur_machine_emulated_hz[10]; |
230 |
static char cur_machine_memory[10]; |
static char cur_machine_memory[10]; |
231 |
|
static char cur_machine_max_random_cycles[10]; |
232 |
#define MAX_N_LOAD 15 |
#define MAX_N_LOAD 15 |
233 |
#define MAX_LOAD_LEN 2000 |
#define MAX_LOAD_LEN 2000 |
234 |
static char *cur_machine_load[MAX_N_LOAD]; |
static char *cur_machine_load[MAX_N_LOAD]; |
386 |
cur_machine_serial_nr[0] = '\0'; |
cur_machine_serial_nr[0] = '\0'; |
387 |
cur_machine_emulated_hz[0] = '\0'; |
cur_machine_emulated_hz[0] = '\0'; |
388 |
cur_machine_memory[0] = '\0'; |
cur_machine_memory[0] = '\0'; |
389 |
|
cur_machine_max_random_cycles[0] = '\0'; |
390 |
return; |
return; |
391 |
} |
} |
392 |
|
|
557 |
sizeof(cur_machine_old_bintrans)); |
sizeof(cur_machine_old_bintrans)); |
558 |
m->old_bintrans_enable = parse_on_off(cur_machine_old_bintrans); |
m->old_bintrans_enable = parse_on_off(cur_machine_old_bintrans); |
559 |
|
|
560 |
if (!m->bintrans_enable && m->old_bintrans_enable) { |
if (!m->bintrans_enable && m->old_bintrans_enable) |
561 |
fatal("cannot use old bintrans when bintrans is" |
m->old_bintrans_enable = 0; |
|
" disabled.\n"); |
|
|
exit(1); |
|
|
} |
|
562 |
|
|
563 |
/* TODO: Hm... */ |
/* TODO: Hm... */ |
564 |
if (m->bintrans_enable) |
if (m->bintrans_enable) |
604 |
sizeof(cur_machine_memory)); |
sizeof(cur_machine_memory)); |
605 |
m->physical_ram_in_mb = atoi(cur_machine_memory); |
m->physical_ram_in_mb = atoi(cur_machine_memory); |
606 |
|
|
607 |
|
if (cur_machine_max_random_cycles[0]) { |
608 |
|
if (m->bintrans_enable) { |
609 |
|
fprintf(stderr, "max_random_cycles doesn't" |
610 |
|
" work with bintrans\n"); |
611 |
|
exit(1); |
612 |
|
} |
613 |
|
m->max_random_cycles_per_chunk = atoi( |
614 |
|
cur_machine_max_random_cycles); |
615 |
|
} |
616 |
|
|
617 |
if (!cur_machine_x11_scaledown[0]) |
if (!cur_machine_x11_scaledown[0]) |
618 |
m->x11_scaledown = 1; |
m->x11_scaledown = 1; |
619 |
else { |
else { |
697 |
WORD("n_gfx_cards", cur_machine_n_gfx_cards); |
WORD("n_gfx_cards", cur_machine_n_gfx_cards); |
698 |
WORD("emulated_hz", cur_machine_emulated_hz); |
WORD("emulated_hz", cur_machine_emulated_hz); |
699 |
WORD("memory", cur_machine_memory); |
WORD("memory", cur_machine_memory); |
700 |
|
WORD("max_random_cycles", cur_machine_max_random_cycles); |
701 |
WORD("start_paused", cur_machine_start_paused); |
WORD("start_paused", cur_machine_start_paused); |
702 |
|
|
703 |
if (strcmp(word, "load") == 0) { |
if (strcmp(word, "load") == 0) { |