Commit Graph

60 Commits

Author SHA1 Message Date
Aaron Culliney
c39bea9580 Partial fix debugger for multithreaded environment
* Fixes crashing observed when trying to use debugger

    * Various refactoring whitespace fixes
2013-10-06 21:01:00 -07:00
Aaron Culliney
527c04e41f Support for new timing model
This is part 2 of 2

    * Handles UI changes to support new delay model, added ability to toggle to
      alternate speed scale

    * Code cleanups
2013-10-06 01:31:58 -07:00
Aaron Culliney
41a1f3d598 Timing model back to nanosleep for sound fidelity
This is part 1 of 2

    * Proper emulator timing is critical for emulating the Apple2 speaker with a
      square wave on a modern soundcard.  The AppleWin sources provided
      reference, inspiration, and source for both timing and speaker emulation
      code.

    * cpu.S, cpu.h, timing.c : OK so I flip-flopped quite a bit here on how best
      to do proper emulator timing, but the previous spinloop implementation was
      not one of my more enlightened decisions :P ... cpu/power consumption
      nightmare ...

    * ds-shim.h, win-shim.h -- Shims for Windows-isms and DirectSound-isms.  I
      assume these will eventually be refactored away...

    * soundcore.[hc], speaker.[hc] -- Directly ported from a recent version of
      AppleWin.  Everything I've added should be braced with #ifdef APPLE2IX.

    * soundcore-alsa.[hc] -- An ALSA backend using mmap'ed soundcard access.
2013-10-05 23:33:18 -07:00
Aaron Culliney
1f9a1778b9 spinloop timing that seeks to directly match apple speed 2013-07-25 22:58:31 -07:00
Aaron Culliney
980bcc627d WIP : dynamically adjustable spinloop 2013-07-23 00:33:29 -07:00
Aaron Culliney
96d083a2c3 WIP: changes to cpu throttling/timing
WARN: this is still a WIP and untested.  Instead of nanosleep() the cpu thread
now uses an adaptive spinloop.  This better emulates the actual apple //e speed
in preparation to do near-realtime audio.  The drawback is that the cpu thread
is pegged at 100% usage.
2013-07-21 17:20:03 -07:00
Aaron Culliney
d599a2174a refactoring for clarity and adding cycle timing 2013-07-07 20:52:30 -07:00
Aaron Culliney
e919718b73 an uncrustify pass and uncrustify config file 2013-07-05 21:37:13 -07:00
Aaron Culliney
18c3f5f698 we no longer use timers with setitimer and SIGVTALRM, that's so nineties...
instead spin off a cpu_thread and have it ping the main render thread as needed
2013-07-02 01:10:57 -07:00
Aaron Culliney
8bd46f494f new cpu throttling routine 2013-06-27 23:36:25 -07:00