diff options
Diffstat (limited to 'gst.c')
-rw-r--r-- | gst.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -144,6 +144,7 @@ uint8_t z80_load_gst(z80_context * context, FILE * gstfile) } uint8_t * curpos = regdata; uint8_t f = *(curpos++); +#ifndef NEW_CORE context->flags[ZF_C] = f & 1; f >>= 1; context->flags[ZF_N] = f & 1; @@ -200,6 +201,7 @@ uint8_t z80_load_gst(z80_context * context, FILE * gstfile) context->mem_pointers[1] = NULL; } context->bank_reg = bank >> 15; +#endif uint8_t buffer[Z80_RAM_BYTES]; fseek(gstfile, GST_Z80_RAM, SEEK_SET); if(fread(buffer, 1, sizeof(buffer), gstfile) != (8*1024)) { @@ -210,11 +212,15 @@ uint8_t z80_load_gst(z80_context * context, FILE * gstfile) { if (context->mem_pointers[0][i] != buffer[i]) { context->mem_pointers[0][i] = buffer[i]; +#ifndef NEW_CORE z80_handle_code_write(i, context); +#endif } } +#ifndef NEW_CORE context->native_pc = NULL; context->extra_pc = NULL; +#endif return 1; } @@ -296,6 +302,7 @@ uint8_t z80_save_gst(z80_context * context, FILE * gstfile) uint8_t regdata[GST_Z80_REG_SIZE]; uint8_t * curpos = regdata; memset(regdata, 0, sizeof(regdata)); +#ifndef NEW_CORE uint8_t f = context->flags[ZF_S]; f <<= 1; f |= context->flags[ZF_Z] ; @@ -348,6 +355,7 @@ uint8_t z80_save_gst(z80_context * context, FILE * gstfile) curpos += 3; uint32_t bank = context->bank_reg << 15; write_le_32(curpos, bank); +#endif fseek(gstfile, GST_Z80_REGS, SEEK_SET); if (fwrite(regdata, 1, sizeof(regdata), gstfile) != sizeof(regdata)) { return 0; |