Commit Graph

1062 Commits

Author SHA1 Message Date
Aaron Culliney
7411a987fa Disk chooser can now also choose .a2state files
- Internal save/restore API now uses file descriptors (supports restrictive app environments)
2017-07-01 11:03:15 -07:00
Aaron Culliney
d98c4afa84 Rename emulator.state to emulator.a2state and handle migration 2017-06-28 22:05:11 -07:00
Aaron Culliney
2a263e2418 Avoid a crash in nativeStateExtractDiskPaths() 2017-06-07 02:21:48 -07:00
Aaron Culliney
55ec0c7034 Unbreak Linux desktop build 2017-06-03 05:40:17 -07:00
Aaron Culliney
033dbf71ea Clean up disk/zlib internal APIs 2017-06-03 05:40:09 -07:00
Aaron Culliney
0468cea2d4 Clarify disk/zlib internal API comments after recent upheaval 2017-05-29 08:05:44 -10:00
Aaron Culliney
b300e60e2a Persist disk image 'was_gzipped' state
- 'was_gzipped' state is persisted in .apple2.json preferences
    - This removes all file-renaming codepaths at the cost of temporarily nonconformance to naming convesion (e.g., disk
      images inserted read/write are still called 'foo.dsk.gz' although they are not compressed)
    - Unclean shutdown of emulator leaves any disk images that were inserted read/write in their non-gzipped state
      (regardless of file name extension) on disk until emulator restarted and disk images explictly ejected or clean
      shudown.  App removal after unclean shutdown will potentially leave mis-named disk images lingering.
    - Emulator will handle edge cases of non-gzipped disk images with '.gz' extension and gzipped disk images without
      '.gz' extension
2017-05-29 08:05:38 -10:00
Aaron Culliney
4c893cc197 Beginnings of trace testing on Droid
- Currently broken because !CONFORMANT_TRACKS
2017-05-28 08:48:24 -10:00
Aaron Culliney
e1f0557b87 Allow loading test images from /sdcard/apple2ix on Android 2017-05-28 08:48:21 -10:00
Aaron Culliney
3de4a181eb Silence some build warnings on Android 2017-05-28 08:48:16 -10:00
Aaron Culliney
9bd59661ed Refactor disk image UI to use file descriptors and not paths
- Push path opening responsibility out of disk6 API in favor of using file descriptors
    - Improves handling of readonly gzipped disk images (now data is read without gunzipping or mmap()ing the file)
    - Currently represents an API-breaking change for macOS, iOS, GNU/Linux desktop ports (but should be easy to fix)
2017-05-28 08:48:11 -10:00
Aaron Culliney
31aca92ffd video flags are unsigned long 2017-05-28 08:47:59 -10:00
Aaron Culliney
14a40e055e Merge remote-tracking branch 'origin/droid-1.1.8.1' into aaron_experimental_rebase
Conflicts:
	Android/app/build.gradle
2016-11-07 19:36:59 -08:00
Aaron Culliney
96611beab9 Revert "Avoid doing Mockingboard work as much as possible"
This reverts commit 1bb3f75a06.

    - Caused excessive glitching in U4 music
2016-11-05 10:13:35 -07:00
Aaron Culliney
9cc3603d73 HACKishly fix macOS/iOS build 2016-10-26 21:23:34 -07:00
Aaron Culliney
1bb3f75a06 Avoid doing Mockingboard work as much as possible
- Fixes audio underflow issue on ancient Droid devices
2016-10-23 17:40:35 -07:00
Aaron Culliney
ddcef734c7 Disable excessive IRQ checking for now 2016-10-23 17:39:00 -07:00
Aaron Culliney
3def67975c Avoid testing certain fragile/non-portable disk state 2016-10-16 19:20:23 -07:00
Aaron Culliney
300c292ec5 HACKishly avoid clock_gettime() build issue with Xcode 8 2016-10-16 19:17:20 -07:00
Aaron Culliney
d2e61e5091 Ensure big-endian data in A2V2 save-file format
- Also sanity-check buffer read overflow during loading
2016-10-16 16:00:14 -07:00
Aaron Culliney
97d538c4d2 Hackishly fix issue on x86 Android __PIC__ builds 2016-10-15 19:07:43 -07:00
Aaron Culliney
5ab68b5503 Fix a broken test on Android 2016-10-15 19:07:10 -07:00
Aaron Culliney
a417249691 Add more tests for save/restore feature 2016-10-15 13:36:03 -07:00
Aaron Culliney
1be2c6fd27 A2V2 save format also saves timing information 2016-10-15 13:34:14 -07:00
Aaron Culliney
37df740fd3 Add save/load state to mockingboard 2016-10-15 13:34:03 -07:00
Aaron Culliney
bb93b5c243 Adjust CPU trace file format
- CPU_TRACING now records IRQ check timeout and total cycles
2016-10-09 12:23:48 -07:00
Aaron Culliney
0be555d7e9 Fix cycle counts in CPU tests after upheaval 2016-10-09 12:20:07 -07:00
Aaron Culliney
1294485a02 Beginnings of a pluggable peripheral card API and fix a CPU boot tracing divergence against AppleWin
- In particular, return floating_bus() for non-plugged in cards when accessing the $C100-$C700 range
2016-10-09 12:19:32 -07:00
Aaron Culliney
ccd05e52fe Improve timing conformance in Mockingboard
- Correctly calculate 7 cycles for handling IRQs
    - More frequent calls to MB_UpdateCycles()
    - Correctly calculate timing for MB_EndOfVideoFrame() when testing/tracing/debugging
