Commit Graph

52 Commits

Author SHA1 Message Date
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
ed60b2ea73 Refactor VM initialization and shutdown 2015-09-11 23:03:17 -07:00
Aaron Culliney
2c97f7af19 Excise HEADLESS ... it was only being used by testcpu 2015-09-06 17:14:38 -07:00
Aaron Culliney
7d4b63e12d Refactor : move reinitialize() to timing module and make static (mostly) 2015-09-06 14:05:18 -07:00
Aaron Culliney
a031a23999 Add a video_clear() routine 2015-08-20 22:12:54 -07:00
Aaron Culliney
7ca4a2646d Optimize video drawing and API cleanup
- Enforces synchronized access to video dirty bit
2015-07-12 14:13:13 -07:00
Aaron Culliney
6a453c3973 Don't exit in video_shutdown() 2015-05-31 11:25:23 -07:00
Aaron Culliney
bcb36a4801 add codepath for RGBA_4444 textures 2015-05-30 18:58:34 -07:00
Aaron Culliney
cb72d483c0 Refactor INTERPOLATED_PIXEL_ADJUSTMENT calculations just to codepaths actually touching the internal framebuffers 2015-05-29 21:47:49 -07:00
Aaron Culliney
aee1111cb0 Better derivation of framebuffer macros 2015-05-29 21:46:37 -07:00
Aaron Culliney
1ca1e7d2cc Use parens around SCANSTEP macro 2015-05-29 21:46:14 -07:00
Aaron Culliney
1506aba551 Refactor: rename to video_reset() for clarity 2015-05-29 21:46:07 -07:00
Aaron Culliney
27ade69757 Refactor various display initialization routines to CTOR 2015-05-29 21:46:01 -07:00
Aaron Culliney
eee0dd45e3 zero-initialize buffers 2015-04-19 14:26:40 -07:00
Aaron Culliney
592c80344f Add new custom bitmap glyphs, and change load positions 2015-04-18 14:50:02 -07:00
Aaron Culliney
dcd0207525 Fix ctor load priorities 2015-04-17 22:12:13 -07:00
Aaron Culliney
2bc846d1fe Revert "Fix non-deterministic ctor load issues and use singleton for video_backend module access"
This reverts commit af95212a19.

    TODO : make ctor loads deterministic
2015-04-17 21:40:56 -07:00
Aaron Culliney
af95212a19 Fix non-deterministic ctor load issues and use singleton for video_backend module access 2015-04-16 21:53:12 -07:00
Aaron Culliney
5b5c6fa533 REFACTOR : interface menus/HUDs
- menu/HUD creation functions moved to better location and renamed
    - CPU change animation now default displays on desktop Linux (exercise common HUD codepaths with mobile)
2015-04-12 14:23:35 -07:00
Aaron Culliney
af42dc36b2 Squashed commit of the following:
CPU speed animation touch-ups, and enable building for desktop
    Rename/shuffle animation declarations and code
    Refactor backend video system to be a dynamically initialized module
    Basic CPU speed texture animation works on desktop Linux and Android
    Use static pixel buffers to avoid malloc/free churn
    Improve CPU animations
    First cut at CPU speed message animation
    Refactor some of the classic interface functions to be potentially reusable elsewhere
2015-03-22 18:53:13 -07:00
Aaron Culliney
8c66a91e14 REFACTOR : shuffle some code for improved legibility 2015-03-14 15:52:15 -07:00
Aaron Culliney
e5fde057c9 Don't create new cpu_thread on app resume 2015-03-12 14:45:17 -07: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
780905155a Only render if necessary 2015-01-23 23:37:43 -08:00
Aaron Culliney
643a431386 first cut at auto fast-loading of disk images
- automatically adjusts cpu timing to fastest if drive motor accessed recently and no audio/video
    - TODO: audio output clipping issue when (un)pausing audio outpu
2015-01-11 18:35:51 -08:00
Aaron Culliney
381d97c485 Preliminary VBL support sourced from AppleWin 2015-01-10 16:17:18 -08:00
Aaron Culliney
a7cd281037 mark other INTERFACE_CLASSIC codepaths 2015-01-10 14:14:49 -08:00
Aaron Culliney
e51a57b376 Fix PAGE2 display test 2014-11-25 21:57:57 -08:00
Aaron Culliney
a2a55d53ed Fixes for various clang static analyzer issues 2014-10-25 11:53:44 -07:00
Aaron Culliney
551cc00781 Silence a number of clang compiler warnings on Linux 2014-10-25 08:44:21 -07:00
Aaron Culliney
6858e51a75 Apple2Mac first cut and refactor common rendering code
* Based on NSOpenGLView and Apple's GLEssentials sample code
    * CVDisplayLink- or NSTimer-driven rendering
    * Works in window or fullscreen mode on Mac OSX Lion or later

TODO FIXME:
    * Breaks Linux/Posix build
    * Cocoa menu interfaces
    * Key/mouse/joystick/gamepad handling
2014-09-30 21:01:58 -07:00
Aaron Culliney
1e97564ea7 Clean up colormap initialization and fix lo and dhires Medium blue color 2014-09-18 23:03:42 -07:00
Aaron Culliney
a929ef854c Refactor video_sync() and friends
- main thread render loop goes into X11 video driver
    - removes video_sync()
2014-09-16 20:38:14 -07:00
Aaron Culliney
77e8f88edc Refactoring colormap to internal structure/array 2014-08-17 15:31:49 -07:00
Aaron Culliney
1649419b39 Fixe unused variable warnings 2014-06-14 11:50:50 -07:00
Aaron Culliney
595bab04bd Fix warnings 2014-06-14 11:26:49 -07:00
Aaron Culliney
126d049ffc Refactor to two jump vectors
* Believe needed to allow minimal change for x86_64 codepath
2014-06-07 16:05:38 -07:00
Aaron Culliney
3d45e75ea1 Refactor dhires graphics plotting to C 2014-05-23 08:46:25 -07:00
Aaron Culliney
c0e4e8ab31 refactor video_redraw to C 2014-05-20 22:47:19 -07:00
Aaron Culliney
6af5eb8be8 Fix interpolated colors 2014-05-18 21:27:19 -07:00
Aaron Culliney
0cea462c29 remove redundant code 2014-05-18 20:01:38 -07:00
Aaron Culliney
fd12c8cf53 Refactor Hires GRaphics to C 2014-05-18 19:51:34 -07:00
Aaron Culliney
57a01d28a8 Refactoring coding style for clarity 2014-05-18 14:40:53 -07:00
Aaron Culliney
95ff4adb08 Refactor hires table initializations 2014-05-17 13:45:55 -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
ab5be45000 Macroize redundant code, remove cruft 2014-04-19 19:19:26 -07:00
Aaron Culliney
b5f018f408 refactor text/lores drawing routines to C 2014-04-06 14:07:44 -07:00
Aaron Culliney
29609230bc Refactor text plotting routines to C
* Moves plot character routines to C from i386 assembly
2014-04-05 16:12:00 -07:00
Aaron Culliney
a43d31a22e Remove non-//e code paths 2014-04-05 12:22:12 -07:00