summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-08-09 23:33:16 -0700
committerMichael Pavone <pavone@retrodev.com>2017-08-09 23:33:16 -0700
commit86fab36b7a64f1c25f338be4a78e775a306dc783 (patch)
tree1e7cfc11dc47072d4e51c2573a8d9cdf874dc572
parent5b2b37e775d719fc055ef5e8e59cf965a8049e11 (diff)
write_cram_internal takes a CRAM index, not a CRAM address
-rw-r--r--gst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst.c b/gst.c
index c74dab2..4a9b348 100644
--- a/gst.c
+++ b/gst.c
@@ -236,7 +236,7 @@ uint8_t vdp_load_gst(vdp_context * context, FILE * state_file)
}
for (int i = 0; i < CRAM_SIZE; i++) {
uint16_t value;
- write_cram_internal(context, i*2, (tmp_buf[i*2+1] << 8) | tmp_buf[i*2]);
+ write_cram_internal(context, i, (tmp_buf[i*2+1] << 8) | tmp_buf[i*2]);
}
if (fread(tmp_buf, 2, VSRAM_SIZE, state_file) != VSRAM_SIZE) {
fputs("Failed to read VSRAM from savestate\n", stderr);