comparison gst.c @ 1428:2540c05520f2

New savestates are working. New config file option for selecting format states will be saved in. Mostly complete, needs a little more work before release
author Michael Pavone <pavone@retrodev.com>
date Wed, 09 Aug 2017 23:26:51 -0700
parents 69c25e1188e5
children 7e67f8a37051
comparison
equal deleted inserted replaced
1427:4e5797b3935a 1428:2540c05520f2
234 fputs("Failed to read CRAM from savestate\n", stderr); 234 fputs("Failed to read CRAM from savestate\n", stderr);
235 return 0; 235 return 0;
236 } 236 }
237 for (int i = 0; i < CRAM_SIZE; i++) { 237 for (int i = 0; i < CRAM_SIZE; i++) {
238 uint16_t value; 238 uint16_t value;
239 write_cram(context, i*2, (tmp_buf[i*2+1] << 8) | tmp_buf[i*2]); 239 write_cram_internal(context, i*2, (tmp_buf[i*2+1] << 8) | tmp_buf[i*2]);
240 } 240 }
241 if (fread(tmp_buf, 2, VSRAM_SIZE, state_file) != VSRAM_SIZE) { 241 if (fread(tmp_buf, 2, VSRAM_SIZE, state_file) != VSRAM_SIZE) {
242 fputs("Failed to read VSRAM from savestate\n", stderr); 242 fputs("Failed to read VSRAM from savestate\n", stderr);
243 return 0; 243 return 0;
244 } 244 }