Commit Graph

1164 Commits

Author SHA1 Message Date
Aaron Culliney
234caa8c9c Consolidate hires page write handlers 2018-04-22 08:43:53 -07:00
Aaron Culliney
eb13718c5e Introduce CPU thread function annotation and enforcement 2018-04-22 08:43:16 -07:00
Aaron Culliney
51d2efba03 Streamline CPU tracing codepaths and remove some deadc0de 2018-03-31 12:48:14 -07:00
Aaron Culliney
1de71d1ff4 monocolor mode for LORES 2018-03-31 12:27:50 -07:00
Aaron Culliney
3c04e12db0 Add proper monocolor mode for HIRES80 2018-03-11 16:30:17 -07:00
Aaron Culliney
cedf7b9d0e Minor clean-up deadc0de in HGR40 generation 2018-03-11 16:28:07 -07:00
Aaron Culliney
dd42645c4c Silence some Xcode compiler warnings 2018-01-22 07:33:06 -08:00
Aaron Culliney
e898a85f50 Remove unneeded i86 assembly and fix iOS simulator build 2018-01-21 12:41:07 -08:00
Aaron Culliney
807b441ab1 Partial revert of "Mac app and tests build again"
This partially reverts commit 8f155b5190.
2018-01-20 17:42:04 -08:00
Aaron Culliney
8f155b5190 Mac app and tests build again 2018-01-20 08:14:08 -08:00
Aaron Culliney
e4e0c941d3 Refactor CPU assembly for simplicity and efficiency
- Variables needed in assembly now accessible in a struct pointer that  avoids __PIC__ nastiness
    - Reduces code size and execution time for CPU thread
2018-01-15 16:19:21 -08:00
Aaron Culliney
167263ab3a Ensure starting with clean buffer ... 2018-01-15 10:17:02 -08:00
Aaron Culliney
8b554083b4 Use "inverse" for keyboard selection color... 2017-11-26 16:20:05 -08:00
Aaron Culliney
cd6eb65fc5 Ensure color preferences set before any messaging on startup 2017-11-26 13:35:33 -08:00
Aaron Culliney
4bc61b6216 Allow access to system soft touch keyboard from top right menu 2017-11-26 13:35:04 -08:00
Aaron Culliney
a0c26386e8 malloc returns pointer ;) 2017-11-18 11:38:46 -08:00
Aaron Culliney
7a99b72f20 Allow different colorschemes with HUD devices 2017-11-11 16:02:38 -08:00
Aaron Culliney
dc5e7eee25 Allow showing system soft touch keyboard 2017-11-11 11:59:20 -08:00
Aaron Culliney
53459c9e78 Clean up a number of Xcode build warnings 2017-09-28 16:27:12 -07:00
Aaron Culliney
570147712c Get Mac and iOS builds working again
- iOS build is still super Alpha ;)
2017-09-13 20:27:42 -07:00
Aaron Culliney
981cff845b Also convert '\n' to SCODE_RET 2017-09-09 18:08:49 -10:00
Aaron Culliney
b5b79faf1d First cut at CLI ncurses video renderer
- Currently supports 40/80col TEXT modes
    - TODO : graphics scaling
2017-09-09 18:06:43 -10:00
Aaron Culliney
dd02333eae Convert raw emulator key data to ASCII (or mousetext) 2017-09-09 16:59:55 -10:00
Aaron Culliney
a055ae8b8d Minimally begin to support UTF8 2017-09-09 16:57:06 -10:00
Aaron Culliney
25e4fd0eba Allow querying whether the classic interface is showing 2017-09-09 16:55:39 -10:00
Aaron Culliney
58d2392eac Name the running man glyph 2017-09-09 16:54:43 -10:00
Aaron Culliney
ae76537a19 Name colormap indices 2017-09-09 16:53:10 -10:00
Aaron Culliney
8e6701bcbb Allow CLI dynamic choice of A/V backends 2017-09-09 15:35:00 -10:00
Aaron Culliney
2517b45720 Silence a compile warning 2017-08-27 19:18:15 -10:00
Aaron Culliney
d35d87af9f Call open() with reasonable mode setting 2017-08-27 19:17:32 -10:00
Aaron Culliney
2d5c47d534 Autotools builds on Mac somewhat 2017-08-21 17:56:20 -10:00
Aaron Culliney
85dc4e5132 Move some sources into meta directory 2017-08-19 19:57:23 -10:00
Aaron Culliney
861cb3320c Display further refactored for text mode callbacks 2017-08-15 18:44:49 -10:00
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