comparison vdp.c @ 1019:e34334e6c682

Fix GST savestate loading to deal with SAT cache to fix sprite corruption on savestate load. Clear out Z80 native_pc so the Z80 state does not get hosed when loading a savestate while the emulator is already running
author Michael Pavone <pavone@retrodev.com>
date Mon, 02 May 2016 23:08:20 -0700
parents 1dc749c9c0d9
children 4263dc9cf86d
comparison
equal deleted inserted replaced
1018:dba8c630bdbf 1019:e34334e6c682
516 if (!dma_len) { 516 if (!dma_len) {
517 context->flags &= ~FLAG_DMA_RUN; 517 context->flags &= ~FLAG_DMA_RUN;
518 context->cd &= 0xF; 518 context->cd &= 0xF;
519 } 519 }
520 } 520 }
521 #include <assert.h> 521
522 void write_vram_byte(vdp_context *context, uint16_t address, uint8_t value) 522 void write_vram_byte(vdp_context *context, uint16_t address, uint8_t value)
523 { 523 {
524 if (!(address & 4)) { 524 if (!(address & 4)) {
525 uint16_t sat_address = (context->regs[REG_SAT] & 0x7F) << 9; 525 uint16_t sat_address = (context->regs[REG_SAT] & 0x7F) << 9;
526 if(address >= sat_address && address < (sat_address + SAT_CACHE_SIZE*2)) { 526 if(address >= sat_address && address < (sat_address + SAT_CACHE_SIZE*2)) {