Commit Graph

63 Commits

Author SHA1 Message Date
Aaron Culliney
80b880550f Fix shutdown codepaths
- Ensures various shutdown codepaths (interface, cpu/audio, main/video, ...) run on proper thread(s)
    - Actually now runs the CloseAL() code
    - Try to ensure all detached threads exit ... seems to help keep Valgrind happy =)
2015-05-31 13:43:51 -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
1506aba551 Refactor: rename to video_reset() for clarity 2015-05-29 21:46:07 -07:00
Aaron Culliney
68011fa8f2 First cut at touch menu HUD
- Enables choosing touch keyboard or touch joystick
    - Enables increasing/decreasing speed
    - Enables opening main popup menu
    - Also migrates all gesture responsibility away from Java side of things
2015-05-09 19:23:52 -07:00
Aaron Culliney
c2bd14f9b5 REFACTOR : glcpuanim now manages all generic alert messages 2015-04-18 15:15:09 -07:00
Aaron Culliney
592c80344f Add new custom bitmap glyphs, and change load positions 2015-04-18 14:50:02 -07:00
Aaron Culliney
ca139ee94a REFACTOR : glanimation rechristend, touch handling genericized
- 'animation' was too constrained a name to what these do, so switch to the overloaded term 'node' ;-)
    - Touch handling is no longer the sole purview of the touchjoy, (in prep for touchable HUD elements)
2015-04-12 15:55:06 -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
d63bd7b412 macro defines for various mousetext characters 2015-04-01 19:57:12 -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
a61b7f5c39 properly brace INTERFACE_CLASSIC stuff 2015-02-16 08:47:26 -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
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
asc
34d043330b Silence some valgrind complaints 2014-12-21 13:59:04 -08:00
Aaron Culliney
031a8f51f8 Prevent some segfaults when shutting down on Linux 2014-12-21 13:51:45 -08:00
Aaron Culliney
4483105edb Don't reset joystick buttons on menu exit 2014-11-19 20:00:13 -08:00
Aaron Culliney
e5e087c4e0 Refactor joystick handling
* Removes Linux-specific joystick handling
    * Adds cross-platform GLUT joystick handling; Caveats:
        - GLUT is not robust to joystick hot plugging like my old Linux-specific code was.  (Fix should be made in the
          GLUT driver and pushed upstream if we really care)
        - Deprecated X11 renderer now can only use keypad joystick
2014-11-09 15:48:05 -08:00
Aaron Culliney
2d6ca9ce89 don't busy-sleep when paused 2014-11-02 11:46:30 -10:00
Aaron Culliney
6fdeee3896 Cleanup and fixes for compiler warnings 2014-10-31 16:27:39 -07:00
Aaron Culliney
5af194c56d Fixes main menu issue 2014-10-29 21:48: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
6c63c49d09 Improvements to Mac GUI
* Reboot... menu option
    * Disk image selection interface
    * Whitespace code changes
2014-10-12 16:43:51 -07:00
Aaron Culliney
ca29ec543d Get Linux build working with OpenGL changes 2014-10-07 22:05:14 -07:00
Aaron Culliney
eb2e038bf0 Refactor classic interface to run within its own thread
* previously this classic interface acted as an oldschool modal dialog (which worked fine with the X11 renderer
      where we actively pumped the event loop)
2014-09-16 20:42:07 -07:00
Aaron Culliney
afc15e0b63 Refactor INTERFACE_CLASS stuff out of disk API 2014-09-16 20:40: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
1649419b39 Fixe unused variable warnings 2014-06-14 11:50:50 -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
1c3fc78838 refactor game controller switches to C 2014-05-10 13:08:44 -07:00
Aaron Culliney
78a3b39f6d Interface menu changes
* Added an option to set caps lock (basing it off X11's value is not working well)
    * Added a reboot emulator option (because Ctrl-Alt-End is potentially mapped by the X11 WM. ahem, Xfce...
2014-03-25 23:42:05 -07:00
Aaron Culliney
e54ce95389 Move disk compression routines to disk module
* Makes these routines useable from alternate interfaces, (including tests)
2014-03-25 22:11:01 -07:00
asc
6864dbe3fc Remove mode option 2014-01-25 14:00:10 -08:00
asc
3abd2e87aa Refactor to use GNU build tools
* Added configure.ac and non-recursive Makefile.am
    * Modularized source into subdirectories
    * Simplified header inclusion
2014-01-22 20:51:50 -08:00
Aaron Culliney
12f6c9704e Support for dynamically changing window size
* Beginning of support for fullscreen mode
    * Fullscreen depends on "fuzzing" the graphics
2014-01-04 14:24:55 -08:00
Aaron Culliney
b5023f88f4 Interface tweaks 2014-01-01 11:36:27 -08:00
Aaron Culliney
4ada3d7319 More sanity with scancodes and keycodes
* Use defines instead of magic numbers in a bunch of places
    * Remove deprecated ii_keymaps and only use iie_keymaps
    * Allow keypad corners for emulated joystick
2013-12-29 18:07:24 -08:00
Aaron Culliney
760a409762 Remove apparently unused/unneeded js_timelimit 2013-12-29 10:58:43 -08:00
Aaron Culliney
f8d338b382 Automatically save preference on quit 2013-12-28 14:28:04 -08:00
Aaron Culliney
bca9f24ebe Update preferences for joystick modes
* Preferences file changes to support a fixed joystick
    * Simplify the interface -- remove explicitly setting joy_step
2013-12-28 13:54:26 -08:00
Aaron Culliney
b9815968a1 Various fixes for input handling
* Merges input handling into one routine called thru video_sync at refresh rate
    * Adds keypad joystick calibration routine
    * Simplify joystick calibration routines to use same codepath as main emulator joystick handling
2013-12-28 13:08:35 -08:00
Aaron Culliney
ef59e1ae9a Better PC Joystick calibration routine
* Cleaned up the parameters page
    * Tweaked main/credits page
2013-12-21 23:56:21 -08:00
Aaron Culliney
34a5fea9a7 Remove unneeded joystick parameters & preferences 2013-12-21 15:25:02 -08:00
Aaron Culliney
9900a3f283 New splash/credits screen 2013-12-15 14:59:18 -08:00
Aaron Culliney
3340997798 WIP : fix joystick parameters 2013-12-08 16:57:02 -08:00
Aaron Culliney
71d5367875 Preferences changes
* Deprecate "lazy" color modes
    * Allow setting speaker sound volume
    * Make Joystick code more generic (future support of touch input)
    * Deprecate setting emulator mode (//e is ascendant)
2013-12-06 22:55:00 -08:00
Aaron Culliney
bd64a567b0 Output the correct error message 2013-12-06 12:15:03 -08:00
Aaron Culliney
cd2cb71280 Various interface/error handling improvements 2013-12-01 12:08:17 -08:00
Aaron Culliney
a259c34b5c Support .do disk image extensions 2013-12-01 11:14:19 -08:00
Aaron Culliney
f5c8df9a4a Use zlib instead of fork/exec gzip executable
* Now all disk images are saved gzipped
2013-12-01 10:57:58 -08:00
Aaron Culliney
e6ee8db900 Rename protected variable to is_protected 2013-12-01 10:44:32 -08:00