Commit Graph

68 Commits

Author SHA1 Message Date
Aaron Culliney
f654fb0825 Improve calibration routine for touch keypad joystick 2019-11-10 06:58:16 -08:00
Aaron Culliney
788c6cb172 Refactor touch joystick variants
- Use end-of-video-frame callbacks for more conformant delay timing
    - Allow full octant for button side in touch keypad joystick
    - Improved response upon unambiguous touch event (e.g., octant change) to immediately press key
2019-06-02 13:08:16 -07:00
Aaron Culliney
20852bf737 Lite refactor keys API 2019-06-01 07:27:54 -07:00
Aaron Culliney
9b110224a0 Lite refactor/rename keys internal API 2019-03-10 12:17:06 -07:00
Aaron Culliney
8f4e878919 Allow ignoring font mode in conversion 2018-07-29 16:31:10 -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
981cff845b Also convert '\n' to SCODE_RET 2017-09-09 18:08:49 -10:00
Aaron Culliney
dd02333eae Convert raw emulator key data to ASCII (or mousetext) 2017-09-09 16:59:55 -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
fc9ad6d4e1 Excise unused preprocessor macro 2016-07-23 17:23:58 -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
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
261ae2efae Refactor to not use video_backend in so many places 2016-02-07 14:42:32 -08:00
Aaron Culliney
b59672815f Allow setting keyboard and HUD menu glyph scale 2016-01-02 00:14:21 -08:00
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
4258da8cbd Parse JSON that specifies alternate keyboard settings 2015-08-28 22:12:53 -07:00
Aaron Culliney
59cb3e49f9 Enable various GL Touch Keyboard settings 2015-08-23 11:42:45 -07:00
Aaron Culliney
d2b526783a Improve joystick calibration modes and keypad menus 2015-08-21 20:34:19 -07:00
Aaron Culliney
5c3791f5dc Refactor GL Touch Joystick (PART I Native changes)
- Move touch-handling code for "regular" touch joystick into separate file
    - Add new touch-handling code for "keypad" touch joystick.  This is a somewhat complex state-machine to determine
      which key to press depending on a full keypad rosette.
    - Adds a callback to vm.c to hook into keyboard read callback.  Allows us to immediately queue the next key if the
      keypad touch joystick is long-pressed for either axis or button keys.
2015-08-18 21:59:41 -07:00
Aaron Culliney
abfa6e743b Bugfix : properly show icon for joystick or keyboard 2015-07-29 21:18:25 -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
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
a796a9f14c c_mygetch is strictly INTERFACE_CLASSIC 2015-05-31 12:57:33 -07:00
Aaron Culliney
1126a319ec Misc tweaks to various GL interface objects 2015-04-26 18:12:56 -07:00
Aaron Culliney
4e23795cfd First cut at GL touch keyboard 2015-04-22 23:32:36 -07:00
Aaron Culliney
c2bd14f9b5 REFACTOR : glcpuanim now manages all generic alert messages 2015-04-18 15:15:09 -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
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
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
50cd4ac6fe Synchronize timing functions
- Avoids resetting critical speaker variables when CPU thread is churning
    - Moves pthread_* variable ownership into timing.c
2015-02-07 14:34:23 -08:00
Aaron Culliney
dd0085e3d7 key handling improvements
- keyboard joystick axes handled separately
    - discriminate more classic-interface-only codepaths
2014-12-01 22:00:45 -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
c140c5c7e0 Mini-refactor 2014-10-19 12:54:03 -07:00
Aaron Culliney
a42a10eb86 Beginnings of key handling for Apple2Mac 2014-10-12 17:09:54 -07:00
Aaron Culliney
f794098a02 Bugfix : properly handle control-modified keys
* GLUT sends the raw ascii ctrl-values, so we merely send them along in a "cooked" mode
        + It may be that some strange ctrl combinations (saw CTRL-~ or CTRL-ESC) are not properly handled this way, but
        ... not sure what can be done about this (doesn't seem to be a way to force glut to send us the non-cooked keys)
    * Legacy X11 input continues to be sent as raw values (which arguably is a better way)
2014-09-21 17:26:37 -07:00
Aaron Culliney
5e9e98bf88 Fixes keypad joystick emulation with glvideo
* This prevents resetting the joystick to the origin too soon when key is being held down
    * Verified doesn't affect legacy X11 xvideo input processing
2014-09-21 15:01:02 -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
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
4fb69a3196 Slight refactoring of key handling
* Adds a mapping from common ASCII to internal scancodes
    * Renaming for consistency
2014-08-17 15:29:06 -07:00
Aaron Culliney
1c3fc78838 refactor game controller switches to C 2014-05-10 13:08:44 -07:00
Aaron Culliney
baf9315d01 better pthread signaling between ui and cpu threads 2014-03-30 11:17:12 -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
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
58041f5105 Set/synchronize CAPSLOCK from X11 2014-01-01 11:15:54 -08:00
Aaron Culliney
8414a37025 Allow regular arrow keys to move joystick axes
* Useability enhancement for PCs without a keypad or physical joystick/gamepad ;)
    * There will be contention in programs that utilize both the joystick and arrow keys for
      different things, yet I don't know of any examples of this...
2014-01-01 10:55:57 -08:00