Commit Graph

579 Commits

Author SHA1 Message Date
Aaron Culliney
43fa9c9357 REFACTOR : Incremental changes to NDK builds 2015-02-18 23:06:08 -08:00
Aaron Culliney
0d7e81c7d4 Testing does not depend on olde prefs system 2015-02-18 16:17:12 -08:00
Aaron Culliney
1ac7c7e12d Remove OpenSSL dependency, use public source SHA1 2015-02-18 15:54:04 -08:00
Aaron Culliney
fd346ce7eb Break up build to accommodate multiple targets (including test targets) 2015-02-18 12:27:01 -08:00
Aaron Culliney
78325ad469 Silence compiler warning 2015-02-18 11:00:50 -08:00
Aaron Culliney
2a6d889309 test 16bit underflow/overflow in op_JSR and op_RTS 2015-02-18 10:51:26 -08:00
Aaron Culliney
f4bc218bd8 WIP : Misc optims/changes of ARM-variant 65c02 CPU 2015-02-17 20:33:27 -08:00
Aaron Culliney
829ee225e6 Android variant compiles/links 2015-02-17 20:28:23 -08:00
Aaron Culliney
602c2530e6 Stub a touch-based joystick in OpenGL 2015-02-17 20:23:06 -08:00
Aaron Culliney
43b280d3ba REFACTOR : glinput.c -> glutinput.c 2015-02-17 20:13:18 -08:00
Aaron Culliney
abf231711c Get zlib-helpers.c compiling/linking on Android 2015-02-17 20:09:13 -08:00
Aaron Culliney
604a325c6b Default to avoiding use of VAOs
- Default Android NDK does not have appear to have glGenVertexArrays, et al
2015-02-17 19:54:47 -08:00
Aaron Culliney
ada636f245 REFACTOR : migrate common preferences settings into misc.c
- prefs.c code should be unused on Android/iOS
2015-02-17 16:16:34 -08:00
Aaron Culliney
815b6f5a7c REFACTOR : soundcore to use logging macros 2015-02-17 16:14:25 -08:00
Aaron Culliney
0470cb8907 Remove deadc0de since ROMs should be pre-loaded 2015-02-17 16:06:41 -08:00
Aaron Culliney
28aea0bf14 Remove redundant code 2015-02-17 11:06:50 -08:00
Aaron Culliney
c4e3d93fd4 Fix underflow/overflow branch tests 2015-02-16 12:29:08 -08:00
Aaron Culliney
20d3a67db8 Increase testing of CPU branch logic, include 16bit underflow and overflow
- Unlikely that the original Apple //e ever saw this happen in reality?
    - TODO : test with valgrind for invalid code access ...
