Commit Graph

1131 Commits

Author SHA1 Message Date
Aaron Culliney
d226db8021 Better naming in font loading functions 2017-08-15 18:43:48 -10:00
Aaron Culliney
f8b4602fca Beginning to refactor display and backend video
- Futher disentangle display, interface, and video backends
    - Backend video owns the staging/intermediate framebuffer for now
    - Add the beginnings of display update callbacks
2017-08-06 12:12:12 -10:00
Aaron Culliney
0801c9f010 Be moar pessimistic about VAO availability
- TODO FIXME : refactor to dynamically check this
2017-07-31 17:49:53 -07:00
Aaron Culliney
11cf51753b Fix Desktop and Android builds after headless upheaval 2017-07-31 17:47:58 -07:00
Aaron Culliney
98aecedd65 Null renderer build can now execute tests 2017-07-30 12:42:31 -10:00
Aaron Culliney
bcbf5ac234 Refactor LOG() facilities
- Enable logging to file(s)
    - Enable log rotation
    - Allow silencing console logging (e.g., to stderr)
2017-07-30 12:24:48 -07:00
Aaron Culliney
153f1434db Rename GL_ERRLOG() to GL_MAYBELOG() 2017-07-15 15:08:42 -10:00
Aaron Culliney
51a5f5fcf7 Excise ERRLOG() in favor of LOG() 2017-07-15 14:39:15 -10:00
Aaron Culliney
3b1c72e872 Excise RELEASE_LOG() and RELEASE_BREAK() macros
- LOG() and assert() work just fine ;)
2017-07-15 14:19:31 -10:00
Aaron Culliney
3c1dcd4a69 Refactor to enable loading multiple AV backends
- Includes default 'null' backends with lowest priority
2017-07-15 13:25:00 -10:00
Aaron Culliney
97a98f0c86 Force X11 scaling to 2X and remove option for now 2017-07-15 13:16:50 -10:00
Aaron Culliney
bdbe544c3b Avoid SIGSEGV if glCheckFramebufferStatus not available 2017-07-09 15:41:43 -07:00
Aaron Culliney
aefe243620 Work around mysterious occasionally failing assert 2017-07-08 14:50:39 -10:00
Aaron Culliney
5102706441 Ensure that Apple2ix handles invalid gzipped files 2017-07-07 17:57:19 -10:00
Aaron Culliney
55cba116e4 Revert adding A2V3 format as it is unnecessary
- Re-gzipping ejected images is based solely on the file extension and not the actual file stream contents
    - Read/write disk images with extension ".gz" are re-gzipped in-place upon ejection
    - Read/write disk images without extension ".gz" are not changed upon ejection
    - Read-only disk images maintain current behavior (no modifications performed at all)
2017-07-06 19:36:37 -10:00
Aaron Culliney
ccfaa0544a Explicitly test A2V3 data 2017-07-04 08:01:02 -10:00
Aaron Culliney
c00a52cbc6 unbreak testui 2017-07-04 08:00:52 -10:00
Aaron Culliney
b9c4ec4cc3 HACK : bump the timeout to get test passing on slow devices 2017-07-04 08:00:36 -10:00
Aaron Culliney
c30c50be06 Minor renaming of internal API function 2017-07-01 11:43:00 -07:00
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
Aaron Culliney
fd7578a862 Always show touch joystick azimuth (if we're rendering the joystick axis) 2016-04-13 19:50:03 -07:00
Aaron Culliney
23a874456c Better audio defaults 2016-04-13 19:45:55 -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
9c1cfedf7d Fix some envvars on Android 2016-04-12 22:16:01 -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
b59e1ca7ab json_parse module passes new tests 2016-03-29 22:39:59 -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
0663141589 Misc tweaks 2016-02-25 21:04:23 -08:00
Aaron Culliney
6e978810db First cut at testsuite for json/prefs 2016-02-25 20:56:59 -08:00
Aaron Culliney
3120b75e00 Enforce module ctor priorities 2016-02-22 22:41:37 -08:00
Aaron Culliney
f0e55af6f0 Fix a glitch rerendering pressed ctrl key ... codegen error in ARM gcc 4.8 toolchain? 2016-02-19 21:41:34 -08:00
Aaron Culliney
699f4697df Don't leak azimuth model objects 2016-02-19 20:00:42 -08:00
Aaron Culliney
efcf0afa4e Set framebuffer dirty on restore state 2016-02-17 22:38:50 -08:00
Aaron Culliney
00a5f6e102 Fix "re-insert" disk edge case 2016-02-17 22:32:01 -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
afeaba8b2a Lock access to zlib functions and unlinking image files to prevent data loss 2016-02-17 21:31:43 -08:00
Aaron Culliney
a2b7603e53 Only reset disk stepper_phases during VM initialization and allow for save/restoring it 2016-02-17 21:10:09 -08:00
Aaron Culliney
0dbcfbc9a2 Various fixes to get Mac and iOS building 2016-02-15 21:10:16 -08:00
Aaron Culliney
fccd2629d4 Clear color should be solid and should be set by toplevel glnode 2016-02-15 14:03:52 -08:00
Aaron Culliney
bac745845b Don't allow reaching beyond buffer row bounds 2016-02-15 14:01:59 -08:00
Aaron Culliney
545376b1be Improve testcpu on desktop and fix it on Android 2016-02-15 13:32:05 -08:00
Aaron Culliney
7ef70e7943 Make use of the video memory dirty bit 2016-02-15 13:30:35 -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