1
0
Fork 0
Commit graph

3760 commits

Author SHA1 Message Date
Patryk Obara
e1286efca9 Remove SDL_cdrom 1.2 based CD-ROM interfaces
This removes a feature of mounting physical CD-ROMs in DOSBox.

SDL 2.0 removed SDL_cdrom from supported libraries, so to bring this
code back, either the functionality will need to be reimplemented or
SDL_cdrom code modernized for SDL 2.0, and bundled with the repo (the
same way SDL_sound is already bundled).
2019-12-18 22:31:19 +01:00
Patryk Obara
5cc7e300e5 Remove inaccurate information from INTRO 2019-12-14 03:35:27 +01:00
Patryk Obara
b8fdf961ae Display a warning when user requests -ioctl 2019-12-14 03:35:27 +01:00
Patryk Obara
ddda555854 Remove MCI, DX, and DIO CD-ROM interfaces
Also, remove all traces of these interfaces from user manual (README
file) and man page (docs/dosbox.1).

MCI (Media Control Interface) was a primary Windows interface. Code
comments and documentation claimed, that it's only for "NT, 2000, XP"
but the code was enabled for Windows 2000 or later (version > 4.0).

DX (Digital audio eXtraction (?)) could be forced on any Windows with
autodetection working only on Vista and Windows 7 (code was disabled for
Windows 8 or later - probably unintentionally).

DIO used DeviceIoControl interface and Windows-specific ioctl calls.

All 3 interfaces depend on SDL and SDL_cdrom functionality to work.
SDL_cdrom 1.2 implementation uses MCI on Windows to provide the same
functionality.
2019-12-14 03:35:27 +01:00
Patryk Obara
61511a4bdf Merge branch 'svn/trunk' r4301 2019-12-10 15:27:14 +01:00
Peter Veenstra
77a46559a6 Additional refinements and speed ups. Thanks jmarsh!
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4301
2019-12-10 14:07:20 +00:00
Peter Veenstra
d37d74791e Simplify and correct flags handling so that childpsp works correctly and some misc fixes.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4299
2019-12-10 13:29:10 +00:00
Patryk Obara
fc321a7fa2 Merge branch 'svn/trunk' r4298 2019-12-10 12:42:57 +01:00
Patryk Obara
07fc74cff4 Silence 12 switch warnings
Author's intention was sufficiently explained in the comment
in this case.
2019-12-10 12:40:07 +01:00
Patryk Obara
6dde4e78bf Fix usage of uninitialized value in dos_mscdex
These issues were detected by Clang static analyzer.

Calling GetCurrentPos might leave pos uninitialized, and it will result
in passing uninitialized value pos.min to msf_to_frames function.

Same situation might happen for GetAudioStatus and all variables it
misses to initialize.
2019-12-10 12:40:07 +01:00
Patryk Obara
496611b2ce Fix out-of-bounds access error
Also, fix formatting in adjacent lines.

Coverity error CID 277445 says:

Out-of-bounds access (ARRAY_VS_SINGLETON).
Passing &ch to function upcase which uses it as an array. This might
corrupt or misinterpret adjacent memory locations.
2019-12-10 12:40:07 +01:00
Peter Veenstra
e7df2b9b19 Set cursor speed to the vga standard of 32 frames for a full period. Hope that this is correct for the other machines as well. Fix that frameskip would slow down the cursor blinking speed.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4298
2019-12-10 08:25:18 +00:00
Patryk Obara
fe519d0344 Merge branch 'svn/trunk' r4297 2019-12-10 00:07:41 +01:00
Patryk Obara
0049ba1bc5 Remove files used only by ASPI support 2019-12-09 21:36:27 +01:00
Patryk Obara
e43f83a68a Remove ASPI CD-ROM interface
ASPI was supported by Microsoft only for Windows 95, 98 and, ME.
Adaptec supported this interface going forward for Windows NT, 2000,
and XP (32-bit only).
2019-12-09 21:36:27 +01:00
Patryk Obara
d82766930f Reformat the enum with CD-ROM interfaces 2019-12-09 21:36:27 +01:00
ripsaw8080
0987fb6f0c Correct an oversight in INT10_GetDACPage; fixes blank screen in Blue Force on vgaonly machine type.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4297
2019-12-09 18:03:55 +00:00
Patryk Obara
5f9ac5eeab Remove code ifdefed for OS/2
Cleanup before replacing SDL1.2 with SDL2.

OS/2 support was introduced in DOSBox in March 2006.  OS/2 reached EOL
in December 2006.

