Commit Graph

1308 Commits

Author SHA1 Message Date
Aaron Culliney
a6d4f2ccf5 Change some deadc0de ...
* Currently the SSI263 thread is disabled (not even initialized in MB_DSInit()
    * Do we need this stuff?  Methinks we do, yet we don't have a testcase of
      needing it (MB C in 4 & 5 --or-- Phasor in 4 works fine with U5) Wtf?
2013-11-18 22:08:51 -08:00
Aaron Culliney
9aafb2c659 Disable mockingboard thread for now
* The MB thread is currently a resource pig and doesn't appear to be needed
      if we're emulating 2 "C"-type cards in slot 4/5
2013-11-17 16:13:33 -08:00
Aaron Culliney
f210372302 Some OpenAL cleanup
* soundcore-openal.c : Get the OpenAL state only right after queueing buffer (and restart OpenAL if needed)
    * soundcore-openal.c : Handle buffer underruns
    * elsewhere : No longer call DSZero...
2013-11-17 16:10:52 -08:00
Aaron Culliney
0bdfe53395 reduce buffer size for speaker
* this allows for better latency with the 22050Hz sample rate
    * keep the mockingboard at the same buffersize to prevent underruns (latency handled differently there)
2013-11-17 15:53:32 -08:00
Aaron Culliney
bbf3205415 more timing statistics 2013-11-17 15:01:23 -08:00
Aaron Culliney
c0a3df6a2f allow setting speaker volume by sample amplitude 2013-11-17 11:20:26 -08:00
Aaron Culliney
38e95294b6 Decrease audio sample rate to fix mockingboard
* This seems to fix certain OpenAL underflow issues with mockingboard for U5
    * Curiously overflow issues with mockingboard don't appear to glitch ...
2013-11-16 18:31:23 -08:00
Aaron Culliney
e0a79c7c3a pause/unpause audio when enter/exit menus 2013-11-16 13:44:32 -08:00
Aaron Culliney
078391410d functions to pause/unpause all audio 2013-11-16 13:43:10 -08:00
Aaron Culliney
b580ff9269 ignore vim swapfiles 2013-11-16 12:42:17 -08:00
Aaron Culliney
cdb7befe8e fix cursor position in interface parameters menu 2013-11-16 11:19:51 -08:00
Aaron Culliney
679d119486 Merge branch 'mockingboard'
Conflicts:
	src/cpu.S
	src/misc.c
2013-11-12 23:45:05 -08:00
Aaron Culliney
766d278601 First cut at supporting mockingboard.
* Now using OpenAL as the main backend, ALSA has been deprecated...

    * soundcore-openal.[hc] - OpenAL sound output for emulator

    * alhelpers.[hc] - OpenAL suport files

    * mockingboard.[hc] , AY8910.[hc] , SSI263Phonemes.h - Mockingboard support ported from AppleWin ...
2013-11-12 23:43:16 -08:00
Aaron Culliney
68fd7ec8f6 refactoring : renaming certain disk funcs/params 2013-11-05 22:05:58 -08:00
Aaron Culliney
1eb8f759d7 BRK instruction adjustment
* Changes from AppleWin ... set Break and Xtra for pushed flags
    * Late set Interrupt flag for current flags (should be unchanged)
2013-11-05 22:03:55 -08:00
Aaron Culliney
4beb6d679d include uthash.h 2013-11-02 20:38:29 -07:00
Aaron Culliney
693b9d31bf Support for multiple sound buffers/voices
* In preparation for adding mockingboard support
    * NOTE: ALSA still has a hardcoded 1 buffer assumption with its use of mmapped access
2013-10-22 21:22:43 -07:00
Aaron Culliney
06c6fd9feb don't redefine if defined already 2013-10-22 21:18:03 -07:00
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
0f26899420 macro refactoring for clarity [sic] 2013-10-05 23:13:24 -07:00
Aaron Culliney
a063669cb8 Add speaker and soundcore targets 2013-10-05 22:51:42 -07:00
Aaron Culliney
3946cc52d0 renamed for clarity 2013-09-15 09:09:29 -07:00
Aaron Culliney
0e81927f5b bugfix: save/restore state before C routine 2013-09-15 09:07:36 -07:00
Aaron Culliney
b0236992d2 style cleanups and an ERRQUIT 2013-09-12 20:47:00 -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
da3a78a295 bugfix 2013-07-22 23:49:01 -07:00
Aaron Culliney
319a980254 Default all UNK opcodes to 2 cycles 2013-07-22 22:22:48 -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
ae6790ab97 debug logging support 2013-07-07 14:01:21 -07:00
Aaron Culliney
e70a1ef620 misc cleanups 2013-07-07 13:16:08 -07:00
Aaron Culliney
170fbf57f3 unnecessary pushes/pops 2013-07-07 13:13:15 -07:00
Aaron Culliney
5f50068fcd better random 2013-07-07 13:07:26 -07:00
Aaron Culliney
8a4f8284b1 remove extraneous comments
believe these are fixed, it's been a decade :-)
2013-07-06 21:19:50 -07:00
Aaron Culliney
b03a8e6fd8 always support //e 2013-07-06 16:04:36 -07:00
Aaron Culliney
f5d1735f28 more whitespace changes for sanity and righteousness! 2013-07-05 23:08:55 -07:00
Aaron Culliney
6d9aa66c01 whitespace changes for sanity and righteousness! 2013-07-05 22:44:57 -07:00
Aaron Culliney
f462f79708 remove compact.c for simplicity 2013-07-05 21:46:58 -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
c51018a2bb we no longer do tight decrement loop to artifically throttle emulation speed.
instead call into a timing function to properly throttle the speed to the target MHz
2013-07-02 01:04:55 -07:00
Aaron Culliney
6c500cad0b no longer support building to SVGAlib 2013-07-02 01:02:54 -07:00
Aaron Culliney
c0f38b902b add timing.[ch] to Makefile 2013-07-02 00:57:21 -07:00
Aaron Culliney
8bd46f494f new cpu throttling routine 2013-06-27 23:36:25 -07:00
Aaron Culliney
55cb51359e WIP 2013-06-24 23:21:03 -07:00
Aaron Culliney
faa279f075 Get it compiling and running with 32bit TrueColor 2013-06-24 23:14:39 -07:00
Aaron Culliney
a57b7c129a usleep is now backed with nanosleep 2013-06-24 23:06:09 -07:00