| 10297 | } |
| 10298 | |
| 10299 | int main(int argc, char *argv[]) |
| 10300 | { |
| 10301 | init_table68k(); |
| 10302 | |
| 10303 | opcode_map = xmalloc (int, nr_cpuop_funcs); |
| 10304 | opcode_last_postfix = xmalloc (int, nr_cpuop_funcs); |
| 10305 | opcode_next_clev = xmalloc (int, nr_cpuop_funcs); |
| 10306 | counts = xmalloc (unsigned long, 65536); |
| 10307 | read_counts(); |
| 10308 | |
| 10309 | /* It would be a lot nicer to put all in one file (we'd also get rid of |
| 10310 | * cputbl.h that way), but cpuopti can't cope. That could be fixed, but |
| 10311 | * I don't dare to touch the 68k version. */ |
| 10312 | |
| 10313 | #if CPU_TESTER |
| 10314 | |
| 10315 | using_test = 1; |
| 10316 | headerfile = fopen("cputbl_test.h", "wb"); |
| 10317 | stblfile = fopen("cpustbl_test.cpp", "wb"); |
| 10318 | generate_stbl = 1; |
| 10319 | generate_cpu_test(0); |
| 10320 | generate_cpu_test(1); |
| 10321 | generate_cpu_test(2); |
| 10322 | generate_cpu_test(3); |
| 10323 | generate_cpu_test(4); |
| 10324 | generate_cpu_test(5); |
| 10325 | |
| 10326 | #else |
| 10327 | |
| 10328 | using_debugmem = 1; |
| 10329 | |
| 10330 | headerfile = fopen("cputbl.h", "wb"); |
| 10331 | |
| 10332 | fprintf(headerfile, "#define HARDWARE_BUS_ERROR_EMULATION %d\n", using_bus_error); |
| 10333 | |
| 10334 | stblfile = fopen("cpustbl.cpp", "wb"); |
| 10335 | generate_includes(stblfile, 0); |
| 10336 | |
| 10337 | for (int i = 0; i <= 55; i++) { |
| 10338 | if ((i >= 6 && i < 11) || (i > 14 && i < 20) || (i > 25 && i < 31) || (i > 35 && i < 40)) |
| 10339 | continue; |
| 10340 | generate_stbl = 1; |
| 10341 | generate_cpu (i, 0); |
| 10342 | } |
| 10343 | |
| 10344 | #endif |
| 10345 | |
| 10346 | free (table68k); |
| 10347 | return 0; |
| 10348 | } |
| 10349 | |
| 10350 | void write_log (const TCHAR *format,...) |
| 10351 | { |
nothing calls this directly
no test coverage detected