As of 2019, OS/2 is being continued by proprietary 32-bit only ArcaOS,
although there is no official SDL2 support, despite pledges from SDL2
maintainers.
2019-12-09 16:27:11 +01:00
krcroft
ef2686ac02 Switch from std::vector to std::array 2019-12-09 09:11:16 +01:00
krcroft
78cc6be86d Make use of template variable, and reformat whitespace 2019-12-09 08:19:26 +01:00
krcroft
c34670aba0 Replace strncat with safe_strcat where possible 2019-12-09 08:19:26 +01:00
krcroft
c9198b2944 Fix unsafe memory operations and warnings in the fatDrive class
- Move imageDiskList from pointer to vector of unique_ptr
- Replace string operations with size-limited versions
- Initialize members
- Eliminate unecessary casts
- Eliminate memory-leak on pointer assignment
2019-12-09 08:19:26 +01:00
Patryk Obara
f89416a20a Update version in config.h and resource script 2019-12-09 07:22:15 +01:00
krcroft
8c6758c8d1 Memory overrun and C++11 updates
- Limit write length into buffer, and add comment about corner-case
- Use C++11's syntax to explicitly remove private copy and assignment operators
- Use C++11 container loop syntax to shorting a cleanup function
2019-12-07 19:08:47 +01:00
krcroft
cff6b05559 Improve memory safety in the DOS Drive Cache class
- Fix Bitu printf format type
- Check a pointer prior to dereferencing it
- Prevent writing one-beyond the last index
- Replace strcpy with with helper safe_strcpy, provided by @dreamer - thank you!
- Replace strcat with strncat
- Add constructor intializers for scalars and arrays
- Initialize and replace 0-value pointers with nullptr
- Pass in the buffer length when strncpy'ing into a function variable
2019-12-07 19:08:47 +01:00
Patryk Obara
9576db91c1 Use fixed name for a GitHub-generated zip 2019-12-05 23:35:15 +01:00
Patryk Obara
57d61085e2 Replace version with brand for .conf file suffix 2019-12-05 23:35:15 +01:00
krcroft
8f2a153dc2 STB Vorbis: eliminate inaccessible branch
The eliminated code removes the (ch == 1) branch, which is scoped
within this if condition: `if (rtype == 2 && ch != 1)`, therefore
the (ch == 1) branch will never be taken.
2019-12-05 10:35:44 +01:00
krcroft
a7a899fdb0 STB Vorbis: prevent division by zero in decode_resign if ch == 0
In the call to decode_residue:
  decode_residue(f, residue_buffers, ch, n2, r, do_not_decode);

The channel count is previously intialized as zero and incremented
based on a for-loop (f->channels) plus a conditional,
if (map->chan[j].mux == i).  If this doesn't happen then 'ch'
remains zero.

Once inside decode_residue(..), the code has three branches based
on channel count: stereo (ch == 2), mono (ch == 1), and then the
exception if it's neither of those (simple 'else').  It's in here
where a zero-valued 'ch' can be used as the denominator in these
calculations:
    int c_inter = z % ch
    p_inter = z/ch;

Obviously this 'else' branch is meant for channel counts greater
than two an not for zero channels; so this change simply makes
that branch only valid if (ch > 2).
2019-12-05 10:35:44 +01:00
krcroft
bedcc244d9 STB Vorbis: Check before derefercing a potential NULL pointer 2019-12-05 10:35:44 +01:00
Patryk Obara
4add527371 Fix wrong function name in the exception log
Bug report: https://sourceforge.net/p/dosbox/bugs/518/
2019-12-04 06:11:01 +01:00
David Reid
84588c50bd Bump dr_wav to v0.11.2
Fixes:
- https://github.com/mackron/dr_libs/issues/84
- https://github.com/mackron/dr_libs/issues/83
- https://github.com/mackron/dr_libs/issues/82
- https://github.com/mackron/dr_libs/issues/81
- https://github.com/mackron/dr_libs/issues/80
- https://github.com/mackron/dr_libs/issues/79
- https://github.com/mackron/dr_libs/issues/78
- https://github.com/mackron/dr_libs/issues/77
- https://github.com/mackron/dr_libs/issues/76
- https://github.com/mackron/dr_libs/issues/75
2019-12-03 06:35:00 +01:00
David Reid
6b5a5acc9a Bump dr_mp3 to v0.5.4
Fixes:
- https://github.com/mackron/dr_libs/issues/86
- https://github.com/mackron/dr_libs/issues/85
2019-12-03 06:35:00 +01:00
David Reid
1866b4d295 Bump dr_flac to v0.12.3
Fixes:
- https://github.com/mackron/dr_libs/issues/93
- https://github.com/mackron/dr_libs/issues/92
- https://github.com/mackron/dr_libs/issues/91
- https://github.com/mackron/dr_libs/issues/90
- https://github.com/mackron/dr_libs/issues/89
- https://github.com/mackron/dr_libs/issues/88
- https://github.com/mackron/dr_libs/issues/87
2019-12-03 06:35:00 +01:00
krcroft
1f2ff70463 Ensure alloca is not defined before defining 2019-12-03 06:35:00 +01:00
krcroft
01a61a33f8 Remove ineffective consts and indicate unused variables 2019-12-03 06:35:00 +01:00
krcroft
d23f31fbe3 Avoid unecessary float-to-double promotion, and cleanup 2019-12-03 06:35:00 +01:00
krcroft
b55b43f543 Use PRIuPTR and define it for Windows GCC 64-bit 2019-12-03 05:12:28 +01:00
Patryk Obara
7d21bb1408 Move definition out of autoconfig 2019-12-03 05:12:28 +01:00
krcroft
7e3c4d3945 Harmonize refactoring of switch statement 2019-12-03 05:12:28 +01:00
krcroft
8a5a539f9a Cleanup printf types and explicitly state unused vars 2019-12-03 05:12:28 +01:00
krcroft
e5981c3b8e Fix uninitized scalar access 2019-12-03 05:12:28 +01:00
krcroft
d1a1932a07 Fix uninitized pointer accesses 2019-12-03 05:12:28 +01:00
Patryk Obara
f3b8bff3f5 Remove unused private field in device_EMM 2019-11-29 06:27:14 +01:00
Patryk Obara
e95b6e7063 Remove unused private field in fatFile 2019-11-29 06:27:14 +01:00
Patryk Obara
7afc052550 Silence "unused-const-variable" warning
This register dump looks useful, but it was never used for anything…
2019-11-29 06:27:14 +01:00
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
Patryk Obara
59edc4d9b5 Change the length of version field in infobox
Otherwise, infobox looks broken when version string has more
than 8 characters.
2019-11-29 06:27:14 +01:00
Patryk Obara
e831d0b090 Remove pointless switch causing warnings 2019-11-29 06:27:14 +01:00