Commit Graph

659 Commits

Author SHA1 Message Date
Aaron Culliney
41b8ca7700 More canonical test for oVerflow 2015-02-19 20:13:13 -08:00
Aaron Culliney
59d151d684 First cut at DAA and DAS algorithms in ARM and misc assembly cleanup 2015-02-19 16:03:29 -08:00
Aaron Culliney
86e8eeafe2 testcpu is beginning to run (with errors) 2015-02-18 23:09:16 -08:00
Aaron Culliney
3149914741 Get some CPU tests passing on ARM/Android 2015-02-18 23:08:16 -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
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
00cec0dcae WIP : 65c02 CPU in ARM assembly 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
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
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
Aaron Culliney
191a1b7395 Fix Mac builds 2015-01-16 21:11:29 -08:00
Aaron Culliney
b4f91661d7 don't leak a buffer
- thank you, valgrind
2015-01-14 23:24:51 -08:00
Aaron Culliney
882eae4818 Ugh, GLUT idle func was chewing up CPU
- ugh, why is the millis parameter to glutTimerFunc() an int?! 1000ms/60Hz = 17ms
2015-01-14 23:24:33 -08:00
Aaron Culliney
87a2d081d3 CPU_TRACING now emits machine cycles 2015-01-11 18:37:57 -08:00
Aaron Culliney
643a431386 first cut at auto fast-loading of disk images
- automatically adjusts cpu timing to fastest if drive motor accessed recently and no audio/video
    - TODO: audio output clipping issue when (un)pausing audio outpu
2015-01-11 18:35:51 -08:00
Aaron Culliney
cce2bbb0cc timing code cleanup 2015-01-11 12:24:43 -08:00
Aaron Culliney
8d35cf1d2c Rename to motor_off and record motor access times 2015-01-11 12:04:06 -08:00
Aaron Culliney
bf4e920b1f should always be NI2 size for converted PO/DO 2015-01-10 20:45:07 -08:00
Aaron Culliney
dcafae8390 read_rand() is really just floating_bus() return 2015-01-10 19:42:00 -08:00
Aaron Culliney
1ba28db8d7 Varous VM switches return memory floating bus value 2015-01-10 18:46:49 -08:00
Aaron Culliney
381d97c485 Preliminary VBL support sourced from AppleWin 2015-01-10 16:17:18 -08:00
Aaron Culliney
a7cd281037 mark other INTERFACE_CLASSIC codepaths 2015-01-10 14:14:49 -08:00
Aaron Culliney
b031bdb4a6 Refactor private defines 2015-01-10 14:14:49 -08:00
Aaron Culliney
06011e2902 New disk tests and improvements
- Exercise various TRACING codepaths
    - Adds ProDOS-order tests
2015-01-03 16:24:02 -08:00
Aaron Culliney
ffd4647693 Make test_breakpoint() function work again 2014-12-29 21:36:21 -08:00
Aaron Culliney
fdd57f3095 Fix some tests and expose mdstr globally (easier debugger introspection) 2014-12-29 21:36:21 -08:00
Aaron Culliney
af706e7602 rename read_random to avoid namespace collison on Mac 2014-12-29 19:07:43 -08:00
Aaron Culliney
7bc0475a5d disable unstable random2 test 2014-12-28 15:06:59 -08:00
Aaron Culliney
7d3b39926c Disk testing is separate from vm testing
- Breaks out disk testing into its own suite
    - Misc testing and build-system tweaks
