Mercurial > repos > blastem
comparison gst.c @ 2280:9ead0fe69d9b
Implement savestate support for Sega CD
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 08 Jan 2023 14:42:24 -0800 |
parents | f699f9d500b4 |
children | d44fe974fb85 |
comparison
equal
deleted
inserted
replaced
2279:3b5fef896475 | 2280:9ead0fe69d9b |
---|---|
410 return 0; | 410 return 0; |
411 } | 411 } |
412 return 1; | 412 return 1; |
413 } | 413 } |
414 | 414 |
415 #include "m68k_internal.h" //needed for get_native_address_trans, should be eliminated once handling of PC is cleaned up | |
415 uint32_t load_gst(genesis_context * gen, char * fname) | 416 uint32_t load_gst(genesis_context * gen, char * fname) |
416 { | 417 { |
417 char buffer[4096]; | 418 char buffer[4096]; |
418 FILE * gstfile = fopen(fname, "rb"); | 419 FILE * gstfile = fopen(fname, "rb"); |
419 if (!gstfile) { | 420 if (!gstfile) { |
459 m68k_handle_code_write(0xFF0000 | (i << 1), gen->m68k); | 460 m68k_handle_code_write(0xFF0000 | (i << 1), gen->m68k); |
460 } | 461 } |
461 i++; | 462 i++; |
462 } | 463 } |
463 } | 464 } |
465 gen->m68k->resume_pc = get_native_address_trans(gen->m68k, pc); | |
464 fclose(gstfile); | 466 fclose(gstfile); |
465 return pc; | 467 return pc; |
466 | 468 |
467 error_close: | 469 error_close: |
468 fclose(gstfile); | 470 fclose(gstfile); |