Aaron Culliney
f5bbda4c6e
Refactor HUD model to allow scaling font glyphs
...
- Should be less pixelation of touch keyboard on large tablet screens
2016-01-01 15:02:29 -08:00
Aaron Culliney
a54a69efcc
Call "super init" during HUD model creation
2015-12-31 22:54:34 -08:00
Aaron Culliney
abae59767c
Enable simple heap memory fencing/scribbling in debug builds
2015-12-31 22:50:43 -08:00
Aaron Culliney
9fd288c0b9
Remove aggressive assert that fired on Cyanogen device (even with a valid CPU pause/resume lifecycle) ...
2015-12-20 15:04:20 -08:00
Aaron Culliney
d69b416c58
Lightly refactor emulator joystick API in preparation for more comprehensive refactor
2015-12-19 13:01:28 -08:00
Aaron Culliney
c7c209907b
Allow for keyboard to completely own/cover screen
...
- Includes updated alternate/custom keyboards
2015-12-19 12:56:24 -08:00
Aaron Culliney
5bd7ff2fe1
Simplify switching to "useralt" touch keyboard
2015-12-16 22:15:19 -08:00
Aaron Culliney
69b096ec14
Avoid showing redundant 0 nibble
2015-12-16 21:33:25 -08:00
Aaron Culliney
f872e0c05c
fix i386 variant of op_SBC_dec (now re-passes tests on x86 Android)
2015-12-16 21:12:45 -08:00
Aaron Culliney
5211722d63
Switch to using DSK to speed up tests on Android
2015-12-16 21:11:52 -08:00
Aaron Culliney
785577e252
Fix some compiler warnings in testdisk.c
2015-12-16 21:11:35 -08:00
Aaron Culliney
3a20c96296
Check more paths in attempt to satisfy test suite disk insertion
...
- This is mainly to accommodate disk locations on Android
2015-12-16 21:01:50 -08:00
Aaron Culliney
9e5274ee18
Flip-flop test to correctly account for e5f08849
2015-12-16 20:56:20 -08:00
Aaron Culliney
26e452c3a3
Avoid bufover in testsuite -- sprintf() already writes terminating null byte!
2015-12-16 20:53:16 -08:00
Aaron Culliney
2dbd77e344
Excise uthash.h from testcpu suite
...
- Works around issue where Android NDK GCC 4.8/4.9 would take an inordinate amount of time when compiling testcpu with -O2
2015-12-14 23:56:48 -08:00
Aaron Culliney
699746a743
Alleviate compiler warnings in testvm/testdisplay
2015-12-14 23:55:08 -08:00
Aaron Culliney
74e97ccc97
Alleviate compiler warnings in testcpu
2015-12-14 22:11:29 -08:00
Aaron Culliney
1f0021667b
Fix display test failures
...
- New framebuffer SHAs result of recent improvements to DHIRES colors
2015-12-14 18:59:44 -08:00
Aaron Culliney
341885e233
Undo selected character highlight when keyboard fades out
2015-12-13 13:38:03 -08:00
Aaron Culliney
87761df512
Avoid using magic row/column numbers when redrawing adjacent characters
2015-12-13 13:24:25 -08:00
Aaron Culliney
22914de79c
Enable setting to show/hide disk read/write HUD messages
2015-12-12 12:01:41 -08:00
Aaron Culliney
edf42b81f9
Improve disk quick save/restore
...
- Flush disk I/O on save
- Ignore ephemeral track_valid/track_dirty bits
- Insure disks are ejected if there was a problem loading state
2015-12-12 00:21:27 -08:00
Aaron Culliney
0aed046b5e
Simplify modulo offset calculations in trackimage
2015-12-12 00:17:58 -08:00
Aaron Culliney
ef1963a175
Avoid potential read off end of trackimage
2015-12-12 00:16:14 -08:00
Aaron Culliney
0f98a34e06
Refactor naming of user-chosen alternate keyboard
2015-12-09 22:11:44 -08:00
Aaron Culliney
1147ce7cd7
Avoid crash potential by doing less during resource acquisition
...
- (This also would have fixed ctrlPressed background bug -- previous 02147f3d
commit)
2015-12-09 21:56:28 -08:00
Aaron Culliney
02147f3d9a
Refactor and avoid NULL deref edge-case
...
- Bug was triggered if ctrlPressed was true when going to background. Foregrounding would reset/NULLify the
GLModel, but attempt to render the ctrl key highlighted before the new GLModel was fully created.
2015-12-09 21:25:09 -08:00
Aaron Culliney
943b8842f7
Show disk track sector change animations
2015-12-07 23:03:44 -08:00
Aaron Culliney
05698c6a5e
Avoid another audio buffer overflow manifesting on Kindle
2015-11-29 22:14:55 -08:00
Aaron Culliney
5a9770829e
Fix commentary and ignore expected_bytes if set to zero
2015-11-29 13:31:17 -08:00
Aaron Culliney
ff204a4300
Slight refactor to move common ".gz" extension handling code to interface module
2015-11-29 13:23:13 -08:00
Aaron Culliney
b9d6d38b17
First cut at save/restore emulator state feature
...
- This adds to overall UX ... (you can finally finish some very difficult arcade games by strategically leveraging
this feature)
- Currently enabled for Android, but not Android-specific
2015-11-22 18:22:01 -10:00
Aaron Culliney
46c286719f
Fix Android build after Mac iteration
2015-11-14 11:09:33 -08:00
Aaron Culliney
29fd1f5025
Bugfix : avoid massively overflowing heap memory
2015-11-14 09:56:11 -08:00
Aaron Culliney
33160be9ac
Disambiguate texture name from texture() function in basic fragment shader
2015-11-14 08:09:10 -08:00
Aaron Culliney
0aacdfa9e5
Various fixes from Apple Clang static analyzer
2015-11-14 08:03:44 -08:00
Aaron Culliney
a61fd339a6
Various fixes to get Mac build compiling
2015-11-14 08:01:20 -08:00
Aaron Culliney
a41dc46eee
Fix broken menus on x86 Android
...
- Make it explicit that we are dealing with uint8_t values and not ambiguous signed int values
2015-11-10 22:22:31 -08:00
Aaron Culliney
e4c669f016
x86 builds and basically works on Android x86 devices
2015-11-09 22:45:52 -08:00
Aaron Culliney
f06257b2c5
Add ARM assembly PIC without TEXTREL
...
- Adds codepaths that allow for Position Independent Code (PIC) that also avoids having TEXT relocations (TEXTREL)
that the dynamic linker needs to patch up
2015-11-08 14:42:03 -08:00
Aaron Culliney
7a8c4dda63
Update generated file
2015-11-07 10:44:08 -08:00
Aaron Culliney
63b6e0a29a
Fix my blended rendering on Tegra 2 (and arguably globally)
2015-11-07 10:36:20 -08:00
Aaron Culliney
f423c2dbe6
Work around broken Tegra 2 GPU
2015-11-06 22:18:16 -08:00
Aaron Culliney
dd7727f757
Simplify fragment shader and remove dead macro
2015-11-06 21:20:33 -08:00
Aaron Culliney
9b56050c1e
All the Broken Adrenos!
2015-11-02 20:46:16 -08:00
Aaron Culliney
20f79dc5eb
Avoid buffer overflow
...
- Appears to fix a crash on Kindle Fire 1st Gen
2015-10-30 23:14:20 -07:00
Aaron Culliney
84fe0dd479
Fix crash on Nexus 10 device due to regfree()ing something not regcomp()ed
2015-10-30 23:12:12 -07:00
Aaron Culliney
616428a03f
Slightly improved DHIRES colors
2015-10-26 23:11:29 -07:00
Aaron Culliney
e5f08849ae
revert back to sync byte and state reason
2015-10-25 13:51:54 -07:00
Aaron Culliney
aa9a89a3e4
Flag an assert that needs to be rethought
2015-10-24 14:29:52 -07: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
Aaron Culliney
4ae7e3e735
Silence potentially abusive logging in disk VM callbacks
2015-10-20 20:57:52 -07:00
Aaron Culliney
4742d4e03e
Misc moar logging
2015-10-20 20:51:21 -07:00
Aaron Culliney
df38695779
HACKish commit to ignore SIGABRTs
...
- FIXME TODO ... investigate why these are triggering occasionally on Droid builds
2015-10-20 20:47:08 -07:00
Aaron Culliney
d23a435b56
Use mmap for disk I/O
2015-10-18 16:27:07 -07:00
Aaron Culliney
d46a62a4dd
Refactor to load whole disk image into memory
2015-10-18 15:24:34 -07:00
Aaron Culliney
b496d771f6
Moar data for disk write tracing
2015-10-18 12:44:24 -07:00
Aaron Culliney
41ae0266e2
Bugfix : flush disk buffer data on initialize
...
- Fixes disk image corruption issue that was manifesting in testing
- Out-of-space test(s) now results in a disk image with a correct length byte of 0x20 for the final "JUNK7" file in
the disk image's VTOC
2015-10-18 12:11:09 -07:00
Aaron Culliney
7a2f919175
Refactor load/save track data API
2015-10-17 14:28:08 -07:00
Aaron Culliney
39c09a042f
Do not return sync bytes if no image inserted
...
- This really should be backed by more testing or research =P
2015-10-17 13:23:49 -07:00
Aaron Culliney
053a4c8c93
Safety : flush/close file before calling zlib_deflate on it
2015-10-17 12:02:21 -07:00
Aaron Culliney
1d5c20cc5f
Remove deadc0de
2015-10-17 11:40:56 -07:00
Aaron Culliney
c6244f696f
tweak temp error handling
2015-10-17 10:58:51 -07:00
Aaron Culliney
3ab75c6214
Refactor : improved error handling of track write
2015-10-17 10:58:29 -07:00
Aaron Culliney
989a5ce7c1
Refactor : improved error handling of track read
2015-10-17 10:51:37 -07:00
Aaron Culliney
8261590899
Refactor : improved error handling in disk6_insert
2015-10-16 22:49:59 -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
10bb19ecc5
Minor refactor internal API
2015-10-16 20:34:15 -07:00
Aaron Culliney
4e478d369c
Refactor disk interface API function names
2015-10-15 22:51:44 -07:00
Aaron Culliney
52d74aa43c
Improved disk prefix utility functions
2015-10-15 21:02:52 -07:00
Aaron Culliney
57b7d930d6
User lower-level I/O with temp failure retries
2015-10-15 20:59:31 -07:00
Aaron Culliney
9eee9293bc
Some defensive coding and moar flushing
2015-10-15 20:44:40 -07:00
Aaron Culliney
ce7596754b
Refactor various codepaths for clarity #3
2015-10-13 20:52:10 -07:00
Aaron Culliney
a5854a20f6
Refactor various codepaths for clarity #2
2015-10-12 23:11:23 -07:00
Aaron Culliney
7a0255ff8b
Refactor various codepaths for clarity
2015-10-12 22:30:21 -07:00
Aaron Culliney
6d60116c92
BUGFIX : nasty classic assign versus equality check
...
- I blame myself, but WTF did I not previously see a warning from GCC or Clang with -Wall ?!
- Hooray for pedantic testing!
2015-10-12 21:29:54 -07:00
Aaron Culliney
3b832a1aba
No really, post out-of-space stability testing of raw disk image bytes
2015-10-12 20:30:54 -07:00
Aaron Culliney
427a90d755
Post out-of-space stability testing of raw disk image bytes
2015-10-12 20:17:05 -07:00
Aaron Culliney
b8a3521ee5
Calculate disk reverse translate table once at CTOR time
2015-10-11 13:21:45 -07:00
Aaron Culliney
ddd479f271
BUGFIX : don't read past the track buffer
...
- Causes a disk image stability test to go green =)
2015-10-11 12:19:36 -07:00
Aaron Culliney
aa225d6e48
Add some new disk I/O tests for stability
...
- test that BLOADing a bunch of junk files results in expected data
- test that disk image files themselves are unchanged after the battery of tests
2015-10-11 11:51:51 -07:00
Aaron Culliney
7c7a96af71
Refactor : rename to track_width for clarity
2015-10-10 22:38:57 -07:00
Aaron Culliney
51f5bc64ba
Expose macro globally
2015-10-04 14:39:53 -07:00
Aaron Culliney
f4fa5670b4
Add function-call time tracing for Linux/Android
2015-10-04 14:22:26 -07:00
Aaron Culliney
b3ad0ae4ac
Seems more symmetric =P
2015-10-04 14:14:04 -07:00
Aaron Culliney
d93a91cca8
Tests build and run on Desktop Linux and Android
2015-10-04 13:29:17 -07:00
Aaron Culliney
236b8e358a
INITHELLO with -UCONFORMANT_TRACKS now passes
2015-10-04 12:35:38 -07:00
Aaron Culliney
aa5b9eb971
Safer CPU/audio lifecycle management that appears to fix a deadlock on Kindle Fire 1st Gen
2015-10-02 00:11:49 -07:00
Aaron Culliney
be797efce5
Remove some deadc0de
...
- No longer worrying about softkeyboard showing on mobile since we have a custom GL touch keyboard
- Move some stuff that is desktop-only to that codepath
2015-09-30 21:58:33 -07:00
Aaron Culliney
f7acde244c
Work around broken Adreno 200 GPU
...
- Rework checks to compare with POSIX Regexs ... which themselves appear broken with android-10 NDK ... sigh
2015-09-30 21:55:07 -07:00
Aaron Culliney
518738304f
Defensive coding around glGetString()
2015-09-27 14:29:10 -07:00
Aaron Culliney
e51aaa1695
Work around broken Adreno 200 GPU
2015-09-27 11:51:40 -07:00
Aaron Culliney
f627ccef3f
Fix n00b shader mistake (conditional code in shader) =D
2015-09-27 11:49:58 -07:00
Aaron Culliney
d90b523440
process crashes in-situ on Android device
2015-09-26 15:20:54 -07:00
Aaron Culliney
47ce10b3a4
Remove some deadc0de from timing.c
2015-09-26 14:49:13 -07:00
Aaron Culliney
b8921b8441
Integrate Breakpad crash dumper and tools into Android build
...
- Includes Linux x86_64 binaries dump_syms and minidump_stackwalk
- Includes adb_sanitize.c tool (gcc -std=gnu11 -o adb_sanitize adb_sanitize.c) for easily pulling local minidumps
2015-09-19 13:11:27 -07:00
Aaron Culliney
5692c1dc95
Submit a number of quiet samples on first initialization
...
This seems to make it a little less choppy on mobile first launch
2015-09-15 22:18:43 -07:00
Aaron Culliney
d25acb1da0
Silence logging in touch dispatch by default
2015-09-15 20:39:30 -07:00
Aaron Culliney
5dadc922fd
Simplify mobile lifecycle at the expense of holding onto audio resources
...
- This does not seem to be a problem with both modern and older Gingerbread devices
2015-09-13 14:24:17 -07:00
Aaron Culliney
97f8ef1f45
Just assume is on button side if not on axis side
2015-09-13 14:12:16 -07:00
Aaron Culliney
f343ad9dbd
Get Mockingboard working somewhat better
2015-09-13 12:43:34 -07:00
Aaron Culliney
c8d7f9cba3
Let chooser interface handle skipping rather than native
2015-09-13 11:23:59 -07:00
Aaron Culliney
b2cb35c182
Lifecycle tweaks that get Android building again
2015-09-12 15:33:22 -07:00
Aaron Culliney
0321c27de6
Improve video cleanup codepaths from what I can discern are the OpenGL best practices for memory management
2015-09-12 15:06:06 -07:00
Aaron Culliney
d263478e83
Use calloc() for soundcore allocations
...
- Avoids potential for transacting upon uninitialized memory, thank you Valgrind
2015-09-12 15:04:09 -07:00
Aaron Culliney
db46b281cc
Fix -UCONFORMANT_TRACKS testing (with vanilla gzipped test disk images)
2015-09-11 23:37:52 -07:00
Aaron Culliney
ed60b2ea73
Refactor VM initialization and shutdown
2015-09-11 23:03:17 -07:00
Aaron Culliney
ea43b56644
Avoid leaking PQList_s
2015-09-07 11:27:32 -07:00
Aaron Culliney
2cbc53ef45
Correctly zero-out entire structure
2015-09-07 11:07:49 -07:00
Aaron Culliney
ef7472b3ac
Fix invalid assert ... system_buffer_size can be modified lower
2015-09-07 11:05:22 -07:00
Aaron Culliney
411e474c4b
cpu suspend mutex does not need to be recursive ... this should not be re-entrant
2015-09-07 11:00:07 -07:00
Aaron Culliney
0b8f9d2dfb
Test parameters change when not -DCONFORMANT_TRACKS=1
...
- BUG : INIT HELLO not working for DO and PO images with CONFORMANT_TRACKS undefined
2015-09-06 23:31:02 -07:00
Aaron Culliney
cd1669dfca
Refactor out abusive traces into different test file
2015-09-06 22:57:51 -07:00
Aaron Culliney
a1c497bfa0
Lightly refactor testing codepaths for desktop Linux and Android
2015-09-06 22:10:25 -07:00
Aaron Culliney
e4c06c67a7
properly segregate audio-specific codepath
2015-09-06 17:24:48 -07:00
Aaron Culliney
2c97f7af19
Excise HEADLESS ... it was only being used by testcpu
2015-09-06 17:14:38 -07:00
Aaron Culliney
2cf119b5e9
use static inline function rather than macro for easier debugging
2015-09-06 15:18:22 -07:00
Aaron Culliney
f557941d07
Timing and initialization fixes
2015-09-06 15:15:33 -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
f95a00df7b
Silence some Clang complaints
2015-09-06 13:55:17 -07:00
Aaron Culliney
e108f4591a
Fix a broken assertion ... compare samples size, not bytes size
2015-09-06 13:54:45 -07:00
Aaron Culliney
3b5f57b0cf
Get tests working again on desktop Linux
2015-09-05 12:22:29 -07:00
Aaron Culliney
3ddfe2953e
Less blatant RGBA_8888 favoritism
2015-09-05 11:38:35 -07:00
Aaron Culliney
f05d1d0311
UI/UX : clean up alert view borders
2015-09-05 11:34:03 -07:00
Aaron Culliney
4f19ad3735
Better contrast for messages
2015-09-05 00:15:24 -07:00
Aaron Culliney
4985d52169
nodes are doubly-linked list and correctly render from lowest to highest (opposite of touch dispatch)
2015-09-05 00:13:48 -07:00
Aaron Culliney
2b80c35d69
Bug fix : do not access lower stack memory from outside scope!
2015-09-04 23:35:15 -07:00
Aaron Culliney
4cad470a03
Allow small space to show in alternate/configurable keyboard
2015-09-04 23:12:41 -07:00
Aaron Culliney
be048746c5
Bug fix and optimize keyboard texture drawing
...
- preserve the semi-opaque halo
- rerenders flip/flop red/green values in place
- lower memory footprint
- simplify codepaths
2015-09-04 22:27:57 -07:00
Aaron Culliney
75ecc47307
Bugfix : show correct current button character
2015-09-04 20:35:42 -07:00
Aaron Culliney
c09fc33e98
Simplify axis selection algorithm and add commentary
2015-09-03 22:24:27 -07:00
Aaron Culliney
8ffdb8461a
Better comment for the current serious deficiency
2015-09-03 22:23:06 -07:00
Aaron Culliney
54587d166d
Less choppy axis timing
2015-09-03 22:22:44 -07:00
Aaron Culliney
287df44133
Move tap delay to joystick variant
...
- Keypad variant already has a key repeat threshold
- Improved variant touch lifecycle naming
2015-09-02 22:47:48 -07:00
Aaron Culliney
f046af0bef
Improve state machine for keypad joystick; expire touch sources that have gone up
2015-09-02 22:45:00 -07:00
Aaron Culliney
fd2e65dd42
Bugfix : do not turn off caps_lock unless ownsScreen is also true
2015-09-02 22:33:56 -07:00
Aaron Culliney
2ae673e221
Balance touch indices decrement with increment
2015-09-02 22:33:13 -07:00
Aaron Culliney
5eb51419b0
Ignore multi-touch within a particular screen division (only one touch per Axis/Button side)
2015-08-30 17:04:28 -07:00
Aaron Culliney
27723be6cb
Improved touch keypad joystick key repeat codepaths
2015-08-30 16:54:39 -07:00
Aaron Culliney
37e540180e
Better handling of ctrl-key state and avoid conflict with keypad touch joystick
2015-08-29 12:12:29 -07:00
Aaron Culliney
8b02cb5f17
Cleaner logic for switching between soft keyboards
2015-08-29 12:07:56 -07:00
Aaron Culliney
158449e7fb
Force CapsLock for Joystick Keypad for now
2015-08-29 12:05:09 -07:00
Aaron Culliney
2cd60c3c88
Expose all three touch interfaces in the sprouting menu for easier switching
2015-08-29 10:42:24 -07:00
Aaron Culliney
977cd9282d
Lifecycle bugfix : don't override custom alternate/arrow keyboard configurations
2015-08-29 09:43:47 -07:00
Aaron Culliney
4258da8cbd
Parse JSON that specifies alternate keyboard settings
2015-08-28 22:12:53 -07:00
Aaron Culliney
0bd9591348
Include jsmn JSON parsing code; add our own wrapper for processing JSON daata from files
2015-08-28 22:09:35 -07:00
Aaron Culliney
49c99d5ab7
Beginnings of customized alt touch keyboard layout
2015-08-23 15:03:30 -07:00
Aaron Culliney
59cb3e49f9
Enable various GL Touch Keyboard settings
2015-08-23 11:42:45 -07:00
Aaron Culliney
5df1e2400e
Add ability to hide joystick controls overlay
2015-08-22 11:05:18 -07:00
Aaron Culliney
704c381ea8
Logging should automatically print function
2015-08-21 23:43:19 -07:00
Aaron Culliney
3f934ecd3f
Fix cycling between different touch devices in the GL touch menu
2015-08-21 23:33:08 -07:00
Aaron Culliney
52ef663a2c
toggle sprouting menu
2015-08-21 21:01:51 -07:00
Aaron Culliney
d2b526783a
Improve joystick calibration modes and keypad menus
2015-08-21 20:34:19 -07:00
Aaron Culliney
a031a23999
Add a video_clear() routine
2015-08-20 22:12:54 -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
77e96ba1ec
Misc touch keyboard tweaks
...
- Enable tab key
- Allow nonactionable keys to be tapped when in configuration mode
- Add font mini visual for spacebar
2015-08-12 22:38:21 -07:00
Aaron Culliney
03d27dd2b2
touch keyboard now returns key and scancode in flags
2015-08-09 14:21:09 -07:00
Aaron Culliney
7344cadfbd
More joystick settings including calibration mode
2015-08-02 14:29:34 -07:00
Aaron Culliney
af04ba94d1
Migrate file globals into file static struct
2015-08-02 12:44:44 -07:00
Aaron Culliney
324d900c35
First cut at Android touch joystick configuration
2015-08-01 17:33:29 -07:00
Aaron Culliney
53f0999f5a
Bugfix : use int64_t for onTouchEvent flags
2015-08-01 16:41:49 -07:00
Aaron Culliney
0d658932b6
Expose particular settings back to Android so we can persist the values
2015-07-30 23:12:00 -07:00
Aaron Culliney
0bc8869627
nativeOnTouch() now returns various state flags
...
- Allows playing of a key click sound if a keyboard item tapped
- Improves stovepiping the native request to show the Android main menu
2015-07-30 22:05:21 -07:00
Aaron Culliney
abfa6e743b
Bugfix : properly show icon for joystick or keyboard
2015-07-29 21:18:25 -07:00
Aaron Culliney
7067d10949
Android touch menu configurations
2015-07-28 22:22:25 -07:00
Aaron Culliney
25b9f3d3f3
Android lifecycle cleanups
...
- Differentiate between cpu_pause() when going to menu (and app is still foregrounded, and cpu_pauseBackground()
when a system backgrounding event has occurred.
- Destroy/free audio resources owned by CPU thread when background is requested, put CPU thread into waiting upon
pthread condition to resume.
- Mobile device now always signals pthread condition to force CPU thread resume from background
2015-07-27 22:36:39 -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
fa1de4dee7
Silence some logging
2015-07-26 10:41:12 -07:00
Aaron Culliney
36baaa04d5
Allow dynamic configuration of audio latency
...
- This allows for user-configured device-specific tuning (which makes sense in the Android world with 10,000+
different devices out there ;-)
2015-07-25 12:57:16 -07:00
Aaron Culliney
bca223780c
Properly set speaker volume
2015-07-24 22:21:01 -07:00
Aaron Culliney
5291ee750d
Add MB_ISEnabled() function
2015-07-23 23:46:23 -07:00
Aaron Culliney
2ae8468b10
Fix desktop Linux build break
2015-07-12 14:29:47 -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
2a0a9c03b7
Misc speaker codepath tweaks
2015-07-12 13:01:25 -07:00
Aaron Culliney
432d2fb563
Renamed some speaker API methods
2015-07-12 13:00:39 -07:00
Aaron Culliney
5f4bf6b1a7
Use single buffer queue callback for OpenSLES/Android
...
- OpenSLES Callback now performs simple mix of 2 sources (speaker and mockingboard)
- Avoids multiple callbacks which was a performance penalty especially for low-end droids
2015-07-12 12:59:49 -07:00
Aaron Culliney
2381868c63
Enable speaker stereo output
2015-07-11 14:21:07 -07:00
Aaron Culliney
1b4962169a
Enabled backfilling quiet samples for stereo
...
- This is a bit of a hack that fixes mockingboard glitching
2015-07-08 20:14:16 -07:00
Aaron Culliney
60d32583ae
Gets mockingboard playing with OpenSLES backend
...
- At ring buffer boundaries, we submit first the beginning of the samples buffer and then the end
2015-07-07 21:36:42 -07:00
Aaron Culliney
0cefe60e06
Force OpenSLES to start playback immediately
...
- Without this, mockingboard will queue a few samples on U5 boot, but then it won't restart
2015-07-07 21:32:43 -07:00
Aaron Culliney
edaa7be34f
Avoid segfaults and deadlocks in backgrounding/foregrounding on Android
2015-07-05 13:40:50 -07:00
Aaron Culliney
38813bb2a1
Revert "Avoid segfault in render thread on mobile shutdown codepath"
...
This reverts commit ddefceaf08
.
- need an additional boolean instead
2015-07-05 13:29:35 -07:00
Aaron Culliney
4305909d67
Expose some timing constants
2015-07-05 13:17:41 -07:00
Aaron Culliney
dfbb13906a
Working buffer size should be around 0.1-0.3 sec of data
...
- This appears to work on a wide grange of older Gingerbread through to the latest Nexus class devices
- TODO : we really should write a dynamic calculation/adjustment routine to determine the best working buffer for
any device this code runs on =)
2015-07-05 13:16:20 -07:00
Aaron Culliney
8ecab7cf91
Eliminate using a local variable
2015-07-05 12:58:43 -07:00
Aaron Culliney
e04f5c046c
Just use the workingBytes for bytes_queued calculation
2015-07-05 12:57:24 -07:00
Aaron Culliney
ddefceaf08
Avoid segfault in render thread on mobile shutdown codepath
2015-07-04 18:18:06 -07:00
Aaron Culliney
ada6d7a0be
Pause/resume CPU/audio together
2015-07-04 18:17:04 -07:00
Aaron Culliney
c036c8dc84
Defensive coding around case where backend soundsystem is unavailable
2015-07-04 18:13:01 -07:00
Aaron Culliney
2910b6180e
Avoid speaker_going_silent codepath on Android
2015-07-04 18:11:58 -07:00
Aaron Culliney
43f6eff62e
Avoid segfaults if mockingboard not initialized
2015-07-04 18:11:12 -07:00
Aaron Culliney
b717e829a7
Override assert() to get messages
2015-07-04 18:08:43 -07:00
Aaron Culliney
2aba9a5ba1
Better OpenSLES backend implementation for Android
...
- Uses buffer values gleaned from Android system
- Removes completely unnecessary playq and uses ringBuffer instead with read/write heads
- ringBuffer includes a certain amount of "overflow" space for callback convenience
2015-07-04 18:01:44 -07:00
Aaron Culliney
0c6fe702e5
Simplify the going-silent logic
2015-07-02 20:37:06 -07:00
Aaron Culliney
a9307aa827
Remove hardcoded sample rate and buffer sizes
...
- Audio backend now specifies the sample rate and min/ideal buffer size for mono and stereo audio
- Increase maximum speaker amplitude
2015-07-02 20:24:59 -07:00
Aaron Culliney
d5b7b5263c
Misc tweaks
2015-06-30 22:10:30 -07:00
Aaron Culliney
951b4518c1
Expose device-preferred audio parameters to native
2015-06-28 12:49:26 -07:00
Aaron Culliney
d01b220b21
Remove spurious checkin
2015-06-28 10:56:11 -07:00
Aaron Culliney
afeffdab79
Tweak to avoid GCC complaint
2015-06-27 13:14:32 -07:00
Aaron Culliney
bb8d51817b
First cut at Android OpenSLES backend
2015-06-27 11:48:00 -07:00
Aaron Culliney
c4397123cb
Assert that there is only one backend renderer
2015-06-22 22:21:27 -07:00
Aaron Culliney
5b7afea0b4
Refactor : use the new common playqueue code
2015-06-22 22:21:09 -07:00
Aaron Culliney
7a2d1725c7
A simple audio buffer play queue implementation
2015-06-22 22:20:32 -07:00
Aaron Culliney
be7a6267e2
Refactor : call openal_systemShutdown from failed creation
2015-06-20 14:28:27 -07:00
Aaron Culliney
20054a9171
Refactor : avoid early return
2015-06-20 13:49:35 -07:00
Aaron Culliney
2839e92ce4
Refactor : simplify check for available buffers
2015-06-20 13:16:24 -07:00
Aaron Culliney
9a7090c3a4
Refactor : begin excising use of uthash
...
- While uthash is excellent, it is too heavyweight for a custom collection that has a maximum of 4 elements
2015-06-20 13:02:18 -07:00
Aaron Culliney
2824dfa752
Refactor : clarify buffer play list variable
2015-06-20 12:18:42 -07:00
Aaron Culliney
0aecc83744
Refactor : shuffle moar code around for clarity
2015-06-20 12:11:53 -07:00
Aaron Culliney
8ab4c18de5
Refactor : shuffled code locations to eliminate forward declarations
2015-06-20 11:51:15 -07:00
Aaron Culliney
7b0c5be7c8
Refactor : style and API cleanups
2015-06-20 11:39:23 -07:00
Aaron Culliney
b5ebec1939
Refactor : various style tweaks and optimizations
2015-06-20 11:19:29 -07:00
Aaron Culliney
81941295e6
Refactor : simplify audio buffer API
2015-06-20 00:01:17 -07:00
Aaron Culliney
3ed43fa43c
Refactor : remove enumerate devices and other API simplifications
2015-06-19 22:03:48 -07:00
Aaron Culliney
f353a11ec5
Refactor : clarify _this and _internal parameters
2015-06-17 20:54:51 -07:00
Aaron Culliney
5beb1ce476
Fix build break
2015-06-17 20:39:12 -07:00
Aaron Culliney
433f079610
Refactor : renamed methods and eliminated unused parameters
2015-06-16 23:32:19 -07:00
Aaron Culliney
060c95e873
Refactor : remove unnecessary DSGetLock()
2015-06-16 23:19:02 -07:00
Aaron Culliney
72389b941a
Refactor : clarify basic subsystem interface
2015-06-16 23:02:25 -07:00
Aaron Culliney
107db0dbde
Refactor : remove apparently unneeded call to GetStatus
2015-06-16 22:47:37 -07:00
Aaron Culliney
6059bf370b
Refactor : change API method to return error code instead of a success boolean
2015-06-16 22:43:50 -07:00
Aaron Culliney
17cfb8c3a3
Refactor : remove unused code and make constant code constant
2015-06-16 22:39:35 -07:00
Aaron Culliney
6a4fe7bfa1
Refactor : prettify get buffer lock function
2015-06-16 22:28:53 -07:00
Aaron Culliney
e0fe2e62f7
Refactor : remove moar deadcode!
2015-06-16 22:19:19 -07:00
Aaron Culliney
f41dc9b68a
Refactor : remove enumerated audio devices from file scope and eliminate \n from logs
2015-06-16 22:17:18 -07:00
Aaron Culliney
26d3cda215
Refactor : initialization and shutdown codepath cleanup
2015-06-16 21:45:45 -07:00
Aaron Culliney
43d98235fd
Refactor : cleaned up a bit of deadcode
2015-06-16 21:33:31 -07:00
Aaron Culliney
a2663298d1
Refactor : coalesce two structs into one for clarity
2015-06-16 21:18:52 -07:00
Aaron Culliney
ba42037473
Refactor : remove PVOICE typedef
2015-06-16 20:41:18 -07:00
Aaron Culliney
7552d64d74
Refactor : rename variable for clarity
2015-06-15 22:33:18 -07:00
Aaron Culliney
6a12ae4081
Refactor : simplify function-pointer assignment
2015-06-15 22:24:51 -07:00
Aaron Culliney
538b0aacd7
Refactor : rename some structures for clarity
2015-06-15 22:19:23 -07:00
Aaron Culliney
aedada03e9
Refactor : remove unused ivars
2015-06-15 22:07:09 -07:00
Aaron Culliney
d6b5c19584
Refactor : rename a number of structures and constify a few public API methods
2015-06-15 21:50:46 -07:00
Aaron Culliney
8dd82642d3
Refactor : rename audio subsystem initialization and shutdown functions
2015-06-14 15:05:44 -07:00
Aaron Culliney
59e95a19b1
Refactor : add annotations to a few more functions
2015-06-14 14:56:53 -07:00
Aaron Culliney
33a13abbc2
Refactor : Better segregation and modularization of the audio backend functions
2015-06-14 14:46:15 -07:00
Aaron Culliney
7fd1b350c2
Refactor : hide non-public OpenAL internal API
2015-06-14 14:07:33 -07:00
Aaron Culliney
ec4ff3de10
Refactor : shuffle moar macros into mockingboard.c
2015-06-14 14:07:33 -07:00
Aaron Culliney
af1c6bf159
Refactor : audio system functions return nonzero on failure
2015-06-14 14:07:33 -07:00
Aaron Culliney
c8834a91e3
Refactor: Rename and remove some macros and variables
2015-06-14 14:07:33 -07:00
Aaron Culliney
27a3fea005
Refactor : kill ds-shim.h
2015-06-14 14:07:33 -07:00
Aaron Culliney
93a578d40a
Refactor : remove and rename certain globals
2015-06-14 14:07:33 -07:00
Aaron Culliney
4d0ca2b6e3
Refactor : move another function to mockingboard module
2015-06-14 14:07:33 -07:00
Aaron Culliney
1679b8e76a
Refactor : excised more DS deadc0de
2015-06-14 14:07:33 -07:00
Aaron Culliney
3767f55846
Refactor : rename and coalesce audio buffer initialization structs
2015-06-14 14:07:33 -07:00
Aaron Culliney
49d2fe6e09
Refactor : excise deadc0de
2015-06-14 14:07:32 -07:00
Aaron Culliney
1707c60701
Refactor : completely excise win-shim
...
- Moves remaining shim code into mockingboard.c
- Breaks Mac builds for now =P
2015-06-14 14:07:32 -07:00
Aaron Culliney
994e1a4568
Refactor FALSE -> false
2015-06-14 14:07:32 -07:00
Aaron Culliney
f89c734996
Refactor : excise various macro defs
2015-06-14 14:07:32 -07:00
Aaron Culliney
b9371d3a38
Refactor : LPDWORD > unsigned long*
2015-06-14 14:07:32 -07:00
Aaron Culliney
7513f5e938
Refactor UINT -> unsigned int
2015-06-14 14:07:32 -07:00
Aaron Culliney
92f21a65ca
Refactor : LPVOID > void*
2015-06-14 14:07:32 -07:00
Aaron Culliney
e63afea069
Refactor : excise LPBYTE, LPLONG
2015-06-14 14:07:32 -07:00
Aaron Culliney
8cba7de872
Refactor : excise unused macro defs
2015-06-14 14:07:32 -07:00
Aaron Culliney
7263e161e4
Refactor : LONG -> long
2015-06-14 14:07:32 -07:00
Aaron Culliney
5312ddee00
Refactor : ULONG -> unsigned long
2015-06-14 14:07:32 -07:00
Aaron Culliney
109dfa855b
Refactor : DWORD -> unsigned long
2015-06-14 14:07:32 -07:00
Aaron Culliney
7051e6d906
Refactor : SHORT -> int16_t
2015-06-14 14:07:32 -07:00
Aaron Culliney
57cd12f1cc
Refactor : BYTE -> uint8_t
2015-06-14 14:07:32 -07:00
Aaron Culliney
6d252b0b3e
Refactor : WORD -> uint16_t
2015-06-14 14:07:32 -07:00
Aaron Culliney
4b28e33906
Refactor USHORT -> uint16_t
2015-06-14 14:07:32 -07:00
Aaron Culliney
a5d36c7dff
Refactor : remove unused macro defs
2015-06-14 14:07:32 -07:00
Aaron Culliney
a46a882a3d
Refactor length types
2015-06-14 14:07:32 -07:00
Aaron Culliney
c5fb837314
Refactor BOOL -> bool
2015-06-14 14:07:32 -07:00
Aaron Culliney
87e7ec24ff
Refactor HRESULT -> int
2015-06-14 14:07:32 -07:00
Aaron Culliney
20bbfcd286
Fixes for Tap Delay thread
...
- Now signals TD thread on each touch event that resulted in a change to the buttons.trackingIndex or a change to
the chosen button (buttons.touchDownButton, buttons.northButton, or buttons.southButton)
- Uses mutex (un)locking to avoid races around buttons.trackingIndex and chosen button
- Adds an equal delay on TD thread loop finish to ensure the touchDown/touchUp or touchDown/move/touchUp event
sequence is the same basic duration as received
2015-06-14 13:59:51 -07:00
Aaron Culliney
5e1d8552ef
Ensure file globals are in file scope
2015-06-14 13:59:29 -07:00
Aaron Culliney
c47afc4ccb
Bugfix disk selection on Linux desktop
2015-06-07 11:25:50 -07:00
Aaron Culliney
f28b708449
Delay joystick button touches FTW
...
- Previously a touch down event would trigger a joystick button, but now this slight delay in processing allows us
to discard this if the user really issued a tap-move combo
2015-06-06 21:44:11 -07:00
Aaron Culliney
1da7acbaba
Properly hook up Android shutdown paths
2015-06-06 21:18:27 -07:00
Aaron Culliney
26d7e7da3d
Reminder for a future rethink/refactor
2015-06-06 13:00:53 -07:00
Aaron Culliney
3108e035ed
Implement sticky-CTRL key for touch keyboard
2015-06-06 12:02:03 -07:00
Aaron Culliney
1cdbaa460a
Change joystick glyph
2015-06-03 22:21:33 -07:00
Aaron Culliney
5773ef2e8d
Simplify touch menu to just one model/texture
...
- Also seamlessly complements gltouchkbd layout
2015-06-03 22:13:19 -07:00
Aaron Culliney
f2abf4ce35
Fix emulator quit path on Android
2015-06-01 22:50:44 -07:00
Aaron Culliney
29006f9c5c
path handling cleanups
2015-06-01 22:25:29 -07:00
Aaron Culliney
064070be7c
Kill a magic number and ensure file_name is nul-terminated
2015-06-01 22:08:58 -07:00
Aaron Culliney
3f38467c93
Silence Valgrind complaint about gzread()
2015-06-01 22:04:01 -07:00
Aaron Culliney
adb09dc84e
Avoid buffer overflow +1, thank you Valgrind
2015-06-01 21:17:48 -07:00
Aaron Culliney
9d26e2c6f0
Tweak comments
2015-05-31 16:33:39 -07:00
Aaron Culliney
4c8856fb04
Comment unused/untested codepaths
2015-05-31 16:31:57 -07:00
Aaron Culliney
3b13fc29a4
Don't leak stuff-n-things, thank you Valgrind =)
...
- Major : Previously leaking interface threads
- Major : Leak of FILE* resources in inflate routine
- Minor : previous leak-on-exit of enumerated sound devices
2015-05-31 14:11:57 -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
6a453c3973
Don't exit in video_shutdown()
2015-05-31 11:25:23 -07:00
Aaron Culliney
a4f185d197
Bugfix: allow unsigned indexing
2015-05-31 11:23:49 -07:00
Aaron Culliney
5816962f32
Make RGBA_4444 codepaths available to HUD models
2015-05-30 23:18:08 -07:00
Aaron Culliney
bcb36a4801
add codepath for RGBA_4444 textures
2015-05-30 18:58:34 -07:00
Aaron Culliney
a3b2afe18f
Adds a semi-opaque halo effect around keyboard and menu glyphs for better contrast
2015-05-30 12:18:42 -07:00
Aaron Culliney
31cef9eb58
Avoid overflowing when rerendering character.
2015-05-29 22:14:53 -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
966ba0a2d8
No disk in drive (or invalid track) should return 0xFF
...
- Bug introduced in e01e437
- Bugfix allows U5 Journey Onward to work =P
2015-05-25 13:36:17 -07:00
Aaron Culliney
0cb3086622
gltouchjoy and keyboard are now toggle options
2015-05-23 23:30:18 -07:00