Commit Graph

65 Commits

Author SHA1 Message Date
Aaron Culliney
2cc23cf35d Upgrade to GPLv3 "or later" and update copyrights 2015-10-22 21:09:13 -07:00
Aaron Culliney
4ae7e3e735 Silence potentially abusive logging in disk VM callbacks 2015-10-20 20:57:52 -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
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
7c7a96af71 Refactor : rename to track_width for clarity 2015-10-10 22:38:57 -07:00
Aaron Culliney
f4fa5670b4 Add function-call time tracing for Linux/Android 2015-10-04 14:22:26 -07:00
Aaron Culliney
236b8e358a INITHELLO with -UCONFORMANT_TRACKS now passes 2015-10-04 12:35:38 -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
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
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
0470cb8907 Remove deadc0de since ROMs should be pre-loaded 2015-02-17 16:06:41 -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
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
381d97c485 Preliminary VBL support sourced from AppleWin 2015-01-10 16:17:18 -08:00
Aaron Culliney
af706e7602 rename read_random to avoid namespace collison on Mac 2014-12-29 19:07: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
Aaron Culliney
9b9ca39344 Improve disk tracing
- Disk trace is now ASCII output
    - Output track sector and file position data
    - Debugger command added
    - New preprocessor define
2014-11-17 20:52:29 -08:00
Aaron Culliney
c7c888d218 Refactor style/whitespace 2014-11-01 20:02:44 -07:00
Aaron Culliney
74943c71e5 Fix INITHELLO for dsk images
* This has apparently been broken since around the turn of the millenium from an ancient refactor.  Luckily I still
      have earlier pre-git code drops ;-)
2014-11-01 19:47:38 -07:00
Aaron Culliney
c140c5c7e0 Mini-refactor 2014-10-19 12:54:03 -07:00
Aaron Culliney
acc3deb264 Tweaks to disk boot trace test 2014-10-11 18:31:19 -07:00
Aaron Culliney
15927d1554 test raw disk stream 2014-10-11 10:44:20 -07:00
Aaron Culliney
afc15e0b63 Refactor INTERFACE_CLASS stuff out of disk API 2014-09-16 20:40:42 -07:00
Aaron Culliney
a3973b2e35 ROM generation 2014-06-22 11:09:59 -07:00
Aaron Culliney
670a776571 Fixes for Linux build 2014-06-21 23:40:04 -07:00