2014-12-28 14:50:43 -08:00
Aaron Culliney
cd9a9ad3cf Auto-eject disk if present in drive 2014-12-28 14:48:53 -08:00
Aaron Culliney
e01e437842 Massive disk refactoring sourced from AppleWin
- Attempts to be byte-stream compatible with how AppleWin handles DOS-order, ProDOS-order, and NIB images
    - Adds support for ProDOS-order images
    - First cut at VBL support: (//e FlappyBird boots now!)
2014-12-28 13:07:13 -08:00
asc
34d043330b Silence some valgrind complaints 2014-12-21 13:59:04 -08:00
Aaron Culliney
031a8f51f8 Prevent some segfaults when shutting down on Linux 2014-12-21 13:51:45 -08:00
Aaron Culliney
a24436e88f Gamepad clamp-beyond-radius implemented 2014-12-05 22:31:12 -08:00
Aaron Culliney
dd0085e3d7 key handling improvements
- keyboard joystick axes handled separately
    - discriminate more classic-interface-only codepaths
2014-12-01 22:00:45 -08:00
Aaron Culliney
0f25f6d9d1 srandom/random for PRNG should be "good enough" 2014-11-29 14:23:27 -08:00
Aaron Culliney
b6e329a3c6 Prevent segfault in glGetError() during app initialization 2014-11-29 13:31:21 -08:00
Aaron Culliney
4f0814ce42 Remove unstable __FILE__ output from vmtrace logging 2014-11-29 13:28:34 -08:00
Aaron Culliney
ad39463519 update vmtrace test 2014-11-29 10:04:21 -08:00
Aaron Culliney
6c1215dbb2 Tests build/run on Mac
- Fixes statistics printing
    - Some VM tests currently fail on Mac
2014-11-27 10:52:12 -08:00
Aaron Culliney
2aa2648d30 Fix for other VM/display tests 2014-11-25 22:01:46 -08:00
Aaron Culliney
bc643bfbdb joystick devices only supported under VIDEO_OPENGL 2014-11-25 21:59:05 -08:00
Aaron Culliney
e51a57b376 Fix PAGE2 display test 2014-11-25 21:57:57 -08:00
Aaron Culliney
050d1de389 HIRES PAGE2 test: shows moire on page2 2014-11-25 21:56:44 -08:00
Aaron Culliney
0ad98602fe Improved VM_TRACING syntax 2014-11-23 17:13:05 -08:00
Aaron Culliney
88b7db0387 unwedge test_PHP 2014-11-23 17:12:20 -08:00
Aaron Culliney
101e507add Adds a VM tracing facility and functionality test 2014-11-23 14:03:18 -08:00
Aaron Culliney
89fc5f6599 Display test improvements
* Removes hackish code in testdisplay.c in preparation for a bugfix
    * Adds function to output state of softswitches ... useful from GDB
2014-11-23 12:53:59 -08:00
Aaron Culliney
3536b6b65a Force a splash screen before allowing emulation to start 2014-11-22 14:28:38 -08:00
Aaron Culliney
c075460b76 Gets OpenGL output working with testing VM and display
* Refactors test routine to its own thread to not interfere with OpenGL on main thread
    * Misc TESTING/HEADLESS switch tweaks
2014-11-22 14:24:43 -08:00
Aaron Culliney
8416dd4d49 adds PRNG tests 2014-11-22 14:03:57 -08:00
Aaron Culliney
7ed5250392 new SHA1 to fix cputrace test 2014-11-21 22:27:10 -08:00
Aaron Culliney
4483105edb Don't reset joystick buttons on menu exit 2014-11-19 20:00:13 -08:00
Aaron Culliney
9f1c54e555 Expose c_read_random() 2014-11-19 19:59:39 -08:00
Aaron Culliney
3badb546d6 Annunciator is noop for the moment 2014-11-18 22:31:38 -08:00
Aaron Culliney
e6ca42be64 CPU fixes from tracing against AppleWin
- All regs are 0xFF on reboot
    - Stack pointer is 0xFC on reboot
    - Flags are set accordingly
    - Fix op_JMP_ind tracing display
2014-11-18 22:27:25 -08:00
Aaron Culliney
9bbe906f43 CPU_TRACING bugfix and more readable
- GetImm mode was not reporting correct arg
    - Converts it to a format easier to compare against similar CPU trace output from AppleWin
    - Sanity-check arg counts
2014-11-18 22:16:44 -08:00
Aaron Culliney
9b9ca39344 Improve disk tracing
- Disk trace is now ASCII output
    - Output track sector and file position data
    - Debugger command added
    - New preprocessor define
2014-11-17 20:52:29 -08:00
Aaron Culliney
e5e087c4e0 Refactor joystick handling
* Removes Linux-specific joystick handling
    * Adds cross-platform GLUT joystick handling; Caveats:
        - GLUT is not robust to joystick hot plugging like my old Linux-specific code was.  (Fix should be made in the
          GLUT driver and pushed upstream if we really care)
        - Deprecated X11 renderer now can only use keypad joystick
2014-11-09 15:48:05 -08:00
Aaron Culliney
2c12aa6112 Improve CPU_TRACING output 2014-11-09 13:06:25 -08:00
Aaron Culliney
30d7f88c21 Fix emulation problem manifesting as bug in cracked version of J---- 2014-11-08 00:21:52 -08:00
Aaron Culliney
2d6ca9ce89 don't busy-sleep when paused 2014-11-02 11:46:30 -10:00
Aaron Culliney
c1db658589 Balance EffectiveAddr_X ... CPU_TRACING test passes 2014-11-02 12:10:09 -08:00
Aaron Culliney
9144b48885 Enable abusive CPU_TRACING test 2014-11-02 12:09:30 -08:00
Aaron Culliney
c7c888d218 Refactor style/whitespace 2014-11-01 20:02:44 -07:00
Aaron Culliney
74943c71e5 Fix INITHELLO for dsk images
* This has apparently been broken since around the turn of the millenium from an ancient refactor.  Luckily I still
      have earlier pre-git code drops ;-)
