Commit Graph

253 Commits

Author SHA1 Message Date
Aaron Culliney
b37c94f404 Remove unused test files 2016-09-11 06:28:24 -07:00
Aaron Culliney
daddf5f287 Misc fixes for Mac testing 2016-09-10 16:57:52 -06:00
Aaron Culliney
bc8091cde3 Fix Linux Desktop builds 2016-09-10 16:19:49 -06:00
Aaron Culliney
721ea2c172 Also copy external-disks and use them if available 2016-09-02 12:39:09 -07:00
Aaron Culliney
8921f79a14 Beginnings of Mockingboard tracing for automated testing 2016-08-27 13:33:05 -07:00
Aaron Culliney
5883545390 Ensure CPU speeds in test prefs are correctly set 2016-08-27 12:10:36 -07:00
Aaron Culliney
d4581eb492 Enable testing of 3rd-party disk images 2016-08-27 09:17:23 -07:00
Aaron Culliney
7ad7b65d11 Add speaker tracing API and tests 2016-07-23 17:35:11 -07:00
Aaron Culliney
19178b751c Unbreak tests on desktop Linux 2016-07-22 20:54:21 -07:00
Aaron Culliney
4457e9e722 Tests running and passing again on iOS devices 2016-07-22 20:43:47 -07:00
Aaron Culliney
59e6c4fabc Fix HOMEDIR on mobile devices 2016-07-22 20:43:42 -07:00
Aaron Culliney
ed8942f82d Fix testtrace by testing with more determinism ;) 2016-07-15 20:28:23 -07:00
Aaron Culliney
d7413dae01 Allow for more deterministic typing/stepping of CPU thread from debugger 2016-07-15 20:28:23 -07:00
Aaron Culliney
4ca642a715 Remove duplicate code paths for stepping/typing-into the debugger 2016-07-15 20:28:23 -07:00
Aaron Culliney
4fee1ee0be Fix a test break when converting to http[s] URL 2016-07-02 13:35:20 -07:00
Aaron Culliney
7af88b3568 Tests are starting to run in iOS simulator 2016-06-30 21:03:58 -07:00
Aaron Culliney
ca73750c44 Various tests works again on Mac 2016-06-26 09:31:56 -07:00
Aaron Culliney
e06620b57d http -> https 2016-06-19 12:43:35 -07:00
Aaron Culliney
da4e5eb75a Get testtrace building again on Desktop Linux
- These tests are currently somewhat unstable, TODO FIXME
2016-04-26 21:10:16 -07:00
Aaron Culliney
2a405f028f Streamline and fix test codepaths on Desktop Linux and Android 2016-04-13 19:33:08 -07:00
Aaron Culliney
db816ad502 Refactor Android variant to use common shared JSON preferences
- Eliminates a whole bunch of boilerplate setter/getter code in various places
    - Accesses preferences directly from JSON data through custom json_parse.h API
    - Improves code locality for Java menus/settings
2016-04-11 22:01:30 -07:00
Aaron Culliney
a03c074a52 Moar JSON/prefs tests including new array tests 2016-03-29 22:38:28 -07:00
Aaron Culliney
b065da9f4b Various test suite improvements
- Possibly breaking changes for mobile ... #willunbreaklater
2016-03-26 14:56:34 -07:00
Aaron Culliney
74a5b74ae3 Refactor prefs into JSON publish/subscribe API
- Breaking changes currently only tested on Linux desktop build =P
    - Goal is to eventually eliminate most/many of the disparate getter/setter functions to allow better
      modularity/scaling and platform portability
