diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-05-28 21:19:55 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-05-28 21:19:55 -0700 |
commit | ef033e39c170fe272a956b1417f217a0d3cce29c (patch) | |
tree | 0ca08ba1614e87cee73f4904ea362928565b2531 /gst.c | |
parent | 632c82bd63a13da242c90a5d93dfe7482a0bebe6 (diff) | |
parent | 6817ef558d165b50a9b08a337dd93c4f1f46304e (diff) |
Merge windows branch with latest changes
Diffstat (limited to 'gst.c')
-rw-r--r-- | gst.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,6 +1,6 @@ /* Copyright 2013 Michael Pavone - This file is part of BlastEm. + This file is part of BlastEm. BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. */ #include "gst.h" @@ -207,8 +207,8 @@ uint8_t z80_load_gst(z80_context * context, FILE * gstfile) curpos += 2; context->iff1 = context->iff2 = *curpos; curpos += 2; - reset = !*(curpos++); - busreq = *curpos; + context->reset = !*(curpos++); + context->busreq = *curpos; curpos += 3; uint32_t bank = read_le_32(curpos); if (bank < 0x400000) { @@ -350,8 +350,8 @@ uint8_t z80_save_gst(z80_context * context, FILE * gstfile) curpos += 2; *curpos = context->iff1; curpos += 2; - *(curpos++) = !reset; - *curpos = busreq; + *(curpos++) = !context->reset; + *curpos = context->busreq; curpos += 3; uint32_t bank = context->bank_reg << 15; write_le_32(curpos, bank); @@ -423,7 +423,7 @@ uint32_t load_gst(genesis_context * gen, char * fname) fprintf(stderr, "Could not read ident code from %s\n", fname); goto error_close; } - if (memcmp(ident, "GST\x40\xE0", 5) != 0) { + if (memcmp(ident, "GST\x40\xE0", 3) != 0) { fprintf(stderr, "%s doesn't appear to be a GST savestate. The ident code is %c%c%c\\x%X\\x%X instead of GST\\x40\\xE0.\n", fname, ident[0], ident[1], ident[2], ident[3], ident[4]); goto error_close; } |