comparison blastem.c @ 752:296ddfcf0d43

Minor cleanup in init_run_cpu
author Michael Pavone <pavone@retrodev.com>
date Mon, 22 Jun 2015 22:00:44 -0700
parents 535e97bad27f
children cee1275f5d08
comparison
equal deleted inserted replaced
751:cf09b189a0ca 752:296ddfcf0d43
1037 //work RAM 1037 //work RAM
1038 context->mem_pointers[1] = ram; 1038 context->mem_pointers[1] = ram;
1039 //save RAM/map 1039 //save RAM/map
1040 context->mem_pointers[2] = initial_mapped; 1040 context->mem_pointers[2] = initial_mapped;
1041 context->mem_pointers[3] = (uint16_t *)gen->save_ram; 1041 context->mem_pointers[3] = (uint16_t *)gen->save_ram;
1042 uint32_t address; 1042
1043 address = cart[2] << 16 | cart[3];
1044 translate_m68k_stream(address, context);
1045 if (statefile) { 1043 if (statefile) {
1046 uint32_t pc = load_gst(gen, statefile); 1044 uint32_t pc = load_gst(gen, statefile);
1047 if (!pc) { 1045 if (!pc) {
1048 fprintf(stderr, "Failed to load save state %s\n", statefile); 1046 fprintf(stderr, "Failed to load save state %s\n", statefile);
1049 exit(1); 1047 exit(1);
1054 } 1052 }
1055 adjust_int_cycle(gen->m68k, gen->vdp); 1053 adjust_int_cycle(gen->m68k, gen->vdp);
1056 start_68k_context(context, pc); 1054 start_68k_context(context, pc);
1057 } else { 1055 } else {
1058 if (debugger) { 1056 if (debugger) {
1057 uint32_t address = cart[2] << 16 | cart[3];
1059 insert_breakpoint(context, address, debugger); 1058 insert_breakpoint(context, address, debugger);
1060 } 1059 }
1061 m68k_reset(context); 1060 m68k_reset(context);
1062 } 1061 }
1063 } 1062 }