2015-02-16 12:18:59 -08:00
Aaron Culliney
d8ae71ddb0 WARNING : changes test to accommodate CPU implementation
- TODO : check the Apple //e Bible for this ...
    - Calculates 2-byte branch instructions (Bxx +OFF)--that sit right at page boundary (at 0x..fe 0x..ff)--as 3 cycles
      rather than 4, since PC has already advanced to the new page (matches logic currently in x86/cpu.S
2015-02-16 11:57:33 -08:00
Aaron Culliney
15dd90902c REFACTOR : more common code into macros 2015-02-16 10:28:57 -08:00
Aaron Culliney
5aa4c20249 REFACTOR : style+clarity changes 2015-02-16 09:42:13 -08:00
Aaron Culliney
d9ce113aa0 WIP : Android armeabi target compiles 2015-02-16 08:47:26 -08:00
Aaron Culliney
6439d303a8 Misc build tweaks 2015-02-16 08:47:26 -08:00
Aaron Culliney
35458b2839 Change LOG() macro to accommodate Android logging 2015-02-16 08:47:26 -08:00
Aaron Culliney
a61b7f5c39 properly brace INTERFACE_CLASSIC stuff 2015-02-16 08:47:26 -08:00
Aaron Culliney
1c31c1074d REFACTOR : macro defines into toggles 2015-02-16 08:47:26 -08:00
Aaron Culliney
eced1c9edf WIP : script wrapper for Android ndk-build 2015-02-16 08:47:26 -08:00
Aaron Culliney
00cec0dcae WIP : 65c02 CPU in ARM assembly 2015-02-16 08:47:26 -08:00
Aaron Culliney
6947240d97 Skeleton project for Android NDK 2015-02-16 08:47:26 -08:00
Aaron Culliney
0801050455 REFACTOR : move special case initialization codepath to C 2015-02-16 08:47:26 -08:00
Aaron Culliney
30c09da259 REFACTOR : simplified/streamlined some assembly 2015-02-16 08:47:26 -08:00
Aaron Culliney
12ba31f1af REFACTOR : whitespace, style, remove deadcode, extract code into macro 2015-02-16 08:47:26 -08:00
Aaron Culliney
9a87aa8a3d REFACTOR : migrate stack page offset into altzp configuration 2015-02-16 08:47:26 -08:00
Aaron Culliney
7bd7899325 REFACTOR : brace x86-specific defines, prep for __arm__ 2015-02-16 08:47:26 -08:00
Aaron Culliney
b246baa90d REFACTOR : macro renaming for clarity/readability 2015-02-16 08:47:26 -08:00
Aaron Culliney
cf79056b28 Merge x86-specific apple2.h stuff into cpu-regs.h 2015-02-16 08:47:26 -08:00
Aaron Culliney
cec638b959 Get threaded tests unstuck and rename/shuffle some code 2015-02-16 08:46:29 -08:00
Aaron Culliney
50cd4ac6fe Synchronize timing functions
- Avoids resetting critical speaker variables when CPU thread is churning
    - Moves pthread_* variable ownership into timing.c
2015-02-07 14:34:23 -08:00
Aaron Culliney
21f2665da5 Bump Mac version number 2015-02-06 20:23:26 -08:00
Aaron Culliney
851d22568b Use 32bit counters to avoid overflow
- Previously there were cases where we could overflow cpu65_cycles_to_execute when adding the cycles_speaker_feedback
2015-02-03 22:10:47 -08:00
Aaron Culliney
978011cffa Unstick Mac builds 2015-02-01 15:27:18 -08:00
Aaron Culliney
1cbd426548 removed unused macros 2015-02-01 15:26:50 -08:00
Aaron Culliney
3d8a6ac23d PARTIAL Revert "Faster keyboard read"
This reverts commit 30b8f308c6.
(Generated assembly for apple_ii_64k ARRAY is wrong on Mac).

Conflicts:
	src/vm.c
2015-02-01 15:25:55 -08:00
Aaron Culliney
c332a89738 Don't run finicky or abusive tests by default
- But keep them around for such times as when we're not sure why a particular emulated program is not working =)
2015-01-31 14:27:13 -08:00
Aaron Culliney
eb534e17b5 Get CPU tests working again 2015-01-31 14:26:45 -08:00
Aaron Culliney
f234de116f Refactor speaker system to prevent audio glitches and to support CPU automatic speed switching
Squashed commit of the following:

    REFACTOR : fix comments, logging, and rename some variables
    REFACTOR : fix up some commentary, clean deadc0de
    REFACTOR : mostly fix all the audio glitches
        - amplitudes of samples are gradually shifted to zero when speaker has fallen silent
        - simplifies speaker state machine
        - fullspeed mode only enqueues quiet samples
    REFACTOR : fix up a number of other functions and comments
    REFACTOR : clean up code to submit normal speed wave buffer to OpenAL
    Move some initializations to the cpu_thread()
    REFACTOR : properly reset the speaker cycles access counter so we don't underflow and assert
    REFACTOR : should never get a split buffer from our soundcore implementation
    Fix warning from gcc ... static array size needs to be computed from integer values
    REFACTOR : gcc (but not clang) complains about these, so just make them preprocessor defines
    REFACTOR : use unsigned long long because we don't actually care that this counter is 64bit
    REFACTOR : remainder_buffer and miscellaneous tweaks
        - Adds implementation commentary to document remainder_buffer purpose
        - Also adds sample average for square wave boundary in case where remainder_buffer not used (whole-sample boundary)
        - Variable renaming and code shuffling
    REFACTOR : do not dynamically alloc remainder buffer
        - Never attribute to cache-coherancy bugs what is a simple thread race =P
    REFACTOR : comments and whitespace
    REFACTOR : rename public speaker API functions
    REFACTOR : clean up public speaker API
    REFACTOR : tabs to spaces
    REFACTOR : moar deadc0de clean up and renaming
    REFACTOR : remove deadc0de paths from soundcore
    REFACTOR : fully excise soundtype stuff now that we only support soundcard output
    Move a file static to function scope
    REFACTOR : rename more variables and remove deadc0de
    REFACTOR : samples_buffer naming and change to explict int16_t
    REFACTOR : removed deadc0de and shuffled code locations
    REFACTOR : remainder buffer naming and clarify type
    REFACTOR : move joystick timing to VM module and remove header visibility
    REFACTOR : clarify speaker variable name
    REFACTOR : clarify cycle counting codepaths
    REFACTOR : VBL/timing interfaces
        - eliminates passing around a common global
    REFACTOR : names and comments
    HACK around volume issue
    REFACTOR : rename speaker feedback variable
    REFACTOR : rename global total cycle count
    REFACTOR : rename a constant
    Fix test builds
    REFACTOR: rename to is_fullspeed
    REFACTOR : local variable naming changes
    REFACTOR : migrate cycle timing variables to correct location and remove header visibility
    Allow fullspeed codepath to update speaker
    REFACTOR : remove deadc0de paths in prep for cleanup
    REFACTOR : speaker now manages its own VM entry point
2015-01-31 13:57:10 -08:00
Aaron Culliney
780905155a Only render if necessary 2015-01-23 23:37:43 -08:00
Aaron Culliney
b4516b49df Add general-use branch-prediction macros 2015-01-23 23:34:03 -08:00
Aaron Culliney
b8c44b81ab Simple FPS logging 2015-01-18 11:10:16 -08:00
Aaron Culliney
30b8f308c6 Faster keyboard read 2015-01-18 11:06:02 -08:00