--- xmil/pccore.c 2004/08/12 20:09:42 1.26 +++ xmil/pccore.c 2004/08/17 14:46:37 1.33 @@ -36,8 +36,8 @@ const OEMCHAR xmilversion[] = OEMTEXT(XM #if defined(SUPPORT_BANKMEM) UINT8 mBANK[16][0x8000]; #endif - BYTE *RAM0r; - BYTE *RAM0w; + UINT8 *RAM0r; + UINT8 *RAM0w; // ---- @@ -173,28 +173,10 @@ void iptrace_out(void) { } #endif -#if 0 -UINT pccore_getraster(UINT *h) { - - SINT32 work; - UINT vl; - - work = nevent_getwork(NEVENT_FRAMES); - vl = work / 250; - if (h) { - *h = work - (vl * 250); - } - if (corestat.vsync) { - vl += corestat.vl; - } - return(vl); -} -#endif void neitem_disp(UINT id) { corestat.vsync = 1; - pcg.r.vsync = 1; if (xmilcfg.DISPSYNC & 1) { scrnupdate(); } @@ -208,17 +190,22 @@ void neitem_vsync(UINT id) { } +// ---- + // #define SINGLESTEPONLY + void pccore_exec(BRESULT draw) { SINT32 frameclock; SINT32 dispclock; corestat.drawframe = draw; + pal_eventclear(); soundmng_sync(); - frameclock = 266 * RASTER_CLOCK * pccore.multiple / 2; + timing_setrate(crtc.e.frameclock); + frameclock = crtc.e.frameclock * pccore.multiple / 2; dispclock = min(frameclock, crtc.e.dispclock); corestat.dispclock = dispclock; corestat.syncclock = frameclock - dispclock; @@ -231,7 +218,7 @@ void pccore_exec(BRESULT draw) { } #else while(CPU_REMCLOCK > 0) { - TRACEOUT(("%.4x", Z80_PC)); + // TRACEOUT(("%.4x", Z80_PC)); #if defined(TRACE) && IPTRACE treip[trpos & (IPTRACE - 1)] = Z80_PC; trpos++; @@ -245,5 +232,6 @@ void pccore_exec(BRESULT draw) { scrnupdate(); sound_sync(); + fdc_callback(); }