/[gxemul]/trunk/src/emul_parse.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/emul_parse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11 by dpavlin, Mon Oct 8 16:18:27 2007 UTC revision 12 by dpavlin, Mon Oct 8 16:18:38 2007 UTC
# Line 25  Line 25 
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   *   *
# Line 228  static char cur_machine_n_gfx_cards[10]; Line 228  static char cur_machine_n_gfx_cards[10];
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];
# Line 385  static void parse__emul(struct emul *e, Line 386  static void parse__emul(struct emul *e,
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    
# Line 555  static void parse__machine(struct emul * Line 557  static void parse__machine(struct emul *
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)
# Line 605  static void parse__machine(struct emul * Line 604  static void parse__machine(struct emul *
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 {
# Line 688  static void parse__machine(struct emul * Line 697  static void parse__machine(struct emul *
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) {

Legend:
Removed from v.11  
changed lines
  Added in v.12

  ViewVC Help
Powered by ViewVC 1.1.26