X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fsek.c;h=85bfd2873e7b439c318065e3d4632f563b1d8b9b;hb=9c9cda8c39bd2a6b99b8420a3034c454bc713954;hp=bc44c476651123ba1fd6d63962a8cb7e2f0ab4aa;hpb=b4db550e41b2aa277f570d7bff890c8e8ee1831f;p=picodrive.git diff --git a/pico/sek.c b/pico/sek.c index bc44c47..85bfd28 100644 --- a/pico/sek.c +++ b/pico/sek.c @@ -1,11 +1,11 @@ -// This is part of Pico Library - -// (c) Copyright 2004 Dave, All rights reserved. -// (c) Copyright 2006 notaz, All rights reserved. -// Free for non-commercial use. - -// For commercial use, separate licencing terms must be obtained. - +/* + * PicoDrive + * (c) Copyright Dave, 2004 + * (C) notaz, 2006-2009 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include "pico_int.h" #include "memory.h" @@ -219,7 +219,8 @@ PICO_INTERNAL void SekPackCpu(unsigned char *cpu, int is_sub) cpu[0x4d] = (context->execinfo & FM68K_HALTED) ? 1 : 0; #endif - *(unsigned int *)(cpu+0x40)=pc; + *(unsigned int *)(cpu+0x40) = pc; + *(unsigned int *)(cpu+0x50) = SekCycleCntT; } PICO_INTERNAL void SekUnpackCpu(const unsigned char *cpu, int is_sub) @@ -256,12 +257,13 @@ PICO_INTERNAL void SekUnpackCpu(const unsigned char *cpu, int is_sub) context->execinfo &= ~FM68K_HALTED; if (cpu[0x4d]&1) context->execinfo |= FM68K_HALTED; #endif + SekCycleCntT = *(unsigned int *)(cpu+0x50); } /* idle loop detection, not to be used in CD mode */ #ifdef EMU_C68K -#include "cpu/Cyclone/tools/idle.h" +#include "cpu/cyclone/tools/idle.h" #endif static unsigned short **idledet_ptrs = NULL;