- if (PicoOpt&POPT_EN_FM) {\r
- // we have ym2612 enabled, so we have to run Z80 in lines, so we could update DAC and timers\r
- for (line = line_from; line < line_to; line++) {\r
- Psnd_timers_and_dac(line);\r
- if ((line == 224 || line == line_sample) && PsndOut) getSamples(line);\r
- if (line == 32 && PsndOut) emustatus &= ~1;\r
- if (line >= line_from_r && line < line_to_r)\r
- z80_run_nr(228);\r
- }\r
- } else if (line_to_r-line_from_r > 0) {\r
- z80_run_nr(228*(line_to_r-line_from_r));\r
- // samples will be taken by caller\r
- }\r
+ elprintf(EL_ANOMALY, "z80 sync %i (%i|%i -> %i|%i)", cnt, z80_cycle_cnt, z80_cycle_cnt / 228,\r
+ z80_cycle_aim, z80_cycle_aim / 228);\r
+\r
+ if (cnt > 0)\r
+ z80_cycle_cnt += z80_run(cnt);\r