2014-11-01 19:47:38 -07:00
Aaron Culliney
b3c1af9786 disk INITHELLO tests ... 2014-11-01 19:26:40 -07:00
Aaron Culliney
31b87f67e4 Refactor test_setup_boot_disk 2014-11-01 18:44:54 -07:00
Aaron Culliney
4ff57ab7dd Slightly improve CPU trace files 2014-10-31 16:32:34 -07:00
Aaron Culliney
6fdeee3896 Cleanup and fixes for compiler warnings 2014-10-31 16:27:39 -07:00
Aaron Culliney
65f991ebcc Build fixes for deprecated X11 variant 2014-10-30 00:11:17 -07:00
Aaron Culliney
5af194c56d Fixes main menu issue 2014-10-29 21:48:44 -07:00
Aaron Culliney
0eeb93820c Fix Open-Apple (joy button 0) stuck after reboot 2014-10-25 12:51:09 -07:00
Aaron Culliney
a2a55d53ed Fixes for various clang static analyzer issues 2014-10-25 11:53:44 -07:00
Aaron Culliney
29e8502f23 Silence compiler warnings on Mac 2014-10-25 10:18:22 -07:00
Aaron Culliney
3ce9149b6f Fix more compiler warnings and possible display bugs 2014-10-25 09:00:06 -07:00
Aaron Culliney
551cc00781 Silence a number of clang compiler warnings on Linux 2014-10-25 08:44:21 -07:00
Aaron Culliney
737c780929 Fix test break 2014-10-25 08:26:53 -07:00
Aaron Culliney
c140c5c7e0 Mini-refactor 2014-10-19 12:54:03 -07:00
Aaron Culliney
a42a10eb86 Beginnings of key handling for Apple2Mac 2014-10-12 17:09:54 -07:00
Aaron Culliney
6c63c49d09 Improvements to Mac GUI
* Reboot... menu option
    * Disk image selection interface
    * Whitespace code changes
2014-10-12 16:43:51 -07:00
Aaron Culliney
442e4c99b2 Display tests on Mac and Mac tests cleanup 2014-10-12 12:42:29 -07:00
Aaron Culliney
e941d5b10f First cut at getting audio working on Mac 2014-10-12 12:14:13 -07:00
Aaron Culliney
13d17af838 Simplify OpenAL code 2014-10-12 10:46:12 -07:00
Aaron Culliney
7f395edc11 comment unstable test 2014-10-11 19:59:44 -07:00
Aaron Culliney
f11b6948bb Work around broken assembly for PLP instruction on Mac 2014-10-11 19:36:49 -07:00
Aaron Culliney
a37ed6cd98 tests run again on Mac 2014-10-11 19:34:12 -07:00
Aaron Culliney
c4609e0c68 Improved PLP and PHP tests 2014-10-11 19:33:13 -07:00
Aaron Culliney
acc3deb264 Tweaks to disk boot trace test 2014-10-11 18:31:19 -07:00
Aaron Culliney
4c9c1fb62a First cut at a facility to do CPU tracing
* Also includes a test that traces booting the test disk
2014-10-11 18:28:48 -07:00
Aaron Culliney
15927d1554 test raw disk stream 2014-10-11 10:44:20 -07:00
Aaron Culliney
d6b8057c57 Beginning of VM Tests on Mac 2014-10-10 20:05:46 -07:00
Aaron Culliney
0b9515f2cd Excise ALSA, only use OpenAL 2014-10-09 21:17:54 -07:00
Aaron Culliney
429561643e Fix build for testvm and testdisplay 2014-10-09 20:54:11 -07:00
Aaron Culliney
96c7544feb Support fullscreen mode with GLUT/Linux 2014-10-07 22:22:21 -07:00
Aaron Culliney
ca29ec543d Get Linux build working with OpenGL changes 2014-10-07 22:05:14 -07:00
Aaron Culliney
69bd40216b Refactor to rename Basic.vert and Basic.frag 2014-10-07 22:04:23 -07:00
Aaron Culliney
e696f7882f Refactor for whitespace and clarity 2014-10-07 21:59:21 -07:00
Aaron Culliney
d083fa958f do not use vgl.h, use glUtil.h 2014-10-07 21:26:50 -07:00
Aaron Culliney
6858e51a75 Apple2Mac first cut and refactor common rendering code
* Based on NSOpenGLView and Apple's GLEssentials sample code
    * CVDisplayLink- or NSTimer-driven rendering
    * Works in window or fullscreen mode on Mac OSX Lion or later

