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
Aaron Culliney
692a6793cb
Default enable touch joystick instead of keyboard
2015-05-23 23:25:32 -07:00
Aaron Culliney
4d3de200d9
Extra/configurable defaults to uppercase for U4 keys...
2015-05-21 22:32:38 -07:00
Aaron Culliney
13a7dbfbb0
defensive coding
2015-05-21 22:31:06 -07:00
Aaron Culliney
df218fed05
Improved keyboard with semi-inline arrows
2015-05-17 22:05:15 -07:00
Aaron Culliney
8e73b70f95
Touch keyboard now supports special keys
2015-05-10 15:25:50 -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
1126a319ec
Misc tweaks to various GL interface objects
2015-04-26 18:12:56 -07:00
Aaron Culliney
e7c0d8fe48
Comments, and avoid NULL deref on app resume
2015-04-22 23:40:48 -07:00
Aaron Culliney
4e23795cfd
First cut at GL touch keyboard
2015-04-22 23:32:36 -07:00
Aaron Culliney
725cf68011
Move common function to base class
2015-04-19 14:28:47 -07:00
Aaron Culliney
142f0181bc
support showing hourglass pause animation
2015-04-19 14:28:09 -07:00
Aaron Culliney
eee0dd45e3
zero-initialize buffers
2015-04-19 14:26:40 -07:00
Aaron Culliney
2b658954f9
Various additions/changes to interface glyphs
2015-04-19 14:25:53 -07:00
Aaron Culliney
629e44b210
Slightly more idiomatic way to upload texture pixels
2015-04-18 15:29:55 -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
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
e2272132c2
Do not destroy OpenGL needful things for VAO codepath
...
- Gets Mac build rendering again
2015-04-16 21:53:44 -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
e2794070dd
fix typos to allow gltouchjoy to build
2015-04-12 16:20:01 -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
121e250c62
REFACTOR : GLModel render pass is common for HUD models
2015-04-12 11:27:33 -07:00
Aaron Culliney
06051e44e7
REFACTOR : CPU animation is now a HUD model
2015-04-12 00:41:41 -07:00
Aaron Culliney
19e1a8e3d8
REFACTOR : beginnings of object-oriented approach for HUD models
2015-04-12 00:40:43 -07:00
Aaron Culliney
60d7e2b305
touchjoy render pass optimizations : avoid OpenGL calls if alpha is zero
2015-04-11 12:18:36 -07:00
Aaron Culliney
e876cd03b6
REFACTOR : begin consolidating common code for OpenGL HUD interfaces
2015-04-11 11:42:18 -07:00
Aaron Culliney
5712850e84
REFACTOR : demoModel -> GLModel
2015-04-11 11:42:18 -07:00
Aaron Culliney
9bbb180feb
Bugfix touchjoy : make sure only the correct button is firing
2015-04-11 11:42:18 -07:00
Aaron Culliney
afc8c8bb24
Old Spamsung devices running Gingerbread cannot handle dangerous characters like backslash '\' in their OpenGL shader parsers
2015-04-07 23:17:13 -07:00
Aaron Culliney
985cec7725
Baseline GL touch joystick functionality (for AXIS_EMULATED_DEVICE type)
...
- Also updates GL touch joystick to allow dynamic HUD re-positioning
2015-04-04 20:35:34 -07:00
Aaron Culliney
23171c65fc
unnecessary to send alpha parameter into function
2015-04-04 12:49:05 -07:00
Aaron Culliney
30236cb400
First cut at GL Touch Joystick
2015-04-01 19:59:38 -07:00
Aaron Culliney
d63bd7b412
macro defines for various mousetext characters
2015-04-01 19:57:12 -07:00
Aaron Culliney
c40f9f7487
X11 renderer : don't change XImage from different thread
...
- Only allow the X11 renderer thread to change the XImage
2015-03-23 22:05:08 -07:00
Aaron Culliney
30c59bd43f
X11 renderer still works!
2015-03-23 21:45:46 -07:00
Aaron Culliney
5f210bfcf3
HACK around lingering issues with speed adjustment on mobile
2015-03-22 19:14: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
358541b8cc
Simplify BranchXCycles
2015-03-22 15:46:58 -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
2965afe12e
Two-finger-touch pops up softkeyboard and adjusts GL viewport
2015-03-11 12:54:50 -07:00
Aaron Culliney
e839baa931
Updates to prepare/support Android Studio / Gradle builds
2015-03-10 13:15:36 -07:00
Aaron Culliney
abe520d8b7
Remove unnecessary instructions in CPU tracing
2015-03-10 11:15:28 -07:00
Aaron Culliney
f12a4c7142
Bugfix : assure that ARM processor flags are cleared
2015-03-10 11:13:59 -07:00
Aaron Culliney
7e249745d8
Make disk loading faster on slow Android devices
...
- So for now we are not "conformant" on Android, but it appears to be worth the disk image loading times
2015-03-10 10:23:52 -07:00
Aaron Culliney
09ff973016
Work around lack of GLSL version string in older Android device(s)
2015-03-10 10:23:52 -07:00
Aaron Culliney
8d6961c0cb
Callee is responsible for saving higher regs
2015-03-10 10:23:52 -07:00
Aaron Culliney
199300ba39
Bugfix bank maybewrite glue
2015-03-10 10:23:52 -07:00
Aaron Culliney
d30a7b8a38
Codepath is now similar to x86 variant
2015-03-10 10:23:52 -07:00
Aaron Culliney
ee73c5890b
base_c4rom is a flexible pointer
2015-03-10 10:23:52 -07:00
Aaron Culliney
347ed76034
Mark some VM tests as needing attention
2015-03-10 10:23:52 -07:00
Aaron Culliney
36b78f657f
Remove an uppity assert
...
- Manifesting on Mac ... believed to be spurious and more fallout from auto-speed adjustment refactor
2015-03-10 10:22:47 -07:00
Aaron Culliney
2855d15f9b
Get graphics working again on Mac and add another snide Android compiler warning =P
2015-03-10 10:22:47 -07:00
Aaron Culliney
d657ab8c46
Unstick Mac builds and tests
2015-03-10 10:22:47 -07:00
Aaron Culliney
b329ac2bff
Remove some redundant code
2015-03-05 21:25:14 -08:00
Aaron Culliney
e7ad98535a
Correct order for CPU tracing arguments
2015-03-05 21:23:36 -08:00
Aaron Culliney
9cbceac80b
Fix bug in GetZPage_X and GetZPage_Y macros
2015-03-05 21:06:42 -08:00
Aaron Culliney
2ec4e46012
Expose a test failure on ARM
2015-03-05 20:59:51 -08:00
Aaron Culliney
c3969f9d1d
Fixes to get Android tests rendering
2015-02-24 20:53:19 -08:00
Aaron Culliney
fadb806c92
DSK image loading considered slow, Use NIB image for faster tests (not specifically exercising DSK codepaths)
...
- There may be some wins in optimizing the DSK codepaths, but I think these are inherently slow now that we have
brought in Applewin's conformant code
- It's possible that the best option will be to bring back the non-conformant-but-faster DSK codepaths originally in
this emulator but ...
2015-02-24 20:42:30 -08:00
Aaron Culliney
1c7e707af9
Comment pthread_join()
...
- Blocks Android rendering
- Unnecessary for GLUT/Linux renderer
- Might need to be worked around for Mac tests
2015-02-24 15:49:57 -08:00
Aaron Culliney
560726728f
bugfix CPU reinitialization
2015-02-24 12:11:16 -08:00
Aaron Culliney
48625458cf
testdisk.c is starting to run on Android
2015-02-24 12:10:51 -08:00
Aaron Culliney
0c3121ac65
Android : copy stuff out of APK for ease of use, and pass data_dir to native side
...
- Also makes data_dir more useful for various platforms
2015-02-23 23:11:17 -08:00
Aaron Culliney
792c0a0b08
DAA & DAS algorithms in ARM assembly
2015-02-22 13:46:58 -08:00
Aaron Culliney
d517339842
All 65c02 CPU tests for ARM pass, except for decimal mode
2015-02-21 21:06:01 -08:00
Aaron Culliney
404d4cdb4f
Various tweaks to CPU tests
2015-02-21 21:00:42 -08:00
Aaron Culliney
811df361a8
Fixes for ADC_b and AND on ARM
2015-02-19 23:25:33 -08:00
Aaron Culliney
41b8ca7700
More canonical test for oVerflow
2015-02-19 20:13:13 -08:00
Aaron Culliney
59d151d684
First cut at DAA and DAS algorithms in ARM and misc assembly cleanup
2015-02-19 16:03:29 -08:00
Aaron Culliney
86e8eeafe2
testcpu is beginning to run (with errors)
2015-02-18 23:09:16 -08:00
Aaron Culliney
3149914741
Get some CPU tests passing on ARM/Android
2015-02-18 23:08:16 -08:00
Aaron Culliney
0d7e81c7d4
Testing does not depend on olde prefs system
2015-02-18 16:17:12 -08:00
Aaron Culliney
1ac7c7e12d
Remove OpenSSL dependency, use public source SHA1
2015-02-18 15:54:04 -08:00
Aaron Culliney
78325ad469
Silence compiler warning
2015-02-18 11:00:50 -08:00
Aaron Culliney
2a6d889309
test 16bit underflow/overflow in op_JSR and op_RTS
2015-02-18 10:51:26 -08:00
Aaron Culliney
f4bc218bd8
WIP : Misc optims/changes of ARM-variant 65c02 CPU
2015-02-17 20:33:27 -08:00
Aaron Culliney
829ee225e6
Android variant compiles/links
2015-02-17 20:28:23 -08:00
Aaron Culliney
602c2530e6
Stub a touch-based joystick in OpenGL
2015-02-17 20:23:06 -08:00
Aaron Culliney
43b280d3ba
REFACTOR : glinput.c -> glutinput.c
2015-02-17 20:13:18 -08:00
Aaron Culliney
abf231711c
Get zlib-helpers.c compiling/linking on Android
2015-02-17 20:09:13 -08:00
Aaron Culliney
604a325c6b
Default to avoiding use of VAOs
...
- Default Android NDK does not have appear to have glGenVertexArrays, et al
2015-02-17 19:54:47 -08:00
Aaron Culliney
ada636f245
REFACTOR : migrate common preferences settings into misc.c
...
- prefs.c code should be unused on Android/iOS
2015-02-17 16:16:34 -08:00
Aaron Culliney
815b6f5a7c
REFACTOR : soundcore to use logging macros
2015-02-17 16:14:25 -08:00
Aaron Culliney
0470cb8907
Remove deadc0de since ROMs should be pre-loaded
2015-02-17 16:06:41 -08:00
Aaron Culliney
28aea0bf14
Remove redundant code
2015-02-17 11:06:50 -08:00
Aaron Culliney
c4e3d93fd4
Fix underflow/overflow branch tests
2015-02-16 12:29:08 -08:00
Aaron Culliney
20d3a67db8
Increase testing of CPU branch logic, include 16bit underflow and overflow
...
- Unlikely that the original Apple //e ever saw this happen in reality?
- TODO : test with valgrind for invalid code access ...
2015-02-16 12:18:59 -08:00
Aaron Culliney
d8ae71ddb0
WARNING : changes test to accommodate CPU implementation
...
- TODO : check the Apple //e Bible for this ...
- Calculates 2-byte branch instructions (Bxx +OFF)--that sit right at page boundary (at 0x..fe 0x..ff)--as 3 cycles
rather than 4, since PC has already advanced to the new page (matches logic currently in x86/cpu.S
2015-02-16 11:57:33 -08:00
Aaron Culliney
15dd90902c
REFACTOR : more common code into macros
2015-02-16 10:28:57 -08:00
Aaron Culliney
5aa4c20249
REFACTOR : style+clarity changes
2015-02-16 09:42:13 -08:00
Aaron Culliney
d9ce113aa0
WIP : Android armeabi target compiles
2015-02-16 08:47:26 -08:00
Aaron Culliney
6439d303a8
Misc build tweaks
2015-02-16 08:47:26 -08:00
Aaron Culliney
35458b2839
Change LOG() macro to accommodate Android logging
2015-02-16 08:47:26 -08:00
Aaron Culliney
a61b7f5c39
properly brace INTERFACE_CLASSIC stuff
2015-02-16 08:47:26 -08:00
Aaron Culliney
1c31c1074d
REFACTOR : macro defines into toggles
2015-02-16 08:47:26 -08:00
Aaron Culliney
00cec0dcae
WIP : 65c02 CPU in ARM assembly
2015-02-16 08:47:26 -08:00
Aaron Culliney
0801050455
REFACTOR : move special case initialization codepath to C
2015-02-16 08:47:26 -08:00
Aaron Culliney
30c09da259
REFACTOR : simplified/streamlined some assembly
2015-02-16 08:47:26 -08:00
Aaron Culliney
12ba31f1af
REFACTOR : whitespace, style, remove deadcode, extract code into macro
2015-02-16 08:47:26 -08:00
Aaron Culliney
9a87aa8a3d
REFACTOR : migrate stack page offset into altzp configuration
2015-02-16 08:47:26 -08:00
Aaron Culliney
7bd7899325
REFACTOR : brace x86-specific defines, prep for __arm__
2015-02-16 08:47:26 -08:00
Aaron Culliney
b246baa90d
REFACTOR : macro renaming for clarity/readability
2015-02-16 08:47:26 -08:00
Aaron Culliney
cf79056b28
Merge x86-specific apple2.h stuff into cpu-regs.h
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
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
851d22568b
Use 32bit counters to avoid overflow
...
- Previously there were cases where we could overflow cpu65_cycles_to_execute when adding the cycles_speaker_feedback
2015-02-03 22:10:47 -08:00
Aaron Culliney
1cbd426548
removed unused macros
2015-02-01 15:26:50 -08:00
Aaron Culliney
3d8a6ac23d
PARTIAL Revert "Faster keyboard read"
...
This reverts commit 30b8f308c6
.
(Generated assembly for apple_ii_64k ARRAY is wrong on Mac).
Conflicts:
src/vm.c
2015-02-01 15:25:55 -08:00
Aaron Culliney
c332a89738
Don't run finicky or abusive tests by default
...
- But keep them around for such times as when we're not sure why a particular emulated program is not working =)
2015-01-31 14:27:13 -08:00
Aaron Culliney
eb534e17b5
Get CPU tests working again
2015-01-31 14:26:45 -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
780905155a
Only render if necessary
2015-01-23 23:37:43 -08:00
Aaron Culliney
b4516b49df
Add general-use branch-prediction macros
2015-01-23 23:34:03 -08:00
Aaron Culliney
b8c44b81ab
Simple FPS logging
2015-01-18 11:10:16 -08:00
Aaron Culliney
30b8f308c6
Faster keyboard read
2015-01-18 11:06:02 -08:00
Aaron Culliney
191a1b7395
Fix Mac builds
2015-01-16 21:11:29 -08:00
Aaron Culliney
b4f91661d7
don't leak a buffer
...
- thank you, valgrind
2015-01-14 23:24:51 -08:00
Aaron Culliney
882eae4818
Ugh, GLUT idle func was chewing up CPU
...
- ugh, why is the millis parameter to glutTimerFunc() an int?! 1000ms/60Hz = 17ms
2015-01-14 23:24:33 -08:00
Aaron Culliney
87a2d081d3
CPU_TRACING now emits machine cycles
2015-01-11 18:37:57 -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
cce2bbb0cc
timing code cleanup
2015-01-11 12:24:43 -08:00
Aaron Culliney
8d35cf1d2c
Rename to motor_off and record motor access times
2015-01-11 12:04:06 -08:00
Aaron Culliney
bf4e920b1f
should always be NI2 size for converted PO/DO
2015-01-10 20:45:07 -08:00
Aaron Culliney
dcafae8390
read_rand() is really just floating_bus() return
2015-01-10 19:42:00 -08:00
Aaron Culliney
1ba28db8d7
Varous VM switches return memory floating bus value
2015-01-10 18:46:49 -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
b031bdb4a6
Refactor private defines
2015-01-10 14:14:49 -08:00
Aaron Culliney
06011e2902
New disk tests and improvements
...
- Exercise various TRACING codepaths
- Adds ProDOS-order tests
2015-01-03 16:24:02 -08:00
Aaron Culliney
ffd4647693
Make test_breakpoint() function work again
2014-12-29 21:36:21 -08:00
Aaron Culliney
fdd57f3095
Fix some tests and expose mdstr globally (easier debugger introspection)
2014-12-29 21:36:21 -08:00
Aaron Culliney
af706e7602
rename read_random to avoid namespace collison on Mac
2014-12-29 19:07:43 -08:00
Aaron Culliney
7bc0475a5d
disable unstable random2 test
2014-12-28 15:06:59 -08:00
Aaron Culliney
7d3b39926c
Disk testing is separate from vm testing
...
- Breaks out disk testing into its own suite
- Misc testing and build-system tweaks
2014-12-28 14:50:43 -08:00
Aaron Culliney
cd9a9ad3cf
Auto-eject disk if present in drive
2014-12-28 14:48:53 -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
a24436e88f
Gamepad clamp-beyond-radius implemented
2014-12-05 22:31:12 -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
0f25f6d9d1
srandom/random for PRNG should be "good enough"
2014-11-29 14:23:27 -08:00
Aaron Culliney
b6e329a3c6
Prevent segfault in glGetError() during app initialization
2014-11-29 13:31:21 -08:00
Aaron Culliney
4f0814ce42
Remove unstable __FILE__ output from vmtrace logging
2014-11-29 13:28:34 -08:00
Aaron Culliney
ad39463519
update vmtrace test
2014-11-29 10:04:21 -08:00
Aaron Culliney
6c1215dbb2
Tests build/run on Mac
...
- Fixes statistics printing
- Some VM tests currently fail on Mac
2014-11-27 10:52:12 -08:00
Aaron Culliney
2aa2648d30
Fix for other VM/display tests
2014-11-25 22:01:46 -08:00
Aaron Culliney
bc643bfbdb
joystick devices only supported under VIDEO_OPENGL
2014-11-25 21:59:05 -08:00
Aaron Culliney
e51a57b376
Fix PAGE2 display test
2014-11-25 21:57:57 -08:00
Aaron Culliney
050d1de389
HIRES PAGE2 test: shows moire on page2
2014-11-25 21:56:44 -08:00
Aaron Culliney
0ad98602fe
Improved VM_TRACING syntax
2014-11-23 17:13:05 -08:00
Aaron Culliney
88b7db0387
unwedge test_PHP
2014-11-23 17:12:20 -08:00
Aaron Culliney
101e507add
Adds a VM tracing facility and functionality test
2014-11-23 14:03:18 -08:00
Aaron Culliney
89fc5f6599
Display test improvements
...
* Removes hackish code in testdisplay.c in preparation for a bugfix
* Adds function to output state of softswitches ... useful from GDB
2014-11-23 12:53:59 -08:00
Aaron Culliney
3536b6b65a
Force a splash screen before allowing emulation to start
2014-11-22 14:28:38 -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
8416dd4d49
adds PRNG tests
2014-11-22 14:03:57 -08:00
Aaron Culliney
7ed5250392
new SHA1 to fix cputrace test
2014-11-21 22:27:10 -08:00
Aaron Culliney
4483105edb
Don't reset joystick buttons on menu exit
2014-11-19 20:00:13 -08:00
Aaron Culliney
9f1c54e555
Expose c_read_random()
2014-11-19 19:59:39 -08:00