2016-03-26 13:44:13 -07:00
Aaron Culliney
163035b0c7 Add a bunch of new JSON tests 2016-03-25 20:44:03 -07:00
Aaron Culliney
fdfe312a2b Changes needed after jsmn subtree upgrade 2016-03-09 22:21:15 -08:00
Aaron Culliney
a87092bbd8 Add JSON mutation functions and tests 2016-03-09 21:06:00 -08:00
Aaron Culliney
01b25527fe Add JSON serialization and tests
- Encourage use of opaque reference rather than internal struct
2016-03-04 23:31:15 -08:00
Aaron Culliney
b87273e742 Expand coverage of heap memory checking of debug builds and simplify FREE() calls 2016-02-26 21:26:57 -08:00
Aaron Culliney
6e978810db First cut at testsuite for json/prefs 2016-02-25 20:56:59 -08:00
Aaron Culliney
e073954ec8 Add a test case that shows a problem with "re-inserted" disks 2016-02-17 22:24:07 -08:00
Aaron Culliney
0dbcfbc9a2 Various fixes to get Mac and iOS building 2016-02-15 21:10:16 -08:00
Aaron Culliney
545376b1be Improve testcpu on desktop and fix it on Android 2016-02-15 13:32:05 -08:00
Aaron Culliney
5ce91fa96d Do not test internal implementation detail that no longer exists 2016-02-15 13:30:31 -08:00
Aaron Culliney
829291feba Refactor all drawing to run on video thread in one scanner pass
- Moves extra work off CPU/audio thread
    - Prepares the way to possibly remove the vestigal intermediate indexed framebuffer and do direct RGBA_8888 writes
      to XImage or OpenGL texture
    - Prepares the ground for possible better emulation of video scanner hardware

Conflicts:
	src/display.c
	src/video/glvideo.c
	src/video/video.h
2016-02-15 13:29:58 -08:00
Aaron Culliney
b9acdc7d4c reset FBSHA after LORES80 iteration 2016-01-24 09:47:44 -08:00
Aaron Culliney
edfd5243ff First cut at LORES80 graphics
- This comes with the caveat that all video modes will need to be refactored to take into account proper timing
2016-01-20 23:16:42 -08:00
Aaron Culliney
0c77e4a659 Fix testdisk assertions in debug builds 2016-01-09 14:00:33 -08:00
Aaron Culliney
abae59767c Enable simple heap memory fencing/scribbling in debug builds 2015-12-31 22:50:43 -08:00
Aaron Culliney
5211722d63 Switch to using DSK to speed up tests on Android 2015-12-16 21:11:52 -08:00
Aaron Culliney
785577e252 Fix some compiler warnings in testdisk.c 2015-12-16 21:11:35 -08:00
Aaron Culliney
3a20c96296 Check more paths in attempt to satisfy test suite disk insertion
- This is mainly to accommodate disk locations on Android
2015-12-16 21:01:50 -08:00
Aaron Culliney
9e5274ee18 Flip-flop test to correctly account for e5f08849 2015-12-16 20:56:20 -08:00
Aaron Culliney
26e452c3a3 Avoid bufover in testsuite -- sprintf() already writes terminating null byte! 2015-12-16 20:53:16 -08:00
Aaron Culliney
2dbd77e344 Excise uthash.h from testcpu suite
- Works around issue where Android NDK GCC 4.8/4.9 would take an inordinate amount of time when compiling testcpu with -O2
2015-12-14 23:56:48 -08:00
Aaron Culliney
699746a743 Alleviate compiler warnings in testvm/testdisplay 2015-12-14 23:55:08 -08:00
Aaron Culliney
74e97ccc97 Alleviate compiler warnings in testcpu 2015-12-14 22:11:29 -08:00
Aaron Culliney
1f0021667b Fix display test failures
- New framebuffer SHAs result of recent improvements to DHIRES colors
2015-12-14 18:59:44 -08:00
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
d46a62a4dd Refactor to load whole disk image into memory 2015-10-18 15:24:34 -07:00
Aaron Culliney
b496d771f6 Moar data for disk write tracing 2015-10-18 12:44:24 -07:00
Aaron Culliney
41ae0266e2 Bugfix : flush disk buffer data on initialize
- Fixes disk image corruption issue that was manifesting in testing
    - Out-of-space test(s) now results in a disk image with a correct length byte of 0x20 for the final "JUNK7" file in
      the disk image's VTOC
2015-10-18 12:11:09 -07:00
Aaron Culliney
39c09a042f Do not return sync bytes if no image inserted
- This really should be backed by more testing or research =P
2015-10-17 13:23:49 -07:00
Aaron Culliney
4e478d369c Refactor disk interface API function names 2015-10-15 22:51:44 -07:00
Aaron Culliney
3b832a1aba No really, post out-of-space stability testing of raw disk image bytes 2015-10-12 20:30:54 -07:00
Aaron Culliney
427a90d755 Post out-of-space stability testing of raw disk image bytes 2015-10-12 20:17:05 -07:00
Aaron Culliney
aa225d6e48 Add some new disk I/O tests for stability
- test that BLOADing a bunch of junk files results in expected data
    - test that disk image files themselves are unchanged after the battery of tests
