Changeset 1efc42c in buchla-emu for emu/main.c


Ignore:
Timestamp:
07/30/2017 06:18:21 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
c5b6c90
Parents:
caff491
Message:

Load floppy disk image file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emu/main.c

    rcaff491 r1efc42c  
    3838};
    3939
    40 static const char *bios = "bios.abs";
     40const char *bios = "bios.abs";
     41const char *disk = "buchla.disk";
    4142
    4243static void usage(FILE *fh)
    4344{
    44         fprintf(fh, "usage: buchla [-h] [-v comp [-v comp [...]]] [-b bios]\n");
     45        fprintf(fh, "usage: buchla [-h] [-v comp [-v comp [...]]] [-b bios] [-d disk]\n");
    4546        fprintf(fh, "where comp is one of: ");
    4647
     
    6869
    6970                        bios = argv[i];
     71                        continue;
     72                }
     73
     74                if (strcmp(argv[i], "-d") == 0) {
     75                        if (++i == argc) {
     76                                usage(stderr);
     77                                fprintf(stderr, "missing argument to -d\n");
     78                                exit(1);
     79                        }
     80
     81                        disk = argv[i];
    7082                        continue;
    7183                }
     
    111123        sdl_init();
    112124
    113         cpu_loop(bios);
     125        cpu_loop();
    114126
    115127        sdl_quit();
Note: See TracChangeset for help on using the changeset viewer.