Mercurial > repos > blastem
comparison blastem.c @ 430:7f84090ab1cd
Add config file parser and default config file
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 10 Jul 2013 09:38:05 -0700 |
parents | 8b3ae850d1c4 |
children | ed4d0017c041 |
comparison
equal
deleted
inserted
replaced
429:f6fdde540791 | 430:7f84090ab1cd |
---|---|
32 uint8_t z80_ram[Z80_RAM_BYTES]; | 32 uint8_t z80_ram[Z80_RAM_BYTES]; |
33 | 33 |
34 int headless = 0; | 34 int headless = 0; |
35 int z80_enabled = 1; | 35 int z80_enabled = 1; |
36 int frame_limit = 0; | 36 int frame_limit = 0; |
37 | |
38 tern_node * config; | |
37 | 39 |
38 #ifndef MIN | 40 #ifndef MIN |
39 #define MIN(a,b) ((a) < (b) ? (a) : (b)) | 41 #define MIN(a,b) ((a) < (b) ? (a) : (b)) |
40 #endif | 42 #endif |
41 | 43 |
1869 } | 1871 } |
1870 | 1872 |
1871 int main(int argc, char ** argv) | 1873 int main(int argc, char ** argv) |
1872 { | 1874 { |
1873 if (argc < 2) { | 1875 if (argc < 2) { |
1874 fputs("Usage: blastem FILENAME\n", stderr); | 1876 fputs("Usage: blastem FILENAME [options]\n", stderr); |
1875 return 1; | 1877 return 1; |
1876 } | 1878 } |
1877 if(!load_rom(argv[1])) { | 1879 if(!load_rom(argv[1])) { |
1878 fprintf(stderr, "Failed to open %s for reading\n", argv[1]); | 1880 fprintf(stderr, "Failed to open %s for reading\n", argv[1]); |
1879 return 1; | 1881 return 1; |
1880 } | 1882 } |
1883 config = load_config(argv[0]); | |
1881 detect_region(); | 1884 detect_region(); |
1882 int width = -1; | 1885 int width = -1; |
1883 int height = -1; | 1886 int height = -1; |
1884 int debug = 0; | 1887 int debug = 0; |
1885 int ym_log = 0; | 1888 int ym_log = 0; |