2015-10-11 11:51:51 -07:00
Aaron Culliney
d93a91cca8 Tests build and run on Desktop Linux and Android 2015-10-04 13:29:17 -07:00
Aaron Culliney
236b8e358a INITHELLO with -UCONFORMANT_TRACKS now passes 2015-10-04 12:35:38 -07:00
Aaron Culliney
db46b281cc Fix -UCONFORMANT_TRACKS testing (with vanilla gzipped test disk images) 2015-09-11 23:37:52 -07:00
Aaron Culliney
0b8f9d2dfb Test parameters change when not -DCONFORMANT_TRACKS=1
- BUG : INIT HELLO not working for DO and PO images with CONFORMANT_TRACKS undefined
2015-09-06 23:31:02 -07:00
Aaron Culliney
cd1669dfca Refactor out abusive traces into different test file 2015-09-06 22:57:51 -07:00
Aaron Culliney
a1c497bfa0 Lightly refactor testing codepaths for desktop Linux and Android 2015-09-06 22:10:25 -07:00
Aaron Culliney
2c97f7af19 Excise HEADLESS ... it was only being used by testcpu 2015-09-06 17:14:38 -07:00
Aaron Culliney
2cf119b5e9 use static inline function rather than macro for easier debugging 2015-09-06 15:18:22 -07:00
Aaron Culliney
3b5f57b0cf Get tests working again on desktop Linux 2015-09-05 12:22:29 -07:00
Aaron Culliney
8dd82642d3 Refactor : rename audio subsystem initialization and shutdown functions 2015-06-14 15:05:44 -07:00
Aaron Culliney
966ba0a2d8 No disk in drive (or invalid track) should return 0xFF
- Bug introduced in e01e437
    - Bugfix allows U5 Journey Onward to work =P
2015-05-25 13:36:17 -07:00
Aaron Culliney
347ed76034 Mark some VM tests as needing attention 2015-03-10 10:23:52 -07:00
Aaron Culliney
d657ab8c46 Unstick Mac builds and tests 2015-03-10 10:22:47 -07:00
Aaron Culliney
b329ac2bff Remove some redundant code 2015-03-05 21:25:14 -08:00
Aaron Culliney
2ec4e46012 Expose a test failure on ARM 2015-03-05 20:59:51 -08:00
Aaron Culliney
fadb806c92 DSK image loading considered slow, Use NIB image for faster tests (not specifically exercising DSK codepaths)
- There may be some wins in optimizing the DSK codepaths, but I think these are inherently slow now that we have
      brought in Applewin's conformant code
    - It's possible that the best option will be to bring back the non-conformant-but-faster DSK codepaths originally in
      this emulator but ...
2015-02-24 20:42:30 -08:00
Aaron Culliney
1c7e707af9 Comment pthread_join()
- Blocks Android rendering
    - Unnecessary for GLUT/Linux renderer
    - Might need to be worked around for Mac tests
2015-02-24 15:49:57 -08:00
Aaron Culliney
48625458cf testdisk.c is starting to run on Android 2015-02-24 12:10:51 -08:00
Aaron Culliney
0c3121ac65 Android : copy stuff out of APK for ease of use, and pass data_dir to native side
- Also makes data_dir more useful for various platforms
2015-02-23 23:11:17 -08:00
Aaron Culliney
404d4cdb4f Various tweaks to CPU tests 2015-02-21 21:00:42 -08:00
Aaron Culliney
41b8ca7700 More canonical test for oVerflow 2015-02-19 20:13:13 -08:00
Aaron Culliney
86e8eeafe2 testcpu is beginning to run (with errors) 2015-02-18 23:09: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
2a6d889309 test 16bit underflow/overflow in op_JSR and op_RTS 2015-02-18 10:51:26 -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
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
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
191a1b7395 Fix Mac builds 2015-01-16 21:11:29 -08:00
Aaron Culliney
87a2d081d3 CPU_TRACING now emits machine cycles 2015-01-11 18:37:57 -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
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
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