Patryk Obara
6325c995d6
Fix "unused-variable" warning
2019-11-29 06:27:14 +01:00
Patryk Obara
5ff1fcd604
Fix "misleading-indentation" warnings
...
GCC helpfully indicates, that:
warning: this ‘if’ clause does not guard (…) this statement, but
the latter is misleadingly indented as if it were guarded by the ‘if’.
Also, improve readability while we're touching these lines.
2019-11-29 06:27:14 +01:00
krcroft
eaeb001b17
Play into subsequent track(s) if playback length exceeds the the current track
...
Issue reported by Dagar and Pr3tty F1y, and confirmed as a bug by ripsaw8080.
Thank you!
This fixes the GoG release of Betrayal at Krondor which (either due to CD mastering
issues or a faulty rip), requests playback of a given track at the tail end
of the prior track.
In debugging and performing this fix, many debug messages were improved as well
as making some small small code adjustments, such as using iterators to point to
individual tracks (track->attribute) instead of using the tracks array
(tracks[track -1].attribute).
2019-11-24 17:34:54 +01:00
Patryk Obara
ef40533d22
Silence 2 switch warnings
2019-11-24 17:14:32 +01:00
Patryk Obara
723dfdbe46
Silence static analysis false-positive garbage value
...
Clang static analyzer returned a false-positive issue in line 671:
The right operand of '<' is a garbage value
Variables needed to be moved up, because otherwise initialization
crosses to the next case.
2019-11-24 17:14:32 +01:00
Patryk Obara
f105697165
Silence a number of switch warnings in vga_xga
...
In total, 28 warnings are removed by adding these few default cases.
2019-11-24 17:14:32 +01:00
Patryk Obara
b344344821
Properly fix warnings about unused variable
...
A workaround with no-op assignment fools the compiler and static
analyzer, but the proper fix cleans up this code as well.
2019-11-24 17:14:32 +01:00
Patryk Obara
ef144e4bca
Merge branch 'svn/trunk' r4294
2019-11-23 18:41:05 +01:00
Peter Veenstra
f923a8e644
a=a can trigger warnings as well. This should be hopefully do the trick.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4294
2019-11-22 07:28:27 +00:00
Patryk Obara
cdc193170c
Merge branch 'svn/trunk' r4293
2019-11-21 20:53:21 +01:00
Peter Veenstra
db51b63554
Remove some old code and do an a=a to trick a compiler in non-debug mode
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4293
2019-11-20 07:17:12 +00:00
Peter Veenstra
8cb2e08f31
Refinements of commit 4291, so that precission can be specified as well and less fixed defines are used
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4292
2019-11-19 16:16:06 +00:00
Peter Veenstra
01fe58047e
Try to solve the Bitu formatting warning on all supported platforms (both 32 and 64 bit). Did a few places. Still a lot to go. Changed default display of Bitu to be unsigned instead of signed.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4291
2019-11-18 21:08:57 +00:00
Patryk Obara
4e65c8f69f
Add asserts to prevent a potential bug
...
Use C++11 static_assert to assure, that code behaves correctly; if
Chip or Channel structs will be changed to non-std layout or a different
first fields will be introduced, that will invalidate the offset
calculation.
Additionally, add asserts to prevent possibility of introducing a bug
when offset stored in one the tables is 0.
2019-11-12 17:13:01 +01:00
Patryk Obara
1e95311081
Add cases for missing SynthMode enumerations
...
Silence compiler warnings:
enumeration value 'sm2Percussion' not handled in switch [-Wswitch]
enumeration value 'sm3Percussion' not handled in switch [-Wswitch]
2019-11-12 17:13:01 +01:00
Patryk Obara
43170ff1c2
Merge branch 'svn/trunk' r4284
2019-11-12 16:13:13 +01:00
Peter Veenstra
a5d561a3ad
Fix some issues with commit 4282. Thanks dreamer_ and jmarsh.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4283
2019-11-12 12:25:43 +00:00
Patryk Obara
34112dd2da
Merge branch 'svn/trunk' r4282
2019-11-12 08:56:37 +01:00
krcroft
d1a6f373cb
Refactor CD-DA flow by removing intermediate buffers and loops
...
Thanks to @ripsaw8080 for insight into CD-DA channel mapping,
@hail-to-the-ryzen for testing and flagging a position-tracking bug,
and @dreamer_ for guidance and code review.
The CD-DA volume and channel mapping loops were moved to generic mixer
calls and no longer require a pre-processing loop:
- Application-controlled CD-DA volume adjustment is now applied using
an existing mixer volume scalar that was previously unused by the
CD-DA code.
- Mapping of CD-DA left and right channels is now applied at the tail
end of the mixer's sample ingest sequence.
The following have been removed:
- The CD-DA callback chunk-wise circular buffer
- The decode buffers in the Opus and MP3 decoders
- The decode buffer and conversion buffers in SDL_Sound
These removals and API changes allow the image player's buffer
to be passed-through ultimately to the audio codec, skipping multiple
intermediate buffers.
2019-11-12 08:16:53 +01:00
Peter Veenstra
92da7c45ef
Switch to a different way to calculate the table offsets. Thanks jmarsh
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4282
2019-11-11 17:23:05 +00:00
Patryk Obara
fe7600baa9
Merge branch 'svn/trunk' r4280
2019-11-07 15:12:51 +01:00
Peter Veenstra
a2e7d257e5
GenerateDMASound can generate sound even with input size is 0, so lets not do that. Might even be an option to skip this call entirely depending on the sblaster configuration (not sb.dma.autoinit)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4280
2019-11-06 08:59:40 +00:00
Patryk Obara
d68af8b650
Merge branch 'svn/trunk' r4279
2019-11-02 19:30:48 +01:00
Sjoerd van der Berg
e20e8fa92c
Some dma changes to make the world a better place
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4279
2019-11-02 11:21:48 +00:00
Sjoerd van der Berg
95ac285db1
Fix sblaster autoinit restart and improve the auto into single cycle transfer handling
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4278
2019-10-31 20:00:08 +00:00
Patryk Obara
79fe83ede6
Merge branch 'svn/trunk'
2019-10-10 00:16:04 +02:00
Peter Veenstra
e1d8eb67a4
Use fabsf when return value is a float. Small warning fix.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4269
2019-10-09 20:49:21 +00:00
Patryk Obara
a323e173c2
Merge branch 'svn/trunk'
2019-10-03 23:44:48 +02:00
Peter Veenstra
60204619d0
- Fix url to forum.
...
- Fix Bit8u instead of char weirdness for imageDisk (dreamer_)
- Give device_t a virtual empty destructor so some warning program
doesn't go crazy.
- Give the code that moves the Z drive its own function for readability.
- Give sizes arrays default values again for warning program.
- Rewrite IMGMOUNT in order to exit early for clarity and attempt
to group things together.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4267
2019-10-03 20:03:43 +00:00
ripsaw8080
7f979234f8
Bit 2 of video status register always set. Satisfies a strange test in Blues Brothers, thus preventing slow animations.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4266
2019-10-03 16:35:44 +00:00
Patryk Obara
a4a6bed5c1
Merge branch 'svn/trunk'
2019-10-01 18:11:50 +02:00
Peter Veenstra
6243fa9711
Some more cleanups and memleak fixes.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4265
2019-10-01 13:05:08 +00:00
Peter Veenstra
a919e33aec
Pick some lowhanging fruit. (some memory leaks and unused variables)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4264
2019-10-01 12:11:09 +00:00
Patryk Obara
b62a637157
Import svn:ignore props to .gitignore files
2019-09-15 20:34:57 +02:00
Peter Veenstra
25e01bd042
Fix bug 512, reported by philipp. (checking wrong variable to see if malloc was a success)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4254
2019-09-02 16:50:30 +00:00
Peter Veenstra
f74067c2b0
Use size_t when dealing with strings and strlen. (Alexandre)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4232
2019-06-19 08:11:01 +00:00
ripsaw8080
139456b2d0
Make effect of I/O delay more consistent as cycles run out. Prevents flickering in NBA Jam Tournament Edition at higher cycles, and also improves automatic speed limiting in Quake.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4215
2019-04-20 22:59:42 +00:00
ripsaw8080
7f7e5f34ac
Ignore unrequested data in intelligent mode; fixes Roland sound in Krusty's Fun House.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4192
2019-02-21 14:53:31 +00:00
ripsaw8080
88bc1944e8
Reset followed by switch to UART mode should take some time; fixes MPU detection in F29 Retaliator and Hover Force. Also minimize reset delay, which helps with MPU detection at higher cycles in games that prefer less delay, such as Bureau 13.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4190
2019-02-04 15:18:49 +00:00
ripsaw8080
d4c38121c9
Implement timer 2 output on port 61h; fixes SB detection in Abaron. Also implement port 62h with timer 2 output for CGA and Hercules machine types; fixes Frank Bruno's Boxing and Math Maze.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4187
2019-02-04 15:11:50 +00:00
Peter Veenstra
fdd8358de7
Make feature checks consistent, include right header for memset, correct one off error in paging table size compare for when not using USE_FULL_TLB (jmarsh)
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4185
2019-01-28 14:26:19 +00:00
Peter Veenstra
1fbaff47fc
Update year and address of FSF
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4183
2019-01-25 14:09:58 +00:00
ripsaw8080
e0a7ede037
Don't generate sound after DMA is masked at end of single-cycle transfer. Prevents issues with some games.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4176
2018-11-23 21:55:12 +00:00
Sjoerd van der Berg
3bde40bc91
Make a dma channel go masked when it reaches end of count without autoinit
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4175
2018-11-19 22:02:13 +00:00
Sjoerd van der Berg
72f8544723
Make autoinit exit work and prevent double single cycle transfers when quitting autoinit
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4174
2018-11-19 18:34:49 +00:00
ripsaw8080
80342e104e
Correct response for keyboard echo command. Fixes Steel Shot.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4170
2018-11-12 16:41:00 +00:00
Peter Veenstra
f522e81d32
Quick fix for dma channel 0 having no page porthandler.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4165
2018-09-29 16:17:36 +00:00
Peter Veenstra
2f09b52de8
Fix typos reported by lintian and change DosBox to DOSBox.
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4161
2018-09-14 19:53:55 +00:00
Peter Veenstra
bece575aff
Fix compilation
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4158
2018-09-04 09:43:50 +00:00
Peter Veenstra
53b67e8871
Update logging function to log in debug mode
...
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4142
2018-08-27 11:08:37 +00:00