TODO FIXME:
    * Breaks Linux/Posix build
    * Cocoa menu interfaces
    * Key/mouse/joystick/gamepad handling
2014-09-30 21:01:58 -07:00
Aaron Culliney
f794098a02 Bugfix : properly handle control-modified keys
* GLUT sends the raw ascii ctrl-values, so we merely send them along in a "cooked" mode
        + It may be that some strange ctrl combinations (saw CTRL-~ or CTRL-ESC) are not properly handled this way, but
        ... not sure what can be done about this (doesn't seem to be a way to force glut to send us the non-cooked keys)
    * Legacy X11 input continues to be sent as raw values (which arguably is a better way)
2014-09-21 17:26:37 -07:00
Aaron Culliney
db8ac1c98b Refactor : separate glut input handling into its own file 2014-09-21 16:06:32 -07:00
Aaron Culliney
d0800fd347 Remove deadc0de key handling paths (leftover from X11) 2014-09-21 15:44:25 -07:00
Aaron Culliney
804f60d6a0 Fix key input handling in GLUT/glvideo
* TIL GLUT constants for certain special keys map to ascii (for example GLUT_KEY_ALT_L == 116/'t') ... of course
      this was playing hell with the emulator's key input handling
    * Now we directly convert regular keys rather than pushing them down the special path
    * Also separateds CAPS_LOCK hack into its own inline function
2014-09-21 15:37:38 -07:00
Aaron Culliney
5e9e98bf88 Fixes keypad joystick emulation with glvideo
* This prevents resetting the joystick to the origin too soon when key is being held down
    * Verified doesn't affect legacy X11 xvideo input processing
2014-09-21 15:01:02 -07:00
Aaron Culliney
c3ac3e8f1c Get the PC Joystick working with glvideo renderer 2014-09-21 14:33:54 -07:00
Aaron Culliney
c162617234 Remove a bunch of deadc0de 2014-09-21 13:35:37 -07:00
Aaron Culliney
1e97564ea7 Clean up colormap initialization and fix lo and dhires Medium blue color 2014-09-18 23:03:42 -07:00
Aaron Culliney
df8ae3d018 First cut at basic OpenGLES 2.0 renderer
* Compiles/runs on Linux
    * X11 renderer is now deprecated
2014-09-16 21:34:04 -07:00
Aaron Culliney
eb2e038bf0 Refactor classic interface to run within its own thread
* previously this classic interface acted as an oldschool modal dialog (which worked fine with the X11 renderer
      where we actively pumped the event loop)
2014-09-16 20:42:07 -07:00
Aaron Culliney
afc15e0b63 Refactor INTERFACE_CLASS stuff out of disk API 2014-09-16 20:40:42 -07:00
Aaron Culliney
1b8387d214 cput_thread() now has correct pthread function prototype 2014-09-16 20:39:08 -07:00
Aaron Culliney
a929ef854c Refactor video_sync() and friends
- main thread render loop goes into X11 video driver
    - removes video_sync()
2014-09-16 20:38:14 -07:00
Aaron Culliney
8621b1ac53 Refactor: macro should be capitalized 2014-09-06 19:47:59 -07:00
Aaron Culliney
77e8f88edc Refactoring colormap to internal structure/array 2014-08-17 15:31:49 -07:00
Aaron Culliney
4fb69a3196 Slight refactoring of key handling
* Adds a mapping from common ASCII to internal scancodes
    * Renaming for consistency
2014-08-17 15:29:06 -07:00
Aaron Culliney
e0dbcf4afc Work around an apparent clang bug
* tests were previously reported to fail with -O2 optimization
2014-08-16 11:25:07 -07:00
Aaron Culliney
a99b5a1d68 HACKs around bizarre bytecode generation on Darwin
* CPU tests pass now, w00t!
2014-06-25 23:01:22 -07:00
Aaron Culliney
eb51f5e23f ROM shim for Xcode builds 2014-06-22 12:26:40 -07:00
Aaron Culliney
3b344ed8e7 Don't fail build if ROM generation fails 2014-06-22 11:25:57 -07:00
Aaron Culliney
10e03e9bc5 Get tests working again
* Refactor naming of saved CPU state variables
    * Allows convenient addressing from assembly
2014-06-22 11:17:44 -07:00
Aaron Culliney
a3973b2e35 ROM generation 2014-06-22 11:09:59 -07:00
Aaron Culliney
670a776571 Fixes for Linux build 2014-06-21 23:40:04 -07:00
Aaron Culliney
3a3219234f Get tests building on OS X 2014-06-21 15:43:24 -07:00
Aaron Culliney
6e4b390b0d HACK until audio system refactored 2014-06-21 14:55:30 -07:00
Aaron Culliney
4597bb2a7e use arc4random_uniform() 2014-06-21 14:52:13 -07:00
Aaron Culliney
ea71d197e0 Handle unlikely overflow and silence clang warning 2014-06-21 14:51:41 -07:00
Aaron Culliney
cecc78e824 Silence clang warnings 2014-06-21 14:51:25 -07:00
Aaron Culliney
a9d094c112 Misc tweaks to get OS X target building 2014-06-21 14:28:50 -07:00
Aaron Culliney
ed8b41c9a0 New CPP macros to accommodate Darwin 2014-06-21 14:21:33 -07:00
Aaron Culliney
d650982e51 Slightly less hackishly, use "private" pointers to set struct vals 2014-06-21 14:21:05 -07:00
Aaron Culliney
a4670b1eda Use CPP macro for duplicate assembly 2014-06-21 14:20:28 -07:00
Aaron Culliney
c13caa0798 add callLQ preprocessor macro 2014-06-21 14:05:00 -07:00
Aaron Culliney
44f06dfb48 don't {Pre,Post}fix Project Preprocessor macro with __ 2014-06-21 13:46:02 -07:00
Aaron Culliney
02a4feba78 Build shim for glue.S and Mac project tweaks 2014-06-21 13:43:13 -07:00
Aaron Culliney
51e261fc9d Add font.c to reduce Xcode project build complexity
* font.c shouldn't change if font.txt isn't tweaked
    * easy to regenerate without needing Xcode
2014-06-21 12:17:59 -07:00
Aaron Culliney
b9cdf663a0 Shim clock_gettime 2014-06-21 10:02:26 -07:00
Aaron Culliney
5083aac4b7 silence compiler warnings 2014-06-14 12:19:15 -07:00
Aaron Culliney
87a34d2d97 Remove compiler pragmas and silence a spurious assert 2014-06-14 12:13:49 -07:00
Aaron Culliney
1649419b39 Fixe unused variable warnings 2014-06-14 11:50:50 -07:00
Aaron Culliney
595bab04bd Fix warnings 2014-06-14 11:26:49 -07:00
Aaron Culliney
8ded3fa0f1 Expose unused variables and improve logging
* Adds support for RELEASE_ logging (logging even with NDEBUG builds)
2014-06-14 11:26:33 -07:00
Aaron Culliney
86076697b9 BLOAD now takes a bank argument 2014-06-14 10:37:14 -07:00
Aaron Culliney
46f8e711f6 tweak comments 2014-06-14 10:34:24 -07:00
Aaron Culliney
995643dfa2 DAA and DAS algorithms for x86_64 2014-06-13 23:57:56 -07:00
Aaron Culliney
2def12c703 Fix build warning 2014-06-08 15:50:34 -07:00
Aaron Culliney
1b2a46dff4 x86_64 bugfix : subtract 32bit int type 2014-06-08 15:46:59 -07:00
Aaron Culliney
2f2698ed9e Mark non-XShm support as buggy 2014-06-08 14:14:47 -07:00
Aaron Culliney
f72976a566 Fix calling conventions on x86_64 2014-06-08 13:12:48 -07:00
Aaron Culliney
45f29f363f Fix ROR instruction on x86_64 2014-06-08 13:12:12 -07:00
Aaron Culliney
c33cdb4b25 x86_64 target builds 2014-06-08 11:01:38 -07:00
Aaron Culliney
126d049ffc Refactor to two jump vectors
* Believe needed to allow minimal change for x86_64 codepath
2014-06-07 16:05:38 -07:00
Aaron Culliney
320819c829 on second thought, .balign 16 always
* if someone still has an olde i[345]86 machine that b0rks... fix it then! =P
2014-06-07 16:01:36 -07:00
Aaron Culliney
71f71af834 Use name-indirection for assembly acting on full-length registers 2014-06-07 15:05:29 -07:00
Aaron Culliney
efc63aeb7a Refactoring: removing redundant code 2014-06-07 14:21:12 -07:00
Aaron Culliney
23e6e0ea75 Use name-indirection for all registers 2014-06-07 13:59:49 -07:00
Aaron Culliney
30cf264aa6 Refactoring: shifting to avoid stack hit 2014-06-07 13:40:18 -07:00
Aaron Culliney
05e10b7eb8 inline macros used once and brace apple vm specific code 2014-06-07 13:08:01 -07:00
Aaron Culliney
b10593796c Move x86-specific assembly alignment macros and add __i686__ 2014-06-07 13:02:22 -07:00
Aaron Culliney
fa03fb3d48 Refactoring for efficiency on restore from C 2014-06-07 12:41:47 -07:00
Aaron Culliney
32f53a4e57 Refactoring to isolate full-length registers 2014-06-07 12:06:53 -07:00
Aaron Culliney
d7685a2163 Refactoring for more consistent/descriptive register names 2014-06-07 11:44:27 -07:00
Aaron Culliney
8791730b12 refactoring whitespaces, no code change 2014-06-07 11:29:07 -07:00
Aaron Culliney
24ed2ea6ef Refactoring assembly : move x86 registers to separate file 2014-06-07 10:54:56 -07:00
Aaron Culliney
6d63592ada Misc BASIC test scripts 2014-05-31 10:45:30 -07:00
Aaron Culliney
28ba68d8f1 move greatest.h into test directory 2014-05-31 10:42:10 -07:00
Aaron Culliney
cb56177369 rename asm386 -> x86 2014-05-31 10:29:39 -07:00
Aaron Culliney
00d36d3f5e slightly improved display tests 2014-05-28 22:16:11 -07:00
Aaron Culliney
3d45e75ea1 Refactor dhires graphics plotting to C 2014-05-23 08:46:25 -07:00
Aaron Culliney
46b6fa5342 Improve the dhires plotting routine 2014-05-23 08:24:25 -07:00
Aaron Culliney
c0e4e8ab31 refactor video_redraw to C 2014-05-20 22:47:19 -07:00
Aaron Culliney
6af5eb8be8 Fix interpolated colors 2014-05-18 21:27:19 -07:00
Aaron Culliney
0cea462c29 remove redundant code 2014-05-18 20:01:38 -07:00
Aaron Culliney
fd12c8cf53 Refactor Hires GRaphics to C 2014-05-18 19:51:34 -07:00
Aaron Culliney
57a01d28a8 Refactoring coding style for clarity 2014-05-18 14:40:53 -07:00
Aaron Culliney
f7369869d7 Beginning refactoring hires graphics to C 2014-05-18 13:27:11 -07:00
Aaron Culliney
e2e00b3485 Refactor display macros 2014-05-17 17:31:42 -07:00
Aaron Culliney
95ff4adb08 Refactor hires table initializations 2014-05-17 13:45:55 -07:00
Aaron Culliney
83da4c11af Merge macros used only once 2014-05-17 12:55:14 -07:00
Aaron Culliney
c22fbd0374 Reduce dependence on global TEMP buffer
* display.S still uses this ... will be refactored completely with new video update
2014-05-11 19:18:53 -07:00
Aaron Culliney
4e6718be37 Tweak joystick x-axis
* Seems to make S.R. play better and doesn't affect A.H.
2014-05-11 17:45:00 -07:00
Aaron Culliney
148dfa2f20 Refactor CPU code
* Moves cpu jump table, opcycles table, and others to C
    * Removes support for old/unused/deprecated nmos routines and tables
2014-05-11 17:06:53 -07:00
Aaron Culliney
5ec2901e98 Make opcode entry points globally linkable 2014-05-11 14:48:52 -07:00
Aaron Culliney
360c2fded1 Work around an abort in mockingboard for now 2014-05-11 13:55:54 -07:00
Aaron Culliney
0d109c404d Use named registers 2014-05-11 13:54:24 -07:00
Aaron Culliney
7d97d2e211 Complete refactoring VM routines to C 2014-05-11 13:54:03 -07:00
Aaron Culliney
53a9cc3950 HACK around apparently problematic return from calling C
* HACK ALERT!!! movl(%eax), %eax   --or--  movzbl(%eax), %eax
    * This pattern appears to be generated in some cases by the compiler.  It's not clear to me why it's a problem for
      the emulator (not a crash per se, but an emulation lock-up).
    * Current suspicion is that there are side-effects in the x86 flags from this instruction/indexing mode which are
      copied into the 6502 flags
    * Current sample code showing problem (and non-boot of emulator) is f785da40e9
2014-05-11 13:17:47 -07:00
Aaron Culliney
403cb8b154 Add a comment about suspect code 2014-05-11 13:15:14 -07:00
Aaron Culliney
f785da40e9 refactor C3ROM,CXROM switches to C 2014-05-10 22:39:03 -07:00
Aaron Culliney
400364b739 refactor some softswitch query routines to C 2014-05-10 22:14:46 -07:00
Aaron Culliney
cb387f21dc refactor DHIRES,IOUDIS switches to C 2014-05-10 22:07:25 -07:00
Aaron Culliney
2932c6b832 refactor ALTCHAR switch to C 2014-05-10 21:41:48 -07:00
Aaron Culliney
e6c582bab6 refactor 80COL switch to C 2014-05-10 21:36:55 -07:00
Aaron Culliney
a206fc06b8 refactor ALTZP switch to C 2014-05-10 21:25:54 -07:00
Aaron Culliney
442fe390de use ALTZP offset to avoid test/branch 2014-05-10 18:44:18 -07:00
Aaron Culliney
0c25ec25d6 Save/restore other crucial registers for safety 2014-05-10 16:45:10 -07:00
Aaron Culliney
7fd9857102 Use named registers 2014-05-10 16:39:51 -07:00
Aaron Culliney
f3ea9fa256 tabs -> spaces 2014-05-10 16:33:31 -07:00
Aaron Culliney
ed19f5c52c %edx -> SP_Reg 2014-05-10 16:21:42 -07:00
Aaron Culliney
bb4acc967c refactor RAMRD,RAMWRT switches to C 2014-05-10 14:19:06 -07:00
Aaron Culliney
ba1c2b0451 refactor 80STORE switch to C 2014-05-10 13:59:07 -07:00
Aaron Culliney
5249248aaa refactor language card switches to C 2014-05-10 13:40:29 -07:00
Aaron Culliney
aef793cfab removed unused ][ rom stuff 2014-05-10 13:11:02 -07:00
Aaron Culliney
1c3fc78838 refactor game controller switches to C 2014-05-10 13:08:44 -07:00
Aaron Culliney
ebde9266e3 refactor HIRES switch to C 2014-05-10 12:36:59 -07:00
Aaron Culliney
2600c13723 refactor TEXT and MIXED switches to C 2014-05-10 12:26:06 -07:00
Aaron Culliney
8b00636f66 refactor PAGE2 switch to C 2014-05-10 11:56:54 -07:00
Aaron Culliney
9ff453be23 Beginning to refactor memory.S -> vm.c 2014-05-10 11:55:41 -07:00
Aaron Culliney
25cd542a2c potential bugfix for iie_dhires_on, iie_dhires_off 2014-05-10 11:20:31 -07:00
Aaron Culliney
95baf5c4df bugfix... RAMWRT instead of RAMRD 2014-05-04 17:24:13 -07:00
Aaron Culliney
7827c6bcb3 C3ROM/CXROM softswitch tests 2014-05-04 17:19:48 -07:00
Aaron Culliney
a327e43ddc checking TEXT/MIXED/PAGE2/HIRES/BANK2/LCRAM softswitches 2014-05-04 16:33:24 -07:00