Mercurial > repos > blastem
comparison gst.c @ 1429:7e67f8a37051
write_cram_internal takes a CRAM index, not a CRAM address
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 09 Aug 2017 23:33:16 -0700 |
parents | 2540c05520f2 |
children | d6d4c006a7b3 |
comparison
equal
deleted
inserted
replaced
1428:2540c05520f2 | 1429:7e67f8a37051 |
---|---|
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_internal(context, i*2, (tmp_buf[i*2+1] << 8) | tmp_buf[i*2]); | 239 write_cram_internal(context, i, (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 } |