Commit Graph

108 Commits

Author SHA1 Message Date
Aaron Culliney
a5a4a50983 HACK: Experimental fix for speaker-getting-wedged issue
- Repro: GDB breakpoint while cpu_thread() is nanosleeping() seems to produce maximum cycles_speaker_feedback, and it never clears up
2019-12-01 15:12:10 -08:00
Aaron Culliney
412fb06011 Slowpath debugging interface 2019-06-28 18:31:08 -07:00
Aaron Culliney
5a8aa065a9 Refactor/simplify spinlocking 2019-06-01 07:13:59 -07:00
Aaron Culliney
9e8a5e2134 Rename some debugger functions and mark as TESTING 2019-03-24 15:50:16 -07:00
Aaron Culliney
f038ef0346 Unify and brace thread creation with TEMP_FAILURE_RETRY() 2019-02-24 09:24:12 -08:00
Aaron Culliney
db4a71ca6f Enable Chromium systrace for all platforms 2018-11-24 15:15:34 -08:00
Aaron Culliney
ab0c796249 Do not go to max speed if no disk image "inserted" 2018-11-20 11:32:28 -08:00
Aaron Culliney
55418504f4 Fix testing after recent video scanner upheaval 2018-11-17 12:39:43 -08:00
Aaron Culliney
fb44420713 Testing is beginning to work again after upheaval
- testcpu, testvm, testdisk all look good
    - TODO : testdisplay, etc ...
2018-11-11 19:43:49 -08:00
Aaron Culliney
aabc29e924 Refresh video after CPU pause
- Fixes rendering if new video mode selected
2018-11-11 12:10:33 -08:00
Aaron Culliney
2928556be8 Optimize video scanner+generator when nothing has been drawn
- Video updates trigger one full frame + one (sub-)scanline re-generate
    - Otherwise video_scannerUpdate() doesn't do much work
2018-11-10 16:49:55 -08:00
Aaron Culliney
18d831b04c Fast disk loading is enabled from a pref 2018-11-07 06:49:16 -08:00
Aaron Culliney
75edac3ace First cut at implementing conformant video scanner 2018-07-29 18:33:17 -07:00
Aaron Culliney
aa41c89e68 Lite refactor video timing 2018-05-06 10:14:47 -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
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
53459c9e78 Clean up a number of Xcode build warnings 2017-09-28 16:27:12 -07:00
Aaron Culliney
2d5c47d534 Autotools builds on Mac somewhat 2017-08-21 17:56:20 -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
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
aefe243620 Work around mysterious occasionally failing assert 2017-07-08 14:50:39 -10: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
1be2c6fd27 A2V2 save format also saves timing information 2016-10-15 13:34:14 -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
d0b3f632e1 Further improve determinism for Mockingboard tracing 2016-10-02 13:58:50 -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
cb31ccaf9c Fix a bunch of Clang static analysis issues 2016-09-10 11:32:33 -06:00
Aaron Culliney
7ad7b65d11 Add speaker tracing API and tests 2016-07-23 17:35:11 -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
aad2f0a71e Speculative fix from a crash report from the wild 2016-05-05 21:06:52 -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
23a874456c Better audio defaults 2016-04-13 19:45:55 -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
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
3120b75e00 Enforce module ctor priorities 2016-02-22 22:41:37 -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
ba07bcc274 Avoid resetting Mockingboard state machine when all we need to do is reset the backend
- Also slightly disentangles audio initialization from reinitialization
2016-01-30 14:45:35 -08:00
Aaron Culliney
b5fbf29f21 Don't let FLASH text counter overflow 2016-01-24 11:03:50 -08:00
Aaron Culliney
1358a52eee Add but disable CPU trace on Android 2016-01-24 09:47:57 -08:00
Aaron Culliney
f8e4ba3551 FLASHing text is handled by CPU timing and not render loop 2016-01-20 23:17:39 -08:00
Aaron Culliney
175df18401 Don't use long word for cycles counter
- Lightly optimize a hot code path
    - Include debug code for testing counter overflow
2016-01-20 23:17:30 -08:00
Aaron Culliney
8626215205 Silence a number of spurious compiler warnings
- Existing warnings are now a good proxy for areas of code smell ;-)
2016-01-10 12:09:04 -08:00
Aaron Culliney
a64941694f Expose timespec_add 2016-01-07 22:42:04 -08:00
Aaron Culliney
f7cb3da434 Mark certain core emulation modules as problematic on iOS/Mac, and something we should fix 2016-01-05 00:11:58 -08:00
jvernet
5d86735a69 Fixed Crash on reboot
It crash ? Killing // ;)
2016-01-04 21:25:25 -08:00
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
01dfff2b1b Fix a build break on desktop Linux 2015-10-22 20:44:47 -07:00