2016-10-09 12:19:21 -07:00
Aaron Culliney
4fd6a87340 Pinpoint IRQ requests in CPU tracing 2016-10-02 14:24:04 -07:00
Aaron Culliney
3edb24ea3b Change cycle counts to conform with AppleWin 2016-10-02 14:23:59 -07:00
Aaron Culliney
3a6c033077 Improve MB_TRACING adherence to baseline 2016-10-02 13:59:15 -07:00
Aaron Culliney
d0b3f632e1 Further improve determinism for Mockingboard tracing 2016-10-02 13:58:50 -07:00
Aaron Culliney
4bdabcaa9a Optimize disk6 track switch read/write and improve tracing conformance with AppleWin
- No need to read/write if only changed to a "half track"
    - Fixes one small glitch in boot disk tracing
2016-10-02 13:58:06 -07:00
Aaron Culliney
c4e3dccc38 Rename disk tracing API 2016-10-02 13:56:56 -07:00
Aaron Culliney
ba09a6aba9 Refactor Disk ][ API to improve tracing conformance with AppleWin
- Binary stability change/fix : an 0xEB -> 0xFF in the sync bytes of blank.nib.gz
2016-10-02 13:55:05 -07:00
Aaron Culliney
fe63695f81 Build and fix testui on Desktop Linux 2016-09-17 13:05:26 -07:00
Aaron Culliney
6daa1aa010 Break the build if external ROMz cannot be loaded 2016-09-17 12:42:46 -07:00
Aaron Culliney
781cc60d8c Assert CPU paused when switching disk images 2016-09-17 12:24:47 -07:00
Aaron Culliney
88ca414f80 CPU thread housekeeping on shutdown 2016-09-17 12:11:10 -07:00
Aaron Culliney
8c244486e8 Fix a bug in emulation state restoration that caused disk images to be inserted read/write 2016-09-11 11:55:24 -07:00
Aaron Culliney
e479a861d7 First cut at testing save/restore of emulation state 2016-09-11 11:53:59 -07:00
Aaron Culliney
07e1c4ed83 Misc test suite improvements 2016-09-11 11:51:55 -07:00
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
b04e4ab348 Reference external ROM directory 2016-09-10 16:21:38 -06:00
Aaron Culliney
bc8091cde3 Fix Linux Desktop builds 2016-09-10 16:19:49 -06:00
Aaron Culliney
cb31ccaf9c Fix a bunch of Clang static analysis issues 2016-09-10 11:32:33 -06:00
Aaron Culliney
721ea2c172 Also copy external-disks and use them if available 2016-09-02 12:39:09 -07:00
Aaron Culliney
99953ea90a Fix genglue for paths with spaces 2016-08-27 15:18:26 -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
94ca64f08d Avoid a segfault if shader is not found ('make install' not run) 2016-08-27 09:17:16 -07:00
Aaron Culliney
35e3d6a969 Fix building with stricter Android NDK gcc 4.9 2016-08-21 08:53:39 -10:00
Aaron Culliney
b4c72c15c6 Formally disable SSI263 (speech synthesis) codepaths for now
- SSI263Thread was previously disabled (doesn't appear to be used for most games, e.g., U4 and U5)
    - As written this code would initialize 64 backend audio buffers ... this seems excessive, especially for low-end
      platforms we support (e.g., Android 2.3.3)
    - My limited understanding of these codepaths would suggest that only one phoneme should play at a time so
      presumably we should only need one additional backend audio buffer
    - We may also need to augment the soundcore/backend API to support playing/stopping these "one-shot" phonemes
    - Added assert(false) for DEBUG builds to discover which disk images blow up
2016-07-31 12:59:33 -07:00
Aaron Culliney
fe894b6ac2 Clarify codepaths for my Windoze-weary eyes 2016-07-25 21:22:36 -07:00
Aaron Culliney
eeba82ba24 Merge Mockingboard implementation from upstream AppleWin 2016-07-24 17:55:50 -07:00
Aaron Culliney
7a82bbf471 Unbreak Mockingboard codepaths 2016-07-24 17:55:07 -07:00
Aaron Culliney
7ad7b65d11 Add speaker tracing API and tests 2016-07-23 17:35:11 -07:00
Aaron Culliney
2f156d4262 Improve genglue.sh script for generating trampoline functions 2016-07-23 17:24:10 -07:00
Aaron Culliney
fc9ad6d4e1 Excise unused preprocessor macro 2016-07-23 17:23:58 -07:00
Aaron Culliney
cc9a164bec Audio codepaths now always enabled
- Supported platforms:
        - Mac/iOS (OpenAL)
        - Desktop Linux/POSIX (OpenAL)
        - Android (OpenSLES)
    - TODO : for POSIX builds we should provide our own "null" audio backend if OpenAL/OpenSL not found by build script
2016-07-23 17:23:54 -07:00
Aaron Culliney
06f8015959 Misc fixes for test stubs 2016-07-23 17:23:36 -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
635075f34b iOS port is beginning to build again 2016-07-15 21:23:37 -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
b62f5e9e7f Hackishly enforce determinism to trace testing 2016-07-15 20:28:23 -07:00
Aaron Culliney
c393ea81a0 Simplify code paths for POSIX desktop testing and fix testcpu breakage 2016-07-02 13:44:59 -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
fd5b97189a HACK : get iOS building again
- TODO FIXME : actually get proper __PIC__ code written for Mac/i386
2016-05-15 18:13:20 -07:00
Aaron Culliney
8ce1fffe89 Fix x86 __PIC__ bug when indirecting in GLUE_BANK_MAYBEREAD() 2016-05-10 22:17:37 -07:00
Aaron Culliney
28ecb323ba Be more resilient in tap/swipe gesture handler 2016-05-09 22:03:23 -07:00
Aaron Culliney
ac912ffd54 Ensure an intelligent default setting for mockingboard volume 2016-05-08 21:38:41 -07:00
Aaron Culliney
dadf5e02a1 Persist the current soft touch keyboard variant 2016-05-06 21:17:02 -07:00
Aaron Culliney
aad2f0a71e Speculative fix from a crash report from the wild 2016-05-05 21:06:52 -07:00
Aaron Culliney
70e203303e HACK : fix a test suite breakage caused by joystick button reset delay 2016-05-02 22:14:42 -07:00
Aaron Culliney
7b3eabb12f Fix x86 and x86_64 __PIC__ code for Linux and Mac 2016-05-01 18:49:18 -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
28cdb24d18 Move an assert to avoid firing on load of Mac app 2016-04-23 12:38:55 -07:00
Aaron Culliney
14108fb97b Fix Mac assembly 2016-04-23 11:52:20 -07:00
Aaron Culliney
ae75ce2798 Avoid calling glGetError() on thread without OpenGL context 2016-04-23 11:51:02 -07:00
Aaron Culliney
a77075c881 Set a lower limit to avoid thread starvation 2016-04-22 20:19:40 -07:00
Aaron Culliney
90b52702d6 Refactor __PIC__ codepaths on x86_64 2016-04-21 22:09:04 -07:00
Aaron Culliney
a5a498f96c Tweaks for arch builds 2016-04-21 22:06:42 -07:00
Aaron Culliney
7607126f7c Avoid resetting joystick buttons too soon (to allow for ClosedApple-Reset to trigger) 2016-04-17 12:51:23 -07:00
Aaron Culliney
76f29d0865 Allow emulator shutdown state to be queried as needed 2016-04-17 12:18:48 -07:00
Aaron Culliney
3ed159dd0b Lightly refactor joystick and button handling during reset
- Remove unused button2 variable
    - Remake little-used backend joystick reset function as function pointer
    - Allow soft reset and self-test on Android (although there is still a race condition due to code that directly sets
      joy_button[12] values
2016-04-17 11:42:13 -07:00
Aaron Culliney
13184ec4be Change the button gesture recognizer state machine
- Use a synchronized event queue rather than overwriting "current" button state
    - Use aggressive assertions to ensure state machine is coherent
2016-04-16 14:16:34 -07:00
Aaron Culliney
9c9ba6e7ef Render the correct activeChar when initially setting touch joystick preferences 2016-04-16 14:15:21 -07:00
Aaron Culliney
dcb35226b7 Lightly refactor max CPU speed checks
- Better naming of the pivot point (@4.0x CPU)
    - Use floating point values divisible by 2 as the constants
2016-04-16 14:08:00 -07:00
Aaron Culliney
f53dbea81e Pause CPU on Linux desktop initialization 2016-04-16 13:33:50 -07:00
Aaron Culliney
65882152a8 Insure preferences are propagated regardless of enabled state 2016-04-13 21:23:37 -07:00