changeset 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 747c779fc137
files gst.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gst.c	Wed Aug 09 23:26:51 2017 -0700
+++ b/gst.c	Wed Aug 09 23:33:16 2017 -0700
@@ -236,7 +236,7 @@
 	}
 	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);