--- hatari/src/falcon/dsp.c 2019/04/09 08:57:00 1.1.1.12 +++ hatari/src/falcon/dsp.c 2019/04/09 08:59:31 1.1.1.14 @@ -16,8 +16,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with this program; if not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ #include @@ -233,29 +233,32 @@ void DSP_Run(int nHostCycles) DSP_CyclesGlobalClockCounter = CyclesGlobalClockCounter; - save_cycles += nHostCycles * 2; + save_cycles += nHostCycles * 2; - if (dsp_core.running == 0) - return; + if (dsp_core.running == 0) + return; - if (save_cycles <= 0) - return; + if (save_cycles <= 0) + return; - if (unlikely(bDspDebugging)) { - while (save_cycles > 0) - { - dsp56k_execute_instruction(); - save_cycles -= dsp_core.instr_cycle; - DebugDsp_Check(); - } - } else { - // fprintf(stderr, "--> %d\n", save_cycles); - while (save_cycles > 0) - { - dsp56k_execute_instruction(); - save_cycles -= dsp_core.instr_cycle; - } - } + if (unlikely(bDspDebugging)) + { + while (save_cycles > 0) + { + dsp56k_execute_instruction(); + save_cycles -= dsp_core.instr_cycle; + DebugDsp_Check(); + } + } + else + { + // fprintf(stderr, "--> %d\n", save_cycles); + while (save_cycles > 0) + { + dsp56k_execute_instruction(); + save_cycles -= dsp_core.instr_cycle; + } + } #endif } @@ -835,7 +838,7 @@ void DSP_HandleReadAccess(void) value = 0xff; #endif if (multi_access == true) - M68000_AddCycles(4); + M68000_WaitState(4); multi_access = true; Dprintf(("HWget_b(0x%08x)=0x%02x at 0x%08x\n", addr, value, m68k_getpc())); @@ -861,7 +864,7 @@ void DSP_HandleWriteAccess(void) dsp_core_write_host(addr-DSP_HW_OFFSET, value); #endif if (multi_access == true) - M68000_AddCycles(4); + M68000_WaitState(4); multi_access = true; } }