Commit Graph

52 Commits

Author SHA1 Message Date
Aaron Culliney
75edac3ace First cut at implementing conformant video scanner 2018-07-29 18:33:17 -07:00
Aaron Culliney
43ab5c8233 Implement a generic debugger hook to break stepping 2018-07-29 16:43:36 -07:00
Aaron Culliney
eb13718c5e Introduce CPU thread function annotation and enforcement 2018-04-22 08:43:16 -07:00
Aaron Culliney
dd42645c4c Silence some Xcode compiler warnings 2018-01-22 07:33:06 -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
53459c9e78 Clean up a number of Xcode build warnings 2017-09-28 16:27:12 -07: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
35e3d6a969 Fix building with stricter Android NDK gcc 4.9 2016-08-21 08:53:39 -10: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
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
e073954ec8 Add a test case that shows a problem with "re-inserted" disks 2016-02-17 22:24:07 -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
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
abae59767c Enable simple heap memory fencing/scribbling in debug builds 2015-12-31 22:50:43 -08:00
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
984e15dc04 Get rid of sector deadc0de
- unnecessary with the skew_table
2015-10-16 22:15:58 -07:00
Aaron Culliney
0f9cd3a265 Refactor disk file_name to a char* 2015-10-16 21:47:56 -07:00
Aaron Culliney
f557941d07 Timing and initialization fixes 2015-09-06 15:15:33 -07:00
Aaron Culliney
a0cadc83c6 Refactor timing locking behavior
- Do not start CPU thread until after splash screen
    - Insure that only CPU thread can actually create/destroy the audio interfaces
2015-07-26 13:48:24 -07:00
Aaron Culliney
a796a9f14c c_mygetch is strictly INTERFACE_CLASSIC 2015-05-31 12:57:33 -07:00
Aaron Culliney
1ac7c7e12d Remove OpenSSL dependency, use public source SHA1 2015-02-18 15:54:04 -08:00
Aaron Culliney
1c31c1074d REFACTOR : macro defines into toggles 2015-02-16 08:47:26 -08:00
Aaron Culliney
cec638b959 Get threaded tests unstuck and rename/shuffle some code 2015-02-16 08:46:29 -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
8d35cf1d2c Rename to motor_off and record motor access times 2015-01-11 12:04:06 -08:00
Aaron Culliney
b031bdb4a6 Refactor private defines 2015-01-10 14:14:49 -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
Aaron Culliney
c075460b76 Gets OpenGL output working with testing VM and display
* Refactors test routine to its own thread to not interfere with OpenGL on main thread
    * Misc TESTING/HEADLESS switch tweaks
2014-11-22 14:24:43 -08:00
Aaron Culliney
a2a55d53ed Fixes for various clang static analyzer issues 2014-10-25 11:53:44 -07:00
Aaron Culliney
3ce9149b6f Fix more compiler warnings and possible display bugs 2014-10-25 09:00:06 -07:00
Aaron Culliney
10e03e9bc5 Get tests working again
* Refactor naming of saved CPU state variables
    * Allows convenient addressing from assembly
2014-06-22 11:17:44 -07:00
Aaron Culliney
cecc78e824 Silence clang warnings 2014-06-21 14:51:25 -07:00
Aaron Culliney
a9d094c112 Misc tweaks to get OS X target building 2014-06-21 14:28:50 -07:00
Aaron Culliney
86076697b9 BLOAD now takes a bank argument 2014-06-14 10:37:14 -07:00
Aaron Culliney
c22fbd0374 Reduce dependence on global TEMP buffer
* display.S still uses this ... will be refactored completely with new video update
2014-05-11 19:18:53 -07:00
Aaron Culliney
8b0325d60d "HEADLESS" CPP define and envvar switches
* Allows running emulator in headless mode (default for some tests)
    * setting HEADLESS=1 envvar from commandline will force headless operation
2014-04-26 13:34:35 -07:00
Aaron Culliney
e05dda9515 Better/moar display tests
* Tests lores and lores/mixed modes
2014-04-05 23:10:55 -07:00
Aaron Culliney
3005fcaa6e differentiate between typing/loading as variant of going 2014-03-30 13:58:34 -07:00
Aaron Culliney
aa43e7c0db Fixes for bsave/bload
* Warn/abort for overflows
2014-03-30 13:17:47 -07:00
Aaron Culliney
aefd1053d6 Allow programmatic setting of memory watchpoints 2014-03-30 12:35:09 -07:00
Aaron Culliney
ec76ee5b77 New debugger commands and changes
* TYPE : send debugger console through to the machine
    * LOAD : send textfile through to the same mechanism
    * FBSHA1 : get a SHA1 value of the current machine framebuffer
    * better CPU stepping functionality
2014-03-30 12:33:42 -07:00
Aaron Culliney
baf9315d01 better pthread signaling between ui and cpu threads 2014-03-30 11:17:12 -07:00
Aaron Culliney
52b087f805 sanity-check for cpu thread 2014-03-30 11:10:24 -07:00
Aaron Culliney
5d552b445c a debugger init function
* in addition this change persists breakpoints/watchpoints across reboots
2014-03-30 10:53:57 -07:00
Aaron Culliney
e57f332ff6 moar ifdefs for various macro conditional codepaths
* INTERFACE_CLASSIC : specifies the "classic" (current) menuing system
    * AUDIO_ENABLED : specifies whether audio code is enabled
2014-03-23 14:25:28 -07:00
Aaron Culliney
f34eff338b 65c02 Debugger fixen
* Threading fixes to allow CPU thread to iterate while under control of interface/video thread
2014-03-22 13:57:51 -07:00